Built motion from commit e0fa946e.|2.6.5
[motion2.git] / server / api / intZohoAccount / intZohoAccount.controller.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 _0xf8fb=['lodash','squel','crypto','jsforce','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','index','map','ZohoAccount','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','rawAttributes','find','create','body','getConfigurations','findOne','hasOwnProperty','nolimit','addConfiguration','AccountId','getSubjects','channel','ZohoConfiguration','ZohoField','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.com.cn','POST','/oauth/v2/token','refreshToken','clientId','clientSecret','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','getFields','host','code','com','serverUrl','slice','lastIndexOf','GET','format','Zoho-oauthtoken\x20','response','message','Owner','Subject','Description','Call_Duration','Call_Result','Call_Start_Time','Call_Type','remove','includes','api_name','system_mandatory','push','custom_field','data_type','picklist','pick_list_values','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','test','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs'];(function(_0x157014,_0x25d3ec){var _0x2abe1e=function(_0x28540f){while(--_0x28540f){_0x157014['push'](_0x157014['shift']());}};_0x2abe1e(++_0x25d3ec);}(_0xf8fb,0xf5));var _0xbf8f=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0xf8fb[_0x4b055c];return _0x4b62bb;};'use strict';var emlformat=require(_0xbf8f('0x0'));var rimraf=require(_0xbf8f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbf8f('0x2'));var rp=require(_0xbf8f('0x3'));var moment=require(_0xbf8f('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xbf8f('0x5'));var util=require(_0xbf8f('0x6'));var path=require(_0xbf8f('0x7'));var sox=require(_0xbf8f('0x8'));var csv=require(_0xbf8f('0x9'));var ejs=require(_0xbf8f('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xbf8f('0xb'));var squel=require(_0xbf8f('0xc'));var crypto=require(_0xbf8f('0xd'));var jsforce=require(_0xbf8f('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xbf8f('0x9'));var querystring=require(_0xbf8f('0xf'));var Papa=require('papaparse');var Redis=require(_0xbf8f('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xbf8f('0x11'));var as=require(_0xbf8f('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xbf8f('0x13'))('api');var utils=require('../../config/utils');var config=require(_0xbf8f('0x14'));var licenseUtil=require(_0xbf8f('0x15'));var db=require(_0xbf8f('0x16'))['db'];var integrations=require(_0xbf8f('0x17'));function respondWithStatusCode(_0x5f051e,_0x58baca){_0x58baca=_0x58baca||0xcc;return function(_0x634fd2){if(_0x634fd2){return _0x5f051e[_0xbf8f('0x18')](_0x58baca);}return _0x5f051e[_0xbf8f('0x19')](_0x58baca)[_0xbf8f('0x1a')]();};}function respondWithResult(_0x3f2e47,_0x55a0f1){_0x55a0f1=_0x55a0f1||0xc8;return function(_0x2434f4){if(_0x2434f4){return _0x3f2e47['status'](_0x55a0f1)[_0xbf8f('0x1b')](_0x2434f4);}};}function respondWithFilteredResult(_0x43b165,_0x39ba66){return function(_0x588fb4){if(_0x588fb4){var _0x503df5=typeof _0x39ba66[_0xbf8f('0x1c')]===_0xbf8f('0x1d')&&typeof _0x39ba66[_0xbf8f('0x1e')]===_0xbf8f('0x1d');var _0x18f9a7=_0x588fb4[_0xbf8f('0x1f')];var _0x1735f8=_0x503df5?0x0:_0x39ba66[_0xbf8f('0x1c')];var _0x9ecb71=_0x503df5?_0x588fb4['count']:_0x39ba66[_0xbf8f('0x1c')]+_0x39ba66[_0xbf8f('0x1e')];var _0x47d1bb;if(_0x9ecb71>=_0x18f9a7){_0x9ecb71=_0x18f9a7;_0x47d1bb=0xc8;}else{_0x47d1bb=0xce;}_0x43b165[_0xbf8f('0x19')](_0x47d1bb);return _0x43b165[_0xbf8f('0x20')](_0xbf8f('0x21'),_0x1735f8+'-'+_0x9ecb71+'/'+_0x18f9a7)[_0xbf8f('0x1b')](_0x588fb4);}return null;};}function patchUpdates(_0x5c960b){return function(_0x4195bf){try{jsonpatch[_0xbf8f('0x22')](_0x4195bf,_0x5c960b,!![]);}catch(_0x1a28f8){return BPromise[_0xbf8f('0x23')](_0x1a28f8);}return _0x4195bf['save']();};}function saveUpdates(_0x23c0e5,_0x550bdc){return function(_0x1e2c8d){if(_0x1e2c8d){return _0x1e2c8d[_0xbf8f('0x24')](_0x23c0e5)[_0xbf8f('0x25')](function(_0x3b3363){return _0x3b3363;});}return null;};}function removeEntity(_0xdf5a59,_0x26eb3c){return function(_0x7256c0){if(_0x7256c0){return _0x7256c0[_0xbf8f('0x26')]()[_0xbf8f('0x25')](function(){_0xdf5a59[_0xbf8f('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2fed7f,_0x40eae5){return function(_0x1812ed){if(!_0x1812ed){_0x2fed7f[_0xbf8f('0x18')](0x194);}return _0x1812ed;};}function handleError(_0x185b88,_0x441a0e){_0x441a0e=_0x441a0e||0x1f4;return function(_0x590d4a){logger[_0xbf8f('0x27')](_0x590d4a[_0xbf8f('0x28')]);if(_0x590d4a['name']){delete _0x590d4a[_0xbf8f('0x29')];}_0x185b88['status'](_0x441a0e)[_0xbf8f('0x2a')](_0x590d4a);};}exports[_0xbf8f('0x2b')]=function(_0x1875e1,_0x5b1293){var _0x5c3ab1={},_0x48f2d5={},_0x4fa681={'count':0x0,'rows':[]};var _0x47753d=_[_0xbf8f('0x2c')](db[_0xbf8f('0x2d')]['rawAttributes'],function(_0x4bee07){return{'name':_0x4bee07[_0xbf8f('0x2e')],'type':_0x4bee07[_0xbf8f('0x2f')]['key']};});_0x48f2d5[_0xbf8f('0x30')]=_[_0xbf8f('0x2c')](_0x47753d,_0xbf8f('0x29'));_0x48f2d5[_0xbf8f('0x31')]=_[_0xbf8f('0x32')](_0x1875e1['query']);_0x48f2d5[_0xbf8f('0x33')]=_[_0xbf8f('0x34')](_0x48f2d5[_0xbf8f('0x30')],_0x48f2d5[_0xbf8f('0x31')]);_0x5c3ab1['attributes']=_[_0xbf8f('0x34')](_0x48f2d5[_0xbf8f('0x30')],qs['fields'](_0x1875e1['query'][_0xbf8f('0x35')]));_0x5c3ab1['attributes']=_0x5c3ab1[_0xbf8f('0x36')][_0xbf8f('0x37')]?_0x5c3ab1['attributes']:_0x48f2d5['model'];if(!_0x1875e1[_0xbf8f('0x31')]['hasOwnProperty']('nolimit')){_0x5c3ab1['limit']=qs[_0xbf8f('0x1e')](_0x1875e1['query'][_0xbf8f('0x1e')]);_0x5c3ab1[_0xbf8f('0x1c')]=qs[_0xbf8f('0x1c')](_0x1875e1[_0xbf8f('0x31')][_0xbf8f('0x1c')]);}_0x5c3ab1[_0xbf8f('0x38')]=qs['sort'](_0x1875e1[_0xbf8f('0x31')][_0xbf8f('0x39')]);_0x5c3ab1[_0xbf8f('0x3a')]=qs[_0xbf8f('0x33')](_[_0xbf8f('0x3b')](_0x1875e1[_0xbf8f('0x31')],_0x48f2d5[_0xbf8f('0x33')]),_0x47753d);if(_0x1875e1['query'][_0xbf8f('0x3c')]){_0x5c3ab1[_0xbf8f('0x3a')]=_[_0xbf8f('0x3d')](_0x5c3ab1['where'],{'$or':_[_0xbf8f('0x2c')](_0x47753d,function(_0x174ab2){if(_0x174ab2[_0xbf8f('0x2f')]!==_0xbf8f('0x3e')){var _0x8007bc={};_0x8007bc[_0x174ab2[_0xbf8f('0x29')]]={'$like':'%'+_0x1875e1[_0xbf8f('0x31')][_0xbf8f('0x3c')]+'%'};return _0x8007bc;}})});}_0x5c3ab1=_[_0xbf8f('0x3d')]({},_0x5c3ab1,_0x1875e1[_0xbf8f('0x3f')]);var _0x2e0114={'where':_0x5c3ab1[_0xbf8f('0x3a')]};return db['ZohoAccount']['count'](_0x2e0114)['then'](function(_0x31a55c){_0x4fa681['count']=_0x31a55c;if(_0x1875e1[_0xbf8f('0x31')][_0xbf8f('0x40')]){_0x5c3ab1[_0xbf8f('0x41')]=[{'all':!![]}];}return db[_0xbf8f('0x2d')][_0xbf8f('0x42')](_0x5c3ab1);})[_0xbf8f('0x25')](function(_0x26d4be){_0x4fa681['rows']=_0x26d4be;return _0x4fa681;})[_0xbf8f('0x25')](respondWithFilteredResult(_0x5b1293,_0x5c3ab1))[_0xbf8f('0x43')](handleError(_0x5b1293,null));};exports[_0xbf8f('0x44')]=function(_0x5f2f5f,_0x48baf1){var _0xcfbd34={'raw':![],'where':{'id':_0x5f2f5f[_0xbf8f('0x45')]['id']}},_0x4a05f1={};_0x4a05f1[_0xbf8f('0x30')]=_['keys'](db['ZohoAccount'][_0xbf8f('0x46')]);_0x4a05f1[_0xbf8f('0x31')]=_['keys'](_0x5f2f5f['query']);_0x4a05f1[_0xbf8f('0x33')]=_['intersection'](_0x4a05f1[_0xbf8f('0x30')],_0x4a05f1[_0xbf8f('0x31')]);_0xcfbd34[_0xbf8f('0x36')]=_[_0xbf8f('0x34')](_0x4a05f1[_0xbf8f('0x30')],qs['fields'](_0x5f2f5f['query'][_0xbf8f('0x35')]));_0xcfbd34[_0xbf8f('0x36')]=_0xcfbd34['attributes'][_0xbf8f('0x37')]?_0xcfbd34[_0xbf8f('0x36')]:_0x4a05f1[_0xbf8f('0x30')];if(_0x5f2f5f['query'][_0xbf8f('0x40')]){_0xcfbd34[_0xbf8f('0x41')]=[{'all':!![]}];}_0xcfbd34=_['merge']({},_0xcfbd34,_0x5f2f5f[_0xbf8f('0x3f')]);return db[_0xbf8f('0x2d')][_0xbf8f('0x47')](_0xcfbd34)[_0xbf8f('0x25')](handleEntityNotFound(_0x48baf1,null))['then'](respondWithResult(_0x48baf1,null))[_0xbf8f('0x43')](handleError(_0x48baf1,null));};exports['create']=function(_0x19e064,_0x158ca6){return db[_0xbf8f('0x2d')][_0xbf8f('0x48')](_0x19e064[_0xbf8f('0x49')],{})[_0xbf8f('0x25')](respondWithResult(_0x158ca6,0xc9))[_0xbf8f('0x43')](handleError(_0x158ca6,null));};exports[_0xbf8f('0x24')]=function(_0x22b6bf,_0x408039){if(_0x22b6bf[_0xbf8f('0x49')]['id']){delete _0x22b6bf[_0xbf8f('0x49')]['id'];}return db['ZohoAccount'][_0xbf8f('0x47')]({'where':{'id':_0x22b6bf[_0xbf8f('0x45')]['id']}})['then'](handleEntityNotFound(_0x408039,null))[_0xbf8f('0x25')](saveUpdates(_0x22b6bf[_0xbf8f('0x49')],null))['then'](respondWithResult(_0x408039,null))[_0xbf8f('0x43')](handleError(_0x408039,null));};exports[_0xbf8f('0x26')]=function(_0x1a9b40,_0x2df16e){return db[_0xbf8f('0x2d')]['find']({'where':{'id':_0x1a9b40[_0xbf8f('0x45')]['id']}})[_0xbf8f('0x25')](handleEntityNotFound(_0x2df16e,null))['then'](removeEntity(_0x2df16e,null))[_0xbf8f('0x43')](handleError(_0x2df16e,null));};exports[_0xbf8f('0x4a')]=function(_0xab31e9,_0x1363c3,_0x170025){var _0x3f0041={};var _0x188749={};var _0x5c5158;var _0x25e169;return db[_0xbf8f('0x2d')][_0xbf8f('0x4b')]({'where':{'id':_0xab31e9[_0xbf8f('0x45')]['id']}})[_0xbf8f('0x25')](handleEntityNotFound(_0x1363c3,null))[_0xbf8f('0x25')](function(_0x49eb93){if(_0x49eb93){_0x5c5158=_0x49eb93;_0x188749[_0xbf8f('0x30')]=_[_0xbf8f('0x32')](db['ZohoConfiguration']['rawAttributes']);_0x188749[_0xbf8f('0x31')]=_[_0xbf8f('0x32')](_0xab31e9[_0xbf8f('0x31')]);_0x188749[_0xbf8f('0x33')]=_[_0xbf8f('0x34')](_0x188749[_0xbf8f('0x30')],_0x188749[_0xbf8f('0x31')]);_0x3f0041[_0xbf8f('0x36')]=_[_0xbf8f('0x34')](_0x188749[_0xbf8f('0x30')],qs[_0xbf8f('0x35')](_0xab31e9[_0xbf8f('0x31')][_0xbf8f('0x35')]));_0x3f0041['attributes']=_0x3f0041[_0xbf8f('0x36')][_0xbf8f('0x37')]?_0x3f0041[_0xbf8f('0x36')]:_0x188749['model'];_0x3f0041[_0xbf8f('0x38')]=qs[_0xbf8f('0x39')](_0xab31e9['query']['sort']);_0x3f0041[_0xbf8f('0x3a')]=qs['filters'](_[_0xbf8f('0x3b')](_0xab31e9['query'],_0x188749[_0xbf8f('0x33')]));if(_0xab31e9[_0xbf8f('0x31')][_0xbf8f('0x3c')]){_0x3f0041[_0xbf8f('0x3a')]=_['merge'](_0x3f0041[_0xbf8f('0x3a')],{'$or':_['map'](_0x3f0041[_0xbf8f('0x36')],function(_0xde64b4){var _0x388856={};_0x388856[_0xde64b4]={'$like':'%'+_0xab31e9[_0xbf8f('0x31')][_0xbf8f('0x3c')]+'%'};return _0x388856;})});}_0x3f0041=_[_0xbf8f('0x3d')]({},_0x3f0041,_0xab31e9[_0xbf8f('0x3f')]);return _0x5c5158[_0xbf8f('0x4a')](_0x3f0041);}})[_0xbf8f('0x25')](function(_0x1af10c){if(_0x1af10c){_0x25e169=_0x1af10c[_0xbf8f('0x37')];if(!_0xab31e9[_0xbf8f('0x31')][_0xbf8f('0x4c')](_0xbf8f('0x4d'))){_0x3f0041[_0xbf8f('0x1e')]=qs[_0xbf8f('0x1e')](_0xab31e9['query'][_0xbf8f('0x1e')]);_0x3f0041['offset']=qs['offset'](_0xab31e9['query'][_0xbf8f('0x1c')]);}return _0x5c5158[_0xbf8f('0x4a')](_0x3f0041);}})['then'](function(_0x445213){if(_0x445213){return _0x445213?{'count':_0x25e169,'rows':_0x445213}:null;}})[_0xbf8f('0x25')](respondWithResult(_0x1363c3,null))[_0xbf8f('0x43')](handleError(_0x1363c3,null));};exports[_0xbf8f('0x4e')]=function(_0xd23d30,_0x145b9f,_0x50a27a){if(_0xd23d30[_0xbf8f('0x49')]['id']){delete _0xd23d30[_0xbf8f('0x49')]['id'];}return db['ZohoAccount'][_0xbf8f('0x4b')]({'where':{'id':_0xd23d30[_0xbf8f('0x45')]['id']}})[_0xbf8f('0x25')](handleEntityNotFound(_0x145b9f,null))['then'](function(_0x494af6){if(_0x494af6){_0xd23d30[_0xbf8f('0x49')][_0xbf8f('0x4f')]=_0x494af6['id'];_0xd23d30[_0xbf8f('0x49')]['Subjects']=integrations[_0xbf8f('0x50')](_0xd23d30[_0xbf8f('0x49')][_0xbf8f('0x51')],_0xd23d30[_0xbf8f('0x49')][_0xbf8f('0x2f')]);_0xd23d30[_0xbf8f('0x49')]['Descriptions']=integrations['getDescriptions'](_0xd23d30[_0xbf8f('0x49')][_0xbf8f('0x51')],_0xd23d30[_0xbf8f('0x49')]['type']);return db[_0xbf8f('0x52')][_0xbf8f('0x48')](_0xd23d30[_0xbf8f('0x49')],{'include':[{'model':db[_0xbf8f('0x53')],'as':'Subjects'},{'model':db[_0xbf8f('0x53')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x145b9f,null))[_0xbf8f('0x43')](handleError(_0x145b9f,null));};function getAccessToken(_0x483e47){return new Promise(function(_0x5ecf39,_0x29d392){var _0x13451c;switch(_0x483e47[_0xbf8f('0x54')]){case'US':_0x13451c=_0xbf8f('0x55');break;case'AU':_0x13451c=_0xbf8f('0x56');break;case'EU':_0x13451c=_0xbf8f('0x57');break;case'IN':_0x13451c='https://accounts.zoho.in';break;case'CN':_0x13451c=_0xbf8f('0x58');break;default:_0x13451c=_0xbf8f('0x57');break;}var _0x1dcb17={'method':_0xbf8f('0x59'),'uri':_0x13451c+_0xbf8f('0x5a'),'qs':{'refresh_token':_0x483e47[_0xbf8f('0x5b')],'client_id':_0x483e47[_0xbf8f('0x5c')],'client_secret':_0x483e47[_0xbf8f('0x5d')],'grant_type':'refresh_token'},'json':!![]};return rp(_0x1dcb17)[_0xbf8f('0x25')](function(_0x8895f5){if(_0x8895f5[_0xbf8f('0x5e')]){_0x5ecf39(_0x8895f5[_0xbf8f('0x5e')]);}else{_0x29d392(_0xbf8f('0x5f'));}})['catch'](function(_0x3d7fa3){_0x29d392(_0x3d7fa3);});});}exports[_0xbf8f('0x60')]=function(_0x4116d1,_0x4ebe63,_0x5b9917){var _0x9991d7,_0x491547,_0xa7eba4,_0x3f3368,_0x4e49c0;return db[_0xbf8f('0x2d')][_0xbf8f('0x4b')]({'where':{'id':_0x4116d1[_0xbf8f('0x45')]['id']},'attributes':['id',_0xbf8f('0x61'),'zone',_0xbf8f('0x5c'),_0xbf8f('0x5d'),'serverUrl',_0xbf8f('0x62'),_0xbf8f('0x5b')]})[_0xbf8f('0x25')](handleEntityNotFound(_0x4ebe63,null))['then'](function(_0x25b3b2){_0x4e49c0=_0x25b3b2;_0x9991d7=_0x4e49c0['host'];_0x491547=_0x9991d7==='zoho.eu'?'eu':_0xbf8f('0x63');_0xa7eba4=_0x4e49c0[_0xbf8f('0x64')];var _0x2ec38a=_0xa7eba4[_0xbf8f('0x65')](-0x1);if(_0x2ec38a==='/'||_0x2ec38a==='\x5c'||_0x2ec38a===':'){_0xa7eba4=_0xa7eba4['substring'](0x0,_0xa7eba4[_0xbf8f('0x66')](_0x2ec38a));}if(!_0x4e49c0['refreshToken']){throw new Error('Refresh\x20Token\x20not\x20available\x20for\x20the\x20account');}return getAccessToken(_0x4e49c0);})[_0xbf8f('0x25')](function(_0x15010b){if(_0x15010b){return rp({'method':_0xbf8f('0x67'),'uri':util[_0xbf8f('0x68')]('https://www.zohoapis.%s/crm/v2/settings/fields',_0x491547),'qs':{'module':'Calls'},'headers':{'Authorization':_0xbf8f('0x69')+_0x15010b},'json':!![]});}})['then'](function(_0x16e915){if(_0x16e915){if(_0x16e915['response']&&_0x16e915[_0xbf8f('0x6a')][_0xbf8f('0x27')]){throw new Error(_0x16e915['response']['error'][_0xbf8f('0x6b')]);}var _0x18014a=[];var _0xa9191b=[];var _0x3c0355=[_0xbf8f('0x6c'),_0xbf8f('0x6d'),_0xbf8f('0x6e'),'WhoId',_0xbf8f('0x6f'),_0xbf8f('0x70'),_0xbf8f('0x71'),_0xbf8f('0x72')];_0xa9191b=_[_0xbf8f('0x73')](_0x16e915[_0xbf8f('0x35')],function(_0x4cd736){return _0x3c0355[_0xbf8f('0x74')](_0x4cd736[_0xbf8f('0x75')]);});for(var _0x48a548=0x0;_0x48a548<_0xa9191b[_0xbf8f('0x37')];_0x48a548++){if(_0xa9191b[_0x48a548][_0xbf8f('0x76')]===![]){_0x18014a[_0xbf8f('0x77')]({'id':_0xa9191b[_0x48a548]['id'],'name':_0xa9191b[_0x48a548]['display_label'],'custom':_0xa9191b[_0x48a548][_0xbf8f('0x78')],'options':_0xa9191b[_0x48a548][_0xbf8f('0x79')]===_0xbf8f('0x7a')&&_0xa9191b[_0x48a548][_0xbf8f('0x7b')][_0xbf8f('0x37')]>-0x1?_[_0xbf8f('0x2c')](_0xa9191b[_0x48a548]['pick_list_values'],function(_0x2a7716){return{'name':_0x2a7716,'value':_0x2a7716};}):[]});}}return{'count':_0x18014a[_0xbf8f('0x37')],'rows':_0x18014a};}else{return{'count':0x0,'rows':[]};}})[_0xbf8f('0x25')](respondWithResult(_0x4ebe63,null))['catch'](function(_0x1d28bd){var _0x1664bd=_0x4116d1[_0xbf8f('0x31')]['test']?0x1f4:_0x1d28bd[_0xbf8f('0x7c')]||0x1f4;logger['error'](_0xbf8f('0x7d'),_0xbf8f('0x60'),_0x1664bd,JSON[_0xbf8f('0x7e')](_0x1d28bd));delete _0x1d28bd[_0xbf8f('0x29')];if(_0x1664bd===0x191){_0x1664bd=0x190;}_0x4ebe63[_0xbf8f('0x19')](_0x1664bd)[_0xbf8f('0x2a')](_0x4116d1[_0xbf8f('0x31')][_0xbf8f('0x7f')]?{'message':'Wrong\x20credentials','statusCode':_0x1d28bd[_0xbf8f('0x7c')]}:_0x1d28bd);});};