Built motion from commit 25580385.|2.6.2
[motion2.git] / server / services / agi / reply.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xa4c7=['substring','line','util','stream','Transform','call','_localBuffer','_inBody','prototype','_transform','length','split','indexOf','trim','slice','emit'];(function(_0x5d78f0,_0x3784f9){var _0x4d1012=function(_0x23d0ba){while(--_0x23d0ba){_0x5d78f0['push'](_0x5d78f0['shift']());}};_0x4d1012(++_0x3784f9);}(_0xa4c7,0x182));var _0x7a4c=function(_0x44f76b,_0x42b8bb){_0x44f76b=_0x44f76b-0x0;var _0x1c8de1=_0xa4c7[_0x44f76b];return _0x1c8de1;};'use strict';var util=require(_0x7a4c('0x0'));var Transform=require(_0x7a4c('0x1'))[_0x7a4c('0x2')];function AGIReply(_0x1c142a){Transform[_0x7a4c('0x3')](this,_0x1c142a);this[_0x7a4c('0x4')]='';this[_0x7a4c('0x5')]=![];}util['inherits'](AGIReply,Transform);AGIReply[_0x7a4c('0x6')][_0x7a4c('0x7')]=function(_0x27b3bb,_0x21029b,_0x9e9f54){var _0x42d933='\x0a',_0x2d0fdb=['\x0a\x0a','\x0d\x0a\x0d\x0a'],_0x31be5e=-0x1,_0x39e98d=-0x1,_0x2bc0ba='',_0x1ed988=0x0,_0x13d52c='',_0x125d6f='';this[_0x7a4c('0x4')]+=_0x27b3bb['toString']();_0x13d52c=this['_localBuffer'];if(!this[_0x7a4c('0x5')]){_0x1ed988=0x0;while(_0x2d0fdb[_0x1ed988]){while((_0x39e98d=_0x13d52c['indexOf'](_0x2d0fdb[_0x1ed988]))!=-0x1){_0x2bc0ba=_0x2d0fdb[_0x1ed988];_0x125d6f=_0x13d52c['substring'](0x0,_0x39e98d);_0x13d52c=_0x13d52c['substring'](_0x39e98d+_0x2bc0ba[_0x7a4c('0x8')]);var _0x24e616=_0x125d6f[_0x7a4c('0x9')](_0x42d933),_0x3f1a33=0x0,_0x3d4754={},_0x1ba35b='',_0x5a0644='',_0x27291c=-0x1;while(_0x24e616[_0x3f1a33]){_0x27291c=_0x24e616[_0x3f1a33][_0x7a4c('0xa')](':');if(_0x27291c!=-0x1){_0x1ba35b=_0x24e616[_0x3f1a33]['slice'](0x0,_0x27291c)[_0x7a4c('0xb')]();_0x5a0644=_0x24e616[_0x3f1a33][_0x7a4c('0xc')](_0x27291c+0x1)[_0x7a4c('0xb')]();if(_0x1ba35b[_0x7a4c('0x8')]>0x0){_0x3d4754[_0x1ba35b]=_0x5a0644;}}else{}_0x3f1a33++;}this[_0x7a4c('0xd')]('headers',_0x3d4754);this[_0x7a4c('0x5')]=!![];}_0x1ed988++;}this['_localBuffer']=_0x13d52c;}else{while((_0x31be5e=_0x13d52c[_0x7a4c('0xa')](_0x42d933))!=-0x1){_0x125d6f=_0x13d52c[_0x7a4c('0xe')](0x0,_0x31be5e);this[_0x7a4c('0xd')](_0x7a4c('0xf'),_0x125d6f);_0x13d52c=_0x13d52c['substring'](_0x31be5e+_0x42d933[_0x7a4c('0x8')]);}this[_0x7a4c('0x4')]=_0x13d52c;}_0x9e9f54();};module['exports']=AGIReply;