Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / intVtigerConfiguration / intVtigerConfiguration.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 _0xf021=['count','offset','set','Content-Range','apply','reject','save','update','then','end','stack','name','index','VtigerConfiguration','rawAttributes','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','order','where','filters','pick','filter','merge','map','type','key','includeAll','include','findAll','rows','show','params','options','create','body','find','destroy','getFields','findOne','VtigerField','sort','getSubjects','getDescriptions','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','jayson/promise','client','request','VtigerConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','VtigerConfiguration,\x20%s,\x20%s','message','result','catch','sendStatus','status','json'];(function(_0x136e17,_0x4cc300){var _0x5099c9=function(_0xbbbb80){while(--_0xbbbb80){_0x136e17['push'](_0x136e17['shift']());}};_0x5099c9(++_0x4cc300);}(_0xf021,0x18f));var _0x1f02=function(_0x3c858f,_0x235201){_0x3c858f=_0x3c858f-0x0;var _0x198090=_0xf021[_0x3c858f];return _0x198090;};'use strict';var pdf=require(_0x1f02('0x0'));var emlformat=require(_0x1f02('0x1'));var rimraf=require(_0x1f02('0x2'));var zipdir=require(_0x1f02('0x3'));var jsonpatch=require(_0x1f02('0x4'));var rp=require('request-promise');var moment=require(_0x1f02('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x1f02('0x6'));var util=require(_0x1f02('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x1f02('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x1f02('0x9'));var squel=require(_0x1f02('0xa'));var crypto=require(_0x1f02('0xb'));var jsforce=require(_0x1f02('0xc'));var deskjs=require(_0x1f02('0xd'));var toCsv=require('to-csv');var querystring=require(_0x1f02('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x1f02('0xf'));var hardwareService=require(_0x1f02('0x10'));var logger=require(_0x1f02('0x11'))(_0x1f02('0x12'));var utils=require(_0x1f02('0x13'));var config=require('../../config/environment');var db=require(_0x1f02('0x14'))['db'];var jayson=require(_0x1f02('0x15'));var client=jayson[_0x1f02('0x16')]['http']({'port':0x232a});function checkPasswordPattern(_0x24e9b8,_0x1ac6eb,_0x154a1e){if(_0x154a1e){var _0x567f8a=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x567f8a['test'](_0x1ac6eb)){return _0x24e9b8;}else{throw new Error('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x24e9b8;}}function respondWithRpcPromise(_0x11ba7e,_0x2c08ad,_0x354ad1,_0x3655e8){return new BPromise(function(_0x1c16ce,_0x45bae1){var _0x440328=_0x3655e8||client;return _0x440328[_0x1f02('0x17')](_0x11ba7e,_0x354ad1)['then'](function(_0x2e602d){logger['info']('VtigerConfiguration,\x20%s,\x20%s',_0x2c08ad,'request\x20sent');logger['debug'](_0x1f02('0x18'),_0x2c08ad,_0x1f02('0x19'),JSON[_0x1f02('0x1a')](_0x2e602d));if(_0x2e602d['error']){if(_0x2e602d[_0x1f02('0x1b')][_0x1f02('0x1c')]===0x1f4){logger[_0x1f02('0x1b')](_0x1f02('0x1d'),_0x2c08ad,_0x2e602d['error']['message']);return _0x45bae1(_0x2e602d[_0x1f02('0x1b')][_0x1f02('0x1e')]);}logger['error']('VtigerConfiguration,\x20%s,\x20%s',_0x2c08ad,_0x2e602d[_0x1f02('0x1b')][_0x1f02('0x1e')]);return _0x1c16ce(_0x2e602d[_0x1f02('0x1b')][_0x1f02('0x1e')]);}else{logger['info'](_0x1f02('0x1d'),_0x2c08ad,_0x1f02('0x19'));_0x1c16ce(_0x2e602d[_0x1f02('0x1f')][_0x1f02('0x1e')]);}})[_0x1f02('0x20')](function(_0x134398){logger[_0x1f02('0x1b')]('VtigerConfiguration,\x20%s,\x20%s',_0x2c08ad,_0x134398);_0x45bae1(_0x134398);});});}function respondWithStatusCode(_0x29c784,_0x3a8c57){_0x3a8c57=_0x3a8c57||0xcc;return function(_0x47bc22){if(_0x47bc22){return _0x29c784[_0x1f02('0x21')](_0x3a8c57);}return _0x29c784[_0x1f02('0x22')](_0x3a8c57)['end']();};}function respondWithResult(_0x57bb58,_0x3f7426){_0x3f7426=_0x3f7426||0xc8;return function(_0x36c8c1){if(_0x36c8c1){return _0x57bb58[_0x1f02('0x22')](_0x3f7426)[_0x1f02('0x23')](_0x36c8c1);}};}function respondWithFilteredResult(_0x3f5c5e,_0x3f5577){return function(_0x297cf4){if(_0x297cf4){var _0x4c8891=_0x297cf4[_0x1f02('0x24')],_0x4d5f7e=_0x3f5577[_0x1f02('0x25')],_0x4e04f2=_0x3f5577['offset']+_0x3f5577['limit'],_0x3ef4bf;if(_0x4e04f2>=_0x4c8891){_0x4e04f2=_0x4c8891;_0x3ef4bf=0xc8;}else{_0x3ef4bf=0xce;}_0x3f5c5e[_0x1f02('0x22')](_0x3ef4bf);return _0x3f5c5e[_0x1f02('0x26')](_0x1f02('0x27'),_0x4d5f7e+'-'+_0x4e04f2+'/'+_0x4c8891)[_0x1f02('0x23')](_0x297cf4);}return null;};}function patchUpdates(_0x220345){return function(_0x3080a6){try{jsonpatch[_0x1f02('0x28')](_0x3080a6,_0x220345,!![]);}catch(_0x23fa22){return BPromise[_0x1f02('0x29')](_0x23fa22);}return _0x3080a6[_0x1f02('0x2a')]();};}function saveUpdates(_0x4fb97e,_0x137e06){return function(_0x5ab7a2){if(_0x5ab7a2){return _0x5ab7a2[_0x1f02('0x2b')](_0x4fb97e)[_0x1f02('0x2c')](function(_0x8a3f1e){return _0x8a3f1e;});}return null;};}function removeEntity(_0x2bf78e,_0x28a572){return function(_0x194c85){if(_0x194c85){return _0x194c85['destroy']()['then'](function(){_0x2bf78e[_0x1f02('0x22')](0xcc)[_0x1f02('0x2d')]();});}};}function handleEntityNotFound(_0x4da1ea,_0x345e83){return function(_0x4d1aec){if(!_0x4d1aec){_0x4da1ea[_0x1f02('0x21')](0x194);}return _0x4d1aec;};}function handleError(_0x4e7add,_0x3c473f){_0x3c473f=_0x3c473f||0x1f4;return function(_0x5482d9){logger['error'](_0x5482d9[_0x1f02('0x2e')]);if(_0x5482d9[_0x1f02('0x2f')]){delete _0x5482d9[_0x1f02('0x2f')];}_0x4e7add[_0x1f02('0x22')](_0x3c473f)['send'](_0x5482d9);};}exports[_0x1f02('0x30')]=function(_0x2f0079,_0x23e825){var _0x507866={},_0x68a2cb={},_0x3454aa={'count':0x0,'rows':[]};var _0x2a82fa=db[_0x1f02('0x31')][_0x1f02('0x32')];_0x68a2cb[_0x1f02('0x33')]=_['keys'](_0x2a82fa);_0x68a2cb[_0x1f02('0x34')]=_[_0x1f02('0x35')](_0x2f0079[_0x1f02('0x34')]);_0x68a2cb['filters']=_[_0x1f02('0x36')](_0x68a2cb['model'],_0x68a2cb[_0x1f02('0x34')]);_0x507866['attributes']=_['intersection'](_0x68a2cb[_0x1f02('0x33')],qs['fields'](_0x2f0079['query'][_0x1f02('0x37')]));_0x507866[_0x1f02('0x38')]=_0x507866[_0x1f02('0x38')][_0x1f02('0x39')]?_0x507866['attributes']:_0x68a2cb[_0x1f02('0x33')];if(!_0x2f0079['query'][_0x1f02('0x3a')](_0x1f02('0x3b'))){_0x507866[_0x1f02('0x3c')]=qs[_0x1f02('0x3c')](_0x2f0079[_0x1f02('0x34')][_0x1f02('0x3c')]);_0x507866[_0x1f02('0x25')]=qs[_0x1f02('0x25')](_0x2f0079[_0x1f02('0x34')]['offset']);}_0x507866[_0x1f02('0x3d')]=qs['sort'](_0x2f0079[_0x1f02('0x34')]['sort']);_0x507866[_0x1f02('0x3e')]=qs[_0x1f02('0x3f')](_[_0x1f02('0x40')](_0x2f0079['query'],_0x68a2cb['filters']));if(_0x2f0079[_0x1f02('0x34')][_0x1f02('0x41')]){_0x507866[_0x1f02('0x3e')]=_[_0x1f02('0x42')](_0x507866[_0x1f02('0x3e')],{'$or':_[_0x1f02('0x43')](_0x2a82fa,function(_0x23733c){if(_0x23733c[_0x1f02('0x44')][_0x1f02('0x45')]!=='VIRTUAL'){var _0x3202d8={};_0x3202d8[_0x23733c['field']]={'$like':'%'+_0x2f0079['query'][_0x1f02('0x41')]+'%'};return _0x3202d8;}})});}_0x507866=_['merge']({},_0x507866,_0x2f0079['options']);var _0xe61000={'where':_0x507866['where']};return db['VtigerConfiguration'][_0x1f02('0x24')](_0xe61000)[_0x1f02('0x2c')](function(_0x5169dc){_0x3454aa[_0x1f02('0x24')]=_0x5169dc;if(_0x2f0079[_0x1f02('0x34')][_0x1f02('0x46')]){_0x507866[_0x1f02('0x47')]=[{'all':!![]}];}return db['VtigerConfiguration'][_0x1f02('0x48')](_0x507866);})[_0x1f02('0x2c')](function(_0x20338e){_0x3454aa[_0x1f02('0x49')]=_0x20338e;return _0x3454aa;})[_0x1f02('0x2c')](respondWithFilteredResult(_0x23e825,_0x507866))[_0x1f02('0x20')](handleError(_0x23e825,null));};exports[_0x1f02('0x4a')]=function(_0x1409f0,_0x16bec7){var _0x282e5b={'raw':![],'where':{'id':_0x1409f0[_0x1f02('0x4b')]['id']}},_0x25e5f8={};_0x25e5f8[_0x1f02('0x33')]=_[_0x1f02('0x35')](db['VtigerConfiguration'][_0x1f02('0x32')]);_0x25e5f8['query']=_[_0x1f02('0x35')](_0x1409f0['query']);_0x25e5f8[_0x1f02('0x3f')]=_[_0x1f02('0x36')](_0x25e5f8[_0x1f02('0x33')],_0x25e5f8[_0x1f02('0x34')]);_0x282e5b[_0x1f02('0x38')]=_[_0x1f02('0x36')](_0x25e5f8[_0x1f02('0x33')],qs[_0x1f02('0x37')](_0x1409f0[_0x1f02('0x34')][_0x1f02('0x37')]));_0x282e5b[_0x1f02('0x38')]=_0x282e5b['attributes'][_0x1f02('0x39')]?_0x282e5b[_0x1f02('0x38')]:_0x25e5f8[_0x1f02('0x33')];if(_0x1409f0[_0x1f02('0x34')][_0x1f02('0x46')]){_0x282e5b[_0x1f02('0x47')]=[{'all':!![]}];}_0x282e5b=_[_0x1f02('0x42')]({},_0x282e5b,_0x1409f0[_0x1f02('0x4c')]);return db[_0x1f02('0x31')]['find'](_0x282e5b)[_0x1f02('0x2c')](handleEntityNotFound(_0x16bec7,null))[_0x1f02('0x2c')](respondWithResult(_0x16bec7,null))[_0x1f02('0x20')](handleError(_0x16bec7,null));};exports[_0x1f02('0x4d')]=function(_0x3cdf8c,_0x5adfb1){return db[_0x1f02('0x31')]['create'](_0x3cdf8c[_0x1f02('0x4e')],{})[_0x1f02('0x2c')](respondWithResult(_0x5adfb1,0xc9))[_0x1f02('0x20')](handleError(_0x5adfb1,null));};exports[_0x1f02('0x2b')]=function(_0x2eb2f4,_0x132437){if(_0x2eb2f4[_0x1f02('0x4e')]['id']){delete _0x2eb2f4[_0x1f02('0x4e')]['id'];}return db[_0x1f02('0x31')][_0x1f02('0x4f')]({'where':{'id':_0x2eb2f4['params']['id']}})['then'](handleEntityNotFound(_0x132437,null))['then'](saveUpdates(_0x2eb2f4[_0x1f02('0x4e')],null))['then'](respondWithResult(_0x132437,null))[_0x1f02('0x20')](handleError(_0x132437,null));};exports[_0x1f02('0x50')]=function(_0x587873,_0x5a8768){return db['VtigerConfiguration']['find']({'where':{'id':_0x587873['params']['id']}})[_0x1f02('0x2c')](handleEntityNotFound(_0x5a8768,null))[_0x1f02('0x2c')](removeEntity(_0x5a8768,null))[_0x1f02('0x20')](handleError(_0x5a8768,null));};exports[_0x1f02('0x51')]=function(_0xbb603,_0x3321b3,_0x5ea9a3){var _0x3986e6={};var _0xdd2e2b={};var _0x496e3c;var _0x5c2745;return db[_0x1f02('0x31')][_0x1f02('0x52')]({'where':{'id':_0xbb603[_0x1f02('0x4b')]['id']}})['then'](handleEntityNotFound(_0x3321b3,null))[_0x1f02('0x2c')](function(_0x48a2b0){if(_0x48a2b0){_0x496e3c=_0x48a2b0;_0xdd2e2b[_0x1f02('0x33')]=_['keys'](db[_0x1f02('0x53')][_0x1f02('0x32')]);_0xdd2e2b[_0x1f02('0x34')]=_[_0x1f02('0x35')](_0xbb603[_0x1f02('0x34')]);_0xdd2e2b[_0x1f02('0x3f')]=_[_0x1f02('0x36')](_0xdd2e2b[_0x1f02('0x33')],_0xdd2e2b[_0x1f02('0x34')]);_0x3986e6[_0x1f02('0x38')]=_[_0x1f02('0x36')](_0xdd2e2b[_0x1f02('0x33')],qs[_0x1f02('0x37')](_0xbb603[_0x1f02('0x34')][_0x1f02('0x37')]));_0x3986e6[_0x1f02('0x38')]=_0x3986e6[_0x1f02('0x38')][_0x1f02('0x39')]?_0x3986e6[_0x1f02('0x38')]:_0xdd2e2b[_0x1f02('0x33')];_0x3986e6['order']=qs[_0x1f02('0x54')](_0xbb603[_0x1f02('0x34')]['sort']);_0x3986e6[_0x1f02('0x3e')]=qs[_0x1f02('0x3f')](_['pick'](_0xbb603[_0x1f02('0x34')],_0xdd2e2b[_0x1f02('0x3f')]));if(_0xbb603[_0x1f02('0x34')]['filter']){_0x3986e6['where']=_[_0x1f02('0x42')](_0x3986e6[_0x1f02('0x3e')],{'$or':_[_0x1f02('0x43')](_0x3986e6[_0x1f02('0x38')],function(_0x6a2cd8){var _0x2f971c={};_0x2f971c[_0x6a2cd8]={'$like':'%'+_0xbb603[_0x1f02('0x34')][_0x1f02('0x41')]+'%'};return _0x2f971c;})});}_0x3986e6=_[_0x1f02('0x42')]({},_0x3986e6,_0xbb603[_0x1f02('0x4c')]);return _0x496e3c['getFields'](_0x3986e6);}})[_0x1f02('0x2c')](function(_0x5f054b){if(_0x5f054b){_0x5c2745=_0x5f054b['length'];if(!_0xbb603[_0x1f02('0x34')][_0x1f02('0x3a')](_0x1f02('0x3b'))){_0x3986e6[_0x1f02('0x3c')]=qs[_0x1f02('0x3c')](_0xbb603[_0x1f02('0x34')][_0x1f02('0x3c')]);_0x3986e6[_0x1f02('0x25')]=qs[_0x1f02('0x25')](_0xbb603[_0x1f02('0x34')][_0x1f02('0x25')]);}return _0x496e3c[_0x1f02('0x51')](_0x3986e6);}})[_0x1f02('0x2c')](function(_0x5632a1){if(_0x5632a1){return _0x5632a1?{'count':_0x5c2745,'rows':_0x5632a1}:null;}})['then'](respondWithResult(_0x3321b3,null))[_0x1f02('0x20')](handleError(_0x3321b3,null));};exports[_0x1f02('0x55')]=function(_0x5b7d67,_0x554ec1,_0x5819fe){var _0xd34719={};var _0x23fece={};var _0x1b3bfd;var _0x3ad421;return db[_0x1f02('0x31')]['findOne']({'where':{'id':_0x5b7d67[_0x1f02('0x4b')]['id']}})['then'](handleEntityNotFound(_0x554ec1,null))[_0x1f02('0x2c')](function(_0x4562c1){if(_0x4562c1){_0x1b3bfd=_0x4562c1;_0x23fece[_0x1f02('0x33')]=_[_0x1f02('0x35')](db[_0x1f02('0x53')][_0x1f02('0x32')]);_0x23fece[_0x1f02('0x34')]=_['keys'](_0x5b7d67[_0x1f02('0x34')]);_0x23fece[_0x1f02('0x3f')]=_[_0x1f02('0x36')](_0x23fece[_0x1f02('0x33')],_0x23fece[_0x1f02('0x34')]);_0xd34719[_0x1f02('0x38')]=_[_0x1f02('0x36')](_0x23fece[_0x1f02('0x33')],qs[_0x1f02('0x37')](_0x5b7d67[_0x1f02('0x34')][_0x1f02('0x37')]));_0xd34719['attributes']=_0xd34719['attributes'][_0x1f02('0x39')]?_0xd34719[_0x1f02('0x38')]:_0x23fece[_0x1f02('0x33')];_0xd34719[_0x1f02('0x3d')]=qs[_0x1f02('0x54')](_0x5b7d67[_0x1f02('0x34')][_0x1f02('0x54')]);_0xd34719[_0x1f02('0x3e')]=qs[_0x1f02('0x3f')](_[_0x1f02('0x40')](_0x5b7d67[_0x1f02('0x34')],_0x23fece[_0x1f02('0x3f')]));if(_0x5b7d67[_0x1f02('0x34')][_0x1f02('0x41')]){_0xd34719[_0x1f02('0x3e')]=_[_0x1f02('0x42')](_0xd34719[_0x1f02('0x3e')],{'$or':_[_0x1f02('0x43')](_0xd34719['attributes'],function(_0x5a8c9e){var _0x180f5e={};_0x180f5e[_0x5a8c9e]={'$like':'%'+_0x5b7d67[_0x1f02('0x34')]['filter']+'%'};return _0x180f5e;})});}_0xd34719=_[_0x1f02('0x42')]({},_0xd34719,_0x5b7d67[_0x1f02('0x4c')]);return _0x1b3bfd[_0x1f02('0x55')](_0xd34719);}})[_0x1f02('0x2c')](function(_0x30eb49){if(_0x30eb49){_0x3ad421=_0x30eb49[_0x1f02('0x39')];if(!_0x5b7d67[_0x1f02('0x34')][_0x1f02('0x3a')]('nolimit')){_0xd34719[_0x1f02('0x3c')]=qs[_0x1f02('0x3c')](_0x5b7d67[_0x1f02('0x34')][_0x1f02('0x3c')]);_0xd34719[_0x1f02('0x25')]=qs[_0x1f02('0x25')](_0x5b7d67[_0x1f02('0x34')][_0x1f02('0x25')]);}return _0x1b3bfd[_0x1f02('0x55')](_0xd34719);}})['then'](function(_0x27bd93){if(_0x27bd93){return _0x27bd93?{'count':_0x3ad421,'rows':_0x27bd93}:null;}})[_0x1f02('0x2c')](respondWithResult(_0x554ec1,null))['catch'](handleError(_0x554ec1,null));};exports[_0x1f02('0x56')]=function(_0x4d1cef,_0x36c22c,_0x1b3b62){var _0x91645d={};var _0x90f8f3={};var _0x45c6d0;var _0x3eb54d;return db[_0x1f02('0x31')][_0x1f02('0x52')]({'where':{'id':_0x4d1cef[_0x1f02('0x4b')]['id']}})[_0x1f02('0x2c')](handleEntityNotFound(_0x36c22c,null))[_0x1f02('0x2c')](function(_0x12e4dc){if(_0x12e4dc){_0x45c6d0=_0x12e4dc;_0x90f8f3[_0x1f02('0x33')]=_[_0x1f02('0x35')](db[_0x1f02('0x53')][_0x1f02('0x32')]);_0x90f8f3[_0x1f02('0x34')]=_[_0x1f02('0x35')](_0x4d1cef[_0x1f02('0x34')]);_0x90f8f3[_0x1f02('0x3f')]=_[_0x1f02('0x36')](_0x90f8f3[_0x1f02('0x33')],_0x90f8f3[_0x1f02('0x34')]);_0x91645d[_0x1f02('0x38')]=_[_0x1f02('0x36')](_0x90f8f3[_0x1f02('0x33')],qs['fields'](_0x4d1cef[_0x1f02('0x34')][_0x1f02('0x37')]));_0x91645d[_0x1f02('0x38')]=_0x91645d['attributes'][_0x1f02('0x39')]?_0x91645d[_0x1f02('0x38')]:_0x90f8f3[_0x1f02('0x33')];_0x91645d[_0x1f02('0x3d')]=qs[_0x1f02('0x54')](_0x4d1cef[_0x1f02('0x34')]['sort']);_0x91645d['where']=qs[_0x1f02('0x3f')](_[_0x1f02('0x40')](_0x4d1cef['query'],_0x90f8f3[_0x1f02('0x3f')]));if(_0x4d1cef[_0x1f02('0x34')][_0x1f02('0x41')]){_0x91645d['where']=_[_0x1f02('0x42')](_0x91645d[_0x1f02('0x3e')],{'$or':_[_0x1f02('0x43')](_0x91645d[_0x1f02('0x38')],function(_0x5a823c){var _0x4f9226={};_0x4f9226[_0x5a823c]={'$like':'%'+_0x4d1cef[_0x1f02('0x34')][_0x1f02('0x41')]+'%'};return _0x4f9226;})});}_0x91645d=_['merge']({},_0x91645d,_0x4d1cef['options']);return _0x45c6d0[_0x1f02('0x56')](_0x91645d);}})[_0x1f02('0x2c')](function(_0x14dae8){if(_0x14dae8){_0x3eb54d=_0x14dae8[_0x1f02('0x39')];if(!_0x4d1cef[_0x1f02('0x34')]['hasOwnProperty'](_0x1f02('0x3b'))){_0x91645d['limit']=qs[_0x1f02('0x3c')](_0x4d1cef[_0x1f02('0x34')][_0x1f02('0x3c')]);_0x91645d['offset']=qs[_0x1f02('0x25')](_0x4d1cef[_0x1f02('0x34')][_0x1f02('0x25')]);}return _0x45c6d0['getDescriptions'](_0x91645d);}})[_0x1f02('0x2c')](function(_0xbce1c5){if(_0xbce1c5){return _0xbce1c5?{'count':_0x3eb54d,'rows':_0xbce1c5}:null;}})[_0x1f02('0x2c')](respondWithResult(_0x36c22c,null))[_0x1f02('0x20')](handleError(_0x36c22c,null));};