Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / api / setting / setting.controller.js
index f7eae6d..fb4931d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x53f9=['Sequelize','ValidationError','upperFirst','\x20not\x20found','download','getLogoLogin','favicon','default_loginLogo.svg','gdpr','addPreferred','getLicense','defaultPreferred','default_preferred.png','getFavicon','default_favicon.ico','utcOffset','now','format','html-pdf','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','then','info','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','message','result','sendStatus','end','count','offset','limit','status','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','Setting','fieldName','type','key','query','keys','intersection','model','fields','attributes','length','hasOwnProperty','order','sort','where','filters','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','find','body','params','file','filename','logo','addLogoLogin','loginLogo','server/files/images/logos','preferred','defaultLogo','defaultLoginLogo','defaultFavicon','existsSync','join','root','toLower','default_logo.svg','default','custom'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x53f9,0x174));var _0x953f=function(_0x29632e,_0x5ecba4){_0x29632e=_0x29632e-0x0;var _0x426e04=_0x53f9[_0x29632e];return _0x426e04;};'use strict';var pdf=require(_0x953f('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x953f('0x1'));var zipdir=require(_0x953f('0x2'));var jsonpatch=require(_0x953f('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x953f('0x4'));var Mustache=require(_0x953f('0x5'));var util=require(_0x953f('0x6'));var path=require(_0x953f('0x7'));var sox=require(_0x953f('0x8'));var csv=require('to-csv');var ejs=require(_0x953f('0x9'));var fs=require('fs');var _=require(_0x953f('0xa'));var squel=require('squel');var crypto=require(_0x953f('0xb'));var jsforce=require(_0x953f('0xc'));var deskjs=require(_0x953f('0xd'));var toCsv=require(_0x953f('0xe'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x953f('0xf'));var authService=require(_0x953f('0x10'));var qs=require(_0x953f('0x11'));var as=require(_0x953f('0x12'));var hardwareService=require(_0x953f('0x13'));var logger=require('../../config/logger')(_0x953f('0x14'));var utils=require(_0x953f('0x15'));var config=require(_0x953f('0x16'));var licenseUtil=require(_0x953f('0x17'));var db=require(_0x953f('0x18'))['db'];var jayson=require(_0x953f('0x19'));var client=jayson[_0x953f('0x1a')][_0x953f('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x140e51,_0x167087,_0x459407,_0x2f008f){return new BPromise(function(_0x2a9ad4,_0x36c042){var _0x35b540=_0x2f008f||client;return _0x35b540['request'](_0x140e51,_0x459407)[_0x953f('0x1c')](function(_0x6a017e){logger[_0x953f('0x1d')](_0x953f('0x1e'),_0x167087,_0x953f('0x1f'));logger['debug'](_0x953f('0x20'),_0x167087,_0x953f('0x1f'),JSON[_0x953f('0x21')](_0x6a017e));if(_0x6a017e['error']){if(_0x6a017e[_0x953f('0x22')]['code']===0x1f4){logger[_0x953f('0x22')](_0x953f('0x1e'),_0x167087,_0x6a017e[_0x953f('0x22')][_0x953f('0x23')]);return _0x36c042(_0x6a017e[_0x953f('0x22')][_0x953f('0x23')]);}logger[_0x953f('0x22')](_0x953f('0x1e'),_0x167087,_0x6a017e[_0x953f('0x22')][_0x953f('0x23')]);return _0x2a9ad4(_0x6a017e[_0x953f('0x22')][_0x953f('0x23')]);}else{logger['info'](_0x953f('0x1e'),_0x167087,_0x953f('0x1f'));_0x2a9ad4(_0x6a017e[_0x953f('0x24')][_0x953f('0x23')]);}})['catch'](function(_0x1e2abb){logger[_0x953f('0x22')](_0x953f('0x1e'),_0x167087,_0x1e2abb);_0x36c042(_0x1e2abb);});});}function respondWithStatusCode(_0x2b42d5,_0x247741){_0x247741=_0x247741||0xcc;return function(_0x327846){if(_0x327846){return _0x2b42d5[_0x953f('0x25')](_0x247741);}return _0x2b42d5['status'](_0x247741)[_0x953f('0x26')]();};}function respondWithResult(_0x7457f3,_0x11f20b){_0x11f20b=_0x11f20b||0xc8;return function(_0x2ee787){if(_0x2ee787){return _0x7457f3['status'](_0x11f20b)['json'](_0x2ee787);}};}function respondWithFilteredResult(_0x4488a0,_0x56f426){return function(_0x3ab43f){if(_0x3ab43f){var _0x33e78=_0x3ab43f[_0x953f('0x27')],_0xb31225=_0x56f426['offset'],_0x222e0e=_0x56f426[_0x953f('0x28')]+_0x56f426[_0x953f('0x29')],_0x147494;if(_0x222e0e>=_0x33e78){_0x222e0e=_0x33e78;_0x147494=0xc8;}else{_0x147494=0xce;}_0x4488a0[_0x953f('0x2a')](_0x147494);return _0x4488a0['set'](_0x953f('0x2b'),_0xb31225+'-'+_0x222e0e+'/'+_0x33e78)['json'](_0x3ab43f);}return null;};}function patchUpdates(_0x3a8129){return function(_0xa75843){try{jsonpatch[_0x953f('0x2c')](_0xa75843,_0x3a8129,!![]);}catch(_0x2f9b80){return BPromise[_0x953f('0x2d')](_0x2f9b80);}return _0xa75843[_0x953f('0x2e')]();};}function saveUpdates(_0x7c4e39,_0xafb869){return function(_0x20657c){if(_0x20657c){return _0x20657c[_0x953f('0x2f')](_0x7c4e39)[_0x953f('0x1c')](function(_0xb82670){return _0xb82670;});}return null;};}function removeEntity(_0x261c7c,_0x5e961f){return function(_0x1db3f5){if(_0x1db3f5){return _0x1db3f5[_0x953f('0x30')]()[_0x953f('0x1c')](function(){_0x261c7c[_0x953f('0x2a')](0xcc)[_0x953f('0x26')]();});}};}function handleEntityNotFound(_0x471539,_0x3ba4f8){return function(_0x20bc5e){if(!_0x20bc5e){_0x471539[_0x953f('0x25')](0x194);}return _0x20bc5e;};}function handleError(_0x1c0052,_0x3839f6){_0x3839f6=_0x3839f6||0x1f4;return function(_0x2d3a2f){logger[_0x953f('0x22')](_0x2d3a2f[_0x953f('0x31')]);if(_0x2d3a2f[_0x953f('0x32')]){delete _0x2d3a2f[_0x953f('0x32')];}_0x1c0052[_0x953f('0x2a')](_0x3839f6)[_0x953f('0x33')](_0x2d3a2f);};}exports[_0x953f('0x34')]=function(_0x39ef49,_0x244780){var _0x57bd87={},_0x159e4f={},_0x4850f9={'count':0x0,'rows':[]};var _0x4c186f=_['map'](db[_0x953f('0x35')]['rawAttributes'],function(_0x4135df){return{'name':_0x4135df[_0x953f('0x36')],'type':_0x4135df[_0x953f('0x37')][_0x953f('0x38')]};});_0x159e4f['model']=_['map'](_0x4c186f,_0x953f('0x32'));_0x159e4f[_0x953f('0x39')]=_[_0x953f('0x3a')](_0x39ef49['query']);_0x159e4f['filters']=_[_0x953f('0x3b')](_0x159e4f['model'],_0x159e4f[_0x953f('0x39')]);_0x57bd87['attributes']=_[_0x953f('0x3b')](_0x159e4f[_0x953f('0x3c')],qs[_0x953f('0x3d')](_0x39ef49['query'][_0x953f('0x3d')]));_0x57bd87[_0x953f('0x3e')]=_0x57bd87[_0x953f('0x3e')][_0x953f('0x3f')]?_0x57bd87['attributes']:_0x159e4f[_0x953f('0x3c')];if(!_0x39ef49['query'][_0x953f('0x40')]('nolimit')){_0x57bd87['limit']=qs[_0x953f('0x29')](_0x39ef49['query'][_0x953f('0x29')]);_0x57bd87[_0x953f('0x28')]=qs[_0x953f('0x28')](_0x39ef49[_0x953f('0x39')][_0x953f('0x28')]);}_0x57bd87[_0x953f('0x41')]=qs[_0x953f('0x42')](_0x39ef49[_0x953f('0x39')][_0x953f('0x42')]);_0x57bd87[_0x953f('0x43')]=qs[_0x953f('0x44')](_['pick'](_0x39ef49[_0x953f('0x39')],_0x159e4f[_0x953f('0x44')]),_0x4c186f);if(_0x39ef49['query'][_0x953f('0x45')]){_0x57bd87['where']=_[_0x953f('0x46')](_0x57bd87['where'],{'$or':_[_0x953f('0x47')](_0x4c186f,function(_0x23b265){if(_0x23b265[_0x953f('0x37')]!==_0x953f('0x48')){var _0x21dd3b={};_0x21dd3b[_0x23b265[_0x953f('0x32')]]={'$like':'%'+_0x39ef49[_0x953f('0x39')][_0x953f('0x45')]+'%'};return _0x21dd3b;}})});}_0x57bd87=_[_0x953f('0x46')]({},_0x57bd87,_0x39ef49[_0x953f('0x49')]);var _0x36ea00={'where':_0x57bd87['where']};return db[_0x953f('0x35')][_0x953f('0x27')](_0x36ea00)[_0x953f('0x1c')](function(_0x352c36){_0x4850f9[_0x953f('0x27')]=_0x352c36;if(_0x39ef49['query'][_0x953f('0x4a')]){_0x57bd87[_0x953f('0x4b')]=[{'all':!![]}];}return db[_0x953f('0x35')][_0x953f('0x4c')](_0x57bd87);})[_0x953f('0x1c')](function(_0x5e4088){_0x4850f9[_0x953f('0x4d')]=_0x5e4088;return _0x4850f9;})['then'](respondWithFilteredResult(_0x244780,_0x57bd87))[_0x953f('0x4e')](handleError(_0x244780,null));};exports[_0x953f('0x4f')]=function(_0xb6a4aa,_0x102c9a){var _0x430cc6={'raw':![],'where':{'id':_0xb6a4aa['params']['id']}},_0x4239ef={};_0x4239ef['model']=_['keys'](db[_0x953f('0x35')]['rawAttributes']);_0x4239ef['query']=_['keys'](_0xb6a4aa['query']);_0x4239ef['filters']=_[_0x953f('0x3b')](_0x4239ef[_0x953f('0x3c')],_0x4239ef['query']);_0x430cc6[_0x953f('0x3e')]=_[_0x953f('0x3b')](_0x4239ef['model'],qs['fields'](_0xb6a4aa[_0x953f('0x39')][_0x953f('0x3d')]));_0x430cc6[_0x953f('0x3e')]=_0x430cc6[_0x953f('0x3e')][_0x953f('0x3f')]?_0x430cc6[_0x953f('0x3e')]:_0x4239ef['model'];if(_0xb6a4aa[_0x953f('0x39')][_0x953f('0x4a')]){_0x430cc6[_0x953f('0x4b')]=[{'all':!![]}];}_0x430cc6=_[_0x953f('0x46')]({},_0x430cc6,_0xb6a4aa[_0x953f('0x49')]);return db['Setting'][_0x953f('0x50')](_0x430cc6)[_0x953f('0x1c')](handleEntityNotFound(_0x102c9a,null))['then'](respondWithResult(_0x102c9a,null))[_0x953f('0x4e')](handleError(_0x102c9a,null));};exports[_0x953f('0x2f')]=function(_0x5307ee,_0x3f03d7){if(_0x5307ee[_0x953f('0x51')]['id']){delete _0x5307ee[_0x953f('0x51')]['id'];}return db[_0x953f('0x35')]['find']({'where':{'id':_0x5307ee[_0x953f('0x52')]['id']}})[_0x953f('0x1c')](handleEntityNotFound(_0x3f03d7,null))['then'](saveUpdates(_0x5307ee[_0x953f('0x51')],null))[_0x953f('0x1c')](respondWithResult(_0x3f03d7,null))[_0x953f('0x4e')](handleError(_0x3f03d7,null));};exports['addLogo']=function(_0x3907e7,_0xbad53f,_0x140472){if(_0x3907e7['file']&&_0x3907e7[_0x953f('0x53')][_0x953f('0x54')]){_0x3907e7[_0x953f('0x51')][_0x953f('0x55')]=_0x3907e7[_0x953f('0x53')][_0x953f('0x54')];}return db[_0x953f('0x35')][_0x953f('0x50')]({'where':{'id':_0x3907e7['params']['id']}})[_0x953f('0x1c')](handleEntityNotFound(_0xbad53f,null))[_0x953f('0x1c')](saveUpdates(_0x3907e7[_0x953f('0x51')],null))[_0x953f('0x1c')](respondWithResult(_0xbad53f,null))[_0x953f('0x4e')](handleError(_0xbad53f,null));};exports[_0x953f('0x56')]=function(_0x44357e,_0xb1a540,_0x1b439d){if(_0x44357e['file']&&_0x44357e[_0x953f('0x53')]['filename']){_0x44357e[_0x953f('0x51')][_0x953f('0x57')]=_0x44357e[_0x953f('0x53')][_0x953f('0x54')];}return db[_0x953f('0x35')]['find']({'where':{'id':_0x44357e['params']['id']}})[_0x953f('0x1c')](handleEntityNotFound(_0xb1a540,null))[_0x953f('0x1c')](saveUpdates(_0x44357e['body'],null))['then'](respondWithResult(_0xb1a540,null))[_0x953f('0x4e')](handleError(_0xb1a540,null));};var utilLicense=require(_0x953f('0x17'));exports['getLogo']=function(_0x548448,_0x35d429,_0x12f829){var _0x5f135c=_0x953f('0x58');var _0x8cecd3={'custom':![]};return utilLicense['getLicense']()[_0x953f('0x1c')](function(_0x2d0526){if(_0x2d0526){_0x8cecd3=_0x2d0526;}return db[_0x953f('0x35')][_0x953f('0x50')]({'where':{'id':_0x548448[_0x953f('0x52')]['id']},'attributes':[_0x953f('0x55'),'loginLogo',_0x953f('0x59'),'favicon',_0x953f('0x5a'),_0x953f('0x5b'),'defaultPreferred',_0x953f('0x5c')],'raw':!![]});})[_0x953f('0x1c')](handleEntityNotFound(_0x35d429,null))[_0x953f('0x1c')](function(_0x5b33fa){if(_0x5b33fa){var _0x58c699=_0x5b33fa['logo']&&fs[_0x953f('0x5d')](path[_0x953f('0x5e')](config[_0x953f('0x5f')],_0x5f135c,_[_0x953f('0x60')](_0x5b33fa[_0x953f('0x55')])))?path['join'](config[_0x953f('0x5f')],_0x5f135c,_['toLower'](_0x5b33fa[_0x953f('0x55')])):path[_0x953f('0x5e')](config[_0x953f('0x5f')],_0x5f135c,_[_0x953f('0x60')](_0x953f('0x61')));var _0x8787a3=_0x953f('0x62')+_['upperFirst'](_0x953f('0x55'));if(_0x5b33fa[_0x8787a3]||!_0x8cecd3[_0x953f('0x63')]){_0x58c699=path['join'](config['root'],_0x5f135c,_[_0x953f('0x60')](_0x953f('0x61')));}if(!fs[_0x953f('0x5d')](_0x58c699)){throw new db[(_0x953f('0x64'))][(_0x953f('0x65'))](_[_0x953f('0x66')](_0x953f('0x55'))+_0x953f('0x67'));}return _0x35d429[_0x953f('0x68')](_0x58c699);}})[_0x953f('0x4e')](handleError(_0x35d429,null));};var utilLicense=require('../../config/license/util');exports[_0x953f('0x69')]=function(_0x22b37d,_0x1cc7ed,_0x54a49a){var _0x38f967=_0x953f('0x58');var _0x3b8e41={'custom':![]};return utilLicense['getLicense']()[_0x953f('0x1c')](function(_0x5198c9){if(_0x5198c9){_0x3b8e41=_0x5198c9;}return db[_0x953f('0x35')]['find']({'where':{'id':_0x22b37d['params']['id']},'attributes':[_0x953f('0x55'),_0x953f('0x57'),_0x953f('0x59'),_0x953f('0x6a'),'defaultLogo',_0x953f('0x5b'),'defaultPreferred','defaultFavicon'],'raw':!![]});})['then'](handleEntityNotFound(_0x1cc7ed,null))[_0x953f('0x1c')](function(_0x1995c7){if(_0x1995c7){var _0x46019a=_0x1995c7['loginLogo']&&fs[_0x953f('0x5d')](path['join'](config[_0x953f('0x5f')],_0x38f967,_[_0x953f('0x60')](_0x1995c7[_0x953f('0x57')])))?path['join'](config[_0x953f('0x5f')],_0x38f967,_[_0x953f('0x60')](_0x1995c7[_0x953f('0x57')])):path['join'](config[_0x953f('0x5f')],_0x38f967,_[_0x953f('0x60')](_0x953f('0x6b')));var _0x13e1c4=_0x953f('0x62')+_['upperFirst'](_0x953f('0x57'));if(_0x1995c7[_0x13e1c4]||!_0x3b8e41[_0x953f('0x63')]){_0x46019a=path['join'](config[_0x953f('0x5f')],_0x38f967,_[_0x953f('0x60')]('default_loginLogo.svg'));}if(!fs[_0x953f('0x5d')](_0x46019a)){throw new db['Sequelize'][(_0x953f('0x65'))](_[_0x953f('0x66')](_0x953f('0x57'))+_0x953f('0x67'));}return _0x1cc7ed[_0x953f('0x68')](_0x46019a);}})['catch'](handleError(_0x1cc7ed,null));};exports[_0x953f('0x6c')]=function(_0x586d03,_0x181d25){return db[_0x953f('0x35')][_0x953f('0x50')]({'where':{'id':_0x586d03['params']['id']},'attributes':['securePassword']})[_0x953f('0x1c')](respondWithResult(_0x181d25,null))[_0x953f('0x4e')](handleError(_0x181d25,null));};exports[_0x953f('0x6d')]=function(_0x552ad5,_0x1c80ef,_0x46501d){if(_0x552ad5[_0x953f('0x53')]&&_0x552ad5['file'][_0x953f('0x54')]){_0x552ad5[_0x953f('0x51')][_0x953f('0x59')]=_0x552ad5[_0x953f('0x53')][_0x953f('0x54')];}return db[_0x953f('0x35')][_0x953f('0x50')]({'where':{'id':_0x552ad5[_0x953f('0x52')]['id']}})[_0x953f('0x1c')](handleEntityNotFound(_0x1c80ef,null))['then'](saveUpdates(_0x552ad5[_0x953f('0x51')],null))[_0x953f('0x1c')](respondWithResult(_0x1c80ef,null))['catch'](handleError(_0x1c80ef,null));};var utilLicense=require('../../config/license/util');exports['getPreferred']=function(_0x2fa40a,_0x2a373f,_0x205c28){var _0x4c4a80=_0x953f('0x58');var _0x18f40d={'custom':![]};return utilLicense[_0x953f('0x6e')]()['then'](function(_0xbaf233){if(_0xbaf233){_0x18f40d=_0xbaf233;}return db[_0x953f('0x35')]['find']({'where':{'id':_0x2fa40a[_0x953f('0x52')]['id']},'attributes':[_0x953f('0x55'),_0x953f('0x57'),_0x953f('0x59'),_0x953f('0x6a'),_0x953f('0x5a'),_0x953f('0x5b'),_0x953f('0x6f'),_0x953f('0x5c')],'raw':!![]});})[_0x953f('0x1c')](handleEntityNotFound(_0x2a373f,null))['then'](function(_0x21b22d){if(_0x21b22d){var _0x10ff7d=_0x21b22d['preferred']&&fs[_0x953f('0x5d')](path[_0x953f('0x5e')](config['root'],_0x4c4a80,_[_0x953f('0x60')](_0x21b22d[_0x953f('0x59')])))?path[_0x953f('0x5e')](config[_0x953f('0x5f')],_0x4c4a80,_['toLower'](_0x21b22d[_0x953f('0x59')])):path[_0x953f('0x5e')](config['root'],_0x4c4a80,_[_0x953f('0x60')](_0x953f('0x70')));var _0x238ced=_0x953f('0x62')+_[_0x953f('0x66')](_0x953f('0x59'));if(_0x21b22d[_0x238ced]||!_0x18f40d[_0x953f('0x63')]||!_0x18f40d[_0x953f('0x59')]){_0x10ff7d=path['join'](config['root'],_0x4c4a80,_[_0x953f('0x60')]('default_preferred.png'));}if(!fs[_0x953f('0x5d')](_0x10ff7d)){throw new db[(_0x953f('0x64'))][(_0x953f('0x65'))](_[_0x953f('0x66')](_0x953f('0x59'))+_0x953f('0x67'));}return _0x2a373f[_0x953f('0x68')](_0x10ff7d);}})[_0x953f('0x4e')](handleError(_0x2a373f,null));};exports['addFavicon']=function(_0x5b33d8,_0x173bcd,_0x4a212f){if(_0x5b33d8[_0x953f('0x53')]&&_0x5b33d8[_0x953f('0x53')][_0x953f('0x54')]){_0x5b33d8[_0x953f('0x51')][_0x953f('0x6a')]=_0x5b33d8[_0x953f('0x53')][_0x953f('0x54')];}return db[_0x953f('0x35')]['find']({'where':{'id':_0x5b33d8[_0x953f('0x52')]['id']}})[_0x953f('0x1c')](handleEntityNotFound(_0x173bcd,null))['then'](saveUpdates(_0x5b33d8[_0x953f('0x51')],null))[_0x953f('0x1c')](respondWithResult(_0x173bcd,null))['catch'](handleError(_0x173bcd,null));};var utilLicense=require(_0x953f('0x17'));exports[_0x953f('0x71')]=function(_0x5bfd6b,_0x4a6c1d,_0x3d4932){var _0x496ef3='server/files/images/logos';var _0x58c94d={'custom':![]};return utilLicense[_0x953f('0x6e')]()[_0x953f('0x1c')](function(_0x10ef11){if(_0x10ef11){_0x58c94d=_0x10ef11;}return db['Setting'][_0x953f('0x50')]({'where':{'id':_0x5bfd6b[_0x953f('0x52')]['id']},'attributes':['logo','loginLogo',_0x953f('0x59'),_0x953f('0x6a'),'defaultLogo',_0x953f('0x5b'),_0x953f('0x6f'),_0x953f('0x5c')],'raw':!![]});})[_0x953f('0x1c')](handleEntityNotFound(_0x4a6c1d,null))[_0x953f('0x1c')](function(_0x223193){if(_0x223193){var _0x291720=_0x223193[_0x953f('0x6a')]&&fs[_0x953f('0x5d')](path[_0x953f('0x5e')](config[_0x953f('0x5f')],_0x496ef3,_[_0x953f('0x60')](_0x223193['favicon'])))?path[_0x953f('0x5e')](config[_0x953f('0x5f')],_0x496ef3,_[_0x953f('0x60')](_0x223193[_0x953f('0x6a')])):path[_0x953f('0x5e')](config['root'],_0x496ef3,_[_0x953f('0x60')](_0x953f('0x72')));var _0x4069eb=_0x953f('0x62')+_[_0x953f('0x66')](_0x953f('0x6a'));if(_0x223193[_0x4069eb]||!_0x58c94d[_0x953f('0x63')]){_0x291720=path[_0x953f('0x5e')](config[_0x953f('0x5f')],_0x496ef3,_[_0x953f('0x60')]('default_favicon.ico'));}if(!fs[_0x953f('0x5d')](_0x291720)){throw new db['Sequelize'][(_0x953f('0x65'))](_[_0x953f('0x66')](_0x953f('0x6a'))+_0x953f('0x67'));}return _0x4a6c1d['download'](_0x291720);}})['catch'](handleError(_0x4a6c1d,null));};exports['getDate']=function(_0x37497b,_0x2d729f){var _0x11863e={'offset':moment()[_0x953f('0x73')]()};_0x11863e[_0x953f('0x74')]=moment()[_0x953f('0x73')](_0x11863e['offset'])[_0x953f('0x75')]('YYYY-MM-DD\x20HH:mm:ss:SSS');return _0x2d729f[_0x953f('0x2a')](0xc8)[_0x953f('0x33')](_0x11863e);};
\ No newline at end of file
+var _0x8654=['querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','client','http','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','map','Setting','rawAttributes','fieldName','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','VIRTUAL','options','count','includeAll','findAll','rows','catch','params','include','find','body','addLogo','file','filename','logo','addLogoLogin','loginLogo','getLogo','server/files/images/logos','getLicense','preferred','favicon','defaultLogo','defaultLoginLogo','defaultPreferred','existsSync','join','root','toLower','default_logo.svg','default','upperFirst','custom','Sequelize','ValidationError','\x20not\x20found','download','getLogoLogin','defaultFavicon','default_loginLogo.svg','gdpr','securePassword','addPreferred','../../config/license/util','getPreferred','default_preferred.png','addFavicon','getFavicon','default_favicon.ico','utcOffset','YYYY-MM-DD\x20HH:mm:ss:SSS','zip-dir','request-promise','moment','bluebird','util','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js'];(function(_0x5a92ad,_0x2219a6){var _0x2466f8=function(_0x4ad04e){while(--_0x4ad04e){_0x5a92ad['push'](_0x5a92ad['shift']());}};_0x2466f8(++_0x2219a6);}(_0x8654,0xe8));var _0x4865=function(_0x19440d,_0x20f6ef){_0x19440d=_0x19440d-0x0;var _0x7d4355=_0x8654[_0x19440d];return _0x7d4355;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x4865('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4865('0x1'));var moment=require(_0x4865('0x2'));var BPromise=require(_0x4865('0x3'));var Mustache=require('mustache');var util=require(_0x4865('0x4'));var path=require('path');var sox=require('sox');var csv=require(_0x4865('0x5'));var ejs=require(_0x4865('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4865('0x7'));var squel=require(_0x4865('0x8'));var crypto=require(_0x4865('0x9'));var jsforce=require(_0x4865('0xa'));var deskjs=require(_0x4865('0xb'));var toCsv=require('to-csv');var querystring=require(_0x4865('0xc'));var Papa=require(_0x4865('0xd'));var Redis=require('ioredis');var authService=require(_0x4865('0xe'));var qs=require(_0x4865('0xf'));var as=require(_0x4865('0x10'));var hardwareService=require(_0x4865('0x11'));var logger=require('../../config/logger')(_0x4865('0x12'));var utils=require(_0x4865('0x13'));var config=require(_0x4865('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x4865('0x15'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x4865('0x16')][_0x4865('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x2d3195,_0x15f0a2,_0xe3f348,_0x318418){return new BPromise(function(_0x2a998d,_0x131dad){var _0x109503=_0x318418||client;return _0x109503[_0x4865('0x18')](_0x2d3195,_0xe3f348)[_0x4865('0x19')](function(_0x53fae4){logger[_0x4865('0x1a')](_0x4865('0x1b'),_0x15f0a2,_0x4865('0x1c'));logger[_0x4865('0x1d')]('Setting,\x20%s,\x20%s,\x20%s',_0x15f0a2,'request\x20sent',JSON[_0x4865('0x1e')](_0x53fae4));if(_0x53fae4[_0x4865('0x1f')]){if(_0x53fae4['error']['code']===0x1f4){logger[_0x4865('0x1f')](_0x4865('0x1b'),_0x15f0a2,_0x53fae4[_0x4865('0x1f')]['message']);return _0x131dad(_0x53fae4[_0x4865('0x1f')][_0x4865('0x20')]);}logger['error'](_0x4865('0x1b'),_0x15f0a2,_0x53fae4['error'][_0x4865('0x20')]);return _0x2a998d(_0x53fae4[_0x4865('0x1f')][_0x4865('0x20')]);}else{logger['info']('Setting,\x20%s,\x20%s',_0x15f0a2,'request\x20sent');_0x2a998d(_0x53fae4[_0x4865('0x21')]['message']);}})['catch'](function(_0x299284){logger[_0x4865('0x1f')](_0x4865('0x1b'),_0x15f0a2,_0x299284);_0x131dad(_0x299284);});});}function respondWithStatusCode(_0x45432f,_0x9f1c30){_0x9f1c30=_0x9f1c30||0xcc;return function(_0xec88e5){if(_0xec88e5){return _0x45432f[_0x4865('0x22')](_0x9f1c30);}return _0x45432f[_0x4865('0x23')](_0x9f1c30)[_0x4865('0x24')]();};}function respondWithResult(_0x14f0ee,_0x3e2c03){_0x3e2c03=_0x3e2c03||0xc8;return function(_0x3e61ee){if(_0x3e61ee){return _0x14f0ee['status'](_0x3e2c03)[_0x4865('0x25')](_0x3e61ee);}};}function respondWithFilteredResult(_0x1af98f,_0x3e350a){return function(_0x3f003d){if(_0x3f003d){var _0xa590a=typeof _0x3e350a[_0x4865('0x26')]===_0x4865('0x27')&&typeof _0x3e350a['limit']===_0x4865('0x27');var _0x56f359=_0x3f003d['count'];var _0x304c74=_0xa590a?0x0:_0x3e350a[_0x4865('0x26')];var _0x4a5e89=_0xa590a?_0x3f003d['count']:_0x3e350a['offset']+_0x3e350a[_0x4865('0x28')];var _0x56ba52;if(_0x4a5e89>=_0x56f359){_0x4a5e89=_0x56f359;_0x56ba52=0xc8;}else{_0x56ba52=0xce;}_0x1af98f[_0x4865('0x23')](_0x56ba52);return _0x1af98f[_0x4865('0x29')](_0x4865('0x2a'),_0x304c74+'-'+_0x4a5e89+'/'+_0x56f359)[_0x4865('0x25')](_0x3f003d);}return null;};}function patchUpdates(_0x5c3bfb){return function(_0x28058f){try{jsonpatch[_0x4865('0x2b')](_0x28058f,_0x5c3bfb,!![]);}catch(_0x13bade){return BPromise[_0x4865('0x2c')](_0x13bade);}return _0x28058f[_0x4865('0x2d')]();};}function saveUpdates(_0x3086ae,_0x102d6a){return function(_0x5713cf){if(_0x5713cf){return _0x5713cf[_0x4865('0x2e')](_0x3086ae)[_0x4865('0x19')](function(_0x22df37){return _0x22df37;});}return null;};}function removeEntity(_0xfaa50f,_0x151184){return function(_0x249788){if(_0x249788){return _0x249788[_0x4865('0x2f')]()['then'](function(){_0xfaa50f['status'](0xcc)[_0x4865('0x24')]();});}};}function handleEntityNotFound(_0x49a051,_0x3caa00){return function(_0x4d50d6){if(!_0x4d50d6){_0x49a051[_0x4865('0x22')](0x194);}return _0x4d50d6;};}function handleError(_0x2f70df,_0x24353f){_0x24353f=_0x24353f||0x1f4;return function(_0x2f1950){logger['error'](_0x2f1950[_0x4865('0x30')]);if(_0x2f1950[_0x4865('0x31')]){delete _0x2f1950[_0x4865('0x31')];}_0x2f70df[_0x4865('0x23')](_0x24353f)[_0x4865('0x32')](_0x2f1950);};}exports[_0x4865('0x33')]=function(_0x370cb9,_0x3153bf){var _0x10e63e={},_0x460235={},_0x1d3cdf={'count':0x0,'rows':[]};var _0x23ea2b=_[_0x4865('0x34')](db[_0x4865('0x35')][_0x4865('0x36')],function(_0x3aac81){return{'name':_0x3aac81[_0x4865('0x37')],'type':_0x3aac81['type']['key']};});_0x460235[_0x4865('0x38')]=_[_0x4865('0x34')](_0x23ea2b,_0x4865('0x31'));_0x460235[_0x4865('0x39')]=_[_0x4865('0x3a')](_0x370cb9[_0x4865('0x39')]);_0x460235['filters']=_[_0x4865('0x3b')](_0x460235[_0x4865('0x38')],_0x460235[_0x4865('0x39')]);_0x10e63e['attributes']=_['intersection'](_0x460235[_0x4865('0x38')],qs[_0x4865('0x3c')](_0x370cb9['query'][_0x4865('0x3c')]));_0x10e63e[_0x4865('0x3d')]=_0x10e63e[_0x4865('0x3d')][_0x4865('0x3e')]?_0x10e63e[_0x4865('0x3d')]:_0x460235[_0x4865('0x38')];if(!_0x370cb9[_0x4865('0x39')][_0x4865('0x3f')](_0x4865('0x40'))){_0x10e63e[_0x4865('0x28')]=qs['limit'](_0x370cb9['query'][_0x4865('0x28')]);_0x10e63e['offset']=qs[_0x4865('0x26')](_0x370cb9['query']['offset']);}_0x10e63e[_0x4865('0x41')]=qs[_0x4865('0x42')](_0x370cb9[_0x4865('0x39')][_0x4865('0x42')]);_0x10e63e[_0x4865('0x43')]=qs[_0x4865('0x44')](_[_0x4865('0x45')](_0x370cb9[_0x4865('0x39')],_0x460235['filters']),_0x23ea2b);if(_0x370cb9['query'][_0x4865('0x46')]){_0x10e63e[_0x4865('0x43')]=_['merge'](_0x10e63e[_0x4865('0x43')],{'$or':_[_0x4865('0x34')](_0x23ea2b,function(_0x19b5d1){if(_0x19b5d1['type']!==_0x4865('0x47')){var _0x34f99c={};_0x34f99c[_0x19b5d1[_0x4865('0x31')]]={'$like':'%'+_0x370cb9[_0x4865('0x39')][_0x4865('0x46')]+'%'};return _0x34f99c;}})});}_0x10e63e=_['merge']({},_0x10e63e,_0x370cb9[_0x4865('0x48')]);var _0x2f6210={'where':_0x10e63e['where']};return db[_0x4865('0x35')][_0x4865('0x49')](_0x2f6210)[_0x4865('0x19')](function(_0x45f6db){_0x1d3cdf[_0x4865('0x49')]=_0x45f6db;if(_0x370cb9[_0x4865('0x39')][_0x4865('0x4a')]){_0x10e63e['include']=[{'all':!![]}];}return db[_0x4865('0x35')][_0x4865('0x4b')](_0x10e63e);})['then'](function(_0x46159c){_0x1d3cdf[_0x4865('0x4c')]=_0x46159c;return _0x1d3cdf;})['then'](respondWithFilteredResult(_0x3153bf,_0x10e63e))[_0x4865('0x4d')](handleError(_0x3153bf,null));};exports['show']=function(_0x109524,_0xfe8289){var _0x7a7c23={'raw':![],'where':{'id':_0x109524[_0x4865('0x4e')]['id']}},_0x377644={};_0x377644['model']=_[_0x4865('0x3a')](db[_0x4865('0x35')]['rawAttributes']);_0x377644['query']=_[_0x4865('0x3a')](_0x109524[_0x4865('0x39')]);_0x377644['filters']=_[_0x4865('0x3b')](_0x377644[_0x4865('0x38')],_0x377644['query']);_0x7a7c23[_0x4865('0x3d')]=_['intersection'](_0x377644[_0x4865('0x38')],qs[_0x4865('0x3c')](_0x109524['query'][_0x4865('0x3c')]));_0x7a7c23['attributes']=_0x7a7c23['attributes']['length']?_0x7a7c23[_0x4865('0x3d')]:_0x377644[_0x4865('0x38')];if(_0x109524[_0x4865('0x39')][_0x4865('0x4a')]){_0x7a7c23[_0x4865('0x4f')]=[{'all':!![]}];}_0x7a7c23=_['merge']({},_0x7a7c23,_0x109524[_0x4865('0x48')]);return db['Setting'][_0x4865('0x50')](_0x7a7c23)[_0x4865('0x19')](handleEntityNotFound(_0xfe8289,null))[_0x4865('0x19')](respondWithResult(_0xfe8289,null))['catch'](handleError(_0xfe8289,null));};exports[_0x4865('0x2e')]=function(_0x21fe75,_0x26d185){if(_0x21fe75['body']['id']){delete _0x21fe75[_0x4865('0x51')]['id'];}return db['Setting']['find']({'where':{'id':_0x21fe75[_0x4865('0x4e')]['id']}})[_0x4865('0x19')](handleEntityNotFound(_0x26d185,null))[_0x4865('0x19')](saveUpdates(_0x21fe75[_0x4865('0x51')],null))[_0x4865('0x19')](respondWithResult(_0x26d185,null))[_0x4865('0x4d')](handleError(_0x26d185,null));};exports[_0x4865('0x52')]=function(_0x411d98,_0x3a789d,_0x5262a3){if(_0x411d98[_0x4865('0x53')]&&_0x411d98['file'][_0x4865('0x54')]){_0x411d98[_0x4865('0x51')][_0x4865('0x55')]=_0x411d98[_0x4865('0x53')][_0x4865('0x54')];}return db[_0x4865('0x35')][_0x4865('0x50')]({'where':{'id':_0x411d98[_0x4865('0x4e')]['id']}})[_0x4865('0x19')](handleEntityNotFound(_0x3a789d,null))[_0x4865('0x19')](saveUpdates(_0x411d98[_0x4865('0x51')],null))[_0x4865('0x19')](respondWithResult(_0x3a789d,null))[_0x4865('0x4d')](handleError(_0x3a789d,null));};exports[_0x4865('0x56')]=function(_0x111566,_0x53a676,_0x1362f2){if(_0x111566[_0x4865('0x53')]&&_0x111566[_0x4865('0x53')][_0x4865('0x54')]){_0x111566[_0x4865('0x51')][_0x4865('0x57')]=_0x111566[_0x4865('0x53')]['filename'];}return db[_0x4865('0x35')][_0x4865('0x50')]({'where':{'id':_0x111566[_0x4865('0x4e')]['id']}})[_0x4865('0x19')](handleEntityNotFound(_0x53a676,null))['then'](saveUpdates(_0x111566['body'],null))[_0x4865('0x19')](respondWithResult(_0x53a676,null))[_0x4865('0x4d')](handleError(_0x53a676,null));};var utilLicense=require('../../config/license/util');exports[_0x4865('0x58')]=function(_0x363641,_0x5a5406,_0x2d919c){var _0x3be31a=_0x4865('0x59');var _0x5b2048={'custom':![]};return utilLicense[_0x4865('0x5a')]()[_0x4865('0x19')](function(_0x19088a){if(_0x19088a){_0x5b2048=_0x19088a;}return db[_0x4865('0x35')][_0x4865('0x50')]({'where':{'id':_0x363641[_0x4865('0x4e')]['id']},'attributes':['logo',_0x4865('0x57'),_0x4865('0x5b'),_0x4865('0x5c'),_0x4865('0x5d'),_0x4865('0x5e'),_0x4865('0x5f'),'defaultFavicon'],'raw':!![]});})[_0x4865('0x19')](handleEntityNotFound(_0x5a5406,null))['then'](function(_0x2f9933){if(_0x2f9933){var _0x5c279d=_0x2f9933[_0x4865('0x55')]&&fs[_0x4865('0x60')](path[_0x4865('0x61')](config[_0x4865('0x62')],_0x3be31a,_['toLower'](_0x2f9933[_0x4865('0x55')])))?path[_0x4865('0x61')](config[_0x4865('0x62')],_0x3be31a,_[_0x4865('0x63')](_0x2f9933[_0x4865('0x55')])):path['join'](config[_0x4865('0x62')],_0x3be31a,_[_0x4865('0x63')](_0x4865('0x64')));var _0x43ab92=_0x4865('0x65')+_[_0x4865('0x66')](_0x4865('0x55'));if(_0x2f9933[_0x43ab92]||!_0x5b2048[_0x4865('0x67')]){_0x5c279d=path[_0x4865('0x61')](config['root'],_0x3be31a,_[_0x4865('0x63')](_0x4865('0x64')));}if(!fs[_0x4865('0x60')](_0x5c279d)){throw new db[(_0x4865('0x68'))][(_0x4865('0x69'))](_[_0x4865('0x66')](_0x4865('0x55'))+_0x4865('0x6a'));}return _0x5a5406[_0x4865('0x6b')](_0x5c279d);}})[_0x4865('0x4d')](handleError(_0x5a5406,null));};var utilLicense=require('../../config/license/util');exports[_0x4865('0x6c')]=function(_0x47ff1e,_0x15d262,_0x325290){var _0x4901af=_0x4865('0x59');var _0x30359b={'custom':![]};return utilLicense[_0x4865('0x5a')]()['then'](function(_0x3f314f){if(_0x3f314f){_0x30359b=_0x3f314f;}return db[_0x4865('0x35')]['find']({'where':{'id':_0x47ff1e[_0x4865('0x4e')]['id']},'attributes':[_0x4865('0x55'),'loginLogo',_0x4865('0x5b'),_0x4865('0x5c'),'defaultLogo',_0x4865('0x5e'),_0x4865('0x5f'),_0x4865('0x6d')],'raw':!![]});})[_0x4865('0x19')](handleEntityNotFound(_0x15d262,null))[_0x4865('0x19')](function(_0x1a15a5){if(_0x1a15a5){var _0x278c27=_0x1a15a5[_0x4865('0x57')]&&fs[_0x4865('0x60')](path[_0x4865('0x61')](config[_0x4865('0x62')],_0x4901af,_[_0x4865('0x63')](_0x1a15a5[_0x4865('0x57')])))?path[_0x4865('0x61')](config[_0x4865('0x62')],_0x4901af,_['toLower'](_0x1a15a5[_0x4865('0x57')])):path[_0x4865('0x61')](config['root'],_0x4901af,_[_0x4865('0x63')](_0x4865('0x6e')));var _0x2a68b6=_0x4865('0x65')+_[_0x4865('0x66')]('loginLogo');if(_0x1a15a5[_0x2a68b6]||!_0x30359b[_0x4865('0x67')]){_0x278c27=path[_0x4865('0x61')](config[_0x4865('0x62')],_0x4901af,_[_0x4865('0x63')]('default_loginLogo.svg'));}if(!fs['existsSync'](_0x278c27)){throw new db[(_0x4865('0x68'))][(_0x4865('0x69'))](_[_0x4865('0x66')](_0x4865('0x57'))+_0x4865('0x6a'));}return _0x15d262[_0x4865('0x6b')](_0x278c27);}})['catch'](handleError(_0x15d262,null));};exports[_0x4865('0x6f')]=function(_0x1718c1,_0x2c78ff){return db[_0x4865('0x35')][_0x4865('0x50')]({'where':{'id':_0x1718c1[_0x4865('0x4e')]['id']},'attributes':[_0x4865('0x70')]})['then'](respondWithResult(_0x2c78ff,null))[_0x4865('0x4d')](handleError(_0x2c78ff,null));};exports[_0x4865('0x71')]=function(_0x34dde6,_0x456c3f,_0x14beec){if(_0x34dde6[_0x4865('0x53')]&&_0x34dde6[_0x4865('0x53')][_0x4865('0x54')]){_0x34dde6['body'][_0x4865('0x5b')]=_0x34dde6[_0x4865('0x53')][_0x4865('0x54')];}return db[_0x4865('0x35')][_0x4865('0x50')]({'where':{'id':_0x34dde6[_0x4865('0x4e')]['id']}})['then'](handleEntityNotFound(_0x456c3f,null))['then'](saveUpdates(_0x34dde6[_0x4865('0x51')],null))[_0x4865('0x19')](respondWithResult(_0x456c3f,null))[_0x4865('0x4d')](handleError(_0x456c3f,null));};var utilLicense=require(_0x4865('0x72'));exports[_0x4865('0x73')]=function(_0x8bce85,_0x3d4602,_0x40ed71){var _0xc0d5b6=_0x4865('0x59');var _0x550ef6={'custom':![]};return utilLicense[_0x4865('0x5a')]()['then'](function(_0x16eb8a){if(_0x16eb8a){_0x550ef6=_0x16eb8a;}return db[_0x4865('0x35')][_0x4865('0x50')]({'where':{'id':_0x8bce85['params']['id']},'attributes':[_0x4865('0x55'),_0x4865('0x57'),_0x4865('0x5b'),_0x4865('0x5c'),'defaultLogo',_0x4865('0x5e'),'defaultPreferred',_0x4865('0x6d')],'raw':!![]});})['then'](handleEntityNotFound(_0x3d4602,null))[_0x4865('0x19')](function(_0x51058a){if(_0x51058a){var _0x4cb296=_0x51058a['preferred']&&fs['existsSync'](path['join'](config['root'],_0xc0d5b6,_['toLower'](_0x51058a['preferred'])))?path['join'](config[_0x4865('0x62')],_0xc0d5b6,_[_0x4865('0x63')](_0x51058a[_0x4865('0x5b')])):path[_0x4865('0x61')](config[_0x4865('0x62')],_0xc0d5b6,_[_0x4865('0x63')](_0x4865('0x74')));var _0x1eecf4=_0x4865('0x65')+_['upperFirst']('preferred');if(_0x51058a[_0x1eecf4]||!_0x550ef6[_0x4865('0x67')]||!_0x550ef6[_0x4865('0x5b')]){_0x4cb296=path['join'](config[_0x4865('0x62')],_0xc0d5b6,_[_0x4865('0x63')]('default_preferred.png'));}if(!fs['existsSync'](_0x4cb296)){throw new db['Sequelize'][(_0x4865('0x69'))](_[_0x4865('0x66')](_0x4865('0x5b'))+_0x4865('0x6a'));}return _0x3d4602[_0x4865('0x6b')](_0x4cb296);}})[_0x4865('0x4d')](handleError(_0x3d4602,null));};exports[_0x4865('0x75')]=function(_0xd9f54,_0x1d7039,_0x2760ea){if(_0xd9f54[_0x4865('0x53')]&&_0xd9f54[_0x4865('0x53')][_0x4865('0x54')]){_0xd9f54[_0x4865('0x51')][_0x4865('0x5c')]=_0xd9f54[_0x4865('0x53')]['filename'];}return db[_0x4865('0x35')][_0x4865('0x50')]({'where':{'id':_0xd9f54[_0x4865('0x4e')]['id']}})[_0x4865('0x19')](handleEntityNotFound(_0x1d7039,null))[_0x4865('0x19')](saveUpdates(_0xd9f54[_0x4865('0x51')],null))[_0x4865('0x19')](respondWithResult(_0x1d7039,null))[_0x4865('0x4d')](handleError(_0x1d7039,null));};var utilLicense=require('../../config/license/util');exports[_0x4865('0x76')]=function(_0x4ca916,_0x3a3d18,_0x93c111){var _0x4e14ce=_0x4865('0x59');var _0x55e619={'custom':![]};return utilLicense[_0x4865('0x5a')]()[_0x4865('0x19')](function(_0x4fa2b6){if(_0x4fa2b6){_0x55e619=_0x4fa2b6;}return db['Setting'][_0x4865('0x50')]({'where':{'id':_0x4ca916[_0x4865('0x4e')]['id']},'attributes':[_0x4865('0x55'),'loginLogo',_0x4865('0x5b'),_0x4865('0x5c'),_0x4865('0x5d'),_0x4865('0x5e'),_0x4865('0x5f'),_0x4865('0x6d')],'raw':!![]});})[_0x4865('0x19')](handleEntityNotFound(_0x3a3d18,null))[_0x4865('0x19')](function(_0x3df504){if(_0x3df504){var _0x5be42b=_0x3df504['favicon']&&fs['existsSync'](path[_0x4865('0x61')](config[_0x4865('0x62')],_0x4e14ce,_[_0x4865('0x63')](_0x3df504[_0x4865('0x5c')])))?path[_0x4865('0x61')](config[_0x4865('0x62')],_0x4e14ce,_[_0x4865('0x63')](_0x3df504[_0x4865('0x5c')])):path[_0x4865('0x61')](config[_0x4865('0x62')],_0x4e14ce,_[_0x4865('0x63')](_0x4865('0x77')));var _0x141beb=_0x4865('0x65')+_['upperFirst'](_0x4865('0x5c'));if(_0x3df504[_0x141beb]||!_0x55e619[_0x4865('0x67')]){_0x5be42b=path[_0x4865('0x61')](config['root'],_0x4e14ce,_['toLower'](_0x4865('0x77')));}if(!fs[_0x4865('0x60')](_0x5be42b)){throw new db[(_0x4865('0x68'))][(_0x4865('0x69'))](_['upperFirst'](_0x4865('0x5c'))+_0x4865('0x6a'));}return _0x3a3d18[_0x4865('0x6b')](_0x5be42b);}})[_0x4865('0x4d')](handleError(_0x3a3d18,null));};exports['getDate']=function(_0x46099c,_0x24d274){var _0xd64563={'offset':moment()[_0x4865('0x78')]()};_0xd64563['now']=moment()['utcOffset'](_0xd64563[_0x4865('0x26')])['format'](_0x4865('0x79'));return _0x24d274[_0x4865('0x23')](0xc8)['send'](_0xd64563);};
\ No newline at end of file