// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1326=['destroy','then','get','Pauses','UserProfileResource','end','error','stack','name','send','map','Pause','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','limit','order','sort','where','pick','filter','VIRTUAL','count','include','findAll','rows','catch','params','includeAll','options','find','create','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','set','Content-Range','reject','save','update'];(function(_0x141cdc,_0xa038e9){var _0x2d7d88=function(_0x5d161f){while(--_0x5d161f){_0x141cdc['push'](_0x141cdc['shift']());}};_0x2d7d88(++_0xa038e9);}(_0x1326,0xdd));var _0x6132=function(_0x4eec9b,_0x4aea09){_0x4eec9b=_0x4eec9b-0x0;var _0x2e3849=_0x1326[_0x4eec9b];return _0x2e3849;};'use strict';var pdf=require(_0x6132('0x0'));var emlformat=require(_0x6132('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x6132('0x2'));var jsonpatch=require(_0x6132('0x3'));var rp=require(_0x6132('0x4'));var moment=require(_0x6132('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x6132('0x6'));var util=require(_0x6132('0x7'));var path=require('path');var sox=require(_0x6132('0x8'));var csv=require(_0x6132('0x9'));var ejs=require(_0x6132('0xa'));var fs=require('fs');var _=require(_0x6132('0xb'));var squel=require(_0x6132('0xc'));var crypto=require(_0x6132('0xd'));var jsforce=require(_0x6132('0xe'));var deskjs=require(_0x6132('0xf'));var toCsv=require(_0x6132('0x9'));var querystring=require(_0x6132('0x10'));var Papa=require(_0x6132('0x11'));var Redis=require('ioredis');var authService=require(_0x6132('0x12'));var qs=require(_0x6132('0x13'));var as=require(_0x6132('0x14'));var hardwareService=require(_0x6132('0x15'));var logger=require(_0x6132('0x16'))(_0x6132('0x17'));var utils=require(_0x6132('0x18'));var config=require(_0x6132('0x19'));var licenseUtil=require(_0x6132('0x1a'));var db=require(_0x6132('0x1b'))['db'];function respondWithStatusCode(_0x26be4d,_0xe8bfbf){_0xe8bfbf=_0xe8bfbf||0xcc;return function(_0x12afae){if(_0x12afae){return _0x26be4d[_0x6132('0x1c')](_0xe8bfbf);}return _0x26be4d[_0x6132('0x1d')](_0xe8bfbf)['end']();};}function respondWithResult(_0x256073,_0x3496c5){_0x3496c5=_0x3496c5||0xc8;return function(_0x15ef1f){if(_0x15ef1f){return _0x256073[_0x6132('0x1d')](_0x3496c5)[_0x6132('0x1e')](_0x15ef1f);}};}function respondWithFilteredResult(_0xb6a4c,_0x4a8c8a){return function(_0x178740){if(_0x178740){var _0x44b3b2=_0x178740['count'],_0x13d864=_0x4a8c8a['offset'],_0x20baa3=_0x4a8c8a[_0x6132('0x1f')]+_0x4a8c8a['limit'],_0x3c9e27;if(_0x20baa3>=_0x44b3b2){_0x20baa3=_0x44b3b2;_0x3c9e27=0xc8;}else{_0x3c9e27=0xce;}_0xb6a4c[_0x6132('0x1d')](_0x3c9e27);return _0xb6a4c[_0x6132('0x20')](_0x6132('0x21'),_0x13d864+'-'+_0x20baa3+'/'+_0x44b3b2)[_0x6132('0x1e')](_0x178740);}return null;};}function patchUpdates(_0x58fb13){return function(_0x4ce64f){try{jsonpatch['apply'](_0x4ce64f,_0x58fb13,!![]);}catch(_0x2a5fff){return BPromise[_0x6132('0x22')](_0x2a5fff);}return _0x4ce64f[_0x6132('0x23')]();};}function saveUpdates(_0x56576e,_0x49c69b){return function(_0xf6463c){if(_0xf6463c){return _0xf6463c[_0x6132('0x24')](_0x56576e)['then'](function(_0x1ecc1c){return _0x1ecc1c;});}return null;};}function removeEntity(_0x3a4517,_0x47bb7b){return function(_0x3a74eb){if(_0x3a74eb){return _0x3a74eb[_0x6132('0x25')]()[_0x6132('0x26')](function(){var _0xb25628=_0x3a74eb[_0x6132('0x27')]({'plain':!![]});var _0x178d97=_0x6132('0x28');return db[_0x6132('0x29')][_0x6132('0x25')]({'where':{'type':_0x178d97,'resourceId':_0xb25628['id']}})[_0x6132('0x26')](function(){return _0x3a74eb;});})[_0x6132('0x26')](function(){_0x3a4517['status'](0xcc)[_0x6132('0x2a')]();});}};}function handleEntityNotFound(_0x5df92a,_0x2678f3){return function(_0x49df03){if(!_0x49df03){_0x5df92a[_0x6132('0x1c')](0x194);}return _0x49df03;};}function handleError(_0x10e816,_0x177f18){_0x177f18=_0x177f18||0x1f4;return function(_0x4c54ea){logger[_0x6132('0x2b')](_0x4c54ea[_0x6132('0x2c')]);if(_0x4c54ea['name']){delete _0x4c54ea[_0x6132('0x2d')];}_0x10e816[_0x6132('0x1d')](_0x177f18)[_0x6132('0x2e')](_0x4c54ea);};}exports['index']=function(_0x6f3eec,_0x2801e0){var _0x1f7556={},_0x5c228e={},_0x3e8ea2={'count':0x0,'rows':[]};var _0x294cd2=_[_0x6132('0x2f')](db[_0x6132('0x30')][_0x6132('0x31')],function(_0x28f127){return{'name':_0x28f127[_0x6132('0x32')],'type':_0x28f127[_0x6132('0x33')][_0x6132('0x34')]};});_0x5c228e[_0x6132('0x35')]=_[_0x6132('0x2f')](_0x294cd2,_0x6132('0x2d'));_0x5c228e[_0x6132('0x36')]=_[_0x6132('0x37')](_0x6f3eec['query']);_0x5c228e[_0x6132('0x38')]=_[_0x6132('0x39')](_0x5c228e['model'],_0x5c228e[_0x6132('0x36')]);_0x1f7556['attributes']=_['intersection'](_0x5c228e[_0x6132('0x35')],qs[_0x6132('0x3a')](_0x6f3eec[_0x6132('0x36')][_0x6132('0x3a')]));_0x1f7556[_0x6132('0x3b')]=_0x1f7556[_0x6132('0x3b')][_0x6132('0x3c')]?_0x1f7556[_0x6132('0x3b')]:_0x5c228e[_0x6132('0x35')];if(!_0x6f3eec[_0x6132('0x36')][_0x6132('0x3d')]('nolimit')){_0x1f7556[_0x6132('0x3e')]=qs['limit'](_0x6f3eec[_0x6132('0x36')][_0x6132('0x3e')]);_0x1f7556[_0x6132('0x1f')]=qs['offset'](_0x6f3eec[_0x6132('0x36')][_0x6132('0x1f')]);}_0x1f7556[_0x6132('0x3f')]=qs[_0x6132('0x40')](_0x6f3eec[_0x6132('0x36')][_0x6132('0x40')]);_0x1f7556[_0x6132('0x41')]=qs[_0x6132('0x38')](_[_0x6132('0x42')](_0x6f3eec[_0x6132('0x36')],_0x5c228e[_0x6132('0x38')]),_0x294cd2);if(_0x6f3eec[_0x6132('0x36')][_0x6132('0x43')]){_0x1f7556[_0x6132('0x41')]=_['merge'](_0x1f7556[_0x6132('0x41')],{'$or':_[_0x6132('0x2f')](_0x294cd2,function(_0x3042af){if(_0x3042af[_0x6132('0x33')]!==_0x6132('0x44')){var _0x4bf013={};_0x4bf013[_0x3042af[_0x6132('0x2d')]]={'$like':'%'+_0x6f3eec[_0x6132('0x36')][_0x6132('0x43')]+'%'};return _0x4bf013;}})});}_0x1f7556=_['merge']({},_0x1f7556,_0x6f3eec['options']);var _0x3865ad={'where':_0x1f7556[_0x6132('0x41')]};return db[_0x6132('0x30')][_0x6132('0x45')](_0x3865ad)[_0x6132('0x26')](function(_0x360b17){_0x3e8ea2[_0x6132('0x45')]=_0x360b17;if(_0x6f3eec[_0x6132('0x36')]['includeAll']){_0x1f7556[_0x6132('0x46')]=[{'all':!![]}];}return db['Pause'][_0x6132('0x47')](_0x1f7556);})[_0x6132('0x26')](function(_0x1913e9){_0x3e8ea2[_0x6132('0x48')]=_0x1913e9;return _0x3e8ea2;})[_0x6132('0x26')](respondWithFilteredResult(_0x2801e0,_0x1f7556))[_0x6132('0x49')](handleError(_0x2801e0,null));};exports['show']=function(_0x119777,_0x1b301f){var _0x68e676={'raw':!![],'where':{'id':_0x119777[_0x6132('0x4a')]['id']}},_0x2a6145={};_0x2a6145['model']=_[_0x6132('0x37')](db[_0x6132('0x30')]['rawAttributes']);_0x2a6145[_0x6132('0x36')]=_[_0x6132('0x37')](_0x119777['query']);_0x2a6145[_0x6132('0x38')]=_['intersection'](_0x2a6145['model'],_0x2a6145[_0x6132('0x36')]);_0x68e676['attributes']=_['intersection'](_0x2a6145['model'],qs[_0x6132('0x3a')](_0x119777[_0x6132('0x36')][_0x6132('0x3a')]));_0x68e676['attributes']=_0x68e676[_0x6132('0x3b')][_0x6132('0x3c')]?_0x68e676['attributes']:_0x2a6145[_0x6132('0x35')];if(_0x119777['query'][_0x6132('0x4b')]){_0x68e676[_0x6132('0x46')]=[{'all':!![]}];}_0x68e676=_['merge']({},_0x68e676,_0x119777[_0x6132('0x4c')]);return db[_0x6132('0x30')][_0x6132('0x4d')](_0x68e676)[_0x6132('0x26')](handleEntityNotFound(_0x1b301f,null))[_0x6132('0x26')](respondWithResult(_0x1b301f,null))['catch'](handleError(_0x1b301f,null));};exports[_0x6132('0x4e')]=function(_0x3092b2,_0x2cd86a){return db[_0x6132('0x30')][_0x6132('0x4e')](_0x3092b2['body'],{})[_0x6132('0x26')](function(_0x5e5a68){var _0x4eef1b=_0x3092b2[_0x6132('0x4f')][_0x6132('0x27')]({'plain':!![]});if(!_0x4eef1b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4eef1b[_0x6132('0x50')]===_0x6132('0x4f')){var _0x47bd8f=_0x5e5a68['get']({'plain':!![]});var _0x132e6d=_0x6132('0x28');return db[_0x6132('0x51')][_0x6132('0x4d')]({'where':{'name':_0x132e6d,'userProfileId':_0x4eef1b[_0x6132('0x52')]},'raw':!![]})[_0x6132('0x26')](function(_0x24539d){if(_0x24539d&&_0x24539d[_0x6132('0x53')]===0x0){return db[_0x6132('0x29')][_0x6132('0x4e')]({'name':_0x47bd8f[_0x6132('0x2d')],'resourceId':_0x47bd8f['id'],'type':_0x24539d[_0x6132('0x2d')],'sectionId':_0x24539d['id']},{})[_0x6132('0x26')](function(){return _0x5e5a68;});}else{return _0x5e5a68;}})[_0x6132('0x49')](function(_0x213f33){logger[_0x6132('0x2b')](_0x6132('0x54'),_0x213f33);throw _0x213f33;});}return _0x5e5a68;})[_0x6132('0x26')](respondWithResult(_0x2cd86a,0xc9))[_0x6132('0x49')](handleError(_0x2cd86a,null));};exports['update']=function(_0x4a5ebd,_0xf5285a){if(_0x4a5ebd[_0x6132('0x55')]['id']){delete _0x4a5ebd[_0x6132('0x55')]['id'];}return db[_0x6132('0x30')][_0x6132('0x4d')]({'where':{'id':_0x4a5ebd['params']['id']}})['then'](handleEntityNotFound(_0xf5285a,null))[_0x6132('0x26')](saveUpdates(_0x4a5ebd['body'],null))['then'](respondWithResult(_0xf5285a,null))[_0x6132('0x49')](handleError(_0xf5285a,null));};exports[_0x6132('0x25')]=function(_0xcab53c,_0x3359a0){return db[_0x6132('0x30')][_0x6132('0x4d')]({'where':{'id':_0xcab53c[_0x6132('0x4a')]['id']}})['then'](handleEntityNotFound(_0x3359a0,null))[_0x6132('0x26')](removeEntity(_0x3359a0,null))[_0x6132('0x49')](handleError(_0x3359a0,null));};
\ No newline at end of file
+var _0xde6f=['util','path','sox','ejs','fs-extra','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','json','undefined','count','offset','limit','reject','save','then','get','Pauses','UserProfileResource','end','stack','name','send','index','Pause','rawAttributes','type','key','map','filters','query','attributes','intersection','model','fields','length','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','findAll','rows','catch','show','params','keys','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','destroy','eml-format','rimraf','zip-dir','request-promise'];(function(_0x5a5967,_0x29f732){var _0x48ad71=function(_0x361635){while(--_0x361635){_0x5a5967['push'](_0x5a5967['shift']());}};_0x48ad71(++_0x29f732);}(_0xde6f,0x140));var _0xfde6=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xde6f[_0x20a584];return _0x4b41a8;};'use strict';var emlformat=require(_0xfde6('0x0'));var rimraf=require(_0xfde6('0x1'));var zipdir=require(_0xfde6('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xfde6('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xfde6('0x4'));var path=require(_0xfde6('0x5'));var sox=require(_0xfde6('0x6'));var csv=require('to-csv');var ejs=require(_0xfde6('0x7'));var fs=require('fs');var fs_extra=require(_0xfde6('0x8'));var _=require('lodash');var squel=require(_0xfde6('0x9'));var crypto=require(_0xfde6('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xfde6('0xb'));var toCsv=require(_0xfde6('0xc'));var querystring=require(_0xfde6('0xd'));var Papa=require(_0xfde6('0xe'));var Redis=require(_0xfde6('0xf'));var authService=require(_0xfde6('0x10'));var qs=require(_0xfde6('0x11'));var as=require(_0xfde6('0x12'));var hardwareService=require(_0xfde6('0x13'));var logger=require(_0xfde6('0x14'))('api');var utils=require(_0xfde6('0x15'));var config=require(_0xfde6('0x16'));var licenseUtil=require(_0xfde6('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x26daaf,_0xaa75c2){_0xaa75c2=_0xaa75c2||0xcc;return function(_0x599dae){if(_0x599dae){return _0x26daaf[_0xfde6('0x18')](_0xaa75c2);}return _0x26daaf[_0xfde6('0x19')](_0xaa75c2)['end']();};}function respondWithResult(_0x22b10d,_0x22df6d){_0x22df6d=_0x22df6d||0xc8;return function(_0xdf250e){if(_0xdf250e){return _0x22b10d[_0xfde6('0x19')](_0x22df6d)[_0xfde6('0x1a')](_0xdf250e);}};}function respondWithFilteredResult(_0x4857bc,_0x2a3bac){return function(_0x4bf227){if(_0x4bf227){var _0x3a5df2=typeof _0x2a3bac['offset']===_0xfde6('0x1b')&&typeof _0x2a3bac['limit']===_0xfde6('0x1b');var _0x3a6eae=_0x4bf227[_0xfde6('0x1c')];var _0x4402f1=_0x3a5df2?0x0:_0x2a3bac[_0xfde6('0x1d')];var _0x8eb30a=_0x3a5df2?_0x4bf227['count']:_0x2a3bac['offset']+_0x2a3bac[_0xfde6('0x1e')];var _0x3d8d9e;if(_0x8eb30a>=_0x3a6eae){_0x8eb30a=_0x3a6eae;_0x3d8d9e=0xc8;}else{_0x3d8d9e=0xce;}_0x4857bc[_0xfde6('0x19')](_0x3d8d9e);return _0x4857bc['set']('Content-Range',_0x4402f1+'-'+_0x8eb30a+'/'+_0x3a6eae)[_0xfde6('0x1a')](_0x4bf227);}return null;};}function patchUpdates(_0x2b7ca6){return function(_0xcaa24e){try{jsonpatch['apply'](_0xcaa24e,_0x2b7ca6,!![]);}catch(_0x332419){return BPromise[_0xfde6('0x1f')](_0x332419);}return _0xcaa24e[_0xfde6('0x20')]();};}function saveUpdates(_0x1863f7,_0x1b19dd){return function(_0x5b1e87){if(_0x5b1e87){return _0x5b1e87['update'](_0x1863f7)[_0xfde6('0x21')](function(_0x3595f4){return _0x3595f4;});}return null;};}function removeEntity(_0x4cbf7d,_0x40fbb8){return function(_0xcd7a3c){if(_0xcd7a3c){return _0xcd7a3c['destroy']()[_0xfde6('0x21')](function(){var _0x118372=_0xcd7a3c[_0xfde6('0x22')]({'plain':!![]});var _0x2b3b45=_0xfde6('0x23');return db[_0xfde6('0x24')]['destroy']({'where':{'type':_0x2b3b45,'resourceId':_0x118372['id']}})[_0xfde6('0x21')](function(){return _0xcd7a3c;});})[_0xfde6('0x21')](function(){_0x4cbf7d['status'](0xcc)[_0xfde6('0x25')]();});}};}function handleEntityNotFound(_0x1be965,_0x46ff4f){return function(_0x5c5688){if(!_0x5c5688){_0x1be965[_0xfde6('0x18')](0x194);}return _0x5c5688;};}function handleError(_0x5d36fa,_0xa08895){_0xa08895=_0xa08895||0x1f4;return function(_0x3e0e7d){logger['error'](_0x3e0e7d[_0xfde6('0x26')]);if(_0x3e0e7d['name']){delete _0x3e0e7d[_0xfde6('0x27')];}_0x5d36fa[_0xfde6('0x19')](_0xa08895)[_0xfde6('0x28')](_0x3e0e7d);};}exports[_0xfde6('0x29')]=function(_0x4ab328,_0x247825){var _0x157358={},_0x1deb68={},_0xb01efc={'count':0x0,'rows':[]};var _0x263551=_['map'](db[_0xfde6('0x2a')][_0xfde6('0x2b')],function(_0x434fd4){return{'name':_0x434fd4['fieldName'],'type':_0x434fd4[_0xfde6('0x2c')][_0xfde6('0x2d')]};});_0x1deb68['model']=_[_0xfde6('0x2e')](_0x263551,'name');_0x1deb68['query']=_['keys'](_0x4ab328['query']);_0x1deb68[_0xfde6('0x2f')]=_['intersection'](_0x1deb68['model'],_0x1deb68[_0xfde6('0x30')]);_0x157358[_0xfde6('0x31')]=_[_0xfde6('0x32')](_0x1deb68[_0xfde6('0x33')],qs[_0xfde6('0x34')](_0x4ab328['query'][_0xfde6('0x34')]));_0x157358[_0xfde6('0x31')]=_0x157358['attributes'][_0xfde6('0x35')]?_0x157358[_0xfde6('0x31')]:_0x1deb68[_0xfde6('0x33')];if(!_0x4ab328[_0xfde6('0x30')][_0xfde6('0x36')]('nolimit')){_0x157358[_0xfde6('0x1e')]=qs[_0xfde6('0x1e')](_0x4ab328['query'][_0xfde6('0x1e')]);_0x157358[_0xfde6('0x1d')]=qs[_0xfde6('0x1d')](_0x4ab328[_0xfde6('0x30')][_0xfde6('0x1d')]);}_0x157358[_0xfde6('0x37')]=qs[_0xfde6('0x38')](_0x4ab328[_0xfde6('0x30')]['sort']);_0x157358[_0xfde6('0x39')]=qs['filters'](_[_0xfde6('0x3a')](_0x4ab328[_0xfde6('0x30')],_0x1deb68[_0xfde6('0x2f')]),_0x263551);if(_0x4ab328[_0xfde6('0x30')]['filter']){_0x157358[_0xfde6('0x39')]=_[_0xfde6('0x3b')](_0x157358[_0xfde6('0x39')],{'$or':_[_0xfde6('0x2e')](_0x263551,function(_0x51a63f){if(_0x51a63f[_0xfde6('0x2c')]!==_0xfde6('0x3c')){var _0x258b00={};_0x258b00[_0x51a63f[_0xfde6('0x27')]]={'$like':'%'+_0x4ab328[_0xfde6('0x30')][_0xfde6('0x3d')]+'%'};return _0x258b00;}})});}_0x157358=_['merge']({},_0x157358,_0x4ab328[_0xfde6('0x3e')]);var _0xf4ef24={'where':_0x157358[_0xfde6('0x39')]};return db['Pause'][_0xfde6('0x1c')](_0xf4ef24)[_0xfde6('0x21')](function(_0x117499){_0xb01efc[_0xfde6('0x1c')]=_0x117499;if(_0x4ab328[_0xfde6('0x30')][_0xfde6('0x3f')]){_0x157358['include']=[{'all':!![]}];}return db['Pause'][_0xfde6('0x40')](_0x157358);})['then'](function(_0x27b456){_0xb01efc[_0xfde6('0x41')]=_0x27b456;return _0xb01efc;})[_0xfde6('0x21')](respondWithFilteredResult(_0x247825,_0x157358))[_0xfde6('0x42')](handleError(_0x247825,null));};exports[_0xfde6('0x43')]=function(_0x11018b,_0x3dba3c){var _0x6d9470={'raw':!![],'where':{'id':_0x11018b[_0xfde6('0x44')]['id']}},_0x474232={};_0x474232[_0xfde6('0x33')]=_[_0xfde6('0x45')](db[_0xfde6('0x2a')][_0xfde6('0x2b')]);_0x474232[_0xfde6('0x30')]=_[_0xfde6('0x45')](_0x11018b['query']);_0x474232[_0xfde6('0x2f')]=_[_0xfde6('0x32')](_0x474232[_0xfde6('0x33')],_0x474232[_0xfde6('0x30')]);_0x6d9470[_0xfde6('0x31')]=_['intersection'](_0x474232[_0xfde6('0x33')],qs['fields'](_0x11018b['query'][_0xfde6('0x34')]));_0x6d9470['attributes']=_0x6d9470['attributes'][_0xfde6('0x35')]?_0x6d9470[_0xfde6('0x31')]:_0x474232[_0xfde6('0x33')];if(_0x11018b[_0xfde6('0x30')][_0xfde6('0x3f')]){_0x6d9470[_0xfde6('0x46')]=[{'all':!![]}];}_0x6d9470=_[_0xfde6('0x3b')]({},_0x6d9470,_0x11018b[_0xfde6('0x3e')]);return db[_0xfde6('0x2a')][_0xfde6('0x47')](_0x6d9470)[_0xfde6('0x21')](handleEntityNotFound(_0x3dba3c,null))[_0xfde6('0x21')](respondWithResult(_0x3dba3c,null))[_0xfde6('0x42')](handleError(_0x3dba3c,null));};exports[_0xfde6('0x48')]=function(_0x40be50,_0x2241d4){return db[_0xfde6('0x2a')][_0xfde6('0x48')](_0x40be50[_0xfde6('0x49')],{})['then'](function(_0x122619){var _0x447000=_0x40be50[_0xfde6('0x4a')][_0xfde6('0x22')]({'plain':!![]});if(!_0x447000)throw new Error(_0xfde6('0x4b'));if(_0x447000['role']===_0xfde6('0x4a')){var _0x353551=_0x122619[_0xfde6('0x22')]({'plain':!![]});var _0x1be3d1='Pauses';return db['UserProfileSection'][_0xfde6('0x47')]({'where':{'name':_0x1be3d1,'userProfileId':_0x447000[_0xfde6('0x4c')]},'raw':!![]})[_0xfde6('0x21')](function(_0x386e77){if(_0x386e77&&_0x386e77['autoAssociation']===0x0){return db[_0xfde6('0x24')][_0xfde6('0x48')]({'name':_0x353551[_0xfde6('0x27')],'resourceId':_0x353551['id'],'type':_0x386e77[_0xfde6('0x27')],'sectionId':_0x386e77['id']},{})[_0xfde6('0x21')](function(){return _0x122619;});}else{return _0x122619;}})[_0xfde6('0x42')](function(_0xebaeae){logger[_0xfde6('0x4d')](_0xfde6('0x4e'),_0xebaeae);throw _0xebaeae;});}return _0x122619;})['then'](respondWithResult(_0x2241d4,0xc9))['catch'](handleError(_0x2241d4,null));};exports[_0xfde6('0x4f')]=function(_0x2cfaac,_0x4e7125){if(_0x2cfaac['body']['id']){delete _0x2cfaac[_0xfde6('0x49')]['id'];}return db[_0xfde6('0x2a')][_0xfde6('0x47')]({'where':{'id':_0x2cfaac[_0xfde6('0x44')]['id']}})[_0xfde6('0x21')](handleEntityNotFound(_0x4e7125,null))[_0xfde6('0x21')](saveUpdates(_0x2cfaac[_0xfde6('0x49')],null))[_0xfde6('0x21')](respondWithResult(_0x4e7125,null))[_0xfde6('0x42')](handleError(_0x4e7125,null));};exports[_0xfde6('0x50')]=function(_0x106653,_0x1a17ae){return db[_0xfde6('0x2a')][_0xfde6('0x47')]({'where':{'id':_0x106653['params']['id']}})[_0xfde6('0x21')](handleEntityNotFound(_0x1a17ae,null))[_0xfde6('0x21')](removeEntity(_0x1a17ae,null))['catch'](handleError(_0x1a17ae,null));};
\ No newline at end of file