// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc6a6=['ValidationError','ScreenRecording\x20not\x20found','filename','unlink','message','Not\x20found','destroy','Entity\x20not\x20found','cancellazione\x20fisica\x20documento\x20%s','info','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','isNil','eml-format','rimraf','moment','bluebird','mustache','util','path','sox','to-csv','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','count','offset','limit','Content-Range','json','apply','reject','update','then','error','stack','name','index','map','rawAttributes','key','model','differenceBy','format','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','options','ScreenRecording','include','findAll','rows','catch','params','intersection','includeAll','create','body','duration','createdAt','value','find','describe','download','uniqueid','join','root','recording','server/files/screen_recordings','existsSync','Sequelize'];(function(_0x471377,_0x5498d9){var _0x56586e=function(_0x36dfd9){while(--_0x36dfd9){_0x471377['push'](_0x471377['shift']());}};_0x56586e(++_0x5498d9);}(_0xc6a6,0x137));var _0x6c6a=function(_0x1b873d,_0x4ccaa8){_0x1b873d=_0x1b873d-0x0;var _0x2e157a=_0xc6a6[_0x1b873d];return _0x2e157a;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x6c6a('0x0'));var rimraf=require(_0x6c6a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6c6a('0x2'));var BPromise=require(_0x6c6a('0x3'));var Mustache=require(_0x6c6a('0x4'));var util=require(_0x6c6a('0x5'));var path=require(_0x6c6a('0x6'));var sox=require(_0x6c6a('0x7'));var csv=require(_0x6c6a('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x6c6a('0x9'));var crypto=require(_0x6c6a('0xa'));var jsforce=require(_0x6c6a('0xb'));var deskjs=require(_0x6c6a('0xc'));var toCsv=require('to-csv');var querystring=require(_0x6c6a('0xd'));var Papa=require(_0x6c6a('0xe'));var Redis=require(_0x6c6a('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x6c6a('0x10'));var as=require(_0x6c6a('0x11'));var hardwareService=require(_0x6c6a('0x12'));var logger=require('../../config/logger')(_0x6c6a('0x13'));var utils=require(_0x6c6a('0x14'));var config=require(_0x6c6a('0x15'));var licenseUtil=require(_0x6c6a('0x16'));var db=require(_0x6c6a('0x17'))['db'];function respondWithStatusCode(_0x4fbdc8,_0x56b635){_0x56b635=_0x56b635||0xcc;return function(_0x1b599c){if(_0x1b599c){return _0x4fbdc8[_0x6c6a('0x18')](_0x56b635);}return _0x4fbdc8['status'](_0x56b635)[_0x6c6a('0x19')]();};}function respondWithResult(_0x814558,_0x571d44){_0x571d44=_0x571d44||0xc8;return function(_0x5e1f31){if(_0x5e1f31){return _0x814558[_0x6c6a('0x1a')](_0x571d44)['json'](_0x5e1f31);}};}function respondWithFilteredResult(_0x8060df,_0x2bed35){return function(_0x4d78fd){if(_0x4d78fd){var _0x12593c=_0x4d78fd[_0x6c6a('0x1b')],_0x175639=_0x2bed35[_0x6c6a('0x1c')],_0x315f21=_0x2bed35[_0x6c6a('0x1c')]+_0x2bed35[_0x6c6a('0x1d')],_0x5dacca;if(_0x315f21>=_0x12593c){_0x315f21=_0x12593c;_0x5dacca=0xc8;}else{_0x5dacca=0xce;}_0x8060df['status'](_0x5dacca);return _0x8060df['set'](_0x6c6a('0x1e'),_0x175639+'-'+_0x315f21+'/'+_0x12593c)[_0x6c6a('0x1f')](_0x4d78fd);}return null;};}function patchUpdates(_0x23ff27){return function(_0x4e4820){try{jsonpatch[_0x6c6a('0x20')](_0x4e4820,_0x23ff27,!![]);}catch(_0xb0bf13){return BPromise[_0x6c6a('0x21')](_0xb0bf13);}return _0x4e4820['save']();};}function saveUpdates(_0x2c2ecf,_0x14f1a9){return function(_0x1b2a3d){if(_0x1b2a3d){return _0x1b2a3d[_0x6c6a('0x22')](_0x2c2ecf)['then'](function(_0x1b5ac8){return _0x1b5ac8;});}return null;};}function removeEntity(_0xd38842,_0x16c2cd){return function(_0x18f492){if(_0x18f492){return _0x18f492['destroy']()[_0x6c6a('0x23')](function(){_0xd38842['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x957e15,_0x3db8b2){return function(_0x3c0319){if(!_0x3c0319){_0x957e15[_0x6c6a('0x18')](0x194);}return _0x3c0319;};}function handleError(_0x5397bf,_0x129bd6){_0x129bd6=_0x129bd6||0x1f4;return function(_0x52f954){logger[_0x6c6a('0x24')](_0x52f954[_0x6c6a('0x25')]);if(_0x52f954[_0x6c6a('0x26')]){delete _0x52f954['name'];}_0x5397bf['status'](_0x129bd6)['send'](_0x52f954);};}exports[_0x6c6a('0x27')]=function(_0x185362,_0x168feb){var _0xf9a4d8={},_0x4f02f2={},_0x48b26f={'count':0x0,'rows':[]};var _0xd6bd7d=_[_0x6c6a('0x28')](db['ScreenRecording'][_0x6c6a('0x29')],function(_0x204b61){return{'name':_0x204b61['fieldName'],'type':_0x204b61['type'][_0x6c6a('0x2a')]};});_0x4f02f2[_0x6c6a('0x2b')]=_[_0x6c6a('0x2c')](_[_0x6c6a('0x28')](_0xd6bd7d,_0x6c6a('0x26')),[_0x6c6a('0x2d')]);_0x4f02f2[_0x6c6a('0x2e')]=_[_0x6c6a('0x2f')](_0x185362['query']);_0x4f02f2[_0x6c6a('0x30')]=_['intersection'](_0x4f02f2[_0x6c6a('0x2b')],_0x4f02f2[_0x6c6a('0x2e')]);_0xf9a4d8[_0x6c6a('0x31')]=_['intersection'](_0x4f02f2[_0x6c6a('0x2b')],qs[_0x6c6a('0x32')](_0x185362[_0x6c6a('0x2e')][_0x6c6a('0x32')]));_0xf9a4d8[_0x6c6a('0x31')]=_0xf9a4d8['attributes'][_0x6c6a('0x33')]?_0xf9a4d8['attributes']:_0x4f02f2[_0x6c6a('0x2b')];if(!_0x185362[_0x6c6a('0x2e')][_0x6c6a('0x34')](_0x6c6a('0x35'))){_0xf9a4d8[_0x6c6a('0x1d')]=qs[_0x6c6a('0x1d')](_0x185362['query'][_0x6c6a('0x1d')]);_0xf9a4d8['offset']=qs[_0x6c6a('0x1c')](_0x185362[_0x6c6a('0x2e')]['offset']);}_0xf9a4d8[_0x6c6a('0x36')]=qs['sort'](_0x185362[_0x6c6a('0x2e')][_0x6c6a('0x37')]);_0xf9a4d8[_0x6c6a('0x38')]=qs[_0x6c6a('0x30')](_[_0x6c6a('0x39')](_0x185362[_0x6c6a('0x2e')],_0x4f02f2[_0x6c6a('0x30')]),_0xd6bd7d);if(_0x185362['query'][_0x6c6a('0x3a')]){_0xf9a4d8[_0x6c6a('0x38')]=_[_0x6c6a('0x3b')](_0xf9a4d8[_0x6c6a('0x38')],{'$or':_['map'](_0xd6bd7d,function(_0x3fdf0b){if(_0x3fdf0b[_0x6c6a('0x3c')]!=='VIRTUAL'){var _0x19b953={};_0x19b953[_0x3fdf0b[_0x6c6a('0x26')]]={'$like':'%'+_0x185362[_0x6c6a('0x2e')][_0x6c6a('0x3a')]+'%'};return _0x19b953;}})});}_0xf9a4d8=_[_0x6c6a('0x3b')]({},_0xf9a4d8,_0x185362[_0x6c6a('0x3d')]);var _0x18b748={'where':_0xf9a4d8[_0x6c6a('0x38')]};return db[_0x6c6a('0x3e')][_0x6c6a('0x1b')](_0x18b748)[_0x6c6a('0x23')](function(_0x38673a){_0x48b26f[_0x6c6a('0x1b')]=_0x38673a;if(_0x185362[_0x6c6a('0x2e')]['includeAll']){_0xf9a4d8[_0x6c6a('0x3f')]=[{'all':!![]}];}return db['ScreenRecording'][_0x6c6a('0x40')](_0xf9a4d8);})[_0x6c6a('0x23')](function(_0x14ec50){_0x48b26f[_0x6c6a('0x41')]=_0x14ec50;return _0x48b26f;})[_0x6c6a('0x23')](respondWithFilteredResult(_0x168feb,_0xf9a4d8))[_0x6c6a('0x42')](handleError(_0x168feb,null));};exports['show']=function(_0x4e5c8d,_0x3a3d9c){var _0x46eef4={'raw':![],'where':{'id':_0x4e5c8d[_0x6c6a('0x43')]['id']}},_0x4a892f={};_0x4a892f[_0x6c6a('0x2b')]=_[_0x6c6a('0x2f')](db['ScreenRecording'][_0x6c6a('0x29')]);_0x4a892f['query']=_['keys'](_0x4e5c8d[_0x6c6a('0x2e')]);_0x4a892f['filters']=_[_0x6c6a('0x44')](_0x4a892f[_0x6c6a('0x2b')],_0x4a892f[_0x6c6a('0x2e')]);_0x46eef4['attributes']=_[_0x6c6a('0x44')](_0x4a892f[_0x6c6a('0x2b')],qs[_0x6c6a('0x32')](_0x4e5c8d[_0x6c6a('0x2e')]['fields']));_0x46eef4[_0x6c6a('0x31')]=_0x46eef4[_0x6c6a('0x31')][_0x6c6a('0x33')]?_0x46eef4[_0x6c6a('0x31')]:_0x4a892f[_0x6c6a('0x2b')];if(_0x4e5c8d[_0x6c6a('0x2e')][_0x6c6a('0x45')]){_0x46eef4[_0x6c6a('0x3f')]=[{'all':!![]}];}_0x46eef4=_[_0x6c6a('0x3b')]({},_0x46eef4,_0x4e5c8d[_0x6c6a('0x3d')]);return db[_0x6c6a('0x3e')]['find'](_0x46eef4)[_0x6c6a('0x23')](handleEntityNotFound(_0x3a3d9c,null))['then'](respondWithResult(_0x3a3d9c,null))['catch'](handleError(_0x3a3d9c,null));};exports[_0x6c6a('0x46')]=function(_0x1acfce,_0x418b5a){return db[_0x6c6a('0x3e')][_0x6c6a('0x46')](_0x1acfce[_0x6c6a('0x47')],{})['then'](respondWithResult(_0x418b5a,0xc9))['catch'](handleError(_0x418b5a,null));};exports[_0x6c6a('0x22')]=function(_0x1b3a69,_0x15b613){if(_0x1b3a69[_0x6c6a('0x47')]['id']){delete _0x1b3a69['body']['id'];}delete _0x1b3a69[_0x6c6a('0x47')][_0x6c6a('0x48')];delete _0x1b3a69['body'][_0x6c6a('0x49')];delete _0x1b3a69[_0x6c6a('0x47')]['closedAt'];delete _0x1b3a69[_0x6c6a('0x47')][_0x6c6a('0x4a')];return db[_0x6c6a('0x3e')][_0x6c6a('0x4b')]({'where':{'id':_0x1b3a69[_0x6c6a('0x43')]['id']}})[_0x6c6a('0x23')](handleEntityNotFound(_0x15b613,null))[_0x6c6a('0x23')](saveUpdates(_0x1b3a69[_0x6c6a('0x47')],null))['then'](respondWithResult(_0x15b613,null))[_0x6c6a('0x42')](handleError(_0x15b613,null));};exports[_0x6c6a('0x4c')]=function(_0x439bf1,_0x38be6d){return db[_0x6c6a('0x3e')][_0x6c6a('0x4c')]()[_0x6c6a('0x23')](respondWithResult(_0x38be6d,null))['catch'](handleError(_0x38be6d,null));};exports[_0x6c6a('0x4d')]=function(_0x10d19b,_0x50ba7c,_0x1e2b4c){var _0x20c728=require('../../components/encryptor');var _0x1e8427=![];var _0x251107={};if(_0x10d19b[_0x6c6a('0x2e')]['type']&&_0x10d19b[_0x6c6a('0x2e')][_0x6c6a('0x3c')]===_0x6c6a('0x4e')){_0x251107[_0x6c6a('0x4e')]=_0x10d19b[_0x6c6a('0x43')]['id'];}else{_0x251107['id']=_0x10d19b['params']['id'];}return db['ScreenRecording']['find']({'where':_0x251107,'attributes':['id',_0x6c6a('0x4a')],'raw':!![]})[_0x6c6a('0x23')](handleEntityNotFound(_0x50ba7c,null))['then'](function(_0x4f57e6){if(_0x4f57e6){var _0x16a7bc=path[_0x6c6a('0x4f')](config[_0x6c6a('0x50')],'server/files/screen_recordings',_0x4f57e6[_0x6c6a('0x4a')]);var _0x33b7f9=util[_0x6c6a('0x2d')]('%s.cypher',_0x16a7bc);if(fs['existsSync'](_0x33b7f9)){_0x1e8427=!![];return _0x20c728['decryptFile'](_0x33b7f9,_0x16a7bc,config['secrets'][_0x6c6a('0x51')])[_0x6c6a('0x23')](function(){return _0x4f57e6;});}return _0x4f57e6;}})[_0x6c6a('0x23')](function(_0x3ebf7a){if(_0x3ebf7a){var _0x33ab5d=path[_0x6c6a('0x4f')](config[_0x6c6a('0x50')],_0x6c6a('0x52'),_0x3ebf7a[_0x6c6a('0x4a')]);if(!fs[_0x6c6a('0x53')](_0x33ab5d)){throw new db[(_0x6c6a('0x54'))][(_0x6c6a('0x55'))](_0x6c6a('0x56'));}if(_0x3ebf7a[_0x6c6a('0x57')]){return _0x50ba7c[_0x6c6a('0x4d')](_0x33ab5d,_0x3ebf7a[_0x6c6a('0x57')]+path['extname'](_0x33ab5d),function(){if(_0x1e8427){fs[_0x6c6a('0x58')](_0x33ab5d);}});}else{return _0x50ba7c[_0x6c6a('0x4d')](_0x33ab5d,function(_0xc93605){if(_0x1e8427){fs[_0x6c6a('0x58')](_0x33ab5d);}});}}})[_0x6c6a('0x42')](function(_0x2df1c9){if(_0x2df1c9[_0x6c6a('0x59')]===_0x6c6a('0x56')){_0x50ba7c[_0x6c6a('0x1a')](0x194)['send'](_0x6c6a('0x5a'));}else{return handleError(_0x50ba7c,null);}});};exports[_0x6c6a('0x5b')]=function(_0xf0cc80,_0x38fa72){return db[_0x6c6a('0x3e')]['find']({'where':{'id':_0xf0cc80[_0x6c6a('0x43')]['id']}})['then'](function(_0x28086f){if(!_0x28086f)throw new ReferenceError(_0x6c6a('0x5c'));return _0x28086f;})['then'](function(_0x3a382d){var _0x254703=path[_0x6c6a('0x4f')](config[_0x6c6a('0x50')],'server/files/screen_recordings',_0x3a382d[_0x6c6a('0x4a')]);logger['info'](_0x6c6a('0x5d'),_0x254703);if(!_['isNil'](_0x3a382d[_0x6c6a('0x4a')])&&fs['existsSync'](_0x254703)){logger[_0x6c6a('0x5e')](_0x6c6a('0x5f')+_0x254703+_0x6c6a('0x60'));fs[_0x6c6a('0x61')](_0x254703);}_0x254703=_0x254703+'.cypher';if(!_[_0x6c6a('0x62')](_0x3a382d[_0x6c6a('0x4a')])&&fs['existsSync'](_0x254703)){logger[_0x6c6a('0x5e')](_0x6c6a('0x5f')+_0x254703+_0x6c6a('0x60'));fs[_0x6c6a('0x61')](_0x254703);}return _0x3a382d;})[_0x6c6a('0x23')](function(_0x5c5ced){if(!_0x5c5ced)throw new InternalError();return _0x5c5ced['destroy']();})[_0x6c6a('0x23')](function(){_0x38fa72[_0x6c6a('0x1a')](0xcc)[_0x6c6a('0x19')]();})[_0x6c6a('0x42')](handleError(_0x38fa72,null));};
\ No newline at end of file
+var _0x1ecc=['keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','where','filter','VIRTUAL','merge','options','includeAll','include','catch','show','params','create','body','duration','closedAt','value','find','describe','download','uniqueid','join','root','server/files/screen_recordings','format','%s.cypher','existsSync','decryptFile','secrets','Sequelize','ScreenRecording\x20not\x20found','filename','extname','unlink','message','send','Not\x20found','Entity\x20not\x20found','cancellazione\x20fisica\x20documento\x20%s','isNil','info','unlinkSync','.cypher','File:\x20\x22','html-pdf','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','apply','reject','save','update','then','destroy','error','name','index','map','ScreenRecording','fieldName','type','key','model','query'];(function(_0x104579,_0x1d03f1){var _0x475c76=function(_0x4c196d){while(--_0x4c196d){_0x104579['push'](_0x104579['shift']());}};_0x475c76(++_0x1d03f1);}(_0x1ecc,0xf7));var _0xc1ec=function(_0x5e3701,_0x596265){_0x5e3701=_0x5e3701-0x0;var _0x345dcf=_0x1ecc[_0x5e3701];return _0x345dcf;};'use strict';var pdf=require(_0xc1ec('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xc1ec('0x1'));var zipdir=require(_0xc1ec('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xc1ec('0x3'));var BPromise=require(_0xc1ec('0x4'));var Mustache=require(_0xc1ec('0x5'));var util=require(_0xc1ec('0x6'));var path=require(_0xc1ec('0x7'));var sox=require(_0xc1ec('0x8'));var csv=require(_0xc1ec('0x9'));var ejs=require(_0xc1ec('0xa'));var fs=require('fs');var _=require(_0xc1ec('0xb'));var squel=require(_0xc1ec('0xc'));var crypto=require(_0xc1ec('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xc1ec('0x9'));var querystring=require(_0xc1ec('0xe'));var Papa=require(_0xc1ec('0xf'));var Redis=require(_0xc1ec('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xc1ec('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc1ec('0x12'));var logger=require(_0xc1ec('0x13'))(_0xc1ec('0x14'));var utils=require('../../config/utils');var config=require(_0xc1ec('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xc1ec('0x16'))['db'];function respondWithStatusCode(_0x5d3aea,_0x581d85){_0x581d85=_0x581d85||0xcc;return function(_0x586c17){if(_0x586c17){return _0x5d3aea[_0xc1ec('0x17')](_0x581d85);}return _0x5d3aea[_0xc1ec('0x18')](_0x581d85)[_0xc1ec('0x19')]();};}function respondWithResult(_0x84af53,_0x48ab55){_0x48ab55=_0x48ab55||0xc8;return function(_0x4570a4){if(_0x4570a4){return _0x84af53[_0xc1ec('0x18')](_0x48ab55)[_0xc1ec('0x1a')](_0x4570a4);}};}function respondWithFilteredResult(_0x18874f,_0x13085d){return function(_0x118c39){if(_0x118c39){var _0x581f7b=_0x118c39[_0xc1ec('0x1b')],_0x1fdf42=_0x13085d[_0xc1ec('0x1c')],_0x5c62bb=_0x13085d['offset']+_0x13085d[_0xc1ec('0x1d')],_0xe17322;if(_0x5c62bb>=_0x581f7b){_0x5c62bb=_0x581f7b;_0xe17322=0xc8;}else{_0xe17322=0xce;}_0x18874f[_0xc1ec('0x18')](_0xe17322);return _0x18874f[_0xc1ec('0x1e')]('Content-Range',_0x1fdf42+'-'+_0x5c62bb+'/'+_0x581f7b)[_0xc1ec('0x1a')](_0x118c39);}return null;};}function patchUpdates(_0x4665a6){return function(_0x56cea8){try{jsonpatch[_0xc1ec('0x1f')](_0x56cea8,_0x4665a6,!![]);}catch(_0x484ffd){return BPromise[_0xc1ec('0x20')](_0x484ffd);}return _0x56cea8[_0xc1ec('0x21')]();};}function saveUpdates(_0x5de32e,_0xa43296){return function(_0x4077fd){if(_0x4077fd){return _0x4077fd[_0xc1ec('0x22')](_0x5de32e)[_0xc1ec('0x23')](function(_0x2ab928){return _0x2ab928;});}return null;};}function removeEntity(_0x4800ac,_0x5c8461){return function(_0xd882fc){if(_0xd882fc){return _0xd882fc[_0xc1ec('0x24')]()[_0xc1ec('0x23')](function(){_0x4800ac['status'](0xcc)[_0xc1ec('0x19')]();});}};}function handleEntityNotFound(_0x26edad,_0x313167){return function(_0x16a5bf){if(!_0x16a5bf){_0x26edad[_0xc1ec('0x17')](0x194);}return _0x16a5bf;};}function handleError(_0x54a47d,_0x500377){_0x500377=_0x500377||0x1f4;return function(_0x8307aa){logger[_0xc1ec('0x25')](_0x8307aa['stack']);if(_0x8307aa[_0xc1ec('0x26')]){delete _0x8307aa[_0xc1ec('0x26')];}_0x54a47d[_0xc1ec('0x18')](_0x500377)['send'](_0x8307aa);};}exports[_0xc1ec('0x27')]=function(_0x420bfa,_0x5b5fd0){var _0x3a7e62={},_0x1dfd5b={},_0x8274a7={'count':0x0,'rows':[]};var _0x57e0ed=_[_0xc1ec('0x28')](db[_0xc1ec('0x29')]['rawAttributes'],function(_0x205399){return{'name':_0x205399[_0xc1ec('0x2a')],'type':_0x205399[_0xc1ec('0x2b')][_0xc1ec('0x2c')]};});_0x1dfd5b[_0xc1ec('0x2d')]=_['differenceBy'](_['map'](_0x57e0ed,_0xc1ec('0x26')),['format']);_0x1dfd5b[_0xc1ec('0x2e')]=_[_0xc1ec('0x2f')](_0x420bfa[_0xc1ec('0x2e')]);_0x1dfd5b[_0xc1ec('0x30')]=_['intersection'](_0x1dfd5b[_0xc1ec('0x2d')],_0x1dfd5b[_0xc1ec('0x2e')]);_0x3a7e62[_0xc1ec('0x31')]=_[_0xc1ec('0x32')](_0x1dfd5b['model'],qs[_0xc1ec('0x33')](_0x420bfa[_0xc1ec('0x2e')][_0xc1ec('0x33')]));_0x3a7e62['attributes']=_0x3a7e62[_0xc1ec('0x31')][_0xc1ec('0x34')]?_0x3a7e62[_0xc1ec('0x31')]:_0x1dfd5b['model'];if(!_0x420bfa['query'][_0xc1ec('0x35')](_0xc1ec('0x36'))){_0x3a7e62[_0xc1ec('0x1d')]=qs[_0xc1ec('0x1d')](_0x420bfa[_0xc1ec('0x2e')][_0xc1ec('0x1d')]);_0x3a7e62[_0xc1ec('0x1c')]=qs[_0xc1ec('0x1c')](_0x420bfa[_0xc1ec('0x2e')]['offset']);}_0x3a7e62[_0xc1ec('0x37')]=qs['sort'](_0x420bfa[_0xc1ec('0x2e')]['sort']);_0x3a7e62[_0xc1ec('0x38')]=qs['filters'](_['pick'](_0x420bfa[_0xc1ec('0x2e')],_0x1dfd5b[_0xc1ec('0x30')]),_0x57e0ed);if(_0x420bfa[_0xc1ec('0x2e')][_0xc1ec('0x39')]){_0x3a7e62[_0xc1ec('0x38')]=_['merge'](_0x3a7e62[_0xc1ec('0x38')],{'$or':_['map'](_0x57e0ed,function(_0x39f846){if(_0x39f846[_0xc1ec('0x2b')]!==_0xc1ec('0x3a')){var _0x2d596c={};_0x2d596c[_0x39f846['name']]={'$like':'%'+_0x420bfa[_0xc1ec('0x2e')][_0xc1ec('0x39')]+'%'};return _0x2d596c;}})});}_0x3a7e62=_[_0xc1ec('0x3b')]({},_0x3a7e62,_0x420bfa[_0xc1ec('0x3c')]);var _0x5a2fa5={'where':_0x3a7e62[_0xc1ec('0x38')]};return db[_0xc1ec('0x29')][_0xc1ec('0x1b')](_0x5a2fa5)[_0xc1ec('0x23')](function(_0x1e0768){_0x8274a7[_0xc1ec('0x1b')]=_0x1e0768;if(_0x420bfa[_0xc1ec('0x2e')][_0xc1ec('0x3d')]){_0x3a7e62[_0xc1ec('0x3e')]=[{'all':!![]}];}return db[_0xc1ec('0x29')]['findAll'](_0x3a7e62);})['then'](function(_0x190249){_0x8274a7['rows']=_0x190249;return _0x8274a7;})[_0xc1ec('0x23')](respondWithFilteredResult(_0x5b5fd0,_0x3a7e62))[_0xc1ec('0x3f')](handleError(_0x5b5fd0,null));};exports[_0xc1ec('0x40')]=function(_0x5d718f,_0x380fec){var _0x4d9059={'raw':![],'where':{'id':_0x5d718f[_0xc1ec('0x41')]['id']}},_0x278383={};_0x278383[_0xc1ec('0x2d')]=_[_0xc1ec('0x2f')](db[_0xc1ec('0x29')]['rawAttributes']);_0x278383['query']=_[_0xc1ec('0x2f')](_0x5d718f[_0xc1ec('0x2e')]);_0x278383[_0xc1ec('0x30')]=_[_0xc1ec('0x32')](_0x278383[_0xc1ec('0x2d')],_0x278383[_0xc1ec('0x2e')]);_0x4d9059[_0xc1ec('0x31')]=_[_0xc1ec('0x32')](_0x278383[_0xc1ec('0x2d')],qs['fields'](_0x5d718f[_0xc1ec('0x2e')][_0xc1ec('0x33')]));_0x4d9059[_0xc1ec('0x31')]=_0x4d9059[_0xc1ec('0x31')][_0xc1ec('0x34')]?_0x4d9059[_0xc1ec('0x31')]:_0x278383['model'];if(_0x5d718f['query'][_0xc1ec('0x3d')]){_0x4d9059[_0xc1ec('0x3e')]=[{'all':!![]}];}_0x4d9059=_[_0xc1ec('0x3b')]({},_0x4d9059,_0x5d718f[_0xc1ec('0x3c')]);return db[_0xc1ec('0x29')]['find'](_0x4d9059)[_0xc1ec('0x23')](handleEntityNotFound(_0x380fec,null))[_0xc1ec('0x23')](respondWithResult(_0x380fec,null))[_0xc1ec('0x3f')](handleError(_0x380fec,null));};exports[_0xc1ec('0x42')]=function(_0x3e1b9b,_0x5d748e){return db['ScreenRecording']['create'](_0x3e1b9b['body'],{})[_0xc1ec('0x23')](respondWithResult(_0x5d748e,0xc9))[_0xc1ec('0x3f')](handleError(_0x5d748e,null));};exports[_0xc1ec('0x22')]=function(_0x3f718d,_0x3bb952){if(_0x3f718d[_0xc1ec('0x43')]['id']){delete _0x3f718d['body']['id'];}delete _0x3f718d[_0xc1ec('0x43')][_0xc1ec('0x44')];delete _0x3f718d[_0xc1ec('0x43')]['createdAt'];delete _0x3f718d['body'][_0xc1ec('0x45')];delete _0x3f718d[_0xc1ec('0x43')][_0xc1ec('0x46')];return db['ScreenRecording'][_0xc1ec('0x47')]({'where':{'id':_0x3f718d[_0xc1ec('0x41')]['id']}})[_0xc1ec('0x23')](handleEntityNotFound(_0x3bb952,null))['then'](saveUpdates(_0x3f718d['body'],null))[_0xc1ec('0x23')](respondWithResult(_0x3bb952,null))['catch'](handleError(_0x3bb952,null));};exports[_0xc1ec('0x48')]=function(_0x1c7c1f,_0x5f4dc1){return db[_0xc1ec('0x29')]['describe']()[_0xc1ec('0x23')](respondWithResult(_0x5f4dc1,null))[_0xc1ec('0x3f')](handleError(_0x5f4dc1,null));};exports[_0xc1ec('0x49')]=function(_0x562f8f,_0x28d8ff,_0x800dba){var _0x125204=require('../../components/encryptor');var _0x565321=![];var _0x56b55d={};if(_0x562f8f[_0xc1ec('0x2e')][_0xc1ec('0x2b')]&&_0x562f8f[_0xc1ec('0x2e')][_0xc1ec('0x2b')]===_0xc1ec('0x4a')){_0x56b55d[_0xc1ec('0x4a')]=_0x562f8f['params']['id'];}else{_0x56b55d['id']=_0x562f8f[_0xc1ec('0x41')]['id'];}return db[_0xc1ec('0x29')][_0xc1ec('0x47')]({'where':_0x56b55d,'attributes':['id',_0xc1ec('0x46')],'raw':!![]})['then'](handleEntityNotFound(_0x28d8ff,null))[_0xc1ec('0x23')](function(_0x3891f3){if(_0x3891f3){var _0x5b2683=path[_0xc1ec('0x4b')](config[_0xc1ec('0x4c')],_0xc1ec('0x4d'),_0x3891f3[_0xc1ec('0x46')]);var _0x5c5cb4=util[_0xc1ec('0x4e')](_0xc1ec('0x4f'),_0x5b2683);if(fs[_0xc1ec('0x50')](_0x5c5cb4)){_0x565321=!![];return _0x125204[_0xc1ec('0x51')](_0x5c5cb4,_0x5b2683,config[_0xc1ec('0x52')]['recording'])[_0xc1ec('0x23')](function(){return _0x3891f3;});}return _0x3891f3;}})[_0xc1ec('0x23')](function(_0x5f1573){if(_0x5f1573){var _0x363503=path['join'](config['root'],_0xc1ec('0x4d'),_0x5f1573[_0xc1ec('0x46')]);if(!fs[_0xc1ec('0x50')](_0x363503)){throw new db[(_0xc1ec('0x53'))]['ValidationError'](_0xc1ec('0x54'));}if(_0x5f1573[_0xc1ec('0x55')]){return _0x28d8ff['download'](_0x363503,_0x5f1573['filename']+path[_0xc1ec('0x56')](_0x363503),function(){if(_0x565321){fs[_0xc1ec('0x57')](_0x363503);}});}else{return _0x28d8ff['download'](_0x363503,function(_0x5a44cd){if(_0x565321){fs['unlink'](_0x363503);}});}}})[_0xc1ec('0x3f')](function(_0x52e166){if(_0x52e166[_0xc1ec('0x58')]===_0xc1ec('0x54')){_0x28d8ff[_0xc1ec('0x18')](0x194)[_0xc1ec('0x59')](_0xc1ec('0x5a'));}else{return handleError(_0x28d8ff,null);}});};exports[_0xc1ec('0x24')]=function(_0xb61921,_0x308f0a){return db[_0xc1ec('0x29')][_0xc1ec('0x47')]({'where':{'id':_0xb61921[_0xc1ec('0x41')]['id']}})[_0xc1ec('0x23')](function(_0x1c9d65){if(!_0x1c9d65)throw new ReferenceError(_0xc1ec('0x5b'));return _0x1c9d65;})['then'](function(_0x9465d1){var _0x510c88=path[_0xc1ec('0x4b')](config['root'],_0xc1ec('0x4d'),_0x9465d1['value']);logger['info'](_0xc1ec('0x5c'),_0x510c88);if(!_[_0xc1ec('0x5d')](_0x9465d1[_0xc1ec('0x46')])&&fs[_0xc1ec('0x50')](_0x510c88)){logger[_0xc1ec('0x5e')]('File:\x20\x22'+_0x510c88+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xc1ec('0x5f')](_0x510c88);}_0x510c88=_0x510c88+_0xc1ec('0x60');if(!_['isNil'](_0x9465d1[_0xc1ec('0x46')])&&fs['existsSync'](_0x510c88)){logger[_0xc1ec('0x5e')](_0xc1ec('0x61')+_0x510c88+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xc1ec('0x5f')](_0x510c88);}return _0x9465d1;})['then'](function(_0x3fb520){if(!_0x3fb520)throw new InternalError();return _0x3fb520[_0xc1ec('0x24')]();})[_0xc1ec('0x23')](function(){_0x308f0a['status'](0xcc)['end']();})['catch'](handleError(_0x308f0a,null));};
\ No newline at end of file