234ae5ac436f46f79943df70862c98ec9c635911
[motion-next.git] / server / api / intFreshdeskConfiguration / intFreshdeskConfiguration.controller.js
1 const a260_0x7f12=['end','pick','attributes','../../components/parsers/qs','intersection','FreshdeskField','where','model','getDescriptions','query','merge','catch','params','name','FreshdeskConfiguration','include','sequelize','rows','filters','fieldName','options','setTags','map','getFields','filter','includeAll','send','offset','../../config/logger','getTags','count','undefined','like','Tag','Content-Range','body','create','nolimit','json','getSubjects','stack','then','set','keys','order','VIRTUAL','limit','sort','findAll','../../mysqldb','error','status','key','index','findOne','api','destroy','length','rawAttributes','fields'];(function(_0x5e8e97,_0x7f12f9){const _0xb94ed7=function(_0x4f91da){while(--_0x4f91da){_0x5e8e97['push'](_0x5e8e97['shift']());}};_0xb94ed7(++_0x7f12f9);}(a260_0x7f12,0x18d));const a260_0xb94e=function(_0x5e8e97,_0x7f12f9){_0x5e8e97=_0x5e8e97-0x0;let _0xb94ed7=a260_0x7f12[_0x5e8e97];return _0xb94ed7;};const _0x45ceb1=a260_0xb94e;'use strict';const _=require('lodash'),qs=require(_0x45ceb1('0x1a')),logger=require(_0x45ceb1('0x33'))(_0x45ceb1('0x12')),db=require(_0x45ceb1('0xc'))['db'],{Op}=require(_0x45ceb1('0x27'));function respondWithResult(_0x4f91da,_0x5a1e83){return _0x5a1e83=_0x5a1e83||0xc8,function(_0x496a38){const _0xd7bbb6=a260_0xb94e;if(_0x496a38)return _0x4f91da['status'](_0x5a1e83)[_0xd7bbb6('0x1')](_0x496a38);};}function respondWithFilteredResult(_0x543299,_0x3f825c){return function(_0x5b6a97){const _0x19ddca=a260_0xb94e;if(_0x5b6a97){const _0x22ea16=_0x5b6a97[_0x19ddca('0x35')],_0x11c074=_0x3f825c[_0x19ddca('0x32')];let _0x435e60=_0x3f825c['offset']+_0x3f825c['limit'],_0x1e28d9;return _0x435e60>=_0x22ea16?(_0x435e60=_0x22ea16,_0x1e28d9=0xc8):_0x1e28d9=0xce,_0x543299['status'](_0x1e28d9),_0x543299[_0x19ddca('0x5')](_0x19ddca('0x39'),_0x11c074+'-'+_0x435e60+'/'+_0x22ea16)[_0x19ddca('0x1')](_0x5b6a97);}return null;};}function saveUpdates(_0x44f997){return function(_0x16acac){const _0x1b44d5=a260_0xb94e;if(_0x16acac)return _0x16acac['update'](_0x44f997)[_0x1b44d5('0x4')](function(_0x4a7f2c){return _0x4a7f2c;});return null;};}function removeEntity(_0x2b08a5){return function(_0x5e7573){const _0x2743ad=a260_0xb94e;if(_0x5e7573)return _0x5e7573[_0x2743ad('0x13')]()['then'](function(){const _0x503f1e=_0x2743ad;_0x2b08a5[_0x503f1e('0xe')](0xcc)[_0x503f1e('0x17')]();});};}function handleEntityNotFound(_0x4afe8b){return function(_0x542b9e){return!_0x542b9e&&_0x4afe8b['sendStatus'](0x194),_0x542b9e;};}function handleError(_0x1a7d6b,_0x23ae6c){return _0x23ae6c=_0x23ae6c||0x1f4,function(_0x102e0c){const _0x1145d5=a260_0xb94e;logger[_0x1145d5('0xd')](_0x102e0c[_0x1145d5('0x3')]),_0x102e0c['name']&&delete _0x102e0c[_0x1145d5('0x24')],_0x1a7d6b[_0x1145d5('0xe')](_0x23ae6c)[_0x1145d5('0x31')](_0x102e0c);};}exports[_0x45ceb1('0x10')]=function(_0x35f894,_0x1dffb0){const _0xed7104=_0x45ceb1;let _0x4bd9ac={};const _0x4e4e24={},_0x593c97={'count':0x0,'rows':[]},_0x3fdc13=_[_0xed7104('0x2d')](db[_0xed7104('0x25')]['rawAttributes'],function(_0x85414){const _0x3312ba=_0xed7104;return{'name':_0x85414[_0x3312ba('0x2a')],'type':_0x85414['type'][_0x3312ba('0xf')]};});_0x4e4e24[_0xed7104('0x1e')]=_[_0xed7104('0x2d')](_0x3fdc13,'name'),_0x4e4e24['query']=_[_0xed7104('0x6')](_0x35f894[_0xed7104('0x20')]),_0x4e4e24[_0xed7104('0x29')]=_['intersection'](_0x4e4e24[_0xed7104('0x1e')],_0x4e4e24[_0xed7104('0x20')]),_0x4bd9ac[_0xed7104('0x19')]=_['intersection'](_0x4e4e24['model'],qs[_0xed7104('0x16')](_0x35f894[_0xed7104('0x20')]['fields'])),_0x4bd9ac[_0xed7104('0x19')]=_0x4bd9ac[_0xed7104('0x19')][_0xed7104('0x14')]?_0x4bd9ac[_0xed7104('0x19')]:_0x4e4e24['model'];typeof _0x35f894[_0xed7104('0x20')]['nolimit']===_0xed7104('0x36')&&(_0x4bd9ac['limit']=qs[_0xed7104('0x9')](_0x35f894['query'][_0xed7104('0x9')]),_0x4bd9ac[_0xed7104('0x32')]=qs[_0xed7104('0x32')](_0x35f894[_0xed7104('0x20')][_0xed7104('0x32')]));_0x4bd9ac['order']=qs[_0xed7104('0xa')](_0x35f894[_0xed7104('0x20')][_0xed7104('0xa')]),_0x4bd9ac[_0xed7104('0x1d')]=qs['filters'](_[_0xed7104('0x18')](_0x35f894['query'],_0x4e4e24[_0xed7104('0x29')]),_0x3fdc13);_0x35f894[_0xed7104('0x20')]['filter']&&(_0x4bd9ac[_0xed7104('0x1d')]=_['merge'](_0x4bd9ac[_0xed7104('0x1d')],{[Op['or']]:_[_0xed7104('0x2d')](_0x3fdc13,function(_0x513dad){const _0x4829ae=_0xed7104;if(_0x513dad['type']!==_0x4829ae('0x8')){const _0x2f9803={};return _0x2f9803[_0x513dad[_0x4829ae('0x24')]]={[Op[_0x4829ae('0x37')]]:'%'+_0x35f894[_0x4829ae('0x20')]['filter']+'%'},_0x2f9803;}})}));_0x4bd9ac=_[_0xed7104('0x21')]({},_0x4bd9ac,_0x35f894[_0xed7104('0x2b')]);const _0x4b7d73={'where':_0x4bd9ac['where']};return db[_0xed7104('0x25')][_0xed7104('0x35')](_0x4b7d73)[_0xed7104('0x4')](function(_0x523607){const _0x28fe81=_0xed7104;return _0x593c97[_0x28fe81('0x35')]=_0x523607,_0x35f894[_0x28fe81('0x20')][_0x28fe81('0x30')]&&(_0x4bd9ac[_0x28fe81('0x26')]=[{'all':!![]}]),db[_0x28fe81('0x25')][_0x28fe81('0xb')](_0x4bd9ac);})['then'](function(_0x1db117){const _0x453b5a=_0xed7104;return _0x593c97[_0x453b5a('0x28')]=_0x1db117,_0x593c97;})[_0xed7104('0x4')](respondWithFilteredResult(_0x1dffb0,_0x4bd9ac))['catch'](handleError(_0x1dffb0,null));},exports['show']=function(_0x399d6d,_0x581ebd){const _0x137236=_0x45ceb1;let _0xb25733={'raw':![],'where':{'id':_0x399d6d[_0x137236('0x23')]['id']}};const _0x2e810={};return _0x2e810['model']=_[_0x137236('0x6')](db[_0x137236('0x25')]['rawAttributes']),_0x2e810[_0x137236('0x20')]=_[_0x137236('0x6')](_0x399d6d['query']),_0x2e810[_0x137236('0x29')]=_[_0x137236('0x1b')](_0x2e810[_0x137236('0x1e')],_0x2e810['query']),_0xb25733['attributes']=_[_0x137236('0x1b')](_0x2e810[_0x137236('0x1e')],qs[_0x137236('0x16')](_0x399d6d['query'][_0x137236('0x16')])),_0xb25733['attributes']=_0xb25733[_0x137236('0x19')][_0x137236('0x14')]?_0xb25733[_0x137236('0x19')]:_0x2e810['model'],_0x399d6d[_0x137236('0x20')][_0x137236('0x30')]&&(_0xb25733[_0x137236('0x26')]=[{'all':!![]}]),_0xb25733=_[_0x137236('0x21')]({},_0xb25733,_0x399d6d[_0x137236('0x2b')]),db[_0x137236('0x25')][_0x137236('0x11')](_0xb25733)[_0x137236('0x4')](handleEntityNotFound(_0x581ebd,null))[_0x137236('0x4')](respondWithResult(_0x581ebd,null))[_0x137236('0x22')](handleError(_0x581ebd,null));},exports[_0x45ceb1('0x3b')]=function(_0x25cf52,_0x115445){const _0x5afd72=_0x45ceb1;return db[_0x5afd72('0x25')][_0x5afd72('0x3b')](_0x25cf52[_0x5afd72('0x3a')],{})['then'](respondWithResult(_0x115445,0xc9))[_0x5afd72('0x22')](handleError(_0x115445,null));},exports['update']=function(_0x7d7e67,_0x2ce753){const _0x54648a=_0x45ceb1;return _0x7d7e67['body']['id']&&delete _0x7d7e67['body']['id'],db['FreshdeskConfiguration'][_0x54648a('0x11')]({'where':{'id':_0x7d7e67[_0x54648a('0x23')]['id']}})['then'](handleEntityNotFound(_0x2ce753,null))['then'](saveUpdates(_0x7d7e67[_0x54648a('0x3a')],null))[_0x54648a('0x4')](respondWithResult(_0x2ce753,null))[_0x54648a('0x22')](handleError(_0x2ce753,null));},exports[_0x45ceb1('0x13')]=function(_0x5e3c4e,_0x4f5282){const _0x1658a6=_0x45ceb1;return db['FreshdeskConfiguration'][_0x1658a6('0x11')]({'where':{'id':_0x5e3c4e['params']['id']}})[_0x1658a6('0x4')](handleEntityNotFound(_0x4f5282,null))[_0x1658a6('0x4')](removeEntity(_0x4f5282,null))[_0x1658a6('0x22')](handleError(_0x4f5282,null));},exports['getFields']=function(_0xfb67c,_0x4670c6){const _0x1d5f47=_0x45ceb1;let _0xcafca7={};const _0x308e34={};let _0xf3e4f2,_0x198c34;return db[_0x1d5f47('0x25')]['findOne']({'where':{'id':_0xfb67c[_0x1d5f47('0x23')]['id']}})[_0x1d5f47('0x4')](handleEntityNotFound(_0x4670c6,null))['then'](function(_0x512598){const _0x5a17a2=_0x1d5f47;if(_0x512598)return _0xf3e4f2=_0x512598,_0x308e34[_0x5a17a2('0x1e')]=_[_0x5a17a2('0x6')](db[_0x5a17a2('0x1c')][_0x5a17a2('0x15')]),_0x308e34[_0x5a17a2('0x20')]=_[_0x5a17a2('0x6')](_0xfb67c[_0x5a17a2('0x20')]),_0x308e34[_0x5a17a2('0x29')]=_['intersection'](_0x308e34[_0x5a17a2('0x1e')],_0x308e34[_0x5a17a2('0x20')]),_0xcafca7['attributes']=_[_0x5a17a2('0x1b')](_0x308e34[_0x5a17a2('0x1e')],qs[_0x5a17a2('0x16')](_0xfb67c[_0x5a17a2('0x20')][_0x5a17a2('0x16')])),_0xcafca7[_0x5a17a2('0x19')]=_0xcafca7[_0x5a17a2('0x19')][_0x5a17a2('0x14')]?_0xcafca7['attributes']:_0x308e34[_0x5a17a2('0x1e')],_0xcafca7[_0x5a17a2('0x7')]=qs[_0x5a17a2('0xa')](_0xfb67c[_0x5a17a2('0x20')][_0x5a17a2('0xa')]),_0xcafca7[_0x5a17a2('0x1d')]=qs[_0x5a17a2('0x29')](_['pick'](_0xfb67c['query'],_0x308e34[_0x5a17a2('0x29')])),_0xfb67c[_0x5a17a2('0x20')][_0x5a17a2('0x2f')]&&(_0xcafca7[_0x5a17a2('0x1d')]=_[_0x5a17a2('0x21')](_0xcafca7[_0x5a17a2('0x1d')],{[Op['or']]:_['map'](_0xcafca7[_0x5a17a2('0x19')],function(_0x4db9fe){const _0x9031fe=_0x5a17a2,_0x11cb18={};return _0x11cb18[_0x4db9fe]={[Op[_0x9031fe('0x37')]]:'%'+_0xfb67c[_0x9031fe('0x20')][_0x9031fe('0x2f')]+'%'},_0x11cb18;})})),_0xcafca7=_['merge']({},_0xcafca7,_0xfb67c['options']),_0xf3e4f2['getFields'](_0xcafca7);})[_0x1d5f47('0x4')](function(_0x5a367f){const _0x5c4616=_0x1d5f47;if(_0x5a367f)return _0x198c34=_0x5a367f[_0x5c4616('0x14')],typeof _0xfb67c[_0x5c4616('0x20')][_0x5c4616('0x0')]===_0x5c4616('0x36')&&(_0xcafca7[_0x5c4616('0x9')]=qs[_0x5c4616('0x9')](_0xfb67c['query'][_0x5c4616('0x9')]),_0xcafca7[_0x5c4616('0x32')]=qs[_0x5c4616('0x32')](_0xfb67c['query']['offset'])),_0xf3e4f2[_0x5c4616('0x2e')](_0xcafca7);})['then'](function(_0x53da70){if(_0x53da70)return _0x53da70?{'count':_0x198c34,'rows':_0x53da70}:null;})[_0x1d5f47('0x4')](respondWithResult(_0x4670c6,null))['catch'](handleError(_0x4670c6,null));},exports[_0x45ceb1('0x2')]=function(_0x3d1d1f,_0x3f11e9){const _0x38654f=_0x45ceb1;let _0x46db7b={};const _0x38eb48={};let _0x59e80b,_0x460f27;return db[_0x38654f('0x25')][_0x38654f('0x11')]({'where':{'id':_0x3d1d1f['params']['id']}})[_0x38654f('0x4')](handleEntityNotFound(_0x3f11e9,null))[_0x38654f('0x4')](function(_0x1b2f43){const _0x2964f0=_0x38654f;if(_0x1b2f43)return _0x59e80b=_0x1b2f43,_0x38eb48[_0x2964f0('0x1e')]=_[_0x2964f0('0x6')](db[_0x2964f0('0x1c')][_0x2964f0('0x15')]),_0x38eb48[_0x2964f0('0x20')]=_['keys'](_0x3d1d1f[_0x2964f0('0x20')]),_0x38eb48[_0x2964f0('0x29')]=_[_0x2964f0('0x1b')](_0x38eb48[_0x2964f0('0x1e')],_0x38eb48[_0x2964f0('0x20')]),_0x46db7b[_0x2964f0('0x19')]=_[_0x2964f0('0x1b')](_0x38eb48[_0x2964f0('0x1e')],qs[_0x2964f0('0x16')](_0x3d1d1f['query'][_0x2964f0('0x16')])),_0x46db7b[_0x2964f0('0x19')]=_0x46db7b['attributes'][_0x2964f0('0x14')]?_0x46db7b[_0x2964f0('0x19')]:_0x38eb48[_0x2964f0('0x1e')],_0x46db7b[_0x2964f0('0x7')]=qs[_0x2964f0('0xa')](_0x3d1d1f[_0x2964f0('0x20')]['sort']),_0x46db7b[_0x2964f0('0x1d')]=qs['filters'](_[_0x2964f0('0x18')](_0x3d1d1f[_0x2964f0('0x20')],_0x38eb48[_0x2964f0('0x29')])),_0x3d1d1f[_0x2964f0('0x20')][_0x2964f0('0x2f')]&&(_0x46db7b['where']=_['merge'](_0x46db7b['where'],{[Op['or']]:_['map'](_0x46db7b[_0x2964f0('0x19')],function(_0x49bc84){const _0x4a8a75=_0x2964f0,_0x113dcc={};return _0x113dcc[_0x49bc84]={[Op[_0x4a8a75('0x37')]]:'%'+_0x3d1d1f[_0x4a8a75('0x20')]['filter']+'%'},_0x113dcc;})})),_0x46db7b=_[_0x2964f0('0x21')]({},_0x46db7b,_0x3d1d1f[_0x2964f0('0x2b')]),_0x59e80b[_0x2964f0('0x2')](_0x46db7b);})['then'](function(_0x212cf4){const _0x5bd7a7=_0x38654f;if(_0x212cf4)return _0x460f27=_0x212cf4[_0x5bd7a7('0x14')],typeof _0x3d1d1f['query']['nolimit']===_0x5bd7a7('0x36')&&(_0x46db7b[_0x5bd7a7('0x9')]=qs['limit'](_0x3d1d1f[_0x5bd7a7('0x20')][_0x5bd7a7('0x9')]),_0x46db7b[_0x5bd7a7('0x32')]=qs[_0x5bd7a7('0x32')](_0x3d1d1f[_0x5bd7a7('0x20')][_0x5bd7a7('0x32')])),_0x59e80b['getSubjects'](_0x46db7b);})[_0x38654f('0x4')](function(_0x5bd17d){if(_0x5bd17d)return _0x5bd17d?{'count':_0x460f27,'rows':_0x5bd17d}:null;})[_0x38654f('0x4')](respondWithResult(_0x3f11e9,null))['catch'](handleError(_0x3f11e9,null));},exports[_0x45ceb1('0x1f')]=function(_0x4135a1,_0xb1c15d){const _0x1815c1=_0x45ceb1;let _0x5443ab={};const _0x4a2edc={};let _0x2073fe,_0xcc064a;return db['FreshdeskConfiguration'][_0x1815c1('0x11')]({'where':{'id':_0x4135a1[_0x1815c1('0x23')]['id']}})[_0x1815c1('0x4')](handleEntityNotFound(_0xb1c15d,null))[_0x1815c1('0x4')](function(_0x389ee2){const _0x26b718=_0x1815c1;if(_0x389ee2)return _0x2073fe=_0x389ee2,_0x4a2edc[_0x26b718('0x1e')]=_[_0x26b718('0x6')](db['FreshdeskField']['rawAttributes']),_0x4a2edc[_0x26b718('0x20')]=_['keys'](_0x4135a1[_0x26b718('0x20')]),_0x4a2edc[_0x26b718('0x29')]=_['intersection'](_0x4a2edc[_0x26b718('0x1e')],_0x4a2edc['query']),_0x5443ab[_0x26b718('0x19')]=_[_0x26b718('0x1b')](_0x4a2edc[_0x26b718('0x1e')],qs['fields'](_0x4135a1[_0x26b718('0x20')][_0x26b718('0x16')])),_0x5443ab[_0x26b718('0x19')]=_0x5443ab['attributes']['length']?_0x5443ab[_0x26b718('0x19')]:_0x4a2edc['model'],_0x5443ab['order']=qs[_0x26b718('0xa')](_0x4135a1[_0x26b718('0x20')][_0x26b718('0xa')]),_0x5443ab[_0x26b718('0x1d')]=qs[_0x26b718('0x29')](_[_0x26b718('0x18')](_0x4135a1[_0x26b718('0x20')],_0x4a2edc[_0x26b718('0x29')])),_0x4135a1[_0x26b718('0x20')][_0x26b718('0x2f')]&&(_0x5443ab[_0x26b718('0x1d')]=_[_0x26b718('0x21')](_0x5443ab['where'],{[Op['or']]:_[_0x26b718('0x2d')](_0x5443ab[_0x26b718('0x19')],function(_0x177f97){const _0x5a15d1=_0x26b718,_0x5cce6b={};return _0x5cce6b[_0x177f97]={[Op[_0x5a15d1('0x37')]]:'%'+_0x4135a1[_0x5a15d1('0x20')]['filter']+'%'},_0x5cce6b;})})),_0x5443ab=_[_0x26b718('0x21')]({},_0x5443ab,_0x4135a1[_0x26b718('0x2b')]),_0x2073fe['getDescriptions'](_0x5443ab);})[_0x1815c1('0x4')](function(_0x24947a){const _0x214b17=_0x1815c1;if(_0x24947a)return _0xcc064a=_0x24947a['length'],typeof _0x4135a1['query'][_0x214b17('0x0')]==='undefined'&&(_0x5443ab[_0x214b17('0x9')]=qs['limit'](_0x4135a1[_0x214b17('0x20')][_0x214b17('0x9')]),_0x5443ab['offset']=qs[_0x214b17('0x32')](_0x4135a1[_0x214b17('0x20')]['offset'])),_0x2073fe[_0x214b17('0x1f')](_0x5443ab);})[_0x1815c1('0x4')](function(_0x12ab53){if(_0x12ab53)return _0x12ab53?{'count':_0xcc064a,'rows':_0x12ab53}:null;})['then'](respondWithResult(_0xb1c15d,null))[_0x1815c1('0x22')](handleError(_0xb1c15d,null));},exports[_0x45ceb1('0x34')]=function(_0x5c79eb,_0x47dbf9){const _0x501b78=_0x45ceb1;let _0x15b6a9={};const _0xec4ee={};let _0x3fa10f,_0x47c5f0;return db['FreshdeskConfiguration'][_0x501b78('0x11')]({'where':{'id':_0x5c79eb[_0x501b78('0x23')]['id']}})[_0x501b78('0x4')](handleEntityNotFound(_0x47dbf9,null))[_0x501b78('0x4')](function(_0x2bb31c){const _0x3373b7=_0x501b78;if(_0x2bb31c)return _0x3fa10f=_0x2bb31c,_0xec4ee[_0x3373b7('0x1e')]=_[_0x3373b7('0x6')](db[_0x3373b7('0x38')][_0x3373b7('0x15')]),_0xec4ee[_0x3373b7('0x20')]=_[_0x3373b7('0x6')](_0x5c79eb[_0x3373b7('0x20')]),_0xec4ee[_0x3373b7('0x29')]=_[_0x3373b7('0x1b')](_0xec4ee['model'],_0xec4ee['query']),_0x15b6a9[_0x3373b7('0x19')]=_[_0x3373b7('0x1b')](_0xec4ee['model'],qs[_0x3373b7('0x16')](_0x5c79eb['query'][_0x3373b7('0x16')])),_0x15b6a9[_0x3373b7('0x19')]=_0x15b6a9[_0x3373b7('0x19')][_0x3373b7('0x14')]?_0x15b6a9['attributes']:_0xec4ee[_0x3373b7('0x1e')],_0x15b6a9[_0x3373b7('0x7')]=qs['sort'](_0x5c79eb[_0x3373b7('0x20')][_0x3373b7('0xa')]),_0x15b6a9[_0x3373b7('0x1d')]=qs[_0x3373b7('0x29')](_['pick'](_0x5c79eb[_0x3373b7('0x20')],_0xec4ee['filters'])),_0x5c79eb[_0x3373b7('0x20')][_0x3373b7('0x2f')]&&(_0x15b6a9[_0x3373b7('0x1d')]=_['merge'](_0x15b6a9[_0x3373b7('0x1d')],{[Op['or']]:_[_0x3373b7('0x2d')](_0x15b6a9[_0x3373b7('0x19')],function(_0x388e68){const _0x5f44c6=_0x3373b7,_0x5a43db={};return _0x5a43db[_0x388e68]={[Op['like']]:'%'+_0x5c79eb[_0x5f44c6('0x20')][_0x5f44c6('0x2f')]+'%'},_0x5a43db;})})),_0x15b6a9=_['merge']({},_0x15b6a9,_0x5c79eb[_0x3373b7('0x2b')]),_0x3fa10f[_0x3373b7('0x34')](_0x15b6a9);})[_0x501b78('0x4')](function(_0x596ca7){const _0x1e29fe=_0x501b78;if(_0x596ca7)return _0x47c5f0=_0x596ca7['length'],typeof _0x5c79eb[_0x1e29fe('0x20')]['nolimit']===_0x1e29fe('0x36')&&(_0x15b6a9[_0x1e29fe('0x9')]=qs[_0x1e29fe('0x9')](_0x5c79eb[_0x1e29fe('0x20')][_0x1e29fe('0x9')]),_0x15b6a9[_0x1e29fe('0x32')]=qs[_0x1e29fe('0x32')](_0x5c79eb[_0x1e29fe('0x20')]['offset'])),_0x3fa10f[_0x1e29fe('0x34')](_0x15b6a9);})[_0x501b78('0x4')](function(_0x826fd9){if(_0x826fd9)return _0x826fd9?{'count':_0x47c5f0,'rows':_0x826fd9}:null;})['then'](respondWithResult(_0x47dbf9,null))['catch'](handleError(_0x47dbf9,null));},exports[_0x45ceb1('0x2c')]=function(_0x5c1ff7,_0x3d7ec8){const _0x2c0569=_0x45ceb1;return _0x5c1ff7[_0x2c0569('0x3a')]['id']&&delete _0x5c1ff7[_0x2c0569('0x3a')]['id'],db[_0x2c0569('0x25')][_0x2c0569('0x11')]({'where':{'id':_0x5c1ff7[_0x2c0569('0x23')]['id']}})[_0x2c0569('0x4')](handleEntityNotFound(_0x3d7ec8,null))[_0x2c0569('0x4')](function(_0x1dd1ab){const _0x4084a0=_0x2c0569;if(_0x1dd1ab)return _0x1dd1ab[_0x4084a0('0x2c')](_0x5c1ff7[_0x4084a0('0x3a')]['ids']||[]);return null;})['then'](respondWithResult(_0x3d7ec8,null))[_0x2c0569('0x22')](handleError(_0x3d7ec8,null));};