Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / api / voiceQueueReport / voiceQueueReport.controller.js
index bf89605..6dc1b9b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d2f=['stack','name','index','map','rawAttributes','fieldName','key','query','keys','intersection','attributes','model','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','VoiceQueueReport','includeAll','rows','catch','include','find','create','body','update','params','getVoiceQueuesReport','nolimit','findAll','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','register','status','end','json','count','offset','limit','set','Content-Range','apply','reject','destroy','then','sendStatus','error'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4d2f,0x1b0));var _0xf4d2=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x4d2f[_0x5b644e];return _0x49c6bf;};'use strict';var pdf=require(_0xf4d2('0x0'));var emlformat=require(_0xf4d2('0x1'));var rimraf=require(_0xf4d2('0x2'));var zipdir=require(_0xf4d2('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf4d2('0x4'));var moment=require(_0xf4d2('0x5'));var BPromise=require(_0xf4d2('0x6'));var Mustache=require(_0xf4d2('0x7'));var util=require(_0xf4d2('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0xf4d2('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xf4d2('0xa'));var crypto=require(_0xf4d2('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xf4d2('0xc'));var toCsv=require(_0xf4d2('0x9'));var querystring=require('querystring');var Papa=require(_0xf4d2('0xd'));var Redis=require(_0xf4d2('0xe'));var authService=require(_0xf4d2('0xf'));var qs=require(_0xf4d2('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xf4d2('0x11'))(_0xf4d2('0x12'));var utils=require(_0xf4d2('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xf4d2('0x14'));var db=require(_0xf4d2('0x15'))['db'];config[_0xf4d2('0x16')]=_[_0xf4d2('0x17')](config[_0xf4d2('0x16')],{'host':_0xf4d2('0x18'),'port':0x18eb});var socket=require(_0xf4d2('0x19'))(new Redis(config[_0xf4d2('0x16')]));require(_0xf4d2('0x1a'))[_0xf4d2('0x1b')](socket);function respondWithStatusCode(_0x15a7df,_0x1bc129){_0x1bc129=_0x1bc129||0xcc;return function(_0x20743c){if(_0x20743c){return _0x15a7df['sendStatus'](_0x1bc129);}return _0x15a7df[_0xf4d2('0x1c')](_0x1bc129)[_0xf4d2('0x1d')]();};}function respondWithResult(_0x437893,_0x7195bc){_0x7195bc=_0x7195bc||0xc8;return function(_0x187277){if(_0x187277){return _0x437893[_0xf4d2('0x1c')](_0x7195bc)[_0xf4d2('0x1e')](_0x187277);}};}function respondWithFilteredResult(_0x4bbcc8,_0x57fe81){return function(_0x2cce66){if(_0x2cce66){var _0x2b4dfd=_0x2cce66[_0xf4d2('0x1f')],_0x35c12b=_0x57fe81[_0xf4d2('0x20')],_0x3b9bae=_0x57fe81[_0xf4d2('0x20')]+_0x57fe81[_0xf4d2('0x21')],_0x381d4b;if(_0x3b9bae>=_0x2b4dfd){_0x3b9bae=_0x2b4dfd;_0x381d4b=0xc8;}else{_0x381d4b=0xce;}_0x4bbcc8[_0xf4d2('0x1c')](_0x381d4b);return _0x4bbcc8[_0xf4d2('0x22')](_0xf4d2('0x23'),_0x35c12b+'-'+_0x3b9bae+'/'+_0x2b4dfd)[_0xf4d2('0x1e')](_0x2cce66);}return null;};}function patchUpdates(_0x35bc76){return function(_0x2f601d){try{jsonpatch[_0xf4d2('0x24')](_0x2f601d,_0x35bc76,!![]);}catch(_0x2506f7){return BPromise[_0xf4d2('0x25')](_0x2506f7);}return _0x2f601d['save']();};}function saveUpdates(_0x8f8bc0,_0x1497a9){return function(_0x5494f4){if(_0x5494f4){return _0x5494f4['update'](_0x8f8bc0)['then'](function(_0x432818){return _0x432818;});}return null;};}function removeEntity(_0x39996e,_0x3263e3){return function(_0x163c64){if(_0x163c64){return _0x163c64[_0xf4d2('0x26')]()[_0xf4d2('0x27')](function(){_0x39996e[_0xf4d2('0x1c')](0xcc)[_0xf4d2('0x1d')]();});}};}function handleEntityNotFound(_0x312a8c,_0x11c3cf){return function(_0x3a3043){if(!_0x3a3043){_0x312a8c[_0xf4d2('0x28')](0x194);}return _0x3a3043;};}function handleError(_0x5717c1,_0x556949){_0x556949=_0x556949||0x1f4;return function(_0x1e0756){logger[_0xf4d2('0x29')](_0x1e0756[_0xf4d2('0x2a')]);if(_0x1e0756[_0xf4d2('0x2b')]){delete _0x1e0756['name'];}_0x5717c1[_0xf4d2('0x1c')](_0x556949)['send'](_0x1e0756);};}exports[_0xf4d2('0x2c')]=function(_0x394c61,_0x1c9909){var _0x217966={},_0x23fd51={},_0xc60de7={'count':0x0,'rows':[]};var _0x8d3cf7=_[_0xf4d2('0x2d')](db['VoiceQueueReport'][_0xf4d2('0x2e')],function(_0x3f572e){return{'name':_0x3f572e[_0xf4d2('0x2f')],'type':_0x3f572e['type'][_0xf4d2('0x30')]};});_0x23fd51['model']=_[_0xf4d2('0x2d')](_0x8d3cf7,_0xf4d2('0x2b'));_0x23fd51[_0xf4d2('0x31')]=_[_0xf4d2('0x32')](_0x394c61[_0xf4d2('0x31')]);_0x23fd51['filters']=_[_0xf4d2('0x33')](_0x23fd51['model'],_0x23fd51['query']);_0x217966[_0xf4d2('0x34')]=_[_0xf4d2('0x33')](_0x23fd51[_0xf4d2('0x35')],qs[_0xf4d2('0x36')](_0x394c61[_0xf4d2('0x31')][_0xf4d2('0x36')]));_0x217966['attributes']=_0x217966[_0xf4d2('0x34')][_0xf4d2('0x37')]?_0x217966[_0xf4d2('0x34')]:_0x23fd51['model'];if(!_0x394c61[_0xf4d2('0x31')][_0xf4d2('0x38')]('nolimit')){_0x217966[_0xf4d2('0x21')]=qs[_0xf4d2('0x21')](_0x394c61[_0xf4d2('0x31')][_0xf4d2('0x21')]);_0x217966[_0xf4d2('0x20')]=qs[_0xf4d2('0x20')](_0x394c61['query'][_0xf4d2('0x20')]);}_0x217966[_0xf4d2('0x39')]=qs[_0xf4d2('0x3a')](_0x394c61[_0xf4d2('0x31')][_0xf4d2('0x3a')]);_0x217966[_0xf4d2('0x3b')]=qs[_0xf4d2('0x3c')](_[_0xf4d2('0x3d')](_0x394c61['query'],_0x23fd51[_0xf4d2('0x3c')]),_0x8d3cf7);if(_0x394c61[_0xf4d2('0x31')][_0xf4d2('0x3e')]){_0x217966[_0xf4d2('0x3b')]=_[_0xf4d2('0x3f')](_0x217966['where'],{'$or':_[_0xf4d2('0x2d')](_0x8d3cf7,function(_0x1d7718){if(_0x1d7718['type']!==_0xf4d2('0x40')){var _0x34f35a={};_0x34f35a[_0x1d7718[_0xf4d2('0x2b')]]={'$like':'%'+_0x394c61['query'][_0xf4d2('0x3e')]+'%'};return _0x34f35a;}})});}_0x217966=_[_0xf4d2('0x3f')]({},_0x217966,_0x394c61[_0xf4d2('0x41')]);var _0x3ebc52={'where':_0x217966[_0xf4d2('0x3b')]};return db[_0xf4d2('0x42')][_0xf4d2('0x1f')](_0x3ebc52)['then'](function(_0x299486){_0xc60de7[_0xf4d2('0x1f')]=_0x299486;if(_0x394c61[_0xf4d2('0x31')][_0xf4d2('0x43')]){_0x217966['include']=[{'all':!![]}];}return db[_0xf4d2('0x42')]['findAll'](_0x217966);})[_0xf4d2('0x27')](function(_0x23931d){_0xc60de7[_0xf4d2('0x44')]=_0x23931d;return _0xc60de7;})[_0xf4d2('0x27')](respondWithFilteredResult(_0x1c9909,_0x217966))[_0xf4d2('0x45')](handleError(_0x1c9909,null));};exports['show']=function(_0x5eabe2,_0x25477a){var _0x1b7e94={'raw':![],'where':{'id':_0x5eabe2['params']['id']}},_0x5eb750={};_0x5eb750[_0xf4d2('0x35')]=_[_0xf4d2('0x32')](db[_0xf4d2('0x42')]['rawAttributes']);_0x5eb750[_0xf4d2('0x31')]=_[_0xf4d2('0x32')](_0x5eabe2[_0xf4d2('0x31')]);_0x5eb750[_0xf4d2('0x3c')]=_[_0xf4d2('0x33')](_0x5eb750[_0xf4d2('0x35')],_0x5eb750[_0xf4d2('0x31')]);_0x1b7e94[_0xf4d2('0x34')]=_[_0xf4d2('0x33')](_0x5eb750[_0xf4d2('0x35')],qs[_0xf4d2('0x36')](_0x5eabe2['query'][_0xf4d2('0x36')]));_0x1b7e94[_0xf4d2('0x34')]=_0x1b7e94['attributes'][_0xf4d2('0x37')]?_0x1b7e94['attributes']:_0x5eb750[_0xf4d2('0x35')];if(_0x5eabe2[_0xf4d2('0x31')]['includeAll']){_0x1b7e94[_0xf4d2('0x46')]=[{'all':!![]}];}_0x1b7e94=_[_0xf4d2('0x3f')]({},_0x1b7e94,_0x5eabe2[_0xf4d2('0x41')]);return db[_0xf4d2('0x42')][_0xf4d2('0x47')](_0x1b7e94)[_0xf4d2('0x27')](handleEntityNotFound(_0x25477a,null))['then'](respondWithResult(_0x25477a,null))[_0xf4d2('0x45')](handleError(_0x25477a,null));};exports['create']=function(_0x1784ac,_0x2c5bff){return db[_0xf4d2('0x42')][_0xf4d2('0x48')](_0x1784ac[_0xf4d2('0x49')],{})[_0xf4d2('0x27')](respondWithResult(_0x2c5bff,0xc9))['catch'](handleError(_0x2c5bff,null));};exports[_0xf4d2('0x4a')]=function(_0xe88e88,_0xfbf5e7){if(_0xe88e88['body']['id']){delete _0xe88e88['body']['id'];}return db['VoiceQueueReport'][_0xf4d2('0x47')]({'where':{'id':_0xe88e88['params']['id']}})['then'](handleEntityNotFound(_0xfbf5e7,null))['then'](saveUpdates(_0xe88e88[_0xf4d2('0x49')],null))[_0xf4d2('0x27')](respondWithResult(_0xfbf5e7,null))[_0xf4d2('0x45')](handleError(_0xfbf5e7,null));};exports[_0xf4d2('0x26')]=function(_0x3960cd,_0x102db8){return db[_0xf4d2('0x42')][_0xf4d2('0x47')]({'where':{'id':_0x3960cd[_0xf4d2('0x4b')]['id']}})[_0xf4d2('0x27')](handleEntityNotFound(_0x102db8,null))['then'](removeEntity(_0x102db8,null))[_0xf4d2('0x45')](handleError(_0x102db8,null));};exports['describe']=function(_0x5c2257,_0x451fe6){return db[_0xf4d2('0x42')]['describe']()[_0xf4d2('0x27')](respondWithResult(_0x451fe6,null))[_0xf4d2('0x45')](handleError(_0x451fe6,null));};exports[_0xf4d2('0x4c')]=function(_0x5c62a0,_0x28e4ef){var _0x5e1b1d={},_0x4b169e={},_0x4627b8={'count':0x0,'rows':[]};_0x4b169e[_0xf4d2('0x35')]=_[_0xf4d2('0x32')](db[_0xf4d2('0x42')]['rawAttributes']);_0x4b169e[_0xf4d2('0x31')]=_[_0xf4d2('0x32')](_0x5c62a0['query']);_0x4b169e[_0xf4d2('0x3c')]=_['intersection'](_0x4b169e[_0xf4d2('0x35')],_0x4b169e[_0xf4d2('0x31')]);_0x5e1b1d['attributes']=_['intersection'](_0x4b169e['model'],qs[_0xf4d2('0x36')](_0x5c62a0[_0xf4d2('0x31')][_0xf4d2('0x36')]));_0x5e1b1d[_0xf4d2('0x34')]=_0x5e1b1d['attributes'][_0xf4d2('0x37')]?_0x5e1b1d[_0xf4d2('0x34')]:_0x4b169e['model'];if(!_0x5c62a0[_0xf4d2('0x31')]['hasOwnProperty'](_0xf4d2('0x4d'))){_0x5e1b1d['limit']=qs[_0xf4d2('0x21')](_0x5c62a0[_0xf4d2('0x31')]['limit']);_0x5e1b1d[_0xf4d2('0x20')]=qs[_0xf4d2('0x20')](_0x5c62a0[_0xf4d2('0x31')]['offset']);}_0x5e1b1d['order']=qs['sort'](_0x5c62a0[_0xf4d2('0x31')][_0xf4d2('0x3a')]);_0x5e1b1d[_0xf4d2('0x3b')]=qs[_0xf4d2('0x3c')](_[_0xf4d2('0x3d')](_0x5c62a0[_0xf4d2('0x31')],_0x4b169e['filters']));if(_0x5c62a0[_0xf4d2('0x31')][_0xf4d2('0x3e')]){_0x5e1b1d[_0xf4d2('0x3b')]=_[_0xf4d2('0x3f')](_0x5e1b1d['where'],{'$or':_[_0xf4d2('0x2d')](_0x5e1b1d[_0xf4d2('0x34')],function(_0x4ecd92){var _0x3fd948={};_0x3fd948[_0x4ecd92]={'$like':'%'+_0x5c62a0[_0xf4d2('0x31')][_0xf4d2('0x3e')]+'%'};return _0x3fd948;})});}_0x5e1b1d=_[_0xf4d2('0x3f')]({},_0x5e1b1d,_0x5c62a0[_0xf4d2('0x41')]);var _0xf38136={'where':_0x5e1b1d[_0xf4d2('0x3b')]};return db['VoiceQueueReport'][_0xf4d2('0x1f')](_0xf38136)[_0xf4d2('0x27')](function(_0x422275){_0x4627b8[_0xf4d2('0x1f')]=_0x422275;if(_0x5c62a0['query'][_0xf4d2('0x43')]){_0x5e1b1d[_0xf4d2('0x46')]=[{'all':!![]}];}return db['VoiceQueueReport'][_0xf4d2('0x4e')](_0x5e1b1d);})[_0xf4d2('0x27')](function(_0x363b2f){_0x4627b8[_0xf4d2('0x44')]=_0x363b2f;return _0x4627b8;})[_0xf4d2('0x27')](respondWithFilteredResult(_0x28e4ef,_0x5e1b1d,'getVoiceQueuesReport'))[_0xf4d2('0x45')](handleError(_0x28e4ef,null,_0xf4d2('0x4c')));};
\ No newline at end of file
+var _0x3f00=['rows','show','params','length','include','catch','create','body','find','getVoiceQueuesReport','nolimit','sort','pick','filter','findAll','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','fs-extra','lodash','squel','crypto','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','localhost','register','sendStatus','status','json','count','offset','limit','set','apply','save','update','destroy','then','end','error','stack','name','send','index','map','VoiceQueueReport','rawAttributes','fieldName','type','model','keys','intersection','attributes','fields','query','hasOwnProperty','order','where','filters','VIRTUAL','merge','options','includeAll'];(function(_0x3ca627,_0x1e70d9){var _0xef06b5=function(_0x4da56b){while(--_0x4da56b){_0x3ca627['push'](_0x3ca627['shift']());}};_0xef06b5(++_0x1e70d9);}(_0x3f00,0xab));var _0x03f0=function(_0x146cb9,_0x349d0b){_0x146cb9=_0x146cb9-0x0;var _0x2dbc9a=_0x3f00[_0x146cb9];return _0x2dbc9a;};'use strict';var emlformat=require(_0x03f0('0x0'));var rimraf=require(_0x03f0('0x1'));var zipdir=require(_0x03f0('0x2'));var jsonpatch=require(_0x03f0('0x3'));var rp=require(_0x03f0('0x4'));var moment=require('moment');var BPromise=require(_0x03f0('0x5'));var Mustache=require('mustache');var util=require(_0x03f0('0x6'));var path=require(_0x03f0('0x7'));var sox=require(_0x03f0('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x03f0('0x9'));var _=require(_0x03f0('0xa'));var squel=require(_0x03f0('0xb'));var crypto=require(_0x03f0('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x03f0('0xd'));var querystring=require(_0x03f0('0xe'));var Papa=require(_0x03f0('0xf'));var Redis=require(_0x03f0('0x10'));var authService=require(_0x03f0('0x11'));var qs=require(_0x03f0('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x03f0('0x13'));var config=require(_0x03f0('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x03f0('0x15'))['db'];config['redis']=_[_0x03f0('0x16')](config[_0x03f0('0x17')],{'host':_0x03f0('0x18'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x03f0('0x17')]));require('./voiceQueueReport.socket')[_0x03f0('0x19')](socket);function respondWithStatusCode(_0xf9b118,_0x27e5d1){_0x27e5d1=_0x27e5d1||0xcc;return function(_0x1fc05d){if(_0x1fc05d){return _0xf9b118[_0x03f0('0x1a')](_0x27e5d1);}return _0xf9b118[_0x03f0('0x1b')](_0x27e5d1)['end']();};}function respondWithResult(_0x244afd,_0x23ae07){_0x23ae07=_0x23ae07||0xc8;return function(_0x43c20b){if(_0x43c20b){return _0x244afd[_0x03f0('0x1b')](_0x23ae07)[_0x03f0('0x1c')](_0x43c20b);}};}function respondWithFilteredResult(_0x3a6ab7,_0xf378fc){return function(_0x393672){if(_0x393672){var _0x4f18b2=_0x393672[_0x03f0('0x1d')],_0x42de3=_0xf378fc['offset'],_0x599fc3=_0xf378fc[_0x03f0('0x1e')]+_0xf378fc[_0x03f0('0x1f')],_0x13c02f;if(_0x599fc3>=_0x4f18b2){_0x599fc3=_0x4f18b2;_0x13c02f=0xc8;}else{_0x13c02f=0xce;}_0x3a6ab7['status'](_0x13c02f);return _0x3a6ab7[_0x03f0('0x20')]('Content-Range',_0x42de3+'-'+_0x599fc3+'/'+_0x4f18b2)[_0x03f0('0x1c')](_0x393672);}return null;};}function patchUpdates(_0xddebe){return function(_0x2c0907){try{jsonpatch[_0x03f0('0x21')](_0x2c0907,_0xddebe,!![]);}catch(_0x3150e0){return BPromise['reject'](_0x3150e0);}return _0x2c0907[_0x03f0('0x22')]();};}function saveUpdates(_0x37fbb2,_0x54d7a5){return function(_0x435cc5){if(_0x435cc5){return _0x435cc5[_0x03f0('0x23')](_0x37fbb2)['then'](function(_0x51eaf2){return _0x51eaf2;});}return null;};}function removeEntity(_0x29f725,_0xc20c39){return function(_0x1a0046){if(_0x1a0046){return _0x1a0046[_0x03f0('0x24')]()[_0x03f0('0x25')](function(){_0x29f725['status'](0xcc)[_0x03f0('0x26')]();});}};}function handleEntityNotFound(_0x47912b,_0x23a98e){return function(_0x1b823a){if(!_0x1b823a){_0x47912b[_0x03f0('0x1a')](0x194);}return _0x1b823a;};}function handleError(_0x535c25,_0x3e6b39){_0x3e6b39=_0x3e6b39||0x1f4;return function(_0x21f5f3){logger[_0x03f0('0x27')](_0x21f5f3[_0x03f0('0x28')]);if(_0x21f5f3[_0x03f0('0x29')]){delete _0x21f5f3['name'];}_0x535c25['status'](_0x3e6b39)[_0x03f0('0x2a')](_0x21f5f3);};}exports[_0x03f0('0x2b')]=function(_0x57e647,_0x5742ca){var _0x189d36={},_0x47e138={},_0x22c889={'count':0x0,'rows':[]};var _0x1504f1=_[_0x03f0('0x2c')](db[_0x03f0('0x2d')][_0x03f0('0x2e')],function(_0x14bcd6){return{'name':_0x14bcd6[_0x03f0('0x2f')],'type':_0x14bcd6[_0x03f0('0x30')]['key']};});_0x47e138[_0x03f0('0x31')]=_['map'](_0x1504f1,_0x03f0('0x29'));_0x47e138['query']=_[_0x03f0('0x32')](_0x57e647['query']);_0x47e138['filters']=_[_0x03f0('0x33')](_0x47e138[_0x03f0('0x31')],_0x47e138['query']);_0x189d36[_0x03f0('0x34')]=_[_0x03f0('0x33')](_0x47e138[_0x03f0('0x31')],qs[_0x03f0('0x35')](_0x57e647[_0x03f0('0x36')][_0x03f0('0x35')]));_0x189d36['attributes']=_0x189d36['attributes']['length']?_0x189d36[_0x03f0('0x34')]:_0x47e138['model'];if(!_0x57e647[_0x03f0('0x36')][_0x03f0('0x37')]('nolimit')){_0x189d36[_0x03f0('0x1f')]=qs['limit'](_0x57e647[_0x03f0('0x36')][_0x03f0('0x1f')]);_0x189d36[_0x03f0('0x1e')]=qs['offset'](_0x57e647[_0x03f0('0x36')][_0x03f0('0x1e')]);}_0x189d36[_0x03f0('0x38')]=qs['sort'](_0x57e647['query']['sort']);_0x189d36[_0x03f0('0x39')]=qs[_0x03f0('0x3a')](_['pick'](_0x57e647[_0x03f0('0x36')],_0x47e138['filters']),_0x1504f1);if(_0x57e647[_0x03f0('0x36')]['filter']){_0x189d36['where']=_['merge'](_0x189d36[_0x03f0('0x39')],{'$or':_[_0x03f0('0x2c')](_0x1504f1,function(_0x4c570e){if(_0x4c570e[_0x03f0('0x30')]!==_0x03f0('0x3b')){var _0x905433={};_0x905433[_0x4c570e[_0x03f0('0x29')]]={'$like':'%'+_0x57e647['query']['filter']+'%'};return _0x905433;}})});}_0x189d36=_[_0x03f0('0x3c')]({},_0x189d36,_0x57e647[_0x03f0('0x3d')]);var _0x274c47={'where':_0x189d36[_0x03f0('0x39')]};return db[_0x03f0('0x2d')][_0x03f0('0x1d')](_0x274c47)[_0x03f0('0x25')](function(_0x4e43a1){_0x22c889['count']=_0x4e43a1;if(_0x57e647[_0x03f0('0x36')][_0x03f0('0x3e')]){_0x189d36['include']=[{'all':!![]}];}return db['VoiceQueueReport']['findAll'](_0x189d36);})[_0x03f0('0x25')](function(_0x334dab){_0x22c889[_0x03f0('0x3f')]=_0x334dab;return _0x22c889;})['then'](respondWithFilteredResult(_0x5742ca,_0x189d36))['catch'](handleError(_0x5742ca,null));};exports[_0x03f0('0x40')]=function(_0x2f497e,_0x511803){var _0x3e5e2a={'raw':![],'where':{'id':_0x2f497e[_0x03f0('0x41')]['id']}},_0x16d3d3={};_0x16d3d3[_0x03f0('0x31')]=_[_0x03f0('0x32')](db[_0x03f0('0x2d')][_0x03f0('0x2e')]);_0x16d3d3[_0x03f0('0x36')]=_['keys'](_0x2f497e['query']);_0x16d3d3[_0x03f0('0x3a')]=_[_0x03f0('0x33')](_0x16d3d3[_0x03f0('0x31')],_0x16d3d3[_0x03f0('0x36')]);_0x3e5e2a[_0x03f0('0x34')]=_[_0x03f0('0x33')](_0x16d3d3[_0x03f0('0x31')],qs[_0x03f0('0x35')](_0x2f497e[_0x03f0('0x36')][_0x03f0('0x35')]));_0x3e5e2a[_0x03f0('0x34')]=_0x3e5e2a[_0x03f0('0x34')][_0x03f0('0x42')]?_0x3e5e2a[_0x03f0('0x34')]:_0x16d3d3[_0x03f0('0x31')];if(_0x2f497e[_0x03f0('0x36')][_0x03f0('0x3e')]){_0x3e5e2a[_0x03f0('0x43')]=[{'all':!![]}];}_0x3e5e2a=_[_0x03f0('0x3c')]({},_0x3e5e2a,_0x2f497e[_0x03f0('0x3d')]);return db[_0x03f0('0x2d')]['find'](_0x3e5e2a)[_0x03f0('0x25')](handleEntityNotFound(_0x511803,null))[_0x03f0('0x25')](respondWithResult(_0x511803,null))[_0x03f0('0x44')](handleError(_0x511803,null));};exports[_0x03f0('0x45')]=function(_0xd7b997,_0x2885f9){return db[_0x03f0('0x2d')][_0x03f0('0x45')](_0xd7b997[_0x03f0('0x46')],{})['then'](respondWithResult(_0x2885f9,0xc9))[_0x03f0('0x44')](handleError(_0x2885f9,null));};exports[_0x03f0('0x23')]=function(_0x2f2538,_0x45cd97){if(_0x2f2538[_0x03f0('0x46')]['id']){delete _0x2f2538[_0x03f0('0x46')]['id'];}return db[_0x03f0('0x2d')][_0x03f0('0x47')]({'where':{'id':_0x2f2538['params']['id']}})[_0x03f0('0x25')](handleEntityNotFound(_0x45cd97,null))[_0x03f0('0x25')](saveUpdates(_0x2f2538[_0x03f0('0x46')],null))['then'](respondWithResult(_0x45cd97,null))[_0x03f0('0x44')](handleError(_0x45cd97,null));};exports['destroy']=function(_0x19ca34,_0x2f6d10){return db[_0x03f0('0x2d')]['find']({'where':{'id':_0x19ca34[_0x03f0('0x41')]['id']}})[_0x03f0('0x25')](handleEntityNotFound(_0x2f6d10,null))[_0x03f0('0x25')](removeEntity(_0x2f6d10,null))['catch'](handleError(_0x2f6d10,null));};exports['describe']=function(_0x1ca1d7,_0x3bcb80){return db['VoiceQueueReport']['describe']()[_0x03f0('0x25')](respondWithResult(_0x3bcb80,null))[_0x03f0('0x44')](handleError(_0x3bcb80,null));};exports[_0x03f0('0x48')]=function(_0x54b4f4,_0x23ae77){var _0x2b7950={},_0x8fe982={},_0x10aca0={'count':0x0,'rows':[]};_0x8fe982[_0x03f0('0x31')]=_[_0x03f0('0x32')](db[_0x03f0('0x2d')][_0x03f0('0x2e')]);_0x8fe982[_0x03f0('0x36')]=_['keys'](_0x54b4f4[_0x03f0('0x36')]);_0x8fe982[_0x03f0('0x3a')]=_[_0x03f0('0x33')](_0x8fe982['model'],_0x8fe982['query']);_0x2b7950[_0x03f0('0x34')]=_[_0x03f0('0x33')](_0x8fe982[_0x03f0('0x31')],qs[_0x03f0('0x35')](_0x54b4f4[_0x03f0('0x36')]['fields']));_0x2b7950['attributes']=_0x2b7950['attributes'][_0x03f0('0x42')]?_0x2b7950[_0x03f0('0x34')]:_0x8fe982[_0x03f0('0x31')];if(!_0x54b4f4[_0x03f0('0x36')][_0x03f0('0x37')](_0x03f0('0x49'))){_0x2b7950[_0x03f0('0x1f')]=qs[_0x03f0('0x1f')](_0x54b4f4[_0x03f0('0x36')][_0x03f0('0x1f')]);_0x2b7950[_0x03f0('0x1e')]=qs[_0x03f0('0x1e')](_0x54b4f4['query'][_0x03f0('0x1e')]);}_0x2b7950[_0x03f0('0x38')]=qs[_0x03f0('0x4a')](_0x54b4f4[_0x03f0('0x36')]['sort']);_0x2b7950[_0x03f0('0x39')]=qs[_0x03f0('0x3a')](_[_0x03f0('0x4b')](_0x54b4f4['query'],_0x8fe982[_0x03f0('0x3a')]));if(_0x54b4f4[_0x03f0('0x36')][_0x03f0('0x4c')]){_0x2b7950[_0x03f0('0x39')]=_['merge'](_0x2b7950[_0x03f0('0x39')],{'$or':_[_0x03f0('0x2c')](_0x2b7950[_0x03f0('0x34')],function(_0x585137){var _0x4b2ff7={};_0x4b2ff7[_0x585137]={'$like':'%'+_0x54b4f4[_0x03f0('0x36')][_0x03f0('0x4c')]+'%'};return _0x4b2ff7;})});}_0x2b7950=_[_0x03f0('0x3c')]({},_0x2b7950,_0x54b4f4[_0x03f0('0x3d')]);var _0xae22b6={'where':_0x2b7950[_0x03f0('0x39')]};return db[_0x03f0('0x2d')][_0x03f0('0x1d')](_0xae22b6)[_0x03f0('0x25')](function(_0x5977b9){_0x10aca0[_0x03f0('0x1d')]=_0x5977b9;if(_0x54b4f4['query'][_0x03f0('0x3e')]){_0x2b7950[_0x03f0('0x43')]=[{'all':!![]}];}return db[_0x03f0('0x2d')][_0x03f0('0x4d')](_0x2b7950);})[_0x03f0('0x25')](function(_0x2f5351){_0x10aca0['rows']=_0x2f5351;return _0x10aca0;})['then'](respondWithFilteredResult(_0x23ae77,_0x2b7950,_0x03f0('0x48')))['catch'](handleError(_0x23ae77,null,_0x03f0('0x48')));};
\ No newline at end of file