Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / faxMessage / faxMessage.controller.js
index 58746ec..8eed64c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3bb2=['AcceptMessage','acceptMessage','manual','SIP/%s','channel','event','EventManager','fax-interactions','agent','FaxInteractionId','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','interface','rejectmessage','create','findOne','ContactId','fax','Attachment','AttachmentId','SendFax','/var/opt/motion2/server/files/attachments/%s','join','root','server','files','attachments','download','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./faxMessage.socket','register','jayson/promise','client','http','request','info','request\x20sent','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxMessage,\x20%s,\x20%s','message','status','json','count','offset','limit','set','apply','reject','update','then','sendStatus','name','send','rawAttributes','fieldName','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','type','VIRTUAL','FaxMessage','includeAll','include','findAll','rows','catch','show','params','keys','options','body','find','destroy','describe','accept','read','format','UserId','user','CmContact','Contact','get','FaxInteraction','isNil','YYYY-MM-DD\x20HH:mm:ss','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','interaction','null'];(function(_0x1a9204,_0x1c9e00){var _0x17ca68=function(_0x1f4399){while(--_0x1f4399){_0x1a9204['push'](_0x1a9204['shift']());}};_0x17ca68(++_0x1c9e00);}(_0x3bb2,0x1b2));var _0x23bb=function(_0x118ded,_0x18b901){_0x118ded=_0x118ded-0x0;var _0x4d7406=_0x3bb2[_0x118ded];return _0x4d7406;};'use strict';var pdf=require(_0x23bb('0x0'));var emlformat=require(_0x23bb('0x1'));var rimraf=require(_0x23bb('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x23bb('0x3'));var rp=require(_0x23bb('0x4'));var moment=require(_0x23bb('0x5'));var BPromise=require(_0x23bb('0x6'));var Mustache=require(_0x23bb('0x7'));var util=require('util');var path=require(_0x23bb('0x8'));var sox=require(_0x23bb('0x9'));var csv=require(_0x23bb('0xa'));var ejs=require(_0x23bb('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x23bb('0xc'));var jsforce=require(_0x23bb('0xd'));var deskjs=require(_0x23bb('0xe'));var toCsv=require(_0x23bb('0xa'));var querystring=require(_0x23bb('0xf'));var Papa=require(_0x23bb('0x10'));var Redis=require(_0x23bb('0x11'));var authService=require(_0x23bb('0x12'));var qs=require(_0x23bb('0x13'));var as=require(_0x23bb('0x14'));var hardwareService=require(_0x23bb('0x15'));var logger=require(_0x23bb('0x16'))(_0x23bb('0x17'));var utils=require(_0x23bb('0x18'));var config=require(_0x23bb('0x19'));var licenseUtil=require(_0x23bb('0x1a'));var db=require('../../mysqldb')['db'];config[_0x23bb('0x1b')]=_[_0x23bb('0x1c')](config[_0x23bb('0x1b')],{'host':_0x23bb('0x1d'),'port':0x18eb});var socket=require(_0x23bb('0x1e'))(new Redis(config['redis']));require(_0x23bb('0x1f'))[_0x23bb('0x20')](socket);var jayson=require(_0x23bb('0x21'));var client=jayson[_0x23bb('0x22')][_0x23bb('0x23')]({'port':0x232c});var client9002=jayson[_0x23bb('0x22')][_0x23bb('0x23')]({'port':0x232a});function respondWithRpcPromise(_0x1c734f,_0x3da0d4,_0xa1019a,_0x280f2b){return new BPromise(function(_0x3afe40,_0x1430f0){var _0x326f5f=_0x280f2b||client;return _0x326f5f[_0x23bb('0x24')](_0x1c734f,_0xa1019a)['then'](function(_0x2abfba){logger[_0x23bb('0x25')]('FaxMessage,\x20%s,\x20%s',_0x3da0d4,_0x23bb('0x26'));logger['debug'](_0x23bb('0x27'),_0x3da0d4,'request\x20sent',JSON[_0x23bb('0x28')](_0x2abfba));if(_0x2abfba[_0x23bb('0x29')]){if(_0x2abfba['error'][_0x23bb('0x2a')]===0x1f4){logger[_0x23bb('0x29')](_0x23bb('0x2b'),_0x3da0d4,_0x2abfba[_0x23bb('0x29')][_0x23bb('0x2c')]);return _0x1430f0(_0x2abfba[_0x23bb('0x29')][_0x23bb('0x2c')]);}logger[_0x23bb('0x29')](_0x23bb('0x2b'),_0x3da0d4,_0x2abfba[_0x23bb('0x29')][_0x23bb('0x2c')]);return _0x3afe40(_0x2abfba['error'][_0x23bb('0x2c')]);}else{logger[_0x23bb('0x25')](_0x23bb('0x2b'),_0x3da0d4,'request\x20sent');_0x3afe40(_0x2abfba['result']['message']);}})['catch'](function(_0x274866){logger[_0x23bb('0x29')](_0x23bb('0x2b'),_0x3da0d4,_0x274866);_0x1430f0(_0x274866);});});}function respondWithStatusCode(_0x4437d5,_0x464665){_0x464665=_0x464665||0xcc;return function(_0x5669cf){if(_0x5669cf){return _0x4437d5['sendStatus'](_0x464665);}return _0x4437d5[_0x23bb('0x2d')](_0x464665)['end']();};}function respondWithResult(_0x21c8d5,_0x1eb128){_0x1eb128=_0x1eb128||0xc8;return function(_0x24160a){if(_0x24160a){return _0x21c8d5[_0x23bb('0x2d')](_0x1eb128)[_0x23bb('0x2e')](_0x24160a);}};}function respondWithFilteredResult(_0x2ef07a,_0x36389e){return function(_0x5ca455){if(_0x5ca455){var _0x51d738=_0x5ca455[_0x23bb('0x2f')],_0x5405f5=_0x36389e[_0x23bb('0x30')],_0x3547ea=_0x36389e['offset']+_0x36389e[_0x23bb('0x31')],_0x1d59da;if(_0x3547ea>=_0x51d738){_0x3547ea=_0x51d738;_0x1d59da=0xc8;}else{_0x1d59da=0xce;}_0x2ef07a[_0x23bb('0x2d')](_0x1d59da);return _0x2ef07a[_0x23bb('0x32')]('Content-Range',_0x5405f5+'-'+_0x3547ea+'/'+_0x51d738)['json'](_0x5ca455);}return null;};}function patchUpdates(_0x51626d){return function(_0x160d86){try{jsonpatch[_0x23bb('0x33')](_0x160d86,_0x51626d,!![]);}catch(_0xb46c73){return BPromise[_0x23bb('0x34')](_0xb46c73);}return _0x160d86['save']();};}function saveUpdates(_0x2a410f,_0x362301){return function(_0x1f3c2c){if(_0x1f3c2c){return _0x1f3c2c[_0x23bb('0x35')](_0x2a410f)[_0x23bb('0x36')](function(_0x3e4a1b){return _0x3e4a1b;});}return null;};}function removeEntity(_0x1106cc,_0x24d874){return function(_0x34bf3f){if(_0x34bf3f){return _0x34bf3f['destroy']()[_0x23bb('0x36')](function(){_0x1106cc[_0x23bb('0x2d')](0xcc)['end']();});}};}function handleEntityNotFound(_0xe9cbd4,_0x3672ef){return function(_0x310aea){if(!_0x310aea){_0xe9cbd4[_0x23bb('0x37')](0x194);}return _0x310aea;};}function handleError(_0x3873fe,_0xad0fec){_0xad0fec=_0xad0fec||0x1f4;return function(_0x2f7bfb){logger[_0x23bb('0x29')](_0x2f7bfb['stack']);if(_0x2f7bfb['name']){delete _0x2f7bfb[_0x23bb('0x38')];}_0x3873fe[_0x23bb('0x2d')](_0xad0fec)[_0x23bb('0x39')](_0x2f7bfb);};}exports['index']=function(_0x51139f,_0x43f4dd){var _0x3a774a={},_0x699aef={},_0x1abdef={'count':0x0,'rows':[]};var _0x1fe952=_['map'](db['FaxMessage'][_0x23bb('0x3a')],function(_0x24170f){return{'name':_0x24170f[_0x23bb('0x3b')],'type':_0x24170f['type'][_0x23bb('0x3c')]};});_0x699aef[_0x23bb('0x3d')]=_[_0x23bb('0x3e')](_0x1fe952,_0x23bb('0x38'));_0x699aef['query']=_['keys'](_0x51139f[_0x23bb('0x3f')]);_0x699aef[_0x23bb('0x40')]=_[_0x23bb('0x41')](_0x699aef[_0x23bb('0x3d')],_0x699aef[_0x23bb('0x3f')]);_0x3a774a[_0x23bb('0x42')]=_['intersection'](_0x699aef[_0x23bb('0x3d')],qs[_0x23bb('0x43')](_0x51139f[_0x23bb('0x3f')]['fields']));_0x3a774a[_0x23bb('0x42')]=_0x3a774a['attributes'][_0x23bb('0x44')]?_0x3a774a[_0x23bb('0x42')]:_0x699aef[_0x23bb('0x3d')];if(!_0x51139f['query'][_0x23bb('0x45')]('nolimit')){_0x3a774a[_0x23bb('0x31')]=qs[_0x23bb('0x31')](_0x51139f[_0x23bb('0x3f')]['limit']);_0x3a774a[_0x23bb('0x30')]=qs[_0x23bb('0x30')](_0x51139f['query'][_0x23bb('0x30')]);}_0x3a774a[_0x23bb('0x46')]=qs[_0x23bb('0x47')](_0x51139f[_0x23bb('0x3f')][_0x23bb('0x47')]);_0x3a774a[_0x23bb('0x48')]=qs[_0x23bb('0x40')](_[_0x23bb('0x49')](_0x51139f[_0x23bb('0x3f')],_0x699aef[_0x23bb('0x40')]),_0x1fe952);if(_0x51139f[_0x23bb('0x3f')]['filter']){_0x3a774a[_0x23bb('0x48')]=_[_0x23bb('0x4a')](_0x3a774a[_0x23bb('0x48')],{'$or':_[_0x23bb('0x3e')](_0x1fe952,function(_0x31e177){if(_0x31e177[_0x23bb('0x4b')]!==_0x23bb('0x4c')){var _0x3433e5={};_0x3433e5[_0x31e177[_0x23bb('0x38')]]={'$like':'%'+_0x51139f['query']['filter']+'%'};return _0x3433e5;}})});}_0x3a774a=_[_0x23bb('0x4a')]({},_0x3a774a,_0x51139f['options']);var _0x5d1e0a={'where':_0x3a774a['where']};return db[_0x23bb('0x4d')][_0x23bb('0x2f')](_0x5d1e0a)[_0x23bb('0x36')](function(_0x40ccd5){_0x1abdef[_0x23bb('0x2f')]=_0x40ccd5;if(_0x51139f[_0x23bb('0x3f')][_0x23bb('0x4e')]){_0x3a774a[_0x23bb('0x4f')]=[{'all':!![]}];}return db[_0x23bb('0x4d')][_0x23bb('0x50')](_0x3a774a);})[_0x23bb('0x36')](function(_0x3eab70){_0x1abdef[_0x23bb('0x51')]=_0x3eab70;return _0x1abdef;})[_0x23bb('0x36')](respondWithFilteredResult(_0x43f4dd,_0x3a774a))[_0x23bb('0x52')](handleError(_0x43f4dd,null));};exports[_0x23bb('0x53')]=function(_0x3b9542,_0x2430fe){var _0x326f90={'raw':!![],'where':{'id':_0x3b9542[_0x23bb('0x54')]['id']}},_0x1cf058={};_0x1cf058[_0x23bb('0x3d')]=_[_0x23bb('0x55')](db[_0x23bb('0x4d')][_0x23bb('0x3a')]);_0x1cf058[_0x23bb('0x3f')]=_[_0x23bb('0x55')](_0x3b9542[_0x23bb('0x3f')]);_0x1cf058[_0x23bb('0x40')]=_[_0x23bb('0x41')](_0x1cf058[_0x23bb('0x3d')],_0x1cf058[_0x23bb('0x3f')]);_0x326f90['attributes']=_[_0x23bb('0x41')](_0x1cf058[_0x23bb('0x3d')],qs[_0x23bb('0x43')](_0x3b9542[_0x23bb('0x3f')][_0x23bb('0x43')]));_0x326f90[_0x23bb('0x42')]=_0x326f90[_0x23bb('0x42')][_0x23bb('0x44')]?_0x326f90[_0x23bb('0x42')]:_0x1cf058[_0x23bb('0x3d')];if(_0x3b9542[_0x23bb('0x3f')][_0x23bb('0x4e')]){_0x326f90[_0x23bb('0x4f')]=[{'all':!![]}];}_0x326f90=_[_0x23bb('0x4a')]({},_0x326f90,_0x3b9542[_0x23bb('0x56')]);return db[_0x23bb('0x4d')]['find'](_0x326f90)[_0x23bb('0x36')](handleEntityNotFound(_0x2430fe,null))[_0x23bb('0x36')](respondWithResult(_0x2430fe,null))[_0x23bb('0x52')](handleError(_0x2430fe,null));};exports['update']=function(_0x471dc7,_0x37ea0e){if(_0x471dc7[_0x23bb('0x57')]['id']){delete _0x471dc7[_0x23bb('0x57')]['id'];}return db[_0x23bb('0x4d')][_0x23bb('0x58')]({'where':{'id':_0x471dc7['params']['id']}})['then'](handleEntityNotFound(_0x37ea0e,null))[_0x23bb('0x36')](saveUpdates(_0x471dc7[_0x23bb('0x57')],null))[_0x23bb('0x36')](respondWithResult(_0x37ea0e,null))['catch'](handleError(_0x37ea0e,null));};exports[_0x23bb('0x59')]=function(_0x20d9c3,_0x32cc87){return db[_0x23bb('0x4d')][_0x23bb('0x58')]({'where':{'id':_0x20d9c3[_0x23bb('0x54')]['id']}})['then'](handleEntityNotFound(_0x32cc87,null))['then'](removeEntity(_0x32cc87,null))[_0x23bb('0x52')](handleError(_0x32cc87,null));};exports[_0x23bb('0x5a')]=function(_0x233388,_0x297f95){return db[_0x23bb('0x4d')]['describe']()[_0x23bb('0x36')](respondWithResult(_0x297f95,null))[_0x23bb('0x52')](handleError(_0x297f95,null));};var interaction_log=require(_0x23bb('0x16'))('fax-interactions');exports[_0x23bb('0x5b')]=function(_0x4b4d2d,_0x3e2ce1,_0x478bfc){var _0x613499={'channel':'fax'};if(_0x4b4d2d['body']['id']){delete _0x4b4d2d[_0x23bb('0x57')]['id'];}_0x4b4d2d[_0x23bb('0x57')][_0x23bb('0x5c')]=!![];_0x4b4d2d[_0x23bb('0x57')]['readAt']=moment()[_0x23bb('0x5d')]('YYYY-MM-DD\x20HH:mm:ss');_0x4b4d2d[_0x23bb('0x57')][_0x23bb('0x5e')]=_0x4b4d2d[_0x23bb('0x57')][_0x23bb('0x5e')]||_0x4b4d2d[_0x23bb('0x5f')]['id'];return db[_0x23bb('0x4d')]['find']({'where':{'id':_0x4b4d2d[_0x23bb('0x54')]['id'],'UserId':null},'include':[{'model':db[_0x23bb('0x60')],'as':_0x23bb('0x61')}]})[_0x23bb('0x36')](handleEntityNotFound(_0x3e2ce1,null))[_0x23bb('0x36')](saveUpdates(_0x4b4d2d[_0x23bb('0x57')],null))[_0x23bb('0x36')](function(_0x196210){if(_0x196210){_0x613499[_0x23bb('0x2c')]=_0x196210[_0x23bb('0x62')]({'plain':!![]});return db[_0x23bb('0x63')]['find']({'where':{'id':_0x196210['FaxInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x3e2ce1,null))['then'](function(_0x4f253c){if(_0x4f253c){return _0x4f253c[_0x23bb('0x35')]({'UserId':_0x4b4d2d[_0x23bb('0x57')]['UserId'],'read1stAt':_[_0x23bb('0x64')](_0x4f253c['read1stAt'])?moment()['format'](_0x23bb('0x65')):undefined});}return null;})['then'](function(_0x21e5da){if(_0x21e5da){_0x613499['interaction']=_0x21e5da[_0x23bb('0x62')]({'plain':!![]});interaction_log[_0x23bb('0x25')](_0x23bb('0x66'),_0x4b4d2d[_0x23bb('0x5f')]['id'],_0x4b4d2d[_0x23bb('0x5f')][_0x23bb('0x38')],_0x4b4d2d['user'][_0x23bb('0x67')],_0x613499[_0x23bb('0x68')]['id'],_0x4b4d2d['body']?JSON[_0x23bb('0x28')](_0x4b4d2d[_0x23bb('0x57')]):_0x23bb('0x69'));return respondWithRpcPromise(_0x23bb('0x6a'),_0x23bb('0x6b'),_0x613499);}return null;})[_0x23bb('0x36')](function(_0x437ef7){if(_0x437ef7){if(_0x4b4d2d[_0x23bb('0x57')][_0x23bb('0x6c')]){_0x613499[_0x23bb('0x2c')]['interface']=util[_0x23bb('0x5d')](_0x23bb('0x6d'),_0x4b4d2d[_0x23bb('0x5f')][_0x23bb('0x38')]);_0x613499[_0x23bb('0x2c')][_0x23bb('0x6e')]=_0x613499[_0x23bb('0x6e')];_0x613499['message'][_0x23bb('0x6f')]=_0x23bb('0x5b');return respondWithRpcPromise(_0x23bb('0x70'),'EventManager',{'event':'acceptmessage','message':_0x613499[_0x23bb('0x2c')]},client9002)[_0x23bb('0x36')](function(){return _0x613499;});}return _0x613499;}return null;})[_0x23bb('0x36')](respondWithResult(_0x3e2ce1,null))[_0x23bb('0x52')](handleError(_0x3e2ce1,null));};var interaction_log=require(_0x23bb('0x16'))(_0x23bb('0x71'));exports['reject']=function(_0x2a90be,_0x3e4c24,_0x58a199){var _0x3eed1c={'agent':{},'channel':'fax'};if(_0x2a90be['body']['id']){delete _0x2a90be[_0x23bb('0x57')]['id'];}_0x2a90be[_0x23bb('0x57')]['UserId']=_0x2a90be['body'][_0x23bb('0x5e')]||_0x2a90be['user']['id'];_0x3eed1c[_0x23bb('0x72')]['id']=_0x2a90be[_0x23bb('0x57')]['UserId'];return db['FaxMessage'][_0x23bb('0x58')]({'where':{'id':_0x2a90be[_0x23bb('0x54')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x3e4c24,null))['then'](function(_0x5cb237){if(_0x5cb237){_0x3eed1c[_0x23bb('0x2c')]=_0x5cb237['get']({'plain':!![]});return db[_0x23bb('0x63')]['find']({'where':{'id':_0x5cb237[_0x23bb('0x73')]}});}return null;})['then'](handleEntityNotFound(_0x3e4c24,null))[_0x23bb('0x36')](function(_0x3ebb2f){if(_0x3ebb2f){_0x3eed1c['interaction']=_0x3ebb2f[_0x23bb('0x62')]({'plain':!![]});interaction_log[_0x23bb('0x25')](_0x23bb('0x74'),_0x2a90be['user']['id'],_0x2a90be[_0x23bb('0x5f')][_0x23bb('0x38')],_0x2a90be[_0x23bb('0x5f')][_0x23bb('0x67')],_0x3eed1c['interaction']['id'],_0x2a90be[_0x23bb('0x57')]?JSON[_0x23bb('0x28')](_0x2a90be[_0x23bb('0x57')]):'null');return respondWithRpcPromise(_0x23bb('0x75'),_0x23bb('0x76'),_0x3eed1c);}return null;})[_0x23bb('0x36')](function(_0x8e5e1e){if(_0x8e5e1e){_0x8e5e1e[_0x23bb('0x2c')][_0x23bb('0x77')]=util[_0x23bb('0x5d')]('SIP/%s',_0x2a90be[_0x23bb('0x5f')]['name']);_0x8e5e1e[_0x23bb('0x2c')][_0x23bb('0x6e')]=_0x3eed1c[_0x23bb('0x6e')];_0x8e5e1e[_0x23bb('0x2c')][_0x23bb('0x6f')]=_0x23bb('0x34');respondWithRpcPromise(_0x23bb('0x70'),_0x23bb('0x70'),{'event':_0x23bb('0x78'),'message':_0x8e5e1e[_0x23bb('0x2c')]},client9002);return _0x3eed1c;}return null;})[_0x23bb('0x36')](respondWithResult(_0x3e4c24,null))[_0x23bb('0x52')](handleError(_0x3e4c24,null));};exports['create']=function(_0x1f35de,_0x1e38ca){var _0x3c994a;return db['FaxMessage'][_0x23bb('0x79')](_0x1f35de['body'],{})[_0x23bb('0x36')](function(_0x136c65){_0x3c994a=_0x136c65;return db[_0x23bb('0x60')][_0x23bb('0x7a')]({'where':{'id':_0x3c994a[_0x23bb('0x7b')]}});})[_0x23bb('0x36')](function(_0x2fa489){if(_[_0x23bb('0x64')](_0x2fa489)){return;}else{_0x3c994a[_0x23bb('0x7c')]=_0x2fa489[_0x23bb('0x7c')];return db[_0x23bb('0x7d')]['findOne']({'where':{'id':_0x3c994a[_0x23bb('0x7e')]}});}})['then'](function(_0x5f1a4f){return respondWithRpcPromise(_0x23bb('0x7f'),_0x23bb('0x7f'),{'FaxAccountId':_[_0x23bb('0x64')](_0x1f35de[_0x23bb('0x57')])?undefined:_0x1f35de[_0x23bb('0x57')]['FaxAccountId'],'path':_[_0x23bb('0x64')](_0x5f1a4f)?undefined:util[_0x23bb('0x5d')](_0x23bb('0x80'),_0x5f1a4f['basename']),'fax':_[_0x23bb('0x64')](_0x3c994a[_0x23bb('0x7c')])?undefined:_0x3c994a[_0x23bb('0x7c')],'AttachmentId':_0x3c994a[_0x23bb('0x7e')]},client9002);})[_0x23bb('0x36')](respondWithResult(_0x1e38ca,0xc9))['catch'](handleError(_0x1e38ca,null));};exports['download']=function(_0x2c4144,_0x296efc){var _0x3f68a5=path[_0x23bb('0x81')](config[_0x23bb('0x82')],_0x23bb('0x83'),_0x23bb('0x84'),_0x23bb('0x85'));return db[_0x23bb('0x4d')][_0x23bb('0x58')]({'where':{'id':_0x2c4144[_0x23bb('0x54')]['id']},'include':[{'model':db['Attachment'],'as':'Attachment'}]})['then'](handleEntityNotFound(_0x296efc,null))[_0x23bb('0x36')](function(_0x2d83f4){if(_0x2d83f4){return _0x296efc[_0x23bb('0x86')](path['join'](_0x3f68a5,_0x2d83f4['Attachment']['basename']));}})[_0x23bb('0x52')](handleError(_0x296efc,null));};
\ No newline at end of file
+var _0xd4cb=['Contact','get','FaxInteraction','FaxInteractionId','isNil','read1stAt','interaction','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','interface','channel','event','EventManager','acceptmessage','fax','agent','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','rejectMessage','SIP/%s','rejectmessage','create','findOne','AttachmentId','SendFax','/var/opt/motion2/server/files/attachments/%s','basename','download','join','root','server','Attachment','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','to-csv','ejs','squel','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','jayson/promise','http','client','then','info','FaxMessage,\x20%s,\x20%s','debug','FaxMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','end','status','count','offset','limit','set','Content-Range','json','apply','reject','stack','name','map','FaxMessage','fieldName','key','query','keys','filters','intersection','model','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge','type','options','includeAll','include','show','params','rawAttributes','fields','find','update','body','catch','destroy','describe','fax-interactions','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact'];(function(_0x10f532,_0x1f3f3d){var _0x2e06d8=function(_0x5b7b1d){while(--_0x5b7b1d){_0x10f532['push'](_0x10f532['shift']());}};_0x2e06d8(++_0x1f3f3d);}(_0xd4cb,0x9e));var _0xbd4c=function(_0x5b54bf,_0x512818){_0x5b54bf=_0x5b54bf-0x0;var _0x563ab8=_0xd4cb[_0x5b54bf];return _0x563ab8;};'use strict';var pdf=require(_0xbd4c('0x0'));var emlformat=require(_0xbd4c('0x1'));var rimraf=require(_0xbd4c('0x2'));var zipdir=require(_0xbd4c('0x3'));var jsonpatch=require(_0xbd4c('0x4'));var rp=require(_0xbd4c('0x5'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xbd4c('0x6'));var util=require(_0xbd4c('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0xbd4c('0x8'));var ejs=require(_0xbd4c('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xbd4c('0xa'));var crypto=require('crypto');var jsforce=require(_0xbd4c('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xbd4c('0xc'));var Papa=require(_0xbd4c('0xd'));var Redis=require(_0xbd4c('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xbd4c('0xf'));var as=require(_0xbd4c('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xbd4c('0x11'))('api');var utils=require('../../config/utils');var config=require(_0xbd4c('0x12'));var licenseUtil=require(_0xbd4c('0x13'));var db=require(_0xbd4c('0x14'))['db'];config[_0xbd4c('0x15')]=_[_0xbd4c('0x16')](config[_0xbd4c('0x15')],{'host':_0xbd4c('0x17'),'port':0x18eb});var socket=require(_0xbd4c('0x18'))(new Redis(config[_0xbd4c('0x15')]));require('./faxMessage.socket')[_0xbd4c('0x19')](socket);var jayson=require(_0xbd4c('0x1a'));var client=jayson['client'][_0xbd4c('0x1b')]({'port':0x232c});var client9002=jayson[_0xbd4c('0x1c')][_0xbd4c('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x1d3dd8,_0x5a2c29,_0x40dcb2,_0x200001){return new BPromise(function(_0x27492f,_0xdbb912){var _0x4902f7=_0x200001||client;return _0x4902f7['request'](_0x1d3dd8,_0x40dcb2)[_0xbd4c('0x1d')](function(_0x35fe12){logger[_0xbd4c('0x1e')](_0xbd4c('0x1f'),_0x5a2c29,'request\x20sent');logger[_0xbd4c('0x20')](_0xbd4c('0x21'),_0x5a2c29,_0xbd4c('0x22'),JSON[_0xbd4c('0x23')](_0x35fe12));if(_0x35fe12[_0xbd4c('0x24')]){if(_0x35fe12[_0xbd4c('0x24')]['code']===0x1f4){logger['error'](_0xbd4c('0x1f'),_0x5a2c29,_0x35fe12['error'][_0xbd4c('0x25')]);return _0xdbb912(_0x35fe12[_0xbd4c('0x24')][_0xbd4c('0x25')]);}logger['error']('FaxMessage,\x20%s,\x20%s',_0x5a2c29,_0x35fe12['error']['message']);return _0x27492f(_0x35fe12[_0xbd4c('0x24')][_0xbd4c('0x25')]);}else{logger[_0xbd4c('0x1e')](_0xbd4c('0x1f'),_0x5a2c29,_0xbd4c('0x22'));_0x27492f(_0x35fe12[_0xbd4c('0x26')][_0xbd4c('0x25')]);}})['catch'](function(_0xc6d4f8){logger['error'](_0xbd4c('0x1f'),_0x5a2c29,_0xc6d4f8);_0xdbb912(_0xc6d4f8);});});}function respondWithStatusCode(_0x2a0fe8,_0x5dfc0f){_0x5dfc0f=_0x5dfc0f||0xcc;return function(_0x34a0aa){if(_0x34a0aa){return _0x2a0fe8['sendStatus'](_0x5dfc0f);}return _0x2a0fe8['status'](_0x5dfc0f)[_0xbd4c('0x27')]();};}function respondWithResult(_0x1f7502,_0x3682e0){_0x3682e0=_0x3682e0||0xc8;return function(_0x5c6907){if(_0x5c6907){return _0x1f7502[_0xbd4c('0x28')](_0x3682e0)['json'](_0x5c6907);}};}function respondWithFilteredResult(_0x37c327,_0x20e37e){return function(_0x8d89b0){if(_0x8d89b0){var _0x212f6d=_0x8d89b0[_0xbd4c('0x29')],_0x2684c5=_0x20e37e[_0xbd4c('0x2a')],_0x357259=_0x20e37e['offset']+_0x20e37e[_0xbd4c('0x2b')],_0x59b774;if(_0x357259>=_0x212f6d){_0x357259=_0x212f6d;_0x59b774=0xc8;}else{_0x59b774=0xce;}_0x37c327[_0xbd4c('0x28')](_0x59b774);return _0x37c327[_0xbd4c('0x2c')](_0xbd4c('0x2d'),_0x2684c5+'-'+_0x357259+'/'+_0x212f6d)[_0xbd4c('0x2e')](_0x8d89b0);}return null;};}function patchUpdates(_0x484b80){return function(_0x263342){try{jsonpatch[_0xbd4c('0x2f')](_0x263342,_0x484b80,!![]);}catch(_0x3c32bd){return BPromise[_0xbd4c('0x30')](_0x3c32bd);}return _0x263342['save']();};}function saveUpdates(_0x5ade87,_0x1ad2a8){return function(_0x30991a){if(_0x30991a){return _0x30991a['update'](_0x5ade87)[_0xbd4c('0x1d')](function(_0x2fd738){return _0x2fd738;});}return null;};}function removeEntity(_0x3b4865,_0x557b76){return function(_0x15dd92){if(_0x15dd92){return _0x15dd92['destroy']()[_0xbd4c('0x1d')](function(){_0x3b4865[_0xbd4c('0x28')](0xcc)[_0xbd4c('0x27')]();});}};}function handleEntityNotFound(_0xb7f6ec,_0x3cefb4){return function(_0x418925){if(!_0x418925){_0xb7f6ec['sendStatus'](0x194);}return _0x418925;};}function handleError(_0x5d9509,_0x365b7d){_0x365b7d=_0x365b7d||0x1f4;return function(_0x2d1d68){logger['error'](_0x2d1d68[_0xbd4c('0x31')]);if(_0x2d1d68[_0xbd4c('0x32')]){delete _0x2d1d68[_0xbd4c('0x32')];}_0x5d9509[_0xbd4c('0x28')](_0x365b7d)['send'](_0x2d1d68);};}exports['index']=function(_0x3ffe56,_0x13c1a0){var _0x46841d={},_0x1f861b={},_0x2dc6f9={'count':0x0,'rows':[]};var _0x29cbe6=_[_0xbd4c('0x33')](db[_0xbd4c('0x34')]['rawAttributes'],function(_0x28344d){return{'name':_0x28344d[_0xbd4c('0x35')],'type':_0x28344d['type'][_0xbd4c('0x36')]};});_0x1f861b['model']=_['map'](_0x29cbe6,'name');_0x1f861b[_0xbd4c('0x37')]=_[_0xbd4c('0x38')](_0x3ffe56[_0xbd4c('0x37')]);_0x1f861b[_0xbd4c('0x39')]=_[_0xbd4c('0x3a')](_0x1f861b[_0xbd4c('0x3b')],_0x1f861b[_0xbd4c('0x37')]);_0x46841d[_0xbd4c('0x3c')]=_[_0xbd4c('0x3a')](_0x1f861b[_0xbd4c('0x3b')],qs['fields'](_0x3ffe56[_0xbd4c('0x37')]['fields']));_0x46841d[_0xbd4c('0x3c')]=_0x46841d['attributes'][_0xbd4c('0x3d')]?_0x46841d[_0xbd4c('0x3c')]:_0x1f861b[_0xbd4c('0x3b')];if(!_0x3ffe56[_0xbd4c('0x37')][_0xbd4c('0x3e')](_0xbd4c('0x3f'))){_0x46841d[_0xbd4c('0x2b')]=qs[_0xbd4c('0x2b')](_0x3ffe56['query'][_0xbd4c('0x2b')]);_0x46841d[_0xbd4c('0x2a')]=qs['offset'](_0x3ffe56[_0xbd4c('0x37')][_0xbd4c('0x2a')]);}_0x46841d['order']=qs['sort'](_0x3ffe56[_0xbd4c('0x37')][_0xbd4c('0x40')]);_0x46841d[_0xbd4c('0x41')]=qs[_0xbd4c('0x39')](_['pick'](_0x3ffe56['query'],_0x1f861b[_0xbd4c('0x39')]),_0x29cbe6);if(_0x3ffe56[_0xbd4c('0x37')][_0xbd4c('0x42')]){_0x46841d[_0xbd4c('0x41')]=_[_0xbd4c('0x43')](_0x46841d[_0xbd4c('0x41')],{'$or':_[_0xbd4c('0x33')](_0x29cbe6,function(_0x1999cb){if(_0x1999cb[_0xbd4c('0x44')]!=='VIRTUAL'){var _0x3587dc={};_0x3587dc[_0x1999cb[_0xbd4c('0x32')]]={'$like':'%'+_0x3ffe56[_0xbd4c('0x37')][_0xbd4c('0x42')]+'%'};return _0x3587dc;}})});}_0x46841d=_[_0xbd4c('0x43')]({},_0x46841d,_0x3ffe56[_0xbd4c('0x45')]);var _0x4681e3={'where':_0x46841d['where']};return db['FaxMessage'][_0xbd4c('0x29')](_0x4681e3)[_0xbd4c('0x1d')](function(_0x2cbfd7){_0x2dc6f9['count']=_0x2cbfd7;if(_0x3ffe56[_0xbd4c('0x37')][_0xbd4c('0x46')]){_0x46841d[_0xbd4c('0x47')]=[{'all':!![]}];}return db['FaxMessage']['findAll'](_0x46841d);})[_0xbd4c('0x1d')](function(_0x510d8f){_0x2dc6f9['rows']=_0x510d8f;return _0x2dc6f9;})[_0xbd4c('0x1d')](respondWithFilteredResult(_0x13c1a0,_0x46841d))['catch'](handleError(_0x13c1a0,null));};exports[_0xbd4c('0x48')]=function(_0x4da042,_0x148965){var _0x17af6f={'raw':!![],'where':{'id':_0x4da042[_0xbd4c('0x49')]['id']}},_0x27e26d={};_0x27e26d[_0xbd4c('0x3b')]=_[_0xbd4c('0x38')](db['FaxMessage'][_0xbd4c('0x4a')]);_0x27e26d[_0xbd4c('0x37')]=_['keys'](_0x4da042['query']);_0x27e26d[_0xbd4c('0x39')]=_['intersection'](_0x27e26d[_0xbd4c('0x3b')],_0x27e26d[_0xbd4c('0x37')]);_0x17af6f[_0xbd4c('0x3c')]=_[_0xbd4c('0x3a')](_0x27e26d[_0xbd4c('0x3b')],qs[_0xbd4c('0x4b')](_0x4da042[_0xbd4c('0x37')]['fields']));_0x17af6f[_0xbd4c('0x3c')]=_0x17af6f[_0xbd4c('0x3c')][_0xbd4c('0x3d')]?_0x17af6f[_0xbd4c('0x3c')]:_0x27e26d['model'];if(_0x4da042[_0xbd4c('0x37')][_0xbd4c('0x46')]){_0x17af6f['include']=[{'all':!![]}];}_0x17af6f=_[_0xbd4c('0x43')]({},_0x17af6f,_0x4da042[_0xbd4c('0x45')]);return db[_0xbd4c('0x34')][_0xbd4c('0x4c')](_0x17af6f)[_0xbd4c('0x1d')](handleEntityNotFound(_0x148965,null))[_0xbd4c('0x1d')](respondWithResult(_0x148965,null))['catch'](handleError(_0x148965,null));};exports[_0xbd4c('0x4d')]=function(_0x2cf56e,_0x33adac){if(_0x2cf56e[_0xbd4c('0x4e')]['id']){delete _0x2cf56e[_0xbd4c('0x4e')]['id'];}return db[_0xbd4c('0x34')]['find']({'where':{'id':_0x2cf56e['params']['id']}})['then'](handleEntityNotFound(_0x33adac,null))[_0xbd4c('0x1d')](saveUpdates(_0x2cf56e[_0xbd4c('0x4e')],null))[_0xbd4c('0x1d')](respondWithResult(_0x33adac,null))[_0xbd4c('0x4f')](handleError(_0x33adac,null));};exports[_0xbd4c('0x50')]=function(_0x555480,_0x101559){return db[_0xbd4c('0x34')]['find']({'where':{'id':_0x555480['params']['id']}})[_0xbd4c('0x1d')](handleEntityNotFound(_0x101559,null))[_0xbd4c('0x1d')](removeEntity(_0x101559,null))[_0xbd4c('0x4f')](handleError(_0x101559,null));};exports['describe']=function(_0x5c4a90,_0x41cb4e){return db[_0xbd4c('0x34')][_0xbd4c('0x51')]()[_0xbd4c('0x1d')](respondWithResult(_0x41cb4e,null))['catch'](handleError(_0x41cb4e,null));};var interaction_log=require('../../config/logger')(_0xbd4c('0x52'));exports['accept']=function(_0xc37f46,_0x1fd840,_0x42a234){var _0xdd32cf={'channel':'fax'};if(_0xc37f46[_0xbd4c('0x4e')]['id']){delete _0xc37f46[_0xbd4c('0x4e')]['id'];}_0xc37f46[_0xbd4c('0x4e')][_0xbd4c('0x53')]=!![];_0xc37f46[_0xbd4c('0x4e')][_0xbd4c('0x54')]=moment()[_0xbd4c('0x55')](_0xbd4c('0x56'));_0xc37f46['body'][_0xbd4c('0x57')]=_0xc37f46[_0xbd4c('0x4e')]['UserId']||_0xc37f46[_0xbd4c('0x58')]['id'];return db[_0xbd4c('0x34')][_0xbd4c('0x4c')]({'where':{'id':_0xc37f46['params']['id'],'UserId':null},'include':[{'model':db[_0xbd4c('0x59')],'as':_0xbd4c('0x5a')}]})['then'](handleEntityNotFound(_0x1fd840,null))[_0xbd4c('0x1d')](saveUpdates(_0xc37f46[_0xbd4c('0x4e')],null))[_0xbd4c('0x1d')](function(_0x24b878){if(_0x24b878){_0xdd32cf[_0xbd4c('0x25')]=_0x24b878[_0xbd4c('0x5b')]({'plain':!![]});return db[_0xbd4c('0x5c')][_0xbd4c('0x4c')]({'where':{'id':_0x24b878[_0xbd4c('0x5d')]}});}return null;})['then'](handleEntityNotFound(_0x1fd840,null))[_0xbd4c('0x1d')](function(_0x573b25){if(_0x573b25){return _0x573b25[_0xbd4c('0x4d')]({'UserId':_0xc37f46['body'][_0xbd4c('0x57')],'read1stAt':_[_0xbd4c('0x5e')](_0x573b25[_0xbd4c('0x5f')])?moment()[_0xbd4c('0x55')](_0xbd4c('0x56')):undefined});}return null;})['then'](function(_0x559b99){if(_0x559b99){_0xdd32cf[_0xbd4c('0x60')]=_0x559b99[_0xbd4c('0x5b')]({'plain':!![]});interaction_log[_0xbd4c('0x1e')](_0xbd4c('0x61'),_0xc37f46[_0xbd4c('0x58')]['id'],_0xc37f46[_0xbd4c('0x58')][_0xbd4c('0x32')],_0xc37f46[_0xbd4c('0x58')][_0xbd4c('0x62')],_0xdd32cf[_0xbd4c('0x60')]['id'],_0xc37f46['body']?JSON['stringify'](_0xc37f46[_0xbd4c('0x4e')]):_0xbd4c('0x63'));return respondWithRpcPromise(_0xbd4c('0x64'),_0xbd4c('0x65'),_0xdd32cf);}return null;})['then'](function(_0x13d6a5){if(_0x13d6a5){if(_0xc37f46[_0xbd4c('0x4e')]['manual']){_0xdd32cf[_0xbd4c('0x25')][_0xbd4c('0x66')]=util[_0xbd4c('0x55')]('SIP/%s',_0xc37f46['user'][_0xbd4c('0x32')]);_0xdd32cf[_0xbd4c('0x25')][_0xbd4c('0x67')]=_0xdd32cf['channel'];_0xdd32cf['message'][_0xbd4c('0x68')]='accept';return respondWithRpcPromise('EventManager',_0xbd4c('0x69'),{'event':_0xbd4c('0x6a'),'message':_0xdd32cf['message']},client9002)[_0xbd4c('0x1d')](function(){return _0xdd32cf;});}return _0xdd32cf;}return null;})[_0xbd4c('0x1d')](respondWithResult(_0x1fd840,null))[_0xbd4c('0x4f')](handleError(_0x1fd840,null));};var interaction_log=require(_0xbd4c('0x11'))(_0xbd4c('0x52'));exports['reject']=function(_0x1ed1c1,_0x4a79f2,_0x4dba49){var _0x220eee={'agent':{},'channel':_0xbd4c('0x6b')};if(_0x1ed1c1['body']['id']){delete _0x1ed1c1[_0xbd4c('0x4e')]['id'];}_0x1ed1c1[_0xbd4c('0x4e')]['UserId']=_0x1ed1c1['body'][_0xbd4c('0x57')]||_0x1ed1c1[_0xbd4c('0x58')]['id'];_0x220eee[_0xbd4c('0x6c')]['id']=_0x1ed1c1[_0xbd4c('0x4e')]['UserId'];return db[_0xbd4c('0x34')][_0xbd4c('0x4c')]({'where':{'id':_0x1ed1c1[_0xbd4c('0x49')]['id'],'UserId':null}})[_0xbd4c('0x1d')](handleEntityNotFound(_0x4a79f2,null))[_0xbd4c('0x1d')](function(_0x5dd6b1){if(_0x5dd6b1){_0x220eee[_0xbd4c('0x25')]=_0x5dd6b1[_0xbd4c('0x5b')]({'plain':!![]});return db[_0xbd4c('0x5c')][_0xbd4c('0x4c')]({'where':{'id':_0x5dd6b1[_0xbd4c('0x5d')]}});}return null;})[_0xbd4c('0x1d')](handleEntityNotFound(_0x4a79f2,null))[_0xbd4c('0x1d')](function(_0x1e1081){if(_0x1e1081){_0x220eee[_0xbd4c('0x60')]=_0x1e1081[_0xbd4c('0x5b')]({'plain':!![]});interaction_log[_0xbd4c('0x1e')](_0xbd4c('0x6d'),_0x1ed1c1[_0xbd4c('0x58')]['id'],_0x1ed1c1[_0xbd4c('0x58')][_0xbd4c('0x32')],_0x1ed1c1[_0xbd4c('0x58')]['role'],_0x220eee['interaction']['id'],_0x1ed1c1[_0xbd4c('0x4e')]?JSON[_0xbd4c('0x23')](_0x1ed1c1[_0xbd4c('0x4e')]):_0xbd4c('0x63'));return respondWithRpcPromise('RejectMessage',_0xbd4c('0x6e'),_0x220eee);}return null;})[_0xbd4c('0x1d')](function(_0x1d7d16){if(_0x1d7d16){_0x1d7d16[_0xbd4c('0x25')]['interface']=util[_0xbd4c('0x55')](_0xbd4c('0x6f'),_0x1ed1c1[_0xbd4c('0x58')][_0xbd4c('0x32')]);_0x1d7d16[_0xbd4c('0x25')]['channel']=_0x220eee[_0xbd4c('0x67')];_0x1d7d16[_0xbd4c('0x25')][_0xbd4c('0x68')]='reject';respondWithRpcPromise(_0xbd4c('0x69'),'EventManager',{'event':_0xbd4c('0x70'),'message':_0x1d7d16[_0xbd4c('0x25')]},client9002);return _0x220eee;}return null;})[_0xbd4c('0x1d')](respondWithResult(_0x4a79f2,null))[_0xbd4c('0x4f')](handleError(_0x4a79f2,null));};exports[_0xbd4c('0x71')]=function(_0x2f4689,_0x326576){var _0x2d00cf;return db['FaxMessage'][_0xbd4c('0x71')](_0x2f4689[_0xbd4c('0x4e')],{})[_0xbd4c('0x1d')](function(_0x2731e7){_0x2d00cf=_0x2731e7;return db[_0xbd4c('0x59')][_0xbd4c('0x72')]({'where':{'id':_0x2d00cf['ContactId']}});})[_0xbd4c('0x1d')](function(_0x16f387){if(_['isNil'](_0x16f387)){return;}else{_0x2d00cf['fax']=_0x16f387[_0xbd4c('0x6b')];return db['Attachment'][_0xbd4c('0x72')]({'where':{'id':_0x2d00cf[_0xbd4c('0x73')]}});}})[_0xbd4c('0x1d')](function(_0x31db9d){return respondWithRpcPromise(_0xbd4c('0x74'),_0xbd4c('0x74'),{'FaxAccountId':_[_0xbd4c('0x5e')](_0x2f4689[_0xbd4c('0x4e')])?undefined:_0x2f4689[_0xbd4c('0x4e')]['FaxAccountId'],'path':_[_0xbd4c('0x5e')](_0x31db9d)?undefined:util[_0xbd4c('0x55')](_0xbd4c('0x75'),_0x31db9d[_0xbd4c('0x76')]),'fax':_[_0xbd4c('0x5e')](_0x2d00cf[_0xbd4c('0x6b')])?undefined:_0x2d00cf['fax'],'AttachmentId':_0x2d00cf[_0xbd4c('0x73')]},client9002);})[_0xbd4c('0x1d')](respondWithResult(_0x326576,0xc9))[_0xbd4c('0x4f')](handleError(_0x326576,null));};exports[_0xbd4c('0x77')]=function(_0x37708e,_0x3bc769){var _0x2f06b0=path[_0xbd4c('0x78')](config[_0xbd4c('0x79')],_0xbd4c('0x7a'),'files','attachments');return db[_0xbd4c('0x34')][_0xbd4c('0x4c')]({'where':{'id':_0x37708e[_0xbd4c('0x49')]['id']},'include':[{'model':db[_0xbd4c('0x7b')],'as':'Attachment'}]})[_0xbd4c('0x1d')](handleEntityNotFound(_0x3bc769,null))[_0xbd4c('0x1d')](function(_0x2807ac){if(_0x2807ac){return _0x3bc769[_0xbd4c('0x77')](path[_0xbd4c('0x78')](_0x2f06b0,_0x2807ac[_0xbd4c('0x7b')][_0xbd4c('0x76')]));}})[_0xbd4c('0x4f')](handleError(_0x3bc769,null));};
\ No newline at end of file