Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.controller.js
index 3dd1342..ef6fa57 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcc8=['nolimit','order','sort','where','filter','merge','VIRTUAL','includeAll','include','ServicenowAccount','rows','params','options','find','catch','create','body','destroy','getConfigurations','ServicenowConfiguration','pick','addConfiguration','findOne','AccountId','Subjects','getSubjects','channel','getDescriptions','ServicenowField','Descriptions','getFields','made_sla','hold_reason','knowledge','subcategory','incident_state','severity','caused_by','upon_reject','sys_updated_on','child_incidents','approval_history','number','resolved_by','user_input','sys_created_on','sys_domain','state','calendar_stc','closed_at','cmdb_ci','impact','active','work_notes_list','business_service','priority','time_worked','expected_start','opened_at','business_duration','reopened_time','resolved_at','caller_id','approval_set','work_notes','close_code','correlation_display','work_start','assignment_group','business_stc','additional_assignee_list','description','notify','sys_class_name','close_notes','closed_by','follow_up','parent_incident','sys_id','contact_type','reopened_by','problem_id','reassignment_count','activity_due','assigned_to','sla_due','approval','comments_and_work_notes','due_date','sys_mod_count','reopen_count','sys_tags','escalation','upon_approval','correlation_id','location','category','username','password','email','remoteUri','slice','substring','lastIndexOf','%s/api/now/doc/table/schema/','%s/api/now/table/','GET','incident?sysparm_display_value=all','result','log','incident\x20table\x20objects','remove','forEach','internalType','label','push','TCL:\x20_object','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','concat','test','Wrong\x20credentials','statusCode','True','true','False','false','sys_choice?sysparm_query=name=incident^element=','inactive','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0x53eba7,_0x38744c){var _0x32491b=function(_0x61ea1d){while(--_0x61ea1d){_0x53eba7['push'](_0x53eba7['shift']());}};_0x32491b(++_0x38744c);}(_0xbcc8,0x80));var _0x8bcc=function(_0x2aee2f,_0xad9887){_0x2aee2f=_0x2aee2f-0x0;var _0x19337f=_0xbcc8[_0x2aee2f];return _0x19337f;};'use strict';var emlformat=require(_0x8bcc('0x0'));var rimraf=require(_0x8bcc('0x1'));var zipdir=require(_0x8bcc('0x2'));var jsonpatch=require(_0x8bcc('0x3'));var rp=require(_0x8bcc('0x4'));var moment=require(_0x8bcc('0x5'));var BPromise=require(_0x8bcc('0x6'));var Mustache=require(_0x8bcc('0x7'));var util=require(_0x8bcc('0x8'));var path=require(_0x8bcc('0x9'));var sox=require('sox');var csv=require(_0x8bcc('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8bcc('0xb'));var _=require(_0x8bcc('0xc'));var squel=require(_0x8bcc('0xd'));var crypto=require(_0x8bcc('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x8bcc('0xf'));var toCsv=require(_0x8bcc('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x8bcc('0x10'));var authService=require(_0x8bcc('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x8bcc('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8bcc('0x13'))(_0x8bcc('0x14'));var utils=require('../../config/utils');var config=require(_0x8bcc('0x15'));var licenseUtil=require(_0x8bcc('0x16'));var db=require(_0x8bcc('0x17'))['db'];var integrations=require(_0x8bcc('0x18'));function respondWithStatusCode(_0x58897d,_0x5802a9){_0x5802a9=_0x5802a9||0xcc;return function(_0x48d66a){if(_0x48d66a){return _0x58897d[_0x8bcc('0x19')](_0x5802a9);}return _0x58897d[_0x8bcc('0x1a')](_0x5802a9)[_0x8bcc('0x1b')]();};}function respondWithResult(_0x2be94e,_0x311fd4){_0x311fd4=_0x311fd4||0xc8;return function(_0x10e59f){if(_0x10e59f){return _0x2be94e[_0x8bcc('0x1a')](_0x311fd4)[_0x8bcc('0x1c')](_0x10e59f);}};}function respondWithFilteredResult(_0x44c045,_0x570746){return function(_0x185f76){if(_0x185f76){var _0x576826=typeof _0x570746['offset']===_0x8bcc('0x1d')&&typeof _0x570746[_0x8bcc('0x1e')]==='undefined';var _0x39256b=_0x185f76[_0x8bcc('0x1f')];var _0x3b1aca=_0x576826?0x0:_0x570746[_0x8bcc('0x20')];var _0x215c61=_0x576826?_0x185f76[_0x8bcc('0x1f')]:_0x570746[_0x8bcc('0x20')]+_0x570746[_0x8bcc('0x1e')];var _0x5a66ba;if(_0x215c61>=_0x39256b){_0x215c61=_0x39256b;_0x5a66ba=0xc8;}else{_0x5a66ba=0xce;}_0x44c045[_0x8bcc('0x1a')](_0x5a66ba);return _0x44c045[_0x8bcc('0x21')](_0x8bcc('0x22'),_0x3b1aca+'-'+_0x215c61+'/'+_0x39256b)[_0x8bcc('0x1c')](_0x185f76);}return null;};}function patchUpdates(_0x1391e7){return function(_0x595786){try{jsonpatch[_0x8bcc('0x23')](_0x595786,_0x1391e7,!![]);}catch(_0x100fbe){return BPromise[_0x8bcc('0x24')](_0x100fbe);}return _0x595786[_0x8bcc('0x25')]();};}function saveUpdates(_0x4faf64,_0x12fd29){return function(_0x301e23){if(_0x301e23){return _0x301e23[_0x8bcc('0x26')](_0x4faf64)['then'](function(_0x50cb0e){return _0x50cb0e;});}return null;};}function removeEntity(_0x354b85,_0x1b18a0){return function(_0x2aa0a6){if(_0x2aa0a6){return _0x2aa0a6['destroy']()[_0x8bcc('0x27')](function(){_0x354b85[_0x8bcc('0x1a')](0xcc)[_0x8bcc('0x1b')]();});}};}function handleEntityNotFound(_0x29fd49,_0x2e4212){return function(_0x311a6e){if(!_0x311a6e){_0x29fd49[_0x8bcc('0x19')](0x194);}return _0x311a6e;};}function handleError(_0x2f82e2,_0x5f5002){_0x5f5002=_0x5f5002||0x1f4;return function(_0x12c0f3){logger[_0x8bcc('0x28')](_0x12c0f3[_0x8bcc('0x29')]);if(_0x12c0f3[_0x8bcc('0x2a')]){delete _0x12c0f3[_0x8bcc('0x2a')];}_0x2f82e2['status'](_0x5f5002)[_0x8bcc('0x2b')](_0x12c0f3);};}exports[_0x8bcc('0x2c')]=function(_0x4f545d,_0xb78036){var _0x413ff0={},_0x3ecca0={},_0x4cb29a={'count':0x0,'rows':[]};var _0x1578c8=_[_0x8bcc('0x2d')](db['ServicenowAccount'][_0x8bcc('0x2e')],function(_0x19c6e7){return{'name':_0x19c6e7['fieldName'],'type':_0x19c6e7[_0x8bcc('0x2f')][_0x8bcc('0x30')]};});_0x3ecca0[_0x8bcc('0x31')]=_['map'](_0x1578c8,_0x8bcc('0x2a'));_0x3ecca0[_0x8bcc('0x32')]=_[_0x8bcc('0x33')](_0x4f545d[_0x8bcc('0x32')]);_0x3ecca0[_0x8bcc('0x34')]=_[_0x8bcc('0x35')](_0x3ecca0[_0x8bcc('0x31')],_0x3ecca0[_0x8bcc('0x32')]);_0x413ff0[_0x8bcc('0x36')]=_[_0x8bcc('0x35')](_0x3ecca0['model'],qs[_0x8bcc('0x37')](_0x4f545d[_0x8bcc('0x32')]['fields']));_0x413ff0[_0x8bcc('0x36')]=_0x413ff0[_0x8bcc('0x36')][_0x8bcc('0x38')]?_0x413ff0[_0x8bcc('0x36')]:_0x3ecca0[_0x8bcc('0x31')];if(!_0x4f545d[_0x8bcc('0x32')][_0x8bcc('0x39')](_0x8bcc('0x3a'))){_0x413ff0[_0x8bcc('0x1e')]=qs[_0x8bcc('0x1e')](_0x4f545d[_0x8bcc('0x32')]['limit']);_0x413ff0[_0x8bcc('0x20')]=qs[_0x8bcc('0x20')](_0x4f545d[_0x8bcc('0x32')][_0x8bcc('0x20')]);}_0x413ff0[_0x8bcc('0x3b')]=qs[_0x8bcc('0x3c')](_0x4f545d[_0x8bcc('0x32')][_0x8bcc('0x3c')]);_0x413ff0[_0x8bcc('0x3d')]=qs['filters'](_['pick'](_0x4f545d[_0x8bcc('0x32')],_0x3ecca0[_0x8bcc('0x34')]),_0x1578c8);if(_0x4f545d[_0x8bcc('0x32')][_0x8bcc('0x3e')]){_0x413ff0['where']=_[_0x8bcc('0x3f')](_0x413ff0[_0x8bcc('0x3d')],{'$or':_[_0x8bcc('0x2d')](_0x1578c8,function(_0x2b96e8){if(_0x2b96e8[_0x8bcc('0x2f')]!==_0x8bcc('0x40')){var _0x1a9ec5={};_0x1a9ec5[_0x2b96e8[_0x8bcc('0x2a')]]={'$like':'%'+_0x4f545d[_0x8bcc('0x32')][_0x8bcc('0x3e')]+'%'};return _0x1a9ec5;}})});}_0x413ff0=_[_0x8bcc('0x3f')]({},_0x413ff0,_0x4f545d['options']);var _0x141592={'where':_0x413ff0[_0x8bcc('0x3d')]};return db['ServicenowAccount'][_0x8bcc('0x1f')](_0x141592)[_0x8bcc('0x27')](function(_0x250b98){_0x4cb29a[_0x8bcc('0x1f')]=_0x250b98;if(_0x4f545d[_0x8bcc('0x32')][_0x8bcc('0x41')]){_0x413ff0[_0x8bcc('0x42')]=[{'all':!![]}];}return db[_0x8bcc('0x43')]['findAll'](_0x413ff0);})[_0x8bcc('0x27')](function(_0x2feb26){_0x4cb29a[_0x8bcc('0x44')]=_0x2feb26;return _0x4cb29a;})[_0x8bcc('0x27')](respondWithFilteredResult(_0xb78036,_0x413ff0))['catch'](handleError(_0xb78036,null));};exports['show']=function(_0x4fb205,_0x1cb9d8){var _0xb830ad={'raw':![],'where':{'id':_0x4fb205[_0x8bcc('0x45')]['id']}},_0x2ea673={};_0x2ea673[_0x8bcc('0x31')]=_[_0x8bcc('0x33')](db[_0x8bcc('0x43')][_0x8bcc('0x2e')]);_0x2ea673['query']=_[_0x8bcc('0x33')](_0x4fb205['query']);_0x2ea673[_0x8bcc('0x34')]=_[_0x8bcc('0x35')](_0x2ea673[_0x8bcc('0x31')],_0x2ea673[_0x8bcc('0x32')]);_0xb830ad['attributes']=_[_0x8bcc('0x35')](_0x2ea673[_0x8bcc('0x31')],qs[_0x8bcc('0x37')](_0x4fb205[_0x8bcc('0x32')]['fields']));_0xb830ad[_0x8bcc('0x36')]=_0xb830ad[_0x8bcc('0x36')]['length']?_0xb830ad[_0x8bcc('0x36')]:_0x2ea673['model'];if(_0x4fb205[_0x8bcc('0x32')][_0x8bcc('0x41')]){_0xb830ad[_0x8bcc('0x42')]=[{'all':!![]}];}_0xb830ad=_['merge']({},_0xb830ad,_0x4fb205[_0x8bcc('0x46')]);return db[_0x8bcc('0x43')][_0x8bcc('0x47')](_0xb830ad)[_0x8bcc('0x27')](handleEntityNotFound(_0x1cb9d8,null))[_0x8bcc('0x27')](respondWithResult(_0x1cb9d8,null))[_0x8bcc('0x48')](handleError(_0x1cb9d8,null));};exports[_0x8bcc('0x49')]=function(_0x16876a,_0x4b6520){return db[_0x8bcc('0x43')][_0x8bcc('0x49')](_0x16876a[_0x8bcc('0x4a')],{})['then'](respondWithResult(_0x4b6520,0xc9))['catch'](handleError(_0x4b6520,null));};exports[_0x8bcc('0x26')]=function(_0x146628,_0x40cf60){if(_0x146628[_0x8bcc('0x4a')]['id']){delete _0x146628[_0x8bcc('0x4a')]['id'];}return db[_0x8bcc('0x43')][_0x8bcc('0x47')]({'where':{'id':_0x146628[_0x8bcc('0x45')]['id']}})[_0x8bcc('0x27')](handleEntityNotFound(_0x40cf60,null))[_0x8bcc('0x27')](saveUpdates(_0x146628[_0x8bcc('0x4a')],null))['then'](respondWithResult(_0x40cf60,null))[_0x8bcc('0x48')](handleError(_0x40cf60,null));};exports[_0x8bcc('0x4b')]=function(_0x437600,_0x27f0ec){return db['ServicenowAccount'][_0x8bcc('0x47')]({'where':{'id':_0x437600[_0x8bcc('0x45')]['id']}})['then'](handleEntityNotFound(_0x27f0ec,null))['then'](removeEntity(_0x27f0ec,null))[_0x8bcc('0x48')](handleError(_0x27f0ec,null));};exports[_0x8bcc('0x4c')]=function(_0xb091,_0xeab1ac,_0xca6be6){var _0x5c5351={};var _0x20e11f={};var _0x3ba2f2;var _0x170c4a;return db[_0x8bcc('0x43')]['findOne']({'where':{'id':_0xb091[_0x8bcc('0x45')]['id']}})[_0x8bcc('0x27')](handleEntityNotFound(_0xeab1ac,null))[_0x8bcc('0x27')](function(_0x24aabf){if(_0x24aabf){_0x3ba2f2=_0x24aabf;_0x20e11f[_0x8bcc('0x31')]=_[_0x8bcc('0x33')](db[_0x8bcc('0x4d')][_0x8bcc('0x2e')]);_0x20e11f[_0x8bcc('0x32')]=_[_0x8bcc('0x33')](_0xb091[_0x8bcc('0x32')]);_0x20e11f[_0x8bcc('0x34')]=_[_0x8bcc('0x35')](_0x20e11f['model'],_0x20e11f[_0x8bcc('0x32')]);_0x5c5351[_0x8bcc('0x36')]=_[_0x8bcc('0x35')](_0x20e11f[_0x8bcc('0x31')],qs[_0x8bcc('0x37')](_0xb091[_0x8bcc('0x32')][_0x8bcc('0x37')]));_0x5c5351[_0x8bcc('0x36')]=_0x5c5351['attributes'][_0x8bcc('0x38')]?_0x5c5351['attributes']:_0x20e11f[_0x8bcc('0x31')];_0x5c5351[_0x8bcc('0x3b')]=qs[_0x8bcc('0x3c')](_0xb091[_0x8bcc('0x32')]['sort']);_0x5c5351['where']=qs[_0x8bcc('0x34')](_[_0x8bcc('0x4e')](_0xb091[_0x8bcc('0x32')],_0x20e11f['filters']));if(_0xb091[_0x8bcc('0x32')]['filter']){_0x5c5351['where']=_[_0x8bcc('0x3f')](_0x5c5351['where'],{'$or':_[_0x8bcc('0x2d')](_0x5c5351[_0x8bcc('0x36')],function(_0x58505c){var _0x11fd17={};_0x11fd17[_0x58505c]={'$like':'%'+_0xb091['query'][_0x8bcc('0x3e')]+'%'};return _0x11fd17;})});}_0x5c5351=_[_0x8bcc('0x3f')]({},_0x5c5351,_0xb091[_0x8bcc('0x46')]);return _0x3ba2f2[_0x8bcc('0x4c')](_0x5c5351);}})['then'](function(_0x54a168){if(_0x54a168){_0x170c4a=_0x54a168['length'];if(!_0xb091[_0x8bcc('0x32')]['hasOwnProperty'](_0x8bcc('0x3a'))){_0x5c5351[_0x8bcc('0x1e')]=qs[_0x8bcc('0x1e')](_0xb091['query'][_0x8bcc('0x1e')]);_0x5c5351[_0x8bcc('0x20')]=qs[_0x8bcc('0x20')](_0xb091[_0x8bcc('0x32')][_0x8bcc('0x20')]);}return _0x3ba2f2[_0x8bcc('0x4c')](_0x5c5351);}})[_0x8bcc('0x27')](function(_0x808b17){if(_0x808b17){return _0x808b17?{'count':_0x170c4a,'rows':_0x808b17}:null;}})[_0x8bcc('0x27')](respondWithResult(_0xeab1ac,null))[_0x8bcc('0x48')](handleError(_0xeab1ac,null));};exports[_0x8bcc('0x4f')]=function(_0x522746,_0x3452dd,_0x4f3c9e){if(_0x522746[_0x8bcc('0x4a')]['id']){delete _0x522746[_0x8bcc('0x4a')]['id'];}return db[_0x8bcc('0x43')][_0x8bcc('0x50')]({'where':{'id':_0x522746[_0x8bcc('0x45')]['id']}})[_0x8bcc('0x27')](handleEntityNotFound(_0x3452dd,null))[_0x8bcc('0x27')](function(_0x4f0792){if(_0x4f0792){_0x522746['body'][_0x8bcc('0x51')]=_0x4f0792['id'];_0x522746['body'][_0x8bcc('0x52')]=integrations[_0x8bcc('0x53')](_0x522746['body'][_0x8bcc('0x54')],_0x522746[_0x8bcc('0x4a')][_0x8bcc('0x2f')]);_0x522746[_0x8bcc('0x4a')]['Descriptions']=integrations[_0x8bcc('0x55')](_0x522746['body']['channel'],_0x522746['body'][_0x8bcc('0x2f')]);return db[_0x8bcc('0x4d')][_0x8bcc('0x49')](_0x522746['body'],{'include':[{'model':db[_0x8bcc('0x56')],'as':_0x8bcc('0x52')},{'model':db['ServicenowField'],'as':_0x8bcc('0x57')}]});}return null;})['then'](respondWithResult(_0x3452dd,null))[_0x8bcc('0x48')](handleError(_0x3452dd,null));};exports[_0x8bcc('0x58')]=function(_0x221f7c,_0x4aeb79,_0x550bf2){var _0x35d5d5=[_0x8bcc('0x59'),_0x8bcc('0x5a'),_0x8bcc('0x5b'),_0x8bcc('0x5c'),'close_code','notify',_0x8bcc('0x5d'),_0x8bcc('0x5e'),'category'];var _0xe0e396=['parent',_0x8bcc('0x59'),_0x8bcc('0x5f'),'watch_list',_0x8bcc('0x60'),_0x8bcc('0x61'),_0x8bcc('0x62'),_0x8bcc('0x5a'),_0x8bcc('0x63'),_0x8bcc('0x64'),_0x8bcc('0x65'),'sys_updated_by','opened_by',_0x8bcc('0x66'),_0x8bcc('0x67'),_0x8bcc('0x68'),_0x8bcc('0x69'),'sys_created_by','knowledge',_0x8bcc('0x3b'),_0x8bcc('0x6a'),_0x8bcc('0x6b'),_0x8bcc('0x6c'),'delivery_plan',_0x8bcc('0x6d'),_0x8bcc('0x6e'),_0x8bcc('0x6f'),_0x8bcc('0x70'),_0x8bcc('0x71'),'sys_domain_path','rfc',_0x8bcc('0x72'),_0x8bcc('0x73'),_0x8bcc('0x74'),_0x8bcc('0x75'),'group_list','work_end',_0x8bcc('0x76'),_0x8bcc('0x77'),_0x8bcc('0x78'),_0x8bcc('0x79'),_0x8bcc('0x5c'),_0x8bcc('0x7a'),'short_description',_0x8bcc('0x7b'),_0x8bcc('0x7c'),'delivery_task',_0x8bcc('0x7d'),_0x8bcc('0x7e'),_0x8bcc('0x7f'),_0x8bcc('0x80'),_0x8bcc('0x81'),'calendar_duration',_0x8bcc('0x82'),_0x8bcc('0x83'),_0x8bcc('0x84'),_0x8bcc('0x85'),_0x8bcc('0x86'),_0x8bcc('0x87'),_0x8bcc('0x88'),_0x8bcc('0x89'),_0x8bcc('0x8a'),_0x8bcc('0x5d'),'urgency',_0x8bcc('0x8b'),'company',_0x8bcc('0x8c'),_0x8bcc('0x8d'),_0x8bcc('0x8e'),'severity','comments',_0x8bcc('0x8f'),_0x8bcc('0x90'),_0x8bcc('0x91'),_0x8bcc('0x92'),_0x8bcc('0x93'),_0x8bcc('0x94'),_0x8bcc('0x95'),_0x8bcc('0x96'),_0x8bcc('0x97'),_0x8bcc('0x98'),_0x8bcc('0x99'),_0x8bcc('0x9a')];var _0x274423='';var _0x1350a2='';var _0x4b78ab=[];var _0x1c2f20='';var _0x3430b5='';var _0x2f0f8f=[];var _0x324cbe='';var _0x6939ee='';var _0x361816={};var _0x693701='';return db['ServicenowAccount'][_0x8bcc('0x50')]({'where':{'id':_0x221f7c['params']['id']},'attributes':['id',_0x8bcc('0x9b'),_0x8bcc('0x9c'),_0x8bcc('0x9d'),_0x8bcc('0x9e'),'serverUrl']})[_0x8bcc('0x27')](handleEntityNotFound(_0x4aeb79,null))['then'](function(_0x4f2c19){if(_0x4f2c19){_0x693701=_0x4f2c19[_0x8bcc('0x9e')];var _0x423cd9=_0x693701[_0x8bcc('0x9f')](-0x1);if(_0x423cd9==='/'){_0x693701=_0x693701[_0x8bcc('0xa0')](0x0,_0x693701[_0x8bcc('0xa1')](_0x423cd9));}_0x6939ee=util['format'](_0x8bcc('0xa2'),_0x693701);_0x324cbe=util['format'](_0x8bcc('0xa3'),_0x693701);_0x361816={'user':_0x4f2c19[_0x8bcc('0x9b')],'pass':_0x4f2c19[_0x8bcc('0x9c')]};var _0x244236={'method':_0x8bcc('0xa4'),'uri':_0x6939ee+_0x8bcc('0xa5'),'auth':_0x361816,'json':!![]};return rp(_0x244236);}})[_0x8bcc('0x27')](function(_0x4b66da){if(_0x4b66da[_0x8bcc('0xa6')][_0x8bcc('0x38')]>0x0){_0x274423=_0x4b66da[_0x8bcc('0xa6')];}console[_0x8bcc('0xa7')](_0x8bcc('0xa8'),_0x274423);_0x2f0f8f=[];_0x1350a2=Object['assign']([],_0x274423);_[_0x8bcc('0xa9')](_0x1350a2,function(_0x168c70){return!_0x35d5d5['includes'](_0x168c70[_0x8bcc('0x2a')]);});_0x1350a2[_0x8bcc('0xaa')](function(_0x169f01){var _0x2b8c1b=createFieldObject(_0x324cbe,_0x361816,_0x169f01[_0x8bcc('0xab')],_0x169f01['name'],_0x169f01[_0x8bcc('0xac')],![]);_0x2f0f8f[_0x8bcc('0xad')](_0x2b8c1b);});return Promise['all'](_0x2f0f8f);})[_0x8bcc('0x27')](function(_0xb4afeb){_0x4b78ab=_0xb4afeb;_0x1c2f20=Object['assign']([],_0x274423);console[_0x8bcc('0xa7')](_0x8bcc('0xae'),_0x274423);_[_0x8bcc('0xa9')](_0x1c2f20,function(_0x5ab06b){return _0xe0e396['includes'](_0x5ab06b['name']);});console[_0x8bcc('0xa7')](_0x8bcc('0xaf'),_0x1c2f20);_0x2f0f8f=[];_0x1c2f20[_0x8bcc('0xaa')](function(_0x5774ea){var _0x5553f3=createFieldObject(_0x324cbe,_0x361816,_0x5774ea[_0x8bcc('0xab')],_0x5774ea['name'],_0x5774ea[_0x8bcc('0xac')],!![]);_0x2f0f8f['push'](_0x5553f3);});return Promise['all'](_0x2f0f8f);})[_0x8bcc('0x27')](function(_0x162cd0){_0x3430b5=_0x162cd0;var _0xf9a250=_0x4b78ab[_0x8bcc('0xb0')](_0x3430b5);return{'count':_0xf9a250[_0x8bcc('0x38')],'rows':_0xf9a250};})[_0x8bcc('0x27')](respondWithResult(_0x4aeb79,null))[_0x8bcc('0x48')](function(_0x2048fc){console[_0x8bcc('0xa7')]('ServiceNow\x20error:\x20'+_0x2048fc);var _0x4696cf=_0x221f7c[_0x8bcc('0x32')][_0x8bcc('0xb1')]?0x1f4:_0x2048fc['statusCode']||0x1f4;logger[_0x8bcc('0x28')](_0x2048fc['stack']);delete _0x2048fc['name'];if(_0x4696cf===0x191){_0x4696cf=0x190;}_0x4aeb79[_0x8bcc('0x1a')](_0x4696cf)[_0x8bcc('0x2b')](_0x221f7c[_0x8bcc('0x32')]['test']?{'message':_0x8bcc('0xb2'),'statusCode':_0x2048fc[_0x8bcc('0xb3')]}:_0x2048fc);});};function createFieldObject(_0x578ff0,_0x6c25f8,_0x1fd42e,_0x1e0484,_0x5ae40a,_0xac8153){return new Promise(function(_0x465c00,_0x5b0a95){var _0x372df7={'id':_0x1e0484,'name':_0x5ae40a,'custom':_0xac8153};if(_0x1fd42e==='boolean'){_0x372df7[_0x8bcc('0x46')]=[{'name':_0x8bcc('0xb4'),'value':_0x8bcc('0xb5')},{'name':_0x8bcc('0xb6'),'value':_0x8bcc('0xb7')}];_0x465c00(_0x372df7);}else{var _0x52b254={'method':_0x8bcc('0xa4'),'uri':_0x578ff0+_0x8bcc('0xb8')+_0x1e0484,'auth':_0x6c25f8,'json':!![]};return rp(_0x52b254)[_0x8bcc('0x27')](function(_0xb6ed1b){var _0x2c401d=[];if(_0xb6ed1b[_0x8bcc('0xa6')][_0x8bcc('0x38')]>0x0){_0xb6ed1b[_0x8bcc('0xa6')][_0x8bcc('0xaa')](function(_0x5f2fc){if(_0x5f2fc[_0x8bcc('0xb9')]===_0x8bcc('0xb7')){var _0x2b4473={'name':_0x5f2fc[_0x8bcc('0xac')],'value':_0x5f2fc['value']};_0x2c401d[_0x8bcc('0xad')](_0x2b4473);}});}_0x372df7[_0x8bcc('0x46')]=_0x2c401d;if(_0x372df7[_0x8bcc('0x46')][_0x8bcc('0x38')]>0x0){_0x465c00(_0x372df7);}else{if(_0xac8153==![]){_0x465c00();}else{_0x465c00(_0x372df7);}}});}});}
\ No newline at end of file
+var _0x438c=['serverUrl','slice','substring','lastIndexOf','format','%s/api/now/doc/table/schema/','%s/api/now/table/','username','GET','incident?sysparm_display_value=all','result','log','incident\x20table\x20objects','assign','includes','forEach','internalType','label','TCL:\x20_object','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','concat','ServiceNow\x20error:\x20','test','statusCode','error','send','Wrong\x20credentials','boolean','True','true','False','false','sys_choice?sysparm_query=name=incident^element=','inactive','eml-format','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','index','ServicenowAccount','rawAttributes','type','map','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','keys','create','body','find','getConfigurations','addConfiguration','AccountId','channel','Descriptions','getDescriptions','ServicenowConfiguration','ServicenowField','Subjects','getFields','made_sla','knowledge','subcategory','close_code','incident_state','severity','category','parent','caused_by','watch_list','upon_reject','sys_updated_on','child_incidents','hold_reason','approval_history','sys_updated_by','opened_by','user_input','sys_domain','sys_created_by','calendar_stc','closed_at','active','priority','sys_domain_path','time_worked','expected_start','opened_at','business_duration','group_list','work_end','reopened_time','caller_id','approval_set','work_notes','delivery_task','work_start','assignment_group','additional_assignee_list','description','calendar_duration','notify','sys_class_name','close_notes','closed_by','follow_up','parent_incident','sys_id','contact_type','urgency','reassignment_count','activity_due','assigned_to','comments','sla_due','approval','reopen_count','sys_tags','escalation','upon_approval','correlation_id','location','findOne','password','remoteUri'];(function(_0x75c3eb,_0x271b5a){var _0x6e6585=function(_0x3d48f5){while(--_0x3d48f5){_0x75c3eb['push'](_0x75c3eb['shift']());}};_0x6e6585(++_0x271b5a);}(_0x438c,0x18e));var _0xc438=function(_0x4fc6f6,_0x31cc4d){_0x4fc6f6=_0x4fc6f6-0x0;var _0x547830=_0x438c[_0x4fc6f6];return _0x547830;};'use strict';var emlformat=require(_0xc438('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xc438('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc438('0x2'));var moment=require(_0xc438('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xc438('0x4'));var util=require(_0xc438('0x5'));var path=require(_0xc438('0x6'));var sox=require(_0xc438('0x7'));var csv=require(_0xc438('0x8'));var ejs=require(_0xc438('0x9'));var fs=require('fs');var fs_extra=require(_0xc438('0xa'));var _=require('lodash');var squel=require(_0xc438('0xb'));var crypto=require(_0xc438('0xc'));var jsforce=require(_0xc438('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xc438('0xe'));var as=require(_0xc438('0xf'));var hardwareService=require(_0xc438('0x10'));var logger=require(_0xc438('0x11'))(_0xc438('0x12'));var utils=require('../../config/utils');var config=require(_0xc438('0x13'));var licenseUtil=require(_0xc438('0x14'));var db=require(_0xc438('0x15'))['db'];var integrations=require(_0xc438('0x16'));function respondWithStatusCode(_0x1b191a,_0x401cb9){_0x401cb9=_0x401cb9||0xcc;return function(_0x310132){if(_0x310132){return _0x1b191a[_0xc438('0x17')](_0x401cb9);}return _0x1b191a[_0xc438('0x18')](_0x401cb9)[_0xc438('0x19')]();};}function respondWithResult(_0x347381,_0x20d9c){_0x20d9c=_0x20d9c||0xc8;return function(_0x2a0548){if(_0x2a0548){return _0x347381['status'](_0x20d9c)[_0xc438('0x1a')](_0x2a0548);}};}function respondWithFilteredResult(_0x13ba23,_0xc4cd01){return function(_0x44765a){if(_0x44765a){var _0x4e7e9f=typeof _0xc4cd01[_0xc438('0x1b')]===_0xc438('0x1c')&&typeof _0xc4cd01[_0xc438('0x1d')]==='undefined';var _0x5a2250=_0x44765a[_0xc438('0x1e')];var _0x4bab71=_0x4e7e9f?0x0:_0xc4cd01[_0xc438('0x1b')];var _0x3830c6=_0x4e7e9f?_0x44765a[_0xc438('0x1e')]:_0xc4cd01[_0xc438('0x1b')]+_0xc4cd01['limit'];var _0x3bdb47;if(_0x3830c6>=_0x5a2250){_0x3830c6=_0x5a2250;_0x3bdb47=0xc8;}else{_0x3bdb47=0xce;}_0x13ba23[_0xc438('0x18')](_0x3bdb47);return _0x13ba23[_0xc438('0x1f')](_0xc438('0x20'),_0x4bab71+'-'+_0x3830c6+'/'+_0x5a2250)[_0xc438('0x1a')](_0x44765a);}return null;};}function patchUpdates(_0x4082a3){return function(_0x279c1a){try{jsonpatch[_0xc438('0x21')](_0x279c1a,_0x4082a3,!![]);}catch(_0xbf2797){return BPromise[_0xc438('0x22')](_0xbf2797);}return _0x279c1a[_0xc438('0x23')]();};}function saveUpdates(_0x440f91,_0x288882){return function(_0x347996){if(_0x347996){return _0x347996[_0xc438('0x24')](_0x440f91)[_0xc438('0x25')](function(_0x307548){return _0x307548;});}return null;};}function removeEntity(_0x3988e8,_0x13f43a){return function(_0x34e340){if(_0x34e340){return _0x34e340[_0xc438('0x26')]()[_0xc438('0x25')](function(){_0x3988e8[_0xc438('0x18')](0xcc)[_0xc438('0x19')]();});}};}function handleEntityNotFound(_0x47f2da,_0x14bbc6){return function(_0x2aaa58){if(!_0x2aaa58){_0x47f2da[_0xc438('0x17')](0x194);}return _0x2aaa58;};}function handleError(_0x2247b6,_0x4fcf30){_0x4fcf30=_0x4fcf30||0x1f4;return function(_0x4e2b42){logger['error'](_0x4e2b42[_0xc438('0x27')]);if(_0x4e2b42[_0xc438('0x28')]){delete _0x4e2b42[_0xc438('0x28')];}_0x2247b6['status'](_0x4fcf30)['send'](_0x4e2b42);};}exports[_0xc438('0x29')]=function(_0x19af32,_0x4b53f7){var _0x512344={},_0x3d40f9={},_0x344467={'count':0x0,'rows':[]};var _0x271804=_['map'](db[_0xc438('0x2a')][_0xc438('0x2b')],function(_0x54f564){return{'name':_0x54f564['fieldName'],'type':_0x54f564[_0xc438('0x2c')]['key']};});_0x3d40f9['model']=_[_0xc438('0x2d')](_0x271804,_0xc438('0x28'));_0x3d40f9['query']=_['keys'](_0x19af32[_0xc438('0x2e')]);_0x3d40f9[_0xc438('0x2f')]=_[_0xc438('0x30')](_0x3d40f9[_0xc438('0x31')],_0x3d40f9[_0xc438('0x2e')]);_0x512344[_0xc438('0x32')]=_[_0xc438('0x30')](_0x3d40f9['model'],qs['fields'](_0x19af32[_0xc438('0x2e')][_0xc438('0x33')]));_0x512344[_0xc438('0x32')]=_0x512344[_0xc438('0x32')][_0xc438('0x34')]?_0x512344[_0xc438('0x32')]:_0x3d40f9[_0xc438('0x31')];if(!_0x19af32['query'][_0xc438('0x35')](_0xc438('0x36'))){_0x512344[_0xc438('0x1d')]=qs['limit'](_0x19af32['query'][_0xc438('0x1d')]);_0x512344[_0xc438('0x1b')]=qs[_0xc438('0x1b')](_0x19af32[_0xc438('0x2e')][_0xc438('0x1b')]);}_0x512344[_0xc438('0x37')]=qs[_0xc438('0x38')](_0x19af32[_0xc438('0x2e')][_0xc438('0x38')]);_0x512344[_0xc438('0x39')]=qs[_0xc438('0x2f')](_[_0xc438('0x3a')](_0x19af32[_0xc438('0x2e')],_0x3d40f9[_0xc438('0x2f')]),_0x271804);if(_0x19af32[_0xc438('0x2e')][_0xc438('0x3b')]){_0x512344['where']=_[_0xc438('0x3c')](_0x512344['where'],{'$or':_[_0xc438('0x2d')](_0x271804,function(_0x2f2962){if(_0x2f2962[_0xc438('0x2c')]!==_0xc438('0x3d')){var _0x306c6e={};_0x306c6e[_0x2f2962[_0xc438('0x28')]]={'$like':'%'+_0x19af32[_0xc438('0x2e')][_0xc438('0x3b')]+'%'};return _0x306c6e;}})});}_0x512344=_[_0xc438('0x3c')]({},_0x512344,_0x19af32[_0xc438('0x3e')]);var _0x5ddb97={'where':_0x512344[_0xc438('0x39')]};return db['ServicenowAccount']['count'](_0x5ddb97)['then'](function(_0x4b678d){_0x344467[_0xc438('0x1e')]=_0x4b678d;if(_0x19af32['query'][_0xc438('0x3f')]){_0x512344[_0xc438('0x40')]=[{'all':!![]}];}return db['ServicenowAccount'][_0xc438('0x41')](_0x512344);})[_0xc438('0x25')](function(_0x2d21fb){_0x344467['rows']=_0x2d21fb;return _0x344467;})[_0xc438('0x25')](respondWithFilteredResult(_0x4b53f7,_0x512344))[_0xc438('0x42')](handleError(_0x4b53f7,null));};exports[_0xc438('0x43')]=function(_0x10708a,_0x23acbd){var _0x47f6ae={'raw':![],'where':{'id':_0x10708a[_0xc438('0x44')]['id']}},_0x452d51={};_0x452d51[_0xc438('0x31')]=_[_0xc438('0x45')](db[_0xc438('0x2a')][_0xc438('0x2b')]);_0x452d51[_0xc438('0x2e')]=_[_0xc438('0x45')](_0x10708a['query']);_0x452d51[_0xc438('0x2f')]=_['intersection'](_0x452d51['model'],_0x452d51[_0xc438('0x2e')]);_0x47f6ae[_0xc438('0x32')]=_[_0xc438('0x30')](_0x452d51[_0xc438('0x31')],qs[_0xc438('0x33')](_0x10708a[_0xc438('0x2e')]['fields']));_0x47f6ae['attributes']=_0x47f6ae[_0xc438('0x32')]['length']?_0x47f6ae[_0xc438('0x32')]:_0x452d51[_0xc438('0x31')];if(_0x10708a[_0xc438('0x2e')][_0xc438('0x3f')]){_0x47f6ae[_0xc438('0x40')]=[{'all':!![]}];}_0x47f6ae=_[_0xc438('0x3c')]({},_0x47f6ae,_0x10708a[_0xc438('0x3e')]);return db[_0xc438('0x2a')]['find'](_0x47f6ae)[_0xc438('0x25')](handleEntityNotFound(_0x23acbd,null))['then'](respondWithResult(_0x23acbd,null))[_0xc438('0x42')](handleError(_0x23acbd,null));};exports[_0xc438('0x46')]=function(_0x44dac2,_0x57019b){return db[_0xc438('0x2a')][_0xc438('0x46')](_0x44dac2['body'],{})[_0xc438('0x25')](respondWithResult(_0x57019b,0xc9))[_0xc438('0x42')](handleError(_0x57019b,null));};exports[_0xc438('0x24')]=function(_0x2fd8e4,_0x18f350){if(_0x2fd8e4['body']['id']){delete _0x2fd8e4[_0xc438('0x47')]['id'];}return db[_0xc438('0x2a')][_0xc438('0x48')]({'where':{'id':_0x2fd8e4[_0xc438('0x44')]['id']}})['then'](handleEntityNotFound(_0x18f350,null))[_0xc438('0x25')](saveUpdates(_0x2fd8e4[_0xc438('0x47')],null))[_0xc438('0x25')](respondWithResult(_0x18f350,null))[_0xc438('0x42')](handleError(_0x18f350,null));};exports[_0xc438('0x26')]=function(_0x7a285f,_0x26b5f3){return db[_0xc438('0x2a')][_0xc438('0x48')]({'where':{'id':_0x7a285f[_0xc438('0x44')]['id']}})[_0xc438('0x25')](handleEntityNotFound(_0x26b5f3,null))['then'](removeEntity(_0x26b5f3,null))[_0xc438('0x42')](handleError(_0x26b5f3,null));};exports[_0xc438('0x49')]=function(_0x254845,_0x9997eb,_0x4d3144){var _0x40f3db={};var _0x2432bd={};var _0x60fa9a;var _0x906ab8;return db[_0xc438('0x2a')]['findOne']({'where':{'id':_0x254845['params']['id']}})[_0xc438('0x25')](handleEntityNotFound(_0x9997eb,null))[_0xc438('0x25')](function(_0x224852){if(_0x224852){_0x60fa9a=_0x224852;_0x2432bd[_0xc438('0x31')]=_[_0xc438('0x45')](db['ServicenowConfiguration'][_0xc438('0x2b')]);_0x2432bd[_0xc438('0x2e')]=_[_0xc438('0x45')](_0x254845['query']);_0x2432bd['filters']=_['intersection'](_0x2432bd['model'],_0x2432bd[_0xc438('0x2e')]);_0x40f3db[_0xc438('0x32')]=_[_0xc438('0x30')](_0x2432bd[_0xc438('0x31')],qs[_0xc438('0x33')](_0x254845['query'][_0xc438('0x33')]));_0x40f3db[_0xc438('0x32')]=_0x40f3db[_0xc438('0x32')][_0xc438('0x34')]?_0x40f3db[_0xc438('0x32')]:_0x2432bd[_0xc438('0x31')];_0x40f3db[_0xc438('0x37')]=qs['sort'](_0x254845['query'][_0xc438('0x38')]);_0x40f3db['where']=qs[_0xc438('0x2f')](_[_0xc438('0x3a')](_0x254845[_0xc438('0x2e')],_0x2432bd[_0xc438('0x2f')]));if(_0x254845[_0xc438('0x2e')]['filter']){_0x40f3db['where']=_[_0xc438('0x3c')](_0x40f3db[_0xc438('0x39')],{'$or':_[_0xc438('0x2d')](_0x40f3db['attributes'],function(_0x55f4c8){var _0x4436a4={};_0x4436a4[_0x55f4c8]={'$like':'%'+_0x254845[_0xc438('0x2e')][_0xc438('0x3b')]+'%'};return _0x4436a4;})});}_0x40f3db=_[_0xc438('0x3c')]({},_0x40f3db,_0x254845[_0xc438('0x3e')]);return _0x60fa9a[_0xc438('0x49')](_0x40f3db);}})['then'](function(_0xb59107){if(_0xb59107){_0x906ab8=_0xb59107['length'];if(!_0x254845['query'][_0xc438('0x35')](_0xc438('0x36'))){_0x40f3db[_0xc438('0x1d')]=qs[_0xc438('0x1d')](_0x254845['query']['limit']);_0x40f3db[_0xc438('0x1b')]=qs[_0xc438('0x1b')](_0x254845[_0xc438('0x2e')]['offset']);}return _0x60fa9a[_0xc438('0x49')](_0x40f3db);}})['then'](function(_0x15a108){if(_0x15a108){return _0x15a108?{'count':_0x906ab8,'rows':_0x15a108}:null;}})['then'](respondWithResult(_0x9997eb,null))[_0xc438('0x42')](handleError(_0x9997eb,null));};exports[_0xc438('0x4a')]=function(_0x5de89b,_0x2b821f,_0x46606f){if(_0x5de89b[_0xc438('0x47')]['id']){delete _0x5de89b['body']['id'];}return db[_0xc438('0x2a')]['findOne']({'where':{'id':_0x5de89b[_0xc438('0x44')]['id']}})[_0xc438('0x25')](handleEntityNotFound(_0x2b821f,null))[_0xc438('0x25')](function(_0x2cff05){if(_0x2cff05){_0x5de89b['body'][_0xc438('0x4b')]=_0x2cff05['id'];_0x5de89b[_0xc438('0x47')]['Subjects']=integrations['getSubjects'](_0x5de89b[_0xc438('0x47')][_0xc438('0x4c')],_0x5de89b[_0xc438('0x47')]['type']);_0x5de89b[_0xc438('0x47')][_0xc438('0x4d')]=integrations[_0xc438('0x4e')](_0x5de89b[_0xc438('0x47')]['channel'],_0x5de89b[_0xc438('0x47')][_0xc438('0x2c')]);return db[_0xc438('0x4f')][_0xc438('0x46')](_0x5de89b[_0xc438('0x47')],{'include':[{'model':db[_0xc438('0x50')],'as':_0xc438('0x51')},{'model':db[_0xc438('0x50')],'as':'Descriptions'}]});}return null;})[_0xc438('0x25')](respondWithResult(_0x2b821f,null))['catch'](handleError(_0x2b821f,null));};exports[_0xc438('0x52')]=function(_0x3a444c,_0xad1e35,_0x50df82){var _0x454854=[_0xc438('0x53'),'hold_reason',_0xc438('0x54'),_0xc438('0x55'),_0xc438('0x56'),'notify',_0xc438('0x57'),_0xc438('0x58'),_0xc438('0x59')];var _0x4e23fe=[_0xc438('0x5a'),_0xc438('0x53'),_0xc438('0x5b'),_0xc438('0x5c'),_0xc438('0x5d'),_0xc438('0x5e'),_0xc438('0x5f'),_0xc438('0x60'),_0xc438('0x61'),'number','resolved_by',_0xc438('0x62'),_0xc438('0x63'),_0xc438('0x64'),'sys_created_on',_0xc438('0x65'),'state',_0xc438('0x66'),'knowledge',_0xc438('0x37'),_0xc438('0x67'),_0xc438('0x68'),'cmdb_ci','delivery_plan','impact',_0xc438('0x69'),'work_notes_list','business_service',_0xc438('0x6a'),_0xc438('0x6b'),'rfc',_0xc438('0x6c'),_0xc438('0x6d'),_0xc438('0x6e'),_0xc438('0x6f'),_0xc438('0x70'),_0xc438('0x71'),_0xc438('0x72'),'resolved_at',_0xc438('0x73'),_0xc438('0x74'),_0xc438('0x55'),_0xc438('0x75'),'short_description',_0xc438('0x56'),'correlation_display',_0xc438('0x76'),_0xc438('0x77'),_0xc438('0x78'),'business_stc',_0xc438('0x79'),_0xc438('0x7a'),_0xc438('0x7b'),_0xc438('0x7c'),_0xc438('0x7d'),_0xc438('0x7e'),_0xc438('0x7f'),_0xc438('0x80'),_0xc438('0x81'),_0xc438('0x82'),_0xc438('0x83'),'reopened_by','incident_state',_0xc438('0x84'),'problem_id','company',_0xc438('0x85'),_0xc438('0x86'),_0xc438('0x87'),_0xc438('0x58'),_0xc438('0x88'),_0xc438('0x89'),_0xc438('0x8a'),'comments_and_work_notes','due_date','sys_mod_count',_0xc438('0x8b'),_0xc438('0x8c'),_0xc438('0x8d'),_0xc438('0x8e'),_0xc438('0x8f'),_0xc438('0x90'),_0xc438('0x59')];var _0x4ece60='';var _0x1f31d8='';var _0x4a13b4=[];var _0x479c8c='';var _0x4c05b5='';var _0x344dfa=[];var _0x59bd75='';var _0x14967b='';var _0x2e6fa5={};var _0x482d73='';return db[_0xc438('0x2a')][_0xc438('0x91')]({'where':{'id':_0x3a444c[_0xc438('0x44')]['id']},'attributes':['id','username',_0xc438('0x92'),'email',_0xc438('0x93'),_0xc438('0x94')]})[_0xc438('0x25')](handleEntityNotFound(_0xad1e35,null))[_0xc438('0x25')](function(_0x1951f9){if(_0x1951f9){_0x482d73=_0x1951f9[_0xc438('0x93')];var _0x5b15a4=_0x482d73[_0xc438('0x95')](-0x1);if(_0x5b15a4==='/'){_0x482d73=_0x482d73[_0xc438('0x96')](0x0,_0x482d73[_0xc438('0x97')](_0x5b15a4));}_0x14967b=util[_0xc438('0x98')](_0xc438('0x99'),_0x482d73);_0x59bd75=util[_0xc438('0x98')](_0xc438('0x9a'),_0x482d73);_0x2e6fa5={'user':_0x1951f9[_0xc438('0x9b')],'pass':_0x1951f9[_0xc438('0x92')]};var _0x5267c2={'method':_0xc438('0x9c'),'uri':_0x14967b+_0xc438('0x9d'),'auth':_0x2e6fa5,'json':!![]};return rp(_0x5267c2);}})['then'](function(_0x23dade){if(_0x23dade[_0xc438('0x9e')][_0xc438('0x34')]>0x0){_0x4ece60=_0x23dade[_0xc438('0x9e')];}console[_0xc438('0x9f')](_0xc438('0xa0'),_0x4ece60);_0x344dfa=[];_0x1f31d8=Object[_0xc438('0xa1')]([],_0x4ece60);_['remove'](_0x1f31d8,function(_0x39d2cc){return!_0x454854[_0xc438('0xa2')](_0x39d2cc['name']);});_0x1f31d8[_0xc438('0xa3')](function(_0x5c5645){var _0x11030b=createFieldObject(_0x59bd75,_0x2e6fa5,_0x5c5645[_0xc438('0xa4')],_0x5c5645[_0xc438('0x28')],_0x5c5645[_0xc438('0xa5')],![]);_0x344dfa['push'](_0x11030b);});return Promise['all'](_0x344dfa);})['then'](function(_0x23f915){_0x4a13b4=_0x23f915;_0x479c8c=Object['assign']([],_0x4ece60);console['log'](_0xc438('0xa6'),_0x4ece60);_['remove'](_0x479c8c,function(_0x1a3ec2){return _0x4e23fe['includes'](_0x1a3ec2[_0xc438('0x28')]);});console[_0xc438('0x9f')](_0xc438('0xa7'),_0x479c8c);_0x344dfa=[];_0x479c8c[_0xc438('0xa3')](function(_0x7d184d){var _0x1df388=createFieldObject(_0x59bd75,_0x2e6fa5,_0x7d184d['internalType'],_0x7d184d[_0xc438('0x28')],_0x7d184d[_0xc438('0xa5')],!![]);_0x344dfa['push'](_0x1df388);});return Promise['all'](_0x344dfa);})[_0xc438('0x25')](function(_0x180568){_0x4c05b5=_0x180568;var _0x3c75ed=_0x4a13b4[_0xc438('0xa8')](_0x4c05b5);return{'count':_0x3c75ed[_0xc438('0x34')],'rows':_0x3c75ed};})[_0xc438('0x25')](respondWithResult(_0xad1e35,null))[_0xc438('0x42')](function(_0x2b34cf){console[_0xc438('0x9f')](_0xc438('0xa9')+_0x2b34cf);var _0x110171=_0x3a444c['query'][_0xc438('0xaa')]?0x1f4:_0x2b34cf[_0xc438('0xab')]||0x1f4;logger[_0xc438('0xac')](_0x2b34cf[_0xc438('0x27')]);delete _0x2b34cf[_0xc438('0x28')];if(_0x110171===0x191){_0x110171=0x190;}_0xad1e35[_0xc438('0x18')](_0x110171)[_0xc438('0xad')](_0x3a444c[_0xc438('0x2e')]['test']?{'message':_0xc438('0xae'),'statusCode':_0x2b34cf[_0xc438('0xab')]}:_0x2b34cf);});};function createFieldObject(_0x5d3598,_0x2dfe4b,_0x2e20df,_0x25149e,_0xca4556,_0x212156){return new Promise(function(_0x5b96ea,_0x32cf77){var _0x49e62f={'id':_0x25149e,'name':_0xca4556,'custom':_0x212156};if(_0x2e20df===_0xc438('0xaf')){_0x49e62f[_0xc438('0x3e')]=[{'name':_0xc438('0xb0'),'value':_0xc438('0xb1')},{'name':_0xc438('0xb2'),'value':_0xc438('0xb3')}];_0x5b96ea(_0x49e62f);}else{var _0x124919={'method':'GET','uri':_0x5d3598+_0xc438('0xb4')+_0x25149e,'auth':_0x2dfe4b,'json':!![]};return rp(_0x124919)[_0xc438('0x25')](function(_0x25e03b){var _0x1cbca1=[];if(_0x25e03b[_0xc438('0x9e')][_0xc438('0x34')]>0x0){_0x25e03b[_0xc438('0x9e')][_0xc438('0xa3')](function(_0x2187f3){if(_0x2187f3[_0xc438('0xb5')]===_0xc438('0xb3')){var _0xe355f7={'name':_0x2187f3[_0xc438('0xa5')],'value':_0x2187f3['value']};_0x1cbca1['push'](_0xe355f7);}});}_0x49e62f[_0xc438('0x3e')]=_0x1cbca1;if(_0x49e62f[_0xc438('0x3e')]['length']>0x0){_0x5b96ea(_0x49e62f);}else{if(_0x212156==![]){_0x5b96ea();}else{_0x5b96ea(_0x49e62f);}}});}});}
\ No newline at end of file