1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x4e5e=['../../config/logger','routing','client','http','Request','request','rpc','error','message','result','catch','exports','jayson/promise','bluebird'];(function(_0x5834bc,_0x3d4801){var _0x3e183a=function(_0x18b023){while(--_0x18b023){_0x5834bc['push'](_0x5834bc['shift']());}};_0x3e183a(++_0x3d4801);}(_0x4e5e,0x14e));var _0xe4e5=function(_0x13791a,_0xc4218e){_0x13791a=_0x13791a-0x0;var _0x116430=_0x4e5e[_0x13791a];return _0x116430;};'use strict';var jayson=require(_0xe4e5('0x0'));var BPromise=require(_0xe4e5('0x1'));var logger=require(_0xe4e5('0x2'))(_0xe4e5('0x3'));var client=jayson[_0xe4e5('0x4')][_0xe4e5('0x5')]({'port':0x2329});client[_0xe4e5('0x6')]=function(_0x122810,_0x53d4f8){return new BPromise(function(_0x2d4551,_0x3807d2){return client[_0xe4e5('0x7')](_0x122810,_0x53d4f8)['then'](function(_0x214fdb){logger['debug'](_0xe4e5('0x8'),_0xe4e5('0x3'),_0x122810,_0x53d4f8,_0x214fdb);if(_0x214fdb[_0xe4e5('0x9')]){logger[_0xe4e5('0x9')]('rpc',_0xe4e5('0x3'),_0x122810,_0x214fdb[_0xe4e5('0x9')][_0xe4e5('0xa')],_0x53d4f8);return _0x3807d2(_0x214fdb[_0xe4e5('0x9')]['message']);}else{return _0x2d4551(_0x214fdb[_0xe4e5('0xb')]);}})[_0xe4e5('0xc')](function(_0x275692){logger[_0xe4e5('0x9')]('rpc',_0xe4e5('0x3'),_0x122810,_0x275692,_0x53d4f8);return _0x3807d2(_0x275692);});});};module[_0xe4e5('0xd')]=client;