739f37006507adc9b57bdf0ea965f66e53e7aeff
[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 _0x99f4=['inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','_inBody','indexOf','substring','length','trim','slice','emit','exports','util','Transform','call','_localBuffer'];(function(_0x4bce4d,_0x14a1e1){var _0xd6dce4=function(_0x58d4c9){while(--_0x58d4c9){_0x4bce4d['push'](_0x4bce4d['shift']());}};_0xd6dce4(++_0x14a1e1);}(_0x99f4,0x161));var _0x499f=function(_0x4dd232,_0x2a5d02){_0x4dd232=_0x4dd232-0x0;var _0x24898b=_0x99f4[_0x4dd232];return _0x24898b;};'use strict';var util=require(_0x499f('0x0'));var Transform=require('stream')[_0x499f('0x1')];function AGIReply(_0x291359){Transform[_0x499f('0x2')](this,_0x291359);this[_0x499f('0x3')]='';this['_inBody']=![];}util[_0x499f('0x4')](AGIReply,Transform);AGIReply[_0x499f('0x5')][_0x499f('0x6')]=function(_0x34c65d,_0x2da88f,_0x25a590){var _0x1a61c0='\x0a',_0x17f0c9=['\x0a\x0a',_0x499f('0x7')],_0x5af6af=-0x1,_0x478b79=-0x1,_0x3c3315='',_0x1a2840=0x0,_0x2b5b2b='',_0x243372='';this[_0x499f('0x3')]+=_0x34c65d[_0x499f('0x8')]();_0x2b5b2b=this['_localBuffer'];if(!this[_0x499f('0x9')]){_0x1a2840=0x0;while(_0x17f0c9[_0x1a2840]){while((_0x478b79=_0x2b5b2b[_0x499f('0xa')](_0x17f0c9[_0x1a2840]))!=-0x1){_0x3c3315=_0x17f0c9[_0x1a2840];_0x243372=_0x2b5b2b[_0x499f('0xb')](0x0,_0x478b79);_0x2b5b2b=_0x2b5b2b[_0x499f('0xb')](_0x478b79+_0x3c3315[_0x499f('0xc')]);var _0x1ff561=_0x243372['split'](_0x1a61c0),_0xd511e7=0x0,_0xe9b328={},_0x57c01b='',_0x3caf6f='',_0x224ad6=-0x1;while(_0x1ff561[_0xd511e7]){_0x224ad6=_0x1ff561[_0xd511e7][_0x499f('0xa')](':');if(_0x224ad6!=-0x1){_0x57c01b=_0x1ff561[_0xd511e7]['slice'](0x0,_0x224ad6)[_0x499f('0xd')]();_0x3caf6f=_0x1ff561[_0xd511e7][_0x499f('0xe')](_0x224ad6+0x1)[_0x499f('0xd')]();if(_0x57c01b['length']>0x0){_0xe9b328[_0x57c01b]=_0x3caf6f;}}else{}_0xd511e7++;}this['emit']('headers',_0xe9b328);this[_0x499f('0x9')]=!![];}_0x1a2840++;}this[_0x499f('0x3')]=_0x2b5b2b;}else{while((_0x5af6af=_0x2b5b2b[_0x499f('0xa')](_0x1a61c0))!=-0x1){_0x243372=_0x2b5b2b[_0x499f('0xb')](0x0,_0x5af6af);this[_0x499f('0xf')]('line',_0x243372);_0x2b5b2b=_0x2b5b2b['substring'](_0x5af6af+_0x1a61c0[_0x499f('0xc')]);}this[_0x499f('0x3')]=_0x2b5b2b;}_0x25a590();};module[_0x499f('0x10')]=AGIReply;