Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / api / screenRecording / screenRecording.controller.js
index f5fd5e2..8dd4f35 100644 (file)
@@ -1 +1 @@
-const a534_0x193a=['fieldName','duration','closedAt','ScreenRecording','path','sort','findAll','error-middleware/errors','status','end','describe','uniqueid','isNil','../../config/logger','server/files/screen_recordings','type','../../components/encryptor','format','count','findOne','stack','catch','lodash','params','keys','update','length','json','like','model','sequelize','Not\x20found','undefined','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','intersection','includeAll','rows','VIRTUAL','send','unlinkSync','filter','message','then','root','ScreenRecording\x20not\x20found','Content-Range','destroy','fields','join','options','attributes','where','show','name','differenceBy','cancellazione\x20fisica\x20documento\x20%s','download','merge','map','rawAttributes','Entity\x20not\x20found','filename','offset','File:\x20\x22','value','unlink','create','decryptFile','api','include','nolimit','body','../../components/parsers/qs','pick','query','filters','set','index','limit','../../config/environment','info','existsSync'];(function(_0x5dc2cb,_0x193adb){const _0x4d43cb=function(_0x369c0f){while(--_0x369c0f){_0x5dc2cb['push'](_0x5dc2cb['shift']());}};_0x4d43cb(++_0x193adb);}(a534_0x193a,0xc3));const a534_0x4d43=function(_0x5dc2cb,_0x193adb){_0x5dc2cb=_0x5dc2cb-0x0;let _0x4d43cb=a534_0x193a[_0x5dc2cb];return _0x4d43cb;};const _0x362a35=a534_0x4d43;'use strict';const util=require('util'),path=require(_0x362a35('0x37')),fs=require('fs'),_=require(_0x362a35('0x49')),qs=require(_0x362a35('0x29')),logger=require(_0x362a35('0x40'))(_0x362a35('0x25')),config=require(_0x362a35('0x30')),db=require('../../mysqldb')['db'],{Op,ValidationError}=require(_0x362a35('0x51')),{InternalError}=require(_0x362a35('0x3a'));function respondWithResult(_0x369c0f,_0x11bb71){return _0x11bb71=_0x11bb71||0xc8,function(_0x1e41c3){const _0x185642=a534_0x4d43;if(_0x1e41c3)return _0x369c0f[_0x185642('0x3b')](_0x11bb71)['json'](_0x1e41c3);};}function respondWithFilteredResult(_0x585954,_0x42174e){return function(_0x5a1b4d){const _0x4b3b80=a534_0x4d43;if(_0x5a1b4d){const _0x559ec6=_0x5a1b4d[_0x4b3b80('0x45')],_0x23afb7=_0x42174e[_0x4b3b80('0x1f')];let _0x3d14ab=_0x42174e['offset']+_0x42174e[_0x4b3b80('0x2f')],_0x59d08d;return _0x3d14ab>=_0x559ec6?(_0x3d14ab=_0x559ec6,_0x59d08d=0xc8):_0x59d08d=0xce,_0x585954[_0x4b3b80('0x3b')](_0x59d08d),_0x585954[_0x4b3b80('0x2d')](_0x4b3b80('0xe'),_0x23afb7+'-'+_0x3d14ab+'/'+_0x559ec6)[_0x4b3b80('0x4e')](_0x5a1b4d);}return null;};}function saveUpdates(_0x169faa){return function(_0x167973){const _0x3650ee=a534_0x4d43;if(_0x167973)return _0x167973[_0x3650ee('0x4c')](_0x169faa)[_0x3650ee('0xb')](function(_0x1d0ad9){return _0x1d0ad9;});return null;};}function handleEntityNotFound(_0x577d5c){return function(_0x1cb2e6){return!_0x1cb2e6&&_0x577d5c['sendStatus'](0x194),_0x1cb2e6;};}function handleError(_0x11549f,_0x7679aa){return _0x7679aa=_0x7679aa||0x1f4,function(_0x1d1119){const _0x272e8c=a534_0x4d43;logger['error'](_0x1d1119[_0x272e8c('0x47')]),_0x1d1119[_0x272e8c('0x16')]&&delete _0x1d1119[_0x272e8c('0x16')],_0x11549f[_0x272e8c('0x3b')](_0x7679aa)[_0x272e8c('0x7')](_0x1d1119);};}exports[_0x362a35('0x2e')]=function(_0x1e38e8,_0x4586eb){const _0x200f11=_0x362a35;let _0x466309={};const _0x46dc92={},_0x3e4eab={'count':0x0,'rows':[]},_0xb27de=_['map'](db[_0x200f11('0x36')][_0x200f11('0x1c')],function(_0x561b28){const _0x51bc68=_0x200f11;return{'name':_0x561b28[_0x51bc68('0x33')],'type':_0x561b28[_0x51bc68('0x42')]['key']};});_0x46dc92[_0x200f11('0x50')]=_[_0x200f11('0x17')](_[_0x200f11('0x1b')](_0xb27de,_0x200f11('0x16')),[_0x200f11('0x44')]),_0x46dc92['query']=_[_0x200f11('0x4b')](_0x1e38e8['query']),_0x46dc92[_0x200f11('0x2c')]=_[_0x200f11('0x3')](_0x46dc92[_0x200f11('0x50')],_0x46dc92[_0x200f11('0x2b')]),_0x466309[_0x200f11('0x13')]=_[_0x200f11('0x3')](_0x46dc92[_0x200f11('0x50')],qs[_0x200f11('0x10')](_0x1e38e8[_0x200f11('0x2b')][_0x200f11('0x10')])),_0x466309['attributes']=_0x466309[_0x200f11('0x13')][_0x200f11('0x4d')]?_0x466309[_0x200f11('0x13')]:_0x46dc92['model'];typeof _0x1e38e8['query'][_0x200f11('0x27')]===_0x200f11('0x1')&&(_0x466309['limit']=qs['limit'](_0x1e38e8['query'][_0x200f11('0x2f')]),_0x466309['offset']=qs[_0x200f11('0x1f')](_0x1e38e8[_0x200f11('0x2b')][_0x200f11('0x1f')]));_0x466309['order']=qs['sort'](_0x1e38e8['query'][_0x200f11('0x38')]),_0x466309['where']=qs[_0x200f11('0x2c')](_[_0x200f11('0x2a')](_0x1e38e8[_0x200f11('0x2b')],_0x46dc92[_0x200f11('0x2c')]),_0xb27de);_0x1e38e8['query'][_0x200f11('0x9')]&&(_0x466309[_0x200f11('0x14')]=_['merge'](_0x466309[_0x200f11('0x14')],{[Op['or']]:_[_0x200f11('0x1b')](_0xb27de,function(_0x227467){const _0x5cf3c7=_0x200f11;if(_0x227467['type']!==_0x5cf3c7('0x6')){const _0x46273f={};return _0x46273f[_0x227467[_0x5cf3c7('0x16')]]={[Op[_0x5cf3c7('0x4f')]]:'%'+_0x1e38e8[_0x5cf3c7('0x2b')][_0x5cf3c7('0x9')]+'%'},_0x46273f;}})}));_0x466309=_[_0x200f11('0x1a')]({},_0x466309,_0x1e38e8[_0x200f11('0x12')]);const _0x5e6846={'where':_0x466309[_0x200f11('0x14')]};return db[_0x200f11('0x36')]['count'](_0x5e6846)['then'](function(_0x3d830e){const _0x45a591=_0x200f11;return _0x3e4eab['count']=_0x3d830e,_0x1e38e8['query'][_0x45a591('0x4')]&&(_0x466309[_0x45a591('0x26')]=[{'all':!![]}]),db['ScreenRecording'][_0x45a591('0x39')](_0x466309);})[_0x200f11('0xb')](function(_0x3d8601){const _0x38b8f7=_0x200f11;return _0x3e4eab[_0x38b8f7('0x5')]=_0x3d8601,_0x3e4eab;})[_0x200f11('0xb')](respondWithFilteredResult(_0x4586eb,_0x466309))[_0x200f11('0x48')](handleError(_0x4586eb,null));},exports[_0x362a35('0x15')]=function(_0x432ebe,_0x2aa2e9){const _0x647a2=_0x362a35;let _0x316094={'raw':![],'where':{'id':_0x432ebe[_0x647a2('0x4a')]['id']}};const _0x5583fd={};return _0x5583fd[_0x647a2('0x50')]=_[_0x647a2('0x4b')](db[_0x647a2('0x36')][_0x647a2('0x1c')]),_0x5583fd['query']=_[_0x647a2('0x4b')](_0x432ebe[_0x647a2('0x2b')]),_0x5583fd[_0x647a2('0x2c')]=_[_0x647a2('0x3')](_0x5583fd[_0x647a2('0x50')],_0x5583fd[_0x647a2('0x2b')]),_0x316094[_0x647a2('0x13')]=_['intersection'](_0x5583fd['model'],qs[_0x647a2('0x10')](_0x432ebe[_0x647a2('0x2b')][_0x647a2('0x10')])),_0x316094[_0x647a2('0x13')]=_0x316094['attributes'][_0x647a2('0x4d')]?_0x316094[_0x647a2('0x13')]:_0x5583fd[_0x647a2('0x50')],_0x432ebe[_0x647a2('0x2b')]['includeAll']&&(_0x316094[_0x647a2('0x26')]=[{'all':!![]}]),_0x316094=_[_0x647a2('0x1a')]({},_0x316094,_0x432ebe[_0x647a2('0x12')]),db[_0x647a2('0x36')][_0x647a2('0x46')](_0x316094)[_0x647a2('0xb')](handleEntityNotFound(_0x2aa2e9,null))[_0x647a2('0xb')](respondWithResult(_0x2aa2e9,null))[_0x647a2('0x48')](handleError(_0x2aa2e9,null));},exports[_0x362a35('0x23')]=function(_0x2c6e49,_0x4612e8){const _0x2b45db=_0x362a35;return db['ScreenRecording']['create'](_0x2c6e49['body'],{})[_0x2b45db('0xb')](respondWithResult(_0x4612e8,0xc9))[_0x2b45db('0x48')](handleError(_0x4612e8,null));},exports[_0x362a35('0x4c')]=function(_0xed0318,_0x19d6b1){const _0x544095=_0x362a35;return _0xed0318[_0x544095('0x28')]['id']&&delete _0xed0318[_0x544095('0x28')]['id'],delete _0xed0318[_0x544095('0x28')][_0x544095('0x34')],delete _0xed0318[_0x544095('0x28')]['createdAt'],delete _0xed0318['body'][_0x544095('0x35')],delete _0xed0318['body'][_0x544095('0x21')],db[_0x544095('0x36')][_0x544095('0x46')]({'where':{'id':_0xed0318[_0x544095('0x4a')]['id']}})['then'](handleEntityNotFound(_0x19d6b1,null))[_0x544095('0xb')](saveUpdates(_0xed0318[_0x544095('0x28')],null))[_0x544095('0xb')](respondWithResult(_0x19d6b1,null))['catch'](handleError(_0x19d6b1,null));},exports[_0x362a35('0x3d')]=function(_0x19f06d,_0x36208a){const _0x3d4f18=_0x362a35;return db[_0x3d4f18('0x36')][_0x3d4f18('0x3d')]()[_0x3d4f18('0xb')](respondWithResult(_0x36208a,null))[_0x3d4f18('0x48')](handleError(_0x36208a,null));},exports[_0x362a35('0x19')]=function(_0x350f6c,_0xeced0e){const _0x32a234=_0x362a35,_0xdd02c1=require(_0x32a234('0x43'));let _0x451bb1=![];const _0x89ea83={};return _0x350f6c[_0x32a234('0x2b')][_0x32a234('0x42')]&&_0x350f6c[_0x32a234('0x2b')][_0x32a234('0x42')]===_0x32a234('0x3e')?_0x89ea83[_0x32a234('0x3e')]=_0x350f6c[_0x32a234('0x4a')]['id']:_0x89ea83['id']=_0x350f6c[_0x32a234('0x4a')]['id'],db[_0x32a234('0x36')][_0x32a234('0x46')]({'where':_0x89ea83,'attributes':['id',_0x32a234('0x21')],'raw':!![]})[_0x32a234('0xb')](handleEntityNotFound(_0xeced0e,null))[_0x32a234('0xb')](function(_0x516fb3){const _0x313be9=_0x32a234;if(_0x516fb3){const _0x3d52e8=path[_0x313be9('0x11')](config['root'],_0x313be9('0x41'),_0x516fb3[_0x313be9('0x21')]),_0x430025=util[_0x313be9('0x44')]('%s.cypher',_0x3d52e8);if(fs[_0x313be9('0x32')](_0x430025))return _0x451bb1=!![],_0xdd02c1[_0x313be9('0x24')](_0x430025,_0x3d52e8,config['secrets']['recording'])['then'](function(){return _0x516fb3;});return _0x516fb3;}})[_0x32a234('0xb')](function(_0x30a40d){const _0x2991b4=_0x32a234;if(_0x30a40d){const _0x552fb5=path[_0x2991b4('0x11')](config[_0x2991b4('0xc')],_0x2991b4('0x41'),_0x30a40d[_0x2991b4('0x21')]);if(!fs[_0x2991b4('0x32')](_0x552fb5))throw new ValidationError(_0x2991b4('0xd'));return _0x30a40d[_0x2991b4('0x1e')]?_0xeced0e[_0x2991b4('0x19')](_0x552fb5,_0x30a40d['filename']+path['extname'](_0x552fb5),function(){const _0xaefc1=_0x2991b4;_0x451bb1&&fs[_0xaefc1('0x22')](_0x552fb5);}):_0xeced0e[_0x2991b4('0x19')](_0x552fb5,function(){const _0x1f6b44=_0x2991b4;_0x451bb1&&fs[_0x1f6b44('0x22')](_0x552fb5);});}})['catch'](function(_0x4f18f4){const _0x28e400=_0x32a234;if(_0x4f18f4[_0x28e400('0xa')]===_0x28e400('0xd'))_0xeced0e['status'](0x194)[_0x28e400('0x7')](_0x28e400('0x0'));else return handleError(_0xeced0e,null);});},exports[_0x362a35('0xf')]=function(_0x4e2926,_0x449e2e){const _0xd1f28d=_0x362a35;return db[_0xd1f28d('0x36')][_0xd1f28d('0x46')]({'where':{'id':_0x4e2926[_0xd1f28d('0x4a')]['id']}})[_0xd1f28d('0xb')](function(_0x4c952e){const _0x114662=_0xd1f28d;if(!_0x4c952e)throw new ReferenceError(_0x114662('0x1d'));return _0x4c952e;})['then'](function(_0x299393){const _0x1d38b1=_0xd1f28d;let _0xec6b33=path[_0x1d38b1('0x11')](config[_0x1d38b1('0xc')],'server/files/screen_recordings',_0x299393[_0x1d38b1('0x21')]);return logger[_0x1d38b1('0x31')](_0x1d38b1('0x18'),_0xec6b33),!_[_0x1d38b1('0x3f')](_0x299393[_0x1d38b1('0x21')])&&fs['existsSync'](_0xec6b33)&&(logger[_0x1d38b1('0x31')](_0x1d38b1('0x20')+_0xec6b33+_0x1d38b1('0x2')),fs[_0x1d38b1('0x8')](_0xec6b33)),_0xec6b33=_0xec6b33+'.cypher',!_['isNil'](_0x299393['value'])&&fs[_0x1d38b1('0x32')](_0xec6b33)&&(logger['info'](_0x1d38b1('0x20')+_0xec6b33+_0x1d38b1('0x2')),fs[_0x1d38b1('0x8')](_0xec6b33)),_0x299393;})[_0xd1f28d('0xb')](function(_0x5942c2){const _0x3ede7d=_0xd1f28d;if(!_0x5942c2)throw new InternalError();return _0x5942c2[_0x3ede7d('0xf')]();})[_0xd1f28d('0xb')](function(){const _0x5c3c3b=_0xd1f28d;_0x449e2e[_0x5c3c3b('0x3b')](0xcc)[_0x5c3c3b('0x3c')]();})[_0xd1f28d('0x48')](handleError(_0x449e2e,null));};
\ No newline at end of file
+const a534_0x4a62=['send','create','value','isNil','filter','Content-Range','offset','server/files/screen_recordings','query','map','params','describe','intersection','body','count','api','closedAt','uniqueid','download','Entity\x20not\x20found','length','attributes','limit','type','key','sendStatus','sort','existsSync','where','decryptFile','info','join','path','update','ScreenRecording\x20not\x20found','catch','set','like','destroy','includeAll','fieldName','filters','fields','extname','root','message','unlink','createdAt','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','rawAttributes','cancellazione\x20fisica\x20documento\x20%s','order','model','%s.cypher','duration','../../config/environment','util','stack','merge','findOne','../../mysqldb','include','status','.cypher','sequelize','pick','filename','error-middleware/errors','lodash','nolimit','../../components/parsers/qs','ScreenRecording','name','unlinkSync','json','index','rows','recording','then','differenceBy','File:\x20\x22','keys'];(function(_0x414692,_0x4a62bb){const _0x4d02fe=function(_0x21a305){while(--_0x21a305){_0x414692['push'](_0x414692['shift']());}};_0x4d02fe(++_0x4a62bb);}(a534_0x4a62,0xba));const a534_0x4d02=function(_0x414692,_0x4a62bb){_0x414692=_0x414692-0x0;let _0x4d02fe=a534_0x4a62[_0x414692];return _0x4d02fe;};const _0x1c677b=a534_0x4d02;'use strict';const util=require(_0x1c677b('0x22')),path=require(_0x1c677b('0xa')),fs=require('fs'),_=require(_0x1c677b('0x2e')),qs=require(_0x1c677b('0x30')),logger=require('../../config/logger')(_0x1c677b('0x4b')),config=require(_0x1c677b('0x21')),db=require(_0x1c677b('0x26'))['db'],{Op,ValidationError}=require(_0x1c677b('0x2a')),{InternalError}=require(_0x1c677b('0x2d'));function respondWithResult(_0x21a305,_0x874eb8){return _0x874eb8=_0x874eb8||0xc8,function(_0x917096){const _0x22d70c=a534_0x4d02;if(_0x917096)return _0x21a305[_0x22d70c('0x28')](_0x874eb8)[_0x22d70c('0x34')](_0x917096);};}function respondWithFilteredResult(_0x1177c1,_0x22e22e){return function(_0x26253b){const _0x271bf3=a534_0x4d02;if(_0x26253b){const _0x2841f3=_0x26253b[_0x271bf3('0x4a')],_0x17fd05=_0x22e22e['offset'];let _0x1e465e=_0x22e22e['offset']+_0x22e22e[_0x271bf3('0x0')],_0x36d1e3;return _0x1e465e>=_0x2841f3?(_0x1e465e=_0x2841f3,_0x36d1e3=0xc8):_0x36d1e3=0xce,_0x1177c1[_0x271bf3('0x28')](_0x36d1e3),_0x1177c1[_0x271bf3('0xe')](_0x271bf3('0x41'),_0x17fd05+'-'+_0x1e465e+'/'+_0x2841f3)[_0x271bf3('0x34')](_0x26253b);}return null;};}function saveUpdates(_0x18db7d){return function(_0x47f577){const _0x36e525=a534_0x4d02;if(_0x47f577)return _0x47f577[_0x36e525('0xb')](_0x18db7d)[_0x36e525('0x38')](function(_0xf49d34){return _0xf49d34;});return null;};}function handleEntityNotFound(_0x1e340c){return function(_0x5758ba){const _0x1893e7=a534_0x4d02;return!_0x5758ba&&_0x1e340c[_0x1893e7('0x3')](0x194),_0x5758ba;};}function handleError(_0x4f32fe,_0x1de1da){return _0x1de1da=_0x1de1da||0x1f4,function(_0x596091){const _0x258fef=a534_0x4d02;logger['error'](_0x596091[_0x258fef('0x23')]),_0x596091[_0x258fef('0x32')]&&delete _0x596091['name'],_0x4f32fe[_0x258fef('0x28')](_0x1de1da)[_0x258fef('0x3c')](_0x596091);};}exports[_0x1c677b('0x35')]=function(_0x261a6b,_0x56b5ea){const _0xd49f71=_0x1c677b;let _0x4dad27={};const _0x127ab2={},_0x21f3bc={'count':0x0,'rows':[]},_0x46f3ea=_[_0xd49f71('0x45')](db[_0xd49f71('0x31')][_0xd49f71('0x1b')],function(_0x62c2a9){const _0x1b7235=_0xd49f71;return{'name':_0x62c2a9[_0x1b7235('0x12')],'type':_0x62c2a9[_0x1b7235('0x1')][_0x1b7235('0x2')]};});_0x127ab2[_0xd49f71('0x1e')]=_[_0xd49f71('0x39')](_[_0xd49f71('0x45')](_0x46f3ea,_0xd49f71('0x32')),['format']),_0x127ab2[_0xd49f71('0x44')]=_[_0xd49f71('0x3b')](_0x261a6b[_0xd49f71('0x44')]),_0x127ab2['filters']=_['intersection'](_0x127ab2[_0xd49f71('0x1e')],_0x127ab2[_0xd49f71('0x44')]),_0x4dad27[_0xd49f71('0x51')]=_[_0xd49f71('0x48')](_0x127ab2[_0xd49f71('0x1e')],qs[_0xd49f71('0x14')](_0x261a6b['query']['fields'])),_0x4dad27[_0xd49f71('0x51')]=_0x4dad27[_0xd49f71('0x51')][_0xd49f71('0x50')]?_0x4dad27[_0xd49f71('0x51')]:_0x127ab2[_0xd49f71('0x1e')];typeof _0x261a6b['query'][_0xd49f71('0x2f')]==='undefined'&&(_0x4dad27[_0xd49f71('0x0')]=qs[_0xd49f71('0x0')](_0x261a6b[_0xd49f71('0x44')][_0xd49f71('0x0')]),_0x4dad27['offset']=qs[_0xd49f71('0x42')](_0x261a6b[_0xd49f71('0x44')][_0xd49f71('0x42')]));_0x4dad27[_0xd49f71('0x1d')]=qs[_0xd49f71('0x4')](_0x261a6b[_0xd49f71('0x44')][_0xd49f71('0x4')]),_0x4dad27[_0xd49f71('0x6')]=qs['filters'](_[_0xd49f71('0x2b')](_0x261a6b[_0xd49f71('0x44')],_0x127ab2[_0xd49f71('0x13')]),_0x46f3ea);_0x261a6b[_0xd49f71('0x44')]['filter']&&(_0x4dad27[_0xd49f71('0x6')]=_['merge'](_0x4dad27[_0xd49f71('0x6')],{[Op['or']]:_[_0xd49f71('0x45')](_0x46f3ea,function(_0x2b3daf){const _0x29e473=_0xd49f71;if(_0x2b3daf['type']!=='VIRTUAL'){const _0x4a5d28={};return _0x4a5d28[_0x2b3daf['name']]={[Op[_0x29e473('0xf')]]:'%'+_0x261a6b['query'][_0x29e473('0x40')]+'%'},_0x4a5d28;}})}));_0x4dad27=_[_0xd49f71('0x24')]({},_0x4dad27,_0x261a6b['options']);const _0x4ba675={'where':_0x4dad27[_0xd49f71('0x6')]};return db[_0xd49f71('0x31')][_0xd49f71('0x4a')](_0x4ba675)[_0xd49f71('0x38')](function(_0x1b3939){const _0x105b56=_0xd49f71;return _0x21f3bc[_0x105b56('0x4a')]=_0x1b3939,_0x261a6b[_0x105b56('0x44')][_0x105b56('0x11')]&&(_0x4dad27[_0x105b56('0x27')]=[{'all':!![]}]),db[_0x105b56('0x31')]['findAll'](_0x4dad27);})['then'](function(_0x10ce98){const _0x4b2b8d=_0xd49f71;return _0x21f3bc[_0x4b2b8d('0x36')]=_0x10ce98,_0x21f3bc;})[_0xd49f71('0x38')](respondWithFilteredResult(_0x56b5ea,_0x4dad27))[_0xd49f71('0xd')](handleError(_0x56b5ea,null));},exports['show']=function(_0x365a8a,_0x32ccc1){const _0x279684=_0x1c677b;let _0x32e669={'raw':![],'where':{'id':_0x365a8a[_0x279684('0x46')]['id']}};const _0x5c24f5={};return _0x5c24f5[_0x279684('0x1e')]=_[_0x279684('0x3b')](db[_0x279684('0x31')][_0x279684('0x1b')]),_0x5c24f5[_0x279684('0x44')]=_['keys'](_0x365a8a[_0x279684('0x44')]),_0x5c24f5[_0x279684('0x13')]=_['intersection'](_0x5c24f5[_0x279684('0x1e')],_0x5c24f5[_0x279684('0x44')]),_0x32e669[_0x279684('0x51')]=_[_0x279684('0x48')](_0x5c24f5[_0x279684('0x1e')],qs[_0x279684('0x14')](_0x365a8a[_0x279684('0x44')][_0x279684('0x14')])),_0x32e669[_0x279684('0x51')]=_0x32e669[_0x279684('0x51')]['length']?_0x32e669['attributes']:_0x5c24f5[_0x279684('0x1e')],_0x365a8a[_0x279684('0x44')][_0x279684('0x11')]&&(_0x32e669[_0x279684('0x27')]=[{'all':!![]}]),_0x32e669=_[_0x279684('0x24')]({},_0x32e669,_0x365a8a['options']),db[_0x279684('0x31')][_0x279684('0x25')](_0x32e669)['then'](handleEntityNotFound(_0x32ccc1,null))[_0x279684('0x38')](respondWithResult(_0x32ccc1,null))['catch'](handleError(_0x32ccc1,null));},exports[_0x1c677b('0x3d')]=function(_0x307d88,_0x344643){const _0x194fff=_0x1c677b;return db[_0x194fff('0x31')][_0x194fff('0x3d')](_0x307d88[_0x194fff('0x49')],{})['then'](respondWithResult(_0x344643,0xc9))[_0x194fff('0xd')](handleError(_0x344643,null));},exports[_0x1c677b('0xb')]=function(_0x4e76e9,_0x1782e1){const _0x14c024=_0x1c677b;return _0x4e76e9[_0x14c024('0x49')]['id']&&delete _0x4e76e9[_0x14c024('0x49')]['id'],delete _0x4e76e9[_0x14c024('0x49')][_0x14c024('0x20')],delete _0x4e76e9[_0x14c024('0x49')][_0x14c024('0x19')],delete _0x4e76e9['body'][_0x14c024('0x4c')],delete _0x4e76e9[_0x14c024('0x49')][_0x14c024('0x3e')],db[_0x14c024('0x31')]['findOne']({'where':{'id':_0x4e76e9[_0x14c024('0x46')]['id']}})[_0x14c024('0x38')](handleEntityNotFound(_0x1782e1,null))[_0x14c024('0x38')](saveUpdates(_0x4e76e9['body'],null))['then'](respondWithResult(_0x1782e1,null))[_0x14c024('0xd')](handleError(_0x1782e1,null));},exports[_0x1c677b('0x47')]=function(_0x556e8c,_0x403a13){const _0x4753f9=_0x1c677b;return db[_0x4753f9('0x31')][_0x4753f9('0x47')]()[_0x4753f9('0x38')](respondWithResult(_0x403a13,null))[_0x4753f9('0xd')](handleError(_0x403a13,null));},exports[_0x1c677b('0x4e')]=function(_0x5504a4,_0x54d52d){const _0x2fa4a4=_0x1c677b,_0x5f5df2=require('../../components/encryptor');let _0x1c5e32=![];const _0x23e6f6={};return _0x5504a4[_0x2fa4a4('0x44')][_0x2fa4a4('0x1')]&&_0x5504a4[_0x2fa4a4('0x44')][_0x2fa4a4('0x1')]===_0x2fa4a4('0x4d')?_0x23e6f6[_0x2fa4a4('0x4d')]=_0x5504a4['params']['id']:_0x23e6f6['id']=_0x5504a4[_0x2fa4a4('0x46')]['id'],db[_0x2fa4a4('0x31')][_0x2fa4a4('0x25')]({'where':_0x23e6f6,'attributes':['id','value'],'raw':!![]})['then'](handleEntityNotFound(_0x54d52d,null))[_0x2fa4a4('0x38')](function(_0xdc9ef2){const _0x312123=_0x2fa4a4;if(_0xdc9ef2){const _0x316674=path[_0x312123('0x9')](config[_0x312123('0x16')],'server/files/screen_recordings',_0xdc9ef2[_0x312123('0x3e')]),_0x4bfb06=util['format'](_0x312123('0x1f'),_0x316674);if(fs['existsSync'](_0x4bfb06))return _0x1c5e32=!![],_0x5f5df2[_0x312123('0x7')](_0x4bfb06,_0x316674,config['secrets'][_0x312123('0x37')])[_0x312123('0x38')](function(){return _0xdc9ef2;});return _0xdc9ef2;}})[_0x2fa4a4('0x38')](function(_0x150f37){const _0x3ae42d=_0x2fa4a4;if(_0x150f37){const _0xc526a5=path[_0x3ae42d('0x9')](config[_0x3ae42d('0x16')],_0x3ae42d('0x43'),_0x150f37['value']);if(!fs[_0x3ae42d('0x5')](_0xc526a5))throw new ValidationError(_0x3ae42d('0xc'));return _0x150f37['filename']?_0x54d52d[_0x3ae42d('0x4e')](_0xc526a5,_0x150f37[_0x3ae42d('0x2c')]+path[_0x3ae42d('0x15')](_0xc526a5),function(){const _0x36a81b=_0x3ae42d;_0x1c5e32&&fs[_0x36a81b('0x18')](_0xc526a5);}):_0x54d52d[_0x3ae42d('0x4e')](_0xc526a5,function(){const _0xe7d631=_0x3ae42d;_0x1c5e32&&fs[_0xe7d631('0x18')](_0xc526a5);});}})['catch'](function(_0x3d55d3){const _0x6698ef=_0x2fa4a4;if(_0x3d55d3[_0x6698ef('0x17')]===_0x6698ef('0xc'))_0x54d52d['status'](0x194)[_0x6698ef('0x3c')]('Not\x20found');else return handleError(_0x54d52d,null);});},exports[_0x1c677b('0x10')]=function(_0x314458,_0xca6b71){const _0x11b0aa=_0x1c677b;return db[_0x11b0aa('0x31')]['findOne']({'where':{'id':_0x314458[_0x11b0aa('0x46')]['id']}})[_0x11b0aa('0x38')](function(_0x42353c){const _0x551c5a=_0x11b0aa;if(!_0x42353c)throw new ReferenceError(_0x551c5a('0x4f'));return _0x42353c;})[_0x11b0aa('0x38')](function(_0x15fd4a){const _0x5c05b6=_0x11b0aa;let _0x366af2=path[_0x5c05b6('0x9')](config[_0x5c05b6('0x16')],'server/files/screen_recordings',_0x15fd4a[_0x5c05b6('0x3e')]);return logger['info'](_0x5c05b6('0x1c'),_0x366af2),!_['isNil'](_0x15fd4a[_0x5c05b6('0x3e')])&&fs[_0x5c05b6('0x5')](_0x366af2)&&(logger['info'](_0x5c05b6('0x3a')+_0x366af2+_0x5c05b6('0x1a')),fs['unlinkSync'](_0x366af2)),_0x366af2=_0x366af2+_0x5c05b6('0x29'),!_[_0x5c05b6('0x3f')](_0x15fd4a[_0x5c05b6('0x3e')])&&fs[_0x5c05b6('0x5')](_0x366af2)&&(logger[_0x5c05b6('0x8')](_0x5c05b6('0x3a')+_0x366af2+_0x5c05b6('0x1a')),fs[_0x5c05b6('0x33')](_0x366af2)),_0x15fd4a;})[_0x11b0aa('0x38')](function(_0x3ee4d6){const _0x273c42=_0x11b0aa;if(!_0x3ee4d6)throw new InternalError();return _0x3ee4d6[_0x273c42('0x10')]();})['then'](function(){const _0x2e5a4a=_0x11b0aa;_0xca6b71[_0x2e5a4a('0x28')](0xcc)['end']();})[_0x11b0aa('0xd')](handleError(_0xca6b71,null));};
\ No newline at end of file