Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / api / intDeskConfiguration / intDeskConfiguration.controller.js
index 5d5734c..2a65a5d 100644 (file)
@@ -1 +1 @@
-const a234_0x3ba3=['rawAttributes','keys','send','Tag','sequelize','getDescriptions','VIRTUAL','then','like','params','rows','getFields','intersection','attributes','order','set','ids','getSubjects','DeskField','limit','name','nolimit','pick','model','create','findOne','catch','count','query','api','setTags','options','body','fieldName','fields','getTags','type','offset','where','sort','filter','length','../../mysqldb','stack','filters','index','includeAll','merge','DeskConfiguration','undefined','lodash','map','Content-Range','include','../../config/logger','destroy','end','findAll'];(function(_0x7a2c94,_0x3ba30e){const _0x5f2e3e=function(_0x281d83){while(--_0x281d83){_0x7a2c94['push'](_0x7a2c94['shift']());}};_0x5f2e3e(++_0x3ba30e);}(a234_0x3ba3,0x86));const a234_0x5f2e=function(_0x7a2c94,_0x3ba30e){_0x7a2c94=_0x7a2c94-0x0;let _0x5f2e3e=a234_0x3ba3[_0x7a2c94];return _0x5f2e3e;};const _0x5d042d=a234_0x5f2e;'use strict';const _=require(_0x5d042d('0x20')),qs=require('../../components/parsers/qs'),logger=require(_0x5d042d('0x24'))(_0x5d042d('0xb')),db=require(_0x5d042d('0x18'))['db'],{Op}=require(_0x5d042d('0x2c'));function respondWithResult(_0x281d83,_0x300dd2){return _0x300dd2=_0x300dd2||0xc8,function(_0x5a05a6){if(_0x5a05a6)return _0x281d83['status'](_0x300dd2)['json'](_0x5a05a6);};}function respondWithFilteredResult(_0x489a0a,_0x536bed){return function(_0x3af65e){const _0x4d85ab=a234_0x5f2e;if(_0x3af65e){const _0x2d0a77=_0x3af65e[_0x4d85ab('0x9')],_0x34f482=_0x536bed['offset'];let _0x563d4a=_0x536bed[_0x4d85ab('0x13')]+_0x536bed[_0x4d85ab('0x1')],_0x1a03b0;return _0x563d4a>=_0x2d0a77?(_0x563d4a=_0x2d0a77,_0x1a03b0=0xc8):_0x1a03b0=0xce,_0x489a0a['status'](_0x1a03b0),_0x489a0a[_0x4d85ab('0x37')](_0x4d85ab('0x22'),_0x34f482+'-'+_0x563d4a+'/'+_0x2d0a77)['json'](_0x3af65e);}return null;};}function saveUpdates(_0x11d467){return function(_0x47739c){const _0x5d892f=a234_0x5f2e;if(_0x47739c)return _0x47739c['update'](_0x11d467)[_0x5d892f('0x2f')](function(_0x56aa8b){return _0x56aa8b;});return null;};}function removeEntity(_0x4f621e){return function(_0x5a6286){if(_0x5a6286)return _0x5a6286['destroy']()['then'](function(){const _0x5a28e6=a234_0x5f2e;_0x4f621e['status'](0xcc)[_0x5a28e6('0x26')]();});};}function handleEntityNotFound(_0x24bd70){return function(_0x19b595){return!_0x19b595&&_0x24bd70['sendStatus'](0x194),_0x19b595;};}function handleError(_0x499a30,_0x428319){return _0x428319=_0x428319||0x1f4,function(_0x5357bc){const _0x3dfa3e=a234_0x5f2e;logger['error'](_0x5357bc[_0x3dfa3e('0x19')]),_0x5357bc[_0x3dfa3e('0x2')]&&delete _0x5357bc[_0x3dfa3e('0x2')],_0x499a30['status'](_0x428319)[_0x3dfa3e('0x2a')](_0x5357bc);};}exports[_0x5d042d('0x1b')]=function(_0x171f2f,_0xc8acbf){const _0x1c85ca=_0x5d042d;let _0x4c1bc5={};const _0x57cdd6={},_0x4b156d={'count':0x0,'rows':[]},_0x36164e=_[_0x1c85ca('0x21')](db[_0x1c85ca('0x1e')][_0x1c85ca('0x28')],function(_0x510ff9){const _0x4c3bcf=_0x1c85ca;return{'name':_0x510ff9[_0x4c3bcf('0xf')],'type':_0x510ff9[_0x4c3bcf('0x12')]['key']};});_0x57cdd6['model']=_[_0x1c85ca('0x21')](_0x36164e,_0x1c85ca('0x2')),_0x57cdd6['query']=_[_0x1c85ca('0x29')](_0x171f2f[_0x1c85ca('0xa')]),_0x57cdd6['filters']=_['intersection'](_0x57cdd6[_0x1c85ca('0x5')],_0x57cdd6[_0x1c85ca('0xa')]),_0x4c1bc5[_0x1c85ca('0x35')]=_[_0x1c85ca('0x34')](_0x57cdd6['model'],qs[_0x1c85ca('0x10')](_0x171f2f[_0x1c85ca('0xa')][_0x1c85ca('0x10')])),_0x4c1bc5[_0x1c85ca('0x35')]=_0x4c1bc5[_0x1c85ca('0x35')][_0x1c85ca('0x17')]?_0x4c1bc5[_0x1c85ca('0x35')]:_0x57cdd6['model'];typeof _0x171f2f[_0x1c85ca('0xa')]['nolimit']==='undefined'&&(_0x4c1bc5[_0x1c85ca('0x1')]=qs[_0x1c85ca('0x1')](_0x171f2f[_0x1c85ca('0xa')][_0x1c85ca('0x1')]),_0x4c1bc5['offset']=qs[_0x1c85ca('0x13')](_0x171f2f[_0x1c85ca('0xa')]['offset']));_0x4c1bc5['order']=qs[_0x1c85ca('0x15')](_0x171f2f['query'][_0x1c85ca('0x15')]),_0x4c1bc5[_0x1c85ca('0x14')]=qs[_0x1c85ca('0x1a')](_[_0x1c85ca('0x4')](_0x171f2f[_0x1c85ca('0xa')],_0x57cdd6['filters']),_0x36164e);_0x171f2f['query'][_0x1c85ca('0x16')]&&(_0x4c1bc5['where']=_[_0x1c85ca('0x1d')](_0x4c1bc5['where'],{[Op['or']]:_[_0x1c85ca('0x21')](_0x36164e,function(_0x45ecd3){const _0x4bb6e3=_0x1c85ca;if(_0x45ecd3[_0x4bb6e3('0x12')]!==_0x4bb6e3('0x2e')){const _0x562c78={};return _0x562c78[_0x45ecd3[_0x4bb6e3('0x2')]]={[Op[_0x4bb6e3('0x30')]]:'%'+_0x171f2f[_0x4bb6e3('0xa')][_0x4bb6e3('0x16')]+'%'},_0x562c78;}})}));_0x4c1bc5=_[_0x1c85ca('0x1d')]({},_0x4c1bc5,_0x171f2f['options']);const _0x45f2fd={'where':_0x4c1bc5['where']};return db['DeskConfiguration'][_0x1c85ca('0x9')](_0x45f2fd)['then'](function(_0x463e98){const _0x55a1b1=_0x1c85ca;return _0x4b156d['count']=_0x463e98,_0x171f2f[_0x55a1b1('0xa')][_0x55a1b1('0x1c')]&&(_0x4c1bc5[_0x55a1b1('0x23')]=[{'all':!![]}]),db[_0x55a1b1('0x1e')][_0x55a1b1('0x27')](_0x4c1bc5);})[_0x1c85ca('0x2f')](function(_0x106d0c){const _0x20d3af=_0x1c85ca;return _0x4b156d[_0x20d3af('0x32')]=_0x106d0c,_0x4b156d;})[_0x1c85ca('0x2f')](respondWithFilteredResult(_0xc8acbf,_0x4c1bc5))[_0x1c85ca('0x8')](handleError(_0xc8acbf,null));},exports['show']=function(_0x31c12f,_0xf6424){const _0x16c1af=_0x5d042d;let _0x585b41={'raw':![],'where':{'id':_0x31c12f[_0x16c1af('0x31')]['id']}};const _0x37132a={};return _0x37132a[_0x16c1af('0x5')]=_[_0x16c1af('0x29')](db[_0x16c1af('0x1e')][_0x16c1af('0x28')]),_0x37132a['query']=_[_0x16c1af('0x29')](_0x31c12f[_0x16c1af('0xa')]),_0x37132a[_0x16c1af('0x1a')]=_[_0x16c1af('0x34')](_0x37132a[_0x16c1af('0x5')],_0x37132a[_0x16c1af('0xa')]),_0x585b41[_0x16c1af('0x35')]=_[_0x16c1af('0x34')](_0x37132a['model'],qs[_0x16c1af('0x10')](_0x31c12f[_0x16c1af('0xa')][_0x16c1af('0x10')])),_0x585b41[_0x16c1af('0x35')]=_0x585b41[_0x16c1af('0x35')][_0x16c1af('0x17')]?_0x585b41['attributes']:_0x37132a[_0x16c1af('0x5')],_0x31c12f[_0x16c1af('0xa')][_0x16c1af('0x1c')]&&(_0x585b41['include']=[{'all':!![]}]),_0x585b41=_[_0x16c1af('0x1d')]({},_0x585b41,_0x31c12f[_0x16c1af('0xd')]),db[_0x16c1af('0x1e')][_0x16c1af('0x7')](_0x585b41)[_0x16c1af('0x2f')](handleEntityNotFound(_0xf6424,null))[_0x16c1af('0x2f')](respondWithResult(_0xf6424,null))['catch'](handleError(_0xf6424,null));},exports[_0x5d042d('0x6')]=function(_0x5192c1,_0x114019){const _0x5127db=_0x5d042d;return db[_0x5127db('0x1e')][_0x5127db('0x6')](_0x5192c1[_0x5127db('0xe')],{})['then'](respondWithResult(_0x114019,0xc9))[_0x5127db('0x8')](handleError(_0x114019,null));},exports['update']=function(_0x57d6b0,_0x6508d0){const _0x2f75e1=_0x5d042d;return _0x57d6b0[_0x2f75e1('0xe')]['id']&&delete _0x57d6b0[_0x2f75e1('0xe')]['id'],db['DeskConfiguration'][_0x2f75e1('0x7')]({'where':{'id':_0x57d6b0[_0x2f75e1('0x31')]['id']}})['then'](handleEntityNotFound(_0x6508d0,null))[_0x2f75e1('0x2f')](saveUpdates(_0x57d6b0[_0x2f75e1('0xe')],null))['then'](respondWithResult(_0x6508d0,null))[_0x2f75e1('0x8')](handleError(_0x6508d0,null));},exports[_0x5d042d('0x25')]=function(_0x1b9c29,_0x4ce822){const _0x176ebe=_0x5d042d;return db[_0x176ebe('0x1e')][_0x176ebe('0x7')]({'where':{'id':_0x1b9c29[_0x176ebe('0x31')]['id']}})[_0x176ebe('0x2f')](handleEntityNotFound(_0x4ce822,null))[_0x176ebe('0x2f')](removeEntity(_0x4ce822,null))[_0x176ebe('0x8')](handleError(_0x4ce822,null));},exports[_0x5d042d('0x33')]=function(_0x851cb9,_0x14c348){const _0x1813fa=_0x5d042d;let _0xa18b8a={};const _0x596c0c={};let _0x43d679,_0x51e74e;return db[_0x1813fa('0x1e')]['findOne']({'where':{'id':_0x851cb9[_0x1813fa('0x31')]['id']}})[_0x1813fa('0x2f')](handleEntityNotFound(_0x14c348,null))[_0x1813fa('0x2f')](function(_0x544ae4){const _0x6a2e3c=_0x1813fa;if(_0x544ae4)return _0x43d679=_0x544ae4,_0x596c0c['model']=_[_0x6a2e3c('0x29')](db[_0x6a2e3c('0x0')][_0x6a2e3c('0x28')]),_0x596c0c['query']=_[_0x6a2e3c('0x29')](_0x851cb9[_0x6a2e3c('0xa')]),_0x596c0c[_0x6a2e3c('0x1a')]=_[_0x6a2e3c('0x34')](_0x596c0c[_0x6a2e3c('0x5')],_0x596c0c[_0x6a2e3c('0xa')]),_0xa18b8a[_0x6a2e3c('0x35')]=_['intersection'](_0x596c0c[_0x6a2e3c('0x5')],qs[_0x6a2e3c('0x10')](_0x851cb9[_0x6a2e3c('0xa')][_0x6a2e3c('0x10')])),_0xa18b8a['attributes']=_0xa18b8a[_0x6a2e3c('0x35')]['length']?_0xa18b8a[_0x6a2e3c('0x35')]:_0x596c0c[_0x6a2e3c('0x5')],_0xa18b8a['order']=qs['sort'](_0x851cb9['query'][_0x6a2e3c('0x15')]),_0xa18b8a['where']=qs[_0x6a2e3c('0x1a')](_['pick'](_0x851cb9[_0x6a2e3c('0xa')],_0x596c0c[_0x6a2e3c('0x1a')])),_0x851cb9[_0x6a2e3c('0xa')][_0x6a2e3c('0x16')]&&(_0xa18b8a[_0x6a2e3c('0x14')]=_[_0x6a2e3c('0x1d')](_0xa18b8a[_0x6a2e3c('0x14')],{[Op['or']]:_[_0x6a2e3c('0x21')](_0xa18b8a[_0x6a2e3c('0x35')],function(_0x1e8eaf){const _0x10ed09=_0x6a2e3c,_0x41f629={};return _0x41f629[_0x1e8eaf]={[Op[_0x10ed09('0x30')]]:'%'+_0x851cb9[_0x10ed09('0xa')][_0x10ed09('0x16')]+'%'},_0x41f629;})})),_0xa18b8a=_[_0x6a2e3c('0x1d')]({},_0xa18b8a,_0x851cb9[_0x6a2e3c('0xd')]),_0x43d679['getFields'](_0xa18b8a);})['then'](function(_0x325db9){const _0x5a596c=_0x1813fa;if(_0x325db9)return _0x51e74e=_0x325db9['length'],typeof _0x851cb9[_0x5a596c('0xa')]['nolimit']===_0x5a596c('0x1f')&&(_0xa18b8a[_0x5a596c('0x1')]=qs[_0x5a596c('0x1')](_0x851cb9[_0x5a596c('0xa')][_0x5a596c('0x1')]),_0xa18b8a[_0x5a596c('0x13')]=qs[_0x5a596c('0x13')](_0x851cb9[_0x5a596c('0xa')][_0x5a596c('0x13')])),_0x43d679[_0x5a596c('0x33')](_0xa18b8a);})[_0x1813fa('0x2f')](function(_0x3e1d90){if(_0x3e1d90)return _0x3e1d90?{'count':_0x51e74e,'rows':_0x3e1d90}:null;})[_0x1813fa('0x2f')](respondWithResult(_0x14c348,null))[_0x1813fa('0x8')](handleError(_0x14c348,null));},exports[_0x5d042d('0x39')]=function(_0x4551cb,_0x3eb8ff){const _0x5ca8e3=_0x5d042d;let _0x1d70ec={};const _0x5bce1d={};let _0x4c4f2e,_0x2c192d;return db['DeskConfiguration']['findOne']({'where':{'id':_0x4551cb['params']['id']}})[_0x5ca8e3('0x2f')](handleEntityNotFound(_0x3eb8ff,null))[_0x5ca8e3('0x2f')](function(_0x533063){const _0x4e231e=_0x5ca8e3;if(_0x533063)return _0x4c4f2e=_0x533063,_0x5bce1d[_0x4e231e('0x5')]=_[_0x4e231e('0x29')](db[_0x4e231e('0x0')][_0x4e231e('0x28')]),_0x5bce1d[_0x4e231e('0xa')]=_[_0x4e231e('0x29')](_0x4551cb[_0x4e231e('0xa')]),_0x5bce1d[_0x4e231e('0x1a')]=_[_0x4e231e('0x34')](_0x5bce1d[_0x4e231e('0x5')],_0x5bce1d[_0x4e231e('0xa')]),_0x1d70ec[_0x4e231e('0x35')]=_[_0x4e231e('0x34')](_0x5bce1d[_0x4e231e('0x5')],qs[_0x4e231e('0x10')](_0x4551cb['query'][_0x4e231e('0x10')])),_0x1d70ec[_0x4e231e('0x35')]=_0x1d70ec[_0x4e231e('0x35')][_0x4e231e('0x17')]?_0x1d70ec[_0x4e231e('0x35')]:_0x5bce1d[_0x4e231e('0x5')],_0x1d70ec[_0x4e231e('0x36')]=qs['sort'](_0x4551cb[_0x4e231e('0xa')][_0x4e231e('0x15')]),_0x1d70ec['where']=qs['filters'](_['pick'](_0x4551cb[_0x4e231e('0xa')],_0x5bce1d['filters'])),_0x4551cb['query'][_0x4e231e('0x16')]&&(_0x1d70ec['where']=_['merge'](_0x1d70ec['where'],{[Op['or']]:_[_0x4e231e('0x21')](_0x1d70ec[_0x4e231e('0x35')],function(_0x23cd52){const _0x24850a=_0x4e231e,_0x478ff9={};return _0x478ff9[_0x23cd52]={[Op[_0x24850a('0x30')]]:'%'+_0x4551cb[_0x24850a('0xa')][_0x24850a('0x16')]+'%'},_0x478ff9;})})),_0x1d70ec=_[_0x4e231e('0x1d')]({},_0x1d70ec,_0x4551cb[_0x4e231e('0xd')]),_0x4c4f2e['getSubjects'](_0x1d70ec);})[_0x5ca8e3('0x2f')](function(_0x20ed7b){const _0x2f25e7=_0x5ca8e3;if(_0x20ed7b)return _0x2c192d=_0x20ed7b['length'],typeof _0x4551cb[_0x2f25e7('0xa')][_0x2f25e7('0x3')]===_0x2f25e7('0x1f')&&(_0x1d70ec[_0x2f25e7('0x1')]=qs[_0x2f25e7('0x1')](_0x4551cb[_0x2f25e7('0xa')]['limit']),_0x1d70ec[_0x2f25e7('0x13')]=qs[_0x2f25e7('0x13')](_0x4551cb['query']['offset'])),_0x4c4f2e['getSubjects'](_0x1d70ec);})[_0x5ca8e3('0x2f')](function(_0x2256eb){if(_0x2256eb)return _0x2256eb?{'count':_0x2c192d,'rows':_0x2256eb}:null;})[_0x5ca8e3('0x2f')](respondWithResult(_0x3eb8ff,null))['catch'](handleError(_0x3eb8ff,null));},exports[_0x5d042d('0x2d')]=function(_0x4b9328,_0x5c99d6){const _0x21bff5=_0x5d042d;let _0x4f1aa4={};const _0x35f567={};let _0x2db274,_0x45f0d2;return db['DeskConfiguration'][_0x21bff5('0x7')]({'where':{'id':_0x4b9328[_0x21bff5('0x31')]['id']}})[_0x21bff5('0x2f')](handleEntityNotFound(_0x5c99d6,null))[_0x21bff5('0x2f')](function(_0x3adde9){const _0x185b23=_0x21bff5;if(_0x3adde9)return _0x2db274=_0x3adde9,_0x35f567['model']=_[_0x185b23('0x29')](db[_0x185b23('0x0')]['rawAttributes']),_0x35f567['query']=_['keys'](_0x4b9328['query']),_0x35f567['filters']=_[_0x185b23('0x34')](_0x35f567[_0x185b23('0x5')],_0x35f567[_0x185b23('0xa')]),_0x4f1aa4[_0x185b23('0x35')]=_[_0x185b23('0x34')](_0x35f567[_0x185b23('0x5')],qs['fields'](_0x4b9328[_0x185b23('0xa')]['fields'])),_0x4f1aa4['attributes']=_0x4f1aa4[_0x185b23('0x35')]['length']?_0x4f1aa4[_0x185b23('0x35')]:_0x35f567[_0x185b23('0x5')],_0x4f1aa4[_0x185b23('0x36')]=qs[_0x185b23('0x15')](_0x4b9328[_0x185b23('0xa')][_0x185b23('0x15')]),_0x4f1aa4['where']=qs[_0x185b23('0x1a')](_[_0x185b23('0x4')](_0x4b9328['query'],_0x35f567[_0x185b23('0x1a')])),_0x4b9328[_0x185b23('0xa')][_0x185b23('0x16')]&&(_0x4f1aa4['where']=_['merge'](_0x4f1aa4['where'],{[Op['or']]:_[_0x185b23('0x21')](_0x4f1aa4[_0x185b23('0x35')],function(_0x26ae93){const _0x71648f=_0x185b23,_0x8f4fa0={};return _0x8f4fa0[_0x26ae93]={[Op['like']]:'%'+_0x4b9328[_0x71648f('0xa')][_0x71648f('0x16')]+'%'},_0x8f4fa0;})})),_0x4f1aa4=_[_0x185b23('0x1d')]({},_0x4f1aa4,_0x4b9328[_0x185b23('0xd')]),_0x2db274[_0x185b23('0x2d')](_0x4f1aa4);})['then'](function(_0x235e02){const _0x21d83b=_0x21bff5;if(_0x235e02)return _0x45f0d2=_0x235e02[_0x21d83b('0x17')],typeof _0x4b9328[_0x21d83b('0xa')][_0x21d83b('0x3')]===_0x21d83b('0x1f')&&(_0x4f1aa4[_0x21d83b('0x1')]=qs[_0x21d83b('0x1')](_0x4b9328[_0x21d83b('0xa')][_0x21d83b('0x1')]),_0x4f1aa4[_0x21d83b('0x13')]=qs[_0x21d83b('0x13')](_0x4b9328['query'][_0x21d83b('0x13')])),_0x2db274['getDescriptions'](_0x4f1aa4);})[_0x21bff5('0x2f')](function(_0x1f87cd){if(_0x1f87cd)return _0x1f87cd?{'count':_0x45f0d2,'rows':_0x1f87cd}:null;})[_0x21bff5('0x2f')](respondWithResult(_0x5c99d6,null))['catch'](handleError(_0x5c99d6,null));},exports[_0x5d042d('0x11')]=function(_0x5e2add,_0x136f4c){const _0x1b96b6=_0x5d042d;let _0x152ba1={};const _0x560d08={};let _0x1b8447,_0x490e17;return db[_0x1b96b6('0x1e')][_0x1b96b6('0x7')]({'where':{'id':_0x5e2add[_0x1b96b6('0x31')]['id']}})[_0x1b96b6('0x2f')](handleEntityNotFound(_0x136f4c,null))[_0x1b96b6('0x2f')](function(_0x27096f){const _0xd1af91=_0x1b96b6;if(_0x27096f)return _0x1b8447=_0x27096f,_0x560d08[_0xd1af91('0x5')]=_['keys'](db[_0xd1af91('0x2b')][_0xd1af91('0x28')]),_0x560d08[_0xd1af91('0xa')]=_[_0xd1af91('0x29')](_0x5e2add[_0xd1af91('0xa')]),_0x560d08[_0xd1af91('0x1a')]=_['intersection'](_0x560d08[_0xd1af91('0x5')],_0x560d08[_0xd1af91('0xa')]),_0x152ba1[_0xd1af91('0x35')]=_['intersection'](_0x560d08[_0xd1af91('0x5')],qs[_0xd1af91('0x10')](_0x5e2add[_0xd1af91('0xa')][_0xd1af91('0x10')])),_0x152ba1[_0xd1af91('0x35')]=_0x152ba1[_0xd1af91('0x35')][_0xd1af91('0x17')]?_0x152ba1[_0xd1af91('0x35')]:_0x560d08[_0xd1af91('0x5')],_0x152ba1['order']=qs[_0xd1af91('0x15')](_0x5e2add['query'][_0xd1af91('0x15')]),_0x152ba1[_0xd1af91('0x14')]=qs['filters'](_['pick'](_0x5e2add[_0xd1af91('0xa')],_0x560d08[_0xd1af91('0x1a')])),_0x5e2add[_0xd1af91('0xa')][_0xd1af91('0x16')]&&(_0x152ba1[_0xd1af91('0x14')]=_['merge'](_0x152ba1['where'],{[Op['or']]:_[_0xd1af91('0x21')](_0x152ba1['attributes'],function(_0x19abce){const _0x177214=_0xd1af91,_0x497d95={};return _0x497d95[_0x19abce]={[Op[_0x177214('0x30')]]:'%'+_0x5e2add['query'][_0x177214('0x16')]+'%'},_0x497d95;})})),_0x152ba1=_[_0xd1af91('0x1d')]({},_0x152ba1,_0x5e2add['options']),_0x1b8447[_0xd1af91('0x11')](_0x152ba1);})[_0x1b96b6('0x2f')](function(_0xc15baf){const _0x105dae=_0x1b96b6;if(_0xc15baf)return _0x490e17=_0xc15baf[_0x105dae('0x17')],typeof _0x5e2add[_0x105dae('0xa')][_0x105dae('0x3')]===_0x105dae('0x1f')&&(_0x152ba1['limit']=qs[_0x105dae('0x1')](_0x5e2add[_0x105dae('0xa')][_0x105dae('0x1')]),_0x152ba1['offset']=qs[_0x105dae('0x13')](_0x5e2add[_0x105dae('0xa')][_0x105dae('0x13')])),_0x1b8447[_0x105dae('0x11')](_0x152ba1);})[_0x1b96b6('0x2f')](function(_0x131473){if(_0x131473)return _0x131473?{'count':_0x490e17,'rows':_0x131473}:null;})['then'](respondWithResult(_0x136f4c,null))[_0x1b96b6('0x8')](handleError(_0x136f4c,null));},exports[_0x5d042d('0xc')]=function(_0x32c6cb,_0x2315c4){const _0x1b364a=_0x5d042d;return _0x32c6cb[_0x1b364a('0xe')]['id']&&delete _0x32c6cb[_0x1b364a('0xe')]['id'],db['DeskConfiguration']['findOne']({'where':{'id':_0x32c6cb[_0x1b364a('0x31')]['id']}})['then'](handleEntityNotFound(_0x2315c4,null))[_0x1b364a('0x2f')](function(_0x33cac5){const _0x164689=_0x1b364a;if(_0x33cac5)return _0x33cac5[_0x164689('0xc')](_0x32c6cb[_0x164689('0xe')][_0x164689('0x38')]||[]);return null;})['then'](respondWithResult(_0x2315c4,null))[_0x1b364a('0x8')](handleError(_0x2315c4,null));};
\ No newline at end of file
+const a234_0x584d=['fieldName','fields','nolimit','sendStatus','sort','intersection','end','pick','then','rawAttributes','destroy','query','getSubjects','model','where','body','update','../../components/parsers/qs','length','api','count','limit','params','like','json','map','show','index','send','catch','status','Tag','setTags','findAll','getDescriptions','offset','DeskConfiguration','include','error','VIRTUAL','attributes','getTags','keys','includeAll','undefined','options','filter','DeskField','merge','order','sequelize','Content-Range','../../config/logger','name','filters','stack','getFields','findOne'];(function(_0x583c9a,_0x584d0a){const _0x287ebb=function(_0x3417a4){while(--_0x3417a4){_0x583c9a['push'](_0x583c9a['shift']());}};_0x287ebb(++_0x584d0a);}(a234_0x584d,0x184));const a234_0x287e=function(_0x583c9a,_0x584d0a){_0x583c9a=_0x583c9a-0x0;let _0x287ebb=a234_0x584d[_0x583c9a];return _0x287ebb;};const _0x3afd02=a234_0x287e;'use strict';const _=require('lodash'),qs=require(_0x3afd02('0x23')),logger=require(_0x3afd02('0xc'))(_0x3afd02('0x25')),db=require('../../mysqldb')['db'],{Op}=require(_0x3afd02('0xa'));function respondWithResult(_0x3417a4,_0x4550de){return _0x4550de=_0x4550de||0xc8,function(_0x50da42){const _0x52b63c=a234_0x287e;if(_0x50da42)return _0x3417a4['status'](_0x4550de)[_0x52b63c('0x2a')](_0x50da42);};}function respondWithFilteredResult(_0x13d344,_0x59761){return function(_0x1202d7){const _0x1c9f3f=a234_0x287e;if(_0x1202d7){const _0x46cb0c=_0x1202d7[_0x1c9f3f('0x26')],_0x20124c=_0x59761[_0x1c9f3f('0x35')];let _0x1c4ed8=_0x59761['offset']+_0x59761['limit'],_0x4a375b;return _0x1c4ed8>=_0x46cb0c?(_0x1c4ed8=_0x46cb0c,_0x4a375b=0xc8):_0x4a375b=0xce,_0x13d344[_0x1c9f3f('0x30')](_0x4a375b),_0x13d344['set'](_0x1c9f3f('0xb'),_0x20124c+'-'+_0x1c4ed8+'/'+_0x46cb0c)['json'](_0x1202d7);}return null;};}function saveUpdates(_0x4f0f5f){return function(_0x53f332){const _0x356d38=a234_0x287e;if(_0x53f332)return _0x53f332[_0x356d38('0x22')](_0x4f0f5f)[_0x356d38('0x1a')](function(_0x35a916){return _0x35a916;});return null;};}function removeEntity(_0xb2d954){return function(_0x314fdd){const _0x53d321=a234_0x287e;if(_0x314fdd)return _0x314fdd[_0x53d321('0x1c')]()['then'](function(){const _0x5720ca=_0x53d321;_0xb2d954['status'](0xcc)[_0x5720ca('0x18')]();});};}function handleEntityNotFound(_0xf68d7){return function(_0x56095f){const _0x35bb94=a234_0x287e;return!_0x56095f&&_0xf68d7[_0x35bb94('0x15')](0x194),_0x56095f;};}function handleError(_0x53e49c,_0x2899d6){return _0x2899d6=_0x2899d6||0x1f4,function(_0x2a07a7){const _0x2ab62f=a234_0x287e;logger[_0x2ab62f('0x38')](_0x2a07a7[_0x2ab62f('0xf')]),_0x2a07a7[_0x2ab62f('0xd')]&&delete _0x2a07a7[_0x2ab62f('0xd')],_0x53e49c[_0x2ab62f('0x30')](_0x2899d6)[_0x2ab62f('0x2e')](_0x2a07a7);};}exports[_0x3afd02('0x2d')]=function(_0x39c843,_0x275bfd){const _0x5329e3=_0x3afd02;let _0x4ab161={};const _0x4cf87a={},_0x19e523={'count':0x0,'rows':[]},_0x297141=_[_0x5329e3('0x2b')](db[_0x5329e3('0x36')][_0x5329e3('0x1b')],function(_0x4cce6a){const _0xe07aad=_0x5329e3;return{'name':_0x4cce6a[_0xe07aad('0x12')],'type':_0x4cce6a['type']['key']};});_0x4cf87a['model']=_['map'](_0x297141,_0x5329e3('0xd')),_0x4cf87a[_0x5329e3('0x1d')]=_[_0x5329e3('0x2')](_0x39c843['query']),_0x4cf87a[_0x5329e3('0xe')]=_[_0x5329e3('0x17')](_0x4cf87a[_0x5329e3('0x1f')],_0x4cf87a[_0x5329e3('0x1d')]),_0x4ab161[_0x5329e3('0x0')]=_[_0x5329e3('0x17')](_0x4cf87a[_0x5329e3('0x1f')],qs[_0x5329e3('0x13')](_0x39c843[_0x5329e3('0x1d')][_0x5329e3('0x13')])),_0x4ab161[_0x5329e3('0x0')]=_0x4ab161[_0x5329e3('0x0')][_0x5329e3('0x24')]?_0x4ab161[_0x5329e3('0x0')]:_0x4cf87a[_0x5329e3('0x1f')];typeof _0x39c843[_0x5329e3('0x1d')][_0x5329e3('0x14')]===_0x5329e3('0x4')&&(_0x4ab161['limit']=qs[_0x5329e3('0x27')](_0x39c843[_0x5329e3('0x1d')]['limit']),_0x4ab161[_0x5329e3('0x35')]=qs[_0x5329e3('0x35')](_0x39c843['query'][_0x5329e3('0x35')]));_0x4ab161[_0x5329e3('0x9')]=qs[_0x5329e3('0x16')](_0x39c843['query']['sort']),_0x4ab161[_0x5329e3('0x20')]=qs['filters'](_['pick'](_0x39c843['query'],_0x4cf87a[_0x5329e3('0xe')]),_0x297141);_0x39c843[_0x5329e3('0x1d')][_0x5329e3('0x6')]&&(_0x4ab161[_0x5329e3('0x20')]=_[_0x5329e3('0x8')](_0x4ab161[_0x5329e3('0x20')],{[Op['or']]:_[_0x5329e3('0x2b')](_0x297141,function(_0x3b2cf0){const _0x27c040=_0x5329e3;if(_0x3b2cf0['type']!==_0x27c040('0x39')){const _0x416bd4={};return _0x416bd4[_0x3b2cf0[_0x27c040('0xd')]]={[Op['like']]:'%'+_0x39c843[_0x27c040('0x1d')][_0x27c040('0x6')]+'%'},_0x416bd4;}})}));_0x4ab161=_[_0x5329e3('0x8')]({},_0x4ab161,_0x39c843[_0x5329e3('0x5')]);const _0x1aaf3b={'where':_0x4ab161['where']};return db[_0x5329e3('0x36')][_0x5329e3('0x26')](_0x1aaf3b)[_0x5329e3('0x1a')](function(_0x5f4dc9){const _0xc3b9bd=_0x5329e3;return _0x19e523[_0xc3b9bd('0x26')]=_0x5f4dc9,_0x39c843[_0xc3b9bd('0x1d')][_0xc3b9bd('0x3')]&&(_0x4ab161[_0xc3b9bd('0x37')]=[{'all':!![]}]),db['DeskConfiguration'][_0xc3b9bd('0x33')](_0x4ab161);})[_0x5329e3('0x1a')](function(_0x37f3ca){return _0x19e523['rows']=_0x37f3ca,_0x19e523;})[_0x5329e3('0x1a')](respondWithFilteredResult(_0x275bfd,_0x4ab161))[_0x5329e3('0x2f')](handleError(_0x275bfd,null));},exports[_0x3afd02('0x2c')]=function(_0x15ae51,_0x46126c){const _0x297fc0=_0x3afd02;let _0x4a30ac={'raw':![],'where':{'id':_0x15ae51[_0x297fc0('0x28')]['id']}};const _0x1879a3={};return _0x1879a3[_0x297fc0('0x1f')]=_[_0x297fc0('0x2')](db[_0x297fc0('0x36')][_0x297fc0('0x1b')]),_0x1879a3[_0x297fc0('0x1d')]=_[_0x297fc0('0x2')](_0x15ae51['query']),_0x1879a3[_0x297fc0('0xe')]=_['intersection'](_0x1879a3[_0x297fc0('0x1f')],_0x1879a3['query']),_0x4a30ac[_0x297fc0('0x0')]=_['intersection'](_0x1879a3[_0x297fc0('0x1f')],qs[_0x297fc0('0x13')](_0x15ae51['query'][_0x297fc0('0x13')])),_0x4a30ac['attributes']=_0x4a30ac['attributes']['length']?_0x4a30ac[_0x297fc0('0x0')]:_0x1879a3[_0x297fc0('0x1f')],_0x15ae51[_0x297fc0('0x1d')]['includeAll']&&(_0x4a30ac[_0x297fc0('0x37')]=[{'all':!![]}]),_0x4a30ac=_[_0x297fc0('0x8')]({},_0x4a30ac,_0x15ae51['options']),db[_0x297fc0('0x36')][_0x297fc0('0x11')](_0x4a30ac)['then'](handleEntityNotFound(_0x46126c,null))[_0x297fc0('0x1a')](respondWithResult(_0x46126c,null))[_0x297fc0('0x2f')](handleError(_0x46126c,null));},exports['create']=function(_0x2d3b7c,_0x414b3e){const _0x2ddbb1=_0x3afd02;return db[_0x2ddbb1('0x36')]['create'](_0x2d3b7c[_0x2ddbb1('0x21')],{})[_0x2ddbb1('0x1a')](respondWithResult(_0x414b3e,0xc9))[_0x2ddbb1('0x2f')](handleError(_0x414b3e,null));},exports[_0x3afd02('0x22')]=function(_0x46275f,_0x3a407b){const _0x1bf598=_0x3afd02;return _0x46275f[_0x1bf598('0x21')]['id']&&delete _0x46275f['body']['id'],db[_0x1bf598('0x36')][_0x1bf598('0x11')]({'where':{'id':_0x46275f[_0x1bf598('0x28')]['id']}})[_0x1bf598('0x1a')](handleEntityNotFound(_0x3a407b,null))[_0x1bf598('0x1a')](saveUpdates(_0x46275f[_0x1bf598('0x21')],null))[_0x1bf598('0x1a')](respondWithResult(_0x3a407b,null))[_0x1bf598('0x2f')](handleError(_0x3a407b,null));},exports['destroy']=function(_0x13f6e7,_0x1794b9){const _0x233092=_0x3afd02;return db[_0x233092('0x36')]['findOne']({'where':{'id':_0x13f6e7[_0x233092('0x28')]['id']}})[_0x233092('0x1a')](handleEntityNotFound(_0x1794b9,null))[_0x233092('0x1a')](removeEntity(_0x1794b9,null))[_0x233092('0x2f')](handleError(_0x1794b9,null));},exports['getFields']=function(_0x47dc4c,_0x55f995){const _0x4ae36d=_0x3afd02;let _0x314166={};const _0x4046bd={};let _0x5cf990,_0x32f28f;return db[_0x4ae36d('0x36')][_0x4ae36d('0x11')]({'where':{'id':_0x47dc4c[_0x4ae36d('0x28')]['id']}})['then'](handleEntityNotFound(_0x55f995,null))[_0x4ae36d('0x1a')](function(_0x3d403c){const _0x1faa1d=_0x4ae36d;if(_0x3d403c)return _0x5cf990=_0x3d403c,_0x4046bd['model']=_[_0x1faa1d('0x2')](db[_0x1faa1d('0x7')][_0x1faa1d('0x1b')]),_0x4046bd[_0x1faa1d('0x1d')]=_['keys'](_0x47dc4c['query']),_0x4046bd[_0x1faa1d('0xe')]=_[_0x1faa1d('0x17')](_0x4046bd[_0x1faa1d('0x1f')],_0x4046bd[_0x1faa1d('0x1d')]),_0x314166[_0x1faa1d('0x0')]=_[_0x1faa1d('0x17')](_0x4046bd[_0x1faa1d('0x1f')],qs['fields'](_0x47dc4c[_0x1faa1d('0x1d')]['fields'])),_0x314166[_0x1faa1d('0x0')]=_0x314166[_0x1faa1d('0x0')]['length']?_0x314166[_0x1faa1d('0x0')]:_0x4046bd[_0x1faa1d('0x1f')],_0x314166[_0x1faa1d('0x9')]=qs[_0x1faa1d('0x16')](_0x47dc4c['query']['sort']),_0x314166['where']=qs[_0x1faa1d('0xe')](_[_0x1faa1d('0x19')](_0x47dc4c['query'],_0x4046bd[_0x1faa1d('0xe')])),_0x47dc4c[_0x1faa1d('0x1d')][_0x1faa1d('0x6')]&&(_0x314166[_0x1faa1d('0x20')]=_[_0x1faa1d('0x8')](_0x314166['where'],{[Op['or']]:_[_0x1faa1d('0x2b')](_0x314166[_0x1faa1d('0x0')],function(_0x5e9ed7){const _0x3209e7=_0x1faa1d,_0x50133e={};return _0x50133e[_0x5e9ed7]={[Op['like']]:'%'+_0x47dc4c[_0x3209e7('0x1d')][_0x3209e7('0x6')]+'%'},_0x50133e;})})),_0x314166=_['merge']({},_0x314166,_0x47dc4c['options']),_0x5cf990[_0x1faa1d('0x10')](_0x314166);})[_0x4ae36d('0x1a')](function(_0x17a98e){const _0x359651=_0x4ae36d;if(_0x17a98e)return _0x32f28f=_0x17a98e[_0x359651('0x24')],typeof _0x47dc4c[_0x359651('0x1d')][_0x359651('0x14')]===_0x359651('0x4')&&(_0x314166[_0x359651('0x27')]=qs[_0x359651('0x27')](_0x47dc4c[_0x359651('0x1d')][_0x359651('0x27')]),_0x314166[_0x359651('0x35')]=qs[_0x359651('0x35')](_0x47dc4c[_0x359651('0x1d')]['offset'])),_0x5cf990[_0x359651('0x10')](_0x314166);})[_0x4ae36d('0x1a')](function(_0x41ccd7){if(_0x41ccd7)return _0x41ccd7?{'count':_0x32f28f,'rows':_0x41ccd7}:null;})['then'](respondWithResult(_0x55f995,null))[_0x4ae36d('0x2f')](handleError(_0x55f995,null));},exports['getSubjects']=function(_0x348882,_0x9143ed){const _0x9f72db=_0x3afd02;let _0xd13936={};const _0x11bcce={};let _0x37b4cf,_0x10d54d;return db[_0x9f72db('0x36')][_0x9f72db('0x11')]({'where':{'id':_0x348882[_0x9f72db('0x28')]['id']}})[_0x9f72db('0x1a')](handleEntityNotFound(_0x9143ed,null))[_0x9f72db('0x1a')](function(_0x5946a2){const _0x2f8358=_0x9f72db;if(_0x5946a2)return _0x37b4cf=_0x5946a2,_0x11bcce[_0x2f8358('0x1f')]=_['keys'](db[_0x2f8358('0x7')]['rawAttributes']),_0x11bcce[_0x2f8358('0x1d')]=_[_0x2f8358('0x2')](_0x348882[_0x2f8358('0x1d')]),_0x11bcce[_0x2f8358('0xe')]=_[_0x2f8358('0x17')](_0x11bcce[_0x2f8358('0x1f')],_0x11bcce[_0x2f8358('0x1d')]),_0xd13936['attributes']=_['intersection'](_0x11bcce[_0x2f8358('0x1f')],qs[_0x2f8358('0x13')](_0x348882['query'][_0x2f8358('0x13')])),_0xd13936['attributes']=_0xd13936[_0x2f8358('0x0')]['length']?_0xd13936[_0x2f8358('0x0')]:_0x11bcce[_0x2f8358('0x1f')],_0xd13936[_0x2f8358('0x9')]=qs[_0x2f8358('0x16')](_0x348882[_0x2f8358('0x1d')][_0x2f8358('0x16')]),_0xd13936[_0x2f8358('0x20')]=qs['filters'](_[_0x2f8358('0x19')](_0x348882['query'],_0x11bcce[_0x2f8358('0xe')])),_0x348882[_0x2f8358('0x1d')][_0x2f8358('0x6')]&&(_0xd13936[_0x2f8358('0x20')]=_[_0x2f8358('0x8')](_0xd13936[_0x2f8358('0x20')],{[Op['or']]:_[_0x2f8358('0x2b')](_0xd13936['attributes'],function(_0x112bc2){const _0x1e691f=_0x2f8358,_0x5188fc={};return _0x5188fc[_0x112bc2]={[Op[_0x1e691f('0x29')]]:'%'+_0x348882[_0x1e691f('0x1d')][_0x1e691f('0x6')]+'%'},_0x5188fc;})})),_0xd13936=_[_0x2f8358('0x8')]({},_0xd13936,_0x348882[_0x2f8358('0x5')]),_0x37b4cf[_0x2f8358('0x1e')](_0xd13936);})[_0x9f72db('0x1a')](function(_0x253cc6){const _0xc1a7f5=_0x9f72db;if(_0x253cc6)return _0x10d54d=_0x253cc6['length'],typeof _0x348882[_0xc1a7f5('0x1d')]['nolimit']===_0xc1a7f5('0x4')&&(_0xd13936['limit']=qs[_0xc1a7f5('0x27')](_0x348882[_0xc1a7f5('0x1d')]['limit']),_0xd13936[_0xc1a7f5('0x35')]=qs['offset'](_0x348882[_0xc1a7f5('0x1d')][_0xc1a7f5('0x35')])),_0x37b4cf[_0xc1a7f5('0x1e')](_0xd13936);})[_0x9f72db('0x1a')](function(_0x25b57f){if(_0x25b57f)return _0x25b57f?{'count':_0x10d54d,'rows':_0x25b57f}:null;})[_0x9f72db('0x1a')](respondWithResult(_0x9143ed,null))[_0x9f72db('0x2f')](handleError(_0x9143ed,null));},exports[_0x3afd02('0x34')]=function(_0x279f57,_0x807dd5){const _0x58696e=_0x3afd02;let _0x2cb1fb={};const _0x1fcdcd={};let _0x1a0483,_0x135192;return db[_0x58696e('0x36')][_0x58696e('0x11')]({'where':{'id':_0x279f57[_0x58696e('0x28')]['id']}})['then'](handleEntityNotFound(_0x807dd5,null))[_0x58696e('0x1a')](function(_0xf7e657){const _0x59edb3=_0x58696e;if(_0xf7e657)return _0x1a0483=_0xf7e657,_0x1fcdcd[_0x59edb3('0x1f')]=_[_0x59edb3('0x2')](db[_0x59edb3('0x7')][_0x59edb3('0x1b')]),_0x1fcdcd['query']=_[_0x59edb3('0x2')](_0x279f57[_0x59edb3('0x1d')]),_0x1fcdcd[_0x59edb3('0xe')]=_[_0x59edb3('0x17')](_0x1fcdcd[_0x59edb3('0x1f')],_0x1fcdcd['query']),_0x2cb1fb[_0x59edb3('0x0')]=_['intersection'](_0x1fcdcd['model'],qs[_0x59edb3('0x13')](_0x279f57[_0x59edb3('0x1d')][_0x59edb3('0x13')])),_0x2cb1fb['attributes']=_0x2cb1fb[_0x59edb3('0x0')][_0x59edb3('0x24')]?_0x2cb1fb['attributes']:_0x1fcdcd[_0x59edb3('0x1f')],_0x2cb1fb[_0x59edb3('0x9')]=qs[_0x59edb3('0x16')](_0x279f57[_0x59edb3('0x1d')][_0x59edb3('0x16')]),_0x2cb1fb['where']=qs['filters'](_['pick'](_0x279f57[_0x59edb3('0x1d')],_0x1fcdcd[_0x59edb3('0xe')])),_0x279f57[_0x59edb3('0x1d')][_0x59edb3('0x6')]&&(_0x2cb1fb[_0x59edb3('0x20')]=_[_0x59edb3('0x8')](_0x2cb1fb[_0x59edb3('0x20')],{[Op['or']]:_['map'](_0x2cb1fb[_0x59edb3('0x0')],function(_0x2d9e82){const _0xa85c8f=_0x59edb3,_0x4a9733={};return _0x4a9733[_0x2d9e82]={[Op[_0xa85c8f('0x29')]]:'%'+_0x279f57['query'][_0xa85c8f('0x6')]+'%'},_0x4a9733;})})),_0x2cb1fb=_[_0x59edb3('0x8')]({},_0x2cb1fb,_0x279f57['options']),_0x1a0483[_0x59edb3('0x34')](_0x2cb1fb);})['then'](function(_0x3d1fd8){const _0x21707a=_0x58696e;if(_0x3d1fd8)return _0x135192=_0x3d1fd8[_0x21707a('0x24')],typeof _0x279f57['query'][_0x21707a('0x14')]===_0x21707a('0x4')&&(_0x2cb1fb['limit']=qs[_0x21707a('0x27')](_0x279f57[_0x21707a('0x1d')][_0x21707a('0x27')]),_0x2cb1fb[_0x21707a('0x35')]=qs[_0x21707a('0x35')](_0x279f57[_0x21707a('0x1d')][_0x21707a('0x35')])),_0x1a0483['getDescriptions'](_0x2cb1fb);})[_0x58696e('0x1a')](function(_0x234bdf){if(_0x234bdf)return _0x234bdf?{'count':_0x135192,'rows':_0x234bdf}:null;})[_0x58696e('0x1a')](respondWithResult(_0x807dd5,null))[_0x58696e('0x2f')](handleError(_0x807dd5,null));},exports[_0x3afd02('0x1')]=function(_0x52fa78,_0x4b74e1){const _0x2d4493=_0x3afd02;let _0x369716={};const _0x53b3e4={};let _0x3f3f3d,_0x502f05;return db['DeskConfiguration'][_0x2d4493('0x11')]({'where':{'id':_0x52fa78['params']['id']}})[_0x2d4493('0x1a')](handleEntityNotFound(_0x4b74e1,null))[_0x2d4493('0x1a')](function(_0x571f72){const _0x21df92=_0x2d4493;if(_0x571f72)return _0x3f3f3d=_0x571f72,_0x53b3e4[_0x21df92('0x1f')]=_['keys'](db[_0x21df92('0x31')]['rawAttributes']),_0x53b3e4[_0x21df92('0x1d')]=_[_0x21df92('0x2')](_0x52fa78[_0x21df92('0x1d')]),_0x53b3e4[_0x21df92('0xe')]=_[_0x21df92('0x17')](_0x53b3e4[_0x21df92('0x1f')],_0x53b3e4[_0x21df92('0x1d')]),_0x369716[_0x21df92('0x0')]=_[_0x21df92('0x17')](_0x53b3e4[_0x21df92('0x1f')],qs[_0x21df92('0x13')](_0x52fa78[_0x21df92('0x1d')][_0x21df92('0x13')])),_0x369716['attributes']=_0x369716['attributes'][_0x21df92('0x24')]?_0x369716['attributes']:_0x53b3e4[_0x21df92('0x1f')],_0x369716[_0x21df92('0x9')]=qs['sort'](_0x52fa78[_0x21df92('0x1d')][_0x21df92('0x16')]),_0x369716['where']=qs['filters'](_[_0x21df92('0x19')](_0x52fa78['query'],_0x53b3e4[_0x21df92('0xe')])),_0x52fa78[_0x21df92('0x1d')][_0x21df92('0x6')]&&(_0x369716[_0x21df92('0x20')]=_[_0x21df92('0x8')](_0x369716[_0x21df92('0x20')],{[Op['or']]:_[_0x21df92('0x2b')](_0x369716[_0x21df92('0x0')],function(_0x2a90ea){const _0x2cfb9b=_0x21df92,_0x1e02e0={};return _0x1e02e0[_0x2a90ea]={[Op[_0x2cfb9b('0x29')]]:'%'+_0x52fa78['query']['filter']+'%'},_0x1e02e0;})})),_0x369716=_[_0x21df92('0x8')]({},_0x369716,_0x52fa78[_0x21df92('0x5')]),_0x3f3f3d[_0x21df92('0x1')](_0x369716);})[_0x2d4493('0x1a')](function(_0x4f7137){const _0x1b6eb0=_0x2d4493;if(_0x4f7137)return _0x502f05=_0x4f7137['length'],typeof _0x52fa78[_0x1b6eb0('0x1d')][_0x1b6eb0('0x14')]==='undefined'&&(_0x369716[_0x1b6eb0('0x27')]=qs[_0x1b6eb0('0x27')](_0x52fa78['query'][_0x1b6eb0('0x27')]),_0x369716[_0x1b6eb0('0x35')]=qs[_0x1b6eb0('0x35')](_0x52fa78[_0x1b6eb0('0x1d')][_0x1b6eb0('0x35')])),_0x3f3f3d[_0x1b6eb0('0x1')](_0x369716);})['then'](function(_0x50a0aa){if(_0x50a0aa)return _0x50a0aa?{'count':_0x502f05,'rows':_0x50a0aa}:null;})['then'](respondWithResult(_0x4b74e1,null))[_0x2d4493('0x2f')](handleError(_0x4b74e1,null));},exports[_0x3afd02('0x32')]=function(_0x5cece5,_0x247a93){const _0x698be1=_0x3afd02;return _0x5cece5['body']['id']&&delete _0x5cece5[_0x698be1('0x21')]['id'],db[_0x698be1('0x36')][_0x698be1('0x11')]({'where':{'id':_0x5cece5[_0x698be1('0x28')]['id']}})[_0x698be1('0x1a')](handleEntityNotFound(_0x247a93,null))[_0x698be1('0x1a')](function(_0x2af0b){const _0x4a12e6=_0x698be1;if(_0x2af0b)return _0x2af0b[_0x4a12e6('0x32')](_0x5cece5[_0x4a12e6('0x21')]['ids']||[]);return null;})[_0x698be1('0x1a')](respondWithResult(_0x247a93,null))['catch'](handleError(_0x247a93,null));};
\ No newline at end of file