Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / chatQueue / chatQueue.controller.js
index 1b100fe..16a41e3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1735=['lodash','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','jayson/promise','client','http','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','update','destroy','get','ChatQueues','UserProfileResource','end','stack','name','index','map','ChatQueue','type','key','query','keys','intersection','attributes','model','fields','order','sort','where','filters','filter','merge','VIRTUAL','findAll','rows','show','params','rawAttributes','length','include','options','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','UserChatQueue','hasOwnProperty','nolimit','pick','ChatQueueId','User','findAndCountAll','agent','chatPause','updatedAt','createdAt','format','SIP','getTeams','findOne','addTeams','Team','Agents','online','voicePause','interface','flatMap','sequelize','each','forEach','emit','removeTeams','tq.TeamId','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','ut.UserId\x20=\x20?','toString','SELECT','TeamId','includes','union','compact','value','removeAgents','userChatQueue:remove','addAgents','ids','omit','userChatQueue:save','isArray','getAgents','eml-format','rimraf','zip-dir','moment','bluebird','util','path','to-csv','fs-extra'];(function(_0x47d99d,_0x4681cb){var _0x55e0cc=function(_0x3ace23){while(--_0x3ace23){_0x47d99d['push'](_0x47d99d['shift']());}};_0x55e0cc(++_0x4681cb);}(_0x1735,0x85));var _0x5173=function(_0x32d39a,_0x492e95){_0x32d39a=_0x32d39a-0x0;var _0x1e1267=_0x1735[_0x32d39a];return _0x1e1267;};'use strict';var emlformat=require(_0x5173('0x0'));var rimraf=require(_0x5173('0x1'));var zipdir=require(_0x5173('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x5173('0x3'));var BPromise=require(_0x5173('0x4'));var Mustache=require('mustache');var util=require(_0x5173('0x5'));var path=require(_0x5173('0x6'));var sox=require('sox');var csv=require(_0x5173('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5173('0x8'));var _=require(_0x5173('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5173('0xa'));var toCsv=require(_0x5173('0x7'));var querystring=require(_0x5173('0xb'));var Papa=require(_0x5173('0xc'));var Redis=require(_0x5173('0xd'));var authService=require(_0x5173('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x5173('0xf'));var hardwareService=require(_0x5173('0x10'));var logger=require(_0x5173('0x11'))(_0x5173('0x12'));var utils=require('../../config/utils');var config=require(_0x5173('0x13'));var licenseUtil=require(_0x5173('0x14'));var db=require('../../mysqldb')['db'];config[_0x5173('0x15')]=_[_0x5173('0x16')](config[_0x5173('0x15')],{'host':_0x5173('0x17'),'port':0x18eb});var socket=require(_0x5173('0x18'))(new Redis(config[_0x5173('0x15')]));require(_0x5173('0x19'))[_0x5173('0x1a')](socket);var jayson=require(_0x5173('0x1b'));var client=jayson[_0x5173('0x1c')][_0x5173('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x18f742,_0x1e3007,_0x14ef18,_0x4a6286){return new BPromise(function(_0x2f5af5,_0x1eccb1){var _0x1db810=_0x4a6286||client;return _0x1db810['request'](_0x18f742,_0x14ef18)[_0x5173('0x1e')](function(_0x2b59d0){logger[_0x5173('0x1f')](_0x5173('0x20'),_0x1e3007,_0x5173('0x21'));logger['debug'](_0x5173('0x22'),_0x1e3007,'request\x20sent',JSON[_0x5173('0x23')](_0x2b59d0));if(_0x2b59d0[_0x5173('0x24')]){if(_0x2b59d0[_0x5173('0x24')]['code']===0x1f4){logger[_0x5173('0x24')]('ChatQueue,\x20%s,\x20%s',_0x1e3007,_0x2b59d0[_0x5173('0x24')][_0x5173('0x25')]);return _0x1eccb1(_0x2b59d0[_0x5173('0x24')]['message']);}logger['error']('ChatQueue,\x20%s,\x20%s',_0x1e3007,_0x2b59d0[_0x5173('0x24')][_0x5173('0x25')]);return _0x2f5af5(_0x2b59d0[_0x5173('0x24')][_0x5173('0x25')]);}else{logger[_0x5173('0x1f')](_0x5173('0x20'),_0x1e3007,_0x5173('0x21'));_0x2f5af5(_0x2b59d0['result'][_0x5173('0x25')]);}})[_0x5173('0x26')](function(_0x4d55a8){logger[_0x5173('0x24')](_0x5173('0x20'),_0x1e3007,_0x4d55a8);_0x1eccb1(_0x4d55a8);});});}function respondWithStatusCode(_0x2c6a3e,_0xc651e0){_0xc651e0=_0xc651e0||0xcc;return function(_0x4705fe){if(_0x4705fe){return _0x2c6a3e[_0x5173('0x27')](_0xc651e0);}return _0x2c6a3e[_0x5173('0x28')](_0xc651e0)['end']();};}function respondWithResult(_0x98b5ee,_0x3882fb){_0x3882fb=_0x3882fb||0xc8;return function(_0x4722e7){if(_0x4722e7){return _0x98b5ee[_0x5173('0x28')](_0x3882fb)[_0x5173('0x29')](_0x4722e7);}};}function respondWithFilteredResult(_0x177b0f,_0x3a8dcd){return function(_0x17cc5b){if(_0x17cc5b){var _0x38bf0d=typeof _0x3a8dcd[_0x5173('0x2a')]===_0x5173('0x2b')&&typeof _0x3a8dcd['limit']===_0x5173('0x2b');var _0x1c3ce2=_0x17cc5b[_0x5173('0x2c')];var _0x4790d5=_0x38bf0d?0x0:_0x3a8dcd[_0x5173('0x2a')];var _0x12b47e=_0x38bf0d?_0x17cc5b[_0x5173('0x2c')]:_0x3a8dcd[_0x5173('0x2a')]+_0x3a8dcd[_0x5173('0x2d')];var _0x5cd486;if(_0x12b47e>=_0x1c3ce2){_0x12b47e=_0x1c3ce2;_0x5cd486=0xc8;}else{_0x5cd486=0xce;}_0x177b0f[_0x5173('0x28')](_0x5cd486);return _0x177b0f[_0x5173('0x2e')](_0x5173('0x2f'),_0x4790d5+'-'+_0x12b47e+'/'+_0x1c3ce2)['json'](_0x17cc5b);}return null;};}function patchUpdates(_0x28ebf8){return function(_0x54d951){try{jsonpatch[_0x5173('0x30')](_0x54d951,_0x28ebf8,!![]);}catch(_0x52b2fc){return BPromise[_0x5173('0x31')](_0x52b2fc);}return _0x54d951['save']();};}function saveUpdates(_0x2dbf1e,_0x2947eb){return function(_0x2680b4){if(_0x2680b4){return _0x2680b4[_0x5173('0x32')](_0x2dbf1e)['then'](function(_0x553373){return _0x553373;});}return null;};}function removeEntity(_0x5377ce,_0x467833){return function(_0x454c30){if(_0x454c30){return _0x454c30[_0x5173('0x33')]()[_0x5173('0x1e')](function(){var _0x555c84=_0x454c30[_0x5173('0x34')]({'plain':!![]});var _0x11ca68=_0x5173('0x35');return db[_0x5173('0x36')][_0x5173('0x33')]({'where':{'type':_0x11ca68,'resourceId':_0x555c84['id']}})['then'](function(){return _0x454c30;});})[_0x5173('0x1e')](function(){_0x5377ce[_0x5173('0x28')](0xcc)[_0x5173('0x37')]();});}};}function handleEntityNotFound(_0x4f7ad5,_0x12c08e){return function(_0x5d3f48){if(!_0x5d3f48){_0x4f7ad5[_0x5173('0x27')](0x194);}return _0x5d3f48;};}function handleError(_0x52a34e,_0x3ca3ef){_0x3ca3ef=_0x3ca3ef||0x1f4;return function(_0x1406de){logger[_0x5173('0x24')](_0x1406de[_0x5173('0x38')]);if(_0x1406de['name']){delete _0x1406de[_0x5173('0x39')];}_0x52a34e[_0x5173('0x28')](_0x3ca3ef)['send'](_0x1406de);};}exports[_0x5173('0x3a')]=function(_0x495d79,_0x311bb7){var _0xed10e7={},_0x5c4e8f={},_0x7585f1={'count':0x0,'rows':[]};var _0x1246b2=_[_0x5173('0x3b')](db[_0x5173('0x3c')]['rawAttributes'],function(_0x439269){return{'name':_0x439269['fieldName'],'type':_0x439269[_0x5173('0x3d')][_0x5173('0x3e')]};});_0x5c4e8f['model']=_[_0x5173('0x3b')](_0x1246b2,_0x5173('0x39'));_0x5c4e8f[_0x5173('0x3f')]=_[_0x5173('0x40')](_0x495d79[_0x5173('0x3f')]);_0x5c4e8f['filters']=_[_0x5173('0x41')](_0x5c4e8f['model'],_0x5c4e8f['query']);_0xed10e7[_0x5173('0x42')]=_[_0x5173('0x41')](_0x5c4e8f[_0x5173('0x43')],qs[_0x5173('0x44')](_0x495d79[_0x5173('0x3f')]['fields']));_0xed10e7['attributes']=_0xed10e7[_0x5173('0x42')]['length']?_0xed10e7[_0x5173('0x42')]:_0x5c4e8f[_0x5173('0x43')];if(!_0x495d79[_0x5173('0x3f')]['hasOwnProperty']('nolimit')){_0xed10e7[_0x5173('0x2d')]=qs[_0x5173('0x2d')](_0x495d79[_0x5173('0x3f')][_0x5173('0x2d')]);_0xed10e7['offset']=qs[_0x5173('0x2a')](_0x495d79['query'][_0x5173('0x2a')]);}_0xed10e7[_0x5173('0x45')]=qs[_0x5173('0x46')](_0x495d79[_0x5173('0x3f')][_0x5173('0x46')]);_0xed10e7[_0x5173('0x47')]=qs['filters'](_['pick'](_0x495d79['query'],_0x5c4e8f[_0x5173('0x48')]),_0x1246b2);if(_0x495d79['query'][_0x5173('0x49')]){_0xed10e7[_0x5173('0x47')]=_[_0x5173('0x4a')](_0xed10e7[_0x5173('0x47')],{'$or':_['map'](_0x1246b2,function(_0x4af572){if(_0x4af572[_0x5173('0x3d')]!==_0x5173('0x4b')){var _0x35601d={};_0x35601d[_0x4af572[_0x5173('0x39')]]={'$like':'%'+_0x495d79[_0x5173('0x3f')][_0x5173('0x49')]+'%'};return _0x35601d;}})});}_0xed10e7=_['merge']({},_0xed10e7,_0x495d79['options']);var _0x1966c4={'where':_0xed10e7[_0x5173('0x47')]};return db[_0x5173('0x3c')][_0x5173('0x2c')](_0x1966c4)['then'](function(_0x4c6965){_0x7585f1[_0x5173('0x2c')]=_0x4c6965;if(_0x495d79[_0x5173('0x3f')]['includeAll']){_0xed10e7['include']=[{'all':!![]}];}return db['ChatQueue'][_0x5173('0x4c')](_0xed10e7);})['then'](function(_0x44115e){_0x7585f1[_0x5173('0x4d')]=_0x44115e;return _0x7585f1;})[_0x5173('0x1e')](respondWithFilteredResult(_0x311bb7,_0xed10e7))[_0x5173('0x26')](handleError(_0x311bb7,null));};exports[_0x5173('0x4e')]=function(_0x3e8e9a,_0x47b892){var _0x58b94f={'raw':!![],'where':{'id':_0x3e8e9a[_0x5173('0x4f')]['id']}},_0x36a4e4={};_0x36a4e4[_0x5173('0x43')]=_[_0x5173('0x40')](db[_0x5173('0x3c')][_0x5173('0x50')]);_0x36a4e4[_0x5173('0x3f')]=_[_0x5173('0x40')](_0x3e8e9a['query']);_0x36a4e4[_0x5173('0x48')]=_[_0x5173('0x41')](_0x36a4e4[_0x5173('0x43')],_0x36a4e4[_0x5173('0x3f')]);_0x58b94f['attributes']=_['intersection'](_0x36a4e4[_0x5173('0x43')],qs['fields'](_0x3e8e9a[_0x5173('0x3f')][_0x5173('0x44')]));_0x58b94f[_0x5173('0x42')]=_0x58b94f[_0x5173('0x42')][_0x5173('0x51')]?_0x58b94f['attributes']:_0x36a4e4['model'];if(_0x3e8e9a[_0x5173('0x3f')]['includeAll']){_0x58b94f[_0x5173('0x52')]=[{'all':!![]}];}_0x58b94f=_[_0x5173('0x4a')]({},_0x58b94f,_0x3e8e9a[_0x5173('0x53')]);return db[_0x5173('0x3c')]['find'](_0x58b94f)[_0x5173('0x1e')](handleEntityNotFound(_0x47b892,null))[_0x5173('0x1e')](respondWithResult(_0x47b892,null))[_0x5173('0x26')](handleError(_0x47b892,null));};exports['create']=function(_0x472af2,_0x5c623e){return db['ChatQueue'][_0x5173('0x54')](_0x472af2[_0x5173('0x55')],{})['then'](function(_0x1f3912){var _0x46fa60=_0x472af2['user'][_0x5173('0x34')]({'plain':!![]});if(!_0x46fa60)throw new Error(_0x5173('0x56'));if(_0x46fa60[_0x5173('0x57')]==='user'){var _0x4a9ed3=_0x1f3912[_0x5173('0x34')]({'plain':!![]});var _0x1b53fb='ChatQueues';return db['UserProfileSection'][_0x5173('0x58')]({'where':{'name':_0x1b53fb,'userProfileId':_0x46fa60['userProfileId']},'raw':!![]})[_0x5173('0x1e')](function(_0x332e8d){if(_0x332e8d&&_0x332e8d[_0x5173('0x59')]===0x0){return db[_0x5173('0x36')][_0x5173('0x54')]({'name':_0x4a9ed3[_0x5173('0x39')],'resourceId':_0x4a9ed3['id'],'type':_0x332e8d[_0x5173('0x39')],'sectionId':_0x332e8d['id']},{})[_0x5173('0x1e')](function(){return _0x1f3912;});}else{return _0x1f3912;}})[_0x5173('0x26')](function(_0xee71a2){logger[_0x5173('0x24')](_0x5173('0x5a'),_0xee71a2);throw _0xee71a2;});}return _0x1f3912;})[_0x5173('0x1e')](respondWithResult(_0x5c623e,0xc9))['catch'](handleError(_0x5c623e,null));};exports[_0x5173('0x32')]=function(_0x45addb,_0x1b4714){if(_0x45addb[_0x5173('0x55')]['id']){delete _0x45addb[_0x5173('0x55')]['id'];}return db[_0x5173('0x3c')]['find']({'where':{'id':_0x45addb[_0x5173('0x4f')]['id']}})['then'](handleEntityNotFound(_0x1b4714,null))['then'](saveUpdates(_0x45addb[_0x5173('0x55')],null))['then'](respondWithResult(_0x1b4714,null))[_0x5173('0x26')](handleError(_0x1b4714,null));};exports['destroy']=function(_0x40f8e0,_0x4009d9){return db[_0x5173('0x3c')][_0x5173('0x58')]({'where':{'id':_0x40f8e0[_0x5173('0x4f')]['id']}})[_0x5173('0x1e')](handleEntityNotFound(_0x4009d9,null))['then'](removeEntity(_0x4009d9,null))['catch'](handleError(_0x4009d9,null));};exports[_0x5173('0x5b')]=function(_0x1b72e7,_0x12836b){return db['ChatQueue'][_0x5173('0x5b')]()[_0x5173('0x1e')](respondWithResult(_0x12836b,null))[_0x5173('0x26')](handleError(_0x12836b,null));};exports[_0x5173('0x5c')]=function(_0x590083,_0x43dab8,_0x357642){var _0x57cfb0={'raw':!![],'where':{}},_0x563f3b={},_0x40657b;return db['ChatQueue']['findOne']({'where':{'id':_0x590083[_0x5173('0x4f')]['id']}})[_0x5173('0x1e')](handleEntityNotFound(_0x43dab8,null))[_0x5173('0x1e')](function(_0x4ca2d6){if(_0x4ca2d6){_0x40657b=_0x4ca2d6['get']({'plain':!![]});_0x563f3b['model']=_[_0x5173('0x40')](db[_0x5173('0x5d')]['rawAttributes']);_0x563f3b[_0x5173('0x3f')]=_[_0x5173('0x40')](_0x590083[_0x5173('0x3f')]);_0x563f3b[_0x5173('0x48')]=_[_0x5173('0x41')](_0x563f3b[_0x5173('0x43')],_0x563f3b[_0x5173('0x3f')]);_0x57cfb0[_0x5173('0x42')]=_[_0x5173('0x41')](_0x563f3b[_0x5173('0x43')],qs[_0x5173('0x44')](_0x590083[_0x5173('0x3f')][_0x5173('0x44')]));_0x57cfb0['attributes']=_0x57cfb0[_0x5173('0x42')][_0x5173('0x51')]?_0x57cfb0[_0x5173('0x42')]:_0x563f3b['model'];if(!_0x590083[_0x5173('0x3f')][_0x5173('0x5e')](_0x5173('0x5f'))){_0x57cfb0['limit']=qs['limit'](_0x590083[_0x5173('0x3f')][_0x5173('0x2d')]);_0x57cfb0[_0x5173('0x2a')]=qs['offset'](_0x590083[_0x5173('0x3f')]['offset']);}_0x57cfb0['order']=qs[_0x5173('0x46')](_0x590083['query'][_0x5173('0x46')]);_0x57cfb0['where']=qs[_0x5173('0x48')](_[_0x5173('0x60')](_0x590083[_0x5173('0x3f')],_0x563f3b[_0x5173('0x48')]));_0x57cfb0[_0x5173('0x47')][_0x5173('0x61')]=_0x4ca2d6['id'];if(_0x590083[_0x5173('0x3f')][_0x5173('0x49')]){_0x57cfb0[_0x5173('0x47')]=_[_0x5173('0x4a')](_0x57cfb0[_0x5173('0x47')],{'$or':_[_0x5173('0x3b')](_0x57cfb0['attributes'],function(_0x3909ce){var _0x40e04f={};_0x40e04f[_0x3909ce]={'$like':'%'+_0x590083[_0x5173('0x3f')][_0x5173('0x49')]+'%'};return _0x40e04f;})});}_0x57cfb0=_[_0x5173('0x4a')]({},_0x57cfb0,_0x590083[_0x5173('0x53')]);return db['UserChatQueue'][_0x5173('0x4c')](_0x57cfb0);}})[_0x5173('0x1e')](function(_0x4ee635){if(_0x4ee635){return db[_0x5173('0x62')][_0x5173('0x63')]({'where':{'id':_[_0x5173('0x3b')](_0x4ee635,'UserId'),'role':_0x5173('0x64')},'attributes':['id',_0x5173('0x39'),_0x5173('0x65'),_0x5173('0x66'),_0x5173('0x67')]});}})[_0x5173('0x1e')](function(_0x502a8f){if(_0x502a8f){return{'count':_0x502a8f[_0x5173('0x2c')],'rows':_[_0x5173('0x3b')](_0x502a8f[_0x5173('0x4d')],function(_0x413f8b){return{'membername':_0x413f8b[_0x5173('0x39')],'UserId':_0x413f8b['id'],'queue_name':_0x40657b[_0x5173('0x39')],'ChatQueueId':_0x40657b['id'],'interface':util[_0x5173('0x68')]('%s/%s',_0x5173('0x69'),_0x413f8b[_0x5173('0x39')]),'penalty':0x0,'paused':_0x413f8b[_0x5173('0x65')],'createdAt':_0x413f8b[_0x5173('0x67')],'updatedAt':_0x413f8b[_0x5173('0x66')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x5173('0x1e')](respondWithFilteredResult(_0x43dab8,_0x57cfb0))[_0x5173('0x26')](handleError(_0x43dab8,null));};exports[_0x5173('0x6a')]=function(_0xfa4555,_0x473b2c,_0x59eaf1){var _0x454a1f={};var _0x30f1d9={};var _0x4edb61;var _0x204ae9;return db[_0x5173('0x3c')][_0x5173('0x6b')]({'where':{'id':_0xfa4555[_0x5173('0x4f')]['id']}})['then'](handleEntityNotFound(_0x473b2c,null))[_0x5173('0x1e')](function(_0x21a304){if(_0x21a304){_0x4edb61=_0x21a304;_0x30f1d9['model']=_[_0x5173('0x40')](db['Team']['rawAttributes']);_0x30f1d9['query']=_['keys'](_0xfa4555['query']);_0x30f1d9[_0x5173('0x48')]=_[_0x5173('0x41')](_0x30f1d9['model'],_0x30f1d9[_0x5173('0x3f')]);_0x454a1f['attributes']=_['intersection'](_0x30f1d9[_0x5173('0x43')],qs['fields'](_0xfa4555[_0x5173('0x3f')][_0x5173('0x44')]));_0x454a1f[_0x5173('0x42')]=_0x454a1f[_0x5173('0x42')][_0x5173('0x51')]?_0x454a1f[_0x5173('0x42')]:_0x30f1d9[_0x5173('0x43')];_0x454a1f[_0x5173('0x45')]=qs[_0x5173('0x46')](_0xfa4555[_0x5173('0x3f')][_0x5173('0x46')]);_0x454a1f[_0x5173('0x47')]=qs['filters'](_['pick'](_0xfa4555[_0x5173('0x3f')],_0x30f1d9[_0x5173('0x48')]));if(_0xfa4555[_0x5173('0x3f')]['filter']){_0x454a1f[_0x5173('0x47')]=_[_0x5173('0x4a')](_0x454a1f[_0x5173('0x47')],{'$or':_['map'](_0x454a1f[_0x5173('0x42')],function(_0x26929b){var _0x5d052e={};_0x5d052e[_0x26929b]={'$like':'%'+_0xfa4555[_0x5173('0x3f')]['filter']+'%'};return _0x5d052e;})});}_0x454a1f=_[_0x5173('0x4a')]({},_0x454a1f,_0xfa4555[_0x5173('0x53')]);return _0x4edb61[_0x5173('0x6a')](_0x454a1f);}})['then'](function(_0x4c6124){if(_0x4c6124){_0x204ae9=_0x4c6124[_0x5173('0x51')];if(!_0xfa4555[_0x5173('0x3f')][_0x5173('0x5e')](_0x5173('0x5f'))){_0x454a1f[_0x5173('0x2d')]=qs[_0x5173('0x2d')](_0xfa4555[_0x5173('0x3f')][_0x5173('0x2d')]);_0x454a1f['offset']=qs[_0x5173('0x2a')](_0xfa4555[_0x5173('0x3f')][_0x5173('0x2a')]);}return _0x4edb61[_0x5173('0x6a')](_0x454a1f);}})['then'](function(_0x4c9753){if(_0x4c9753){return _0x4c9753?{'count':_0x204ae9,'rows':_0x4c9753}:null;}})[_0x5173('0x1e')](respondWithResult(_0x473b2c,null))[_0x5173('0x26')](handleError(_0x473b2c,null));};exports[_0x5173('0x6c')]=function(_0x317e54,_0x486b64,_0x3a6085){var _0x25c5a8=_0x317e54[_0x5173('0x55')]['ids'];return db[_0x5173('0x6d')][_0x5173('0x4c')]({'where':{'id':_0x25c5a8},'attributes':['id'],'include':[{'model':db[_0x5173('0x62')],'as':_0x5173('0x6e'),'attributes':['id','name',_0x5173('0x6f'),_0x5173('0x70'),_0x5173('0x71')],'raw':!![]}]})[_0x5173('0x1e')](function(_0x558199){if(_0x558199){var _0x4c6281=_[_0x5173('0x72')](_0x558199,function(_0x2521d9){var _0x180e4c=_0x2521d9[_0x5173('0x34')]({'plain':!![]});return _0x180e4c[_0x5173('0x6e')];});return db['ChatQueue'][_0x5173('0x58')]({'where':{'id':_0x317e54['params']['id']}})[_0x5173('0x1e')](function(_0x15bd5f){return db[_0x5173('0x73')]['transaction'](function(_0x2b17f3){return _0x15bd5f[_0x5173('0x6c')](_0x25c5a8,{'transaction':_0x2b17f3})[_0x5173('0x1e')](function(){return BPromise[_0x5173('0x74')](_0x4c6281,function(_0x4ec698){return db[_0x5173('0x5d')]['findOrCreate']({'where':{'UserId':_0x4ec698['id'],'ChatQueueId':_0x317e54[_0x5173('0x4f')]['id']},'transaction':_0x2b17f3});});})['then'](function(){_0x4c6281[_0x5173('0x75')](function(_0x4acaca){socket[_0x5173('0x76')]('userChatQueue:save',{'UserId':_0x4acaca['id'],'ChatQueueId':_0x15bd5f['id']});});});});});}})[_0x5173('0x1e')](respondWithStatusCode(_0x486b64,null))[_0x5173('0x26')](handleError(_0x486b64,null));};exports[_0x5173('0x77')]=function(_0x20dfec,_0x443e61,_0x433753){return db['Team']['findAll']({'where':{'id':_0x20dfec['query']['ids']},'attributes':['id'],'include':[{'model':db[_0x5173('0x62')],'as':_0x5173('0x6e'),'attributes':['id'],'raw':!![]}]})[_0x5173('0x1e')](handleEntityNotFound(_0x443e61,null))[_0x5173('0x1e')](function(_0x2e5cce){var _0x40e328=_['map'](_0x2e5cce,'id');var _0x1ffd52=[];var _0x5afde0=[];var _0x1d099a=squel['select']();_0x1d099a['field'](_0x5173('0x78'))[_0x5173('0x79')]('team_has_chat_queues','tq')[_0x5173('0x7a')](_0x5173('0x7b'),'ut',_0x5173('0x7c'))['where'](_0x5173('0x7d'),_0x20dfec[_0x5173('0x4f')]['id']);for(var _0x16624c=0x0;_0x16624c<_0x2e5cce['length'];_0x16624c+=0x1){let _0x1af23c=_0x2e5cce[_0x16624c];for(var _0x1a2151=0x0;_0x1a2151<_0x1af23c[_0x5173('0x6e')]['length'];_0x1a2151+=0x1){let _0x23e047=_0x1af23c[_0x5173('0x6e')][_0x1a2151];var _0x20489e=_0x1d099a['clone']();_0x20489e[_0x5173('0x47')](_0x5173('0x7e'),_0x23e047['id']);_0x5afde0['push'](db[_0x5173('0x73')][_0x5173('0x3f')](_0x20489e[_0x5173('0x7f')](),{'type':db[_0x5173('0x73')]['QueryTypes'][_0x5173('0x80')]})['then'](function(_0x76b83f){if(_0x76b83f['length']===0x1){return _0x23e047['id'];}else{var _0x55670f=_['every'](_[_0x5173('0x3b')](_0x76b83f,_0x5173('0x81')),function(_0x12d20d){return _[_0x5173('0x82')](_0x40e328,_0x12d20d);});if(_0x55670f){return _0x23e047['id'];}}}));}}return BPromise['all'](_0x5afde0)['then'](function(_0x37d9bf){_0x1ffd52=_(_0x1ffd52)[_0x5173('0x83')](_0x37d9bf)[_0x5173('0x84')]()[_0x5173('0x85')]();return db[_0x5173('0x3c')][_0x5173('0x58')]({'where':{'id':_0x20dfec[_0x5173('0x4f')]['id']}})[_0x5173('0x1e')](function(_0x1b90d9){return db['sequelize']['transaction'](function(_0x10e057){return _0x1b90d9[_0x5173('0x77')](_0x20dfec[_0x5173('0x3f')]['ids'],{'transaction':_0x10e057})[_0x5173('0x1e')](function(){if(!_['isEmpty'](_0x1ffd52)){return _0x1b90d9[_0x5173('0x86')](_0x1ffd52,{'transaction':_0x10e057});}})[_0x5173('0x1e')](function(){_0x1ffd52['forEach'](function(_0x5d09f7){socket[_0x5173('0x76')](_0x5173('0x87'),{'UserId':_0x5d09f7,'ChatQueueId':_0x1b90d9['id']});});});});});});})[_0x5173('0x1e')](respondWithStatusCode(_0x443e61,null))[_0x5173('0x26')](handleError(_0x443e61,null));};exports[_0x5173('0x88')]=function(_0xc9001a,_0x466032,_0x3fa4dc){return db[_0x5173('0x3c')]['find']({'where':{'id':_0xc9001a[_0x5173('0x4f')]['id']}})['then'](handleEntityNotFound(_0x466032,null))[_0x5173('0x1e')](function(_0x27442f){if(_0x27442f){return _0x27442f[_0x5173('0x88')](_0xc9001a[_0x5173('0x55')][_0x5173('0x89')],_[_0x5173('0x8a')](_0xc9001a['body'],['ids','id'])||{})['spread'](function(_0x29d440){for(var _0x832d3=0x0;_0x832d3<_0xc9001a[_0x5173('0x55')][_0x5173('0x89')][_0x5173('0x51')];_0x832d3+=0x1){socket[_0x5173('0x76')](_0x5173('0x8b'),{'UserId':Number(_0xc9001a[_0x5173('0x55')][_0x5173('0x89')][_0x832d3]),'ChatQueueId':Number(_0xc9001a[_0x5173('0x4f')]['id'])});}return _0x29d440;});}})[_0x5173('0x1e')](respondWithResult(_0x466032,null))[_0x5173('0x26')](handleError(_0x466032,null));};exports[_0x5173('0x86')]=function(_0x5b8925,_0x4863fe,_0x3b9d5e){return db[_0x5173('0x3c')]['find']({'where':{'id':_0x5b8925[_0x5173('0x4f')]['id']}})[_0x5173('0x1e')](handleEntityNotFound(_0x4863fe,null))['then'](function(_0x52004f){if(_0x52004f){return _0x52004f[_0x5173('0x86')](_0x5b8925['query'][_0x5173('0x89')])['then'](function(){if(_[_0x5173('0x8c')](_0x5b8925[_0x5173('0x3f')]['ids'])){for(var _0x49b1be=0x0;_0x49b1be<_0x5b8925[_0x5173('0x3f')][_0x5173('0x89')][_0x5173('0x51')];_0x49b1be+=0x1){socket['emit'](_0x5173('0x87'),{'UserId':Number(_0x5b8925['query'][_0x5173('0x89')][_0x49b1be]),'ChatQueueId':Number(_0x5b8925[_0x5173('0x4f')]['id'])});}}else{socket['emit'](_0x5173('0x87'),{'UserId':Number(_0x5b8925[_0x5173('0x3f')][_0x5173('0x89')]),'ChatQueueId':Number(_0x5b8925[_0x5173('0x4f')]['id'])});}});}})[_0x5173('0x1e')](respondWithStatusCode(_0x4863fe,null))['catch'](handleError(_0x4863fe,null));};exports[_0x5173('0x8d')]=function(_0x56d4c3,_0x2c55e2,_0xc2ebd9){var _0x5777e5={};var _0x2b278e={};var _0x561ff5;var _0x54647a;return db[_0x5173('0x3c')][_0x5173('0x6b')]({'where':{'id':_0x56d4c3[_0x5173('0x4f')]['id']}})['then'](handleEntityNotFound(_0x2c55e2,null))[_0x5173('0x1e')](function(_0x4fc46b){if(_0x4fc46b){_0x561ff5=_0x4fc46b;_0x2b278e[_0x5173('0x43')]=_[_0x5173('0x40')](db[_0x5173('0x62')]['rawAttributes']);_0x2b278e[_0x5173('0x3f')]=_['keys'](_0x56d4c3[_0x5173('0x3f')]);_0x2b278e[_0x5173('0x48')]=_[_0x5173('0x41')](_0x2b278e[_0x5173('0x43')],_0x2b278e[_0x5173('0x3f')]);_0x5777e5[_0x5173('0x42')]=_[_0x5173('0x41')](_0x2b278e[_0x5173('0x43')],qs['fields'](_0x56d4c3[_0x5173('0x3f')][_0x5173('0x44')]));_0x5777e5['attributes']=_0x5777e5[_0x5173('0x42')][_0x5173('0x51')]?_0x5777e5[_0x5173('0x42')]:_0x2b278e[_0x5173('0x43')];_0x5777e5[_0x5173('0x45')]=qs['sort'](_0x56d4c3[_0x5173('0x3f')][_0x5173('0x46')]);_0x5777e5[_0x5173('0x47')]=qs[_0x5173('0x48')](_[_0x5173('0x60')](_0x56d4c3[_0x5173('0x3f')],_0x2b278e[_0x5173('0x48')]));if(_0x56d4c3['query'][_0x5173('0x49')]){_0x5777e5[_0x5173('0x47')]=_[_0x5173('0x4a')](_0x5777e5[_0x5173('0x47')],{'$or':_[_0x5173('0x3b')](_0x5777e5[_0x5173('0x42')],function(_0x263d17){var _0xe08be5={};_0xe08be5[_0x263d17]={'$like':'%'+_0x56d4c3[_0x5173('0x3f')][_0x5173('0x49')]+'%'};return _0xe08be5;})});}_0x5777e5=_['merge']({},_0x5777e5,_0x56d4c3[_0x5173('0x53')]);return _0x561ff5[_0x5173('0x8d')](_0x5777e5);}})[_0x5173('0x1e')](function(_0x54e2cc){if(_0x54e2cc){_0x54647a=_0x54e2cc[_0x5173('0x51')];if(!_0x56d4c3[_0x5173('0x3f')]['hasOwnProperty'](_0x5173('0x5f'))){_0x5777e5[_0x5173('0x2d')]=qs[_0x5173('0x2d')](_0x56d4c3['query']['limit']);_0x5777e5[_0x5173('0x2a')]=qs[_0x5173('0x2a')](_0x56d4c3[_0x5173('0x3f')][_0x5173('0x2a')]);}return _0x561ff5['getAgents'](_0x5777e5);}})['then'](function(_0x5c01e3){if(_0x5c01e3){return _0x5c01e3?{'count':_0x54647a,'rows':_0x5c01e3}:null;}})[_0x5173('0x1e')](respondWithResult(_0x2c55e2,null))[_0x5173('0x26')](handleError(_0x2c55e2,null));};
\ No newline at end of file
+var _0xca59=['removeAgents','emit','userChatQueue:remove','addAgents','omit','spread','isArray','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./chatQueue.socket','http','then','info','ChatQueue,\x20%s,\x20%s','debug','ChatQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','destroy','get','ChatQueues','UserProfileResource','name','index','map','ChatQueue','rawAttributes','fieldName','type','key','query','keys','filters','attributes','intersection','fields','length','model','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','show','params','include','find','create','role','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','UserChatQueue','ChatQueueId','User','UserId','updatedAt','createdAt','format','SIP','chatPause','getTeams','addTeams','ids','Team','Agents','online','voicePause','interface','flatMap','sequelize','transaction','findOrCreate','forEach','removeTeams','select','field','tq.TeamId','from','team_has_chat_queues','user_has_teams','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value'];(function(_0x7cc7c3,_0x5d2075){var _0x40d43d=function(_0x5965da){while(--_0x5965da){_0x7cc7c3['push'](_0x7cc7c3['shift']());}};_0x40d43d(++_0x5d2075);}(_0xca59,0x1cd));var _0x9ca5=function(_0x46c6f9,_0x39d9c4){_0x46c6f9=_0x46c6f9-0x0;var _0x4f9bd2=_0xca59[_0x46c6f9];return _0x4f9bd2;};'use strict';var emlformat=require(_0x9ca5('0x0'));var rimraf=require(_0x9ca5('0x1'));var zipdir=require(_0x9ca5('0x2'));var jsonpatch=require(_0x9ca5('0x3'));var rp=require(_0x9ca5('0x4'));var moment=require(_0x9ca5('0x5'));var BPromise=require(_0x9ca5('0x6'));var Mustache=require(_0x9ca5('0x7'));var util=require(_0x9ca5('0x8'));var path=require(_0x9ca5('0x9'));var sox=require(_0x9ca5('0xa'));var csv=require(_0x9ca5('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9ca5('0xc'));var _=require('lodash');var squel=require(_0x9ca5('0xd'));var crypto=require(_0x9ca5('0xe'));var jsforce=require(_0x9ca5('0xf'));var deskjs=require(_0x9ca5('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x9ca5('0x11'));var Redis=require(_0x9ca5('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9ca5('0x13'));var logger=require(_0x9ca5('0x14'))(_0x9ca5('0x15'));var utils=require(_0x9ca5('0x16'));var config=require(_0x9ca5('0x17'));var licenseUtil=require(_0x9ca5('0x18'));var db=require(_0x9ca5('0x19'))['db'];config[_0x9ca5('0x1a')]=_['defaults'](config[_0x9ca5('0x1a')],{'host':_0x9ca5('0x1b'),'port':0x18eb});var socket=require(_0x9ca5('0x1c'))(new Redis(config[_0x9ca5('0x1a')]));require(_0x9ca5('0x1d'))['register'](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0x9ca5('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0xc6d6e7,_0x5d2019,_0x25e4e7,_0x10452f){return new BPromise(function(_0x469742,_0x54c610){var _0x54076a=_0x10452f||client;return _0x54076a['request'](_0xc6d6e7,_0x25e4e7)[_0x9ca5('0x1f')](function(_0x110cac){logger[_0x9ca5('0x20')](_0x9ca5('0x21'),_0x5d2019,'request\x20sent');logger[_0x9ca5('0x22')](_0x9ca5('0x23'),_0x5d2019,_0x9ca5('0x24'),JSON[_0x9ca5('0x25')](_0x110cac));if(_0x110cac[_0x9ca5('0x26')]){if(_0x110cac[_0x9ca5('0x26')][_0x9ca5('0x27')]===0x1f4){logger[_0x9ca5('0x26')](_0x9ca5('0x21'),_0x5d2019,_0x110cac[_0x9ca5('0x26')][_0x9ca5('0x28')]);return _0x54c610(_0x110cac['error'][_0x9ca5('0x28')]);}logger[_0x9ca5('0x26')](_0x9ca5('0x21'),_0x5d2019,_0x110cac['error'][_0x9ca5('0x28')]);return _0x469742(_0x110cac[_0x9ca5('0x26')][_0x9ca5('0x28')]);}else{logger[_0x9ca5('0x20')](_0x9ca5('0x21'),_0x5d2019,_0x9ca5('0x24'));_0x469742(_0x110cac[_0x9ca5('0x29')][_0x9ca5('0x28')]);}})[_0x9ca5('0x2a')](function(_0x4e5501){logger['error']('ChatQueue,\x20%s,\x20%s',_0x5d2019,_0x4e5501);_0x54c610(_0x4e5501);});});}function respondWithStatusCode(_0x3be1e0,_0x56ef16){_0x56ef16=_0x56ef16||0xcc;return function(_0x582427){if(_0x582427){return _0x3be1e0[_0x9ca5('0x2b')](_0x56ef16);}return _0x3be1e0[_0x9ca5('0x2c')](_0x56ef16)['end']();};}function respondWithResult(_0x575a5a,_0x33e6fa){_0x33e6fa=_0x33e6fa||0xc8;return function(_0x5e45ae){if(_0x5e45ae){return _0x575a5a[_0x9ca5('0x2c')](_0x33e6fa)[_0x9ca5('0x2d')](_0x5e45ae);}};}function respondWithFilteredResult(_0x20e1d9,_0x4fb728){return function(_0xbe6384){if(_0xbe6384){var _0x2ee84b=typeof _0x4fb728[_0x9ca5('0x2e')]===_0x9ca5('0x2f')&&typeof _0x4fb728[_0x9ca5('0x30')]===_0x9ca5('0x2f');var _0xae526c=_0xbe6384[_0x9ca5('0x31')];var _0x12bd5c=_0x2ee84b?0x0:_0x4fb728[_0x9ca5('0x2e')];var _0x2930de=_0x2ee84b?_0xbe6384[_0x9ca5('0x31')]:_0x4fb728['offset']+_0x4fb728[_0x9ca5('0x30')];var _0x16e07e;if(_0x2930de>=_0xae526c){_0x2930de=_0xae526c;_0x16e07e=0xc8;}else{_0x16e07e=0xce;}_0x20e1d9[_0x9ca5('0x2c')](_0x16e07e);return _0x20e1d9[_0x9ca5('0x32')](_0x9ca5('0x33'),_0x12bd5c+'-'+_0x2930de+'/'+_0xae526c)[_0x9ca5('0x2d')](_0xbe6384);}return null;};}function patchUpdates(_0x50a43e){return function(_0x575d4b){try{jsonpatch[_0x9ca5('0x34')](_0x575d4b,_0x50a43e,!![]);}catch(_0x13cf8b){return BPromise['reject'](_0x13cf8b);}return _0x575d4b[_0x9ca5('0x35')]();};}function saveUpdates(_0x4e9f6c,_0xb48913){return function(_0x14e68f){if(_0x14e68f){return _0x14e68f[_0x9ca5('0x36')](_0x4e9f6c)[_0x9ca5('0x1f')](function(_0x4b285d){return _0x4b285d;});}return null;};}function removeEntity(_0x119262,_0x281053){return function(_0x216c28){if(_0x216c28){return _0x216c28[_0x9ca5('0x37')]()[_0x9ca5('0x1f')](function(){var _0x2ea5ed=_0x216c28[_0x9ca5('0x38')]({'plain':!![]});var _0x532057=_0x9ca5('0x39');return db[_0x9ca5('0x3a')]['destroy']({'where':{'type':_0x532057,'resourceId':_0x2ea5ed['id']}})[_0x9ca5('0x1f')](function(){return _0x216c28;});})[_0x9ca5('0x1f')](function(){_0x119262[_0x9ca5('0x2c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x243b81,_0x497acb){return function(_0x41d0ee){if(!_0x41d0ee){_0x243b81[_0x9ca5('0x2b')](0x194);}return _0x41d0ee;};}function handleError(_0x26ad6f,_0xde62e3){_0xde62e3=_0xde62e3||0x1f4;return function(_0x2174a3){logger[_0x9ca5('0x26')](_0x2174a3['stack']);if(_0x2174a3['name']){delete _0x2174a3[_0x9ca5('0x3b')];}_0x26ad6f[_0x9ca5('0x2c')](_0xde62e3)['send'](_0x2174a3);};}exports[_0x9ca5('0x3c')]=function(_0x25ae80,_0x46b317){var _0x3ef2f2={},_0x1494d9={},_0x121462={'count':0x0,'rows':[]};var _0x262012=_[_0x9ca5('0x3d')](db[_0x9ca5('0x3e')][_0x9ca5('0x3f')],function(_0x29b519){return{'name':_0x29b519[_0x9ca5('0x40')],'type':_0x29b519[_0x9ca5('0x41')][_0x9ca5('0x42')]};});_0x1494d9['model']=_[_0x9ca5('0x3d')](_0x262012,_0x9ca5('0x3b'));_0x1494d9[_0x9ca5('0x43')]=_[_0x9ca5('0x44')](_0x25ae80['query']);_0x1494d9[_0x9ca5('0x45')]=_['intersection'](_0x1494d9['model'],_0x1494d9[_0x9ca5('0x43')]);_0x3ef2f2[_0x9ca5('0x46')]=_[_0x9ca5('0x47')](_0x1494d9['model'],qs[_0x9ca5('0x48')](_0x25ae80['query'][_0x9ca5('0x48')]));_0x3ef2f2[_0x9ca5('0x46')]=_0x3ef2f2[_0x9ca5('0x46')][_0x9ca5('0x49')]?_0x3ef2f2[_0x9ca5('0x46')]:_0x1494d9[_0x9ca5('0x4a')];if(!_0x25ae80[_0x9ca5('0x43')][_0x9ca5('0x4b')](_0x9ca5('0x4c'))){_0x3ef2f2[_0x9ca5('0x30')]=qs['limit'](_0x25ae80['query'][_0x9ca5('0x30')]);_0x3ef2f2[_0x9ca5('0x2e')]=qs[_0x9ca5('0x2e')](_0x25ae80[_0x9ca5('0x43')][_0x9ca5('0x2e')]);}_0x3ef2f2[_0x9ca5('0x4d')]=qs[_0x9ca5('0x4e')](_0x25ae80[_0x9ca5('0x43')][_0x9ca5('0x4e')]);_0x3ef2f2[_0x9ca5('0x4f')]=qs[_0x9ca5('0x45')](_[_0x9ca5('0x50')](_0x25ae80[_0x9ca5('0x43')],_0x1494d9[_0x9ca5('0x45')]),_0x262012);if(_0x25ae80[_0x9ca5('0x43')][_0x9ca5('0x51')]){_0x3ef2f2[_0x9ca5('0x4f')]=_[_0x9ca5('0x52')](_0x3ef2f2[_0x9ca5('0x4f')],{'$or':_['map'](_0x262012,function(_0x1277bc){if(_0x1277bc[_0x9ca5('0x41')]!==_0x9ca5('0x53')){var _0x183ed1={};_0x183ed1[_0x1277bc[_0x9ca5('0x3b')]]={'$like':'%'+_0x25ae80[_0x9ca5('0x43')][_0x9ca5('0x51')]+'%'};return _0x183ed1;}})});}_0x3ef2f2=_[_0x9ca5('0x52')]({},_0x3ef2f2,_0x25ae80[_0x9ca5('0x54')]);var _0x534d17={'where':_0x3ef2f2[_0x9ca5('0x4f')]};return db[_0x9ca5('0x3e')][_0x9ca5('0x31')](_0x534d17)[_0x9ca5('0x1f')](function(_0x426060){_0x121462[_0x9ca5('0x31')]=_0x426060;if(_0x25ae80[_0x9ca5('0x43')][_0x9ca5('0x55')]){_0x3ef2f2['include']=[{'all':!![]}];}return db[_0x9ca5('0x3e')][_0x9ca5('0x56')](_0x3ef2f2);})[_0x9ca5('0x1f')](function(_0x55daca){_0x121462[_0x9ca5('0x57')]=_0x55daca;return _0x121462;})[_0x9ca5('0x1f')](respondWithFilteredResult(_0x46b317,_0x3ef2f2))[_0x9ca5('0x2a')](handleError(_0x46b317,null));};exports[_0x9ca5('0x58')]=function(_0x52d927,_0xad049e){var _0x3d93f0={'raw':!![],'where':{'id':_0x52d927[_0x9ca5('0x59')]['id']}},_0x587a90={};_0x587a90[_0x9ca5('0x4a')]=_[_0x9ca5('0x44')](db[_0x9ca5('0x3e')][_0x9ca5('0x3f')]);_0x587a90[_0x9ca5('0x43')]=_[_0x9ca5('0x44')](_0x52d927['query']);_0x587a90['filters']=_['intersection'](_0x587a90['model'],_0x587a90['query']);_0x3d93f0[_0x9ca5('0x46')]=_[_0x9ca5('0x47')](_0x587a90[_0x9ca5('0x4a')],qs['fields'](_0x52d927['query'][_0x9ca5('0x48')]));_0x3d93f0[_0x9ca5('0x46')]=_0x3d93f0[_0x9ca5('0x46')][_0x9ca5('0x49')]?_0x3d93f0[_0x9ca5('0x46')]:_0x587a90[_0x9ca5('0x4a')];if(_0x52d927[_0x9ca5('0x43')][_0x9ca5('0x55')]){_0x3d93f0[_0x9ca5('0x5a')]=[{'all':!![]}];}_0x3d93f0=_['merge']({},_0x3d93f0,_0x52d927[_0x9ca5('0x54')]);return db[_0x9ca5('0x3e')][_0x9ca5('0x5b')](_0x3d93f0)[_0x9ca5('0x1f')](handleEntityNotFound(_0xad049e,null))[_0x9ca5('0x1f')](respondWithResult(_0xad049e,null))['catch'](handleError(_0xad049e,null));};exports['create']=function(_0x165e51,_0x337a16){return db['ChatQueue'][_0x9ca5('0x5c')](_0x165e51['body'],{})[_0x9ca5('0x1f')](function(_0xb1612e){var _0x42246b=_0x165e51['user'][_0x9ca5('0x38')]({'plain':!![]});if(!_0x42246b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x42246b[_0x9ca5('0x5d')]===_0x9ca5('0x5e')){var _0x7f0ae0=_0xb1612e[_0x9ca5('0x38')]({'plain':!![]});var _0x2e080f=_0x9ca5('0x39');return db[_0x9ca5('0x5f')][_0x9ca5('0x5b')]({'where':{'name':_0x2e080f,'userProfileId':_0x42246b['userProfileId']},'raw':!![]})['then'](function(_0x3b5500){if(_0x3b5500&&_0x3b5500[_0x9ca5('0x60')]===0x0){return db[_0x9ca5('0x3a')][_0x9ca5('0x5c')]({'name':_0x7f0ae0[_0x9ca5('0x3b')],'resourceId':_0x7f0ae0['id'],'type':_0x3b5500[_0x9ca5('0x3b')],'sectionId':_0x3b5500['id']},{})[_0x9ca5('0x1f')](function(){return _0xb1612e;});}else{return _0xb1612e;}})[_0x9ca5('0x2a')](function(_0x252561){logger[_0x9ca5('0x26')](_0x9ca5('0x61'),_0x252561);throw _0x252561;});}return _0xb1612e;})[_0x9ca5('0x1f')](respondWithResult(_0x337a16,0xc9))[_0x9ca5('0x2a')](handleError(_0x337a16,null));};exports[_0x9ca5('0x36')]=function(_0x11470f,_0x57b603){if(_0x11470f[_0x9ca5('0x62')]['id']){delete _0x11470f['body']['id'];}return db[_0x9ca5('0x3e')][_0x9ca5('0x5b')]({'where':{'id':_0x11470f[_0x9ca5('0x59')]['id']}})['then'](handleEntityNotFound(_0x57b603,null))[_0x9ca5('0x1f')](saveUpdates(_0x11470f[_0x9ca5('0x62')],null))[_0x9ca5('0x1f')](respondWithResult(_0x57b603,null))['catch'](handleError(_0x57b603,null));};exports[_0x9ca5('0x37')]=function(_0x44c885,_0x9f0639){return db[_0x9ca5('0x3e')]['find']({'where':{'id':_0x44c885[_0x9ca5('0x59')]['id']}})[_0x9ca5('0x1f')](handleEntityNotFound(_0x9f0639,null))[_0x9ca5('0x1f')](removeEntity(_0x9f0639,null))[_0x9ca5('0x2a')](handleError(_0x9f0639,null));};exports[_0x9ca5('0x63')]=function(_0x250847,_0x3e15e4){return db[_0x9ca5('0x3e')]['describe']()[_0x9ca5('0x1f')](respondWithResult(_0x3e15e4,null))['catch'](handleError(_0x3e15e4,null));};exports[_0x9ca5('0x64')]=function(_0x20e569,_0x156527,_0x367f21){var _0x2bb168={'raw':!![],'where':{}},_0x452a78={},_0x241f68;return db['ChatQueue'][_0x9ca5('0x65')]({'where':{'id':_0x20e569[_0x9ca5('0x59')]['id']}})[_0x9ca5('0x1f')](handleEntityNotFound(_0x156527,null))['then'](function(_0x4bfaf7){if(_0x4bfaf7){_0x241f68=_0x4bfaf7['get']({'plain':!![]});_0x452a78[_0x9ca5('0x4a')]=_[_0x9ca5('0x44')](db[_0x9ca5('0x66')][_0x9ca5('0x3f')]);_0x452a78['query']=_[_0x9ca5('0x44')](_0x20e569['query']);_0x452a78[_0x9ca5('0x45')]=_[_0x9ca5('0x47')](_0x452a78[_0x9ca5('0x4a')],_0x452a78[_0x9ca5('0x43')]);_0x2bb168[_0x9ca5('0x46')]=_[_0x9ca5('0x47')](_0x452a78[_0x9ca5('0x4a')],qs['fields'](_0x20e569[_0x9ca5('0x43')][_0x9ca5('0x48')]));_0x2bb168['attributes']=_0x2bb168[_0x9ca5('0x46')][_0x9ca5('0x49')]?_0x2bb168[_0x9ca5('0x46')]:_0x452a78[_0x9ca5('0x4a')];if(!_0x20e569[_0x9ca5('0x43')]['hasOwnProperty'](_0x9ca5('0x4c'))){_0x2bb168[_0x9ca5('0x30')]=qs['limit'](_0x20e569[_0x9ca5('0x43')]['limit']);_0x2bb168['offset']=qs[_0x9ca5('0x2e')](_0x20e569[_0x9ca5('0x43')][_0x9ca5('0x2e')]);}_0x2bb168[_0x9ca5('0x4d')]=qs[_0x9ca5('0x4e')](_0x20e569[_0x9ca5('0x43')][_0x9ca5('0x4e')]);_0x2bb168[_0x9ca5('0x4f')]=qs[_0x9ca5('0x45')](_['pick'](_0x20e569['query'],_0x452a78[_0x9ca5('0x45')]));_0x2bb168['where'][_0x9ca5('0x67')]=_0x4bfaf7['id'];if(_0x20e569[_0x9ca5('0x43')]['filter']){_0x2bb168[_0x9ca5('0x4f')]=_[_0x9ca5('0x52')](_0x2bb168['where'],{'$or':_[_0x9ca5('0x3d')](_0x2bb168[_0x9ca5('0x46')],function(_0xd62db8){var _0x4f9e1a={};_0x4f9e1a[_0xd62db8]={'$like':'%'+_0x20e569[_0x9ca5('0x43')][_0x9ca5('0x51')]+'%'};return _0x4f9e1a;})});}_0x2bb168=_['merge']({},_0x2bb168,_0x20e569[_0x9ca5('0x54')]);return db[_0x9ca5('0x66')][_0x9ca5('0x56')](_0x2bb168);}})[_0x9ca5('0x1f')](function(_0x58c343){if(_0x58c343){return db[_0x9ca5('0x68')]['findAndCountAll']({'where':{'id':_[_0x9ca5('0x3d')](_0x58c343,_0x9ca5('0x69')),'role':'agent'},'attributes':['id',_0x9ca5('0x3b'),'chatPause',_0x9ca5('0x6a'),_0x9ca5('0x6b')]});}})['then'](function(_0x112601){if(_0x112601){return{'count':_0x112601[_0x9ca5('0x31')],'rows':_[_0x9ca5('0x3d')](_0x112601['rows'],function(_0x12c154){return{'membername':_0x12c154[_0x9ca5('0x3b')],'UserId':_0x12c154['id'],'queue_name':_0x241f68[_0x9ca5('0x3b')],'ChatQueueId':_0x241f68['id'],'interface':util[_0x9ca5('0x6c')]('%s/%s',_0x9ca5('0x6d'),_0x12c154[_0x9ca5('0x3b')]),'penalty':0x0,'paused':_0x12c154[_0x9ca5('0x6e')],'createdAt':_0x12c154[_0x9ca5('0x6b')],'updatedAt':_0x12c154['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x9ca5('0x1f')](respondWithFilteredResult(_0x156527,_0x2bb168))['catch'](handleError(_0x156527,null));};exports[_0x9ca5('0x6f')]=function(_0x1d9640,_0x21ded8,_0x1f8d89){var _0x20bda1={};var _0x5ccf3d={};var _0x4c4bf7;var _0x2257cf;return db[_0x9ca5('0x3e')][_0x9ca5('0x65')]({'where':{'id':_0x1d9640[_0x9ca5('0x59')]['id']}})['then'](handleEntityNotFound(_0x21ded8,null))[_0x9ca5('0x1f')](function(_0x7a08fd){if(_0x7a08fd){_0x4c4bf7=_0x7a08fd;_0x5ccf3d[_0x9ca5('0x4a')]=_[_0x9ca5('0x44')](db['Team']['rawAttributes']);_0x5ccf3d['query']=_[_0x9ca5('0x44')](_0x1d9640['query']);_0x5ccf3d[_0x9ca5('0x45')]=_[_0x9ca5('0x47')](_0x5ccf3d['model'],_0x5ccf3d[_0x9ca5('0x43')]);_0x20bda1[_0x9ca5('0x46')]=_[_0x9ca5('0x47')](_0x5ccf3d[_0x9ca5('0x4a')],qs[_0x9ca5('0x48')](_0x1d9640[_0x9ca5('0x43')]['fields']));_0x20bda1[_0x9ca5('0x46')]=_0x20bda1[_0x9ca5('0x46')][_0x9ca5('0x49')]?_0x20bda1[_0x9ca5('0x46')]:_0x5ccf3d[_0x9ca5('0x4a')];_0x20bda1['order']=qs[_0x9ca5('0x4e')](_0x1d9640[_0x9ca5('0x43')][_0x9ca5('0x4e')]);_0x20bda1['where']=qs[_0x9ca5('0x45')](_[_0x9ca5('0x50')](_0x1d9640[_0x9ca5('0x43')],_0x5ccf3d['filters']));if(_0x1d9640[_0x9ca5('0x43')][_0x9ca5('0x51')]){_0x20bda1[_0x9ca5('0x4f')]=_[_0x9ca5('0x52')](_0x20bda1['where'],{'$or':_[_0x9ca5('0x3d')](_0x20bda1[_0x9ca5('0x46')],function(_0x536df9){var _0x32d898={};_0x32d898[_0x536df9]={'$like':'%'+_0x1d9640['query'][_0x9ca5('0x51')]+'%'};return _0x32d898;})});}_0x20bda1=_['merge']({},_0x20bda1,_0x1d9640['options']);return _0x4c4bf7[_0x9ca5('0x6f')](_0x20bda1);}})[_0x9ca5('0x1f')](function(_0x5d53eb){if(_0x5d53eb){_0x2257cf=_0x5d53eb[_0x9ca5('0x49')];if(!_0x1d9640[_0x9ca5('0x43')]['hasOwnProperty'](_0x9ca5('0x4c'))){_0x20bda1[_0x9ca5('0x30')]=qs[_0x9ca5('0x30')](_0x1d9640[_0x9ca5('0x43')][_0x9ca5('0x30')]);_0x20bda1[_0x9ca5('0x2e')]=qs[_0x9ca5('0x2e')](_0x1d9640[_0x9ca5('0x43')][_0x9ca5('0x2e')]);}return _0x4c4bf7[_0x9ca5('0x6f')](_0x20bda1);}})[_0x9ca5('0x1f')](function(_0x13b6d3){if(_0x13b6d3){return _0x13b6d3?{'count':_0x2257cf,'rows':_0x13b6d3}:null;}})['then'](respondWithResult(_0x21ded8,null))[_0x9ca5('0x2a')](handleError(_0x21ded8,null));};exports[_0x9ca5('0x70')]=function(_0x2b558b,_0x5e1441,_0x10bacd){var _0x34e82d=_0x2b558b[_0x9ca5('0x62')][_0x9ca5('0x71')];return db[_0x9ca5('0x72')][_0x9ca5('0x56')]({'where':{'id':_0x34e82d},'attributes':['id'],'include':[{'model':db[_0x9ca5('0x68')],'as':_0x9ca5('0x73'),'attributes':['id','name',_0x9ca5('0x74'),_0x9ca5('0x75'),_0x9ca5('0x76')],'raw':!![]}]})[_0x9ca5('0x1f')](function(_0x4f3306){if(_0x4f3306){var _0x3b1a68=_[_0x9ca5('0x77')](_0x4f3306,function(_0x17c22c){var _0x28a0a8=_0x17c22c[_0x9ca5('0x38')]({'plain':!![]});return _0x28a0a8[_0x9ca5('0x73')];});return db[_0x9ca5('0x3e')]['find']({'where':{'id':_0x2b558b[_0x9ca5('0x59')]['id']}})[_0x9ca5('0x1f')](function(_0x3c4c70){return db[_0x9ca5('0x78')][_0x9ca5('0x79')](function(_0x5e08b5){return _0x3c4c70[_0x9ca5('0x70')](_0x34e82d,{'transaction':_0x5e08b5})[_0x9ca5('0x1f')](function(){return BPromise['each'](_0x3b1a68,function(_0x174b31){return db[_0x9ca5('0x66')][_0x9ca5('0x7a')]({'where':{'UserId':_0x174b31['id'],'ChatQueueId':_0x2b558b[_0x9ca5('0x59')]['id']},'transaction':_0x5e08b5});});})['then'](function(){_0x3b1a68[_0x9ca5('0x7b')](function(_0x5e26c1){socket['emit']('userChatQueue:save',{'UserId':_0x5e26c1['id'],'ChatQueueId':_0x3c4c70['id']});});});});});}})[_0x9ca5('0x1f')](respondWithStatusCode(_0x5e1441,null))[_0x9ca5('0x2a')](handleError(_0x5e1441,null));};exports[_0x9ca5('0x7c')]=function(_0x2cf3df,_0x158b14,_0x2c94b1){return db[_0x9ca5('0x72')][_0x9ca5('0x56')]({'where':{'id':_0x2cf3df[_0x9ca5('0x43')][_0x9ca5('0x71')]},'attributes':['id'],'include':[{'model':db[_0x9ca5('0x68')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x9ca5('0x1f')](handleEntityNotFound(_0x158b14,null))[_0x9ca5('0x1f')](function(_0x214b8a){var _0x357008=_['map'](_0x214b8a,'id');var _0x46fffa=[];var _0x57705b=[];var _0x2f89d2=squel[_0x9ca5('0x7d')]();_0x2f89d2[_0x9ca5('0x7e')](_0x9ca5('0x7f'))[_0x9ca5('0x80')](_0x9ca5('0x81'),'tq')['join'](_0x9ca5('0x82'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x9ca5('0x4f')]('ChatQueueId\x20=\x20?',_0x2cf3df['params']['id']);for(var _0x31e1f3=0x0;_0x31e1f3<_0x214b8a['length'];_0x31e1f3+=0x1){let _0x4522a3=_0x214b8a[_0x31e1f3];for(var _0x36cdd4=0x0;_0x36cdd4<_0x4522a3[_0x9ca5('0x73')][_0x9ca5('0x49')];_0x36cdd4+=0x1){let _0x24e8d1=_0x4522a3[_0x9ca5('0x73')][_0x36cdd4];var _0x4e9ccb=_0x2f89d2[_0x9ca5('0x83')]();_0x4e9ccb[_0x9ca5('0x4f')](_0x9ca5('0x84'),_0x24e8d1['id']);_0x57705b[_0x9ca5('0x85')](db[_0x9ca5('0x78')][_0x9ca5('0x43')](_0x4e9ccb[_0x9ca5('0x86')](),{'type':db[_0x9ca5('0x78')][_0x9ca5('0x87')][_0x9ca5('0x88')]})[_0x9ca5('0x1f')](function(_0xcc0dff){if(_0xcc0dff['length']===0x1){return _0x24e8d1['id'];}else{var _0x5ccde6=_[_0x9ca5('0x89')](_[_0x9ca5('0x3d')](_0xcc0dff,_0x9ca5('0x8a')),function(_0x5e3647){return _['includes'](_0x357008,_0x5e3647);});if(_0x5ccde6){return _0x24e8d1['id'];}}}));}}return BPromise[_0x9ca5('0x8b')](_0x57705b)[_0x9ca5('0x1f')](function(_0x4649ea){_0x46fffa=_(_0x46fffa)[_0x9ca5('0x8c')](_0x4649ea)[_0x9ca5('0x8d')]()[_0x9ca5('0x8e')]();return db['ChatQueue'][_0x9ca5('0x5b')]({'where':{'id':_0x2cf3df['params']['id']}})[_0x9ca5('0x1f')](function(_0x128a5d){return db[_0x9ca5('0x78')]['transaction'](function(_0x17ddf1){return _0x128a5d[_0x9ca5('0x7c')](_0x2cf3df[_0x9ca5('0x43')][_0x9ca5('0x71')],{'transaction':_0x17ddf1})[_0x9ca5('0x1f')](function(){if(!_['isEmpty'](_0x46fffa)){return _0x128a5d[_0x9ca5('0x8f')](_0x46fffa,{'transaction':_0x17ddf1});}})['then'](function(){_0x46fffa[_0x9ca5('0x7b')](function(_0x37eb83){socket[_0x9ca5('0x90')](_0x9ca5('0x91'),{'UserId':_0x37eb83,'ChatQueueId':_0x128a5d['id']});});});});});});})[_0x9ca5('0x1f')](respondWithStatusCode(_0x158b14,null))[_0x9ca5('0x2a')](handleError(_0x158b14,null));};exports['addAgents']=function(_0x39f27c,_0x19d076,_0x4f4c32){return db[_0x9ca5('0x3e')][_0x9ca5('0x5b')]({'where':{'id':_0x39f27c[_0x9ca5('0x59')]['id']}})[_0x9ca5('0x1f')](handleEntityNotFound(_0x19d076,null))[_0x9ca5('0x1f')](function(_0x3507fc){if(_0x3507fc){return _0x3507fc[_0x9ca5('0x92')](_0x39f27c[_0x9ca5('0x62')][_0x9ca5('0x71')],_[_0x9ca5('0x93')](_0x39f27c[_0x9ca5('0x62')],[_0x9ca5('0x71'),'id'])||{})[_0x9ca5('0x94')](function(_0x31f368){for(var _0x2be27c=0x0;_0x2be27c<_0x39f27c['body'][_0x9ca5('0x71')][_0x9ca5('0x49')];_0x2be27c+=0x1){socket[_0x9ca5('0x90')]('userChatQueue:save',{'UserId':Number(_0x39f27c['body'][_0x9ca5('0x71')][_0x2be27c]),'ChatQueueId':Number(_0x39f27c[_0x9ca5('0x59')]['id'])});}return _0x31f368;});}})[_0x9ca5('0x1f')](respondWithResult(_0x19d076,null))[_0x9ca5('0x2a')](handleError(_0x19d076,null));};exports[_0x9ca5('0x8f')]=function(_0x5cefc1,_0x18cee8,_0x1a1485){return db[_0x9ca5('0x3e')][_0x9ca5('0x5b')]({'where':{'id':_0x5cefc1[_0x9ca5('0x59')]['id']}})[_0x9ca5('0x1f')](handleEntityNotFound(_0x18cee8,null))[_0x9ca5('0x1f')](function(_0x59b0f8){if(_0x59b0f8){return _0x59b0f8[_0x9ca5('0x8f')](_0x5cefc1[_0x9ca5('0x43')]['ids'])[_0x9ca5('0x1f')](function(){if(_[_0x9ca5('0x95')](_0x5cefc1[_0x9ca5('0x43')][_0x9ca5('0x71')])){for(var _0x4509f3=0x0;_0x4509f3<_0x5cefc1[_0x9ca5('0x43')][_0x9ca5('0x71')][_0x9ca5('0x49')];_0x4509f3+=0x1){socket[_0x9ca5('0x90')](_0x9ca5('0x91'),{'UserId':Number(_0x5cefc1['query']['ids'][_0x4509f3]),'ChatQueueId':Number(_0x5cefc1[_0x9ca5('0x59')]['id'])});}}else{socket['emit'](_0x9ca5('0x91'),{'UserId':Number(_0x5cefc1[_0x9ca5('0x43')][_0x9ca5('0x71')]),'ChatQueueId':Number(_0x5cefc1[_0x9ca5('0x59')]['id'])});}});}})[_0x9ca5('0x1f')](respondWithStatusCode(_0x18cee8,null))[_0x9ca5('0x2a')](handleError(_0x18cee8,null));};exports['getAgents']=function(_0x340cdc,_0x315ba1,_0x430123){var _0x5ba063={};var _0x2bdcf7={};var _0xed0861;var _0x582594;return db[_0x9ca5('0x3e')][_0x9ca5('0x65')]({'where':{'id':_0x340cdc[_0x9ca5('0x59')]['id']}})['then'](handleEntityNotFound(_0x315ba1,null))[_0x9ca5('0x1f')](function(_0x995578){if(_0x995578){_0xed0861=_0x995578;_0x2bdcf7['model']=_[_0x9ca5('0x44')](db['User'][_0x9ca5('0x3f')]);_0x2bdcf7[_0x9ca5('0x43')]=_['keys'](_0x340cdc[_0x9ca5('0x43')]);_0x2bdcf7[_0x9ca5('0x45')]=_[_0x9ca5('0x47')](_0x2bdcf7[_0x9ca5('0x4a')],_0x2bdcf7[_0x9ca5('0x43')]);_0x5ba063[_0x9ca5('0x46')]=_[_0x9ca5('0x47')](_0x2bdcf7[_0x9ca5('0x4a')],qs[_0x9ca5('0x48')](_0x340cdc['query']['fields']));_0x5ba063[_0x9ca5('0x46')]=_0x5ba063[_0x9ca5('0x46')][_0x9ca5('0x49')]?_0x5ba063['attributes']:_0x2bdcf7[_0x9ca5('0x4a')];_0x5ba063[_0x9ca5('0x4d')]=qs['sort'](_0x340cdc[_0x9ca5('0x43')]['sort']);_0x5ba063[_0x9ca5('0x4f')]=qs[_0x9ca5('0x45')](_[_0x9ca5('0x50')](_0x340cdc[_0x9ca5('0x43')],_0x2bdcf7[_0x9ca5('0x45')]));if(_0x340cdc[_0x9ca5('0x43')][_0x9ca5('0x51')]){_0x5ba063[_0x9ca5('0x4f')]=_[_0x9ca5('0x52')](_0x5ba063[_0x9ca5('0x4f')],{'$or':_[_0x9ca5('0x3d')](_0x5ba063[_0x9ca5('0x46')],function(_0x4d04b6){var _0x19ebad={};_0x19ebad[_0x4d04b6]={'$like':'%'+_0x340cdc['query']['filter']+'%'};return _0x19ebad;})});}_0x5ba063=_[_0x9ca5('0x52')]({},_0x5ba063,_0x340cdc[_0x9ca5('0x54')]);return _0xed0861[_0x9ca5('0x96')](_0x5ba063);}})[_0x9ca5('0x1f')](function(_0x51bc80){if(_0x51bc80){_0x582594=_0x51bc80[_0x9ca5('0x49')];if(!_0x340cdc[_0x9ca5('0x43')][_0x9ca5('0x4b')](_0x9ca5('0x4c'))){_0x5ba063[_0x9ca5('0x30')]=qs[_0x9ca5('0x30')](_0x340cdc[_0x9ca5('0x43')][_0x9ca5('0x30')]);_0x5ba063[_0x9ca5('0x2e')]=qs[_0x9ca5('0x2e')](_0x340cdc[_0x9ca5('0x43')][_0x9ca5('0x2e')]);}return _0xed0861[_0x9ca5('0x96')](_0x5ba063);}})[_0x9ca5('0x1f')](function(_0x3192b8){if(_0x3192b8){return _0x3192b8?{'count':_0x582594,'rows':_0x3192b8}:null;}})['then'](respondWithResult(_0x315ba1,null))[_0x9ca5('0x2a')](handleError(_0x315ba1,null));};
\ No newline at end of file