@quotemedia.com/streamer 2.58.0 → 2.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;((t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).qmci||(t.qmci={})).Streamer=e()}}(function(){return function o(s,a,u){function l(t,e){if(!a[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[t]={exports:{}};s[t][0].call(i.exports,function(e){return l(s[t][1][e]||e)},i,i.exports,o,s,a,u)}return a[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=_("./logging.js"),p=_("./EventSupport.js"),h=(f=p)&&f.__esModule?f:{"default":f},m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("./streamer-events.js"));var E=function(){function i(e,t,n){var r=3<arguments.length&&arguments[3]!==undefined?arguments[3]:3;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.openSocket=t,this.createTransmitter=e,this.log=(0,d.asLogger)(n),this.events=new h["default"](this),this.currentConn="",this.maxReconnectAttempts=r,this.maxReconnectsTotal=3,this.isFirstConnection=!0,this.atmoCodes={1000:"Normal closure; the connection successfully completed whatever purpose for which it was created.",1001:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.",1002:"The endpoint is terminating the connection due to a protocol error.",1003:"The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).",1004:"The endpoint is terminating the connection because a data frame was received that is too large.",1005:"Unknown: no status code was provided even though one was expected.",1006:"Connection was closed abnormally (that is, with no close frame being sent)."}}return i.prototype.open=function(){var s=this,e={push:function(e){return s.socket.push(e)}};this.isFirstConnection&&(this.on("reopen",function(e){if(s.isConnectionUp){var t=s.currentConn;s.currentConn=e.connectionId,s.events.fire("reconnect",m.event("Reconnection success",{previousConnectionId:t,currentConnectionId:s.currentConn}))}else s.events.fire("error",e)}),this.transmitter=this.createTransmitter(e),this.transmitter.on("sequence",function(e){s.events.fire("sequence",e)}).on("message",function(e){s.events.fire("message",e)})),this.socket=this.openSocket(function(e){var o=(s.request=e).url;return s.reconnect=!1,{onMessage:function(e){s.transmitter.onMessage(e.responseBody)},onMessagePublished:function(e){s.transmitter.onMessage(e.responseBody)},onOpen:function(e){var t=e.status;200!==t?s.reconnect=!1:s.isConnectionUp=!0;var n=m.event("open",{url:o,code:t,transport:e.transport,connectionId:e.request.uuid});s.log.info(n),s.events.fire("open",n),s.isFirstConnection||(s.maxReconnectsTotal--,s.events.fire("reopen",n)),s.currentConn=e.request.uuid},onTransportFailure:function(e,t){var n=m.error("Transport failure",{url:o,code:-2,reason:e,fallback:t.fallbackTransport});s.log.error(e),s.events.fire("error",n),s.isReconnect()&&(s.reconnect=!0)},onError:function(e){var t=e.reason||e.reasonPhrase,n=e.status;t&&(""+t.stack).includes("Failed to execute 'send' on 'XMLHttpRequest")&&(t="Failed to send XMLHttpRequest to "+/Failed to load '(.*?)'/.exec(""+t.stack)[1],n=404);var r=m.error(e.reason,{transport:e.transport,reason:t,url:o,code:n});s.log.error(r),s.events.fire("error",r)},onClose:function(e){var t=e.status,n=e.reason||e.reasonPhrase,r=e.atmoMessage;408===t&&"unsubscribe"===e.state&&(t=200,n="Unsubscribed"),501!==t&&401!==t&&403!==t&&452!==t||(s.log.warn("Unable to reconnect with code: "+t+", reason: "+n),s.reconnect=!1),r&&r.code in s.atmoCodes&&(s.log.error("Unexpected close. Code: "+r.code+" Reason: "+s.atmoCodes[r.code]),s.events.fire("atmoError",m.error("Atmosphere error",{reason:s.atmoCodes[r.code],code:r.code})),t=410,n="Gone");var i=m.close({url:o,transport:e.transport,code:t,reason:n});s.isConnectionUp=!1,e.request.uuid=0,s.log.info(i),s.events.fire("close",i)},onSlow:function(e){var t=m.slow({timesExceeded:e.timesExceeded,maxExceeded:e.maxExceed});s.reconnect=!1,s.log.warn("Slow connection received, Reconnection will not be attempted."),s.log.info(t),s.events.fire("slow",t)}}},this.currentConn)},i.prototype.close=function(){if(this.socket)try{this.socket.close(),this.socket=null,this.reconnect&&this.tryReopen()}catch(e){this.events.fire("error",m.error("Error closing",{reason:e.message,cause:e,code:-3}))}},i.prototype.tryReopen=function(){var t=this;if(this.isConnectionUp||this.maxReconnectsTotal<=0)this.log.error("Connection is already open or max reconnects was reached, won't try to reconnect");else{this.isFirstConnection=!1;var n=this.maxReconnectAttempts;setTimeout(function e(){if(n<=0)return t.reconnect=!1,t.log.error("Error while reconnecting. No attempts left."),void(t.maxReconnectAttempts=0);!t.isConnectionUp&&t.reconnect&&(t.log.info("Attempting reconnect. Attempts left: "+n),t.reopen(n),n--,setTimeout(e,500))},500)}},i.prototype.reopen=function(e){try{this.open()}catch(t){this.log.warn("There was an error while reopening attempt #"+e),this.events.fire("error",t)}},i.prototype.send=function(e){try{this.transmitter.send(e)}catch(t){this.events.fire("error",m.error("Error sending message",{reason:t.message,cause:t,code:-4}))}},i.prototype.isReconnect=function(){return this.request.headers["x-Stream-isReconnect"]},i.prototype.setReconnect=function(e){this.reconnect=e},i.prototype.setServer=function(e){this.request.headers["X-Stream-Instance"]=e},i.prototype.isClosed=function(){return null==this.socket},i.prototype.on=function(e,t){return this.events.on(e,t)},i}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/Connection.js","/lib")},{"./EventSupport.js":2,"./logging.js":16,"./streamer-events.js":109,_process:131,buffer:121,timers:152}],2:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;var f=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={},this.source=e||this}return t.prototype.on=function(e,t){return this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t),this.source},t.prototype.fire=function(e,t){var n=this.listeners[e];if(n){var r=n,i=Array.isArray(r),o=0;for(r=i?r:r[Symbol.iterator]();;){var s;if(i){if(o>=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}s(t)}}},t}();d["default"]=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/EventSupport.js","/lib")},{_process:131,buffer:121,timers:152}],3:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=E("./LongSequence.js"),p=(f=d)&&f.__esModule?f:{"default":f},h=E("./streamer-api.js");var m=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.update=e,this.sendsequence=new p["default"],this.checkinterval=null,this.lastreceivedsequence=null}return t.prototype.next=function(){return this.sendsequence.next()},t.prototype.track=function(e){if(null!=this.checkinterval){if(e%this.checkinterval==0){var t=new h.messages.control.FlowMessage;t.sequence=e,this.update(t)}this.lastreceivedsequence=e}},t}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/FlowControl.js","/lib")},{"./LongSequence.js":4,"./streamer-api.js":108,_process:131,buffer:121,timers:152}],4:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;var f=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.val=t.MIN_VALUE}return t.prototype.next=function(){var e=this.val;return e<t.MAX_VALUE?this.val++:this.val=t.MIN_VALUE,e},t}();f.MIN_VALUE=1,f.MAX_VALUE=Number.MAX_SAFE_INTEGER,d["default"]=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/LongSequence.js","/lib")},{_process:131,buffer:121,timers:152}],5:[function(m,e,E){(function(t,n,r,i,o,s,a,u,l,c,f){"use strict";E.__esModule=!0;var d,p=m("./serialization/v1/codec.js"),h=(d=p)&&d.__esModule?d:{"default":d};E["default"]=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=h["default"].TYPE,this.sequencenumber=null,this.timestamp=null,this.id=null,this.encoding=null,this.mimetype=null,this.payload=null}}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/SMessage.js","/lib")},{"./serialization/v1/codec.js":103,_process:131,buffer:121,timers:152}],6:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0,b("./polyfills.js");var f=b("./streamer-api.js"),d=b("./streamer-utils.js"),p=b("./logging.js"),F=b("./utils.js"),h=g(b("./UShortId.js")),m=g(b("./FlowControl.js")),E=g(b("./EventSupport.js")),_=b("./formatting.js"),C=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(b("./streamer-events.js"));function g(e){return e&&e.__esModule?e:{"default":e}}var T=function(){function i(e,t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.events=new E["default"],this.streamingService=e,this.format=t,this.log=(0,p.asLogger)(n),this.flowControl=new m["default"](function(e){r.send(e)}),this.conn=e.createConnection(),this.conn.on("message",function(e){r._handlejsonmsg(e)}).on("sequence",function(e){r.flowControl.track(e)}).on("close",function(e){r.doClose(e)}).on("error",function(e){r.pendingConnection&&r.pendingConnection(e),r.events.fire("error",e)}).on("reconnect",function(e){r.reconnectSuccess(e)}).on("atmoError",function(e){r.events.fire("atmoError",e)}),this.requestid=new h["default"],this.pendingsubscriptions={},this.pendingUnsubscriptions={},this.pendingExchangeSubscriptions={},this.pendingExchangeUnsubscriptions={},this.pendingNewsSubscriptions={},this.pendingNewsUnsubscriptions={},this.pendingAlertSubscription={},this.pendingTradeSubscription={},this.pendingTradeUnsubscription={},this.pendingCorpEventSubscription={},this.on("error",function(e){r.log.warn(e)})}return i.prototype.open=function(e){try{this.pendingConnection=e,this.conn.open()}catch(t){e&&e(t)}},i.prototype.reconnectSuccess=function(e){this.events.fire("reconnectSuccess",e),this.log.info("Successful reconnection. Previous Id: "+e.previousConnectionId+" Current Id = "+e.currentConnectionId)},i.prototype.on=function(e,t){return this.events.on(e,t)},i.prototype.subscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{subscribed:[],rejected:[],unentitled:[],invalidSymbols:[],messageFilters:[]}};0!==e.length&&0!==t.length?this._prepareSubscriptionRequests(e,u,f.messages.control.Action.SUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingsubscriptions[t]=u,e.id=t,i.send(e)}):s(null,u.result)},i.prototype.subscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.SUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeSubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.subscribeNews=function(e,t,n,r){var i=n&&"function"!=typeof n?n:null,o=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}""!==t&&t!=undefined||(t=crypto.randomUUID(),console.log("News FilterId Created: ",t));var a={callback:o,mimetype:this.format,id:[],result:{newsFilters:[],rejectedNewsFilters:[],unentitledNewsFilters:[],filterId:t}};0===e.length&&o(null,a.result);var u=this.buildNewsSubscribeRequest(e,t,a,f.messages.control.NewsAction.NEWS_FLT_ADD,i),l=this.requestid.next();this.pendingNewsSubscriptions[l]=a,u.id=l,this.send(u)},i.prototype.subscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.SUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.subUnsubAlerts=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{operation:""}},s=this.buildAlertsSubUnsubRequest(e,o),a=this.requestid.next();o.id.push(a),this.pendingAlertSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.subscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.SUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.getSessionStats=function(){if(this.isClosed()){var e=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",e)}else{var t=new f.messages.control.StatsMessage;this.send(t)}},i.prototype.fltUpdateNews=function(e,t,n){var r=n||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",i),void(r&&r(i))}var o={callback:r,mimetype:this.format,id:[],result:{newsFilters:[],rejectedNewsFilters:[],unentitledNewsFilters:[],filterId:t}},s=this.buildNewsSubscribeRequest(e,t,o,f.messages.control.NewsAction.NEWS_FLT_UPDATE,null),a=this.requestid.next();this.pendingNewsSubscriptions[a]=o,s.id=a,this.send(s)},i.prototype.fltDeleteNews=function(e,t){var n=t||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var r=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",r),void(n&&n(r))}var i={callback:n,mimetype:this.format},o=this.buildNewsSubscribeRequest(null,e,i,f.messages.control.NewsAction.NEWS_FLT_DELETE,null);this.send(o)},i.prototype.fltGetNews=function(e){var t=e||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var n=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(t&&t(n))}var r={callback:t,mimetype:this.format},i=this.buildNewsCommandRequest(r,f.messages.control.NewsAction.NEWS_FLT_GET);this.send(i)},i.prototype.fltMockBasicNews=function(e){var t=e||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var n=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(t&&t(n))}var r={callback:t,mimetype:this.format},i=this.buildNewsCommandRequest(r,f.messages.control.NewsAction.NEWS_FLT_MOCK_BASIC);this.send(i)},i.prototype.unsubscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{unsubscribed:[]}};0!==e.length&&0!==t.length||s&&s(null,u.result),this._prepareSubscriptionRequests(e,u,f.messages.control.Action.UNSUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingUnsubscriptions[t]=u,e.id=t,i.send(e)})},i.prototype.unsubscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.UNSUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeUnsubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.unsubscribeNews=function(e,t,n){e=Array.isArray(e)?e:[e];var r=t&&"function"!=typeof t?t:null,i=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var o=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",o),void(i&&i(o))}var s={callback:i,mimetype:this.format,id:[],result:{unsubscribed:[]}};0===e.length&&i&&i(null,s.result);var a=this.buildNewsSubscribeRequest(e,s,f.messages.control.NewsAction.NEWS_FLT_DELETE,r),u=this.requestid.next();s.id.push(u),this.pendingNewsUnsubscriptions[u]=s,a.id=u,this.send(a)},i.prototype.unsubscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.UNSUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.unsubscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.UNSUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeUnsubscription[a]=o,s.id=a,this.send(s)}},i.prototype._handlejsonmsg=function(e){(0,d.iscontrolmessage)(e)?this.handlectrlmsg(e):(0,d.isdatamessage)(e)?this._handledatamsg(e):this.events.fire("error",e)},i.prototype._prepareSubscriptionRequests=function(e,t,n,r){for(var i=0,o=-1,s=e.length,a=t.types.includes("ORDERBOOK"),u=[],l=0;l<s;l++)((i=this._getUpdatedNumberOfEntitlements(t.types.length,i,e[l],a))>=this.maxEntitlementsPerSubscription||l===s-1)&&(u.push(this._buildRequest(e.slice(o+1,l+1),t,n,r)),o=l,i=0);return u},i.prototype._buildRequest=function(e,t,n,r){var i=new f.messages.control.SubscribeMessage;return i.action=n,i.symbols=e,i.types=t.types,i.mimetype=t.mimetype,r&&r.skipHeavyInitialLoad&&(i.skipHeavyInitialLoad=!0),r&&(i.conflation=r.conflation,i.intervalPeriod=r.intervalPeriod),i},i.prototype.prepareExchangeSubscriptionRequest=function(e,t,n,r){for(var i=[],o=e.length,s=0;s<o;s++)i.push(this.buildExchangeRequest(e[s],t,n,r));return i},i.prototype.buildExchangeRequest=function(e,t,n,r){var i=new f.messages.control.ExchangeSubscribeMessage;return i.action=n,i.exchange=e,i.mimetype=t.mimetype,r&&(i.conflation=r.conflation),i},i.prototype.buildNewsSubscribeRequest=function(e,t,n,r,i){var o=new f.messages.control.NewsSubscribeMessage;return o.newsAction=r,o.newsFilters=e,o.filterId=t,o.mimetype=n.mimetype,i&&i.skipHeavyInitialLoad&&(o.skipHeavyInitialLoad=i.skipHeavyInitialLoad),o},i.prototype.buildCorpEventRequest=function(e,t,n){var r=new f.messages.control.CorpEventSubscribeMessage;return r.symbols=e,r.action=n,r.corpEventTypes=t.corpEventTypes,r.allCorpEvents=t.allCorpEvents,r.mimeType=t.mimeType,r},i.prototype.buildAlertsSubUnsubRequest=function(e,t){var n=new f.messages.control.AlertsSubUnsubMessage;return n.operation=e,n.mimetype=t.mimetype,n},i.prototype.buildTradeSubscribeRequest=function(e,t,n){var r=new f.messages.control.TradeSubscribeMessage;return r.action=n,r.notificationType=e,r.mimetype=t.mimetype,r},i.prototype.buildNewsCommandRequest=function(e,t){var n=new f.messages.control.NewsCommandMessage;return n.newsAction=t,n.mimetype=e.mimetype,n},i.prototype._getUpdatedNumberOfEntitlements=function(e,t,n,r){var i=t;return r&&n.endsWith(":CC")?i+=14*e:i+=e,i},i.prototype.handlectrlmsg=function(e){switch(this.log.debug(_.msgfmt.fmt(e)),(0,d.messagetype)(e)){case f.messages.MessageTypeNames.ctrl.HEARTBEAT:this.onHeartbeat(e);break;case f.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE:this.onSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_RESPONSE:this.onExchangeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_ADD_RESPONSE:this.onNewsFltAddResponse(e);break;case f.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE:this.onAlertsSubUnsubResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE:this.onTradeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE:this.onUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE:this.onExchangeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_DELETE_RESPONSE:this.onNewsFltDeleteResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_GET_RESPONSE:this.onNewsFltGetResponse(e);break;case f.messages.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE:this.onCorpEventResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE:this.onTradeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE:this.onConnectResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE:this.onConnectionClose(e);break;case f.messages.MessageTypeNames.ctrl.SLOW_CONNECTION:this.onSlowConnection(e);break;case f.messages.MessageTypeNames.ctrl.STATS_RESPONSE:this.onStatsResponse(e);break;case f.messages.MessageTypeNames.ctrl.INITIAL_DATA_SENT:this.onInitialDataSent(e);break;case f.messages.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE:this.onResubscribeMessage(e);break;case f.messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE:this.onReconnectMessage(e);break;case f.messages.MessageTypeNames.ctrl.MISSED_DATA_SENT:this.onMissedDataSent(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FILTER_MESSAGE:this.onNewsFilterRemoteMessage(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_ERROR_MESSAGE:this.onNewsErrorRemoteMessage(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_ADD_MESSAGE:this.onNewsFltAddRemoteMessage(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_UPDATE_RESPONSE:this.onNewsFltUpdateMessage(e)}},i.prototype.onHeartbeat=function(e){},i.prototype.onSubscribeResponse=function(e){var t=this.pendingsubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.ids,e.__id),delete this.pendingsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;if(e.entitlements){var o=e.entitlements,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u,c=l,f=c.symbol,d=c.marketdatatype,p=c.entitlement;l={symbol:f,type:d},"NA"!==p?(this.log.debug("SUBSCRIBED <"+f+", "+d+">"),l.entitlement=p,i.subscribed.push(l)):(this.log.warn("NOT ENTITLED <"+f+","+d+">"),i.unentitled.push(l))}}if(e.rejectedSymbols){var h=e.rejectedSymbols,m=Array.isArray(h),E=0;for(h=m?h:h[Symbol.iterator]();;){var _;if(m){if(E>=h.length)break;_=h[E++]}else{if((E=h.next()).done)break;_=E.value}f=_;this.log.warn("REJECTED "+f),i.rejected.push(f)}}if(e.invalidSymbols){var g=e.invalidSymbols,T=Array.isArray(g),b=0;for(g=T?g:g[Symbol.iterator]();;){var y,S;if(T){if(b>=g.length)break;S=g[b++]}else{if((b=g.next()).done)break;S=b.value}var v=S;this.log.warn("INVALID SYMBOL "+v),(y=i.invalidSymbols).push.apply(y,e.invalidSymbols)}}if(e.messageFilters){this.log.debug("MESSAGE FILTERS "+JSON.stringify(e.messageFilters));var O=e.messageFilters,w=Array.isArray(O),I=0;for(O=w?O:O[Symbol.iterator]();;){var N;if(w){if(I>=O.length)break;N=O[I++]}else{if((I=O.next()).done)break;N=I.value}var A=N;i.messageFilters.push(A)}}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeSubscribeResponse=function(e){var t=this.pendingExchangeSubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingExchangeSubscriptions[e.__id],200!=e.code){var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onNewsFltAddResponse=function(e){var t=this.pendingNewsSubscriptions[e.__id],n=t.callback;(0,F.removeFromArray)(t.id,e.__id),delete this.pendingNewsSubscriptions[e.__id];var r=t.result;if(200!=e.code){var i=C.error("Error subscribing to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.newsFilters.push(l)}}if(e.rejectedNewsFilters){var c=e.rejectedNewsFilters,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.rejectedNewsFilters.push(h)}}if(e.unentitledNewsFilters){var m=e.unentitledNewsFilters,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.unentitledNewsFilters.push(T)}}e.filterId&&(r.filterId=e.filterId),0===t.id.length&&n&&n(null,t.result)},i.prototype.onCorpEventResponse=function(e){var t=this.pendingCorpEventSubscription[e.__id],n=t.callback;(0,F.removeFromArray)(t.id,e.__id),delete this.pendingCorpEventSubscription[e.__id];var r=t.result;if(200!=e.code){var i=C.error("Error subscribing to Corporate Events",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.subscribed){var o=e.subscribed,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.subscribed.push(l)}}if(e.unsubscribed){var c=e.unsubscribed,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.unsubscribed.push(h)}}if(e.invalid){var m=e.invalid,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.invalid.push(T)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onAlertsSubUnsubResponse=function(e){var t=this.pendingAlertSubscription[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingAlertSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.operation&&(this.log.debug("Alerts "+e.operation),i.operation=e.operation),0===t.id.length&&n&&n(null,t.result)},i.prototype.onTradeSubscribeResponse=function(e){var t=this.pendingTradeSubscription[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingTradeSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onNewsFltDeleteResponse=function(e){if(console.log("News_flt_delete Response",e),200==e.code)this.events.fire("filter delete",e);else{var t=C.error("Error Unsubscribe News Filter",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onTradeUnsubscribeResponse=function(e){var t=this.pendingTradeUnsubscription[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingTradeUnsubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onNewsFltGetResponse=function(e){if(200==e.code)this.events.fire("filter status",e);else{var t=C.error("Error Getting News Filters Status",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onUnsubscribeResponse=function(e){var t=this.pendingUnsubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.ids,e.__id),delete this.pendingUnsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&n(r))}for(var i=0;i<e.unsubscribed.length;++i){var o=t.result,s=e.unsubscribed[i],a=s.symbol,u=s.marketdatatype;this.log.debug("UNSUBSCRIBED <"+a+", "+u+">"),o.unsubscribed.push({symbol:a,type:u})}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeUnsubscribeResponse=function(e){var t=this.pendingExchangeUnsubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingExchangeUnsubscriptions[e.__id],200!=e.code){var r=C.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onReconnectMessage=function(e){450===e.code&&(this.events.fire("slow","Reconnection recieved a slow code: "+e.code),this._isSlowConnection=!0,this.conn.setReconnect=!1),this.events.fire("reconnectMessage",e)},i.prototype.onConnectResponse=function(e){if(200!==e.code){var t=C.error("Connection failed",{code:e.code,reason:e.reason});return this.events.fire("error",t),this.pendingConnection&&this.pendingConnection(t),void this.doClose(t)}if(this._serverversion=e.version,this.flowControl.checkinterval=e.flowControlCheckInterval,this.maxEntitlementsPerSubscription=e.maxEntitlementsPerSubscription,this.isClosed()){var n=C.error("Connection was already closed",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(this.pendingConnection&&this.pendingConnection(n))}this.conn.setServer(e.serverInstance),this.pendingConnection&&this.pendingConnection(null,this)},i.prototype.onConnectionClose=function(e){this.doClose(C.close({reason:e.reason,code:e.code}))},i.prototype.onSlowConnection=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("slow",e)},i.prototype.onStatsResponse=function(e){if(200==e.code)this.events.fire("stats",e);else{var t=C.error("Error getting stats",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onInitialDataSent=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("initialDataSent",e)},i.prototype.onResubscribeMessage=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("resubscribeMessage",e)},i.prototype.onMissedDataSent=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("missedDataSent",e)},i.prototype.onNewsFilterRemoteMessage=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("newsRemoteMessage",e)},i.prototype.onNewsErrorRemoteMessage=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("newsRemoteMessage",e)},i.prototype.onNewsFltAddRemoteMessage=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("newsRemoteMessage",e)},i.prototype.onNewsFltUpdateMessage=function(e){var t=this.pendingNewsSubscriptions[e.__id],n=t.callback;(0,F.removeFromArray)(t.id,e.__id),delete this.pendingNewsSubscriptions[e.__id];var r=t.result;if(200!=e.code){var i=C.error("Error updating to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.newsFilters.push(l)}}if(e.rejectedNewsFilters){var c=e.rejectedNewsFilters,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.rejectedNewsFilters.push(h)}}if(e.unentitledNewsFilters){var m=e.unentitledNewsFilters,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.unentitledNewsFilters.push(T)}}e.filterId&&(r.filterId=e.filterId),0===t.id.length&&n&&n(null,t.result)},i.prototype._handledatamsg=function(e){this.events.fire("message",e)},i.prototype.send=function(e){this.conn&&(e.sequenceNumber=this.flowControl.next(),this.conn.send(e))},i.prototype.doClose=function(e){if(!this.isClosed()){var t=this.conn;this.conn=null,t.close(),this.events.fire("close",e),t.isReconnect()&&(this.events=new E["default"],this.conn=t)}},i.prototype.performReconnect=function(e){if(null!=this.conn&&this.conn.isReconnect()){if(this.conn.isConnectionUp)return void this.log.warn("Connection is not closed and won't try reconnect.");this.conn.setReconnect(!0),this.conn.tryReopen(),e&&e()}else this.log.warn("Reconnect flag is set to false")},i.prototype.close=function(e){this.doClose(C.close({reason:"Manually closed",code:200})),e&&e()},i.prototype.isClosed=function(){return null==this.conn},i}();y["default"]=T}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/Stream.js","/lib")},{"./EventSupport.js":2,"./FlowControl.js":3,"./UShortId.js":9,"./formatting.js":13,"./logging.js":16,"./polyfills.js":18,"./streamer-api.js":108,"./streamer-events.js":109,"./streamer-utils.js":110,"./utils.js":115,_process:131,buffer:121,timers:152}],7:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0;var f=T(v("./atmosphere.js/lib/atmosphere.js")),d=T(v("./http.js")),p=v("./auth/AuthService.js"),h=v("./logging.js"),m=T(v("./auth/EnduserAuthService.js"));v("./polyfills.js");var E=T(v("./StreamingService.js")),_=T(v("./stomp/StompStreamingService.js")),g=T(v("./stomp.js/lib/stomp.js"));function T(e){return e&&e.__esModule?e:{"default":e}}var b={},y=void 0;function S(){y||(y=(0,h.asLogger)(b.logger),f["default"].util.log=function(e,t){y.log.apply(y,[e].concat(Array.from(t)))})}Object.assign(b,{login:function(e,t){new m["default"](d["default"],e).login(t)},open:function(e,t){S();var n=void 0;try{n=(0,p.asCredentials)(e.credentials)}catch(i){return void t(i)}var r=Object.assign({},e);r.credentials=n,r.format=r.format||"application/json",new E["default"](d["default"],f["default"],y,r).openStream(t)},openStomp:function(e,t){S();var n=void 0;try{n=(0,p.asCredentials)(e.credentials)}catch(s){return void t(s)}var r=e.host.split("//"),i="http:"===r[0]?"ws://":"wss://",o=Object.assign({},e);o.credentials=n,o.format=o.format||"application/json",o.url=i+r[1],new _["default"](d["default"],g["default"],y,o).openStompStream(t)},ping:function(e,t){new E["default"](d["default"],f["default"],y,{host:e}).ping(t)},getServerVersion:function(e,t){new E["default"](d["default"],f["default"],y,{host:e}).getVersion(t)}}),O["default"]=b}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/Streamer.js","/lib")},{"./StreamingService.js":8,"./atmosphere.js/lib/atmosphere.js":10,"./auth/AuthService.js":11,"./auth/EnduserAuthService.js":12,"./http.js":14,"./logging.js":16,"./polyfills.js":18,"./stomp.js/lib/stomp.js":104,"./stomp/StompStreamingService.js":107,_process:131,buffer:121,timers:152}],8:[function(N,e,A){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";A.__esModule=!0,N("./polyfills.js");var f=N("./logging.js"),d=N("./streamer-api.js"),p=N("./message.js"),h=S(N("./serialization/SMessageDecoder.js")),m=S(N("./serialization/SMessageEncoder.js")),E=S(N("./transmission/SMessageTransmitter.js")),_=S(N("./transmission/JsonTransmitter.js")),g=S(N("./Connection.js")),T=S(N("./Stream.js")),b=S(N("./transmission/QitchTransmitter.js")),y=S(N("./qitch/encoder/QitchEncoder"));function S(e){return e&&e.__esModule?e:{"default":e}}var v="/ping/v1",O="/version/v1",w="/stream/v1",I=function(){function u(e,t,n,r){var i=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),this.http=e,this.atmo=t,this.log=(0,f.asLogger)(n),this.config=r||{},this.maxReconnectAttempts=this.config.maxReconnectAttempts,this.format=this.config.format,"application/json"===this.config.format)this.createTransmitter=function(e){return new _["default"](e,i.log)};else if("application/qitch"===this.config.format){var o=new y["default"];this.createTransmitter=function(e){return new b["default"](e,o,i.log)},this.format=p.MimeTypes.QITCH}else{var s=new m["default"],a=new h["default"];this.createTransmitter=function(e){return new E["default"](e,s,a,i.log)},"application/json/legacy"===this.config.format&&(this.format=p.MimeTypes.JSON)}}return u.prototype.openSocket=function(e,t){var n={"X-Stream-Version":d.VERSION,"X-Stream-Lib":d.LIBRARY_NAME},r=this.config.conflation;null!=r&&""!==r&&(n["X-Stream-Conflation"]=r);var i=this.config.intervalPeriod;null!=i&&""!==i&&(n["X-Stream-Interval-Period"]=i),null!=t&&""!==t&&(n["X-Stream-Previous-Connection-Id"]=t);var o=this.config.rejectExcessiveConnection;null!=o&&""!==o&&(n["X-Stream-Reject"]=o),"application/json"!==this.config.format&&this.config.format!==p.MimeTypes.QITCH||(n["X-Stream-Format"]=this.format),this.format===p.MimeTypes.QITCH&&(n["X-Atmosphere-Binary"]=!0,n["X-atmo-protocol"]=!1),"true"===this.config.updatesOnly&&(n["X-Stream-UpdatesOnly"]=!0);var s=this.config.isReconnect;null!=s&&""!==s&&(n["x-Stream-isReconnect"]=s);var a=this.config.alwaysReconnect;null!=a&&""!==a&&(n["x-Stream-isAlwaysReopen"]=a),"ALL"===this.config.isMissedData?n["X-Stream-isReceiveAllMissedData"]=!0:"LATEST"===this.config.isMissedData&&(n["X-Stream-isReceiveLatestMissedData"]=!0);var u=this.config.connectionFrom;null!=u&&(n["X-Stream-connectionFrom"]=u);var l=this.config.userSymbology;null!=l&&""!==l&&(n["X-Stream-User-Symbology"]=l),null!=this.config.entMax&&""!=this.config.entMax&&(n["X-Stream-EntMax"]=this.config.entMax),Object.assign(n,this.config.credentials.getHeaders());var c={url:this.config.host+w,transport:this.config.transport||"websocket",fallbackTransport:this.config.fallbackTransport||"streaming",enableXDR:!0===this.config.cors,trackMessageLength:!n["X-Atmosphere-Binary"],headers:n,maxReconnectOnClose:1,reconnectInterval:1e3,closeAsync:!0,connectTimeout:6e4};Object.assign(c,e(c));var f=this.atmo.subscribe(c);return{push:function(e){f.push(e)},close:function(){f.close()}}},u.prototype.createConnection=function(){var n=this;return new g["default"](function(e){return n.createTransmitter(e)},function(e,t){return n.openSocket(e,t)},this.log,this.maxReconnectAttempts)},u.prototype.openStream=function(e){new T["default"](this,this.format,this.log).open(e)},u.prototype.ping=function(t){this.http({url:this.config.host+v,success:function(e){return t(null,e)},type:"GET",failure:t})},u.prototype.getVersion=function(t){this.http({url:this.config.host+O,success:function(e){return t(null,e)},type:"GET",failure:t})},u}();A["default"]=I}).call(this,N("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},N("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],N("timers").setImmediate,N("timers").clearImmediate,"/lib/StreamingService.js","/lib")},{"./Connection.js":1,"./Stream.js":6,"./logging.js":16,"./message.js":17,"./polyfills.js":18,"./qitch/encoder/QitchEncoder":76,"./serialization/SMessageDecoder.js":99,"./serialization/SMessageEncoder.js":100,"./streamer-api.js":108,"./transmission/JsonTransmitter.js":112,"./transmission/QitchTransmitter.js":113,"./transmission/SMessageTransmitter.js":114,_process:131,buffer:121,timers:152}],9:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;var f=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.val=t.MIN_VALUE}return t.prototype.next=function(){var e=this.val;return e<t.MAX_VALUE?this.val++:this.val=t.MIN_VALUE,e},t}();f.NULL=0,f.MIN_VALUE=1,f.MAX_VALUE=65535,d["default"]=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/UShortId.js","/lib")},{_process:131,buffer:121,timers:152}],10:[function(e,p,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f,d,ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};
1
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;((t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).qmci||(t.qmci={})).Streamer=e()}}(function(){return function o(s,a,u){function l(t,e){if(!a[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[t]={exports:{}};s[t][0].call(i.exports,function(e){return l(s[t][1][e]||e)},i,i.exports,o,s,a,u)}return a[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=_("./logging.js"),p=_("./EventSupport.js"),h=(f=p)&&f.__esModule?f:{"default":f},m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("./streamer-events.js"));var E=function(){function i(e,t,n){var r=3<arguments.length&&arguments[3]!==undefined?arguments[3]:3;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.openSocket=t,this.createTransmitter=e,this.log=(0,d.asLogger)(n),this.events=new h["default"](this),this.currentConn="",this.maxReconnectAttempts=r,this.maxReconnectsTotal=3,this.isFirstConnection=!0,this.atmoCodes={1000:"Normal closure; the connection successfully completed whatever purpose for which it was created.",1001:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.",1002:"The endpoint is terminating the connection due to a protocol error.",1003:"The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).",1004:"The endpoint is terminating the connection because a data frame was received that is too large.",1005:"Unknown: no status code was provided even though one was expected.",1006:"Connection was closed abnormally (that is, with no close frame being sent)."}}return i.prototype.open=function(){var s=this,e={push:function(e){return s.socket.push(e)}};this.isFirstConnection&&(this.on("reopen",function(e){if(s.isConnectionUp){var t=s.currentConn;s.currentConn=e.connectionId,s.events.fire("reconnect",m.event("Reconnection success",{previousConnectionId:t,currentConnectionId:s.currentConn}))}else s.events.fire("error",e)}),this.transmitter=this.createTransmitter(e),this.transmitter.on("sequence",function(e){s.events.fire("sequence",e)}).on("message",function(e){s.events.fire("message",e)})),this.socket=this.openSocket(function(e){var o=(s.request=e).url;return s.reconnect=!1,{onMessage:function(e){s.transmitter.onMessage(e.responseBody)},onMessagePublished:function(e){s.transmitter.onMessage(e.responseBody)},onOpen:function(e){var t=e.status;200!==t?s.reconnect=!1:s.isConnectionUp=!0;var n=m.event("open",{url:o,code:t,transport:e.transport,connectionId:e.request.uuid});s.log.info(n),s.events.fire("open",n),s.isFirstConnection||(s.maxReconnectsTotal--,s.events.fire("reopen",n)),s.currentConn=e.request.uuid},onTransportFailure:function(e,t){var n=m.error("Transport failure",{url:o,code:-2,reason:e,fallback:t.fallbackTransport});s.log.error(e),s.events.fire("error",n),s.isReconnect()&&(s.reconnect=!0)},onError:function(e){var t=e.reason||e.reasonPhrase,n=e.status;t&&(""+t.stack).includes("Failed to execute 'send' on 'XMLHttpRequest")&&(t="Failed to send XMLHttpRequest to "+/Failed to load '(.*?)'/.exec(""+t.stack)[1],n=404);var r=m.error(e.reason,{transport:e.transport,reason:t,url:o,code:n});s.log.error(r),s.events.fire("error",r)},onClose:function(e){var t=e.status,n=e.reason||e.reasonPhrase,r=e.atmoMessage;408===t&&"unsubscribe"===e.state&&(t=200,n="Unsubscribed"),501!==t&&401!==t&&403!==t&&452!==t||(s.log.warn("Unable to reconnect with code: "+t+", reason: "+n),s.reconnect=!1),r&&r.code in s.atmoCodes&&(s.log.error("Unexpected close. Code: "+r.code+" Reason: "+s.atmoCodes[r.code]),s.events.fire("atmoError",m.error("Atmosphere error",{reason:s.atmoCodes[r.code],code:r.code})),t=410,n="Gone");var i=m.close({url:o,transport:e.transport,code:t,reason:n});s.isConnectionUp=!1,e.request.uuid=0,s.log.info(i),s.events.fire("close",i)},onSlow:function(e){var t=m.slow({timesExceeded:e.timesExceeded,maxExceeded:e.maxExceed});s.reconnect=!1,s.log.warn("Slow connection received, Reconnection will not be attempted."),s.log.info(t),s.events.fire("slow",t)}}},this.currentConn)},i.prototype.close=function(){if(this.socket)try{this.socket.close(),this.socket=null,this.reconnect&&this.tryReopen()}catch(e){this.events.fire("error",m.error("Error closing",{reason:e.message,cause:e,code:-3}))}},i.prototype.tryReopen=function(){var t=this;if(this.isConnectionUp||this.maxReconnectsTotal<=0)this.log.error("Connection is already open or max reconnects was reached, won't try to reconnect");else{this.isFirstConnection=!1;var n=this.maxReconnectAttempts;setTimeout(function e(){if(n<=0)return t.reconnect=!1,t.log.error("Error while reconnecting. No attempts left."),void(t.maxReconnectAttempts=0);!t.isConnectionUp&&t.reconnect&&(t.log.info("Attempting reconnect. Attempts left: "+n),t.reopen(n),n--,setTimeout(e,500))},500)}},i.prototype.reopen=function(e){try{this.open()}catch(t){this.log.warn("There was an error while reopening attempt #"+e),this.events.fire("error",t)}},i.prototype.send=function(e){try{this.transmitter.send(e)}catch(t){this.events.fire("error",m.error("Error sending message",{reason:t.message,cause:t,code:-4}))}},i.prototype.isReconnect=function(){return this.request.headers["x-Stream-isReconnect"]},i.prototype.setReconnect=function(e){this.reconnect=e},i.prototype.setServer=function(e){this.request.headers["X-Stream-Instance"]=e},i.prototype.isClosed=function(){return null==this.socket},i.prototype.on=function(e,t){return this.events.on(e,t)},i}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/Connection.js","/lib")},{"./EventSupport.js":2,"./logging.js":16,"./streamer-events.js":109,_process:131,buffer:121,timers:152}],2:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;var f=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={},this.source=e||this}return t.prototype.on=function(e,t){return this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t),this.source},t.prototype.fire=function(e,t){var n=this.listeners[e];if(n){var r=n,i=Array.isArray(r),o=0;for(r=i?r:r[Symbol.iterator]();;){var s;if(i){if(o>=r.length)break;s=r[o++]}else{if((o=r.next()).done)break;s=o.value}s(t)}}},t}();d["default"]=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/EventSupport.js","/lib")},{_process:131,buffer:121,timers:152}],3:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=E("./LongSequence.js"),p=(f=d)&&f.__esModule?f:{"default":f},h=E("./streamer-api.js");var m=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.update=e,this.sendsequence=new p["default"],this.checkinterval=null,this.lastreceivedsequence=null}return t.prototype.next=function(){return this.sendsequence.next()},t.prototype.track=function(e){if(null!=this.checkinterval){if(e%this.checkinterval==0){var t=new h.messages.control.FlowMessage;t.sequence=e,this.update(t)}this.lastreceivedsequence=e}},t}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/FlowControl.js","/lib")},{"./LongSequence.js":4,"./streamer-api.js":108,_process:131,buffer:121,timers:152}],4:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;var f=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.val=t.MIN_VALUE}return t.prototype.next=function(){var e=this.val;return e<t.MAX_VALUE?this.val++:this.val=t.MIN_VALUE,e},t}();f.MIN_VALUE=1,f.MAX_VALUE=Number.MAX_SAFE_INTEGER,d["default"]=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/LongSequence.js","/lib")},{_process:131,buffer:121,timers:152}],5:[function(m,e,E){(function(t,n,r,i,o,s,a,u,l,c,f){"use strict";E.__esModule=!0;var d,p=m("./serialization/v1/codec.js"),h=(d=p)&&d.__esModule?d:{"default":d};E["default"]=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=h["default"].TYPE,this.sequencenumber=null,this.timestamp=null,this.id=null,this.encoding=null,this.mimetype=null,this.payload=null}}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/SMessage.js","/lib")},{"./serialization/v1/codec.js":103,_process:131,buffer:121,timers:152}],6:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0,b("./polyfills.js");var f=b("./streamer-api.js"),d=b("./streamer-utils.js"),p=b("./logging.js"),F=b("./utils.js"),h=g(b("./UShortId.js")),m=g(b("./FlowControl.js")),E=g(b("./EventSupport.js")),_=b("./formatting.js"),C=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(b("./streamer-events.js"));function g(e){return e&&e.__esModule?e:{"default":e}}var T=function(){function i(e,t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.events=new E["default"],this.streamingService=e,this.format=t,this.log=(0,p.asLogger)(n),this.flowControl=new m["default"](function(e){r.send(e)}),this.conn=e.createConnection(),this.conn.on("message",function(e){r._handlejsonmsg(e)}).on("sequence",function(e){r.flowControl.track(e)}).on("close",function(e){r.doClose(e)}).on("error",function(e){r.pendingConnection&&r.pendingConnection(e),r.events.fire("error",e)}).on("reconnect",function(e){r.reconnectSuccess(e)}).on("atmoError",function(e){r.events.fire("atmoError",e)}),this.requestid=new h["default"],this.pendingsubscriptions={},this.pendingUnsubscriptions={},this.pendingExchangeSubscriptions={},this.pendingExchangeUnsubscriptions={},this.pendingNewsSubscriptions={},this.pendingNewsUnsubscriptions={},this.pendingAlertSubscription={},this.pendingTradeSubscription={},this.pendingTradeUnsubscription={},this.pendingCorpEventSubscription={},this.on("error",function(e){r.log.warn(e)})}return i.prototype.open=function(e){try{this.pendingConnection=e,this.conn.open()}catch(t){e&&e(t)}},i.prototype.reconnectSuccess=function(e){this.events.fire("reconnectSuccess",e),this.log.info("Successful reconnection. Previous Id: "+e.previousConnectionId+" Current Id = "+e.currentConnectionId)},i.prototype.on=function(e,t){return this.events.on(e,t)},i.prototype.subscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{subscribed:[],rejected:[],unentitled:[],invalidSymbols:[],messageFilters:[]}};0!==e.length&&0!==t.length?this._prepareSubscriptionRequests(e,u,f.messages.control.Action.SUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingsubscriptions[t]=u,e.id=t,i.send(e)}):s(null,u.result)},i.prototype.subscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.SUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeSubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.subscribeNews=function(e,t,n,r){var i=n&&"function"!=typeof n?n:null,o=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}""!==t&&t!=undefined||(t=crypto.randomUUID(),console.log("News FilterId Created: ",t));var a={callback:o,mimetype:this.format,id:[],result:{newsFilters:[],rejectedNewsFilters:[],unentitledNewsFilters:[],filterId:t}};0===e.length&&o(null,a.result);var u=this.buildNewsSubscribeRequest(e,t,a,f.messages.control.NewsAction.NEWS_FLT_ADD,i),l=this.requestid.next();this.pendingNewsSubscriptions[l]=a,u.id=l,this.send(u)},i.prototype.subscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.SUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.subUnsubAlerts=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{operation:""}},s=this.buildAlertsSubUnsubRequest(e,o),a=this.requestid.next();o.id.push(a),this.pendingAlertSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.subscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.SUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.getSessionStats=function(){if(this.isClosed()){var e=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",e)}else{var t=new f.messages.control.StatsMessage;this.send(t)}},i.prototype.updateOAuthToken=function(e,t,n){var r=n||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={mimetype:this.format,callback:r},s=this.buildUpdateAuthTokenRequest("oauth",e,t,o),a=this.requestid.next();s.id=a,this.send(s)}},i.prototype.fltUpdateNews=function(e,t,n){var r=n||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",i),void(r&&r(i))}var o={callback:r,mimetype:this.format,id:[],result:{newsFilters:[],rejectedNewsFilters:[],unentitledNewsFilters:[],filterId:t}},s=this.buildNewsSubscribeRequest(e,t,o,f.messages.control.NewsAction.NEWS_FLT_UPDATE,null),a=this.requestid.next();this.pendingNewsSubscriptions[a]=o,s.id=a,this.send(s)},i.prototype.fltDeleteNews=function(e,t){var n=t||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var r=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",r),void(n&&n(r))}var i={callback:n,mimetype:this.format},o=this.buildNewsSubscribeRequest(null,e,i,f.messages.control.NewsAction.NEWS_FLT_DELETE,null);this.send(o)},i.prototype.fltGetNews=function(e){var t=e||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var n=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(t&&t(n))}var r={callback:t,mimetype:this.format},i=this.buildNewsCommandRequest(r,f.messages.control.NewsAction.NEWS_FLT_GET);this.send(i)},i.prototype.fltMockBasicNews=function(e){var t=e||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var n=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(t&&t(n))}var r={callback:t,mimetype:this.format},i=this.buildNewsCommandRequest(r,f.messages.control.NewsAction.NEWS_FLT_MOCK_BASIC);this.send(i)},i.prototype.unsubscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{unsubscribed:[]}};0!==e.length&&0!==t.length||s&&s(null,u.result),this._prepareSubscriptionRequests(e,u,f.messages.control.Action.UNSUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingUnsubscriptions[t]=u,e.id=t,i.send(e)})},i.prototype.unsubscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.UNSUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeUnsubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.unsubscribeNews=function(e,t,n){e=Array.isArray(e)?e:[e];var r=t&&"function"!=typeof t?t:null,i=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var o=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",o),void(i&&i(o))}var s={callback:i,mimetype:this.format,id:[],result:{unsubscribed:[]}};0===e.length&&i&&i(null,s.result);var a=this.buildNewsSubscribeRequest(e,s,f.messages.control.NewsAction.NEWS_FLT_DELETE,r),u=this.requestid.next();s.id.push(u),this.pendingNewsUnsubscriptions[u]=s,a.id=u,this.send(a)},i.prototype.unsubscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.UNSUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.unsubscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=C.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.UNSUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeUnsubscription[a]=o,s.id=a,this.send(s)}},i.prototype._handlejsonmsg=function(e){(0,d.iscontrolmessage)(e)?this.handlectrlmsg(e):(0,d.isdatamessage)(e)?this._handledatamsg(e):this.events.fire("error",e)},i.prototype._prepareSubscriptionRequests=function(e,t,n,r){for(var i=0,o=-1,s=e.length,a=t.types.includes("ORDERBOOK"),u=[],l=0;l<s;l++)((i=this._getUpdatedNumberOfEntitlements(t.types.length,i,e[l],a))>=this.maxEntitlementsPerSubscription||l===s-1)&&(u.push(this._buildRequest(e.slice(o+1,l+1),t,n,r)),o=l,i=0);return u},i.prototype._buildRequest=function(e,t,n,r){var i=new f.messages.control.SubscribeMessage;return i.action=n,i.symbols=e,i.types=t.types,i.mimetype=t.mimetype,r&&r.skipHeavyInitialLoad&&(i.skipHeavyInitialLoad=!0),r&&(i.conflation=r.conflation,i.intervalPeriod=r.intervalPeriod),i},i.prototype.prepareExchangeSubscriptionRequest=function(e,t,n,r){for(var i=[],o=e.length,s=0;s<o;s++)i.push(this.buildExchangeRequest(e[s],t,n,r));return i},i.prototype.buildExchangeRequest=function(e,t,n,r){var i=new f.messages.control.ExchangeSubscribeMessage;return i.action=n,i.exchange=e,i.mimetype=t.mimetype,r&&(i.conflation=r.conflation),i},i.prototype.buildNewsSubscribeRequest=function(e,t,n,r,i){var o=new f.messages.control.NewsSubscribeMessage;return o.newsAction=r,o.newsFilters=e,o.filterId=t,o.mimetype=n.mimetype,i&&i.skipHeavyInitialLoad&&(o.skipHeavyInitialLoad=i.skipHeavyInitialLoad),o},i.prototype.buildCorpEventRequest=function(e,t,n){var r=new f.messages.control.CorpEventSubscribeMessage;return r.symbols=e,r.action=n,r.corpEventTypes=t.corpEventTypes,r.allCorpEvents=t.allCorpEvents,r.mimeType=t.mimeType,r},i.prototype.buildAlertsSubUnsubRequest=function(e,t){var n=new f.messages.control.AlertsSubUnsubMessage;return n.operation=e,n.mimetype=t.mimetype,n},i.prototype.buildTradeSubscribeRequest=function(e,t,n){var r=new f.messages.control.TradeSubscribeMessage;return r.action=n,r.notificationType=e,r.mimetype=t.mimetype,r},i.prototype.buildUpdateAuthTokenRequest=function(e,t,n,r){var i=new f.messages.control.AuthTokenMessage;return i.authMethod=e,i.authParams={oauthToken:t,previousToken:n},i.mimetype=r.mimetype,i},i.prototype.buildNewsCommandRequest=function(e,t){var n=new f.messages.control.NewsCommandMessage;return n.newsAction=t,n.mimetype=e.mimetype,n},i.prototype._getUpdatedNumberOfEntitlements=function(e,t,n,r){var i=t;return r&&n.endsWith(":CC")?i+=14*e:i+=e,i},i.prototype.handlectrlmsg=function(e){switch(this.log.debug(_.msgfmt.fmt(e)),(0,d.messagetype)(e)){case f.messages.MessageTypeNames.ctrl.HEARTBEAT:this.onHeartbeat(e);break;case f.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE:this.onSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_RESPONSE:this.onExchangeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_ADD_RESPONSE:this.onNewsFltAddResponse(e);break;case f.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE:this.onAlertsSubUnsubResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE:this.onTradeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE:this.onUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE:this.onExchangeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_DELETE_RESPONSE:this.onNewsFltDeleteResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_GET_RESPONSE:this.onNewsFltGetResponse(e);break;case f.messages.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE:this.onCorpEventResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE:this.onTradeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE:this.onConnectResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE:this.onConnectionClose(e);break;case f.messages.MessageTypeNames.ctrl.SLOW_CONNECTION:this.onSlowConnection(e);break;case f.messages.MessageTypeNames.ctrl.STATS_RESPONSE:this.onStatsResponse(e);break;case f.messages.MessageTypeNames.ctrl.INITIAL_DATA_SENT:this.onInitialDataSent(e);break;case f.messages.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE:this.onResubscribeMessage(e);break;case f.messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE:this.onReconnectMessage(e);break;case f.messages.MessageTypeNames.ctrl.MISSED_DATA_SENT:this.onMissedDataSent(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FILTER_MESSAGE:this.onNewsFilterRemoteMessage(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_ERROR_MESSAGE:this.onNewsErrorRemoteMessage(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_FLT_UPDATE_RESPONSE:this.onNewsFltUpdateMessage(e);break;case f.messages.MessageTypeNames.ctrl.AUTH_TOKEN_RESPONSE:this.onAuthTokenResponse(e)}},i.prototype.onHeartbeat=function(e){},i.prototype.onSubscribeResponse=function(e){var t=this.pendingsubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.ids,e.__id),delete this.pendingsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;if(e.entitlements){var o=e.entitlements,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u,c=l,f=c.symbol,d=c.marketdatatype,p=c.entitlement;l={symbol:f,type:d},"NA"!==p?(this.log.debug("SUBSCRIBED <"+f+", "+d+">"),l.entitlement=p,i.subscribed.push(l)):(this.log.warn("NOT ENTITLED <"+f+","+d+">"),i.unentitled.push(l))}}if(e.rejectedSymbols){var h=e.rejectedSymbols,m=Array.isArray(h),E=0;for(h=m?h:h[Symbol.iterator]();;){var _;if(m){if(E>=h.length)break;_=h[E++]}else{if((E=h.next()).done)break;_=E.value}f=_;this.log.warn("REJECTED "+f),i.rejected.push(f)}}if(e.invalidSymbols){var g=e.invalidSymbols,T=Array.isArray(g),b=0;for(g=T?g:g[Symbol.iterator]();;){var y,S;if(T){if(b>=g.length)break;S=g[b++]}else{if((b=g.next()).done)break;S=b.value}var v=S;this.log.warn("INVALID SYMBOL "+v),(y=i.invalidSymbols).push.apply(y,e.invalidSymbols)}}if(e.messageFilters){this.log.debug("MESSAGE FILTERS "+JSON.stringify(e.messageFilters));var O=e.messageFilters,w=Array.isArray(O),I=0;for(O=w?O:O[Symbol.iterator]();;){var N;if(w){if(I>=O.length)break;N=O[I++]}else{if((I=O.next()).done)break;N=I.value}var A=N;i.messageFilters.push(A)}}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeSubscribeResponse=function(e){var t=this.pendingExchangeSubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingExchangeSubscriptions[e.__id],200!=e.code){var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onNewsFltAddResponse=function(e){var t=this.pendingNewsSubscriptions[e.__id],n=t.callback;(0,F.removeFromArray)(t.id,e.__id),delete this.pendingNewsSubscriptions[e.__id];var r=t.result;if(200!=e.code){var i=C.error("Error subscribing to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.newsFilters.push(l)}}if(e.rejectedNewsFilters){var c=e.rejectedNewsFilters,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.rejectedNewsFilters.push(h)}}if(e.unentitledNewsFilters){var m=e.unentitledNewsFilters,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.unentitledNewsFilters.push(T)}}e.filterId&&(r.filterId=e.filterId),0===t.id.length&&n&&n(null,t.result)},i.prototype.onCorpEventResponse=function(e){var t=this.pendingCorpEventSubscription[e.__id],n=t.callback;(0,F.removeFromArray)(t.id,e.__id),delete this.pendingCorpEventSubscription[e.__id];var r=t.result;if(200!=e.code){var i=C.error("Error subscribing to Corporate Events",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.subscribed){var o=e.subscribed,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.subscribed.push(l)}}if(e.unsubscribed){var c=e.unsubscribed,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.unsubscribed.push(h)}}if(e.invalid){var m=e.invalid,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.invalid.push(T)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onAlertsSubUnsubResponse=function(e){var t=this.pendingAlertSubscription[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingAlertSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.operation&&(this.log.debug("Alerts "+e.operation),i.operation=e.operation),0===t.id.length&&n&&n(null,t.result)},i.prototype.onTradeSubscribeResponse=function(e){var t=this.pendingTradeSubscription[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingTradeSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onNewsFltDeleteResponse=function(e){if(console.log("News_flt_delete Response",e),200==e.code)this.events.fire("filter delete",e);else{var t=C.error("Error Unsubscribe News Filter",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onTradeUnsubscribeResponse=function(e){var t=this.pendingTradeUnsubscription[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingTradeUnsubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onNewsFltGetResponse=function(e){if(200==e.code)this.events.fire("filter status",e);else{var t=C.error("Error Getting News Filters Status",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onUnsubscribeResponse=function(e){var t=this.pendingUnsubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.ids,e.__id),delete this.pendingUnsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=C.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&n(r))}for(var i=0;i<e.unsubscribed.length;++i){var o=t.result,s=e.unsubscribed[i],a=s.symbol,u=s.marketdatatype;this.log.debug("UNSUBSCRIBED <"+a+", "+u+">"),o.unsubscribed.push({symbol:a,type:u})}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeUnsubscribeResponse=function(e){var t=this.pendingExchangeUnsubscriptions[e.__id],n=t.callback;if((0,F.removeFromArray)(t.id,e.__id),delete this.pendingExchangeUnsubscriptions[e.__id],200!=e.code){var r=C.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onReconnectMessage=function(e){450===e.code&&(this.events.fire("slow","Reconnection recieved a slow code: "+e.code),this._isSlowConnection=!0,this.conn.setReconnect=!1),this.events.fire("reconnectMessage",e)},i.prototype.onConnectResponse=function(e){if(200!==e.code){var t=C.error("Connection failed",{code:e.code,reason:e.reason});return this.events.fire("error",t),this.pendingConnection&&this.pendingConnection(t),void this.doClose(t)}if(this._serverversion=e.version,this.flowControl.checkinterval=e.flowControlCheckInterval,this.maxEntitlementsPerSubscription=e.maxEntitlementsPerSubscription,this.isClosed()){var n=C.error("Connection was already closed",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(this.pendingConnection&&this.pendingConnection(n))}this.conn.setServer(e.serverInstance),this.pendingConnection&&this.pendingConnection(null,this)},i.prototype.onConnectionClose=function(e){this.doClose(C.close({reason:e.reason,code:e.code}))},i.prototype.onSlowConnection=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("slow",e)},i.prototype.onStatsResponse=function(e){if(200==e.code)this.events.fire("stats",e);else{var t=C.error("Error getting stats",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onInitialDataSent=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("initialDataSent",e)},i.prototype.onResubscribeMessage=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("resubscribeMessage",e)},i.prototype.onMissedDataSent=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("missedDataSent",e)},i.prototype.onNewsFilterRemoteMessage=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("newsRemoteMessage",e)},i.prototype.onNewsErrorRemoteMessage=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("newsRemoteMessage",e)},i.prototype.onNewsFltUpdateMessage=function(e){var t=this.pendingNewsSubscriptions[e.__id],n=t.callback;(0,F.removeFromArray)(t.id,e.__id),delete this.pendingNewsSubscriptions[e.__id];var r=t.result;if(200!=e.code){var i=C.error("Error updating to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.newsFilters.push(l)}}if(e.rejectedNewsFilters){var c=e.rejectedNewsFilters,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.rejectedNewsFilters.push(h)}}if(e.unentitledNewsFilters){var m=e.unentitledNewsFilters,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.unentitledNewsFilters.push(T)}}e.filterId&&(r.filterId=e.filterId),0===t.id.length&&n&&n(null,t.result)},i.prototype.onAuthTokenResponse=function(e){this.log.debug(_.msgfmt.fmt(e)),this.events.fire("authTokenResponse",e)},i.prototype._handledatamsg=function(e){this.events.fire("message",e)},i.prototype.send=function(e){this.conn&&(e.sequenceNumber=this.flowControl.next(),this.conn.send(e))},i.prototype.doClose=function(e){if(!this.isClosed()){var t=this.conn;this.conn=null,t.close(),this.events.fire("close",e),t.isReconnect()&&(this.events=new E["default"],this.conn=t)}},i.prototype.performReconnect=function(e){if(null!=this.conn&&this.conn.isReconnect()){if(this.conn.isConnectionUp)return void this.log.warn("Connection is not closed and won't try reconnect.");this.conn.setReconnect(!0),this.conn.tryReopen(),e&&e()}else this.log.warn("Reconnect flag is set to false")},i.prototype.close=function(e){this.doClose(C.close({reason:"Manually closed",code:200})),e&&e()},i.prototype.isClosed=function(){return null==this.conn},i}();y["default"]=T}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/Stream.js","/lib")},{"./EventSupport.js":2,"./FlowControl.js":3,"./UShortId.js":9,"./formatting.js":13,"./logging.js":16,"./polyfills.js":18,"./streamer-api.js":108,"./streamer-events.js":109,"./streamer-utils.js":110,"./utils.js":115,_process:131,buffer:121,timers:152}],7:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0;var f=T(v("./atmosphere.js/lib/atmosphere.js")),d=T(v("./http.js")),p=v("./auth/AuthService.js"),h=v("./logging.js"),m=T(v("./auth/EnduserAuthService.js"));v("./polyfills.js");var E=T(v("./StreamingService.js")),_=T(v("./stomp/StompStreamingService.js")),g=T(v("./stomp.js/lib/stomp.js"));function T(e){return e&&e.__esModule?e:{"default":e}}var b={},y=void 0;function S(){y||(y=(0,h.asLogger)(b.logger),f["default"].util.log=function(e,t){y.log.apply(y,[e].concat(Array.from(t)))})}Object.assign(b,{login:function(e,t){new m["default"](d["default"],e).login(t)},open:function(e,t){S();var n=void 0;try{n=(0,p.asCredentials)(e.credentials)}catch(i){return void t(i)}var r=Object.assign({},e);r.credentials=n,r.format=r.format||"application/json",new E["default"](d["default"],f["default"],y,r).openStream(t)},openStomp:function(e,t){S();var n=void 0;try{n=(0,p.asCredentials)(e.credentials)}catch(s){return void t(s)}var r=e.host.split("//"),i="http:"===r[0]?"ws://":"wss://",o=Object.assign({},e);o.credentials=n,o.format=o.format||"application/json",o.url=i+r[1],new _["default"](d["default"],g["default"],y,o).openStompStream(t)},ping:function(e,t){new E["default"](d["default"],f["default"],y,{host:e}).ping(t)},getServerVersion:function(e,t){new E["default"](d["default"],f["default"],y,{host:e}).getVersion(t)}}),O["default"]=b}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/Streamer.js","/lib")},{"./StreamingService.js":8,"./atmosphere.js/lib/atmosphere.js":10,"./auth/AuthService.js":11,"./auth/EnduserAuthService.js":12,"./http.js":14,"./logging.js":16,"./polyfills.js":18,"./stomp.js/lib/stomp.js":104,"./stomp/StompStreamingService.js":107,_process:131,buffer:121,timers:152}],8:[function(N,e,A){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";A.__esModule=!0,N("./polyfills.js");var f=N("./logging.js"),d=N("./streamer-api.js"),p=N("./message.js"),h=S(N("./serialization/SMessageDecoder.js")),m=S(N("./serialization/SMessageEncoder.js")),E=S(N("./transmission/SMessageTransmitter.js")),_=S(N("./transmission/JsonTransmitter.js")),g=S(N("./Connection.js")),T=S(N("./Stream.js")),b=S(N("./transmission/QitchTransmitter.js")),y=S(N("./qitch/encoder/QitchEncoder"));function S(e){return e&&e.__esModule?e:{"default":e}}var v="/ping/v1",O="/version/v1",w="/stream/v1",I=function(){function u(e,t,n,r){var i=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),this.http=e,this.atmo=t,this.log=(0,f.asLogger)(n),this.config=r||{},this.maxReconnectAttempts=this.config.maxReconnectAttempts,this.format=this.config.format,"application/json"===this.config.format)this.createTransmitter=function(e){return new _["default"](e,i.log)};else if("application/qitch"===this.config.format){var o=new y["default"];this.createTransmitter=function(e){return new b["default"](e,o,i.log)},this.format=p.MimeTypes.QITCH}else{var s=new m["default"],a=new h["default"];this.createTransmitter=function(e){return new E["default"](e,s,a,i.log)},"application/json/legacy"===this.config.format&&(this.format=p.MimeTypes.JSON)}}return u.prototype.openSocket=function(e,t){var n={"X-Stream-Version":d.VERSION,"X-Stream-Lib":d.LIBRARY_NAME},r=this.config.conflation;null!=r&&""!==r&&(n["X-Stream-Conflation"]=r);var i=this.config.intervalPeriod;null!=i&&""!==i&&(n["X-Stream-Interval-Period"]=i),null!=t&&""!==t&&(n["X-Stream-Previous-Connection-Id"]=t);var o=this.config.rejectExcessiveConnection;null!=o&&""!==o&&(n["X-Stream-Reject"]=o),"application/json"!==this.config.format&&this.config.format!==p.MimeTypes.QITCH||(n["X-Stream-Format"]=this.format),this.format===p.MimeTypes.QITCH&&(n["X-Atmosphere-Binary"]=!0,n["X-atmo-protocol"]=!1),"true"===this.config.updatesOnly&&(n["X-Stream-UpdatesOnly"]=!0);var s=this.config.isReconnect;null!=s&&""!==s&&(n["x-Stream-isReconnect"]=s);var a=this.config.alwaysReconnect;null!=a&&""!==a&&(n["x-Stream-isAlwaysReopen"]=a),"ALL"===this.config.isMissedData?n["X-Stream-isReceiveAllMissedData"]=!0:"LATEST"===this.config.isMissedData&&(n["X-Stream-isReceiveLatestMissedData"]=!0);var u=this.config.connectionFrom;null!=u&&(n["X-Stream-connectionFrom"]=u);var l=this.config.userSymbology;null!=l&&""!==l&&(n["X-Stream-User-Symbology"]=l),null!=this.config.entMax&&""!=this.config.entMax&&(n["X-Stream-EntMax"]=this.config.entMax),Object.assign(n,this.config.credentials.getHeaders());var c={url:this.config.host+w,transport:this.config.transport||"websocket",fallbackTransport:this.config.fallbackTransport||"streaming",enableXDR:!0===this.config.cors,trackMessageLength:!n["X-Atmosphere-Binary"],headers:n,maxReconnectOnClose:1,reconnectInterval:1e3,closeAsync:!0,connectTimeout:6e4};Object.assign(c,e(c));var f=this.atmo.subscribe(c);return{push:function(e){f.push(e)},close:function(){f.close()}}},u.prototype.createConnection=function(){var n=this;return new g["default"](function(e){return n.createTransmitter(e)},function(e,t){return n.openSocket(e,t)},this.log,this.maxReconnectAttempts)},u.prototype.openStream=function(e){new T["default"](this,this.format,this.log).open(e)},u.prototype.ping=function(t){this.http({url:this.config.host+v,success:function(e){return t(null,e)},type:"GET",failure:t})},u.prototype.getVersion=function(t){this.http({url:this.config.host+O,success:function(e){return t(null,e)},type:"GET",failure:t})},u}();A["default"]=I}).call(this,N("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},N("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],N("timers").setImmediate,N("timers").clearImmediate,"/lib/StreamingService.js","/lib")},{"./Connection.js":1,"./Stream.js":6,"./logging.js":16,"./message.js":17,"./polyfills.js":18,"./qitch/encoder/QitchEncoder":76,"./serialization/SMessageDecoder.js":99,"./serialization/SMessageEncoder.js":100,"./streamer-api.js":108,"./transmission/JsonTransmitter.js":112,"./transmission/QitchTransmitter.js":113,"./transmission/SMessageTransmitter.js":114,_process:131,buffer:121,timers:152}],9:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;var f=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.val=t.MIN_VALUE}return t.prototype.next=function(){var e=this.val;return e<t.MAX_VALUE?this.val++:this.val=t.MIN_VALUE,e},t}();f.NULL=0,f.MIN_VALUE=1,f.MAX_VALUE=65535,d["default"]=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/UShortId.js","/lib")},{_process:131,buffer:121,timers:152}],10:[function(e,p,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f,d,ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};
2
2
  /*
3
3
  * Copyright 2015 Async-IO.org
4
4
  *
@@ -29,9 +29,9 @@
29
29
  * See the License for the specific language governing permissions and
30
30
  * limitations under the License.
31
31
  */
32
- f=undefined,d=function(){var e,t,ee={},te=!1,i=[],ne=[],re=0,f=Object.prototype.hasOwnProperty;return(ee={version:"2.3.3-javascript",onError:function(e){},onClose:function(e){},onOpen:function(e){},onReopen:function(e){},onMessage:function(e){},onReconnect:function(e,t){},onMessagePublished:function(e){},onTransportFailure:function(e,t){},onLocalMessage:function(e){},onFailureToReconnect:function(e,t){},onClientTimeout:function(e){},onOpenAfterResume:function(e){},WebsocketApiAdapter:function(e){var t,n;return e.onMessage=function(e){n.onmessage({data:e.responseBody})},e.onMessagePublished=function(e){n.onmessage({data:e.responseBody})},e.onOpen=function(e){n.onopen(e)},n={close:function(){t.close()},send:function(e){t.push(e)},onmessage:function(e){},onopen:function(e){},onclose:function(e){},onerror:function(e){}},t=new ee.subscribe(e),n},AtmosphereRequest:function(e){var a,l,u,d={timeout:3e5,method:"GET",headers:{},contentType:"",callback:null,url:"",data:"",suspend:!0,maxRequest:-1,reconnect:!0,maxStreamingLength:1e7,lastIndex:0,logLevel:"info",requestCount:0,fallbackMethod:"GET",fallbackTransport:"streaming",transport:"long-polling",webSocketImpl:null,webSocketBinaryType:null,dispatchUrl:null,webSocketPathDelimiter:"@@",enableXDR:!1,rewriteURL:!1,attachHeadersAsQueryString:!0,executeCallbackBeforeReconnect:!1,readyState:0,withCredentials:!0,trackMessageLength:!1,messageDelimiter:"|",connectTimeout:-1,reconnectInterval:0,dropHeaders:!0,uuid:0,async:!0,shared:!1,readResponsesHeaders:!1,maxReconnectOnClose:5,enableProtocol:!0,disableDisconnect:!1,pollingInterval:0,heartbeat:{client:null,server:null},ackInterval:0,closeAsync:!1,reconnectOnServerError:!0,handleOnlineOffline:!0,onError:function(e){},onClose:function(e){},onOpen:function(e){},onMessage:function(e){},onReopen:function(e,t){},onReconnect:function(e,t){},onMessagePublished:function(e){},onTransportFailure:function(e,t){},onLocalMessage:function(e){},onFailureToReconnect:function(e,t){},onClientTimeout:function(e){},onOpenAfterResume:function(e){}},p={status:200,reasonPhrase:"OK",responseBody:"",messages:[],headers:[],state:"messageReceived",transport:"polling",error:null,request:null,partialMessage:"",errorHandled:!1,closedByClientTimeout:!1,ffTryingReconnect:!1},o=null,s=null,n=null,r=null,c=null,i=!0,h=0,f=0,m="X",E=!1,_=null,g=null,T=ee.util.now();function t(){E=!(i=!0),h=0,r=n=s=o=null}function b(e){return"debug"==e?"debug"===d.logLevel:"info"==e?"info"===d.logLevel||"debug"===d.logLevel:"warn"==e?"warn"===d.logLevel||"info"===d.logLevel||"debug"===d.logLevel:"error"==e&&("error"===d.logLevel||"warn"===d.logLevel||"info"===d.logLevel||"debug"===d.logLevel)}function y(e){b("debug")&&ee.util.debug(new Date+" Atmosphere: "+e)}function S(e,t){return""===p.partialMessage&&"streaming"===t.transport&&e.responseText.length>t.maxStreamingLength}function v(){if(d.enableProtocol&&!d.disableDisconnect&&!d.firstMessage){var r="X-Atmosphere-Transport=close&X-Atmosphere-tracking-id="+d.uuid;ee.util.each(d.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,d,d,p):t;null!=n&&(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(n))});var e=d.url.replace(/([?&])_=[^&]*/,r);e+=e===d.url?(/\?/.test(d.url)?"&":"?")+r:"";var t=new ee.AtmosphereRequest({connected:!1});t.connectTimeout=d.connectTimeout,t.attachHeadersAsQueryString=!1,t.dropHeaders=!0,t.url=e,t.contentType="text/plain",t.transport="polling",t.method="GET",t.data="",t.heartbeat=null,d.enableXDR&&(t.enableXDR=d.enableXDR),t.async=d.closeAsync,function(e,t){t||(t=Q(e));t.transport="polling",t.method="GET",t.withCredentials=!1,t.reconnect=!1,t.force=!0,t.suspend=!1,t.timeout=1e3,k(t)}("",t)}}function O(){y("Closing (AtmosphereRequest._close() called)"),E=!0,d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),d.reconnect=!1,p.request=d,p.state="unsubscribe",p.responseBody="",p.status=408,p.partialMessage="",$(),v(),w()}function w(){p.partialMessage="",d.id&&clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId),null!=r&&(r.close(),r=null),null!=c&&(c.abort(),c=null),null!=n&&(n.abort(),n=null),null!=o&&(o.canSendMessage&&(y("invoking .close() on WebSocket object"),o.close()),o=null),null!=s&&(s.close(),s=null),function(){null!=a&&(clearInterval(l),document.cookie=u+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",a.signal("close",{reason:"",heir:E?(a.get("children")||[])[0]:T}),a.close());null!=g&&g.close()}()}function I(e){w(),t(),(d=ee.util.extend(d,e)).mrequest=d.reconnect,d.reconnect||(d.reconnect=!0)}function N(){if(d.shared){if(null!=(g=function(o){var t,n,r,s="atmosphere-"+o.url,e={storage:function(){function t(e){e.key===s&&e.newValue&&u(e.newValue)}if(ee.util.storage){var n=window.localStorage,r=function(e){var t=n.getItem(s+"-"+e);return null===t?[]:ee.util.parseJSON(t)},i=function(e,t){n.setItem(s+"-"+e,ee.util.stringifyJSON(t))};return{init:function(){return i("children",r("children").concat([T])),ee.util.on(window,"storage",t),r("opened")},signal:function(e,t){n.setItem(s,ee.util.stringifyJSON({target:"p",type:e,data:t}))},close:function(){var e=r("children");ee.util.off(window,"storage",t),e&&a(e,o.id)&&i("children",e)}}}},windowref:function(){var n=window.open("",s.replace(/\W/g,""));if(n&&!n.closed&&n.callbacks)return{init:function(){return n.callbacks.push(u),n.children.push(T),n.opened},signal:function(e,t){!n.closed&&n.fire&&n.fire(ee.util.stringifyJSON({target:"p",type:e,data:t}))},close:function(){r||(a(n.callbacks,u),a(n.children,T))}}}};function a(e,t){var n,r=e.length;for(n=0;n<r;n++)e[n]===t&&e.splice(n,1);return r!==e.length}function u(e){var t=ee.util.parseJSON(e),n=t.data;if("c"===t.target)switch(t.type){case"open":A("opening","local",d);break;case"close":r||(r=!0,"aborted"===n.reason?O():n.heir===T?N():setTimeout(function(){N()},100));break;case"message":X(n,"messageReceived",200,o.transport);break;case"localMessage":K(n)}}function i(){var e=new RegExp("(?:^|; )("+encodeURIComponent(s)+")=([^;]*)").exec(document.cookie);if(e)return ee.util.parseJSON(decodeURIComponent(e[2]))}if(!(t=i())||1e3<ee.util.now()-t.ts)return;if(!(n=e.storage()||e.windowref()))return;return{open:function(){var e;return l=setInterval(function(){var e=t;(t=i())&&e.ts!==t.ts||u(ee.util.stringifyJSON({target:"c",type:"close",data:{reason:"error",heir:e.heir}}))},1e3),(e=n.init())&&setTimeout(function(){A("opening","local",o)},50),e},send:function(e){n.signal("send",e)},localSend:function(e){n.signal("localSend",ee.util.stringifyJSON({id:T,event:e}))},close:function(){E||(clearInterval(l),n.signal("close"),n.close())}}}(d))&&(b("debug")&&ee.util.debug("Storage service available. All communication will be local"),g.open(d)))return;b("debug")&&ee.util.debug("No Storage service available."),g=null}var e,r,i;d.firstMessage=0==re,d.isOpen=!1,d.ctime=ee.util.now(),0===d.uuid&&(d.uuid=re),p.closedByClientTimeout=!1,"websocket"!==d.transport&&"sse"!==d.transport?k(d):"websocket"===d.transport?null!=d.webSocketImpl||window.WebSocket||window.MozWebSocket?function n(s){p.transport="websocket";var e=(d.url,B(d,ee.util.getAbsoluteURL(d.webSocketUrl||d.url)).replace(/^http/,"ws"));b("debug")&&ee.util.debug("Invoking executeWebSocket, using URL: "+e);if(s&&!d.reconnect)return void(null!=o&&w());o=function(e){{return null!=d.webSocketImpl?d.webSocketImpl:window.WebSocket?new WebSocket(e):new MozWebSocket(e)}}(e);null!=d.webSocketBinaryType&&(o.binaryType=d.webSocketBinaryType);0<d.connectTimeout&&(d.id=setTimeout(function(){if(s);else{o.onclose({code:1002,reason:"",wasClean:!1});try{w()}catch(e){}}},d.connectTimeout));o.onopen=function(e){y("websocket.onopen"),M(d),te=!1,b("debug")&&ee.util.debug("Websocket successfully opened");var t=s;null!=o&&(o.canSendMessage=!0),d.enableProtocol||(s=!0,A(t?"re-opening":"opening","websocket",d)),null!=o&&"POST"===d.method&&(p.state="messageReceived",o.send(d.data))};o.onmessage=function(e){y("websocket.onmessage"),M(d),d.enableProtocol&&(s=!0),p.state="messageReceived",p.status=200;var t,n,r,i="string"==typeof(e=e.data);if(i){var o=L(e,d,p);o||($(),p.responseBody="",p.messages=[])}else d.firstMessage?function(n,e,r){if(e instanceof Blob){var i=n.firstMessage;n.firstMessage=!1;var t=new FileReader;t.addEventListener("loadend",function(e){if(r){var t=C(n,e.target.result);i||r(t)}}),t.readAsText(e)}else r&&r(C(n,e))}(d,e,function(e){""!==e&&(p.responseBody=e,$(),p.responseBody=null)}):(t=e,n=function(e){p.responseBody=e,$(),p.responseBody=null},(r=new FileReader).addEventListener("loadend",function(e){n&&n(e.target.result)}),r.readAsArrayBuffer(t))};o.onerror=function(e){y("websocket.onerror"),clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),
32
+ f=undefined,d=function(){var e,t,ee={},te=!1,i=[],ne=[],re=0,f=Object.prototype.hasOwnProperty;return(ee={version:"2.3.3-javascript",onError:function(e){},onClose:function(e){},onOpen:function(e){},onReopen:function(e){},onMessage:function(e){},onReconnect:function(e,t){},onMessagePublished:function(e){},onTransportFailure:function(e,t){},onLocalMessage:function(e){},onFailureToReconnect:function(e,t){},onClientTimeout:function(e){},onOpenAfterResume:function(e){},WebsocketApiAdapter:function(e){var t,n;return e.onMessage=function(e){n.onmessage({data:e.responseBody})},e.onMessagePublished=function(e){n.onmessage({data:e.responseBody})},e.onOpen=function(e){n.onopen(e)},n={close:function(){t.close()},send:function(e){t.push(e)},onmessage:function(e){},onopen:function(e){},onclose:function(e){},onerror:function(e){}},t=new ee.subscribe(e),n},AtmosphereRequest:function(e){var a,l,u,d={timeout:3e5,method:"GET",headers:{},contentType:"",callback:null,url:"",data:"",suspend:!0,maxRequest:-1,reconnect:!0,maxStreamingLength:1e7,lastIndex:0,logLevel:"info",requestCount:0,fallbackMethod:"GET",fallbackTransport:"streaming",transport:"long-polling",webSocketImpl:null,webSocketBinaryType:null,dispatchUrl:null,webSocketPathDelimiter:"@@",enableXDR:!1,rewriteURL:!1,attachHeadersAsQueryString:!0,executeCallbackBeforeReconnect:!1,readyState:0,withCredentials:!0,trackMessageLength:!1,messageDelimiter:"|",connectTimeout:-1,reconnectInterval:0,dropHeaders:!0,uuid:0,async:!0,shared:!1,readResponsesHeaders:!1,maxReconnectOnClose:5,enableProtocol:!0,disableDisconnect:!1,pollingInterval:0,heartbeat:{client:null,server:null},ackInterval:0,closeAsync:!1,reconnectOnServerError:!0,handleOnlineOffline:!0,onError:function(e){},onClose:function(e){},onOpen:function(e){},onMessage:function(e){},onReopen:function(e,t){},onReconnect:function(e,t){},onMessagePublished:function(e){},onTransportFailure:function(e,t){},onLocalMessage:function(e){},onFailureToReconnect:function(e,t){},onClientTimeout:function(e){},onOpenAfterResume:function(e){}},p={status:200,reasonPhrase:"OK",responseBody:"",messages:[],headers:[],state:"messageReceived",transport:"polling",error:null,request:null,partialMessage:"",errorHandled:!1,closedByClientTimeout:!1,ffTryingReconnect:!1},o=null,s=null,n=null,r=null,c=null,i=!0,h=0,f=0,m="X",E=!1,_=null,g=null,T=ee.util.now();function t(){E=!(i=!0),h=0,r=n=s=o=null}function b(e){return"debug"==e?"debug"===d.logLevel:"info"==e?"info"===d.logLevel||"debug"===d.logLevel:"warn"==e?"warn"===d.logLevel||"info"===d.logLevel||"debug"===d.logLevel:"error"==e&&("error"===d.logLevel||"warn"===d.logLevel||"info"===d.logLevel||"debug"===d.logLevel)}function y(e){b("debug")&&ee.util.debug(new Date+" Atmosphere: "+e)}function S(e,t){return""===p.partialMessage&&"streaming"===t.transport&&e.responseText.length>t.maxStreamingLength}function v(){if(d.enableProtocol&&!d.disableDisconnect&&!d.firstMessage){var r="X-Atmosphere-Transport=close&X-Atmosphere-tracking-id="+d.uuid;ee.util.each(d.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,d,d,p):t;null!=n&&(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(n))});var e=d.url.replace(/([?&])_=[^&]*/,r);e+=e===d.url?(/\?/.test(d.url)?"&":"?")+r:"";var t=new ee.AtmosphereRequest({connected:!1});t.connectTimeout=d.connectTimeout,t.attachHeadersAsQueryString=!1,t.dropHeaders=!0,t.url=e,t.contentType="text/plain",t.transport="polling",t.method="GET",t.data="",t.heartbeat=null,d.enableXDR&&(t.enableXDR=d.enableXDR),t.async=d.closeAsync,function(e,t){t||(t=K(e));t.transport="polling",t.method="GET",t.withCredentials=!1,t.reconnect=!1,t.force=!0,t.suspend=!1,t.timeout=1e3,k(t)}("",t)}}function O(){y("Closing (AtmosphereRequest._close() called)"),E=!0,d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),d.reconnect=!1,p.request=d,p.state="unsubscribe",p.responseBody="",p.status=408,p.partialMessage="",$(),v(),w()}function w(){p.partialMessage="",d.id&&clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId),null!=r&&(r.close(),r=null),null!=c&&(c.abort(),c=null),null!=n&&(n.abort(),n=null),null!=o&&(o.canSendMessage&&(y("invoking .close() on WebSocket object"),o.close()),o=null),null!=s&&(s.close(),s=null),function(){null!=a&&(clearInterval(l),document.cookie=u+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",a.signal("close",{reason:"",heir:E?(a.get("children")||[])[0]:T}),a.close());null!=g&&g.close()}()}function I(e){w(),t(),(d=ee.util.extend(d,e)).mrequest=d.reconnect,d.reconnect||(d.reconnect=!0)}function N(){if(d.shared){if(null!=(g=function(o){var t,n,r,s="atmosphere-"+o.url,e={storage:function(){function t(e){e.key===s&&e.newValue&&u(e.newValue)}if(ee.util.storage){var n=window.localStorage,r=function(e){var t=n.getItem(s+"-"+e);return null===t?[]:ee.util.parseJSON(t)},i=function(e,t){n.setItem(s+"-"+e,ee.util.stringifyJSON(t))};return{init:function(){return i("children",r("children").concat([T])),ee.util.on(window,"storage",t),r("opened")},signal:function(e,t){n.setItem(s,ee.util.stringifyJSON({target:"p",type:e,data:t}))},close:function(){var e=r("children");ee.util.off(window,"storage",t),e&&a(e,o.id)&&i("children",e)}}}},windowref:function(){var n=window.open("",s.replace(/\W/g,""));if(n&&!n.closed&&n.callbacks)return{init:function(){return n.callbacks.push(u),n.children.push(T),n.opened},signal:function(e,t){!n.closed&&n.fire&&n.fire(ee.util.stringifyJSON({target:"p",type:e,data:t}))},close:function(){r||(a(n.callbacks,u),a(n.children,T))}}}};function a(e,t){var n,r=e.length;for(n=0;n<r;n++)e[n]===t&&e.splice(n,1);return r!==e.length}function u(e){var t=ee.util.parseJSON(e),n=t.data;if("c"===t.target)switch(t.type){case"open":A("opening","local",d);break;case"close":r||(r=!0,"aborted"===n.reason?O():n.heir===T?N():setTimeout(function(){N()},100));break;case"message":X(n,"messageReceived",200,o.transport);break;case"localMessage":Q(n)}}function i(){var e=new RegExp("(?:^|; )("+encodeURIComponent(s)+")=([^;]*)").exec(document.cookie);if(e)return ee.util.parseJSON(decodeURIComponent(e[2]))}if(!(t=i())||1e3<ee.util.now()-t.ts)return;if(!(n=e.storage()||e.windowref()))return;return{open:function(){var e;return l=setInterval(function(){var e=t;(t=i())&&e.ts!==t.ts||u(ee.util.stringifyJSON({target:"c",type:"close",data:{reason:"error",heir:e.heir}}))},1e3),(e=n.init())&&setTimeout(function(){A("opening","local",o)},50),e},send:function(e){n.signal("send",e)},localSend:function(e){n.signal("localSend",ee.util.stringifyJSON({id:T,event:e}))},close:function(){E||(clearInterval(l),n.signal("close"),n.close())}}}(d))&&(b("debug")&&ee.util.debug("Storage service available. All communication will be local"),g.open(d)))return;b("debug")&&ee.util.debug("No Storage service available."),g=null}var e,r,i;d.firstMessage=0==re,d.isOpen=!1,d.ctime=ee.util.now(),0===d.uuid&&(d.uuid=re),p.closedByClientTimeout=!1,"websocket"!==d.transport&&"sse"!==d.transport?k(d):"websocket"===d.transport?null!=d.webSocketImpl||window.WebSocket||window.MozWebSocket?function n(s){p.transport="websocket";var e=(d.url,B(d,ee.util.getAbsoluteURL(d.webSocketUrl||d.url)).replace(/^http/,"ws"));b("debug")&&ee.util.debug("Invoking executeWebSocket, using URL: "+e);if(s&&!d.reconnect)return void(null!=o&&w());o=function(e){{return null!=d.webSocketImpl?d.webSocketImpl:window.WebSocket?new WebSocket(e):new MozWebSocket(e)}}(e);null!=d.webSocketBinaryType&&(o.binaryType=d.webSocketBinaryType);0<d.connectTimeout&&(d.id=setTimeout(function(){if(s);else{o.onclose({code:1002,reason:"",wasClean:!1});try{w()}catch(e){}}},d.connectTimeout));o.onopen=function(e){y("websocket.onopen"),M(d),te=!1,b("debug")&&ee.util.debug("Websocket successfully opened");var t=s;null!=o&&(o.canSendMessage=!0),d.enableProtocol||(s=!0,A(t?"re-opening":"opening","websocket",d)),null!=o&&"POST"===d.method&&(p.state="messageReceived",o.send(d.data))};o.onmessage=function(e){y("websocket.onmessage"),M(d),d.enableProtocol&&(s=!0),p.state="messageReceived",p.status=200;var t,n,r,i="string"==typeof(e=e.data);if(i){var o=L(e,d,p);o||($(),p.responseBody="",p.messages=[])}else d.firstMessage?function(n,e,r){if(e instanceof Blob){var i=n.firstMessage;n.firstMessage=!1;var t=new FileReader;t.addEventListener("loadend",function(e){if(r){var t=C(n,e.target.result);i||r(t)}}),t.readAsText(e)}else r&&r(C(n,e))}(d,e,function(e){""!==e&&(p.responseBody=e,$(),p.responseBody=null)}):(t=e,n=function(e){p.responseBody=e,$(),p.responseBody=null},(r=new FileReader).addEventListener("loadend",function(e){n&&n(e.target.result)}),r.readAsArrayBuffer(t))};o.onerror=function(e){y("websocket.onerror"),clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),
33
33
  // Patched by QuoteMedia
34
- D(460,"Websocket error")};o.onclose=function(e){if(y("websocket.onclose"),clearTimeout(d.id),"closed"!==p.state){var t=e.reason;if(""===t)switch(e.code){case 1e3:t="Normal closure; the connection successfully completed whatever purpose for which it was created.";break;case 1001:t="The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.";break;case 1002:t="The endpoint is terminating the connection due to a protocol error.";break;case 1003:t="The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).";break;case 1004:t="The endpoint is terminating the connection because a data frame was received that is too large.";break;case 1005:t="Unknown: no status code was provided even though one was expected.";break;case 1006:t="Connection was closed abnormally (that is, with no close frame being sent)."}b("warn")&&ee.util.warn("Websocket closed, reason: "+t+" - wasClean: "+e.wasClean),p.closedByClientTimeout||d.handleOnlineOffline&&te?d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId):(Z(s,e),p.state="closed",E?ee.util.log(d.logLevel,["Websocket closed normally"]):s?d.reconnect&&"websocket"===p.transport&&(w(),h++<d.maxReconnectOnClose?(A("re-connecting",d.transport,d),0<d.reconnectInterval?d.reconnectId=setTimeout(function(){p.responseBody="",p.messages=[],n(!0)},d.reconnectInterval):(p.responseBody="",p.messages=[],n(!0))):(ee.util.log(d.logLevel,["Websocket reconnect maximum try reached "+h]),b("warn")&&ee.util.warn("Websocket error, reason: "+e.reason),D(0,"maxReconnectOnClose reached"))):R("Websocket failed on first connection attempt. Downgrading to "+d.fallbackTransport+" and resending"))}};var t=navigator.userAgent.toLowerCase();var r=-1<t.indexOf("android");r&&o.url===undefined&&o.onclose({reason:"Android 4.1 does not support websockets.",wasClean:!1})}(!1):R("Websocket is not supported, using request.fallbackTransport ("+d.fallbackTransport+")"):"sse"===d.transport&&(e=ee.util.getAbsoluteURL(d.url.toLowerCase()),r=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/.exec(e),i=!(!r||r[1]==window.location.protocol&&r[2]==window.location.hostname&&(r[3]||("http:"===r[1]?80:443))==(window.location.port||("http:"===window.location.protocol?80:443))),!window.EventSource||i&&ee.util.browser.safari&&!(7<=ee.util.browser.vmajor)?R("Server Side Events(SSE) is not supported, using request.fallbackTransport ("+d.fallbackTransport+")"):function t(n){p.transport="sse";var e=B(d);b("debug")&&(ee.util.debug("Invoking executeSSE"),ee.util.debug("Using URL: "+e));if(n&&!d.reconnect)return void(null!=s&&w());try{s=new EventSource(e,{withCredentials:d.withCredentials})}catch(r){return D(0,r),void R("SSE failed. Downgrading to fallback transport and resending")}0<d.connectTimeout&&(d.id=setTimeout(function(){n||w()},d.connectTimeout));s.onopen=function(e){y("sse.onopen"),M(d),b("debug")&&ee.util.debug("SSE successfully opened"),d.enableProtocol?d.isReopen&&(d.isReopen=!1,A("re-opening",d.transport,d)):A(n?"re-opening":"opening","sse",d),n=!0,"POST"===d.method&&(p.state="messageReceived",s.send(d.data))};s.onmessage=function(e){if(y("sse.onmessage"),M(d),!d.enableXDR&&window.location.host&&e.origin&&e.origin!==window.location.protocol+"//"+window.location.host)ee.util.log(d.logLevel,["Origin was not "+window.location.protocol+"//"+window.location.host]);else{p.state="messageReceived",p.status=200;var t=L(e=e.data,d,p);t||($(),p.responseBody="",p.messages=[])}};s.onerror=function(e){y("sse.onerror"),clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),p.closedByClientTimeout||(Z(n),w(),E?ee.util.log(d.logLevel,["SSE closed normally"]):n?d.reconnect&&"sse"===p.transport&&(h++<d.maxReconnectOnClose?(A("re-connecting",d.transport,d),0<d.reconnectInterval?d.reconnectId=setTimeout(function(){t(!0)},d.reconnectInterval):t(!0),p.responseBody="",p.messages=[]):(ee.util.log(d.logLevel,["SSE reconnect maximum try reached "+h]),D(0,"maxReconnectOnClose reached"))):R("SSE failed. Downgrading to fallback transport and resending"))}}(!1))}function A(e,t,n){if(d.shared&&"local"!==t&&function(){var t,r="atmosphere-"+d.url,e=function(){var n,e=r.replace(/\W/g,""),t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.display="none",t.innerHTML='<iframe name="'+e+'" />',document.body.appendChild(t)),n=t.firstChild.contentWindow,{init:function(){n.callbacks=[i],n.fire=function(e){var t;for(t=0;t<n.callbacks.length;t++)n.callbacks[t](e)}},signal:function(e,t){!n.closed&&n.fire&&n.fire(ee.util.stringifyJSON({target:"c",type:e,data:t}))},get:function(e){return n.closed?null:n[e]},set:function(e,t){n.closed||(n[e]=t)},close:function(){}}};function i(e){var t=ee.util.parseJSON(e),n=t.data;if("p"===t.target)switch(t.type){case"send":q(n);break;case"localSend":K(n);break;case"close":O()}}function n(){document.cookie=u+"="+encodeURIComponent(ee.util.stringifyJSON({ts:ee.util.now()+1,heir:(t.get("children")||[])[0]}))+"; path=/"}_=function(e){t.signal("message",e)},(t=function(){function e(e){e.key===r&&e.newValue&&i(e.newValue)}if(ee.util.storage){var n=window.localStorage;return{init:function(){ee.util.on(window,"storage",e)},signal:function(e,t){n.setItem(r,ee.util.stringifyJSON({target:"c",type:e,data:t}))},get:function(e){return ee.util.parseJSON(n.getItem(r+"-"+e))},set:function(e,t){n.setItem(r+"-"+e,ee.util.stringifyJSON(t))},close:function(){ee.util.off(window,"storage",e),n.removeItem(r),n.removeItem(r+"-opened"),n.removeItem(r+"-children")}}}}()||e()).init(),b("debug")&&ee.util.debug("Installed StorageService "+t),t.set("children",[]),null==t.get("opened")||t.get("opened")||t.set("opened",!1),u=encodeURIComponent(r),n(),l=setInterval(n,1e3),a=t}(),null!=a&&a.set("opened",!0),n.close=function(){O()},0<h&&"re-connecting"===e)n.isReopen=!0,(s=p).state="re-connecting",z(s);else if(null==p.error){p.request=n;var r=p.state;p.state=e;var i=p.transport;p.transport=t;var o=p.responseBody;$(),p.responseBody=o,p.state=r,p.transport=i}var s}function F(i){i.transport="jsonp";var o,s=d;null!=i&&void 0!==i&&(s=i),(c={open:function(){var r="atmosphere"+ ++T;function e(){var e=s.url;null!=s.dispatchUrl&&(e+=s.dispatchUrl);var t=s.data;s.attachHeadersAsQueryString&&(e=B(s),""!==t&&(e+="&X-Atmosphere-Post-Body="+encodeURIComponent(t)),t="");var n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;(o=document.createElement("script")).src=e+"&jsonpTransport="+r,o.clean=function(){o.clean=o.onerror=o.onload=o.onreadystatechange=null,o.parentNode&&o.parentNode.removeChild(o),2==++i.scriptCount&&(i.scriptCount=1,s.lastIndex=0,s.openId&&clearTimeout(s.openId),s.heartbeatTimer&&clearTimeout(s.heartbeatTimer),s.reconnect&&h++<s.maxReconnectOnClose?(A("re-connecting",s.transport,s),H(c,s,i.reconnectInterval),s.openId=setTimeout(function(){U(s)},s.reconnectInterval+1e3)):D(0,"maxReconnectOnClose reached"))},o.onload=o.onreadystatechange=function(){y("jsonp.onload"),o.readyState&&!/loaded|complete/.test(o.readyState)||o.clean()},o.onerror=function(){y("jsonp.onerror"),i.scriptCount=1,o.clean()},n.insertBefore(o,n.firstChild)}window[r]=function(e){if(y("jsonp.window"),i.scriptCount=0,s.reconnect&&-1===s.maxRequest||s.requestCount++<s.maxRequest){if(s.executeCallbackBeforeReconnect||H(c,s,s.pollingInterval),null!=e&&"string"!=typeof e)try{e=e.message}catch(t){}L(e,s,p)||X(p.responseBody,"messageReceived",200,s.transport),s.executeCallbackBeforeReconnect&&H(c,s,s.pollingInterval),M(s)}else ee.util.log(d.logLevel,["JSONP reconnect maximum try reached "+d.requestCount]),D(0,"maxRequest reached")},setTimeout(function(){e()},50)},abort:function(){o&&o.clean&&o.clean()}}).open()}function C(e,t){var n=t;if("polling"===e.transport)return n;if(e.enableProtocol&&e.firstMessage&&0!==ee.util.trim(t).length){var r=e.trackMessageLength?1:0,i=t.split(e.messageDelimiter);if(i.length<=r+1)return n;if(e.firstMessage=!1,e.uuid=ee.util.trim(i[r]),i.length<=r+2&&ee.util.log("error",["Protocol data not sent by the server. If you enable protocol on client side be sure to install JavascriptProtocol interceptor on server side.Also note that atmosphere-runtime 2.2+ should be used."]),f=parseInt(ee.util.trim(i[r+1]),10),m=i[r+2],"long-polling"!==e.transport&&U(e),re=e.uuid,n="",r=e.trackMessageLength?4:3,i.length>r)for(var o=r;o<i.length;o++)n+=i[o],o+1!==i.length&&(n+=e.messageDelimiter);0!==e.ackInterval&&setTimeout(function(){q("...ACK...")},e.ackInterval)}else e.enableProtocol&&e.firstMessage&&ee.util.browser.msie&&+ee.util.browser.version.split(".")[0]<10?ee.util.log(d.logLevel,["Receiving unexpected data from IE"]):U(e);return n}function M(e){clearTimeout(e.id),0<e.timeout&&"polling"!==e.transport&&(e.id=setTimeout(function(){p.closedByClientTimeout=!0,p.state="closedByClient",p.responseBody="",p.status=408,p.messages=[],$(),v(),w()},e.timeout))}function D(e,t){w(),clearTimeout(d.id),p.state="error",p.reasonPhrase=t,p.responseBody="",p.status=e,p.messages=[],$()}function L(e,t,n){if(e instanceof Blob)return!1;if(0===(e=C(t,e)).length)return!0;if(n.responseBody=e,t.trackMessageLength){var r=[],i=(e=n.partialMessage+e).indexOf(t.messageDelimiter);if(-1!=i){for(;-1!==i;){var o=e.substring(0,i),s=+o;if(isNaN(s))throw n.partialMessage="",new Error('message length "'+o+'" is not a number');(i+=t.messageDelimiter.length)+s>e.length?i=-1:(r.push(e.substring(i,i+s)),i=(e=e.substring(i+s,e.length)).indexOf(t.messageDelimiter))}return n.partialMessage=e,0!==r.length?(n.responseBody=r.join(t.messageDelimiter),n.messages=r,!1):(n.responseBody="",n.messages=[],!0)}}return n.responseBody=e,!(n.messages=[e])}function R(e){ee.util.log(d.logLevel,[e]),"undefined"!=typeof d.onTransportFailure?d.onTransportFailure(e,d):"undefined"!=typeof ee.util.onTransportFailure&&ee.util.onTransportFailure(e,d),d.transport=d.fallbackTransport;var t=-1===d.connectTimeout?0:d.connectTimeout;d.reconnect&&"none"!==d.transport||null==d.transport?(d.method=d.fallbackMethod,p.transport=d.fallbackTransport,d.fallbackTransport="none",0<t?d.reconnectId=setTimeout(function(){N()},t):N()):D(500,"Unable to reconnect with fallback transport")}function B(r,i){var o=d;return null!=r&&void 0!==r&&(o=r),null==i&&(i=o.url),o.attachHeadersAsQueryString&&(-1!==i.indexOf("X-Atmosphere-Framework")||(i+=-1!==i.indexOf("?")?"&":"?",i+="X-Atmosphere-tracking-id="+o.uuid,i+="&X-Atmosphere-Framework="+ee.version,i+="&X-Atmosphere-Transport="+o.transport,o.trackMessageLength&&(i+="&X-Atmosphere-TrackMessageSize=true"),null!==o.heartbeat&&null!==o.heartbeat.server&&(i+="&X-Heartbeat-Server="+o.heartbeat.server),""!==o.contentType&&(i+="&Content-Type="+("websocket"===o.transport?o.contentType:encodeURIComponent(o.contentType))),o.enableProtocol&&(i+="&X-atmo-protocol=true"),ee.util.each(o.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,o,r,p):t;null!=n&&(i+="&"+encodeURIComponent(e)+"="+encodeURIComponent(n))}))),i}function U(e){if(e.isOpen)if(e.isReopen)e.isReopen=!1,A("re-opening",e.transport,e);else{if("messageReceived"!==p.state||"jsonp"!==e.transport&&"long-polling"!==e.transport)return;(t=p).state="openAfterResume",z(t),t.state="messageReceived"}else e.isOpen=!0,A("opening",e.transport,e);var t;!function(t){null!=t.heartbeatTimer&&clearTimeout(t.heartbeatTimer);if(!isNaN(f)&&0<f){t.heartbeatTimer=setTimeout(function e(){b("debug")&&ee.util.debug("Sending heartbeat");q(m),t.heartbeatTimer=setTimeout(e,f)},f)}}(e)}function k(u){var l=d;if(null==u&&void 0===u||(l=u),l.lastIndex=0,l.readyState=0,"jsonp"===l.transport||l.enableXDR&&ee.util.checkCORSSupport())F(l);else{if(ee.util.browser.msie&&+ee.util.browser.version.split(".")[0]<10){if("streaming"===l.transport)return void(l.enableXDR&&window.XDomainRequest?G(l):j(l));if(l.enableXDR&&window.XDomainRequest)return void G(l)}var t=function(e){if(l.lastIndex=0,h++,e||l.reconnect&&h<=l.maxReconnectOnClose){var t=e?0:u.reconnectInterval;p.ffTryingReconnect=!0,A("re-connecting",u.transport,u),H(f,l,t)}else D(0,"maxReconnectOnClose reached")},c=function(e){ee._beforeUnloadState?(ee.util.debug(new Date+" Atmosphere: reconnectF: execution delayed due to _beforeUnloadState flag"),setTimeout(function(){t(e)},5e3)):t(e)};if(l.force||l.reconnect&&(-1===l.maxRequest||l.requestCount++<l.maxRequest)){l.force=!1;var f=ee.util.xhr();f.hasData=!1,function(r,i,o){var e=i.url;null!=i.dispatchUrl&&"POST"===i.method&&(e+=i.dispatchUrl);e=B(i,e),e=ee.util.prepareURL(e),o&&(r.open(i.method,e,i.async),0<i.connectTimeout&&(i.id=setTimeout(function(){0===i.requestCount&&(w(),X("Connect timeout","closed",200,i.transport))},i.connectTimeout)));d.withCredentials&&"websocket"!==d.transport&&"withCredentials"in r&&(r.withCredentials=!0);d.dropHeaders||(r.setRequestHeader("X-Atmosphere-Framework",ee.version),r.setRequestHeader("X-Atmosphere-Transport",i.transport),null!==i.heartbeat&&null!==i.heartbeat.server&&r.setRequestHeader("X-Heartbeat-Server",r.heartbeat.server),i.trackMessageLength&&r.setRequestHeader("X-Atmosphere-TrackMessageSize","true"),r.setRequestHeader("X-Atmosphere-tracking-id",i.uuid),ee.util.each(i.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,r,i,o,p):t;null!=n&&r.setRequestHeader(e,n)}));""!==i.contentType&&r.setRequestHeader("Content-Type",i.contentType)}(f,l,!0),l.suspend&&(n=f),"polling"!==l.transport&&(p.transport=l.transport,f.onabort=function(){y("ajaxrequest.onabort"),Z(!0)},f.onerror=function(){y("ajaxrequest.onerror"),p.error=!0,p.ffTryingReconnect=!0;try{p.status=XMLHttpRequest.status}catch(e){p.status=500}p.status||(p.status=500),p.errorHandled||(w(),c(!1))}),f.onreadystatechange=function(){if(y("ajaxRequest.onreadystatechange, new state: "+f.readyState),E)y("onreadystatechange has been ignored due to _abortingConnection flag");else{p.error=null;var n=!1,e=!1;if("streaming"===l.transport&&2<l.readyState&&4===f.readyState)return w(),void c(!1);if(l.readyState=f.readyState,"streaming"===l.transport&&3<=f.readyState?e=!0:"long-polling"===l.transport&&4===f.readyState&&(e=!0),M(d),"polling"!==l.transport){var t=200;if(4===f.readyState&&(t=1e3<f.status?0:f.status),!l.reconnectOnServerError&&300<=t&&t<600)return void D(t,f.statusText);if(300<=t||0===t)return p.errorHandled=!0,w(),void c(!1);l.enableProtocol&&u.firstMessage||2!==f.readyState||(ee.util.browser.mozilla&&p.ffTryingReconnect?(p.ffTryingReconnect=!1,setTimeout(function(){p.ffTryingReconnect||U(l)},500)):U(l))}else 4===f.readyState&&(e=!0);if(e){var r=f.responseText;if(p.errorHandled=!1,"long-polling"===l.transport&&0===ee.util.trim(r).length)return void(f.hasData?f.hasData=!1:c(!0));if(f.hasData=!0,W(f,d),"streaming"===l.transport)if(ee.util.browser.opera)ee.util.iterate(function(){if(500!==p.status&&f.responseText.length>l.lastIndex){try{p.status=f.status,p.headers=ee.util.parseHeaders(f.getAllResponseHeaders()),W(f,d)}catch(t){p.status=404}M(d),p.state="messageReceived";var e=f.responseText.substring(l.lastIndex);if(l.lastIndex=f.responseText.length,(n=L(e,l,p))||$(),S(f,l))return void P(f,l)}else if(400<p.status)return l.lastIndex=f.responseText.length,!1},0);else{var i=r.substring(l.lastIndex,r.length);if(n=L(i,l,p),l.lastIndex=r.length,n)return}else n=L(r,l,p);var o=S(f,l);try{p.status=f.status,p.headers=ee.util.parseHeaders(f.getAllResponseHeaders()),W(f,l)}catch(a){p.status=404}l.suspend?p.state=0===p.status?"closed":"messageReceived":p.state="messagePublished";var s=!o&&"streaming"!==u.transport&&"polling"!==u.transport;s&&!l.executeCallbackBeforeReconnect&&H(f,l,l.pollingInterval),0===p.responseBody.length||n||$(),s&&l.executeCallbackBeforeReconnect&&H(f,l,l.pollingInterval),o&&P(f,l)}}};try{"streaming"===l.transport&&l.headers["X-Atmosphere-Binary"]&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(l.data),i=!0}catch(e){ee.util.log(l.logLevel,["Unable to connect to "+l.url]),D(0,e)}}else"debug"===l.logLevel&&ee.util.log(l.logLevel,["Max re-connection reached."]),D(0,"maxRequest reached")}}function P(e,t){p.messages=[],t.isReopen=!0,O(),E=!1,H(e,t,500)}function H(e,t,n){if(!p.closedByClientTimeout&&(t.reconnect||t.suspend&&i)){var r=0;e&&1<e.readyState&&(r=1e3<e.status?0:e.status),p.status=0===r?204:r,p.reason=0===r?"Server resumed the connection or down.":"OK",clearTimeout(t.id),t.reconnectId&&(clearTimeout(t.reconnectId),delete t.reconnectId),0<n?d.reconnectId=setTimeout(function(){k(t)},n):k(t)}}function G(e){"polling"!==e.transport?(r=x(e)).open():x(e).open()}function x(e){var r=d;null!=e&&void 0!==e&&(r=e);var i=r.transport,o=0,t=new window.XDomainRequest,s=function(){"long-polling"===r.transport&&r.reconnect&&(-1===r.maxRequest||r.requestCount++<r.maxRequest)&&(t.status=200,G(r))},n=r.rewriteURL||function(e){var t=/(?:^|;\s*)(JSESSIONID|PHPSESSID)=([^;]*)/.exec(document.cookie);switch(t&&t[1]){case"JSESSIONID":return e.replace(/;jsessionid=[^\?]*|(\?)|$/,";jsessionid="+t[2]+"$1");case"PHPSESSID":return e.replace(/\?PHPSESSID=[^&]*&?|\?|$/,"?PHPSESSID="+t[2]+"&").replace(/&$/,"")}return e};t.onprogress=function(){a(t)},t.onerror=function(){"polling"!==r.transport&&(w(),h++<r.maxReconnectOnClose?0<r.reconnectInterval?r.reconnectId=setTimeout(function(){A("re-connecting",e.transport,e),G(r)},r.reconnectInterval):(A("re-connecting",e.transport,e),G(r)):D(0,"maxReconnectOnClose reached"))},t.onload=function(){};var a=function(e){clearTimeout(r.id);var t=e.responseText;if(t=t.substring(o),o+=t.length,"polling"!==i){M(r);var n=L(t,r,p);if("long-polling"===i&&0===ee.util.trim(t).length)return;r.executeCallbackBeforeReconnect&&s(),n||X(p.responseBody,"messageReceived",200,i),r.executeCallbackBeforeReconnect||s()}};return{open:function(){var e=r.url;null!=r.dispatchUrl&&(e+=r.dispatchUrl),e=B(r,e),t.open(r.method,n(e)),"GET"===r.method?t.send():t.send(r.data),0<r.connectTimeout&&(r.id=setTimeout(function(){0===r.requestCount&&(w(),X("Connect timeout","closed",200,r.transport))},r.connectTimeout))},close:function(){t.abort()}}}function j(e){(r=function(e){var o,s=d;null!=e&&void 0!==e&&(s=e);var a=new window.ActiveXObject("htmlfile");a.open(),a.close();var t=s.url;null!=s.dispatchUrl&&(t+=s.dispatchUrl);"polling"!==s.transport&&(p.transport=s.transport);return{open:function(){var e=a.createElement("iframe");t=B(s),""!==s.data&&(t+="&X-Atmosphere-Post-Body="+encodeURIComponent(s.data)),t=ee.util.prepareURL(t),e.src=t,a.body.appendChild(e);var i=e.contentDocument||e.contentWindow.document;o=ee.util.iterate(function(){try{if(!i.firstChild)return;var n=i.body?i.body.lastChild:i;n.omgThisIsBroken;if(!i.body||!i.body.firstChild||"pre"!==i.body.firstChild.nodeName.toLowerCase()){var e=i.head||i.getElementsByTagName("head")[0]||i.documentElement||i,t=i.createElement("script");t.text="document.write('<plaintext>')",e.insertBefore(t,e.firstChild),e.removeChild(t),n=i.body.lastChild}return s.closed&&(s.isReopen=!0),o=ee.util.iterate(function(){var e=function(){var e=n.cloneNode(!0);e.appendChild(i.createTextNode("."));var t=e.innerText;return t=t.substring(0,t.length-1)}();if(e.length>s.lastIndex){M(d),p.status=200,p.error=null,n.innerText="";var t=L(e,s,p);if(t)return"";X(p.responseBody,"messageReceived",200,s.transport)}if(s.lastIndex=0,"complete"===i.readyState)return Z(!0),A("re-connecting",s.transport,s),0<s.reconnectInterval?s.reconnectId=setTimeout(function(){j(s)},s.reconnectInterval):j(s),!1},null),!1}catch(r){return p.error=!0,A("re-connecting",s.transport,s),h++<s.maxReconnectOnClose?0<s.reconnectInterval?s.reconnectId=setTimeout(function(){j(s)},s.reconnectInterval):j(s):D(0,"maxReconnectOnClose reached"),a.execCommand("Stop"),a.close(),!1}})},close:function(){o&&o(),a.execCommand("Stop"),Z(!0)}}}(e)).open()}function q(e){var t;null!=g?(t=e,g.send(t)):null!=n||null!=s?V(e):null!=r?function(e){if(d.enableXDR&&ee.util.checkCORSSupport()){var t=Q(e);t.reconnect=!1,F(t)}else V(e)}(e):null!=c?V(e):null!=o?function(e){var t,n=ee.util.isBinary(e)?e:Y(e);try{if(t=null!=d.dispatchUrl?d.webSocketPathDelimiter+d.dispatchUrl+d.webSocketPathDelimiter+n:n,!o.canSendMessage)return ee.util.error("WebSocket not connected.");o.send(t)}catch(r){o.onclose=function(e){},w(),R("Websocket failed. Downgrading to "+d.fallbackTransport+" and resending "+e),V(e)}}(e):(D(0,"No suspended connection available"),ee.util.error("No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before trying to push data"))}function V(e){k(Q(e))}function Y(e){var t=e;return"object"===(void 0===t?"undefined":ie(t))&&(t=e.data),t}function Q(e){var t=Y(e),n={connected:!1,timeout:6e4,method:"POST",url:d.url,contentType:d.contentType,headers:d.headers,reconnect:!0,callback:null,data:t,suspend:!1,maxRequest:-1,logLevel:"info",requestCount:0,withCredentials:d.withCredentials,async:d.async,transport:"polling",isOpen:!0,attachHeadersAsQueryString:!0,enableXDR:d.enableXDR,uuid:d.uuid,dispatchUrl:d.dispatchUrl,enableProtocol:!1,messageDelimiter:"|",trackMessageLength:d.trackMessageLength,maxReconnectOnClose:d.maxReconnectOnClose,heartbeatTimer:d.heartbeatTimer,heartbeat:d.heartbeat};return"object"===(void 0===e?"undefined":ie(e))&&(n=ee.util.extend(n,e)),n}function K(e){var t=ee.util.parseJSON(e);t.id!==T&&("undefined"!=typeof d.onLocalMessage?d.onLocalMessage(t.event):"undefined"!=typeof ee.util.onLocalMessage&&ee.util.onLocalMessage(t.event))}function X(e,t,n,r){p.responseBody=e,p.transport=r,p.status=n,p.state=t,$()}function W(e,t){if(t.readResponsesHeaders)try{var n=e.getResponseHeader("X-Atmosphere-tracking-id");n&&null!=n&&(t.uuid=n.split(" ").pop())}catch(r){}else t.enableProtocol||(t.uuid=T)}function z(e){J(e,d),J(e,ee.util)}function J(e,t){switch(e.state){case"messageReceived":y("Firing onMessage"),h=0,"undefined"!=typeof t.onMessage&&t.onMessage(e),"undefined"!=typeof t.onmessage&&t.onmessage(e);break;case"error":y("Firing onError, reasonPhrase: "+("undefined"!=typeof e.reasonPhrase?e.reasonPhrase:"n/a")),"undefined"!=typeof t.onError&&t.onError(e),"undefined"!=typeof t.onerror&&t.onerror(e);break;case"opening":delete d.closed,y("Firing onOpen"),"undefined"!=typeof t.onOpen&&t.onOpen(e),"undefined"!=typeof t.onopen&&t.onopen(e);break;case"messagePublished":y("Firing messagePublished"),"undefined"!=typeof t.onMessagePublished&&t.onMessagePublished(e);break;case"re-connecting":y("Firing onReconnect"),"undefined"!=typeof t.onReconnect&&t.onReconnect(d,e);break;case"closedByClient":y("Firing closedByClient"),"undefined"!=typeof t.onClientTimeout&&t.onClientTimeout(d);break;case"re-opening":delete d.closed,y("Firing onReopen"),"undefined"!=typeof t.onReopen&&t.onReopen(d,e);break;case"fail-to-reconnect":y("Firing onFailureToReconnect"),"undefined"!=typeof t.onFailureToReconnect&&t.onFailureToReconnect(d,e);break;case"unsubscribe":case"closed":"undefined"!=typeof d.closed&&d.closed?y("Request already closed, not firing onClose ("+e.state+" case)"):(y("Firing onClose ("+e.state+" case)"),"undefined"!=typeof t.onClose&&t.onClose(e),"undefined"!=typeof t.onclose&&t.onclose(e)),d.closed=!0;break;case"openAfterResume":"undefined"!=typeof t.onOpenAfterResume&&t.onOpenAfterResume(d)}}function Z(e,t){"closed"!==p.state&&(p.state="closed",p.responseBody="",p.messages=[],p.atmoMessage=t,p.status=e?200:501,$())}function $(){var e=function(e,t){t(p)};null==g&&null!=_&&_(p.responseBody),d.reconnect=d.mrequest;for(var t="string"==typeof p.responseBody,n=t&&d.trackMessageLength?0<p.messages.length?p.messages:[""]:new Array(p.responseBody),r=0;r<n.length;r++)if(!(1<n.length&&0===n[r].length||(p.responseBody=!t||"streaming"===d.transport&&d.headers["X-Atmosphere-Binary"]&&!d.firstMessage?n[r]:ee.util.trim(n[r]),null==g&&null!=_&&_(p.responseBody),(0===p.responseBody.length||t&&m===p.responseBody)&&"messageReceived"===p.state))){if(z(p),0<ne.length){b("debug")&&ee.util.debug("Invoking "+ne.length+" global callbacks: "+p.state);try{ee.util.each(ne,e)}catch(i){ee.util.log(d.logLevel,["Callback exception"+i])}}if("function"==typeof d.callback){b("debug")&&ee.util.debug("Invoking request callbacks");try{d.callback(p)}catch(i){ee.util.log(d.logLevel,["Callback exception"+i])}}}}I(e),this.subscribe=function(e){I(e),N()},this.execute=function(){N()},this.close=function(){O()},this.disconnect=function(){v()},this.getUrl=function(){return d.url},this.push=function(e,t){if(null!=t){var n=d.dispatchUrl;d.dispatchUrl=t,q(e),d.dispatchUrl=n}else q(e)},this.getUUID=function(){return d.uuid},this.pushLocal=function(e){!function(e){if(0!==e.length)try{g?g.localSend(e):a&&a.signal("localMessage",ee.util.stringifyJSON({id:T,event:e}))}catch(t){ee.util.error(t)}}(e)},this.enableProtocol=function(e){return d.enableProtocol},this.init=function(){t()},this.request=d,this.response=p}}).subscribe=function(e,t,n){"function"==typeof t&&ee.addCallback(t),"string"!=typeof e?n=e:n.url=e,re=void 0!==n&&"undefined"!=typeof n.uuid?n.uuid:0;var r=new ee.AtmosphereRequest(n);return r.execute(),i[i.length]=r},ee.unsubscribe=function(){if(0<i.length)for(var e=[].concat(i),t=0;t<e.length;t++){var n=e[t];n.close(),clearTimeout(n.response.request.id),n.heartbeatTimer&&clearTimeout(n.heartbeatTimer)}i=[],ne=[]},ee.unsubscribeUrl=function(e){var t=-1;if(0<i.length)for(var n=0;n<i.length;n++){var r=i[n];if(r.getUrl()===e){r.close(),clearTimeout(r.response.request.id),r.heartbeatTimer&&clearTimeout(r.heartbeatTimer),t=n;break}}0<=t&&i.splice(t,1)},ee.addCallback=function(e){-1===ee.util.inArray(e,ne)&&ne.push(e)},ee.removeCallback=function(e){var t=ee.util.inArray(e,ne);-1!==t&&ne.splice(t,1)},ee.util={browser:{},parseHeaders:function(e){for(var t,n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,r={};t=n.exec(e);)r[t[1]]=t[2];return r},now:function(){return(new Date).getTime()},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},inArray:function(e,t){if(!Array.prototype.indexOf){for(var n=t.length,r=0;r<n;++r)if(t[r]===e)return r;return-1}return t.indexOf(e)},isBinary:function(e){return/^\[object\s(?:Blob|ArrayBuffer|.+Array)\]$/.test(Object.prototype.toString.call(e))},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},getAbsoluteURL:function(e){if("undefined"==typeof document.createElement)return e;var t=document.createElement("div");return t.innerHTML='<a href="'+e+'"/>',encodeURI(decodeURI(t.firstChild.href))},prepareURL:function(e){var t=ee.util.now(),n=e.replace(/([?&])_=[^&]*/,"$1_="+t);return n+(n===e?(/\?/.test(e)?"&":"?")+"_="+t:"")},trim:function(e){return String.prototype.trim?e.toString().trim():e.toString().replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,"").replace(/\s+/g," ")},param:function(e){var t,n=[];function r(e,t){t=ee.util.isFunction(t)?t():null==t?"":t,n.push(encodeURIComponent(e)+"="+encodeURIComponent(t))}function i(n,e){var t;if(ee.util.isArray(e))ee.util.each(e,function(e,t){/\[\]$/.test(n)?r(n,t):i(n+"["+("object"===(void 0===t?"undefined":ie(t))?e:"")+"]",t)});else if("[object Object]"===Object.prototype.toString.call(e))for(t in e)i(n+"["+t+"]",e[t]);else r(n,e)}for(t in e)i(t,e[t]);return n.join("&").replace(/%20/g,"+")},storage:function(){try{return!(!window.localStorage||!window.StorageEvent)}catch(e){return!1}},iterate:function(t,n){var r;return n=n||0,function e(){r=setTimeout(function(){!1!==t()&&e()},n)}(),function(){clearTimeout(r)}},each:function(e,t,n){if(e){var r=0,i=e.length,o=ee.util.isArray(e);if(n){if(o)for(;r<i&&!1!==t.apply(e[r],n);r++);else for(r in e)if(!1===t.apply(e[r],n))break}else if(o)for(;r<i&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e}},extend:function(e){var t,n,r;for(t=1;t<arguments.length;t++)if(null!=(n=arguments[t]))for(r in n)e[r]=n[r];return e},on:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},off:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},log:function(e,t){if(window.console){var n=window.console[e];"function"==typeof n&&n.apply(window.console,t)}},warn:function(){ee.util.log("warn",arguments)},info:function(){ee.util.log("info",arguments)},debug:function(){ee.util.log("debug",arguments)},error:function(){ee.util.log("error",arguments)},xhr:function(){try{return new window.XMLHttpRequest}catch(e){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}},parseJSON:function(e){return e?window.JSON&&window.JSON.parse?window.JSON.parse(e):new Function("return "+e)():null},stringifyJSON:function(t){var n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function l(e){return'"'+e.replace(n,function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"'}function c(e){return e<10?"0"+e:e}return window.JSON&&window.JSON.stringify?window.JSON.stringify(t):function e(t,n){var r,i,o,s,a=n[t],u=void 0===a?"undefined":ie(a);switch(a&&"object"===(void 0===a?"undefined":ie(a))&&"function"==typeof a.toJSON&&(u=void 0===(a=a.toJSON(t))?"undefined":ie(a)),u){case"string":return l(a);case"number":return isFinite(a)?String(a):"null";case"boolean":return String(a);case"object":if(!a)return"null";switch(Object.prototype.toString.call(a)){case"[object Date]":return isFinite(a.valueOf())?'"'+a.getUTCFullYear()+"-"+c(a.getUTCMonth()+1)+"-"+c(a.getUTCDate())+"T"+c(a.getUTCHours())+":"+c(a.getUTCMinutes())+":"+c(a.getUTCSeconds())+'Z"':"null";case"[object Array]":for(o=a.length,s=[],r=0;r<o;r++)s.push(e(r,a)||"null");return"["+s.join(",")+"]";default:for(r in s=[],a)f.call(a,r)&&(i=e(r,a))&&s.push(l(r)+":"+i);return"{"+s.join(",")+"}"}}}("",{"":t})},checkCORSSupport:function(){if(ee.util.browser.msie&&!window.XDomainRequest&&+ee.util.browser.version.split(".")[0]<11)return!0;if(ee.util.browser.opera&&+ee.util.browser.version.split(".")<12)return!0;if("KreaTVWebKit/531"===ee.util.trim(navigator.userAgent).slice(0,16))return!0;if("kreatel"===ee.util.trim(navigator.userAgent).slice(-7).toLowerCase())return!0;var e=navigator.userAgent.toLowerCase().match(/.+android ([0-9]{1,2})/i),t=parseInt(e&&e[0]||-1,10);return!isNaN(t)&&-1<t&&t<3}},ee.util.now(),e=navigator.userAgent.toLowerCase(),"safari"===(t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(e)||e.indexOf("android")<0&&/version\/(.+) (safari)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[])[2]&&(t[2]=t[1],t[1]="safari"),ee.util.browser[t[1]||""]=!0,ee.util.browser.version=t[2]||"0",ee.util.browser.vmajor=ee.util.browser.version.split(".")[0],ee.util.browser.trident&&(ee.util.browser.msie=!0),(ee.util.browser.msie||ee.util.browser.mozilla&&1==+ee.util.browser.version.split(".")[0])&&(ee.util.storage=!1),ee.callbacks={unload:function(){ee.util.debug(new Date+" Atmosphere: unload event"),ee.unsubscribe()},beforeUnload:function(){ee.util.debug(new Date+" Atmosphere: beforeunload event"),ee._beforeUnloadState=!0,setTimeout(function(){ee.util.debug(new Date+" Atmosphere: beforeunload event timeout reached. Reset _beforeUnloadState flag"),ee._beforeUnloadState=!1},5e3)},offline:function(){if(ee.util.debug(new Date+" Atmosphere: offline event"),te=!0,0<i.length)for(var e=[].concat(i),t=0;t<e.length;t++){var n=e[t];n.request.handleOnlineOffline&&(n.close(),clearTimeout(n.response.request.id),n.heartbeatTimer&&clearTimeout(n.heartbeatTimer))}},online:function(){if(ee.util.debug(new Date+" Atmosphere: online event"),0<i.length)for(var e=0;e<i.length;e++)i[e].request.handleOnlineOffline&&(i[e].init(),i[e].execute());te=!1}},ee.bindEvents=function(){ee.util.on(window,"unload",ee.callbacks.unload),ee.util.on(window,"beforeunload",ee.callbacks.beforeUnload),ee.util.on(window,"offline",ee.callbacks.offline),ee.util.on(window,"online",ee.callbacks.online)},ee.unbindEvents=function(){ee.util.off(window,"unload",ee.callbacks.unload),ee.util.off(window,"beforeunload",ee.callbacks.beforeUnload),ee.util.off(window,"offline",ee.callbacks.offline),ee.util.off(window,"online",ee.callbacks.online)},ee.bindEvents(),ee},void 0!==h?p.exports=d():f.atmosphere=d()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/atmosphere.js/lib/atmosphere.js","/lib/atmosphere.js/lib")},{_process:131,buffer:121,timers:152}],11:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0,T.asCredentials=function(e){var t=Object.keys(e);{if((0,f["default"])(t,["sid"]))return new h(e.sid);if((0,f["default"])(t,["wmid","token"]))return new E(e.wmid,e.token);if((0,f["default"])(t,["wmid"]))return new m(e.wmid);if((0,f["default"])(t,["data_token"]))return new _(e.data_token);throw new Error("Misconfigured credentials, should be one of {sid}, {wmid,token}, or {wmid}")}};d(g("./EnduserAuthService.js"));var f=d(g("array-equal"));function d(e){return e&&e.__esModule?e:{"default":e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=function(){function t(e){p(this,t),this.sid=e}return t.prototype.getHeaders=function(){return{"X-Stream-Sid":this.sid}},t}(),m=function(){function t(e){p(this,t),this.wmid=e}return t.prototype.getHeaders=function(){return{"X-Stream-Wmid":this.wmid}},t}(),E=function(){function n(e,t){p(this,n),this.wmid=e,this.token=t}return n.prototype.getHeaders=function(){return{"X-Stream-Wmid":this.wmid,Authorization:this.token}},n}(),_=function(){function t(e){p(this,t),this.data_token=e}return t.prototype.getHeaders=function(){return{"X-Stream-DataTool-Token":this.data_token}},t}()}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/auth/AuthService.js","/lib/auth")},{"./EnduserAuthService.js":12,_process:131,"array-equal":116,buffer:121,timers:152}],12:[function(e,t,p){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";p.__esModule=!0;var f="/p/authenticate/v0/?legacy=false",d=function(){function r(e,t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),null==e)throw new Error("AJAX cannot be null.");var n=t.credentials;if(!n.wmid||!n.username||!n.password)throw new Error("Cannot login if any of sid, username or password is empty.");this.http=e,this.host=t.host||"app.quotemedia.com",this.credentials=n,this.application=t.application,this.method="POST"}return r.prototype.login=function(e){this.login_POST(e)},r.prototype.login_POST=function(e){var t=this.host+f+(this.application?"&application="+this.application:""),n={wmId:this.credentials.wmid,username:this.credentials.username,password:this.credentials.password};this.http({url:t,type:"POST",contentType:"application/json",data:JSON.stringify(n),dataType:"json",success:this.handleSuccess(e),failure:this.handleFailure(e)})},r.prototype.handleSuccess=function(t){return function(e){e.code&&"Ok"===e.code.name?t(null,e.sid):t(new Error("Login failed: "+e.code+", "+e.message))}},r.prototype.handleFailure=function(e){return function(){e(new Error("Auth HTTP error"))}},r}();p["default"]=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/auth/EnduserAuthService.js","/lib/auth")},{_process:131,buffer:121,timers:152}],13:[function(_,g,e){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f,d=_("./streamer-api.js"),p=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("./streamer-utils.js")),h=_("jsbi"),m=(f=h)&&f.__esModule?f:{"default":f};var E={Formatter:function(){this.formatters={},this.formatters[E.Formatter._UNKOWNTYPE]=this._fmtunknown,this.formatters[d.messages.MessageTypeNames.ctrl.HEARTBEAT]=this._fmtheartbeat,this.formatters[d.messages.MessageTypeNames.ctrl.SUBSCRIBE]=this._fmtsubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE]=this._fmtsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE]=this._fmtunsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE]=this._fmtconnectresponse,this.formatters[d.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE]=this._fmtconnectionclose,this.formatters[d.messages.MessageTypeNames.ctrl.FLOW]=this._fmtflowmessage,this.formatters[d.messages.MessageTypeNames.ctrl.OPEN_FLOW]=this._fmtopenflowmessage,this.formatters[d.messages.MessageTypeNames.ctrl.SLOW_CONNECTION]=this._fmtslowconnection,this.formatters[d.messages.MessageTypeNames.ctrl.STATS]=this._fmtstats,this.formatters[d.messages.MessageTypeNames.ctrl.STATS_RESPONSE]=this._fmtstatsresponse,this.formatters[d.messages.MessageTypeNames.ctrl.INITIAL_DATA_SENT]=this._fmtinitialdatasent,this.formatters[d.messages.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE]=this._fmtresubscribeMessage,this.formatters[d.messages.MessageTypeNames.ctrl.EXCHANGE_SUBSCRIBE]=this._fmtexchangesubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.EXCHANGE_RESPONSE]=this._fmtexchangesubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE]=this._fmtexchangeunsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB]=this._fmtalertsubunsub,this.formatters[d.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE]=this._fmtalertsubunsubresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_SUBSCRIBE]=this._fmtnewssubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_ADD_RESPONSE]=this._fmtnewsfltaddresponse,this.formatters[d.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE]=this._fmttradesubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE]=this._fmttradesubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_DELETE_RESPONSE]=this._fmtnewsfltdeleteresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_GET_RESPONSE]=this._fmtnewsfltgetresponse,this.formatters[d.messages.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE]=this._fmttradeunsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE]=this._fmtreconnectresponse,this.formatters[d.messages.MessageTypeNames.ctrl.MISSED_DATA_SENT]=this._fmtmisseddatasent,this.formatters[d.messages.MessageTypeNames.ctrl.CORP_EVENT_MESSAGE]=this._fmtcorporateeventsubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE]=this._fmtcorporateeventresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_MOCK_BASIC_RESPONSE]=this._fmtnewsfltmockbasicresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_UPDATE_RESPONSE]=this._fmtnewsfltupdateresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FILTER_MESSAGE]=this._fmtnewsfilterremotemessage,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_ERROR_MESSAGE]=this._fmtnewserrorremotemessage,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_SUCCESS_MESSAGE]=this._fmtnewssuccessremotemessage,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_ADD_MESSAGE]=this._fmtnewsfltaddremotemessage,this.formatters[d.messages.MessageTypeNames.data.QUOTE]=this._fmtquote,this.formatters[d.messages.MessageTypeNames.data.PRICEDATA]=this._fmtpricedata,this.formatters[d.messages.MessageTypeNames.data.TRADE]=this._fmttrade,this.formatters[d.messages.MessageTypeNames.data.INTERVAL]=this._fmtinterval,this.formatters[d.messages.MessageTypeNames.data.NETHOUSEPOSITION]=this._fmtnethouseposition,this.formatters[d.messages.MessageTypeNames.data.MMQUOTE]=this._fmtmmquote,this.formatters[d.messages.MessageTypeNames.data.BOOKORDER]=this._fmtbookorder,this.formatters[d.messages.MessageTypeNames.data.PRICELEVEL]=this._fmtpricelevel,this.formatters[d.messages.MessageTypeNames.data.MMPRICELEVEL]=this._fmtmmpricelevel,this.formatters[d.messages.MessageTypeNames.data.PURGEBOOK]=this._fmtpurgebook,this.formatters[d.messages.MessageTypeNames.data.BOOKDELETE]=this._fmtbookdelete,this.formatters[d.messages.MessageTypeNames.data.SYMBOLINFO]=this._fmtsymbolinfo,this.formatters[d.messages.MessageTypeNames.data.SYMBOLSTATUS]=this._fmtsymbolstatus,this.formatters[d.messages.MessageTypeNames.data.DERIVATIVEINFO]=this._fmtderivativeinfo,this.formatters[d.messages.MessageTypeNames.data.LASTSALE]=this._fmtlastsale,this.formatters[d.messages.MessageTypeNames.data.LIMITUPLIMITDOWN]=this._fmtlimituplimitdown,this.formatters[d.messages.MessageTypeNames.data.IVGREEKS]=this._fmtivgreeks,this.formatters[d.messages.MessageTypeNames.data.IMBALANCESTATUS]=this._fmtimbalancestatus,this.formatters[d.messages.MessageTypeNames.data.ALERT]=this._fmtalert,this.formatters[d.messages.MessageTypeNames.data.NEWS]=this._fmtnews,this.formatters[d.messages.MessageTypeNames.data.TRADENOTIFICATION]=this._fmttradeNotification,this.formatters[d.messages.MessageTypeNames.data.DIVIDEND]=this._fmtdividend,this.formatters[d.messages.MessageTypeNames.data.EARNINGS]=this._fmtearnings,this.formatters[d.messages.MessageTypeNames.data.SPLIT]=this._fmtsplit,this.formatters[d.messages.MessageTypeNames.data.SYMBOLCHANGED]=this._fmtsymbolChanged}};E.Formatter._UNKOWNTYPE="__UNKNOWN__",E.Formatter.prototype.fmt=function(e){var t=p.messagetype(e);null==t&&(t=E.Formatter._UNKOWNTYPE);var n=this.formatters[t];return null==n&&(n=E.Formatter._UNKOWNTYPE),n.call(this,e)},E.Formatter.prototype._fmtunknown=function(e){return null==e?"null":e["@T"]?p.getMessageName(e):e.toString()},E.Formatter.prototype._fmtquote=function(e){var t=new E.StringBuilder;return t.append("Q"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.indicator),t.sep(),t.append(e.sharesPerSizeUnit),t.sep(),t.append(e.bidPrice),t.sep(),t.append(e.bidSize),t.sep(),t.append(e.bidExcode),t.sep(),t.append(e.bidCondition),t.sep(),t.append(e.askPrice),t.sep(),t.append(e.askSize),t.sep(),t.append(e.askExcode),t.sep(),t.append(e.askCondition),t.toString()},E.Formatter.prototype._fmtpricedata=function(e){var t=new E.StringBuilder;return t.append("P"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.last),t.sep(),t.append(e.lastTradeSize),t.sep(),t.append(e.change),t.sep(),t.append(e.percentChange),t.sep(),t.append(e.tick),t.sep(),t.append(e.tradeCount),t.sep(),t.append(e.close),t.sep(),t.append(e.previousClose),t.sep(),t.append(e.open),t.sep(),t.append(e.high),t.sep(),t.append(e.annualHigh),t.sep(),t.append(e.low),t.sep(),t.append(e.annualLow),t.sep(),t.datetime(e.lastTradeTime),t.sep(),t.append(e.accumulatedPrice),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.accumulatedTradeValue),t.sep(),t.append(e.twap),t.sep(),t.append(e.vwap),t.sep(),t.append(e.vwapVolume),t.sep(),t.datetime(e.preMarketTradeTime),t.sep(),t.append(e.preMarketLast),t.sep(),t.append(e.preMarketVolume),t.sep(),t.append(e.preMarketChange),t.sep(),t.append(e.preMarketPercentChange),t.sep(),t.datetime(e.postMarketTradeTime),t.sep(),t.append(e.postMarketLast),t.sep(),t.append(e.postMarketVolume),t.sep(),t.append(e.postMarketChange),t.sep(),t.append(e.postMarketPercentChange),t.sep(),t.append(e.lastTradeExcode),t.sep(),t.append(e.currencyID),t.toString()},E.Formatter.prototype._fmtlastsale=function(e){var t=new E.StringBuilder;return t.append("LS"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.last),t.sep(),t.append(e.change),t.sep(),t.append(e.percentChange),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.tick),t.sep(),t.append(e.lastTradeExcode),t.toString()},E.Formatter.prototype._fmtlimituplimitdown=function(e){var t=new E.StringBuilder;return t.append("LULD"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.datetime(e.effectiveTime),t.sep(),t.append(e.lowerLimit),t.sep(),t.append(e.upperLimit),t.sep(),t.append(e.bidNotExecutable),t.sep(),t.append(e.askNotExecutable),t.toString()},E.Formatter.prototype._fmtivgreeks=function(e){var t=new E.StringBuilder;return t.append("IVG"),t.sep(),t.datetime(e.lastCalculation),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.delta),t.sep(),t.append(e.gamma),t.sep(),t.append(e.vega),t.sep(),t.append(e.rho),t.sep(),t.append(e.theta),t.sep(),t.append(e.midIV),t.sep(),t.append(e.midIVChange.toFixed(5)),t.sep(),t.append(e.bidIV),t.sep(),t.append(e.askIV),t.sep(),t.append(e.mark),t.sep(),t.append(e.intrinsicValue),t.sep(),t.append(e.extrinsicValue),t.sep(),t.append(e.previousMark),t.sep(),t.append(e.markChange),t.sep(),t.append(e.markChangePercent),t.toString()},E.Formatter.prototype._fmtimbalancestatus=function(e){var t=new E.StringBuilder;return t.append("IS"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.imbalanceType),t.sep(),t.append(e.referencePrice),t.sep(),t.append(e.size),t.sep(),t.append(e.side),t.sep(),t.append(e.pairedVolume),t.sep(),t.append(e.nearIndicativePrice),t.sep(),t.append(e.farIndicativePrice),t.sep(),t.append(e.priceVariation),t.toString()},E.Formatter.prototype._fmttrade=function(e){var t=new E.StringBuilder;return t.append("T"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.sequenceNumber),t.sep(),t.append(e.matchID),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.tick),t.sep(),t.append(e.indicator),t.sep(),t.append(e.rangeIndicator),t.sep(),t.append(e.sellerID),t.sep(),t.append(e.buyerID),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.vwap),t.toString()},E.Formatter.prototype._fmtinterval=function(e){var t=new E.StringBuilder;return t.append("I"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.last),t.sep(),t.datetime(e.lastTime),t.sep(),t.append(e.open),t.sep(),t.datetime(e.openTime),t.sep(),t.append(e.high),t.sep(),t.append(e.low),t.sep(),t.datetime(e.startTime),t.sep(),t.append(e.tradeValue),t.sep(),t.append(e.volume),t.sep(),t.append(e.vwap),t.sep(),t.append(e.periodMs),t.toString()},E.Formatter.prototype._fmtnethouseposition=function(e){var t=new E.StringBuilder;return t.append("NHP"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.buyValue),t.sep(),t.append(e.buyVolume),t.sep(),t.append(e.buyBlockTransactions),t.sep(),t.append(e.buyBlockValue),t.sep(),t.append(e.buyBlockVolume),t.sep(),t.append(e.sellValue),t.sep(),t.append(e.sellVolume),t.sep(),t.append(e.sellBlockTransactions),t.sep(),t.append(e.sellBlockValue),t.sep(),t.append(e.sellBlockVolume),t.toString()},E.Formatter.prototype._fmtmmquote=function(e){var t=new E.StringBuilder;return t.append("MMQ"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.bidPrice),t.sep(),t.append(e.bidSize),t.sep(),t.append(e.bidChange),t.sep(),t.append(e.askPrice),t.sep(),t.append(e.askSize),t.sep(),t.append(e.askChange),t.sep(),t.append(e.indicator),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.sharesPerSizeUnit),t.toString()},E.Formatter.prototype._fmtpricelevel=function(e){var t=new E.StringBuilder;return t.append("PL"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.orderSide),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.count),t.sep(),t.append(e.bookType),t.sep(),t.append(e.changeType),t.toString()},E.Formatter.prototype._fmtmmpricelevel=function(e){var t=new E.StringBuilder;return t.append("MMPL"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.excode),t.sep(),t.append(e.orderSide),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.count),t.sep(),t.append(e.bookType),t.sep(),t.append(e.changeType),t.toString()},E.Formatter.prototype._fmtbookorder=function(e){var t=new E.StringBuilder;return t.append("BO"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.orderID),t.sep(),t.append(e.orderReference),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.orderSide),t.sep(),t.datetime(e.lastUpdate),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.display),t.sep(),t.append(e.orderChangeType),t.toString()},E.Formatter.prototype._fmtpurgebook=function(e){var t=new E.StringBuilder;return t.append("PB"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.toString()},E.Formatter.prototype._fmtbookdelete=function(e){var t=new E.StringBuilder;return t.append("BD"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.orderReference),t.toString()},E.Formatter.prototype._fmtsymbolinfo=function(e){var t=new E.StringBuilder;return t.append("SI"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.instrumentType),t.sep(),t.append(e.currencyId),t.sep(),t.append(e.haltStatus),t.sep(),t.append(e.haltIndicator),t.sep(),t.append(e.regSHOStatus),t.sep(),t.append(e.pqe),t.sep(),t.append(e.caveatEmptor),t.sep(),t.append(e.boardLotSize),t.toString()},E.Formatter.prototype._fmtsymbolstatus=function(e){var t=new E.StringBuilder;return t.append("SS"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.haltStatus),t.sep(),t.append(e.haltIndicator),t.sep(),t.append(e.regSHOStatus),t.sep(),t.append(e.closingCalculatedPrice),t.sep(),t.datetime(e.effectiveTime),t.sep(),t.datetime(e.openingTime),t.sep(),t.append(e.note),t.toString()},E.Formatter.prototype._fmtderivativeinfo=function(e){var t=new E.StringBuilder;return t.append("DI"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.rootSymbol),t.sep(),t.datetime(e.expiration),t.sep(),t.append(e.openInterest),t.sep(),t.datetime(e.delivery),t.sep(),t.append(e.contractSize),t.sep(),t.append(e.callPutIndicator),t.sep(),t.append(e.minTickSize),t.toString()},E.Formatter.prototype._fmtalert=function(e){var t=new E.StringBuilder;return t.append("A"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.instrumentType),t.sep(),t.append(e.alertId),t.sep(),t.append(e.triggerValue),t.toString()},E.Formatter.prototype._fmtnews=function(e){var t=new E.StringBuilder;return t.append("N"),t.sep(),t.append(e.filterId),t.sep(),t.append(e.storyId),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.storyUrl),t.sep(),t.append(e.epochtime),t.sep(),t.append(e.headline),t.sep(),t.append(e.source),t.sep(),t.append(e.sourceId),t.sep(),t.append(e.lang),t.sep(),t.append(e.symbol),t.sep(),t.append(e.excode),t.sep(),t.append(e.exgroup),t.sep(),t.append(e.topic),t.sep(),t.append(e.thumbnailUrl),t.sep(),t.append(e.newsUrl),t.sep(),t.append(e.videoUrl),t.sep(),t.append(e.videoImageUrl),t.sep(),t.append(e.vendorDateId),t.toString()},E.Formatter.prototype._fmttradeNotification=function(e){var t=new E.StringBuilder;return t.append("TN"),t.sep(),t.append(e.traceId),t.sep(),t.append(e.accountId),t.sep(),t.append(e.enduserId),t.sep(),t.append(e.message),t.sep(),t.append(e.eventType),t.sep(),t.append(e.alertable),t.sep(),t.append(e.title),t.sep(),t.append(e.eventSubtype),t.sep(),t.append(JSON.stringify(e.discretionaryContent)),t.toString()},E.Formatter.prototype._fmtdividend=function(e){var t=new E.StringBuilder;return t.append("DV"),t.sep(),t.datetime(e.occuredOn),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.append(e.instrument),t.sep(),t.datetime(e.declarationDate),t.sep(),t.datetime(e.executionDate),t.sep(),t.datetime(e.recordDate),t.sep(),t.datetime(e.paymentDate),t.sep(),t.append(e.amount),t.sep(),t.append(e.frequency),t.sep(),t.append(e.paymentType),t.toString()},E.Formatter.prototype._fmtearnings=function(e){var t=new E.StringBuilder;return t.append("ERN"),t.sep(),t.datetime(e.occuredOn),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.append(e.fiscalYear),t.sep(),t.append(e.quarter),t.sep(),t.append(e.earningsPerShare),t.sep(),t.datetime(e.announcementDate),t.sep(),t.append(e.announcementTimeOfDay),t.sep(),t.append(e.announcementUrl),t.toString()},E.Formatter.prototype._fmtsplit=function(e){var t=new E.StringBuilder;return t.append("SPLT"),t.sep(),t.datetime(e.occuredOn),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.datetime(e.executionDate),t.sep(),t.datetime(e.declarationDate),t.sep(),t.datetime(e.recordDate),t.sep(),t.datetime(e.paymentDate),t.sep(),t.append(e.ratio),t.sep(),t.append(e.ratioNumerator),t.sep(),t.append(e.ratioDenominator),t.toString()},E.Formatter.prototype._fmtsymbolChanged=function(e){var t=new E.StringBuilder;return t.append("SBCG"),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.append(e.oldSymbol),t.sep(),t.append(e.newSymbol),t.sep(),t.datetime(e.day),t.toString()},E.Formatter.prototype._fmtnewsfilterremotemessage=function(e){var t=new E.StringBuilder;return t.append("NEWS FILTER"),t.sep(),t.append(e.message),t.toString()},E.Formatter.prototype._fmtnewserrorremotemessage=function(e){var t=new E.StringBuilder;return t.append("NEWS ERROR"),t.sep(),t.append("Event: "+e.event),t.sep(),t.append("Code: "+e.code),t.sep(),t.append("Message: "+e.message),t.toString()},E.Formatter.prototype._fmtnewssuccessremotemessage=function(e){var t=new E.StringBuilder;return t.append("NEWS SUCCESS"),t.sep(),t.append(e.code),t.sep(),t.append(e.message),t.toString()},E.Formatter.prototype._fmtnewsfltaddremotemessage=function(e){var t=new E.StringBuilder;return t.append("NEWS SUBSCRIPTION"),t.sep(),t.append(e.code),t.sep(),t.append(e.message),t.sep(),t.append(e.filterId),t.toString()},E.Formatter.prototype._fmtheartbeat=function(e){var t=new E.StringBuilder;return t.append("HEARBEAT"),t.sep(),t.datetime(e.timestamp),t.toString()},E.Formatter.prototype._fmtsubscribe=function(e){var t=new E.StringBuilder;return t.append("SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtexchangesubscribe=function(e){var t=new E.StringBuilder;return t.append("EXCHANGE SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtcorporateeventsubscribe=function(e){var t=new E.StringBuilder;return t.append("CORPORATE EVENT SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtalertsubunsub=function(e){var t=new E.StringBuilder;return t.append("ALERT"),t.toString()},E.Formatter.prototype._fmttradesubscribe=function(e){var t=new E.StringBuilder;return t.append("TRADE"),t.toString()},E.Formatter.prototype._fmtnewssubscribe=function(e){var t=new E.StringBuilder;return t.append("NEWS SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtstats=function(e){var t=new E.StringBuilder;return t.append("STATS"),t.toString()},E.Formatter.prototype._fmtsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtexchangesubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("EXCHANGE SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtcorporateeventresponse=function(e){var t=new E.StringBuilder;return t.append("CORPORATE EVENT SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtalertsubunsubresponse=function(e){var t=new E.StringBuilder;return t.append("ALERT SUBSCRIBED"),t.toString()},E.Formatter.prototype._fmttradesubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("TRADE SUBSCRIBED"),t.toString()},E.Formatter.prototype._fmtnewsfltaddresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS SUBSCRIBED FLT_ADD"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltdeleteresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS UNSUBSCRIBED FLT_DELETE"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltgetresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS COMMAND FILTER"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltmockbasicresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS COMMAND FLT_MOCK_BASIC"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltupdateresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS COMMAND FLT_UPDATE"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtunsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("UN-SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtexchangeunsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("EXCHANGE UNSUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmttradeunsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("TRADE UNSUBSCRIBED"),t.toString()},E.Formatter.prototype._fmtconnectresponse=function(e){var t=new E.StringBuilder;return t.append("CONNECT"),t.sep(),this.__baseresponse(e,t),t.sep(),t.append(e.version),t.sep(),t.append(e.flowControlCheckInterval),t.sep(),t.append(e.serverInstance),t.sep(),t.append(e.conflationMs),t.sep(),t.append(e.rejectExcessiveConnection),t.sep(),t.append(e.maxEntitlementsPerSubscription),t.toString()},E.Formatter.prototype._fmtreconnectresponse=function(e){var t=new E.StringBuilder;return t.append("RECONNECT"),t.sep(),t.append(e.version),t.sep(),t.append(e.flowControlCheckInterval),t.sep(),t.append(e.serverInstance),t.sep(),t.append(e.conflationMs),t.sep(),t.append(e.rejectExcessiveConnection),t.sep(),t.append(e.maxEntitlementsPerSubscription),t.sep(),t.sep(e.entitlements),t.sep(),t.sep(e.exchangeEntitlements),t.toString()},E.Formatter.prototype._fmtconnectionclose=function(e){var t=new E.StringBuilder;return t.append("CLOSE"),t.sep(),t.append(e.code),t.sep(),t.append(e.reason),t.toString()},E.Formatter.prototype._fmtslowconnection=function(e){var t=new E.StringBuilder;return t.append("SLOW"),t.sep(),t.append(e.timesExceeded),t.sep(),t.append(e.maxExceed),t.toString()},E.Formatter.prototype._fmtstatsresponse=function(e){var t=new E.StringBuilder;return t.append("STATS"),t.sep(),this.__baseresponse(e,t),t.sep(),t.append("number of available l1 symbols: "),t.append(e.numberOfAvailableSymbolsL1),t.sep(),t.append("number of available l2 symbols: "),t.append(e.numberOfAvailableSymbolsL2),t.sep(),t.append("number of available connections: "),t.append(e.numberOfAvailableConnections),t.sep(),t.append("number of subscribed l1 symbols: "),t.append(e.numberOfSubscribedSymbolsL1),t.sep(),t.append("number of subscribed l2 symbols: "),t.append(e.numberOfSubscribedSymbolsL2),t.sep(),t.append("number of open connections: "),t.append(e.numberOfOpenedConnections),t.sep(),t.append("number of subscribed exchanges: "),t.append(e.numberOfSubscribedExchanges),t.toString()},E.Formatter.prototype._fmtinitialdatasent=function(e){var t=new E.StringBuilder;return t.append("INITIAL DATA SENT"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.requestId),t.toString()},E.Formatter.prototype._fmtresubscribeMessage=function(e){var t=new E.StringBuilder;return t.append("RESUBSCRIBE MESSAGE"),t.sep(),t.datetime(e.timestamp),t.toString()},E.Formatter.prototype._fmtflowmessage=function(e){var t=new E.StringBuilder;return t.append("FLOW"),t.sep(),t.append(e.sequence),t.toString()},E.Formatter.prototype._fmtopenflowmessage=function(e){var t=new E.StringBuilder;return t.append("OPEN FLOW"),t.sep(),t.append(e.sequence),t.toString()},E.Formatter.prototype.__baseresponse=function(e,t){t.append(e.code),t.sep(),t.append(e.reason)},E.Formatter.prototype._fmtmisseddatasent=function(e){var t=new E.StringBuilder;return t.append("MISSED DATA SENT"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.requestId),t.sep(),t.append(e.totalDataSent),t.sep(),t.append(e.totalDataHeld),t.toString()},E.StringBuilder=function(){this._str=""},E.StringBuilder.SEP=", ",E.StringBuilder.prototype.append=function(e){this._str+=e},E.StringBuilder.prototype.sep=function(){this.append(E.StringBuilder.SEP)},E.StringBuilder.prototype.datetime=function(e){if(null!=e){var t=e;e instanceof m["default"]&&(t=m["default"].toNumber(e)),this._str+=""+new Date(t).toUTCString()}else this._str+="null"},E.StringBuilder.prototype.toString=function(){return this._str},E.msgfmt=new E.Formatter,E.format=function(e){return E.msgfmt.fmt(e)},g.exports=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/formatting.js","/lib")},{"./streamer-api.js":108,"./streamer-utils.js":110,_process:131,buffer:121,jsbi:128,timers:152}],14:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E["default"]=function(e){var t=e.url,n=e.success||function(){},r=e.failure||function(){},i=e.type||"POST",o=e.contentType,s=e.data,a=e.timeout,u=h(e.dataType),l=p();l.onreadystatechange=function(){4===l.readyState&&(200===l.status?n(u(l.responseText)):r(l.status))},l.open(i,t,!0),o&&l.setRequestHeader("Content-Type",o);a&&(l.timeout=a);l.send(s)};var f,d=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new(0,m("xmlhttprequest").XMLHttpRequest)}],p=(f=null,function(){if(null===f){for(f=0;f<d.length;f++)try{return d[f]()}catch(e){}if(f===d.length)throw f=null,new Error("No HTTP implementation found.")}return d[f]()}),h=function(e){switch(e?e.toLowerCase():e){case"json":return JSON.parse;default:return function(e){return e}}}}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/http.js","/lib")},{_process:131,buffer:121,timers:152,xmlhttprequest:157}],15:[function(g,T,e){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f=_(g("json3"));g("./polyfills");var d=E(g("./streamer-utils.js")),p=_(g("./Streamer.js")),h=E(g("./formatting.js")),m=g("./streamer-api.js");function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function _(e){return e&&e.__esModule?e:{"default":e}}window&&(window.JSON=window.JSON||f["default"]),p["default"].formatting=h,p["default"].dataTypes=m.messages.control.MarketdataType,p["default"].dataTypes.get=function(e){var t=d.getMessageName(e);return p["default"].dataTypes[t]?t:"UnknownType["+t+"]"},p["default"].marketDataTypes=m.messages.market.MarketDataResponseTypes,p["default"].marketDataTypes.get=function(e){var t=d.getMessageName(e);return p["default"].marketDataTypes[t]?t:"UnknownType["+t+"]"},p["default"].subscriptionTypes=m.messages.market.SubscriptionTypes,p["default"].corpEventTypes=m.messages.market.CorporateEventTypes,T.exports=p["default"]}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/index.js","/lib")},{"./Streamer.js":7,"./formatting.js":13,"./polyfills":18,"./streamer-api.js":108,"./streamer-utils.js":110,_process:131,buffer:121,json3:129,timers:152}],16:[function(e,t,p){(function(t,n,r,i,o,s,a,u,l,c,f){"use strict";p.__esModule=!0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};p.asLogger=function e(o){{if(!o)return e({log:function(){}});if("function"==typeof o)return e({log:o});var t=function(){for(var i={log:function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o[e]?o[e].apply(o,n):o.log&&o.log.apply(o,[e].concat(n))}},t=["info","error","warn","debug"],e=function(){var e=t[n],r=e;i[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];i.log.apply(i,[r].concat(t))}},n=0;n<t.length;n++)e();return{v:i}}();if("object"===(void 0===t?"undefined":d(t)))return t.v}}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/logging.js","/lib")},{_process:131,buffer:121,timers:152}],17:[function(e,t,f){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";f.__esModule=!0;f.Encodings={UNDEFINED:"undefined",UNDEFINED_CHAR:"U",NONE:"none",NONE_CHAR:"N",BASE64:"base64",BASE64_CHAR:"B"},f.MimeTypes={UNDEFINED:"undefined",UNDEFINED_CHAR:"U",JSON:"application/json",JSON_CHAR:"J",QMCI:"application/qmci",QMCI_CHAR:"Q",QITCH:"application/qitch",QITCH_CHAR:"I"},f.lpad=function(e,t){var n,r=e.toString();if(r.length==t)return r;if(r.length>t)throw"Number to long.";0<=e?n="0":(r=r.slice(1),n="-");for(var i=t-r.length,o=1;o<i;o++)n+="0";return n+r}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/message.js","/lib")},{_process:131,buffer:121,timers:152}],18:[function(e,t,n){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f,d,p,h;String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n}),"function"!=typeof Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.map||(Array.prototype.map=function(e){var t,n,r;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),o=i.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=new Array(o),r=0;r<o;){var s,a;r in i&&(s=i[r],a=e.call(t,s,r,i),n[r]=a),r++}return n}),Array.from||(Array.from=(f=Object.prototype.toString,d=function(e){return"function"==typeof e||"[object Function]"===f.call(e)},p=Math.pow(2,53)-1,h=function(e){var t,n=(t=Number(e),isNaN(t)?0:0!==t&&isFinite(t)?(0<t?1:-1)*Math.floor(Math.abs(t)):t);return Math.min(Math.max(n,0),p)},function(e){var t=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,r=1<arguments.length?arguments[1]:void undefined;if(void 0!==r){if(!d(r))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(n=arguments[2])}for(var i,o=h(t.length),s=d(this)?Object(new this(o)):new Array(o),a=0;a<o;)i=t[a],s[a]=r?void 0===n?r(i,a):r.call(n,i,a):i,a+=1;return s.length=o,s}))}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/polyfills.js","/lib")},{_process:131,buffer:121,timers:152}],19:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=m(_("./Bytes")),d=_("./DataOperations"),p=_("./QitchConstants"),h=m(_("./Qitch"));function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.lengthToBytes=function(e,t,n){return f["default"].putshort(e,t+p.BLOCK_HEADER_LENGTH_OFFSET,d.UShort.fromint(n))},e.lengthGetValue=function(e,t){return f["default"].getshort(e,t+p.BLOCK_HEADER_LENGTH_OFFSET)},e.messageCountToBytes=function(e,t,n){return e[t+p.BLOCK_HEADER_MESSAGECOUNT_OFFSET]=d.UByte.fromint(n),e},e.messageCountGetValue=function(e,t){return d.UByte.frombyte(e[t+p.BLOCK_HEADER_MESSAGECOUNT_OFFSET])},e.reservedToBytes=function(e,t,n){return e[t+p.BLOCK_HEADER_RESERVED_OFFSET]=n,e},e.sequenceToBytes=function(e,t,n){return h["default"].putUInt32(e,t+p.BLOCK_HEADER_SEQUENCE_OFFSET,n)},e.sequenceGetValue=function(e,t){return h["default"].uint32(e,t+p.BLOCK_HEADER_SEQUENCE_OFFSET)},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/BlockHeader.js","/lib/qitch")},{"./Bytes":20,"./DataOperations":21,"./Qitch":25,"./QitchConstants":26,_process:131,buffer:121,timers:152}],20:[function(S,e,v){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";v.__esModule=!0;var f,d=S("jsbi"),p=(f=d)&&f.__esModule?f:{"default":f};var h=Math.pow(2,8),m=Math.pow(2,16),E=Math.pow(2,24),_=p["default"].BigInt(32),g=p["default"].BigInt(40),T=p["default"].BigInt(48),b=p["default"].BigInt(56),y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.putshort=function(e,t,n){return e[t]=n>>8,e[t+1]=n,e},e.getshort=function(e,t){return e[t]*h|255&e[t+1]},e.putint=function(e,t,n){return e[t]=n>>24,e[t+1]=n>>16,e[t+2]=n>>8,e[t+3]=n,e},e.getint=function(e,t){return e[t]*E|(255&e[t+1])*m|(255&e[t+2])*h|255&e[t+3]},e.getlong=function(e,t){return p["default"].bitwiseOr(p["default"].bitwiseOr(p["default"].bitwiseOr(p["default"].leftShift(p["default"].BigInt(e[t]),b),p["default"].leftShift(p["default"].BigInt(255&e[t+1]),T)),p["default"].bitwiseOr(p["default"].leftShift(p["default"].BigInt(255&e[t+2]),g),p["default"].leftShift(p["default"].BigInt(255&e[t+3]),_))),p["default"].bitwiseOr(p["default"].bitwiseOr(p["default"].BigInt((255&e[t+4])*E),p["default"].BigInt((255&e[t+5])*m)),p["default"].bitwiseOr(p["default"].BigInt((255&e[t+6])*h),p["default"].BigInt(255&e[t+7]))))},e}();v["default"]=y}).call(this,S("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},S("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],S("timers").setImmediate,S("timers").clearImmediate,"/lib/qitch/Bytes.js","/lib/qitch")},{_process:131,buffer:121,jsbi:128,timers:152}],21:[function(e,t,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}E.__esModule=!0;var d=function(){function t(){f(this,t)}return t.fromint=function(e){if(e<t.prototype.MIN_VALUE)throw"Value underflows unsiged short";if(t.prototype.MAX_VALUE<e)throw"Value overflows unsigned short";return e<t.prototype.MAX_SHORT_VALUE?e:e-(t.prototype.MAX_VALUE+1)},t.fromshort=function(e){return 65535&e},t}();d.prototype.LENGTH=2,d.prototype.MIN_VALUE=0,d.prototype.MAX_VALUE=65535,d.prototype.MAX_SHORT_VALUE=32767;var p=function(){function t(){f(this,t)}return t.fromint=function(e){if(e<t.prototype.MIN_VALUE)throw"Value underflows unsigned byte";if(t.prototype.MAX_VALUE<e)throw"Value overflows unsigned byte";return e<t.prototype.BYTE_MAX_VALUE?e:e-(t.prototype.MAX_VALUE+1)},t.frombyte=function(e){return 255&e},t}();p.prototype.LENGTH=1,p.prototype.MIN_VALUE=0,p.prototype.MAX_VALUE=255,p.prototype.BYTE_MAX_VALUE=127;var h=function(){function t(){f(this,t)}return t.fromlong=function(e){if(e<t.prototype.MIN_VALUE)throw"Value underfows unsigned int";if(t.prototype.MAX_VALUE<e)throw"Value overflows unsigned int";return e<t.prototype.INT_MAX_VALUE?e:e-(t.prototype.MAX_VALUE+1)},t.fromint=function(e){return 4294967295&e},t}();h.prototype.LENGTH=4,h.prototype.MIN_VALUE=0,h.prototype.MAX_VALUE=4294967295,h.prototype.INT_MAX_VALUE=2147483647;var m=function(){function a(){f(this,a)}return a.put=function(e,t,n,r){if(e.length<t+r)throw"Not enough space in destination array";var i=t;if(null!=n&&0!==n.length){if(n.length>r)throw"String overflows maximum length";var o=void 0;for(o=0;o<n.length;o++)e[i++]=n.charAt(o).charCodeAt(0)}var s=void 0;for(s=i;s<t+r;s++)e[s]=a.prototype.PADDING;return e},a.get=function(e,t,n){var r=t,i=n;if(e.length<r+i)throw"Not enough bytes in source array";for(;0<i&&e[r+i-1]===a.prototype.PADDING;)i--;return String.fromCharCode.apply(String,e.slice(r,r+i))},a}();m.prototype.PADDING=32,E.UByte=p,E.UShort=d,E.UInt=h,E.ASCIIString=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/qitch/DataOperations.js","/lib/qitch")},{_process:131,buffer:121,timers:152}],22:[function(h,e,m){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";m.__esModule=!0;var f=h("../streamer-api");var d={1:"QUOTE",2:"PRICEDATA",3:"TRADE",4:"MMQUOTE",5:"ORDERBOOK",6:"INTERVAL",7:"NETHOUSEPOSITION",8:"LASTSALE",9:"LIMITUPLIMITDOWN",10:"IVGREEKS",11:"IMBALANCESTATUS"},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.marketdatatypeToInt=function(t){return Object.keys(d).find(function(e){return d[e]===t})},e.ubyteToMarketdataType=function(e){return d[e]},e.ubyteToEntitlementType=function(e){switch(e){case 1:return"RT";case 2:return"RTN";case 3:return"RTB";case 4:return"DL";case 6:return"RTO";case 7:return"DLO";case 8:return"DLN";default:return"NA"}},e.subscribeActionToChar=function(e){switch(e){case f.messages.control.Action.SUBSCRIBE:return"S";case f.messages.control.Action.UNSUBSCRIBE:return"U"}},e}();m["default"]=p}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/qitch/EnumValueTranslator.js","/lib/qitch")},{"../streamer-api":108,_process:131,buffer:121,timers:152}],23:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0;var f=p("../streamer-api");var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.symbols=new Map}return e.prototype.injectLocateCode=function(e){e instanceof f.messages.market.SymbolInfo?this.symbols.set(e.locateCode,e.symbol):e instanceof f.messages.market.DataMessage&&(null===e.locateCode||e instanceof f.messages.market.ImbalanceStatus||e instanceof f.messages.market.SymbolStatus||e instanceof f.messages.market.Alert||(e.symbol=this.symbols.get(e.locateCode)))},e}();h["default"]=d}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/LocateCodeInjector.js","/lib/qitch")},{"../streamer-api":108,_process:131,buffer:121,timers:152}],24:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=_("./Bytes"),p=(f=d)&&f.__esModule?f:{"default":f},h=_("./DataOperations"),m=_("./QitchConstants");var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.lengthGetValue=function(e,t){return h.UShort.fromshort(p["default"].getshort(e,t+m.MESSAGE_HEADER_LENGTH_OFFSET))},e.lengthGetBytes=function(e,t,n){return p["default"].putshort(e,t+m.MESSAGE_HEADER_LENGTH_OFFSET,h.UShort.fromint(n))},e.typeGetValue=function(e,t){return h.UByte.frombyte(e[t+m.MESSAGE_HEADER_TYPE_OFFSET])},e.typeGetBytes=function(e,t,n){return e[t+m.MESSAGE_HEADER_TYPE_OFFSET]=h.UByte.fromint(n),e},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/MessageHeader.js","/lib/qitch")},{"./Bytes":20,"./DataOperations":21,"./QitchConstants":26,_process:131,buffer:121,timers:152}],25:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0;var f=b("../streamer-api"),d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(b("./QitchConstants")),p=g(b("./Bytes")),h=b("./DataOperations"),m=g(b("bignumber.js")),E=g(b("jsbi")),_=g(b("./EnumValueTranslator"));function g(e){return e&&e.__esModule?e:{"default":e}}var T=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.copyArray=function(e,t,n,r,i){if(0!==i){if(!(e instanceof Int8Array))throw"Source must be a byte array";if(!(n instanceof Int8Array))throw"Destination must be a byte array";if(t>=e.length)throw"Source index is out of range. Index: "+t+", max length: "+e.length;if(r>=n.length)throw"Destination index is out of range. Index: "+r+", max length: "+n.length;if(t+i>e.length||r+i>n.length)throw"Length is out of range";var o=void 0;for(o=0;o<i;o++)n[r+o]=e[t+o]}},e.bool=function(e,t){if(e instanceof Int8Array)return 0!==e[t];throw"Invalid source. Expected: Int8Array"},e.putBool=function(e,t,n){if(e instanceof Int8Array)return e[t]=n?1:0,e;throw"Invalid destination. Expected: Int8Array"},e.putByte=function(e,t,n){if(e instanceof Int8Array)return e[t]=h.UByte.fromint(n),e;throw"Invalid destination. Expected: Int8Array"},e.int32=function(e,t){if(e instanceof Int8Array)return p["default"].getint(e,t);throw"Invalid source. Expected: Int8Array"},e.putInt32=function(e,t,n){if(e instanceof Int8Array)return p["default"].putint(e,t,n);throw"Invalid destination. Expected: Int8Array"},e.uint32=function(e,t){if(e instanceof Int8Array)return h.UInt.fromint(p["default"].getint(e,t));throw"Invalid source. Expected: Int8Array"},e.putUInt32=function(e,t,n){if(e instanceof Int8Array)return p["default"].putint(e,t,h.UInt.fromlong(n));throw"Invalid destination. Expected: Int8Array"},e.asciichar=function(e,t){if(e instanceof Int8Array){if(t>=e.length)return null;var n=e[t];return n!==d.ASCII_NULL?String.fromCharCode(n):null}throw"Invalid source. Expected: Int8Array"},e.int64=function(e,t){if(e instanceof Int8Array)return p["default"].getlong(e,t);throw"Invalid source. Expected: Int8Array"},e.dec8double=function(e,t){if(e instanceof Int8Array)return new m["default"](p["default"].getlong(e,t).toString()).dividedBy(d.PRICE_DIVISOR);throw"Invalid source. Expected: Int8Array"},e.sbyte=function(e,t){if(e instanceof Int8Array)return e[t];throw"Invalid source. Expected: Int8Array"},e.timestamp=function(e,t){if(e instanceof Int8Array){var n=p["default"].getlong(e,t);return E["default"].equal(n,d.TIMESTAMP_NULL)?null:n}throw"Invalid source. Expected: Int8Array"},e.locatecode=function(e,t){if(e instanceof Int8Array)return p["default"].getint(e,t);throw"Invalid source. Expected: Int8Array"},e.symbol=function(e,t){if(e instanceof Int8Array)return t+d.SYMBOL_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.SYMBOL_LENGTH);throw"Invalid source. Expected: Int8Array"},e.putSymbol=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,d.SYMBOL_LENGTH);throw"Invalid destination. Expected: Int8Array"},e.asciiString=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.get(e,t,n);throw"Invalid source. Expected: Int8Array"},e.putAsciiString=function(e,t,n,r){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,r);throw"Invalid destination. Expected: Int8Array"},e.excode=function(e,t){if(e instanceof Int8Array)return t+d.EXCODE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.EXCODE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.putExcode=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,d.EXCODE_LENGTH);throw"Invalid destination. Expected: Int8Array"},e.mmid=function(e,t){if(e instanceof Int8Array)return t+d.MMID_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.MMID_LENGTH);throw"Invalid source. Expected: Int8Array"},e.orderId=function(e,t){if(e instanceof Int8Array)return p["default"].getlong(e,t);throw"Invalid source. Expected: Int8Array"},e.orderIdLegacy=function(e,t){if(e instanceof Int8Array)return t+d.ORDERID_LENGTH>e.length?null:p["default"].getlong(e,t).toString();throw"Invalid source. Expected: Int8Array"},e.currencyid=function(e,t){if(e instanceof Int8Array)return t+d.CURRENCYID_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.CURRENCYID_LENGTH);throw"Invalid source. Expected: Int8Array"},e.tick=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:String.fromCharCode(e[t]);throw"Invalid source. Expected: Int8Array"},e.bookOrderChangeType=function(e,t){if(e instanceof Int8Array){if(t>=e.length)return null;var n=String.fromCharCode(e[t]);return n===d.ASCIICHAR_NULL?null:f.messages.market.OrderChangeType[n]}throw"Invalid source. Expected: Int8Array"},e.orderside=function(e,t){if(e instanceof Int8Array){if(t>=e.length)return null;var n=String.fromCharCode(e[t]);return n===d.ASCIICHAR_NULL?null:n}throw"Invalid source. Expected: Int8Array"},e.rangeindicator=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:String.fromCharCode(e[t]);throw"Invalid source. Expected: Int8Array"},e.instrumenttype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:f.messages.market.InstrumentType[h.UByte.frombyte(e[t])];throw"Invalid source. Expected: Int8Array"},e.imbalancetype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:f.messages.market.ImbalanceType[h.UByte.frombyte(e[t])];throw"Invalid source. Expected: Int8Array"},e.orderreference=function(e,t){if(e instanceof Int8Array)return t+d.ORDER_REFERENCE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.ORDER_REFERENCE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.reason=function(e,t){if(e instanceof Int8Array)return t+d.REASON_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.REASON_LENGTH);throw"Invalid source. Expected: Int8Array"},e.version=function(e,t){if(e instanceof Int8Array)return t+d.VERSION_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.VERSION_LENGTH);throw"Invalid source. Expected: Int8Array"},e.serverInstance=function(e,t){if(e instanceof Int8Array)return t+d.SERVER_INSTANCE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.SERVER_INSTANCE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.note=function(e,t){if(e instanceof Int8Array)return t+d.NOTE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.NOTE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.putAction=function(e,t,n){if(e instanceof Int8Array)return e[t]=_["default"].subscribeActionToChar(n).charCodeAt(0),e;throw"Invalid destination. Expected: Int8Array"},e.putMimetype=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,d.MIMETYPE_LENGTH);throw"Invalid destination. Expected: Int8Array"},e.putConflation=function(e,t,n){if(e instanceof Int8Array)return this.putInt32(e,t,null!=n&&""!==n?n:d.CONFLATION_NULL);throw"Invalid destination. Expected: Int8Array"},e.marketdatatype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:_["default"].ubyteToMarketdataType(h.UByte.frombyte(e[t]));throw"Invalid source. Expected: Int8Array"},e.putMarketdatatype=function(e,t,n){if(e instanceof Int8Array)return e[t]=h.UByte.fromint(_["default"].marketdatatypeToInt(n)),e;throw"Invalid destination. Expected: Int8Array"},e.entitlementtype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:_["default"].ubyteToEntitlementType(h.UByte.frombyte(e[t]));throw"Invalid source. Expected: Int8Array"},e.entitlement=function(e,t){if(e instanceof Int8Array){var n=new f.messages.control.StreamEntitlement;return n.symbol=this.symbol(e,t),n.marketdatatype=this.marketdatatype(e,t+d.SYMBOL_LENGTH),n.entitlement=this.entitlementtype(e,t+d.SYMBOL_LENGTH+d.MARKETDATATYPE_LENGTH),n}throw"Invalid source. Expected: Int8Array"},e}();y["default"]=T}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/qitch/Qitch.js","/lib/qitch")},{"../streamer-api":108,"./Bytes":20,"./DataOperations":21,"./EnumValueTranslator":22,"./QitchConstants":26,_process:131,"bignumber.js":118,buffer:121,jsbi:128,timers:152}],26:[function(M,e,D){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";D.__esModule=!0,D.BLOCK_HEADER_LENGTH=D.BLOCK_HEADER_SEQUENCE_OFFSET=D.BLOCK_HEADER_RESERVED_OFFSET=D.BLOCK_HEADER_MESSAGECOUNT_OFFSET=D.BLOCK_HEADER_LENGTH_OFFSET=D.MESSAGE_HEADER_LENGTH=D.MESSAGE_HEADER_TYPE_OFFSET=D.MESSAGE_HEADER_LENGTH_OFFSET=D.NOTE_LENGTH=D.ENTITLEMENT_LENGTH=D.ENTITLEMENTTYPE_LENGTH=D.MARKETDATATYPE_LENGTH=D.CONFLATION_LENGTH=D.MIMETYPE_LENGTH=D.ACTION_LENGTH=D.BOOLEAN_LENGTH=D.VERSION_LENGTH=D.SERVER_INSTANCE_LENGTH=D.REASON_LENGTH=D.ORDER_REFERENCE_LENGTH=D.PRICE_DIVISOR=D.RANGEINDICATOR_LENGTH=D.INSTRUMENTTYPE_LENGTH=D.SYMBOL_LENGTH=D.CURRENCYID_LENGTH=D.EXCODE_LENGTH=D.TICK_LENGTH=D.IMBALANCETYPE_LENGTH=D.ORDERSIDE_LENGTH=D.ORDERID_LENGTH=D.MMID_LENGTH=D.LOCATECODE_LENGTH=D.TIMESTAMP_LENGTH=D.DOUBLE_LENGTH=D.LONG_LENGTH=D.INT_LENGTH=D.SHORT_LENGTH=D.ASCIICHAR_LENGTH=D.BYTE_LENGTH=D.CONFLATION_NULL=D.TIMESTAMP_NULL=D.ASCIICHAR_NULL=D.ASCII_NULL=undefined;var f,d=M("jsbi"),p=(f=d)&&f.__esModule?f:{"default":f};D.ASCII_NULL=0,D.ASCIICHAR_NULL="0",D.TIMESTAMP_NULL=p["default"].BigInt("-9223372036854775808"),D.CONFLATION_NULL=-1;var h=D.BYTE_LENGTH=1,m=D.ASCIICHAR_LENGTH=1,E=D.SHORT_LENGTH=2,_=D.INT_LENGTH=4,g=D.LONG_LENGTH=8,T=(D.DOUBLE_LENGTH=8,D.TIMESTAMP_LENGTH=8,D.LOCATECODE_LENGTH=_,D.MMID_LENGTH=4),b=D.ORDERID_LENGTH=g,y=(D.ORDERSIDE_LENGTH=m,D.IMBALANCETYPE_LENGTH=m,D.TICK_LENGTH=m,D.EXCODE_LENGTH=5),S=(D.CURRENCYID_LENGTH=3,D.SYMBOL_LENGTH=26),v=(D.INSTRUMENTTYPE_LENGTH=m,D.RANGEINDICATOR_LENGTH=h,D.PRICE_DIVISOR=1e8,D.ORDER_REFERENCE_LENGTH=y+S+T+b,D.REASON_LENGTH=40,D.SERVER_INSTANCE_LENGTH=1,D.VERSION_LENGTH=8,D.BOOLEAN_LENGTH=1,D.ACTION_LENGTH=m,D.MIMETYPE_LENGTH=20,D.CONFLATION_LENGTH=_,D.MARKETDATATYPE_LENGTH=h),O=D.ENTITLEMENTTYPE_LENGTH=h,w=(D.ENTITLEMENT_LENGTH=S+v+O,D.NOTE_LENGTH=50,D.MESSAGE_HEADER_LENGTH_OFFSET=0),I=D.MESSAGE_HEADER_TYPE_OFFSET=w+E,N=(D.MESSAGE_HEADER_LENGTH=I+h,D.BLOCK_HEADER_LENGTH_OFFSET=0),A=D.BLOCK_HEADER_MESSAGECOUNT_OFFSET=N+E,F=D.BLOCK_HEADER_RESERVED_OFFSET=A+h,C=D.BLOCK_HEADER_SEQUENCE_OFFSET=F+h;D.BLOCK_HEADER_LENGTH=C+_}).call(this,M("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},M("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],M("timers").setImmediate,M("timers").clearImmediate,"/lib/qitch/QitchConstants.js","/lib/qitch")},{_process:131,buffer:121,jsbi:128,timers:152}],27:[function(y,e,S){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";S.__esModule=!0,S.LENGTH=S.MAX_ENTITLEMENTS_PER_SUBSCRIPTION_OFFSET=S.REJECT_EXCESSIVE_CONNECTION_OFFSET=S.CONFLATION_OFFSET=S.SERVER_INSTANCE_OFFSET=S.FLOW_CONTROL_CHECK_INTERVAL_OFFSET=S.VERSION_OFFSET=S.REQUEST_ID_OFFSET=S.REASON_OFFSET=S.CODE_OFFSET=S.TYPEID=undefined;var f=y("../QitchConstants"),d=(S.TYPEID=105,S.CODE_OFFSET=0),p=S.REASON_OFFSET=d+f.INT_LENGTH,h=S.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=S.VERSION_OFFSET=h+f.INT_LENGTH,E=S.FLOW_CONTROL_CHECK_INTERVAL_OFFSET=m+f.VERSION_LENGTH,_=S.SERVER_INSTANCE_OFFSET=E+f.INT_LENGTH,g=S.CONFLATION_OFFSET=_+f.SERVER_INSTANCE_LENGTH,T=S.REJECT_EXCESSIVE_CONNECTION_OFFSET=g+f.INT_LENGTH,b=S.MAX_ENTITLEMENTS_PER_SUBSCRIPTION_OFFSET=T+f.BOOLEAN_LENGTH;S.LENGTH=b+f.INT_LENGTH}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ConnectResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],28:[function(h,e,m){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";m.__esModule=!0,m.LENGTH=m.REASON_OFFSET=m.CODE_OFFSET=m.TYPEID=undefined;var f=h("../QitchConstants"),d=(m.TYPEID=106,m.CODE_OFFSET=0),p=m.REASON_OFFSET=d+f.INT_LENGTH;m.LENGTH=p+f.REASON_LENGTH}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ConnectionCloseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],29:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0,g.FIXED_LENGTH=g.EXCODE_OFFSET=g.CONFLATION_OFFSET=g.MIMETYPE_OFFSET=g.ACTION_OFFSET=g.REQUEST_ID_OFFSET=g.TYPEID=undefined;var f=_("../QitchConstants"),d=(g.TYPEID=114,g.REQUEST_ID_OFFSET=0),p=g.ACTION_OFFSET=d+f.INT_LENGTH,h=g.MIMETYPE_OFFSET=p+f.ACTION_LENGTH,m=g.CONFLATION_OFFSET=h+f.MIMETYPE_LENGTH,E=g.EXCODE_OFFSET=m+f.CONFLATION_LENGTH;g.FIXED_LENGTH=E+f.EXCODE_LENGTH}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ExchangeSubscribeMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],30:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E.LENGTH=E.REQUEST_ID_OFFSET=E.REASON_OFFSET=E.CODE_OFFSET=E.TYPEID=undefined;var f=m("../QitchConstants"),d=(E.TYPEID=115,E.CODE_OFFSET=0),p=E.REASON_OFFSET=d+f.INT_LENGTH,h=E.REQUEST_ID_OFFSET=p+f.REASON_LENGTH;E.LENGTH=h+f.INT_LENGTH}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ExchangeSubscribeResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],31:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E.LENGTH=E.REQUEST_ID_OFFSET=E.REASON_OFFSET=E.CODE_OFFSET=E.TYPEID=undefined;var f=m("../QitchConstants"),d=(E.TYPEID=116,E.CODE_OFFSET=0),p=E.REASON_OFFSET=d+f.INT_LENGTH,h=E.REQUEST_ID_OFFSET=p+f.REASON_LENGTH;E.LENGTH=h+f.INT_LENGTH}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ExchangeUnsubResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],32:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.SEQUENCE_NUMBER_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=107,h.SEQUENCE_NUMBER_OFFSET=0);h.LENGTH=d+f.INT_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/FlowMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],33:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.TIMESTAMP_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=101,h.TIMESTAMP_OFFSET=0);h.LENGTH=d+f.TIMESTAMP_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/HeartbeatDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],34:[function(h,e,m){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";m.__esModule=!0,m.LENGTH=m.REQUEST_ID_OFFSET=m.TIMESTAMP_OFFSET=m.TYPEID=undefined;var f=h("../QitchConstants"),d=(m.TYPEID=110,m.TIMESTAMP_OFFSET=0),p=m.REQUEST_ID_OFFSET=d+f.TIMESTAMP_LENGTH;m.LENGTH=p+f.INT_LENGTH}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/InitialDataSentDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],35:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.TIMESTAMP_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=112,h.TIMESTAMP_OFFSET=0);h.LENGTH=d+f.TIMESTAMP_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ResubscribeMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],36:[function(h,e,m){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";m.__esModule=!0,m.LENGTH=m.MAX_EXCEED_OFFSET=m.TIMES_EXCEED_OFFSET=m.TYPEID=undefined;var f=h("../QitchConstants"),d=(m.TYPEID=111,m.TIMES_EXCEED_OFFSET=0),p=m.MAX_EXCEED_OFFSET=d+f.INT_LENGTH;m.LENGTH=p+f.INT_LENGTH}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SlowConnectionDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],37:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.REQUEST_ID_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=108,h.REQUEST_ID_OFFSET=0);h.LENGTH=d+f.INT_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/StatsMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],38:[function(y,e,S){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";S.__esModule=!0,S.LENGTH=S.NUMBER_OF_AVAILABLE_CONNECTIONS=S.NUMBER_OF_OPENED_CONNECTIONS=S.NUMBER_OF_AVAILABLE_L2_OFFSET=S.NUMBER_OF_SUBSCRIBED_L2_OFFSET=S.NUMBER_OF_AVAILABLE_L1_OFFSET=S.NUMBER_OF_SUBSCRIBED_L1_OFFSET=S.REQUEST_ID_OFFSET=S.REASON_OFFSET=S.CODE_OFFSET=S.TYPEID=undefined;var f=y("../QitchConstants"),d=(S.TYPEID=109,S.CODE_OFFSET=0),p=S.REASON_OFFSET=d+f.INT_LENGTH,h=S.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=S.NUMBER_OF_SUBSCRIBED_L1_OFFSET=h+f.INT_LENGTH,E=S.NUMBER_OF_AVAILABLE_L1_OFFSET=m+f.INT_LENGTH,_=S.NUMBER_OF_SUBSCRIBED_L2_OFFSET=E+f.INT_LENGTH,g=S.NUMBER_OF_AVAILABLE_L2_OFFSET=_+f.INT_LENGTH,T=S.NUMBER_OF_OPENED_CONNECTIONS=g+f.INT_LENGTH,b=S.NUMBER_OF_AVAILABLE_CONNECTIONS=T+f.INT_LENGTH;S.LENGTH=b+f.INT_LENGTH}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/StatsResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],39:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0,_.FIXED_LENGTH=_.MIMETYPE_OFFSET=_.OPERATION_OFFSET=_.REQUEST_ID_OFFSET=_.FIXED_OPERATION_LENGTH=_.TYPEID=undefined;var f=E("../QitchConstants"),d=(_.TYPEID=117,_.FIXED_OPERATION_LENGTH=11),p=_.REQUEST_ID_OFFSET=0,h=_.OPERATION_OFFSET=p+f.INT_LENGTH,m=_.MIMETYPE_OFFSET=h+d;_.FIXED_LENGTH=m+f.MIMETYPE_LENGTH}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubUnsubAlertMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],40:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0,g.LENGTH=g.OPERATION_OFFSET=g.REQUEST_ID_OFFSET=g.REASON_OFFSET=g.CODE_OFFSET=g.FIXED_OPERATION_LENGTH=g.TYPEID=undefined;var f=_("../QitchConstants"),d=(g.TYPEID=118,g.FIXED_OPERATION_LENGTH=12),p=g.CODE_OFFSET=0,h=g.REASON_OFFSET=p+f.INT_LENGTH,m=g.REQUEST_ID_OFFSET=h+f.REASON_LENGTH,E=g.OPERATION_OFFSET=m+f.INT_LENGTH;g.LENGTH=E+d}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubUnsubAlertResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],41:[function(T,e,b){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";b.__esModule=!0,b.FIXED_LENGTH=b.NUMBER_OF_TYPES_OFFSET=b.NUMBER_OF_SYMBOLS_OFFSET=b.CONFLATION_OFFSET=b.SKIP_HEAVY_INITIAL_LOAD_OFFSET=b.MIMETYPE_OFFSET=b.ACTION_OFFSET=b.REQUEST_ID_OFFSET=b.TYPEID=undefined;var f=T("../QitchConstants"),d=(b.TYPEID=102,b.REQUEST_ID_OFFSET=0),p=b.ACTION_OFFSET=d+f.INT_LENGTH,h=b.MIMETYPE_OFFSET=p+f.ACTION_LENGTH,m=b.SKIP_HEAVY_INITIAL_LOAD_OFFSET=h+f.MIMETYPE_LENGTH,E=b.CONFLATION_OFFSET=m+f.BOOLEAN_LENGTH,_=b.NUMBER_OF_SYMBOLS_OFFSET=E+f.CONFLATION_LENGTH,g=b.NUMBER_OF_TYPES_OFFSET=_+f.INT_LENGTH;b.FIXED_LENGTH=g+f.BYTE_LENGTH}).call(this,T("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},T("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],T("timers").setImmediate,T("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubscribeMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],42:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0,T.FIXED_LENGTH=T.NUMBER_OF_INVALID_SYMBOLS_OFFSET=T.NUMBER_OF_REJECTED_SYMBOLS_OFFSET=T.NUMBER_OF_ENTITLEMENTS_OFFSET=T.REQUEST_ID_OFFSET=T.REASON_OFFSET=T.CODE_OFFSET=T.TYPEID=undefined;var f=g("../QitchConstants"),d=(T.TYPEID=103,T.CODE_OFFSET=0),p=T.REASON_OFFSET=d+f.INT_LENGTH,h=T.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=T.NUMBER_OF_ENTITLEMENTS_OFFSET=h+f.INT_LENGTH,E=T.NUMBER_OF_REJECTED_SYMBOLS_OFFSET=m+f.INT_LENGTH,_=T.NUMBER_OF_INVALID_SYMBOLS_OFFSET=E+f.INT_LENGTH;T.FIXED_LENGTH=_+f.INT_LENGTH}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubscribeResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],43:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0,_.FIXED_LENGTH=_.NUMBER_OF_UNSUBSCRIBED_ENTITLEMENTS_OFFSET=_.REQUEST_ID_OFFSET=_.REASON_OFFSET=_.CODE_OFFSET=_.TYPEID=undefined;var f=E("../QitchConstants"),d=(_.TYPEID=104,_.CODE_OFFSET=0),p=_.REASON_OFFSET=d+f.INT_LENGTH,h=_.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=_.NUMBER_OF_UNSUBSCRIBED_ENTITLEMENTS_OFFSET=h+f.INT_LENGTH;_.FIXED_LENGTH=m+f.INT_LENGTH}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/UnsubscribeResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],44:[function(v,e,O){(function(t,n,r,i,o,s,a,u,l,c,f){"use strict";O.__esModule=!0;var d=E(v("../Qitch")),p=E(v("../MessageHeader")),h=E(v("../BlockHeader")),m=v("../QitchConstants");function E(e){return e&&e.__esModule?e:{"default":e}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var g=function(){function n(e,t){if(_(this,n),null==e)throw"Decoders cannot be null";this.buffer=new ArrayBuffer(t),this.bufferView=new Int8Array(this.buffer),this.bufferPosition=0,this.bufferCapacity=t,this.decodeblockheader=new b(this),this.decodemessageheader=new y(this),this.decodemessage=new S(e,this),this.state=new T,this.state.current=this.decodeblockheader,this.docompact=!1,this.doflip=!1}return n.prototype.messagecount=function(){return this.state.messagecount},n.prototype.blocksequencenumber=function(){return this.state.blocksequencenumber},n.prototype.add=function(e,t,n){var r=0;if(null!=e){if(this.docompact){var i=this.bufferPosition<=this.bufferLimit?this.bufferLimit-this.bufferPosition:0;d["default"].copyArray(this.bufferView,this.bufferPosition,this.bufferView,0,i),this.bufferPosition=i,this.bufferLimit=this.bufferCapacity,this.docompact=!1}n+this.bufferPosition>this.bufferView.length?(r=n-(this.bufferView.length-this.bufferPosition),d["default"].copyArray(e,t,this.bufferView,this.bufferPosition,n-r),this.messagelength=this.bufferView.length,this.bufferPosition=this.bufferView.length):(d["default"].copyArray(e,t,this.bufferView,this.bufferPosition,n),this.messagelength=n,this.bufferPosition=this.bufferPosition+this.messagelength),this.doflip=!0}return r},n.prototype.decode=function(){this.doflip&&(this.bufferLimit=this.bufferPosition,this.bufferPosition=0,this.doflip=!1),this.state.current===this.decodeblockheader?(this.state.blocklength=-1,this.state.messagecount=-1,this.state.blocksequencenumber=-1,this.state.messagelength=-1,this.state.messagetype=-1):this.state.current===this.decodemessageheader&&(this.state.messagelength=-1,this.state.messagetype=-1);var e=0;try{do{if(-1!==(e=this.state.current.decode(this.state,this.bufferView,this.bufferLimit,this.bufferPosition))&&(this.state.previous=this.state.current,this.state.current=this.state.next,this.state.next=null,this.bufferPosition=e),null!=this.state.result&&e>=this.messagelength)break}while(0<=e)}catch(n){throw this.state.current=this.decodeblockheader,this.bufferPosition=0,this.bufferLimit=this.bufferCapacity,n}var t=this.state.result;return this.state.result=null,this.docompact=!0,t},n}(),T=function e(){_(this,e),this.previous=null,this.current=null,this.next=null,this.blocklength=0,this.messagecount=0,this.blocksequencenumber=0,this.messagelength=0,this.messagetype=0,this.result=null},b=function(){function t(e){_(this,t),this.blockDecoder=e}return t.prototype.decode=function(e,t,n,r){return n-r<m.BLOCK_HEADER_LENGTH?-1:(e.blocklength=h["default"].lengthGetValue(t,r),e.messagecount=h["default"].messageCountGetValue(t,r),e.blocksequencenumber=h["default"].sequenceGetValue(t,r),0<e.messagecount?e.next=this.blockDecoder.decodemessageheader:e.next=this.blockDecoder.decodeblockheader,r+m.BLOCK_HEADER_LENGTH)},t}(),y=function(){function t(e){_(this,t),this.blockDecoder=e}return t.prototype.decode=function(e,t,n,r){return n-r<m.MESSAGE_HEADER_LENGTH?-1:(e.messagelength=p["default"].lengthGetValue(t,r),e.messagetype=p["default"].typeGetValue(t,r),e.next=this.blockDecoder.decodemessage,r)},t}(),S=function(){function n(e,t){_(this,n),this.decoders=e,this.blockDecoder=t}return n.prototype.decode=function(e,t,n,r){if(n-r<e.messagelength+m.MESSAGE_HEADER_LENGTH)return-1;var i=this.decoders.decode(t,r);return null!=i&&(e.result||(e.result=[]),i.messagecount=e.messagecount,i.blocksequencenumber=e.blocksequencenumber,e.result.push(i)),e.messagecount--,0<e.messagecount?e.next=this.blockDecoder.decodemessageheader:e.next=this.blockDecoder.decodeblockheader,r+m.MESSAGE_HEADER_LENGTH+e.messagelength},n}();O["default"]=g}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/qitch/decoder/BlockDecoder.js","/lib/qitch/decoder")},{"../BlockHeader":19,"../MessageHeader":24,"../Qitch":25,"../QitchConstants":26,_process:131,buffer:121,timers:152}],45:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=E("../MessageHeader"),p=(f=d)&&f.__esModule?f:{"default":f},h=E("../QitchConstants");var m=function(){function n(e){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),null===e)throw"Decoders cannot be null";this.decoders=new Map;var t=void 0;for(t=0;t<e.length;t++)this.decoders.set(e[t].type(),e[t])}return n.prototype.decode=function(e,t){if(null==e)throw"The source cannot be null";if(0===e.length)return null;var n=p["default"].typeGetValue(e,t),r=this.decoders.get(n);if(null==r)return null;var i=p["default"].lengthGetValue(e,t);this._check(e,t,i);var o=new Int8Array(e.buffer,h.MESSAGE_HEADER_LENGTH+t,i);return r.decode(o,0)},n.prototype._check=function(e,t,n){var r=e.length-t,i=h.MESSAGE_HEADER_LENGTH+n;if(r<i)throw"Not enough data available. Available: "+r+" Required: "+i},n}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/decoder/MessageDecoder.js","/lib/qitch/decoder")},{"../MessageHeader":24,"../QitchConstants":26,_process:131,buffer:121,timers:152}],46:[function(J,e,Z){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";Z.__esModule=!0,Z.MessageBlock=Z.BinaryMessage=undefined;var f=V(J("./BlockDecoder")),d=V(J("./MessageDecoder")),p=J("../../message.js"),h=V(J("./dataDecoder/TradeDecoder")),m=V(J("./dataDecoder/SymbolInfoDecoder")),E=V(J("./dataDecoder/PricedataDecoder")),_=V(J("./dataDecoder/SymbolStatusDecoder")),g=V(J("./dataDecoder/QuoteDecoder")),T=V(J("./dataDecoder/DerivativeInfoDecoder")),b=V(J("./dataDecoder/IVGreeksDecoder")),y=V(J("./dataDecoder/LastSaleDecoder")),S=V(J("./dataDecoder/LimitUpLimitDownDecoder")),v=V(J("./dataDecoder/ImbalanceStatusDecoder")),O=V(J("./dataDecoder/NethousePositionDecoder")),w=V(J("./dataDecoder/IntervalDecoder")),I=V(J("./dataDecoder/MMQuoteDecoder")),N=V(J("./dataDecoder/PurgeBookDecoder")),A=V(J("./dataDecoder/BookDeleteDecoder")),F=V(J("./dataDecoder/BookOrderDecoder")),C=V(J("../../SMessage")),M=V(J("./controlMessageDecoder/HeartbeatDecoder")),D=V(J("./controlMessageDecoder/InitialDataSentDecoder")),L=V(J("./controlMessageDecoder/ConnectResponseDecoder")),R=V(J("./controlMessageDecoder/StatsResponseDecoder")),B=V(J("./controlMessageDecoder/SubscribeResponseDecoder")),U=V(J("./controlMessageDecoder/UnsubscribeResponseDecoder")),k=V(J("./controlMessageDecoder/SlowConnectionDecoder")),P=V(J("./controlMessageDecoder/ConnectionCloseDecoder")),H=V(J("./controlMessageDecoder/ResubscribeMessageDecoder")),G=V(J("./controlMessageDecoder/ExchangeSubscribeResponseDecoder")),x=V(J("./controlMessageDecoder/ExchangeUnsubResponseDecoder")),j=V(J("./dataDecoder/AlertDecoder")),q=V(J("./controlMessageDecoder/SubUnsubAlertResponseDecoder"));function V(e){return e&&e.__esModule?e:{"default":e}}function Y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function Q(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var X=function(){function n(e){K(this,n);var t=[new M["default"],new B["default"],new U["default"],new L["default"],new P["default"],new R["default"],new k["default"],new D["default"],new H["default"],new q["default"],new m["default"],new h["default"],new E["default"],new _["default"],new g["default"],new T["default"],new b["default"],new y["default"],new S["default"],new v["default"],new O["default"],new w["default"],new I["default"],new N["default"],new A["default"],new F["default"],new G["default"],new x["default"],new j["default"]];this.decoder=new f["default"](new d["default"](t),e)}return n.prototype.decode=function(e){for(var t=e.length,n=[],r=0;0<t;){var i=t-this.decoder.add(e,r,t);r+=i,t-=i;var o=this.decoder.decode();if(null!=o)if(1===o.length&&1===o[0].messagecount)n.push(this._messageImpl(o[0]));else if(1<o.length)for(var s=0;s<o.length;s++)1<o[s].messagecount?(n.push(this._messageBlockImpl(o.slice(s+1,s+o[s].messagecount))),s+=o[s].messagecount+1):n.push(this._messageImpl(o[s]));else{for(var a=[],u=0;null!=o;)a[u++]=o,o=this.decoder.decode();n.push(this._messageBlockImpl(a))}}return n},n.prototype._messageBlockImpl=function(e){if(null==e||!(e instanceof Array)||0===e.length)return null;var t=new Array(e.length),n=void 0;for(n=0;n<e.length;n++)t[n]=this._messageImpl(e[n]);var r=new z;return r.sequencenumber=this.decoder.blocksequencenumber(),r.timestamp=(new Date).getMilliseconds(),r.encoding=p.Encodings.NONE_CHAR,r.mimetype=p.MimeTypes.QITCH_CHAR,r.messages=t,r},n.prototype._messageImpl=function(e){var t=new W;return t.sequencenumber=e.blocksequencenumber,t.timestamp=(new Date).getTime(),t.encoding=p.Encodings.NONE_CHAR,t.mimetype=p.MimeTypes.QITCH_CHAR,t.decodedPayload=e,t.id=e.requestId,t},n}(),W=Z.BinaryMessage=function(t){function n(){K(this,n);var e=Y(this,t.call(this));return e.type="1",e.decodedPayload=null,e}return Q(n,t),n}(C["default"]),z=Z.MessageBlock=function(t){function n(){K(this,n);var e=Y(this,t.call(this));return e.type="B",e.messages=null,e}return Q(n,t),n}(C["default"]);Z["default"]=X}).call(this,J("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},J("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],J("timers").setImmediate,J("timers").clearImmediate,"/lib/qitch/decoder/QitchDecoder.js","/lib/qitch/decoder")},{"../../SMessage":5,"../../message.js":17,"./BlockDecoder":44,"./MessageDecoder":45,"./controlMessageDecoder/ConnectResponseDecoder":47,"./controlMessageDecoder/ConnectionCloseDecoder":48,"./controlMessageDecoder/ExchangeSubscribeResponseDecoder":49,"./controlMessageDecoder/ExchangeUnsubResponseDecoder":50,"./controlMessageDecoder/HeartbeatDecoder":51,"./controlMessageDecoder/InitialDataSentDecoder":52,"./controlMessageDecoder/ResubscribeMessageDecoder":53,"./controlMessageDecoder/SlowConnectionDecoder":54,"./controlMessageDecoder/StatsResponseDecoder":55,"./controlMessageDecoder/SubUnsubAlertResponseDecoder":56,"./controlMessageDecoder/SubscribeResponseDecoder":57,"./controlMessageDecoder/UnsubscribeResponseDecoder":58,"./dataDecoder/AlertDecoder":59,"./dataDecoder/BookDeleteDecoder":60,"./dataDecoder/BookOrderDecoder":61,"./dataDecoder/DerivativeInfoDecoder":62,"./dataDecoder/IVGreeksDecoder":63,"./dataDecoder/ImbalanceStatusDecoder":64,"./dataDecoder/IntervalDecoder":65,"./dataDecoder/LastSaleDecoder":66,"./dataDecoder/LimitUpLimitDownDecoder":67,"./dataDecoder/MMQuoteDecoder":68,"./dataDecoder/NethousePositionDecoder":69,"./dataDecoder/PricedataDecoder":70,"./dataDecoder/PurgeBookDecoder":71,"./dataDecoder/QuoteDecoder":72,"./dataDecoder/SymbolInfoDecoder":73,"./dataDecoder/SymbolStatusDecoder":74,"./dataDecoder/TradeDecoder":75,_process:131,buffer:121,timers:152}],47:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ConnectResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ConnectResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n.version=m["default"].version(e,t+d.VERSION_OFFSET),n.flowControlCheckInterval=m["default"].int32(e,t+d.FLOW_CONTROL_CHECK_INTERVAL_OFFSET),n.serverInstance=m["default"].serverInstance(e,t+d.SERVER_INSTANCE_OFFSET),n.conflationMs=m["default"].int32(e,t+d.CONFLATION_OFFSET),n.rejectExcessiveConnection=m["default"].bool(e,t+d.REJECT_EXCESSIVE_CONNECTION_OFFSET),n.maxEntitlementsPerSubscription=m["default"].int32(e,t+d.MAX_ENTITLEMENTS_PER_SUBSCRIPTION_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ConnectResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ConnectResponseDef":27,_process:131,buffer:121,timers:152}],48:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ConnectionCloseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ConnectionClose;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ConnectionCloseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ConnectionCloseDef":28,_process:131,buffer:121,timers:152}],49:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ExchangeSubscribeResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ExchangeSubscribeResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ExchangeSubscribeResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ExchangeSubscribeResponseDef":30,_process:131,buffer:121,timers:152}],50:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ExchangeUnsubResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ExchangeUnsubscribeResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ExchangeUnsubResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ExchangeUnsubResponseDef":31,_process:131,buffer:121,timers:152}],51:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/HeartbeatDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.Heartbeat;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/HeartbeatDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/HeartbeatDef":33,_process:131,buffer:121,timers:152}],52:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/InitialDataSentDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.InitialDataSent;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/InitialDataSentDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/InitialDataSentDef":34,_process:131,buffer:121,timers:152}],53:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ResubscribeMessageDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ResubscribeMessage;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ResubscribeMessageDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ResubscribeMessageDef":35,_process:131,buffer:121,timers:152}],54:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/SlowConnectionDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.SlowConnection;return n.timesExceeded=m["default"].int32(e,t+d.TIMES_EXCEED_OFFSET),n.maxExceed=m["default"].int32(e,t+d.MAX_EXCEED_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/SlowConnectionDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/SlowConnectionDef":36,_process:131,buffer:121,timers:152}],55:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/StatsResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.StatsResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n.numberOfSubscribedSymbolsL1=m["default"].int32(e,t+d.NUMBER_OF_SUBSCRIBED_L1_OFFSET),n.numberOfAvailableSymbolsL1=m["default"].int32(e,t+d.NUMBER_OF_AVAILABLE_L1_OFFSET),n.numberOfSubscribedSymbolsL2=m["default"].int32(e,t+d.NUMBER_OF_SUBSCRIBED_L2_OFFSET),n.numberOfAvailableSymbolsL2=m["default"].int32(e,t+d.NUMBER_OF_AVAILABLE_L2_OFFSET),n.numberOfOpenedConnections=m["default"].int32(e,t+d.NUMBER_OF_OPENED_CONNECTIONS),n.numberOfAvailableConnections=m["default"].int32(e,t+d.NUMBER_OF_AVAILABLE_CONNECTIONS),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/StatsResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/StatsResponseDef":38,_process:131,buffer:121,timers:152}],56:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/SubUnsubAlertResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.AlertSubUnsubResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n.operation=m["default"].asciiString(e,t+d.OPERATION_OFFSET,d.FIXED_OPERATION_LENGTH),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/SubUnsubAlertResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/SubUnsubAlertResponseDef":40,_process:131,buffer:121,timers:152}],57:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(g("../../controlMessageDefinition/SubscribeResponseDef")),p=g("../../../streamer-api"),h=g("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f},E=g("../../QitchConstants");var _=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.SubscribeResponse;n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET);var r=m["default"].int32(e,t+d.NUMBER_OF_ENTITLEMENTS_OFFSET),i=m["default"].int32(e,t+d.NUMBER_OF_REJECTED_SYMBOLS_OFFSET),o=m["default"].int32(e,t+d.NUMBER_OF_INVALID_SYMBOLS_OFFSET);return n.entitlements=this._decodeEntitlements(e,t+d.FIXED_LENGTH,r),n.rejectedsymbols=this._decodeSymbolList(e,t+d.FIXED_LENGTH+r*E.ENTITLEMENT_LENGTH,i),n.invalidsymbols=this._decodeSymbolList(e,t+d.FIXED_LENGTH+r*E.ENTITLEMENT_LENGTH+i*E.SYMBOL_LENGTH,o),n},e.prototype._decodeEntitlements=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(m["default"].entitlement(e,t+i*E.ENTITLEMENT_LENGTH));return r},e.prototype._decodeSymbolList=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(m["default"].symbol(e,t+i*E.SYMBOL_LENGTH));return r},e}();T["default"]=_}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/SubscribeResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../QitchConstants":26,"../../controlMessageDefinition/SubscribeResponseDef":42,_process:131,buffer:121,timers:152}],58:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(g("../../controlMessageDefinition/UnsubscribeResponseDef")),p=g("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f},m=g("../../QitchConstants"),E=g("../../../streamer-api");var _=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new E.messages.control.UnsubscribeResponse;n.code=h["default"].int32(e,t+d.CODE_OFFSET),n.reason=h["default"].reason(e,t+d.REASON_OFFSET),n.requestId=h["default"].int32(e,t+d.REQUEST_ID_OFFSET);var r=h["default"].int32(e,t+d.NUMBER_OF_UNSUBSCRIBED_ENTITLEMENTS_OFFSET);return n.unsubscribed=this._decodeEntitlements(e,t+d.FIXED_LENGTH,r),n},e.prototype._decodeEntitlements=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(h["default"].entitlement(e,t+i*m.ENTITLEMENT_LENGTH));return r},e}();T["default"]=_}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/UnsubscribeResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../QitchConstants":26,"../../controlMessageDefinition/UnsubscribeResponseDef":43,_process:131,buffer:121,timers:152}],59:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/AlertDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.Alert;return n.symbol=m["default"].symbol(e,t+d.SYMBOL_OFFSET),n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.instrumentType=m["default"].instrumenttype(e,t+d.INSTRUMENTTYPE_OFFSET),n.alertId=m["default"].int64(e,t+d.ALERT_ID_OFFSET),n.triggerValue=m["default"].dec8double(e,t+d.TRIGGER_VALUE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/AlertDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/AlertDef":82,_process:131,buffer:121,timers:152}],60:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/BookDeleteDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.BookDelete;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.orderReference=m["default"].orderreference(e,t+d.ORDER_REFERENCE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/BookDeleteDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/BookDeleteDef":83,_process:131,buffer:121,timers:152}],61:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/BookOrderDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.BookOrder;n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.marketMakerID=m["default"].mmid(e,t+d.MMID_OFFSET),n.orderID=m["default"].orderIdLegacy(e,t+d.ORDERID_OFFSET),n.orderSide=m["default"].orderside(e,t+d.SIDE_OFFSET),n.price=m["default"].dec8double(e,t+d.PRICE_OFFSET),n.size=m["default"].int32(e,t+d.SIZE_OFFSET),n.lastUpdate=m["default"].timestamp(e,t+d.LASTUPDATE_OFFSET);var r=m["default"].int32(e,t+d.FLAGS_OFFSET);return n.flags=r,n.display=d.BookOrderFlags.isDisplay(r),n.orderChangeType=m["default"].bookOrderChangeType(e,t+d.CHANGE_TYPE_OFFSET),n.orderReference=m["default"].orderreference(e,t+d.ORDER_REFERENCE_OFFSET),n.excode=m["default"].excode(e,t+d.EXCODE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/BookOrderDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/BookOrderDef":84,_process:131,buffer:121,timers:152}],62:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/DerivativeInfoDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.DerivativeInfo;return n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.rootSymbol=m["default"].symbol(e,t+d.ROOTSYMBOL_OFFSET),n.expiration=m["default"].timestamp(e,t+d.EXPIRATION_OFFSET),n.delivery=m["default"].timestamp(e,t+d.DELIVERY_OFFSET),n.openInterest=m["default"].int64(e,t+d.OPENINTEREST_OFFSET),n.contractSize=m["default"].int32(e,t+d.CONTRACTSIZE_OFFSET),n.callPutIndicator=m["default"].asciichar(e,t+d.CALLPUTINDICATOR_OFFSET),n.minTickSize=m["default"].dec8double(e,t+d.MINTICKSIZE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/DerivativeInfoDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/DerivativeInfoDef":85,_process:131,buffer:121,timers:152}],63:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/IVGreeksDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.IVGreeks;return n.locateCode=m["default"].locatecode(e,t+d.LOCATECODE_OFFSET),n.lastCalculation=m["default"].timestamp(e,t+d.LAST_CALCULATION_OFFSET),n.delta=m["default"].dec8double(e,t+d.DELTA_OFFSET),n.gamma=m["default"].dec8double(e,t+d.GAMMA_OFFSET),n.vega=m["default"].dec8double(e,t+d.VEGA_OFFSET),n.rho=m["default"].dec8double(e,t+d.RHO_OFFSET),n.theta=m["default"].dec8double(e,t+d.THETA_OFFSET),n.midIV=m["default"].dec8double(e,t+d.IMPLIED_VOLATILITY_OFFSET),n.midIVChange=m["default"].dec8double(e,t+d.IMPLIED_VOLATILITY_CHANGE_OFFSET),n.bidIV=m["default"].dec8double(e,t+d.BID_IMPLIED_VOLATILITY_OFFSET),n.askIV=m["default"].dec8double(e,t+d.ASK_IMPLIED_VOLATILITY_OFFSET),n.mark=m["default"].dec8double(e,t+d.MARK_OFFSET),n.intrinsicValue=m["default"].dec8double(e,t+d.INTRINSIC_VALUE_OFFSET),n.extrinsicValue=m["default"].dec8double(e,t+d.EXTRINSIC_VALUE_OFFSET),n.previousMark=m["default"].dec8double(e,t+d.PREVIOUS_MARK_OFFSET),n.markChange=m["default"].dec8double(e,t+d.MARK_CHANGE_OFFSET),n.markChangePercent=m["default"].dec8double(e,t+d.MARK_CHANGE_PERCENT_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/IVGreeksDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/IVGreeksDef":86,_process:131,buffer:121,timers:152}],64:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/ImbalanceStatusDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.ImbalanceStatus;return n.locateCode=m["default"].locatecode(e,t+d.LOCATECODE_OFFSET),n.imbalanceType=m["default"].imbalancetype(e,t+d.IMBALANCE_TYPE_OFFSET),n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.referencePrice=m["default"].dec8double(e,t+d.REFERENCEPRICE_OFFSET),n.size=m["default"].int64(e,t+d.SIZE_OFFSET),n.side=m["default"].orderside(e,t+d.ORDERSIDE_OFFSET),n.pairedVolume=m["default"].int32(e,t+d.PAIREDVOLUME_OFFSET),n.nearIndicativePrice=m["default"].dec8double(e,t+d.NEARINDICATIVEPRICE_OFFSET),n.farIndicativePrice=m["default"].dec8double(e,t+d.FARINDICATIVEPRICE_OFFSET),n.priceVariation=m["default"].dec8double(e,t+d.PRICEVARIATION_OFFSET),n.symbol=m["default"].symbol(e,t+d.SYMBOL_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/ImbalanceStatusDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/ImbalanceStatusDef":87,_process:131,buffer:121,timers:152}],65:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/IntervalDef")),d=_("../../../streamer-api"),p=m(_("../../Qitch")),h=(m(_("jsbi")),m(_("bignumber.js")));function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return f.TYPEID},e.prototype.decode=function(e,t){var n=new d.messages.market.Interval;return n.timestamp=p["default"].timestamp(e,t+f.TIMESTAMP_OFFSET),n.locateCode=p["default"].locatecode(e,t+f.SYMBOL_OFFSET),n.open=p["default"].dec8double(e,t+f.OPEN_OFFSET),n.low=p["default"].dec8double(e,t+f.LOW_OFFSET),n.high=p["default"].dec8double(e,t+f.HIGH_OFFSET),n.last=p["default"].dec8double(e,t+f.LAST_OFFSET),n.volume=p["default"].dec8double(e,t+f.LONGDECIMALVOLUME_OFFSET),n.startTime=p["default"].timestamp(e,t+f.STARTTIME_OFFSET),n.openTime=p["default"].timestamp(e,t+f.OPENTIME_OFFSET),n.lastTime=p["default"].timestamp(e,t+f.LASTTIME_OFFSET),n.tradeValue=p["default"].int64(e,t+f.TRADEVALUE_OFFSET),n.vwap=this._vwap(n),n.periodMs=p["default"].int32(e,t+f.PERIODMS_OFFSET),n},e.prototype._vwap=function(e){return null!=e.tradeValue&&null!=e.volume&&0!==e.volume.toNumber()?new h["default"](e.tradeValue.toString()).dividedBy(e.volume):null},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/IntervalDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/IntervalDef":88,_process:131,"bignumber.js":118,buffer:121,jsbi:128,timers:152}],66:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/LastSaleDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.LastSale;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.last=m["default"].dec8double(e,t+d.LAST_OFFSET),n.previousClose=m["default"].dec8double(e,t+d.PREVCLOSE_OFFSET),n.accumulatedVolume=m["default"].dec8double(e,t+d.DECIMALACCUMULATEDVOLUME_OFFSET),n.tick=m["default"].tick(e,t+d.TICK_OFFSET),n.change=this._change(n),n.percentChange=this._percentChange(n),n.lastTradeExcode=m["default"].excode(e,t+d.LASTTRADE_EXCODE_OFFSET),n},e.prototype._change=function(e){return null!=e.last&&null!=e.previousClose?e.last.minus(e.previousClose):null},e.prototype._percentChange=function(e){return null==e.last||null==e.previousClose||e.previousClose.isEqualTo(0)?null:(e.last-e.previousClose)/e.previousClose*100},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/LastSaleDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/LastSaleDef":89,_process:131,buffer:121,timers:152}],67:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/LimitUpLimitDownDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.LimitUpLimitDown;n.locateCode=m["default"].int32(e,t+d.LOCATECODE_OFFSET),n.lowerLimit=m["default"].dec8double(e,t+d.LOWERLIMIT_OFFSET),n.effectiveTime=m["default"].timestamp(e,t+d.EFFECTIVETIME_OFFSET),n.upperLimit=m["default"].dec8double(e,t+d.UPPERLIMIT_OFFSET);var r=m["default"].sbyte(e,t+d.PRICEBANDINDICATOR_OFFSET);return n.bidNotExecutable=d.LimitUpLimitDownFlags.isBidNotExecutable(r),n.askNotExecutable=d.LimitUpLimitDownFlags.isAskNotExecutable(r),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/LimitUpLimitDownDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/LimitUpLimitDownDef":90,_process:131,buffer:121,timers:152}],68:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/MMQuoteDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.MMQuote;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.bidPrice=m["default"].dec8double(e,t+d.BIDPRICE_OFFSET),n.bidSize=m["default"].dec8double(e,t+d.DECIMALBIDSIZE_OFFSET),n.askPrice=m["default"].dec8double(e,t+d.ASKPRICE_OFFSET),n.askSize=m["default"].dec8double(e,t+d.DECIMALASKSIZE_OFFSET),n.marketMakerID=m["default"].mmid(e,t+d.MMID_OFFSET),n.indicator=m["default"].asciichar(e,t+d.INDICATOR_OFFSET),n.bidChange=m["default"].dec8double(e,t+d.BIDCHANGE_OFFSET),n.askChange=m["default"].dec8double(e,t+d.ASKCHANGE_OFFSET),n.sharesPerSizeUnit=m["default"].int32(e,t+d.SHARESPERSIZEUNIT_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/MMQuoteDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/MMQuoteDef":91,_process:131,buffer:121,timers:152}],69:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/NethousePositionDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.NethousePosition;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.marketMakerID=m["default"].mmid(e,t+d.MMID_OFFSET),n.buyValue=m["default"].dec8double(e,t+d.BUYVALUE_OFFSET),n.buyVolume=m["default"].int64(e,t+d.BUYVOLUME_OFFSET),n.sellValue=m["default"].dec8double(e,t+d.SELLVALUE_OFFSET),n.sellVolume=m["default"].int64(e,t+d.SELLVOLUME_OFFSET),n.buyBlockValue=m["default"].dec8double(e,t+d.BUYBLOCKVALUE_OFFSET),n.buyBlockVolume=m["default"].int64(e,t+d.BUYBLOCKVOLUME_OFFSET),n.sellBlockValue=m["default"].dec8double(e,t+d.SELLBLOCKVALUE_OFFSET),n.sellBlockVolume=m["default"].int64(e,t+d.SELLBLOCKVOLUME_OFFSET),n.buyTransactions=m["default"].int32(e,t+d.BUYTRANSACTIONS_OFFSET),n.sellTransactions=m["default"].int32(e,t+d.SELLTRANSACTIONS_OFFSET),n.buyBlockTransactions=m["default"].int32(e,t+d.BUYBLOCKTRANSACTIONS_OFFSET),n.sellBlockTransactions=m["default"].int32(e,t+d.SELLBLOCKTRANSACTIONS_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/NethousePositionDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/NethousePositionDef":92,_process:131,buffer:121,timers:152}],70:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/PricedataDef")),p=_("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f},m=_("../../../streamer-api.js");var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new m.messages.market.PriceData;n.timestamp=h["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=h["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.last=h["default"].dec8double(e,t+d.LAST_OFFSET),n.previousClose=h["default"].dec8double(e,t+d.PREVCLOSE_OFFSET),n.open=h["default"].dec8double(e,t+d.OPEN_OFFSET),n.high=h["default"].dec8double(e,t+d.HIGH_OFFSET),n.low=h["default"].dec8double(e,t+d.LOW_OFFSET),n.accumulatedVolume=h["default"].dec8double(e,t+d.DECIMALACCUMULATEDVOLUME_OFFSET),n.lastTradeTime=h["default"].timestamp(e,t+d.LASTTRADETIME_OFFSET),n.tick=h["default"].tick(e,t+d.TICK_OFFSET),n.lastTradeSize=h["default"].dec8double(e,t+d.DECIMALLASTTRADESIZE_OFFSET),n.close=h["default"].dec8double(e,t+d.CLOSE_OFFSET),n.tradeCount=h["default"].int64(e,t+d.TRADECOUNT_OFFSET),n.accumulatedPrice=null,n.accumulatedTradeValue=h["default"].dec8double(e,t+d.ACCUMULATEDTRADEVALUE_OFFSET),n.change=this._change(n),n.percentChange=this._percentChange(n);var r=h["default"].sbyte(e,t+d.FLAGS_OFFSET);return n.annualHigh=d.PricedataFlags.isAnnualHigh(r),n.annualLow=d.PricedataFlags.isAnnualLow(r),n.vwap=h["default"].dec8double(e,t+d.VWAP_OFFSET),n.twap=h["default"].dec8double(e,t+d.TWAP_OFFSET),n.preMarketTradeTime=h["default"].timestamp(e,t+d.PREMARKETTRADETIME_OFFSET),n.preMarketLast=h["default"].dec8double(e,t+d.PREMARKETLASTPRICE_OFFSET),n.preMarketVolume=h["default"].dec8double(e,t+d.DECIMALPREMARKETVOLUME_OFFSET),n.preMarketChange=h["default"].dec8double(e,t+d.PREMARKETCHANGE_OFFSET),n.preMarketPercentChange=this._premarketPercentChange(n),n.postMarketTradeTime=h["default"].timestamp(e,t+d.POSTMARKETTRADETIME_OFFSET),n.postMarketLast=h["default"].dec8double(e,t+d.POSTMARKETLASTPRICE_OFFSET),n.postMarketVolume=h["default"].dec8double(e,t+d.DECIMALPOSTMARKETVOLUME_OFFSET),n.postMarketChange=h["default"].dec8double(e,t+d.POSTMARKETCHANGE_OFFSET),n.postMarketPercentChange=this._postmarketPercentChange(n),n.lastTradeExcode=h["default"].excode(e,t+d.LASTTRADEEXCODE_OFFSET),n.currencyID=h["default"].currencyid(e,t+d.CURRENCYID_OFFSET),n.vwapVolume=h["default"].dec8double(e,t+d.VWAPVOLUME_OFFSET),n},e.prototype._change=function(e){return null!=e.last&&null!=e.previousClose?e.last.minus(e.previousClose):null},e.prototype._percentChange=function(e){return null==e.last||null==e.previousClose||e.previousClose.isEqualTo(0)?null:e.last.minus(e.previousClose).dividedBy(e.previousClose).multipliedBy(100)},e.prototype._premarketPercentChange=function(e){if(null!=e.preMarketChange){if(null!=e.close&&!e.close.isEqualTo(0))return e.preMarketChange.minus(e.close).dividedBy(e.close).multipliedBy(100);if(null!=e.previousClose&&!e.previousClose.isEqualTo(0))return e.preMarketChange.minus(e.previousClose).dividedBy(e.previousClose).multipliedBy(100)}return null},e.prototype._postmarketPercentChange=function(e){return null==e.postMarketLast||null==e.last||e.last.isEqualTo(0)?null:e.postMarketLast.minus(e.last).dividedBy(e.last).multipliedBy(100)},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/PricedataDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api.js":108,"../../Qitch":25,"../../marketDataDefinition/PricedataDef":93,_process:131,buffer:121,timers:152}],71:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/PurgeBookDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.PurgeBook;return n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/PurgeBookDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/PurgeBookDef":94,_process:131,buffer:121,timers:152}],72:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/QuoteDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.Quote;return n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.askCondition=m["default"].asciichar(e,t+d.ASKCONDITION_OFFSET),n.askExcode=m["default"].excode(e,t+d.ASKEXCODE_OFFSET),n.askPrice=m["default"].dec8double(e,t+d.ASKPRICE_OFFSET),n.askSize=m["default"].dec8double(e,t+d.DECIMALASKSIZE_OFFSET),n.bidCondition=m["default"].asciichar(e,t+d.BIDCONDITION_OFFSET),n.bidExcode=m["default"].excode(e,t+d.BIDEXCODE_OFFSET),n.bidPrice=m["default"].dec8double(e,t+d.BIDPRICE_OFFSET),n.bidSize=m["default"].dec8double(e,t+d.DECIMALBIDSIZE_OFFSET),n.indicator=m["default"].asciichar(e,t+d.INDICATOR_OFFSET),n.sharesPerSizeUnit=m["default"].int32(e,t+d.SHARESPERSIZEUNIT_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/QuoteDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/QuoteDef":95,_process:131,buffer:121,timers:152}],73:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/SymbolInfoDef")),p=_("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f},m=_("../../../streamer-api.js");var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new m.messages.market.SymbolInfo;return n.symbol=h["default"].symbol(e,t+d.SYMBOL_OFFSET),n.locateCode=h["default"].locatecode(e,t+d.LOCATECODE_OFFSET),n.excode=h["default"].excode(e,t+d.EXCODE_OFFSET),n.instrumentType=h["default"].instrumenttype(e,t+d.INSTRUMENTTYPE_OFFSET),n.currencyId=h["default"].currencyid(e,t+d.CURRENCYID_OFFSET),n.haltStatus=h["default"].sbyte(e,t+d.HALTSTATUS_OFFSET),n.haltIndicator=h["default"].sbyte(e,t+d.HALTINDICATOR_OFFSET),n.regSHOStatus=h["default"].asciichar(e,t+d.REGSHOSTATUS_OFFSET),n.pqe=0<h["default"].sbyte(e,t+d.PQE_OFFSET),n.caveatEmptor=0<h["default"].sbyte(e,t+d.CAVEATEMPTOR_OFFSET),n.boardLotSize=h["default"].int32(e,t+d.BOARDLOTSIZE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/SymbolInfoDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api.js":108,"../../Qitch":25,"../../marketDataDefinition/SymbolInfoDef":96,_process:131,buffer:121,timers:152}],74:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/SymbolStatusDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.SymbolStatus;return n.locateCode=m["default"].locatecode(e,t+d.LOCATE_CODE_OFFSET),n.haltStatus=m["default"].sbyte(e,t+d.HALTSTATUS_OFFSET),n.haltIndicator=m["default"].sbyte(e,t+d.HALTINDICATOR_OFFSET),n.regSHOStatus=m["default"].asciichar(e,t+d.REGSHOSTATUS_OFFSET),n.closingCalculatedPrice=m["default"].dec8double(e,t+d.CLOSINGPRICE_OFFSET),n.effectiveTime=m["default"].timestamp(e,t+d.EFFECTIVETIME_OFFSET),n.openingTime=m["default"].timestamp(e,t+d.OPENINGTIME_OFFSET),n.note=m["default"].note(e,t+d.NOTE_OFFSET),n.symbol=m["default"].symbol(e,t+d.SYMBOL_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/SymbolStatusDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/SymbolStatusDef":97,_process:131,buffer:121,timers:152}],75:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=_("../../Qitch"),p=(f=d)&&f.__esModule?f:{"default":f},h=_("../../../streamer-api.js"),m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/TradeDef"));var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return m.TYPEID},e.prototype.decode=function(e,t){var n=new h.messages.market.Trade;return n.timestamp=p["default"].timestamp(e,t+m.TIMESTAMP_OFFSET),n.locateCode=p["default"].locatecode(e,t+m.SYMBOL_OFFSET),n.price=p["default"].dec8double(e,t+m.PRICE_OFFSET),n.size=p["default"].dec8double(e,t+m.DECIMALSIZE_OFFSET),n.indicator=p["default"].asciichar(e,t+m.INDICATOR_OFFSET),n.tick=p["default"].tick(e,t+m.TICK_OFFSET),n.accumulatedVolume=p["default"].dec8double(e,t+m.DECIMALACCUMULATEDVOLUME_OFFSET),n.sequenceNumber=p["default"].int32(e,t+m.SEQUENCENUMBER_OFFSET),n.flags=p["default"].int32(e,t+m.FLAGS_OFFSET),n.buyerID=p["default"].mmid(e,t+m.BUYERMMID_OFFSET),n.sellerID=p["default"].mmid(e,t+m.SELLERMMID_OFFSET),n.rangeIndicator=p["default"].rangeindicator(e,t+m.RANGEINDICATOR_OFFSET),n.matchID=p["default"].int64(e,t+m.MATCHID_OFFSET),n.vwap=p["default"].dec8double(e,t+m.VWAP_OFFSET),n.excode=p["default"].excode(e,t+m.EXCODE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/TradeDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api.js":108,"../../Qitch":25,"../../marketDataDefinition/TradeDef":98,_process:131,buffer:121,timers:152}],76:[function(I,e,N){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";N.__esModule=!0;var f=I("../../streamer-api"),d=S(I("../../SMessage")),p=I("../QitchConstants"),h=S(I("../BlockHeader")),m=I("../../streamer-utils"),E=S(I("../MessageHeader")),_=S(I("./controlMessageEncoder/StatsMessageEncoder")),g=S(I("./controlMessageEncoder/SubscribeMessageEncoder")),T=S(I("./controlMessageEncoder/FlowMessageEncoder")),b=S(I("./controlMessageEncoder/ExchangeSubscribeMessageEncoder")),y=S(I("./controlMessageEncoder/SubUnsubAlertMessageEncoder"));function S(e){return e&&e.__esModule?e:{"default":e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var O=function(){function e(){v(this,e),this.encoder=new w}return e.prototype.encode=function(e,t){if(null==e)throw"Argument cannot be null.";if(!e instanceof d["default"])throw"Wrong message type";var n=this.encoder.length(e.payload),r=p.BLOCK_HEADER_LENGTH+n,i=new ArrayBuffer(t+r),o=new Int8Array(i);return h["default"].lengthToBytes(o,t,n),h["default"].messageCountToBytes(o,t,1),h["default"].reservedToBytes(o,t,0),h["default"].sequenceToBytes(o,t,e.sequencenumber),this.encoder.encode(o,t+p.BLOCK_HEADER_LENGTH,e.payload)},e}(),w=function(){function e(){v(this,e),this[f.messages.MessageTypeNames.ctrl.STATS]=new _["default"],this[f.messages.MessageTypeNames.ctrl.FLOW]=new T["default"],this[f.messages.MessageTypeNames.ctrl.SUBSCRIBE]=new g["default"],this[f.messages.MessageTypeNames.ctrl.EXCHANGE_SUBSCRIBE]=new b["default"],this[f.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB]=new y["default"]}return e.prototype.length=function(e){var t=this[(0,m.messagetype)(e)];return null!==t?t.length(e)+p.MESSAGE_HEADER_LENGTH:0},e.prototype.encode=function(e,t,n){var r=this[(0,m.messagetype)(n)];return null!==r?(E["default"].lengthGetBytes(e,t,r.length(n)),E["default"].typeGetBytes(e,t,r.type()),r.encode(e,t+p.MESSAGE_HEADER_LENGTH,n)):e},e}();N["default"]=O}).call(this,I("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],I("timers").setImmediate,I("timers").clearImmediate,"/lib/qitch/encoder/QitchEncoder.js","/lib/qitch/encoder")},{"../../SMessage":5,"../../streamer-api":108,"../../streamer-utils":110,"../BlockHeader":19,"../MessageHeader":24,"../QitchConstants":26,"./controlMessageEncoder/ExchangeSubscribeMessageEncoder":77,"./controlMessageEncoder/FlowMessageEncoder":78,"./controlMessageEncoder/StatsMessageEncoder":79,"./controlMessageEncoder/SubUnsubAlertMessageEncoder":80,"./controlMessageEncoder/SubscribeMessageEncoder":81,_process:131,buffer:121,timers:152}],77:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/ExchangeSubscribeMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.FIXED_LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.id),h["default"].putAction(e,t+d.ACTION_OFFSET,n.action),h["default"].putMimetype(e,t+d.MIMETYPE_OFFSET,n.mimetype),h["default"].putConflation(e,t+d.CONFLATION_OFFSET,n.conflation),h["default"].putExcode(e,t+d.EXCODE_OFFSET,n.exchange),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/ExchangeSubscribeMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/ExchangeSubscribeMessageDef":29,_process:131,buffer:121,timers:152}],78:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/FlowMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.SEQUENCE_NUMBER_OFFSET,n.sequence),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/FlowMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/FlowMessageDef":32,_process:131,buffer:121,timers:152}],79:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/StatsMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.sequenceNumber),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/StatsMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/StatsMessageDef":37,_process:131,buffer:121,timers:152}],80:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/SubUnsubAlertMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.FIXED_LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.id),h["default"].putAsciiString(e,t+d.OPERATION_OFFSET,n.operation,d.FIXED_OPERATION_LENGTH),h["default"].putMimetype(e,t+d.MIMETYPE_OFFSET,n.mimetype),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/SubUnsubAlertMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/SubUnsubAlertMessageDef":39,_process:131,buffer:121,timers:152}],81:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/SubscribeMessageDef")),p=_("../../QitchConstants"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){var t=p.SYMBOL_LENGTH*e.symbols.length,n=p.MARKETDATATYPE_LENGTH*e.types.length;return d.FIXED_LENGTH+t+n},e.prototype.encode=function(e,t,n){var r=p.SYMBOL_LENGTH*n.symbols.length;return m["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.id),m["default"].putAction(e,t+d.ACTION_OFFSET,n.action),m["default"].putMimetype(e,t+d.MIMETYPE_OFFSET,n.mimetype),m["default"].putBool(e,t+d.SKIP_HEAVY_INITIAL_LOAD_OFFSET,n.skipHeavyInitialLoad),m["default"].putConflation(e,t+d.CONFLATION_OFFSET,n.conflation),m["default"].putInt32(e,t+d.NUMBER_OF_SYMBOLS_OFFSET,n.symbols.length),m["default"].putByte(e,t+d.NUMBER_OF_TYPES_OFFSET,n.types.length),this._encodeSymbols(n,t+d.FIXED_LENGTH,e),this._encodeMarketdataTypes(n,t+d.FIXED_LENGTH+r,e),e},e.prototype._encodeSymbols=function(e,t,n){for(var r=0;r<e.symbols.length;r++)m["default"].putSymbol(n,t+r*p.SYMBOL_LENGTH,e.symbols[r])},e.prototype._encodeMarketdataTypes=function(e,t,n){for(var r=0;r<e.types.length;r++)m["default"].putMarketdatatype(n,t+r*p.MARKETDATATYPE_LENGTH,e.types[r])},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/SubscribeMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../QitchConstants":26,"../../controlMessageDefinition/SubscribeMessageDef":41,_process:131,buffer:121,timers:152}],82:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0,g.LENGTH=g.TRIGGER_VALUE_OFFSET=g.ALERT_ID_OFFSET=g.INSTRUMENTTYPE_OFFSET=g.TIMESTAMP_OFFSET=g.SYMBOL_OFFSET=g.TYPEID=undefined;var f=_("../QitchConstants"),d=(g.TYPEID=17,g.SYMBOL_OFFSET=0),p=g.TIMESTAMP_OFFSET=d+f.SYMBOL_LENGTH,h=g.INSTRUMENTTYPE_OFFSET=p+f.TIMESTAMP_LENGTH,m=g.ALERT_ID_OFFSET=h+f.INSTRUMENTTYPE_LENGTH,E=g.TRIGGER_VALUE_OFFSET=m+f.LONG_LENGTH;g.LENGTH=E+f.DOUBLE_LENGTH}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/marketDataDefinition/AlertDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],83:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E.LENGTH=E.ORDER_REFERENCE_OFFSET=E.SYMBOL_OFFSET=E.TIMESTAMP_OFFSET=E.TYPEID=undefined;var f=m("../QitchConstants"),d=(E.TYPEID=5,E.TIMESTAMP_OFFSET=0),p=E.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=E.ORDER_REFERENCE_OFFSET=p+f.LOCATECODE_LENGTH;E.LENGTH=h+f.ORDER_REFERENCE_LENGTH}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/qitch/marketDataDefinition/BookDeleteDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],84:[function(w,e,I){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";I.__esModule=!0,I.BookOrderFlags=I.LENGTH=I.EXCODE_OFFSET=I.ORDER_REFERENCE_OFFSET=I.CHANGE_TYPE_OFFSET=I.FLAGS_OFFSET=I.LASTUPDATE_OFFSET=I.SIZE_OFFSET=I.PRICE_OFFSET=I.SIDE_OFFSET=I.ORDERID_OFFSET=I.MMID_OFFSET=I.SYMBOL_OFFSET=I.TIMESTAMP_OFFSET=I.TYPEID=undefined;var f=w("../QitchConstants");I.TYPEID=4;var d=I.TIMESTAMP_OFFSET=0,p=I.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=I.MMID_OFFSET=p+f.LOCATECODE_LENGTH,m=I.ORDERID_OFFSET=h+f.MMID_LENGTH,E=I.SIDE_OFFSET=m+f.ORDERID_LENGTH,_=I.PRICE_OFFSET=E+f.ORDERSIDE_LENGTH,g=I.SIZE_OFFSET=_+f.DOUBLE_LENGTH,T=I.LASTUPDATE_OFFSET=g+f.INT_LENGTH,b=I.FLAGS_OFFSET=T+f.TIMESTAMP_LENGTH,y=I.CHANGE_TYPE_OFFSET=b+f.INT_LENGTH,S=I.ORDER_REFERENCE_OFFSET=y+f.ASCIICHAR_LENGTH,v=I.EXCODE_OFFSET=S+f.ORDER_REFERENCE_LENGTH,O=(I.LENGTH=v+f.EXCODE_LENGTH,I.BookOrderFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isLotsOf=function(e){return 0<(e&t.prototype.LOTSOF_MASK)},t.isAllOrNone=function(e){return 0<(e&t.prototype.ALLORNONE_MASK)},t.isMinimumFillVolume=function(e){return 0<(e&t.prototype.MINIMUMFILLVOLUME_MASK)},t.isNonResident=function(e){return 0<(e&t.prototype.NONRESIDENT_MASK)},t.isCashSettlement=function(e){return 0<(e&t.prototype.CASHSETTLEMENT_MASK)},t.isCashTodaySettlement=function(e){return 0<(e&t.prototype.CASHTODAYSETTLEMENT_MASK)},t.isDelayedDateSettlement=function(e){return 0<(e&t.prototype.DELAYEDDATESETTLEMENT_MASK)},t.isDerivativeRelatedSettlement=function(e){return 0<(e&t.prototype.DERIVATIVERELATEDSETTLEMENT_MASK)},t.isNonNetSettlement=function(e){return 0<(e&t.prototype.NONNETSETTLEMENT_MASK)},t.isMarketOrder=function(e){return 0<(e&t.prototype.MARKETORDER_MASK)},t.isFirmQuote=function(e){return 0<(e&t.prototype.FIRMQUOTE_MASK)},t.isDisplay=function(e){return 0<(e&t.prototype.DISPLAY_MASK)},t.isMarketPrice=function(e){return 0<(e&t.prototype.PRICE_MARKET_MASK)},t.isOpeningPrice=function(e){return 0<(e&t.prototype.PRICE_OPENING_MASK)},t.isPriceMustBeFilled=function(e){return 0<(e&t.prototype.PRICE_MUSTBEFILLED_MASK)},t.isFutureSettlement=function(e){return 0<(e&t.prototype.FUTURESETTLEMENT_MASK)},t.isNextDaySettlement=function(e){return 0<(e&t.prototype.NEXTDAYSETTLEMENT_MASK)},t}());O.prototype.LOTSOF_MASK=1,O.prototype.ALLORNONE_MASK=2,O.prototype.MINIMUMFILLVOLUME_MASK=4,O.prototype.NONRESIDENT_MASK=8,O.prototype.CASHSETTLEMENT_MASK=16,O.prototype.CASHTODAYSETTLEMENT_MASK=32,O.prototype.DELAYEDDATESETTLEMENT_MASK=64,O.prototype.DERIVATIVERELATEDSETTLEMENT_MASK=128,O.prototype.NONNETSETTLEMENT_MASK=256,O.prototype.MARKETORDER_MASK=512,O.prototype.FIRMQUOTE_MASK=1024,O.prototype.DISPLAY_MASK=16777216,O.prototype.PRICE_MARKET_MASK=268435456,O.prototype.PRICE_OPENING_MASK=536870912,O.prototype.PRICE_MUSTBEFILLED_MASK=1073741824,O.prototype.FUTURESETTLEMENT_MASK=2048,O.prototype.NEXTDAYSETTLEMENT_MASK=4096}).call(this,w("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],w("timers").setImmediate,w("timers").clearImmediate,"/lib/qitch/marketDataDefinition/BookOrderDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],85:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0,y.LENGTH=y.MINTICKSIZE_OFFSET=y.CALLPUTINDICATOR_OFFSET=y.CONTRACTSIZE_OFFSET=y.OPENINTEREST_OFFSET=y.DELIVERY_OFFSET=y.EXPIRATION_OFFSET=y.ROOTSYMBOL_OFFSET=y.SYMBOL_OFFSET=y.TYPEID=undefined;var f=b("../QitchConstants"),d=(y.TYPEID=12,y.SYMBOL_OFFSET=0),p=y.ROOTSYMBOL_OFFSET=d+f.LOCATECODE_LENGTH,h=y.EXPIRATION_OFFSET=p+f.SYMBOL_LENGTH,m=y.DELIVERY_OFFSET=h+f.TIMESTAMP_LENGTH,E=y.OPENINTEREST_OFFSET=m+f.TIMESTAMP_LENGTH,_=y.CONTRACTSIZE_OFFSET=E+f.LONG_LENGTH,g=y.CALLPUTINDICATOR_OFFSET=_+f.INT_LENGTH,T=y.MINTICKSIZE_OFFSET=g+f.ASCIICHAR_LENGTH;y.LENGTH=T+f.DOUBLE_LENGTH}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/qitch/marketDataDefinition/DerivativeInfoDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],86:[function(F,e,C){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";C.__esModule=!0,C.LENGTH=C.MARK_CHANGE_PERCENT_OFFSET=C.MARK_CHANGE_OFFSET=C.PREVIOUS_MARK_OFFSET=C.EXTRINSIC_VALUE_OFFSET=C.INTRINSIC_VALUE_OFFSET=C.MARK_OFFSET=C.LAST_CALCULATION_OFFSET=C.ASK_IMPLIED_VOLATILITY_OFFSET=C.BID_IMPLIED_VOLATILITY_OFFSET=C.IMPLIED_VOLATILITY_CHANGE_OFFSET=C.IMPLIED_VOLATILITY_OFFSET=C.THETA_OFFSET=C.RHO_OFFSET=C.VEGA_OFFSET=C.GAMMA_OFFSET=C.DELTA_OFFSET=C.LOCATECODE_OFFSET=C.TYPEID=undefined;var f=F("../QitchConstants"),d=(C.TYPEID=15,C.LOCATECODE_OFFSET=0),p=C.DELTA_OFFSET=d+f.INT_LENGTH,h=C.GAMMA_OFFSET=p+f.DOUBLE_LENGTH,m=C.VEGA_OFFSET=h+f.DOUBLE_LENGTH,E=C.RHO_OFFSET=m+f.DOUBLE_LENGTH,_=C.THETA_OFFSET=E+f.DOUBLE_LENGTH,g=C.IMPLIED_VOLATILITY_OFFSET=_+f.DOUBLE_LENGTH,T=C.IMPLIED_VOLATILITY_CHANGE_OFFSET=g+f.DOUBLE_LENGTH,b=C.BID_IMPLIED_VOLATILITY_OFFSET=T+f.DOUBLE_LENGTH,y=C.ASK_IMPLIED_VOLATILITY_OFFSET=b+f.DOUBLE_LENGTH,S=C.LAST_CALCULATION_OFFSET=y+f.DOUBLE_LENGTH,v=C.MARK_OFFSET=S+f.TIMESTAMP_LENGTH,O=C.INTRINSIC_VALUE_OFFSET=v+f.DOUBLE_LENGTH,w=C.EXTRINSIC_VALUE_OFFSET=O+f.DOUBLE_LENGTH,I=C.PREVIOUS_MARK_OFFSET=w+f.DOUBLE_LENGTH,N=C.MARK_CHANGE_OFFSET=I+f.DOUBLE_LENGTH,A=C.MARK_CHANGE_PERCENT_OFFSET=N+f.DOUBLE_LENGTH;C.LENGTH=A+f.DOUBLE_LENGTH}).call(this,F("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},F("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],F("timers").setImmediate,F("timers").clearImmediate,"/lib/qitch/marketDataDefinition/IVGreeksDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],87:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0,O.LENGTH=O.SYMBOL_OFFSET=O.PRICEVARIATION_OFFSET=O.FARINDICATIVEPRICE_OFFSET=O.NEARINDICATIVEPRICE_OFFSET=O.PAIREDVOLUME_OFFSET=O.ORDERSIDE_OFFSET=O.SIZE_OFFSET=O.REFERENCEPRICE_OFFSET=O.TIMESTAMP_OFFSET=O.IMBALANCE_TYPE_OFFSET=O.LOCATECODE_OFFSET=O.TYPEID=undefined;var f=v("../QitchConstants"),d=(O.TYPEID=16,O.LOCATECODE_OFFSET=0),p=O.IMBALANCE_TYPE_OFFSET=d+f.LOCATECODE_LENGTH,h=O.TIMESTAMP_OFFSET=p+f.IMBALANCETYPE_LENGTH,m=O.REFERENCEPRICE_OFFSET=h+f.TIMESTAMP_LENGTH,E=O.SIZE_OFFSET=m+f.DOUBLE_LENGTH,_=O.ORDERSIDE_OFFSET=E+f.LONG_LENGTH,g=O.PAIREDVOLUME_OFFSET=_+f.ORDERSIDE_LENGTH,T=O.NEARINDICATIVEPRICE_OFFSET=g+f.INT_LENGTH,b=O.FARINDICATIVEPRICE_OFFSET=T+f.DOUBLE_LENGTH,y=O.PRICEVARIATION_OFFSET=b+f.DOUBLE_LENGTH,S=O.SYMBOL_OFFSET=y+f.DOUBLE_LENGTH;O.LENGTH=S+f.SYMBOL_LENGTH}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/qitch/marketDataDefinition/ImbalanceStatusDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],88:[function(w,e,I){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";I.__esModule=!0,I.LENGTH=I.PERIODMS_OFFSET=I.LONGDECIMALVOLUME_OFFSET=I.TRADEVALUE_OFFSET=I.LASTTIME_OFFSET=I.OPENTIME_OFFSET=I.STARTTIME_OFFSET=I.VOLUME_OFFSET=I.LAST_OFFSET=I.HIGH_OFFSET=I.LOW_OFFSET=I.OPEN_OFFSET=I.SYMBOL_OFFSET=I.TIMESTAMP_OFFSET=I.TYPEID=undefined;var f=w("../QitchConstants"),d=(I.TYPEID=8,I.TIMESTAMP_OFFSET=0),p=I.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=I.OPEN_OFFSET=p+f.LOCATECODE_LENGTH,m=I.LOW_OFFSET=h+f.DOUBLE_LENGTH,E=I.HIGH_OFFSET=m+f.DOUBLE_LENGTH,_=I.LAST_OFFSET=E+f.DOUBLE_LENGTH,g=I.VOLUME_OFFSET=_+f.DOUBLE_LENGTH,T=I.STARTTIME_OFFSET=g+f.LONG_LENGTH,b=I.OPENTIME_OFFSET=T+f.TIMESTAMP_LENGTH,y=I.LASTTIME_OFFSET=b+f.TIMESTAMP_LENGTH,S=I.TRADEVALUE_OFFSET=y+f.TIMESTAMP_LENGTH,v=I.LONGDECIMALVOLUME_OFFSET=S+f.LONG_LENGTH,O=I.PERIODMS_OFFSET=v+f.DOUBLE_LENGTH;I.LENGTH=O+f.INT_LENGTH}).call(this,w("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],w("timers").setImmediate,w("timers").clearImmediate,"/lib/qitch/marketDataDefinition/IntervalDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],89:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0,y.LENGTH=y.DECIMALACCUMULATEDVOLUME_OFFSET=y.LASTTRADE_EXCODE_OFFSET=y.TICK_OFFSET=y.ACCUMULATEDVOLUME_OFFSET=y.PREVCLOSE_OFFSET=y.LAST_OFFSET=y.SYMBOL_OFFSET=y.TIMESTAMP_OFFSET=y.TYPEID=undefined;var f=b("../QitchConstants"),d=(b("./TradeDef"),y.TYPEID=13,y.TIMESTAMP_OFFSET=0),p=y.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=y.LAST_OFFSET=p+f.LOCATECODE_LENGTH,m=y.PREVCLOSE_OFFSET=h+f.DOUBLE_LENGTH,E=y.ACCUMULATEDVOLUME_OFFSET=m+f.DOUBLE_LENGTH,_=y.TICK_OFFSET=E+f.LONG_LENGTH,g=y.LASTTRADE_EXCODE_OFFSET=_+f.TICK_LENGTH,T=y.DECIMALACCUMULATEDVOLUME_OFFSET=g+f.EXCODE_LENGTH;y.LENGTH=T+f.DOUBLE_LENGTH}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/qitch/marketDataDefinition/LastSaleDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,"./TradeDef":98,_process:131,buffer:121,timers:152}],90:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0,T.LimitUpLimitDownFlags=T.LENGTH=T.UPPERLIMIT_OFFSET=T.LOWERLIMIT_OFFSET=T.EFFECTIVETIME_OFFSET=T.PRICEBANDINDICATOR_OFFSET=T.LOCATECODE_OFFSET=T.TYPEID=undefined;var f=g("../QitchConstants");T.TYPEID=14;var d=T.LOCATECODE_OFFSET=0,p=T.PRICEBANDINDICATOR_OFFSET=d+f.INT_LENGTH,h=T.EFFECTIVETIME_OFFSET=p+f.BYTE_LENGTH,m=T.LOWERLIMIT_OFFSET=h+f.TIMESTAMP_LENGTH,E=T.UPPERLIMIT_OFFSET=m+f.DOUBLE_LENGTH,_=(T.LENGTH=E+f.DOUBLE_LENGTH,T.LimitUpLimitDownFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isBidNotExecutable=function(e){return 0<(e&t.prototype.BID_NOT_EXECUTABLE)},t.isAskNotExecutable=function(e){return 0<(e&t.prototype.ASK_NOT_EXECUTABLE)},t}());_.prototype.BID_NOT_EXECUTABLE=1,_.prototype.ASK_NOT_EXECUTABLE=2}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/marketDataDefinition/LimitUpLimitDownDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],91:[function(w,e,I){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";I.__esModule=!0,I.LENGTH=I.DECIMALASKSIZE_OFFSET=I.DECIMALBIDSIZE_OFFSET=I.SHARESPERSIZEUNIT_OFFSET=I.ASKCHANGE_OFFSET=I.BIDCHANGE_OFFSET=I.INDICATOR_OFFSET=I.MMID_OFFSET=I.ASKSIZE_OFFSET=I.ASKPRICE_OFFSET=I.BIDSIZE_OFFSET=I.BIDPRICE_OFFSET=I.SYMBOL_OFFSET=I.TIMESTAMP_OFFSET=I.TYPEID=undefined;var f=w("../QitchConstants"),d=(I.TYPEID=7,I.TIMESTAMP_OFFSET=0),p=I.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=I.BIDPRICE_OFFSET=p+f.LOCATECODE_LENGTH,m=I.BIDSIZE_OFFSET=h+f.DOUBLE_LENGTH,E=I.ASKPRICE_OFFSET=m+f.INT_LENGTH,_=I.ASKSIZE_OFFSET=E+f.DOUBLE_LENGTH,g=I.MMID_OFFSET=_+f.INT_LENGTH,T=I.INDICATOR_OFFSET=g+f.MMID_LENGTH,b=I.BIDCHANGE_OFFSET=T+f.ASCIICHAR_LENGTH,y=I.ASKCHANGE_OFFSET=b+f.DOUBLE_LENGTH,S=I.SHARESPERSIZEUNIT_OFFSET=y+f.DOUBLE_LENGTH,v=I.DECIMALBIDSIZE_OFFSET=S+f.INT_LENGTH,O=I.DECIMALASKSIZE_OFFSET=v+f.DOUBLE_LENGTH;I.LENGTH=O+f.DOUBLE_LENGTH}).call(this,w("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],w("timers").setImmediate,w("timers").clearImmediate,"/lib/qitch/marketDataDefinition/MMQuoteDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],92:[function(N,e,A){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";A.__esModule=!0,A.LENGTH=A.SELLBLOCKTRANSACTIONS_OFFSET=A.BUYBLOCKTRANSACTIONS_OFFSET=A.SELLTRANSACTIONS_OFFSET=A.BUYTRANSACTIONS_OFFSET=A.SELLBLOCKVOLUME_OFFSET=A.SELLBLOCKVALUE_OFFSET=A.BUYBLOCKVOLUME_OFFSET=A.BUYBLOCKVALUE_OFFSET=A.SELLVOLUME_OFFSET=A.SELLVALUE_OFFSET=A.BUYVOLUME_OFFSET=A.BUYVALUE_OFFSET=A.MMID_OFFSET=A.SYMBOL_OFFSET=A.TIMESTAMP_OFFSET=A.TYPEID=undefined;var f=N("../QitchConstants"),d=(A.TYPEID=9,A.TIMESTAMP_OFFSET=0),p=A.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=A.MMID_OFFSET=p+f.LOCATECODE_LENGTH,m=A.BUYVALUE_OFFSET=h+f.MMID_LENGTH,E=A.BUYVOLUME_OFFSET=m+f.DOUBLE_LENGTH,_=A.SELLVALUE_OFFSET=E+f.LONG_LENGTH,g=A.SELLVOLUME_OFFSET=_+f.DOUBLE_LENGTH,T=A.BUYBLOCKVALUE_OFFSET=g+f.LONG_LENGTH,b=A.BUYBLOCKVOLUME_OFFSET=T+f.DOUBLE_LENGTH,y=A.SELLBLOCKVALUE_OFFSET=b+f.LONG_LENGTH,S=A.SELLBLOCKVOLUME_OFFSET=y+f.DOUBLE_LENGTH,v=A.BUYTRANSACTIONS_OFFSET=S+f.LONG_LENGTH,O=A.SELLTRANSACTIONS_OFFSET=v+f.INT_LENGTH,w=A.BUYBLOCKTRANSACTIONS_OFFSET=O+f.INT_LENGTH,I=A.SELLBLOCKTRANSACTIONS_OFFSET=w+f.INT_LENGTH;A.LENGTH=I+f.INT_LENGTH}).call(this,N("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},N("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],N("timers").setImmediate,N("timers").clearImmediate,"/lib/qitch/marketDataDefinition/NethousePositionDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],93:[function(Y,e,Q){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";Q.__esModule=!0,Q.PricedataFlags=Q.LENGTH=Q.VWAPVOLUME_OFFSET=Q.CURRENCYID_OFFSET=Q.DECIMALLASTTRADESIZE_OFFSET=Q.DECIMALPOSTMARKETVOLUME_OFFSET=Q.DECIMALPREMARKETVOLUME_OFFSET=Q.DECIMALACCUMULATEDVOLUME_OFFSET=Q.LASTTRADEEXCODE_OFFSET=Q.POSTMARKETCHANGE_OFFSET=Q.POSTMARKETVOLUME_OFFSET=Q.POSTMARKETLASTPRICE_OFFSET=Q.POSTMARKETTRADETIME_OFFSET=Q.PREMARKETCHANGE_OFFSET=Q.PREMARKETVOLUME_OFFSET=Q.PREMARKETLASTPRICE_OFFSET=Q.PREMARKETTRADETIME_OFFSET=Q.TWAP_OFFSET=Q.VWAP_OFFSET=Q.FLAGS_OFFSET=Q.ACCUMULATEDTRADEVALUE_OFFSET=Q.TRADECOUNT_OFFSET=Q.CLOSE_OFFSET=Q.LASTTRADESIZE_OFFSET=Q.TICK_OFFSET=Q.LASTTRADETIME_OFFSET=Q.ACCUMULATEDVOLUME_OFFSET=Q.LOW_OFFSET=Q.HIGH_OFFSET=Q.OPEN_OFFSET=Q.PREVCLOSE_OFFSET=Q.LAST_OFFSET=Q.SYMBOL_OFFSET=Q.TIMESTAMP_OFFSET=Q.TYPEID=undefined;var f=Y("../QitchConstants");Q.TYPEID=2;var d=Q.TIMESTAMP_OFFSET=0,p=Q.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=Q.LAST_OFFSET=p+f.LOCATECODE_LENGTH,m=Q.PREVCLOSE_OFFSET=h+f.DOUBLE_LENGTH,E=Q.OPEN_OFFSET=m+f.DOUBLE_LENGTH,_=Q.HIGH_OFFSET=E+f.DOUBLE_LENGTH,g=Q.LOW_OFFSET=_+f.DOUBLE_LENGTH,T=Q.ACCUMULATEDVOLUME_OFFSET=g+f.DOUBLE_LENGTH,b=Q.LASTTRADETIME_OFFSET=T+f.LONG_LENGTH,y=Q.TICK_OFFSET=b+f.TIMESTAMP_LENGTH,S=Q.LASTTRADESIZE_OFFSET=y+f.TICK_LENGTH,v=Q.CLOSE_OFFSET=S+f.INT_LENGTH,O=Q.TRADECOUNT_OFFSET=v+f.DOUBLE_LENGTH,w=Q.ACCUMULATEDTRADEVALUE_OFFSET=O+f.LONG_LENGTH,I=Q.FLAGS_OFFSET=w+f.DOUBLE_LENGTH,N=Q.VWAP_OFFSET=I+1,A=Q.TWAP_OFFSET=N+f.DOUBLE_LENGTH,F=Q.PREMARKETTRADETIME_OFFSET=A+f.TIMESTAMP_LENGTH,C=Q.PREMARKETLASTPRICE_OFFSET=F+f.DOUBLE_LENGTH,M=Q.PREMARKETVOLUME_OFFSET=C+f.LONG_LENGTH,D=Q.PREMARKETCHANGE_OFFSET=M+f.DOUBLE_LENGTH,L=Q.POSTMARKETTRADETIME_OFFSET=D+f.TIMESTAMP_LENGTH,R=Q.POSTMARKETLASTPRICE_OFFSET=L+f.DOUBLE_LENGTH,B=Q.POSTMARKETVOLUME_OFFSET=R+f.LONG_LENGTH,U=Q.POSTMARKETCHANGE_OFFSET=B+f.DOUBLE_LENGTH,k=Q.LASTTRADEEXCODE_OFFSET=U+f.DOUBLE_LENGTH,P=Q.DECIMALACCUMULATEDVOLUME_OFFSET=k+f.EXCODE_LENGTH,H=Q.DECIMALPREMARKETVOLUME_OFFSET=P+f.DOUBLE_LENGTH,G=Q.DECIMALPOSTMARKETVOLUME_OFFSET=H+f.DOUBLE_LENGTH,x=Q.DECIMALLASTTRADESIZE_OFFSET=G+f.DOUBLE_LENGTH,j=Q.CURRENCYID_OFFSET=x+f.DOUBLE_LENGTH,q=Q.VWAPVOLUME_OFFSET=j+f.CURRENCYID_LENGTH,V=(Q.LENGTH=q+f.DOUBLE_LENGTH,Q.PricedataFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isAnnualHigh=function(e){return 0<(e&t.prototype.ANNUALHIGH_MASK)},t.isAnnualLow=function(e){return 0<(e&t.prototype.ANNUALLOW_MASK)},t}());V.prototype.ANNUALHIGH_MASK=1,V.prototype.ANNUALLOW_MASK=2}).call(this,Y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],Y("timers").setImmediate,Y("timers").clearImmediate,"/lib/qitch/marketDataDefinition/PricedataDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],94:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.SYMBOL_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=6,h.SYMBOL_OFFSET=0);h.LENGTH=d+f.LOCATECODE_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/marketDataDefinition/PurgeBookDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],95:[function(I,e,N){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";N.__esModule=!0,N.LENGTH=N.DECIMALBIDSIZE_OFFSET=N.DECIMALASKSIZE_OFFSET=N.SHARESPERSIZEUNIT_OFFSET=N.INDICATOR_OFFSET=N.BIDSIZE_OFFSET=N.BIDPRICE_OFFSET=N.BIDEXCODE_OFFSET=N.BIDCONDITION_OFFSET=N.ASKSIZE_OFFSET=N.ASKPRICE_OFFSET=N.ASKEXCODE_OFFSET=N.ASKCONDITION_OFFSET=N.SYMBOL_OFFSET=N.TIMESTAMP_OFFSET=N.TYPEID=undefined;var f=I("../QitchConstants"),d=(N.TYPEID=1,N.TIMESTAMP_OFFSET=0),p=N.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=N.ASKCONDITION_OFFSET=p+f.LOCATECODE_LENGTH,m=N.ASKEXCODE_OFFSET=h+f.ASCIICHAR_LENGTH,E=N.ASKPRICE_OFFSET=m+f.EXCODE_LENGTH,_=N.ASKSIZE_OFFSET=E+f.DOUBLE_LENGTH,g=N.BIDCONDITION_OFFSET=_+f.INT_LENGTH,T=N.BIDEXCODE_OFFSET=g+f.ASCIICHAR_LENGTH,b=N.BIDPRICE_OFFSET=T+f.EXCODE_LENGTH,y=N.BIDSIZE_OFFSET=b+f.DOUBLE_LENGTH,S=N.INDICATOR_OFFSET=y+f.INT_LENGTH,v=N.SHARESPERSIZEUNIT_OFFSET=S+f.ASCIICHAR_LENGTH,O=N.DECIMALASKSIZE_OFFSET=v+f.INT_LENGTH,w=N.DECIMALBIDSIZE_OFFSET=O+f.DOUBLE_LENGTH;N.LENGTH=w+f.DOUBLE_LENGTH}).call(this,I("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],I("timers").setImmediate,I("timers").clearImmediate,"/lib/qitch/marketDataDefinition/QuoteDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],96:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0,O.LENGTH=O.BOARDLOTSIZE_OFFSET=O.CAVEATEMPTOR_OFFSET=O.PQE_OFFSET=O.REGSHOSTATUS_OFFSET=O.HALTINDICATOR_OFFSET=O.HALTSTATUS_OFFSET=O.CURRENCYID_OFFSET=O.INSTRUMENTTYPE_OFFSET=O.EXCODE_OFFSET=O.LOCATECODE_OFFSET=O.SYMBOL_OFFSET=O.TYPEID=undefined;var f=v("../QitchConstants"),d=(O.TYPEID=10,O.SYMBOL_OFFSET=0),p=O.LOCATECODE_OFFSET=d+f.SYMBOL_LENGTH,h=O.EXCODE_OFFSET=p+f.LOCATECODE_LENGTH,m=O.INSTRUMENTTYPE_OFFSET=h+f.EXCODE_LENGTH,E=O.CURRENCYID_OFFSET=m+f.INSTRUMENTTYPE_LENGTH,_=O.HALTSTATUS_OFFSET=E+f.CURRENCYID_LENGTH,g=O.HALTINDICATOR_OFFSET=_+f.BYTE_LENGTH,T=O.REGSHOSTATUS_OFFSET=g+f.BYTE_LENGTH,b=O.PQE_OFFSET=T+f.ASCIICHAR_LENGTH,y=O.CAVEATEMPTOR_OFFSET=b+f.BYTE_LENGTH,S=O.BOARDLOTSIZE_OFFSET=y+f.BYTE_LENGTH;O.LENGTH=S+f.INT_LENGTH}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/qitch/marketDataDefinition/SymbolInfoDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],97:[function(y,e,S){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";S.__esModule=!0,S.LENGTH=S.SYMBOL_OFFSET=S.NOTE_OFFSET=S.OPENINGTIME_OFFSET=S.EFFECTIVETIME_OFFSET=S.CLOSINGPRICE_OFFSET=S.REGSHOSTATUS_OFFSET=S.HALTINDICATOR_OFFSET=S.HALTSTATUS_OFFSET=S.LOCATE_CODE_OFFSET=S.TYPEID=undefined;var f=y("../QitchConstants"),d=(S.TYPEID=11,S.LOCATE_CODE_OFFSET=0),p=S.HALTSTATUS_OFFSET=d+f.LOCATECODE_LENGTH,h=S.HALTINDICATOR_OFFSET=p+f.BYTE_LENGTH,m=S.REGSHOSTATUS_OFFSET=h+f.BYTE_LENGTH,E=S.CLOSINGPRICE_OFFSET=m+f.ASCIICHAR_LENGTH,_=S.EFFECTIVETIME_OFFSET=E+f.DOUBLE_LENGTH,g=S.OPENINGTIME_OFFSET=_+f.TIMESTAMP_LENGTH,T=S.NOTE_OFFSET=g+f.TIMESTAMP_LENGTH,b=S.SYMBOL_OFFSET=T+f.NOTE_LENGTH;S.LENGTH=b+f.SYMBOL_LENGTH}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/qitch/marketDataDefinition/SymbolStatusDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],98:[function(C,e,M){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";M.__esModule=!0,M.TradeFlags=M.LENGTH=M.DECIMALACCUMULATEDVOLUME_OFFSET=M.DECIMALSIZE_OFFSET=M.EXCODE_OFFSET=M.VWAP_OFFSET=M.MATCHID_OFFSET=M.RANGEINDICATOR_OFFSET=M.SELLERMMID_OFFSET=M.BUYERMMID_OFFSET=M.FLAGS_OFFSET=M.SEQUENCENUMBER_OFFSET=M.ACCUMULATEDVOLUME_OFFSET=M.TICK_OFFSET=M.INDICATOR_OFFSET=M.SIZE_OFFSET=M.PRICE_OFFSET=M.SYMBOL_OFFSET=M.TIMESTAMP_OFFSET=M.TYPEID=undefined;var f=C("../QitchConstants");M.TYPEID=3;var d=M.TIMESTAMP_OFFSET=0,p=M.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=M.PRICE_OFFSET=p+f.LOCATECODE_LENGTH,m=M.SIZE_OFFSET=h+f.DOUBLE_LENGTH,E=M.INDICATOR_OFFSET=m+f.INT_LENGTH,_=M.TICK_OFFSET=E+f.ASCIICHAR_LENGTH,g=M.ACCUMULATEDVOLUME_OFFSET=_+f.TICK_LENGTH,T=M.SEQUENCENUMBER_OFFSET=g+f.LONG_LENGTH,b=M.FLAGS_OFFSET=T+f.INT_LENGTH,y=M.BUYERMMID_OFFSET=b+f.INT_LENGTH,S=M.SELLERMMID_OFFSET=y+f.MMID_LENGTH,v=M.RANGEINDICATOR_OFFSET=S+f.MMID_LENGTH,O=M.MATCHID_OFFSET=v+f.RANGEINDICATOR_LENGTH,w=M.VWAP_OFFSET=O+f.LONG_LENGTH,I=M.EXCODE_OFFSET=w+f.DOUBLE_LENGTH,N=M.DECIMALSIZE_OFFSET=I+f.EXCODE_LENGTH,A=M.DECIMALACCUMULATEDVOLUME_OFFSET=N+f.DOUBLE_LENGTH,F=(M.LENGTH=A+f.DOUBLE_LENGTH,M.TradeFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isOpen=function(e){return 0<(e&t.prototype.OPEN_MASK)},t.isHigh=function(e){return 0<(e&t.prototype.HIGH_MASK)},t.isLow=function(e){return 0<(e&t.prototype.LOW_MASK)},t.isClose=function(e){return 0<(e&t.prototype.CLOSE_MASK)},t.isUpdateVolume=function(e){return 0<(e&t.prototype.UPDATEVOLUME_MASK)},t.isCancel=function(e){return 0<(e&t.prototype.CANCEL_MASK)},t.isFromBook=function(e){return 0<(e&t.prototype.FROMBOOK_MASK)},t.isATrade=function(e){return 0<(e&t.prototype.ISATRADE_MASK)},t.isIncrementVolume=function(e){return 0<(e&t.prototype.INCREMENTVOLUME_MASK)},t.isUpdateAfterHours=function(e){return 0<(e&t.prototype.UPDATEAFTERHOURS_MASK)},t.isUpdateLast=function(e){return 0<(e&t.prototype.UPDATELAST_MASK)},t.isAfterHoursTrade=function(e){return 0<(e&t.prototype.AFTERHOURSTRADE)},t.isIgnoreHighLow=function(e){return 0<(e&t.prototype.IGNOREHIGHLOW_MASK)},t.isParticipantOnly=function(e){return 0<(e&t.prototype.PARTICIPANTONLY_MAKS)},t.isBlockTrade=function(e){return 0<(e&t.prototype.BLOCKTRADE_MASK)},t.isIgnoreOpen=function(e){return 0<(e&t.prototype.IGNOREOPEN_MASK)},t.isTradeThroughExempt=function(e){return 0<(e&t.prototype.TRADETHROUGHEXEMPT)},t.isCorrection=function(e){return e&t.prototype.CORRECTION_MASK},t.isOutOfSequence=function(e){return e&t.prototype.OUTOFSEQUENCE_MASK},t}());F.prototype.OPEN_MASK=1048576,F.prototype.HIGH_MASK=2097152,F.prototype.LOW_MASK=4194304,F.prototype.CLOSE_MASK=8388608,F.prototype.UPDATEVOLUME_MASK=16777216,F.prototype.CANCEL_MASK=33554432,F.prototype.FROMBOOK_MASK=67108864,F.prototype.ISATRADE_MASK=65536,F.prototype.INCREMENTVOLUME_MASK=131072,F.prototype.UPDATEAFTERHOURS_MASK=262144,F.prototype.UPDATELAST_MASK=524288,F.prototype.AFTERHOURSTRADE=4096,F.prototype.IGNOREHIGHLOW_MASK=8192,F.prototype.PARTICIPANTONLY_MAKS=16384,F.prototype.BLOCKTRADE_MASK=32768,F.prototype.IGNOREOPEN_MASK=256,F.prototype.TRADETHROUGHEXEMPT=512,F.prototype.CORRECTION_MASK=134217728,F.prototype.OUTOFSEQUENCE_MASK=1024}).call(this,C("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},C("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],C("timers").setImmediate,C("timers").clearImmediate,"/lib/qitch/marketDataDefinition/TradeDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],99:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f,d=m("./v1/SMessageDecoder_1.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._1=new p["default"]}return e.prototype.decode=function(e){if(null==e)throw"Argument cannot be null.";if(0==e.length)throw"Argument cannot be empty string.";var t=e.charAt(0),n=this["_"+t];if(null!=n)return n.decode(e);throw"Unsupported message type '"+t+"'."},e}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/SMessageDecoder.js","/lib/serialization")},{"./v1/SMessageDecoder_1.js":101,_process:131,buffer:121,timers:152}],100:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f,d=m("./v1/SMessageEncoder_1.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._1=new p["default"]}return e.prototype.encode=function(e){if(null==e)throw"Argument cannot be null.";var t=this["_"+e.type];if(null!=t)return t.encode(e);throw"Unsupported message type '"+e.type+"'."},e}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/SMessageEncoder.js","/lib/serialization")},{"./v1/SMessageEncoder_1.js":102,_process:131,buffer:121,timers:152}],101:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f=p(m("../../SMessage.js")),d=p(m("./codec.js"));function p(e){return e&&e.__esModule?e:{"default":e}}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.decode=function(e){if(null==e)throw"Argument cannot be null.";if(0==e.length)throw"Argument cannot be empty string.";var t=new f["default"];t.type=d["default"].TYPE;var n=Number(e.substr(d["default"].HEADERLENGTH_OFFSET,d["default"].USHORT_LENGTH_CHAR));t.sequencenumber=Number(e.substr(d["default"].SEQUENCENUMBER_OFFSET,d["default"].LONG_LENGTH_CHAR)),t.timestamp=Number(e.substr(d["default"].TIMESTAMP_OFFSET,d["default"].LONG_LENGTH_CHAR)),t.id=Number(e.substr(d["default"].ID_OFFSET,d["default"].USHORT_LENGTH_CHAR)),t.encoding=e.charAt(d["default"].ENCODING_OFFSET),t.mimetype=e.charAt(d["default"].MIMETYPE_OFFSET);var r=Number(e.substr(d["default"].PAYLOADLENGTH_OFFSET,d["default"].UINT_LENGTH_CHAR));return t.payload=e.substr(n,r),t},e}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/v1/SMessageDecoder_1.js","/lib/serialization/v1")},{"../../SMessage.js":5,"./codec.js":103,_process:131,buffer:121,timers:152}],102:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=E("../../message.js"),p=E("./codec.js"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.encode=function(e){if(null==e)throw"Argument cannot be null.";var t=h["default"].TYPE;return t+=(0,d.lpad)(h["default"].HEADER_LENGTH_CHAR,h["default"].USHORT_LENGTH_CHAR),t+=(0,d.lpad)(e.sequencenumber,h["default"].LONG_LENGTH_CHAR),t+=(0,d.lpad)(e.timestamp,h["default"].LONG_LENGTH_CHAR),t+=(0,d.lpad)(e.id,h["default"].USHORT_LENGTH_CHAR),t+=e.encoding,t+=e.mimetype,t+=(0,d.lpad)(null!=e.payload?e.payload.length:0,h["default"].UINT_LENGTH_CHAR),null!=e.payload&&(t+=e.payload),t},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/serialization/v1/SMessageEncoder_1.js","/lib/serialization/v1")},{"../../message.js":17,"./codec.js":103,_process:131,buffer:121,timers:152}],103:[function(e,t,f){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";f.__esModule=!0,f["default"]=new function(){this.TYPE="1",this.USHORT_LENGTH_CHAR=5,this.USHORT_MIN=0,this.USHORT_MAX=65535,this.UINT_LENGTH_CHAR=10,this.UINT_MIN=0,this.UINT_MAX=4294967295,this.LONG_LENGTH_CHAR=20,this.LONG_MIN=Number.MIN_SAFE_INTEGER,this.LONG_MAX=Number.MAX_SAFE_INTEGER,this.TYPE_OFFSET=0,this.HEADERLENGTH_OFFSET=this.TYPE_OFFSET+1,this.SEQUENCENUMBER_OFFSET=this.HEADERLENGTH_OFFSET+this.USHORT_LENGTH_CHAR,this.TIMESTAMP_OFFSET=this.SEQUENCENUMBER_OFFSET+this.LONG_LENGTH_CHAR,this.ID_OFFSET=this.TIMESTAMP_OFFSET+this.LONG_LENGTH_CHAR,this.ENCODING_OFFSET=this.ID_OFFSET+this.USHORT_LENGTH_CHAR,this.MIMETYPE_OFFSET=this.ENCODING_OFFSET+1,this.PAYLOADLENGTH_OFFSET=this.MIMETYPE_OFFSET+1,this.HEADER_LENGTH_CHAR=this.PAYLOADLENGTH_OFFSET+this.UINT_LENGTH_CHAR}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/serialization/v1/codec.js","/lib/serialization/v1")},{_process:131,buffer:121,timers:152}],104:[function(e,t,f){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";
34
+ D(460,"Websocket error")};o.onclose=function(e){if(y("websocket.onclose"),clearTimeout(d.id),"closed"!==p.state){var t=e.reason;if(""===t)switch(e.code){case 1e3:t="Normal closure; the connection successfully completed whatever purpose for which it was created.";break;case 1001:t="The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.";break;case 1002:t="The endpoint is terminating the connection due to a protocol error.";break;case 1003:t="The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).";break;case 1004:t="The endpoint is terminating the connection because a data frame was received that is too large.";break;case 1005:t="Unknown: no status code was provided even though one was expected.";break;case 1006:t="Connection was closed abnormally (that is, with no close frame being sent)."}b("warn")&&ee.util.warn("Websocket closed, reason: "+t+" - wasClean: "+e.wasClean),p.closedByClientTimeout||d.handleOnlineOffline&&te?d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId):(Z(s,e),p.state="closed",E?ee.util.log(d.logLevel,["Websocket closed normally"]):s?d.reconnect&&"websocket"===p.transport&&(w(),h++<d.maxReconnectOnClose?(A("re-connecting",d.transport,d),0<d.reconnectInterval?d.reconnectId=setTimeout(function(){p.responseBody="",p.messages=[],n(!0)},d.reconnectInterval):(p.responseBody="",p.messages=[],n(!0))):(ee.util.log(d.logLevel,["Websocket reconnect maximum try reached "+h]),b("warn")&&ee.util.warn("Websocket error, reason: "+e.reason),D(0,"maxReconnectOnClose reached"))):R("Websocket failed on first connection attempt. Downgrading to "+d.fallbackTransport+" and resending"))}};var t=navigator.userAgent.toLowerCase();var r=-1<t.indexOf("android");r&&o.url===undefined&&o.onclose({reason:"Android 4.1 does not support websockets.",wasClean:!1})}(!1):R("Websocket is not supported, using request.fallbackTransport ("+d.fallbackTransport+")"):"sse"===d.transport&&(e=ee.util.getAbsoluteURL(d.url.toLowerCase()),r=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/.exec(e),i=!(!r||r[1]==window.location.protocol&&r[2]==window.location.hostname&&(r[3]||("http:"===r[1]?80:443))==(window.location.port||("http:"===window.location.protocol?80:443))),!window.EventSource||i&&ee.util.browser.safari&&!(7<=ee.util.browser.vmajor)?R("Server Side Events(SSE) is not supported, using request.fallbackTransport ("+d.fallbackTransport+")"):function t(n){p.transport="sse";var e=B(d);b("debug")&&(ee.util.debug("Invoking executeSSE"),ee.util.debug("Using URL: "+e));if(n&&!d.reconnect)return void(null!=s&&w());try{s=new EventSource(e,{withCredentials:d.withCredentials})}catch(r){return D(0,r),void R("SSE failed. Downgrading to fallback transport and resending")}0<d.connectTimeout&&(d.id=setTimeout(function(){n||w()},d.connectTimeout));s.onopen=function(e){y("sse.onopen"),M(d),b("debug")&&ee.util.debug("SSE successfully opened"),d.enableProtocol?d.isReopen&&(d.isReopen=!1,A("re-opening",d.transport,d)):A(n?"re-opening":"opening","sse",d),n=!0,"POST"===d.method&&(p.state="messageReceived",s.send(d.data))};s.onmessage=function(e){if(y("sse.onmessage"),M(d),!d.enableXDR&&window.location.host&&e.origin&&e.origin!==window.location.protocol+"//"+window.location.host)ee.util.log(d.logLevel,["Origin was not "+window.location.protocol+"//"+window.location.host]);else{p.state="messageReceived",p.status=200;var t=L(e=e.data,d,p);t||($(),p.responseBody="",p.messages=[])}};s.onerror=function(e){y("sse.onerror"),clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),p.closedByClientTimeout||(Z(n),w(),E?ee.util.log(d.logLevel,["SSE closed normally"]):n?d.reconnect&&"sse"===p.transport&&(h++<d.maxReconnectOnClose?(A("re-connecting",d.transport,d),0<d.reconnectInterval?d.reconnectId=setTimeout(function(){t(!0)},d.reconnectInterval):t(!0),p.responseBody="",p.messages=[]):(ee.util.log(d.logLevel,["SSE reconnect maximum try reached "+h]),D(0,"maxReconnectOnClose reached"))):R("SSE failed. Downgrading to fallback transport and resending"))}}(!1))}function A(e,t,n){if(d.shared&&"local"!==t&&function(){var t,r="atmosphere-"+d.url,e=function(){var n,e=r.replace(/\W/g,""),t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.display="none",t.innerHTML='<iframe name="'+e+'" />',document.body.appendChild(t)),n=t.firstChild.contentWindow,{init:function(){n.callbacks=[i],n.fire=function(e){var t;for(t=0;t<n.callbacks.length;t++)n.callbacks[t](e)}},signal:function(e,t){!n.closed&&n.fire&&n.fire(ee.util.stringifyJSON({target:"c",type:e,data:t}))},get:function(e){return n.closed?null:n[e]},set:function(e,t){n.closed||(n[e]=t)},close:function(){}}};function i(e){var t=ee.util.parseJSON(e),n=t.data;if("p"===t.target)switch(t.type){case"send":q(n);break;case"localSend":Q(n);break;case"close":O()}}function n(){document.cookie=u+"="+encodeURIComponent(ee.util.stringifyJSON({ts:ee.util.now()+1,heir:(t.get("children")||[])[0]}))+"; path=/"}_=function(e){t.signal("message",e)},(t=function(){function e(e){e.key===r&&e.newValue&&i(e.newValue)}if(ee.util.storage){var n=window.localStorage;return{init:function(){ee.util.on(window,"storage",e)},signal:function(e,t){n.setItem(r,ee.util.stringifyJSON({target:"c",type:e,data:t}))},get:function(e){return ee.util.parseJSON(n.getItem(r+"-"+e))},set:function(e,t){n.setItem(r+"-"+e,ee.util.stringifyJSON(t))},close:function(){ee.util.off(window,"storage",e),n.removeItem(r),n.removeItem(r+"-opened"),n.removeItem(r+"-children")}}}}()||e()).init(),b("debug")&&ee.util.debug("Installed StorageService "+t),t.set("children",[]),null==t.get("opened")||t.get("opened")||t.set("opened",!1),u=encodeURIComponent(r),n(),l=setInterval(n,1e3),a=t}(),null!=a&&a.set("opened",!0),n.close=function(){O()},0<h&&"re-connecting"===e)n.isReopen=!0,(s=p).state="re-connecting",z(s);else if(null==p.error){p.request=n;var r=p.state;p.state=e;var i=p.transport;p.transport=t;var o=p.responseBody;$(),p.responseBody=o,p.state=r,p.transport=i}var s}function F(i){i.transport="jsonp";var o,s=d;null!=i&&void 0!==i&&(s=i),(c={open:function(){var r="atmosphere"+ ++T;function e(){var e=s.url;null!=s.dispatchUrl&&(e+=s.dispatchUrl);var t=s.data;s.attachHeadersAsQueryString&&(e=B(s),""!==t&&(e+="&X-Atmosphere-Post-Body="+encodeURIComponent(t)),t="");var n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;(o=document.createElement("script")).src=e+"&jsonpTransport="+r,o.clean=function(){o.clean=o.onerror=o.onload=o.onreadystatechange=null,o.parentNode&&o.parentNode.removeChild(o),2==++i.scriptCount&&(i.scriptCount=1,s.lastIndex=0,s.openId&&clearTimeout(s.openId),s.heartbeatTimer&&clearTimeout(s.heartbeatTimer),s.reconnect&&h++<s.maxReconnectOnClose?(A("re-connecting",s.transport,s),H(c,s,i.reconnectInterval),s.openId=setTimeout(function(){U(s)},s.reconnectInterval+1e3)):D(0,"maxReconnectOnClose reached"))},o.onload=o.onreadystatechange=function(){y("jsonp.onload"),o.readyState&&!/loaded|complete/.test(o.readyState)||o.clean()},o.onerror=function(){y("jsonp.onerror"),i.scriptCount=1,o.clean()},n.insertBefore(o,n.firstChild)}window[r]=function(e){if(y("jsonp.window"),i.scriptCount=0,s.reconnect&&-1===s.maxRequest||s.requestCount++<s.maxRequest){if(s.executeCallbackBeforeReconnect||H(c,s,s.pollingInterval),null!=e&&"string"!=typeof e)try{e=e.message}catch(t){}L(e,s,p)||X(p.responseBody,"messageReceived",200,s.transport),s.executeCallbackBeforeReconnect&&H(c,s,s.pollingInterval),M(s)}else ee.util.log(d.logLevel,["JSONP reconnect maximum try reached "+d.requestCount]),D(0,"maxRequest reached")},setTimeout(function(){e()},50)},abort:function(){o&&o.clean&&o.clean()}}).open()}function C(e,t){var n=t;if("polling"===e.transport)return n;if(e.enableProtocol&&e.firstMessage&&0!==ee.util.trim(t).length){var r=e.trackMessageLength?1:0,i=t.split(e.messageDelimiter);if(i.length<=r+1)return n;if(e.firstMessage=!1,e.uuid=ee.util.trim(i[r]),i.length<=r+2&&ee.util.log("error",["Protocol data not sent by the server. If you enable protocol on client side be sure to install JavascriptProtocol interceptor on server side.Also note that atmosphere-runtime 2.2+ should be used."]),f=parseInt(ee.util.trim(i[r+1]),10),m=i[r+2],"long-polling"!==e.transport&&U(e),re=e.uuid,n="",r=e.trackMessageLength?4:3,i.length>r)for(var o=r;o<i.length;o++)n+=i[o],o+1!==i.length&&(n+=e.messageDelimiter);0!==e.ackInterval&&setTimeout(function(){q("...ACK...")},e.ackInterval)}else e.enableProtocol&&e.firstMessage&&ee.util.browser.msie&&+ee.util.browser.version.split(".")[0]<10?ee.util.log(d.logLevel,["Receiving unexpected data from IE"]):U(e);return n}function M(e){clearTimeout(e.id),0<e.timeout&&"polling"!==e.transport&&(e.id=setTimeout(function(){p.closedByClientTimeout=!0,p.state="closedByClient",p.responseBody="",p.status=408,p.messages=[],$(),v(),w()},e.timeout))}function D(e,t){w(),clearTimeout(d.id),p.state="error",p.reasonPhrase=t,p.responseBody="",p.status=e,p.messages=[],$()}function L(e,t,n){if(e instanceof Blob)return!1;if(0===(e=C(t,e)).length)return!0;if(n.responseBody=e,t.trackMessageLength){var r=[],i=(e=n.partialMessage+e).indexOf(t.messageDelimiter);if(-1!=i){for(;-1!==i;){var o=e.substring(0,i),s=+o;if(isNaN(s))throw n.partialMessage="",new Error('message length "'+o+'" is not a number');(i+=t.messageDelimiter.length)+s>e.length?i=-1:(r.push(e.substring(i,i+s)),i=(e=e.substring(i+s,e.length)).indexOf(t.messageDelimiter))}return n.partialMessage=e,0!==r.length?(n.responseBody=r.join(t.messageDelimiter),n.messages=r,!1):(n.responseBody="",n.messages=[],!0)}}return n.responseBody=e,!(n.messages=[e])}function R(e){ee.util.log(d.logLevel,[e]),"undefined"!=typeof d.onTransportFailure?d.onTransportFailure(e,d):"undefined"!=typeof ee.util.onTransportFailure&&ee.util.onTransportFailure(e,d),d.transport=d.fallbackTransport;var t=-1===d.connectTimeout?0:d.connectTimeout;d.reconnect&&"none"!==d.transport||null==d.transport?(d.method=d.fallbackMethod,p.transport=d.fallbackTransport,d.fallbackTransport="none",0<t?d.reconnectId=setTimeout(function(){N()},t):N()):D(500,"Unable to reconnect with fallback transport")}function B(r,i){var o=d;return null!=r&&void 0!==r&&(o=r),null==i&&(i=o.url),o.attachHeadersAsQueryString&&(-1!==i.indexOf("X-Atmosphere-Framework")||(i+=-1!==i.indexOf("?")?"&":"?",i+="X-Atmosphere-tracking-id="+o.uuid,i+="&X-Atmosphere-Framework="+ee.version,i+="&X-Atmosphere-Transport="+o.transport,o.trackMessageLength&&(i+="&X-Atmosphere-TrackMessageSize=true"),null!==o.heartbeat&&null!==o.heartbeat.server&&(i+="&X-Heartbeat-Server="+o.heartbeat.server),""!==o.contentType&&(i+="&Content-Type="+("websocket"===o.transport?o.contentType:encodeURIComponent(o.contentType))),o.enableProtocol&&(i+="&X-atmo-protocol=true"),ee.util.each(o.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,o,r,p):t;null!=n&&(i+="&"+encodeURIComponent(e)+"="+encodeURIComponent(n))}))),i}function U(e){if(e.isOpen)if(e.isReopen)e.isReopen=!1,A("re-opening",e.transport,e);else{if("messageReceived"!==p.state||"jsonp"!==e.transport&&"long-polling"!==e.transport)return;(t=p).state="openAfterResume",z(t),t.state="messageReceived"}else e.isOpen=!0,A("opening",e.transport,e);var t;!function(t){null!=t.heartbeatTimer&&clearTimeout(t.heartbeatTimer);if(!isNaN(f)&&0<f){t.heartbeatTimer=setTimeout(function e(){b("debug")&&ee.util.debug("Sending heartbeat");q(m),t.heartbeatTimer=setTimeout(e,f)},f)}}(e)}function k(u){var l=d;if(null==u&&void 0===u||(l=u),l.lastIndex=0,l.readyState=0,"jsonp"===l.transport||l.enableXDR&&ee.util.checkCORSSupport())F(l);else{if(ee.util.browser.msie&&+ee.util.browser.version.split(".")[0]<10){if("streaming"===l.transport)return void(l.enableXDR&&window.XDomainRequest?G(l):j(l));if(l.enableXDR&&window.XDomainRequest)return void G(l)}var t=function(e){if(l.lastIndex=0,h++,e||l.reconnect&&h<=l.maxReconnectOnClose){var t=e?0:u.reconnectInterval;p.ffTryingReconnect=!0,A("re-connecting",u.transport,u),H(f,l,t)}else D(0,"maxReconnectOnClose reached")},c=function(e){ee._beforeUnloadState?(ee.util.debug(new Date+" Atmosphere: reconnectF: execution delayed due to _beforeUnloadState flag"),setTimeout(function(){t(e)},5e3)):t(e)};if(l.force||l.reconnect&&(-1===l.maxRequest||l.requestCount++<l.maxRequest)){l.force=!1;var f=ee.util.xhr();f.hasData=!1,function(r,i,o){var e=i.url;null!=i.dispatchUrl&&"POST"===i.method&&(e+=i.dispatchUrl);e=B(i,e),e=ee.util.prepareURL(e),o&&(r.open(i.method,e,i.async),0<i.connectTimeout&&(i.id=setTimeout(function(){0===i.requestCount&&(w(),X("Connect timeout","closed",200,i.transport))},i.connectTimeout)));d.withCredentials&&"websocket"!==d.transport&&"withCredentials"in r&&(r.withCredentials=!0);d.dropHeaders||(r.setRequestHeader("X-Atmosphere-Framework",ee.version),r.setRequestHeader("X-Atmosphere-Transport",i.transport),null!==i.heartbeat&&null!==i.heartbeat.server&&r.setRequestHeader("X-Heartbeat-Server",r.heartbeat.server),i.trackMessageLength&&r.setRequestHeader("X-Atmosphere-TrackMessageSize","true"),r.setRequestHeader("X-Atmosphere-tracking-id",i.uuid),ee.util.each(i.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,r,i,o,p):t;null!=n&&r.setRequestHeader(e,n)}));""!==i.contentType&&r.setRequestHeader("Content-Type",i.contentType)}(f,l,!0),l.suspend&&(n=f),"polling"!==l.transport&&(p.transport=l.transport,f.onabort=function(){y("ajaxrequest.onabort"),Z(!0)},f.onerror=function(){y("ajaxrequest.onerror"),p.error=!0,p.ffTryingReconnect=!0;try{p.status=XMLHttpRequest.status}catch(e){p.status=500}p.status||(p.status=500),p.errorHandled||(w(),c(!1))}),f.onreadystatechange=function(){if(y("ajaxRequest.onreadystatechange, new state: "+f.readyState),E)y("onreadystatechange has been ignored due to _abortingConnection flag");else{p.error=null;var n=!1,e=!1;if("streaming"===l.transport&&2<l.readyState&&4===f.readyState)return w(),void c(!1);if(l.readyState=f.readyState,"streaming"===l.transport&&3<=f.readyState?e=!0:"long-polling"===l.transport&&4===f.readyState&&(e=!0),M(d),"polling"!==l.transport){var t=200;if(4===f.readyState&&(t=1e3<f.status?0:f.status),!l.reconnectOnServerError&&300<=t&&t<600)return void D(t,f.statusText);if(300<=t||0===t)return p.errorHandled=!0,w(),void c(!1);l.enableProtocol&&u.firstMessage||2!==f.readyState||(ee.util.browser.mozilla&&p.ffTryingReconnect?(p.ffTryingReconnect=!1,setTimeout(function(){p.ffTryingReconnect||U(l)},500)):U(l))}else 4===f.readyState&&(e=!0);if(e){var r=f.responseText;if(p.errorHandled=!1,"long-polling"===l.transport&&0===ee.util.trim(r).length)return void(f.hasData?f.hasData=!1:c(!0));if(f.hasData=!0,W(f,d),"streaming"===l.transport)if(ee.util.browser.opera)ee.util.iterate(function(){if(500!==p.status&&f.responseText.length>l.lastIndex){try{p.status=f.status,p.headers=ee.util.parseHeaders(f.getAllResponseHeaders()),W(f,d)}catch(t){p.status=404}M(d),p.state="messageReceived";var e=f.responseText.substring(l.lastIndex);if(l.lastIndex=f.responseText.length,(n=L(e,l,p))||$(),S(f,l))return void P(f,l)}else if(400<p.status)return l.lastIndex=f.responseText.length,!1},0);else{var i=r.substring(l.lastIndex,r.length);if(n=L(i,l,p),l.lastIndex=r.length,n)return}else n=L(r,l,p);var o=S(f,l);try{p.status=f.status,p.headers=ee.util.parseHeaders(f.getAllResponseHeaders()),W(f,l)}catch(a){p.status=404}l.suspend?p.state=0===p.status?"closed":"messageReceived":p.state="messagePublished";var s=!o&&"streaming"!==u.transport&&"polling"!==u.transport;s&&!l.executeCallbackBeforeReconnect&&H(f,l,l.pollingInterval),0===p.responseBody.length||n||$(),s&&l.executeCallbackBeforeReconnect&&H(f,l,l.pollingInterval),o&&P(f,l)}}};try{"streaming"===l.transport&&l.headers["X-Atmosphere-Binary"]&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(l.data),i=!0}catch(e){ee.util.log(l.logLevel,["Unable to connect to "+l.url]),D(0,e)}}else"debug"===l.logLevel&&ee.util.log(l.logLevel,["Max re-connection reached."]),D(0,"maxRequest reached")}}function P(e,t){p.messages=[],t.isReopen=!0,O(),E=!1,H(e,t,500)}function H(e,t,n){if(!p.closedByClientTimeout&&(t.reconnect||t.suspend&&i)){var r=0;e&&1<e.readyState&&(r=1e3<e.status?0:e.status),p.status=0===r?204:r,p.reason=0===r?"Server resumed the connection or down.":"OK",clearTimeout(t.id),t.reconnectId&&(clearTimeout(t.reconnectId),delete t.reconnectId),0<n?d.reconnectId=setTimeout(function(){k(t)},n):k(t)}}function G(e){"polling"!==e.transport?(r=x(e)).open():x(e).open()}function x(e){var r=d;null!=e&&void 0!==e&&(r=e);var i=r.transport,o=0,t=new window.XDomainRequest,s=function(){"long-polling"===r.transport&&r.reconnect&&(-1===r.maxRequest||r.requestCount++<r.maxRequest)&&(t.status=200,G(r))},n=r.rewriteURL||function(e){var t=/(?:^|;\s*)(JSESSIONID|PHPSESSID)=([^;]*)/.exec(document.cookie);switch(t&&t[1]){case"JSESSIONID":return e.replace(/;jsessionid=[^\?]*|(\?)|$/,";jsessionid="+t[2]+"$1");case"PHPSESSID":return e.replace(/\?PHPSESSID=[^&]*&?|\?|$/,"?PHPSESSID="+t[2]+"&").replace(/&$/,"")}return e};t.onprogress=function(){a(t)},t.onerror=function(){"polling"!==r.transport&&(w(),h++<r.maxReconnectOnClose?0<r.reconnectInterval?r.reconnectId=setTimeout(function(){A("re-connecting",e.transport,e),G(r)},r.reconnectInterval):(A("re-connecting",e.transport,e),G(r)):D(0,"maxReconnectOnClose reached"))},t.onload=function(){};var a=function(e){clearTimeout(r.id);var t=e.responseText;if(t=t.substring(o),o+=t.length,"polling"!==i){M(r);var n=L(t,r,p);if("long-polling"===i&&0===ee.util.trim(t).length)return;r.executeCallbackBeforeReconnect&&s(),n||X(p.responseBody,"messageReceived",200,i),r.executeCallbackBeforeReconnect||s()}};return{open:function(){var e=r.url;null!=r.dispatchUrl&&(e+=r.dispatchUrl),e=B(r,e),t.open(r.method,n(e)),"GET"===r.method?t.send():t.send(r.data),0<r.connectTimeout&&(r.id=setTimeout(function(){0===r.requestCount&&(w(),X("Connect timeout","closed",200,r.transport))},r.connectTimeout))},close:function(){t.abort()}}}function j(e){(r=function(e){var o,s=d;null!=e&&void 0!==e&&(s=e);var a=new window.ActiveXObject("htmlfile");a.open(),a.close();var t=s.url;null!=s.dispatchUrl&&(t+=s.dispatchUrl);"polling"!==s.transport&&(p.transport=s.transport);return{open:function(){var e=a.createElement("iframe");t=B(s),""!==s.data&&(t+="&X-Atmosphere-Post-Body="+encodeURIComponent(s.data)),t=ee.util.prepareURL(t),e.src=t,a.body.appendChild(e);var i=e.contentDocument||e.contentWindow.document;o=ee.util.iterate(function(){try{if(!i.firstChild)return;var n=i.body?i.body.lastChild:i;n.omgThisIsBroken;if(!i.body||!i.body.firstChild||"pre"!==i.body.firstChild.nodeName.toLowerCase()){var e=i.head||i.getElementsByTagName("head")[0]||i.documentElement||i,t=i.createElement("script");t.text="document.write('<plaintext>')",e.insertBefore(t,e.firstChild),e.removeChild(t),n=i.body.lastChild}return s.closed&&(s.isReopen=!0),o=ee.util.iterate(function(){var e=function(){var e=n.cloneNode(!0);e.appendChild(i.createTextNode("."));var t=e.innerText;return t=t.substring(0,t.length-1)}();if(e.length>s.lastIndex){M(d),p.status=200,p.error=null,n.innerText="";var t=L(e,s,p);if(t)return"";X(p.responseBody,"messageReceived",200,s.transport)}if(s.lastIndex=0,"complete"===i.readyState)return Z(!0),A("re-connecting",s.transport,s),0<s.reconnectInterval?s.reconnectId=setTimeout(function(){j(s)},s.reconnectInterval):j(s),!1},null),!1}catch(r){return p.error=!0,A("re-connecting",s.transport,s),h++<s.maxReconnectOnClose?0<s.reconnectInterval?s.reconnectId=setTimeout(function(){j(s)},s.reconnectInterval):j(s):D(0,"maxReconnectOnClose reached"),a.execCommand("Stop"),a.close(),!1}})},close:function(){o&&o(),a.execCommand("Stop"),Z(!0)}}}(e)).open()}function q(e){var t;null!=g?(t=e,g.send(t)):null!=n||null!=s?V(e):null!=r?function(e){if(d.enableXDR&&ee.util.checkCORSSupport()){var t=K(e);t.reconnect=!1,F(t)}else V(e)}(e):null!=c?V(e):null!=o?function(e){var t,n=ee.util.isBinary(e)?e:Y(e);try{if(t=null!=d.dispatchUrl?d.webSocketPathDelimiter+d.dispatchUrl+d.webSocketPathDelimiter+n:n,!o.canSendMessage)return ee.util.error("WebSocket not connected.");o.send(t)}catch(r){o.onclose=function(e){},w(),R("Websocket failed. Downgrading to "+d.fallbackTransport+" and resending "+e),V(e)}}(e):(D(0,"No suspended connection available"),ee.util.error("No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before trying to push data"))}function V(e){k(K(e))}function Y(e){var t=e;return"object"===(void 0===t?"undefined":ie(t))&&(t=e.data),t}function K(e){var t=Y(e),n={connected:!1,timeout:6e4,method:"POST",url:d.url,contentType:d.contentType,headers:d.headers,reconnect:!0,callback:null,data:t,suspend:!1,maxRequest:-1,logLevel:"info",requestCount:0,withCredentials:d.withCredentials,async:d.async,transport:"polling",isOpen:!0,attachHeadersAsQueryString:!0,enableXDR:d.enableXDR,uuid:d.uuid,dispatchUrl:d.dispatchUrl,enableProtocol:!1,messageDelimiter:"|",trackMessageLength:d.trackMessageLength,maxReconnectOnClose:d.maxReconnectOnClose,heartbeatTimer:d.heartbeatTimer,heartbeat:d.heartbeat};return"object"===(void 0===e?"undefined":ie(e))&&(n=ee.util.extend(n,e)),n}function Q(e){var t=ee.util.parseJSON(e);t.id!==T&&("undefined"!=typeof d.onLocalMessage?d.onLocalMessage(t.event):"undefined"!=typeof ee.util.onLocalMessage&&ee.util.onLocalMessage(t.event))}function X(e,t,n,r){p.responseBody=e,p.transport=r,p.status=n,p.state=t,$()}function W(e,t){if(t.readResponsesHeaders)try{var n=e.getResponseHeader("X-Atmosphere-tracking-id");n&&null!=n&&(t.uuid=n.split(" ").pop())}catch(r){}else t.enableProtocol||(t.uuid=T)}function z(e){J(e,d),J(e,ee.util)}function J(e,t){switch(e.state){case"messageReceived":y("Firing onMessage"),h=0,"undefined"!=typeof t.onMessage&&t.onMessage(e),"undefined"!=typeof t.onmessage&&t.onmessage(e);break;case"error":y("Firing onError, reasonPhrase: "+("undefined"!=typeof e.reasonPhrase?e.reasonPhrase:"n/a")),"undefined"!=typeof t.onError&&t.onError(e),"undefined"!=typeof t.onerror&&t.onerror(e);break;case"opening":delete d.closed,y("Firing onOpen"),"undefined"!=typeof t.onOpen&&t.onOpen(e),"undefined"!=typeof t.onopen&&t.onopen(e);break;case"messagePublished":y("Firing messagePublished"),"undefined"!=typeof t.onMessagePublished&&t.onMessagePublished(e);break;case"re-connecting":y("Firing onReconnect"),"undefined"!=typeof t.onReconnect&&t.onReconnect(d,e);break;case"closedByClient":y("Firing closedByClient"),"undefined"!=typeof t.onClientTimeout&&t.onClientTimeout(d);break;case"re-opening":delete d.closed,y("Firing onReopen"),"undefined"!=typeof t.onReopen&&t.onReopen(d,e);break;case"fail-to-reconnect":y("Firing onFailureToReconnect"),"undefined"!=typeof t.onFailureToReconnect&&t.onFailureToReconnect(d,e);break;case"unsubscribe":case"closed":"undefined"!=typeof d.closed&&d.closed?y("Request already closed, not firing onClose ("+e.state+" case)"):(y("Firing onClose ("+e.state+" case)"),"undefined"!=typeof t.onClose&&t.onClose(e),"undefined"!=typeof t.onclose&&t.onclose(e)),d.closed=!0;break;case"openAfterResume":"undefined"!=typeof t.onOpenAfterResume&&t.onOpenAfterResume(d)}}function Z(e,t){"closed"!==p.state&&(p.state="closed",p.responseBody="",p.messages=[],p.atmoMessage=t,p.status=e?200:501,$())}function $(){var e=function(e,t){t(p)};null==g&&null!=_&&_(p.responseBody),d.reconnect=d.mrequest;for(var t="string"==typeof p.responseBody,n=t&&d.trackMessageLength?0<p.messages.length?p.messages:[""]:new Array(p.responseBody),r=0;r<n.length;r++)if(!(1<n.length&&0===n[r].length||(p.responseBody=!t||"streaming"===d.transport&&d.headers["X-Atmosphere-Binary"]&&!d.firstMessage?n[r]:ee.util.trim(n[r]),null==g&&null!=_&&_(p.responseBody),(0===p.responseBody.length||t&&m===p.responseBody)&&"messageReceived"===p.state))){if(z(p),0<ne.length){b("debug")&&ee.util.debug("Invoking "+ne.length+" global callbacks: "+p.state);try{ee.util.each(ne,e)}catch(i){ee.util.log(d.logLevel,["Callback exception"+i])}}if("function"==typeof d.callback){b("debug")&&ee.util.debug("Invoking request callbacks");try{d.callback(p)}catch(i){ee.util.log(d.logLevel,["Callback exception"+i])}}}}I(e),this.subscribe=function(e){I(e),N()},this.execute=function(){N()},this.close=function(){O()},this.disconnect=function(){v()},this.getUrl=function(){return d.url},this.push=function(e,t){if(null!=t){var n=d.dispatchUrl;d.dispatchUrl=t,q(e),d.dispatchUrl=n}else q(e)},this.getUUID=function(){return d.uuid},this.pushLocal=function(e){!function(e){if(0!==e.length)try{g?g.localSend(e):a&&a.signal("localMessage",ee.util.stringifyJSON({id:T,event:e}))}catch(t){ee.util.error(t)}}(e)},this.enableProtocol=function(e){return d.enableProtocol},this.init=function(){t()},this.request=d,this.response=p}}).subscribe=function(e,t,n){"function"==typeof t&&ee.addCallback(t),"string"!=typeof e?n=e:n.url=e,re=void 0!==n&&"undefined"!=typeof n.uuid?n.uuid:0;var r=new ee.AtmosphereRequest(n);return r.execute(),i[i.length]=r},ee.unsubscribe=function(){if(0<i.length)for(var e=[].concat(i),t=0;t<e.length;t++){var n=e[t];n.close(),clearTimeout(n.response.request.id),n.heartbeatTimer&&clearTimeout(n.heartbeatTimer)}i=[],ne=[]},ee.unsubscribeUrl=function(e){var t=-1;if(0<i.length)for(var n=0;n<i.length;n++){var r=i[n];if(r.getUrl()===e){r.close(),clearTimeout(r.response.request.id),r.heartbeatTimer&&clearTimeout(r.heartbeatTimer),t=n;break}}0<=t&&i.splice(t,1)},ee.addCallback=function(e){-1===ee.util.inArray(e,ne)&&ne.push(e)},ee.removeCallback=function(e){var t=ee.util.inArray(e,ne);-1!==t&&ne.splice(t,1)},ee.util={browser:{},parseHeaders:function(e){for(var t,n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,r={};t=n.exec(e);)r[t[1]]=t[2];return r},now:function(){return(new Date).getTime()},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},inArray:function(e,t){if(!Array.prototype.indexOf){for(var n=t.length,r=0;r<n;++r)if(t[r]===e)return r;return-1}return t.indexOf(e)},isBinary:function(e){return/^\[object\s(?:Blob|ArrayBuffer|.+Array)\]$/.test(Object.prototype.toString.call(e))},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},getAbsoluteURL:function(e){if("undefined"==typeof document.createElement)return e;var t=document.createElement("div");return t.innerHTML='<a href="'+e+'"/>',encodeURI(decodeURI(t.firstChild.href))},prepareURL:function(e){var t=ee.util.now(),n=e.replace(/([?&])_=[^&]*/,"$1_="+t);return n+(n===e?(/\?/.test(e)?"&":"?")+"_="+t:"")},trim:function(e){return String.prototype.trim?e.toString().trim():e.toString().replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,"").replace(/\s+/g," ")},param:function(e){var t,n=[];function r(e,t){t=ee.util.isFunction(t)?t():null==t?"":t,n.push(encodeURIComponent(e)+"="+encodeURIComponent(t))}function i(n,e){var t;if(ee.util.isArray(e))ee.util.each(e,function(e,t){/\[\]$/.test(n)?r(n,t):i(n+"["+("object"===(void 0===t?"undefined":ie(t))?e:"")+"]",t)});else if("[object Object]"===Object.prototype.toString.call(e))for(t in e)i(n+"["+t+"]",e[t]);else r(n,e)}for(t in e)i(t,e[t]);return n.join("&").replace(/%20/g,"+")},storage:function(){try{return!(!window.localStorage||!window.StorageEvent)}catch(e){return!1}},iterate:function(t,n){var r;return n=n||0,function e(){r=setTimeout(function(){!1!==t()&&e()},n)}(),function(){clearTimeout(r)}},each:function(e,t,n){if(e){var r=0,i=e.length,o=ee.util.isArray(e);if(n){if(o)for(;r<i&&!1!==t.apply(e[r],n);r++);else for(r in e)if(!1===t.apply(e[r],n))break}else if(o)for(;r<i&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e}},extend:function(e){var t,n,r;for(t=1;t<arguments.length;t++)if(null!=(n=arguments[t]))for(r in n)e[r]=n[r];return e},on:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},off:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},log:function(e,t){if(window.console){var n=window.console[e];"function"==typeof n&&n.apply(window.console,t)}},warn:function(){ee.util.log("warn",arguments)},info:function(){ee.util.log("info",arguments)},debug:function(){ee.util.log("debug",arguments)},error:function(){ee.util.log("error",arguments)},xhr:function(){try{return new window.XMLHttpRequest}catch(e){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}},parseJSON:function(e){return e?window.JSON&&window.JSON.parse?window.JSON.parse(e):new Function("return "+e)():null},stringifyJSON:function(t){var n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function l(e){return'"'+e.replace(n,function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"'}function c(e){return e<10?"0"+e:e}return window.JSON&&window.JSON.stringify?window.JSON.stringify(t):function e(t,n){var r,i,o,s,a=n[t],u=void 0===a?"undefined":ie(a);switch(a&&"object"===(void 0===a?"undefined":ie(a))&&"function"==typeof a.toJSON&&(u=void 0===(a=a.toJSON(t))?"undefined":ie(a)),u){case"string":return l(a);case"number":return isFinite(a)?String(a):"null";case"boolean":return String(a);case"object":if(!a)return"null";switch(Object.prototype.toString.call(a)){case"[object Date]":return isFinite(a.valueOf())?'"'+a.getUTCFullYear()+"-"+c(a.getUTCMonth()+1)+"-"+c(a.getUTCDate())+"T"+c(a.getUTCHours())+":"+c(a.getUTCMinutes())+":"+c(a.getUTCSeconds())+'Z"':"null";case"[object Array]":for(o=a.length,s=[],r=0;r<o;r++)s.push(e(r,a)||"null");return"["+s.join(",")+"]";default:for(r in s=[],a)f.call(a,r)&&(i=e(r,a))&&s.push(l(r)+":"+i);return"{"+s.join(",")+"}"}}}("",{"":t})},checkCORSSupport:function(){if(ee.util.browser.msie&&!window.XDomainRequest&&+ee.util.browser.version.split(".")[0]<11)return!0;if(ee.util.browser.opera&&+ee.util.browser.version.split(".")<12)return!0;if("KreaTVWebKit/531"===ee.util.trim(navigator.userAgent).slice(0,16))return!0;if("kreatel"===ee.util.trim(navigator.userAgent).slice(-7).toLowerCase())return!0;var e=navigator.userAgent.toLowerCase().match(/.+android ([0-9]{1,2})/i),t=parseInt(e&&e[0]||-1,10);return!isNaN(t)&&-1<t&&t<3}},ee.util.now(),e=navigator.userAgent.toLowerCase(),"safari"===(t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(e)||e.indexOf("android")<0&&/version\/(.+) (safari)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[])[2]&&(t[2]=t[1],t[1]="safari"),ee.util.browser[t[1]||""]=!0,ee.util.browser.version=t[2]||"0",ee.util.browser.vmajor=ee.util.browser.version.split(".")[0],ee.util.browser.trident&&(ee.util.browser.msie=!0),(ee.util.browser.msie||ee.util.browser.mozilla&&1==+ee.util.browser.version.split(".")[0])&&(ee.util.storage=!1),ee.callbacks={unload:function(){ee.util.debug(new Date+" Atmosphere: unload event"),ee.unsubscribe()},beforeUnload:function(){ee.util.debug(new Date+" Atmosphere: beforeunload event"),ee._beforeUnloadState=!0,setTimeout(function(){ee.util.debug(new Date+" Atmosphere: beforeunload event timeout reached. Reset _beforeUnloadState flag"),ee._beforeUnloadState=!1},5e3)},offline:function(){if(ee.util.debug(new Date+" Atmosphere: offline event"),te=!0,0<i.length)for(var e=[].concat(i),t=0;t<e.length;t++){var n=e[t];n.request.handleOnlineOffline&&(n.close(),clearTimeout(n.response.request.id),n.heartbeatTimer&&clearTimeout(n.heartbeatTimer))}},online:function(){if(ee.util.debug(new Date+" Atmosphere: online event"),0<i.length)for(var e=0;e<i.length;e++)i[e].request.handleOnlineOffline&&(i[e].init(),i[e].execute());te=!1}},ee.bindEvents=function(){ee.util.on(window,"unload",ee.callbacks.unload),ee.util.on(window,"beforeunload",ee.callbacks.beforeUnload),ee.util.on(window,"offline",ee.callbacks.offline),ee.util.on(window,"online",ee.callbacks.online)},ee.unbindEvents=function(){ee.util.off(window,"unload",ee.callbacks.unload),ee.util.off(window,"beforeunload",ee.callbacks.beforeUnload),ee.util.off(window,"offline",ee.callbacks.offline),ee.util.off(window,"online",ee.callbacks.online)},ee.bindEvents(),ee},void 0!==h?p.exports=d():f.atmosphere=d()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/atmosphere.js/lib/atmosphere.js","/lib/atmosphere.js/lib")},{_process:131,buffer:121,timers:152}],11:[function(T,e,b){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";b.__esModule=!0,b.asCredentials=function(e){var t=Object.keys(e);{if((0,f["default"])(t,["sid"]))return new h(e.sid);if((0,f["default"])(t,["wmid","token"]))return new E(e.wmid,e.token);if((0,f["default"])(t,["wmid"]))return new m(e.wmid);if((0,f["default"])(t,["data_token"]))return new _(e.data_token);if((0,f["default"])(t,["oauth_token"]))return new g(e.oauth_token);throw new Error("Misconfigured credentials, should be one of {sid}, {wmid,token}, or {wmid}")}};d(T("./EnduserAuthService.js"));var f=d(T("array-equal"));function d(e){return e&&e.__esModule?e:{"default":e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=function(){function t(e){p(this,t),this.sid=e}return t.prototype.getHeaders=function(){return{"X-Stream-Sid":this.sid}},t}(),m=function(){function t(e){p(this,t),this.wmid=e}return t.prototype.getHeaders=function(){return{"X-Stream-Wmid":this.wmid}},t}(),E=function(){function n(e,t){p(this,n),this.wmid=e,this.token=t}return n.prototype.getHeaders=function(){return{"X-Stream-Wmid":this.wmid,Authorization:this.token}},n}(),_=function(){function t(e){p(this,t),this.data_token=e}return t.prototype.getHeaders=function(){return{"X-Stream-DataTool-Token":this.data_token}},t}(),g=function(){function t(e){p(this,t),this.oauth_token=e}return t.prototype.getHeaders=function(){return{Authorization:this.oauth_token}},t}()}).call(this,T("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},T("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],T("timers").setImmediate,T("timers").clearImmediate,"/lib/auth/AuthService.js","/lib/auth")},{"./EnduserAuthService.js":12,_process:131,"array-equal":116,buffer:121,timers:152}],12:[function(e,t,p){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";p.__esModule=!0;var f="/p/authenticate/v0/?legacy=false",d=function(){function r(e,t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),null==e)throw new Error("AJAX cannot be null.");var n=t.credentials;if(!n.wmid||!n.username||!n.password)throw new Error("Cannot login if any of sid, username or password is empty.");this.http=e,this.host=t.host||"app.quotemedia.com",this.credentials=n,this.application=t.application,this.method="POST"}return r.prototype.login=function(e){this.login_POST(e)},r.prototype.login_POST=function(e){var t=this.host+f+(this.application?"&application="+this.application:""),n={wmId:this.credentials.wmid,username:this.credentials.username,password:this.credentials.password};this.http({url:t,type:"POST",contentType:"application/json",data:JSON.stringify(n),dataType:"json",success:this.handleSuccess(e),failure:this.handleFailure(e)})},r.prototype.handleSuccess=function(t){return function(e){e.code&&"Ok"===e.code.name?t(null,e.sid):t(new Error("Login failed: "+e.code+", "+e.message))}},r.prototype.handleFailure=function(e){return function(){e(new Error("Auth HTTP error"))}},r}();p["default"]=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/auth/EnduserAuthService.js","/lib/auth")},{_process:131,buffer:121,timers:152}],13:[function(_,g,e){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f,d=_("./streamer-api.js"),p=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("./streamer-utils.js")),h=_("jsbi"),m=(f=h)&&f.__esModule?f:{"default":f};var E={Formatter:function(){this.formatters={},this.formatters[E.Formatter._UNKOWNTYPE]=this._fmtunknown,this.formatters[d.messages.MessageTypeNames.ctrl.HEARTBEAT]=this._fmtheartbeat,this.formatters[d.messages.MessageTypeNames.ctrl.SUBSCRIBE]=this._fmtsubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE]=this._fmtsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE]=this._fmtunsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE]=this._fmtconnectresponse,this.formatters[d.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE]=this._fmtconnectionclose,this.formatters[d.messages.MessageTypeNames.ctrl.FLOW]=this._fmtflowmessage,this.formatters[d.messages.MessageTypeNames.ctrl.OPEN_FLOW]=this._fmtopenflowmessage,this.formatters[d.messages.MessageTypeNames.ctrl.SLOW_CONNECTION]=this._fmtslowconnection,this.formatters[d.messages.MessageTypeNames.ctrl.STATS]=this._fmtstats,this.formatters[d.messages.MessageTypeNames.ctrl.STATS_RESPONSE]=this._fmtstatsresponse,this.formatters[d.messages.MessageTypeNames.ctrl.INITIAL_DATA_SENT]=this._fmtinitialdatasent,this.formatters[d.messages.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE]=this._fmtresubscribeMessage,this.formatters[d.messages.MessageTypeNames.ctrl.EXCHANGE_SUBSCRIBE]=this._fmtexchangesubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.EXCHANGE_RESPONSE]=this._fmtexchangesubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE]=this._fmtexchangeunsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB]=this._fmtalertsubunsub,this.formatters[d.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE]=this._fmtalertsubunsubresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_SUBSCRIBE]=this._fmtnewssubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_ADD_RESPONSE]=this._fmtnewsfltaddresponse,this.formatters[d.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE]=this._fmttradesubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE]=this._fmttradesubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_DELETE_RESPONSE]=this._fmtnewsfltdeleteresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_GET_RESPONSE]=this._fmtnewsfltgetresponse,this.formatters[d.messages.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE]=this._fmttradeunsubscriberesponse,this.formatters[d.messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE]=this._fmtreconnectresponse,this.formatters[d.messages.MessageTypeNames.ctrl.MISSED_DATA_SENT]=this._fmtmisseddatasent,this.formatters[d.messages.MessageTypeNames.ctrl.CORP_EVENT_MESSAGE]=this._fmtcorporateeventsubscribe,this.formatters[d.messages.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE]=this._fmtcorporateeventresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_MOCK_BASIC_RESPONSE]=this._fmtnewsfltmockbasicresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FLT_UPDATE_RESPONSE]=this._fmtnewsfltupdateresponse,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_FILTER_MESSAGE]=this._fmtnewsfilterremotemessage,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_ERROR_MESSAGE]=this._fmtnewserrorremotemessage,this.formatters[d.messages.MessageTypeNames.ctrl.NEWS_SUCCESS_MESSAGE]=this._fmtnewssuccessremotemessage,this.formatters[d.messages.MessageTypeNames.ctrl.AUTH_TOKEN]=this._fmtauthtoken,this.formatters[d.messages.MessageTypeNames.ctrl.AUTH_TOKEN_RESPONSE]=this._fmtauthtokenresponse,this.formatters[d.messages.MessageTypeNames.data.QUOTE]=this._fmtquote,this.formatters[d.messages.MessageTypeNames.data.PRICEDATA]=this._fmtpricedata,this.formatters[d.messages.MessageTypeNames.data.TRADE]=this._fmttrade,this.formatters[d.messages.MessageTypeNames.data.INTERVAL]=this._fmtinterval,this.formatters[d.messages.MessageTypeNames.data.NETHOUSEPOSITION]=this._fmtnethouseposition,this.formatters[d.messages.MessageTypeNames.data.MMQUOTE]=this._fmtmmquote,this.formatters[d.messages.MessageTypeNames.data.BOOKORDER]=this._fmtbookorder,this.formatters[d.messages.MessageTypeNames.data.PRICELEVEL]=this._fmtpricelevel,this.formatters[d.messages.MessageTypeNames.data.MMPRICELEVEL]=this._fmtmmpricelevel,this.formatters[d.messages.MessageTypeNames.data.PURGEBOOK]=this._fmtpurgebook,this.formatters[d.messages.MessageTypeNames.data.BOOKDELETE]=this._fmtbookdelete,this.formatters[d.messages.MessageTypeNames.data.SYMBOLINFO]=this._fmtsymbolinfo,this.formatters[d.messages.MessageTypeNames.data.SYMBOLSTATUS]=this._fmtsymbolstatus,this.formatters[d.messages.MessageTypeNames.data.DERIVATIVEINFO]=this._fmtderivativeinfo,this.formatters[d.messages.MessageTypeNames.data.LASTSALE]=this._fmtlastsale,this.formatters[d.messages.MessageTypeNames.data.LIMITUPLIMITDOWN]=this._fmtlimituplimitdown,this.formatters[d.messages.MessageTypeNames.data.IVGREEKS]=this._fmtivgreeks,this.formatters[d.messages.MessageTypeNames.data.IMBALANCESTATUS]=this._fmtimbalancestatus,this.formatters[d.messages.MessageTypeNames.data.ALERT]=this._fmtalert,this.formatters[d.messages.MessageTypeNames.data.NEWS]=this._fmtnews,this.formatters[d.messages.MessageTypeNames.data.TRADENOTIFICATION]=this._fmttradeNotification,this.formatters[d.messages.MessageTypeNames.data.DIVIDEND]=this._fmtdividend,this.formatters[d.messages.MessageTypeNames.data.EARNINGS]=this._fmtearnings,this.formatters[d.messages.MessageTypeNames.data.SPLIT]=this._fmtsplit,this.formatters[d.messages.MessageTypeNames.data.SYMBOLCHANGED]=this._fmtsymbolChanged,this.formatters[d.messages.MessageTypeNames.data.ORDEREXECUTED]=this._fmtorderexecuted}};E.Formatter._UNKOWNTYPE="__UNKNOWN__",E.Formatter.prototype.fmt=function(e){var t=p.messagetype(e);null==t&&(t=E.Formatter._UNKOWNTYPE);var n=this.formatters[t];return null==n&&(n=E.Formatter._UNKOWNTYPE),n.call(this,e)},E.Formatter.prototype._fmtunknown=function(e){return null==e?"null":e["@T"]?p.getMessageName(e):e.toString()},E.Formatter.prototype._fmtquote=function(e){var t=new E.StringBuilder;return t.append("Q"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.indicator),t.sep(),t.append(e.sharesPerSizeUnit),t.sep(),t.append(e.bidPrice),t.sep(),t.append(e.bidSize),t.sep(),t.append(e.bidExcode),t.sep(),t.append(e.bidCondition),t.sep(),t.append(e.askPrice),t.sep(),t.append(e.askSize),t.sep(),t.append(e.askExcode),t.sep(),t.append(e.askCondition),t.toString()},E.Formatter.prototype._fmtpricedata=function(e){var t=new E.StringBuilder;return t.append("P"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.last),t.sep(),t.append(e.lastTradeSize),t.sep(),t.append(e.change),t.sep(),t.append(e.percentChange),t.sep(),t.append(e.tick),t.sep(),t.append(e.tradeCount),t.sep(),t.append(e.close),t.sep(),t.append(e.previousClose),t.sep(),t.append(e.open),t.sep(),t.append(e.high),t.sep(),t.append(e.annualHigh),t.sep(),t.append(e.low),t.sep(),t.append(e.annualLow),t.sep(),t.datetime(e.lastTradeTime),t.sep(),t.append(e.accumulatedPrice),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.accumulatedTradeValue),t.sep(),t.append(e.twap),t.sep(),t.append(e.vwap),t.sep(),t.append(e.vwapVolume),t.sep(),t.datetime(e.preMarketTradeTime),t.sep(),t.append(e.preMarketLast),t.sep(),t.append(e.preMarketVolume),t.sep(),t.append(e.preMarketChange),t.sep(),t.append(e.preMarketPercentChange),t.sep(),t.datetime(e.postMarketTradeTime),t.sep(),t.append(e.postMarketLast),t.sep(),t.append(e.postMarketVolume),t.sep(),t.append(e.postMarketChange),t.sep(),t.append(e.postMarketPercentChange),t.sep(),t.append(e.lastTradeExcode),t.sep(),t.append(e.currencyID),t.toString()},E.Formatter.prototype._fmtlastsale=function(e){var t=new E.StringBuilder;return t.append("LS"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.last),t.sep(),t.append(e.change),t.sep(),t.append(e.percentChange),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.tick),t.sep(),t.append(e.lastTradeExcode),t.toString()},E.Formatter.prototype._fmtlimituplimitdown=function(e){var t=new E.StringBuilder;return t.append("LULD"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.datetime(e.effectiveTime),t.sep(),t.append(e.lowerLimit),t.sep(),t.append(e.upperLimit),t.sep(),t.append(e.bidNotExecutable),t.sep(),t.append(e.askNotExecutable),t.toString()},E.Formatter.prototype._fmtivgreeks=function(e){var t=new E.StringBuilder;return t.append("IVG"),t.sep(),t.datetime(e.lastCalculation),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.delta),t.sep(),t.append(e.gamma),t.sep(),t.append(e.vega),t.sep(),t.append(e.rho),t.sep(),t.append(e.theta),t.sep(),t.append(e.midIV),t.sep(),t.append(e.midIVChange.toFixed(5)),t.sep(),t.append(e.bidIV),t.sep(),t.append(e.askIV),t.sep(),t.append(e.mark),t.sep(),t.append(e.intrinsicValue),t.sep(),t.append(e.extrinsicValue),t.sep(),t.append(e.previousMark),t.sep(),t.append(e.markChange),t.sep(),t.append(e.markChangePercent),t.toString()},E.Formatter.prototype._fmtimbalancestatus=function(e){var t=new E.StringBuilder;return t.append("IS"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.imbalanceType),t.sep(),t.append(e.referencePrice),t.sep(),t.append(e.size),t.sep(),t.append(e.side),t.sep(),t.append(e.pairedVolume),t.sep(),t.append(e.nearIndicativePrice),t.sep(),t.append(e.farIndicativePrice),t.sep(),t.append(e.priceVariation),t.toString()},E.Formatter.prototype._fmttrade=function(e){var t=new E.StringBuilder;return t.append("T"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.sequenceNumber),t.sep(),t.append(e.matchID),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.tick),t.sep(),t.append(e.indicator),t.sep(),t.append(e.rangeIndicator),t.sep(),t.append(e.sellerID),t.sep(),t.append(e.buyerID),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.vwap),t.toString()},E.Formatter.prototype._fmtinterval=function(e){var t=new E.StringBuilder;return t.append("I"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.last),t.sep(),t.datetime(e.lastTime),t.sep(),t.append(e.open),t.sep(),t.datetime(e.openTime),t.sep(),t.append(e.high),t.sep(),t.append(e.low),t.sep(),t.datetime(e.startTime),t.sep(),t.append(e.tradeValue),t.sep(),t.append(e.volume),t.sep(),t.append(e.vwap),t.sep(),t.append(e.periodMs),t.toString()},E.Formatter.prototype._fmtnethouseposition=function(e){var t=new E.StringBuilder;return t.append("NHP"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.buyValue),t.sep(),t.append(e.buyVolume),t.sep(),t.append(e.buyBlockTransactions),t.sep(),t.append(e.buyBlockValue),t.sep(),t.append(e.buyBlockVolume),t.sep(),t.append(e.sellValue),t.sep(),t.append(e.sellVolume),t.sep(),t.append(e.sellBlockTransactions),t.sep(),t.append(e.sellBlockValue),t.sep(),t.append(e.sellBlockVolume),t.toString()},E.Formatter.prototype._fmtmmquote=function(e){var t=new E.StringBuilder;return t.append("MMQ"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.bidPrice),t.sep(),t.append(e.bidSize),t.sep(),t.append(e.bidChange),t.sep(),t.append(e.askPrice),t.sep(),t.append(e.askSize),t.sep(),t.append(e.askChange),t.sep(),t.append(e.indicator),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.sharesPerSizeUnit),t.toString()},E.Formatter.prototype._fmtpricelevel=function(e){var t=new E.StringBuilder;return t.append("PL"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.orderSide),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.count),t.sep(),t.append(e.bookType),t.sep(),t.append(e.changeType),t.toString()},E.Formatter.prototype._fmtmmpricelevel=function(e){var t=new E.StringBuilder;return t.append("MMPL"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.excode),t.sep(),t.append(e.orderSide),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.count),t.sep(),t.append(e.bookType),t.sep(),t.append(e.changeType),t.toString()},E.Formatter.prototype._fmtbookorder=function(e){var t=new E.StringBuilder;return t.append("BO"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.orderID),t.sep(),t.append(e.orderReference),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.orderSide),t.sep(),t.datetime(e.lastUpdate),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.display),t.sep(),t.append(e.orderChangeType),t.toString()},E.Formatter.prototype._fmtpurgebook=function(e){var t=new E.StringBuilder;return t.append("PB"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.toString()},E.Formatter.prototype._fmtbookdelete=function(e){var t=new E.StringBuilder;return t.append("BD"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.orderReference),t.toString()},E.Formatter.prototype._fmtsymbolinfo=function(e){var t=new E.StringBuilder;return t.append("SI"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.excode),t.sep(),t.append(e.instrumentType),t.sep(),t.append(e.currencyId),t.sep(),t.append(e.haltStatus),t.sep(),t.append(e.haltIndicator),t.sep(),t.append(e.regSHOStatus),t.sep(),t.append(e.pqe),t.sep(),t.append(e.caveatEmptor),t.sep(),t.append(e.boardLotSize),t.toString()},E.Formatter.prototype._fmtsymbolstatus=function(e){var t=new E.StringBuilder;return t.append("SS"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.haltStatus),t.sep(),t.append(e.haltIndicator),t.sep(),t.append(e.regSHOStatus),t.sep(),t.append(e.closingCalculatedPrice),t.sep(),t.datetime(e.effectiveTime),t.sep(),t.datetime(e.openingTime),t.sep(),t.append(e.note),t.toString()},E.Formatter.prototype._fmtderivativeinfo=function(e){var t=new E.StringBuilder;return t.append("DI"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.rootSymbol),t.sep(),t.datetime(e.expiration),t.sep(),t.append(e.openInterest),t.sep(),t.datetime(e.delivery),t.sep(),t.append(e.contractSize),t.sep(),t.append(e.callPutIndicator),t.sep(),t.append(e.minTickSize),t.toString()},E.Formatter.prototype._fmtalert=function(e){var t=new E.StringBuilder;return t.append("A"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.locateCode),t.sep(),t.append(e.instrumentType),t.sep(),t.append(e.alertId),t.sep(),t.append(e.triggerValue),t.toString()},E.Formatter.prototype._fmtnews=function(e){var t=new E.StringBuilder;return t.append("N"),t.sep(),t.append(e.filterId),t.sep(),t.append(e.storyId),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.storyUrl),t.sep(),t.append(e.epochtime),t.sep(),t.append(e.headline),t.sep(),t.append(e.source),t.sep(),t.append(e.sourceId),t.sep(),t.append(e.lang),t.sep(),t.append(e.symbol),t.sep(),t.append(e.excode),t.sep(),t.append(e.exgroup),t.sep(),t.append(e.topic),t.sep(),t.append(e.thumbnailUrl),t.sep(),t.append(e.newsUrl),t.sep(),t.append(e.videoUrl),t.sep(),t.append(e.videoImageUrl),t.sep(),t.append(e.vendorDateId),t.toString()},E.Formatter.prototype._fmttradeNotification=function(e){var t=new E.StringBuilder;return t.append("TN"),t.sep(),t.append(e.traceId),t.sep(),t.append(e.accountId),t.sep(),t.append(e.enduserId),t.sep(),t.append(e.message),t.sep(),t.append(e.eventType),t.sep(),t.append(e.alertable),t.sep(),t.append(e.title),t.sep(),t.append(e.eventSubtype),t.sep(),t.append(JSON.stringify(e.discretionaryContent)),t.toString()},E.Formatter.prototype._fmtdividend=function(e){var t=new E.StringBuilder;return t.append("DV"),t.sep(),t.datetime(e.occuredOn),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.append(e.instrument),t.sep(),t.datetime(e.declarationDate),t.sep(),t.datetime(e.executionDate),t.sep(),t.datetime(e.recordDate),t.sep(),t.datetime(e.paymentDate),t.sep(),t.append(e.amount),t.sep(),t.append(e.frequency),t.sep(),t.append(e.paymentType),t.toString()},E.Formatter.prototype._fmtearnings=function(e){var t=new E.StringBuilder;return t.append("ERN"),t.sep(),t.datetime(e.occuredOn),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.append(e.fiscalYear),t.sep(),t.append(e.quarter),t.sep(),t.append(e.earningsPerShare),t.sep(),t.datetime(e.announcementDate),t.sep(),t.append(e.announcementTimeOfDay),t.sep(),t.append(e.announcementUrl),t.toString()},E.Formatter.prototype._fmtsplit=function(e){var t=new E.StringBuilder;return t.append("SPLT"),t.sep(),t.datetime(e.occuredOn),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.datetime(e.executionDate),t.sep(),t.datetime(e.declarationDate),t.sep(),t.datetime(e.recordDate),t.sep(),t.datetime(e.paymentDate),t.sep(),t.append(e.ratio),t.sep(),t.append(e.ratioNumerator),t.sep(),t.append(e.ratioDenominator),t.toString()},E.Formatter.prototype._fmtsymbolChanged=function(e){var t=new E.StringBuilder;return t.append("SBCG"),t.sep(),t.append(e.symbolId),t.sep(),t.append(e.symbol),t.sep(),t.append(e.oldSymbol),t.sep(),t.append(e.newSymbol),t.sep(),t.datetime(e.day),t.toString()},E.Formatter.prototype._fmtorderexecuted=function(e){var t=new E.StringBuilder;return t.append("OE"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.sequenceNumber),t.sep(),t.append(e.matchID),t.sep(),t.append(e.displaySize),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.orderID),t.toString()},E.Formatter.prototype._fmtnewsfilterremotemessage=function(e){var t=new E.StringBuilder;return t.append("NEWS FILTER"),t.sep(),t.append(e.message),t.toString()},E.Formatter.prototype._fmtnewserrorremotemessage=function(e){var t=new E.StringBuilder;return t.append("NEWS ERROR"),t.sep(),t.append("Event: "+e.event),t.sep(),t.append("Code: "+e.code),t.sep(),t.append("Message: "+e.message),t.toString()},E.Formatter.prototype._fmtnewssuccessremotemessage=function(e){var t=new E.StringBuilder;return t.append("NEWS SUCCESS"),t.sep(),t.append(e.code),t.sep(),t.append(e.message),t.toString()},E.Formatter.prototype._fmtauthtoken=function(e){var t=new E.StringBuilder;return t.append("AUTH TOKEN"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtauthtokenresponse=function(e){var t=new E.StringBuilder;return t.append("AUTH TOKEN RESPONSE"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtheartbeat=function(e){var t=new E.StringBuilder;return t.append("HEARBEAT"),t.sep(),t.datetime(e.timestamp),t.toString()},E.Formatter.prototype._fmtsubscribe=function(e){var t=new E.StringBuilder;return t.append("SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtexchangesubscribe=function(e){var t=new E.StringBuilder;return t.append("EXCHANGE SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtcorporateeventsubscribe=function(e){var t=new E.StringBuilder;return t.append("CORPORATE EVENT SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtalertsubunsub=function(e){var t=new E.StringBuilder;return t.append("ALERT"),t.toString()},E.Formatter.prototype._fmttradesubscribe=function(e){var t=new E.StringBuilder;return t.append("TRADE"),t.toString()},E.Formatter.prototype._fmtnewssubscribe=function(e){var t=new E.StringBuilder;return t.append("NEWS SUBSCRIBE"),t.toString()},E.Formatter.prototype._fmtstats=function(e){var t=new E.StringBuilder;return t.append("STATS"),t.toString()},E.Formatter.prototype._fmtsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtexchangesubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("EXCHANGE SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtcorporateeventresponse=function(e){var t=new E.StringBuilder;return t.append("CORPORATE EVENT SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtalertsubunsubresponse=function(e){var t=new E.StringBuilder;return t.append("ALERT SUBSCRIBED"),t.toString()},E.Formatter.prototype._fmttradesubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("TRADE SUBSCRIBED"),t.toString()},E.Formatter.prototype._fmtnewsfltaddresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS SUBSCRIBED FLT_ADD"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltdeleteresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS UNSUBSCRIBED FLT_DELETE"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltgetresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS COMMAND FILTER"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltmockbasicresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS COMMAND FLT_MOCK_BASIC"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtnewsfltupdateresponse=function(e){var t=new E.StringBuilder;return t.append("NEWS COMMAND FLT_UPDATE"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtunsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("UN-SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmtexchangeunsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("EXCHANGE UNSUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},E.Formatter.prototype._fmttradeunsubscriberesponse=function(e){var t=new E.StringBuilder;return t.append("TRADE UNSUBSCRIBED"),t.toString()},E.Formatter.prototype._fmtconnectresponse=function(e){var t=new E.StringBuilder;return t.append("CONNECT"),t.sep(),this.__baseresponse(e,t),t.sep(),t.append(e.version),t.sep(),t.append(e.flowControlCheckInterval),t.sep(),t.append(e.serverInstance),t.sep(),t.append(e.conflationMs),t.sep(),t.append(e.rejectExcessiveConnection),t.sep(),t.append(e.maxEntitlementsPerSubscription),t.toString()},E.Formatter.prototype._fmtreconnectresponse=function(e){var t=new E.StringBuilder;return t.append("RECONNECT"),t.sep(),t.append(e.version),t.sep(),t.append(e.flowControlCheckInterval),t.sep(),t.append(e.serverInstance),t.sep(),t.append(e.conflationMs),t.sep(),t.append(e.rejectExcessiveConnection),t.sep(),t.append(e.maxEntitlementsPerSubscription),t.sep(),t.sep(e.entitlements),t.sep(),t.sep(e.exchangeEntitlements),t.toString()},E.Formatter.prototype._fmtconnectionclose=function(e){var t=new E.StringBuilder;return t.append("CLOSE"),t.sep(),t.append(e.code),t.sep(),t.append(e.reason),t.toString()},E.Formatter.prototype._fmtslowconnection=function(e){var t=new E.StringBuilder;return t.append("SLOW"),t.sep(),t.append(e.timesExceeded),t.sep(),t.append(e.maxExceed),t.sep(),t.append(e.currentDelta),t.sep(),t.append(e.sendingRate),t.toString()},E.Formatter.prototype._fmtstatsresponse=function(e){var t=new E.StringBuilder;return t.append("STATS"),t.sep(),this.__baseresponse(e,t),t.sep(),t.append("number of available l1 symbols: "),t.append(e.numberOfAvailableSymbolsL1),t.sep(),t.append("number of available l2 symbols: "),t.append(e.numberOfAvailableSymbolsL2),t.sep(),t.append("number of available connections: "),t.append(e.numberOfAvailableConnections),t.sep(),t.append("number of subscribed l1 symbols: "),t.append(e.numberOfSubscribedSymbolsL1),t.sep(),t.append("number of subscribed l2 symbols: "),t.append(e.numberOfSubscribedSymbolsL2),t.sep(),t.append("number of open connections: "),t.append(e.numberOfOpenedConnections),t.sep(),t.append("number of subscribed exchanges: "),t.append(e.numberOfSubscribedExchanges),t.toString()},E.Formatter.prototype._fmtinitialdatasent=function(e){var t=new E.StringBuilder;return t.append("INITIAL DATA SENT"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.requestId),t.toString()},E.Formatter.prototype._fmtresubscribeMessage=function(e){var t=new E.StringBuilder;return t.append("RESUBSCRIBE MESSAGE"),t.sep(),t.datetime(e.timestamp),t.toString()},E.Formatter.prototype._fmtflowmessage=function(e){var t=new E.StringBuilder;return t.append("FLOW"),t.sep(),t.append(e.sequence),t.toString()},E.Formatter.prototype._fmtopenflowmessage=function(e){var t=new E.StringBuilder;return t.append("OPEN FLOW"),t.sep(),t.append(e.sequence),t.toString()},E.Formatter.prototype.__baseresponse=function(e,t){t.append(e.code),t.sep(),t.append(e.reason)},E.Formatter.prototype._fmtmisseddatasent=function(e){var t=new E.StringBuilder;return t.append("MISSED DATA SENT"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.requestId),t.sep(),t.append(e.totalDataSent),t.sep(),t.append(e.totalDataHeld),t.toString()},E.StringBuilder=function(){this._str=""},E.StringBuilder.SEP=", ",E.StringBuilder.prototype.append=function(e){this._str+=e},E.StringBuilder.prototype.sep=function(){this.append(E.StringBuilder.SEP)},E.StringBuilder.prototype.datetime=function(e){if(null!=e){var t=e;e instanceof m["default"]&&(t=m["default"].toNumber(e)),this._str+=""+new Date(t).toUTCString()}else this._str+="null"},E.StringBuilder.prototype.toString=function(){return this._str},E.msgfmt=new E.Formatter,E.format=function(e){return E.msgfmt.fmt(e)},g.exports=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/formatting.js","/lib")},{"./streamer-api.js":108,"./streamer-utils.js":110,_process:131,buffer:121,jsbi:128,timers:152}],14:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E["default"]=function(e){var t=e.url,n=e.success||function(){},r=e.failure||function(){},i=e.type||"POST",o=e.contentType,s=e.data,a=e.timeout,u=h(e.dataType),l=p();l.onreadystatechange=function(){4===l.readyState&&(200===l.status?n(u(l.responseText)):r(l.status))},l.open(i,t,!0),o&&l.setRequestHeader("Content-Type",o);a&&(l.timeout=a);l.send(s)};var f,d=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new(0,m("xmlhttprequest").XMLHttpRequest)}],p=(f=null,function(){if(null===f){for(f=0;f<d.length;f++)try{return d[f]()}catch(e){}if(f===d.length)throw f=null,new Error("No HTTP implementation found.")}return d[f]()}),h=function(e){switch(e?e.toLowerCase():e){case"json":return JSON.parse;default:return function(e){return e}}}}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/http.js","/lib")},{_process:131,buffer:121,timers:152,xmlhttprequest:157}],15:[function(g,T,e){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f=_(g("json3"));g("./polyfills");var d=E(g("./streamer-utils.js")),p=_(g("./Streamer.js")),h=E(g("./formatting.js")),m=g("./streamer-api.js");function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function _(e){return e&&e.__esModule?e:{"default":e}}window&&(window.JSON=window.JSON||f["default"]),p["default"].formatting=h,p["default"].dataTypes=m.messages.control.MarketdataType,p["default"].dataTypes.get=function(e){var t=d.getMessageName(e);return p["default"].dataTypes[t]?t:"UnknownType["+t+"]"},p["default"].marketDataTypes=m.messages.market.MarketDataResponseTypes,p["default"].marketDataTypes.get=function(e){var t=d.getMessageName(e);return p["default"].marketDataTypes[t]?t:"UnknownType["+t+"]"},p["default"].subscriptionTypes=m.messages.market.SubscriptionTypes,p["default"].corpEventTypes=m.messages.market.CorporateEventTypes,T.exports=p["default"]}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/index.js","/lib")},{"./Streamer.js":7,"./formatting.js":13,"./polyfills":18,"./streamer-api.js":108,"./streamer-utils.js":110,_process:131,buffer:121,json3:129,timers:152}],16:[function(e,t,p){(function(t,n,r,i,o,s,a,u,l,c,f){"use strict";p.__esModule=!0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};p.asLogger=function e(o){{if(!o)return e({log:function(){}});if("function"==typeof o)return e({log:o});var t=function(){for(var i={log:function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o[e]?o[e].apply(o,n):o.log&&o.log.apply(o,[e].concat(n))}},t=["info","error","warn","debug"],e=function(){var e=t[n],r=e;i[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];i.log.apply(i,[r].concat(t))}},n=0;n<t.length;n++)e();return{v:i}}();if("object"===(void 0===t?"undefined":d(t)))return t.v}}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/logging.js","/lib")},{_process:131,buffer:121,timers:152}],17:[function(e,t,f){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";f.__esModule=!0;f.Encodings={UNDEFINED:"undefined",UNDEFINED_CHAR:"U",NONE:"none",NONE_CHAR:"N",BASE64:"base64",BASE64_CHAR:"B"},f.MimeTypes={UNDEFINED:"undefined",UNDEFINED_CHAR:"U",JSON:"application/json",JSON_CHAR:"J",QMCI:"application/qmci",QMCI_CHAR:"Q",QITCH:"application/qitch",QITCH_CHAR:"I"},f.lpad=function(e,t){var n,r=e.toString();if(r.length==t)return r;if(r.length>t)throw"Number to long.";0<=e?n="0":(r=r.slice(1),n="-");for(var i=t-r.length,o=1;o<i;o++)n+="0";return n+r}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/message.js","/lib")},{_process:131,buffer:121,timers:152}],18:[function(e,t,n){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";var f,d,p,h;String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n}),"function"!=typeof Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.map||(Array.prototype.map=function(e){var t,n,r;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),o=i.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=new Array(o),r=0;r<o;){var s,a;r in i&&(s=i[r],a=e.call(t,s,r,i),n[r]=a),r++}return n}),Array.from||(Array.from=(f=Object.prototype.toString,d=function(e){return"function"==typeof e||"[object Function]"===f.call(e)},p=Math.pow(2,53)-1,h=function(e){var t,n=(t=Number(e),isNaN(t)?0:0!==t&&isFinite(t)?(0<t?1:-1)*Math.floor(Math.abs(t)):t);return Math.min(Math.max(n,0),p)},function(e){var t=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,r=1<arguments.length?arguments[1]:void undefined;if(void 0!==r){if(!d(r))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(n=arguments[2])}for(var i,o=h(t.length),s=d(this)?Object(new this(o)):new Array(o),a=0;a<o;)i=t[a],s[a]=r?void 0===n?r(i,a):r.call(n,i,a):i,a+=1;return s.length=o,s}))}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/polyfills.js","/lib")},{_process:131,buffer:121,timers:152}],19:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=m(_("./Bytes")),d=_("./DataOperations"),p=_("./QitchConstants"),h=m(_("./Qitch"));function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.lengthToBytes=function(e,t,n){return f["default"].putshort(e,t+p.BLOCK_HEADER_LENGTH_OFFSET,d.UShort.fromint(n))},e.lengthGetValue=function(e,t){return f["default"].getshort(e,t+p.BLOCK_HEADER_LENGTH_OFFSET)},e.messageCountToBytes=function(e,t,n){return e[t+p.BLOCK_HEADER_MESSAGECOUNT_OFFSET]=d.UByte.fromint(n),e},e.messageCountGetValue=function(e,t){return d.UByte.frombyte(e[t+p.BLOCK_HEADER_MESSAGECOUNT_OFFSET])},e.reservedToBytes=function(e,t,n){return e[t+p.BLOCK_HEADER_RESERVED_OFFSET]=n,e},e.sequenceToBytes=function(e,t,n){return h["default"].putUInt32(e,t+p.BLOCK_HEADER_SEQUENCE_OFFSET,n)},e.sequenceGetValue=function(e,t){return h["default"].uint32(e,t+p.BLOCK_HEADER_SEQUENCE_OFFSET)},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/BlockHeader.js","/lib/qitch")},{"./Bytes":20,"./DataOperations":21,"./Qitch":25,"./QitchConstants":26,_process:131,buffer:121,timers:152}],20:[function(S,e,v){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";v.__esModule=!0;var f,d=S("jsbi"),p=(f=d)&&f.__esModule?f:{"default":f};var h=Math.pow(2,8),m=Math.pow(2,16),E=Math.pow(2,24),_=p["default"].BigInt(32),g=p["default"].BigInt(40),T=p["default"].BigInt(48),b=p["default"].BigInt(56),y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.putshort=function(e,t,n){return e[t]=n>>8,e[t+1]=n,e},e.getshort=function(e,t){return e[t]*h|255&e[t+1]},e.putint=function(e,t,n){return e[t]=n>>24,e[t+1]=n>>16,e[t+2]=n>>8,e[t+3]=n,e},e.getint=function(e,t){return e[t]*E|(255&e[t+1])*m|(255&e[t+2])*h|255&e[t+3]},e.getlong=function(e,t){return p["default"].bitwiseOr(p["default"].bitwiseOr(p["default"].bitwiseOr(p["default"].leftShift(p["default"].BigInt(e[t]),b),p["default"].leftShift(p["default"].BigInt(255&e[t+1]),T)),p["default"].bitwiseOr(p["default"].leftShift(p["default"].BigInt(255&e[t+2]),g),p["default"].leftShift(p["default"].BigInt(255&e[t+3]),_))),p["default"].bitwiseOr(p["default"].bitwiseOr(p["default"].BigInt((255&e[t+4])*E),p["default"].BigInt((255&e[t+5])*m)),p["default"].bitwiseOr(p["default"].BigInt((255&e[t+6])*h),p["default"].BigInt(255&e[t+7]))))},e}();v["default"]=y}).call(this,S("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},S("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],S("timers").setImmediate,S("timers").clearImmediate,"/lib/qitch/Bytes.js","/lib/qitch")},{_process:131,buffer:121,jsbi:128,timers:152}],21:[function(e,t,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}E.__esModule=!0;var d=function(){function t(){f(this,t)}return t.fromint=function(e){if(e<t.prototype.MIN_VALUE)throw"Value underflows unsiged short";if(t.prototype.MAX_VALUE<e)throw"Value overflows unsigned short";return e<t.prototype.MAX_SHORT_VALUE?e:e-(t.prototype.MAX_VALUE+1)},t.fromshort=function(e){return 65535&e},t}();d.prototype.LENGTH=2,d.prototype.MIN_VALUE=0,d.prototype.MAX_VALUE=65535,d.prototype.MAX_SHORT_VALUE=32767;var p=function(){function t(){f(this,t)}return t.fromint=function(e){if(e<t.prototype.MIN_VALUE)throw"Value underflows unsigned byte";if(t.prototype.MAX_VALUE<e)throw"Value overflows unsigned byte";return e<t.prototype.BYTE_MAX_VALUE?e:e-(t.prototype.MAX_VALUE+1)},t.frombyte=function(e){return 255&e},t}();p.prototype.LENGTH=1,p.prototype.MIN_VALUE=0,p.prototype.MAX_VALUE=255,p.prototype.BYTE_MAX_VALUE=127;var h=function(){function t(){f(this,t)}return t.fromlong=function(e){if(e<t.prototype.MIN_VALUE)throw"Value underfows unsigned int";if(t.prototype.MAX_VALUE<e)throw"Value overflows unsigned int";return e<t.prototype.INT_MAX_VALUE?e:e-(t.prototype.MAX_VALUE+1)},t.fromint=function(e){return 4294967295&e},t}();h.prototype.LENGTH=4,h.prototype.MIN_VALUE=0,h.prototype.MAX_VALUE=4294967295,h.prototype.INT_MAX_VALUE=2147483647;var m=function(){function a(){f(this,a)}return a.put=function(e,t,n,r){if(e.length<t+r)throw"Not enough space in destination array";var i=t;if(null!=n&&0!==n.length){if(n.length>r)throw"String overflows maximum length";var o=void 0;for(o=0;o<n.length;o++)e[i++]=n.charAt(o).charCodeAt(0)}var s=void 0;for(s=i;s<t+r;s++)e[s]=a.prototype.PADDING;return e},a.get=function(e,t,n){var r=t,i=n;if(e.length<r+i)throw"Not enough bytes in source array";for(;0<i&&e[r+i-1]===a.prototype.PADDING;)i--;return String.fromCharCode.apply(String,e.slice(r,r+i))},a}();m.prototype.PADDING=32,E.UByte=p,E.UShort=d,E.UInt=h,E.ASCIIString=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/qitch/DataOperations.js","/lib/qitch")},{_process:131,buffer:121,timers:152}],22:[function(h,e,m){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";m.__esModule=!0;var f=h("../streamer-api");var d={1:"QUOTE",2:"PRICEDATA",3:"TRADE",4:"MMQUOTE",5:"ORDERBOOK",6:"INTERVAL",7:"NETHOUSEPOSITION",8:"LASTSALE",9:"LIMITUPLIMITDOWN",10:"IVGREEKS",11:"IMBALANCESTATUS"},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.marketdatatypeToInt=function(t){return Object.keys(d).find(function(e){return d[e]===t})},e.ubyteToMarketdataType=function(e){return d[e]},e.ubyteToEntitlementType=function(e){switch(e){case 1:return"RT";case 2:return"RTN";case 3:return"RTB";case 4:return"DL";case 6:return"RTO";case 7:return"DLO";case 8:return"DLN";case 9:return"LCQ";default:return"NA"}},e.subscribeActionToChar=function(e){switch(e){case f.messages.control.Action.SUBSCRIBE:return"S";case f.messages.control.Action.UNSUBSCRIBE:return"U"}},e}();m["default"]=p}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/qitch/EnumValueTranslator.js","/lib/qitch")},{"../streamer-api":108,_process:131,buffer:121,timers:152}],23:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0;var f=p("../streamer-api");var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.symbols=new Map}return e.prototype.injectLocateCode=function(e){e instanceof f.messages.market.SymbolInfo?this.symbols.set(e.locateCode,e.symbol):e instanceof f.messages.market.DataMessage&&(null===e.locateCode||e instanceof f.messages.market.ImbalanceStatus||e instanceof f.messages.market.SymbolStatus||e instanceof f.messages.market.Alert||(e.symbol=this.symbols.get(e.locateCode)))},e}();h["default"]=d}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/LocateCodeInjector.js","/lib/qitch")},{"../streamer-api":108,_process:131,buffer:121,timers:152}],24:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=_("./Bytes"),p=(f=d)&&f.__esModule?f:{"default":f},h=_("./DataOperations"),m=_("./QitchConstants");var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.lengthGetValue=function(e,t){return h.UShort.fromshort(p["default"].getshort(e,t+m.MESSAGE_HEADER_LENGTH_OFFSET))},e.lengthGetBytes=function(e,t,n){return p["default"].putshort(e,t+m.MESSAGE_HEADER_LENGTH_OFFSET,h.UShort.fromint(n))},e.typeGetValue=function(e,t){return h.UByte.frombyte(e[t+m.MESSAGE_HEADER_TYPE_OFFSET])},e.typeGetBytes=function(e,t,n){return e[t+m.MESSAGE_HEADER_TYPE_OFFSET]=h.UByte.fromint(n),e},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/MessageHeader.js","/lib/qitch")},{"./Bytes":20,"./DataOperations":21,"./QitchConstants":26,_process:131,buffer:121,timers:152}],25:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0;var f=b("../streamer-api"),d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(b("./QitchConstants")),p=g(b("./Bytes")),h=b("./DataOperations"),m=g(b("bignumber.js")),E=g(b("jsbi")),_=g(b("./EnumValueTranslator"));function g(e){return e&&e.__esModule?e:{"default":e}}var T=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.copyArray=function(e,t,n,r,i){if(0!==i){if(!(e instanceof Int8Array))throw"Source must be a byte array";if(!(n instanceof Int8Array))throw"Destination must be a byte array";if(t>=e.length)throw"Source index is out of range. Index: "+t+", max length: "+e.length;if(r>=n.length)throw"Destination index is out of range. Index: "+r+", max length: "+n.length;if(t+i>e.length||r+i>n.length)throw"Length is out of range";var o=void 0;for(o=0;o<i;o++)n[r+o]=e[t+o]}},e.bool=function(e,t){if(e instanceof Int8Array)return 0!==e[t];throw"Invalid source. Expected: Int8Array"},e.putBool=function(e,t,n){if(e instanceof Int8Array)return e[t]=n?1:0,e;throw"Invalid destination. Expected: Int8Array"},e.putByte=function(e,t,n){if(e instanceof Int8Array)return e[t]=h.UByte.fromint(n),e;throw"Invalid destination. Expected: Int8Array"},e.int32=function(e,t){if(e instanceof Int8Array)return p["default"].getint(e,t);throw"Invalid source. Expected: Int8Array"},e.putInt32=function(e,t,n){if(e instanceof Int8Array)return p["default"].putint(e,t,n);throw"Invalid destination. Expected: Int8Array"},e.uint32=function(e,t){if(e instanceof Int8Array)return h.UInt.fromint(p["default"].getint(e,t));throw"Invalid source. Expected: Int8Array"},e.putUInt32=function(e,t,n){if(e instanceof Int8Array)return p["default"].putint(e,t,h.UInt.fromlong(n));throw"Invalid destination. Expected: Int8Array"},e.asciichar=function(e,t){if(e instanceof Int8Array){if(t>=e.length)return null;var n=e[t];return n!==d.ASCII_NULL?String.fromCharCode(n):null}throw"Invalid source. Expected: Int8Array"},e.int64=function(e,t){if(e instanceof Int8Array)return p["default"].getlong(e,t);throw"Invalid source. Expected: Int8Array"},e.dec8double=function(e,t){if(e instanceof Int8Array)return new m["default"](p["default"].getlong(e,t).toString()).dividedBy(d.PRICE_DIVISOR);throw"Invalid source. Expected: Int8Array"},e.sbyte=function(e,t){if(e instanceof Int8Array)return e[t];throw"Invalid source. Expected: Int8Array"},e.timestamp=function(e,t){if(e instanceof Int8Array){var n=p["default"].getlong(e,t);return E["default"].equal(n,d.TIMESTAMP_NULL)?null:n}throw"Invalid source. Expected: Int8Array"},e.locatecode=function(e,t){if(e instanceof Int8Array)return p["default"].getint(e,t);throw"Invalid source. Expected: Int8Array"},e.symbol=function(e,t){if(e instanceof Int8Array)return t+d.SYMBOL_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.SYMBOL_LENGTH);throw"Invalid source. Expected: Int8Array"},e.putSymbol=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,d.SYMBOL_LENGTH);throw"Invalid destination. Expected: Int8Array"},e.asciiString=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.get(e,t,n);throw"Invalid source. Expected: Int8Array"},e.putAsciiString=function(e,t,n,r){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,r);throw"Invalid destination. Expected: Int8Array"},e.excode=function(e,t){if(e instanceof Int8Array)return t+d.EXCODE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.EXCODE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.putExcode=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,d.EXCODE_LENGTH);throw"Invalid destination. Expected: Int8Array"},e.mmid=function(e,t){if(e instanceof Int8Array)return t+d.MMID_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.MMID_LENGTH);throw"Invalid source. Expected: Int8Array"},e.orderId=function(e,t){if(e instanceof Int8Array)return p["default"].getlong(e,t);throw"Invalid source. Expected: Int8Array"},e.orderIdLegacy=function(e,t){if(e instanceof Int8Array)return t+d.ORDERID_LENGTH>e.length?null:p["default"].getlong(e,t).toString();throw"Invalid source. Expected: Int8Array"},e.currencyid=function(e,t){if(e instanceof Int8Array)return t+d.CURRENCYID_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.CURRENCYID_LENGTH);throw"Invalid source. Expected: Int8Array"},e.tick=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:String.fromCharCode(e[t]);throw"Invalid source. Expected: Int8Array"},e.bookOrderChangeType=function(e,t){if(e instanceof Int8Array){if(t>=e.length)return null;var n=String.fromCharCode(e[t]);return n===d.ASCIICHAR_NULL?null:f.messages.market.OrderChangeType[n]}throw"Invalid source. Expected: Int8Array"},e.orderside=function(e,t){if(e instanceof Int8Array){if(t>=e.length)return null;var n=String.fromCharCode(e[t]);return n===d.ASCIICHAR_NULL?null:n}throw"Invalid source. Expected: Int8Array"},e.rangeindicator=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:String.fromCharCode(e[t]);throw"Invalid source. Expected: Int8Array"},e.instrumenttype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:f.messages.market.InstrumentType[h.UByte.frombyte(e[t])];throw"Invalid source. Expected: Int8Array"},e.imbalancetype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:f.messages.market.ImbalanceType[h.UByte.frombyte(e[t])];throw"Invalid source. Expected: Int8Array"},e.orderreference=function(e,t){if(e instanceof Int8Array)return t+d.ORDER_REFERENCE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.ORDER_REFERENCE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.reason=function(e,t){if(e instanceof Int8Array)return t+d.REASON_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.REASON_LENGTH);throw"Invalid source. Expected: Int8Array"},e.version=function(e,t){if(e instanceof Int8Array)return t+d.VERSION_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.VERSION_LENGTH);throw"Invalid source. Expected: Int8Array"},e.serverInstance=function(e,t){if(e instanceof Int8Array)return t+d.SERVER_INSTANCE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.SERVER_INSTANCE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.note=function(e,t){if(e instanceof Int8Array)return t+d.NOTE_LENGTH>e.length?null:h.ASCIIString.get(e,t,d.NOTE_LENGTH);throw"Invalid source. Expected: Int8Array"},e.putAction=function(e,t,n){if(e instanceof Int8Array)return e[t]=_["default"].subscribeActionToChar(n).charCodeAt(0),e;throw"Invalid destination. Expected: Int8Array"},e.putMimetype=function(e,t,n){if(e instanceof Int8Array)return h.ASCIIString.put(e,t,n,d.MIMETYPE_LENGTH);throw"Invalid destination. Expected: Int8Array"},e.putConflation=function(e,t,n){if(e instanceof Int8Array)return this.putInt32(e,t,null!=n&&""!==n?n:d.CONFLATION_NULL);throw"Invalid destination. Expected: Int8Array"},e.marketdatatype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:_["default"].ubyteToMarketdataType(h.UByte.frombyte(e[t]));throw"Invalid source. Expected: Int8Array"},e.putMarketdatatype=function(e,t,n){if(e instanceof Int8Array)return e[t]=h.UByte.fromint(_["default"].marketdatatypeToInt(n)),e;throw"Invalid destination. Expected: Int8Array"},e.entitlementtype=function(e,t){if(e instanceof Int8Array)return t>=e.length?null:_["default"].ubyteToEntitlementType(h.UByte.frombyte(e[t]));throw"Invalid source. Expected: Int8Array"},e.entitlement=function(e,t){if(e instanceof Int8Array){var n=new f.messages.control.StreamEntitlement;return n.symbol=this.symbol(e,t),n.marketdatatype=this.marketdatatype(e,t+d.SYMBOL_LENGTH),n.entitlement=this.entitlementtype(e,t+d.SYMBOL_LENGTH+d.MARKETDATATYPE_LENGTH),n}throw"Invalid source. Expected: Int8Array"},e}();y["default"]=T}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/qitch/Qitch.js","/lib/qitch")},{"../streamer-api":108,"./Bytes":20,"./DataOperations":21,"./EnumValueTranslator":22,"./QitchConstants":26,_process:131,"bignumber.js":118,buffer:121,jsbi:128,timers:152}],26:[function(M,e,D){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";D.__esModule=!0,D.BLOCK_HEADER_LENGTH=D.BLOCK_HEADER_SEQUENCE_OFFSET=D.BLOCK_HEADER_RESERVED_OFFSET=D.BLOCK_HEADER_MESSAGECOUNT_OFFSET=D.BLOCK_HEADER_LENGTH_OFFSET=D.MESSAGE_HEADER_LENGTH=D.MESSAGE_HEADER_TYPE_OFFSET=D.MESSAGE_HEADER_LENGTH_OFFSET=D.NOTE_LENGTH=D.ENTITLEMENT_LENGTH=D.ENTITLEMENTTYPE_LENGTH=D.MARKETDATATYPE_LENGTH=D.CONFLATION_LENGTH=D.MIMETYPE_LENGTH=D.ACTION_LENGTH=D.BOOLEAN_LENGTH=D.VERSION_LENGTH=D.SERVER_INSTANCE_LENGTH=D.REASON_LENGTH=D.ORDER_REFERENCE_LENGTH=D.PRICE_DIVISOR=D.RANGEINDICATOR_LENGTH=D.INSTRUMENTTYPE_LENGTH=D.SYMBOL_LENGTH=D.CURRENCYID_LENGTH=D.EXCODE_LENGTH=D.TICK_LENGTH=D.IMBALANCETYPE_LENGTH=D.ORDERSIDE_LENGTH=D.ORDERID_LENGTH=D.MMID_LENGTH=D.LOCATECODE_LENGTH=D.TIMESTAMP_LENGTH=D.DOUBLE_LENGTH=D.LONG_LENGTH=D.INT_LENGTH=D.SHORT_LENGTH=D.ASCIICHAR_LENGTH=D.BYTE_LENGTH=D.CONFLATION_NULL=D.TIMESTAMP_NULL=D.ASCIICHAR_NULL=D.ASCII_NULL=undefined;var f,d=M("jsbi"),p=(f=d)&&f.__esModule?f:{"default":f};D.ASCII_NULL=0,D.ASCIICHAR_NULL="0",D.TIMESTAMP_NULL=p["default"].BigInt("-9223372036854775808"),D.CONFLATION_NULL=-1;var h=D.BYTE_LENGTH=1,m=D.ASCIICHAR_LENGTH=1,E=D.SHORT_LENGTH=2,_=D.INT_LENGTH=4,g=D.LONG_LENGTH=8,T=(D.DOUBLE_LENGTH=8,D.TIMESTAMP_LENGTH=8,D.LOCATECODE_LENGTH=_,D.MMID_LENGTH=4),b=D.ORDERID_LENGTH=g,y=(D.ORDERSIDE_LENGTH=m,D.IMBALANCETYPE_LENGTH=m,D.TICK_LENGTH=m,D.EXCODE_LENGTH=5),S=(D.CURRENCYID_LENGTH=3,D.SYMBOL_LENGTH=26),v=(D.INSTRUMENTTYPE_LENGTH=m,D.RANGEINDICATOR_LENGTH=h,D.PRICE_DIVISOR=1e8,D.ORDER_REFERENCE_LENGTH=y+S+T+b,D.REASON_LENGTH=40,D.SERVER_INSTANCE_LENGTH=1,D.VERSION_LENGTH=8,D.BOOLEAN_LENGTH=1,D.ACTION_LENGTH=m,D.MIMETYPE_LENGTH=20,D.CONFLATION_LENGTH=_,D.MARKETDATATYPE_LENGTH=h),O=D.ENTITLEMENTTYPE_LENGTH=h,w=(D.ENTITLEMENT_LENGTH=S+v+O,D.NOTE_LENGTH=50,D.MESSAGE_HEADER_LENGTH_OFFSET=0),I=D.MESSAGE_HEADER_TYPE_OFFSET=w+E,N=(D.MESSAGE_HEADER_LENGTH=I+h,D.BLOCK_HEADER_LENGTH_OFFSET=0),A=D.BLOCK_HEADER_MESSAGECOUNT_OFFSET=N+E,F=D.BLOCK_HEADER_RESERVED_OFFSET=A+h,C=D.BLOCK_HEADER_SEQUENCE_OFFSET=F+h;D.BLOCK_HEADER_LENGTH=C+_}).call(this,M("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},M("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],M("timers").setImmediate,M("timers").clearImmediate,"/lib/qitch/QitchConstants.js","/lib/qitch")},{_process:131,buffer:121,jsbi:128,timers:152}],27:[function(y,e,S){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";S.__esModule=!0,S.LENGTH=S.MAX_ENTITLEMENTS_PER_SUBSCRIPTION_OFFSET=S.REJECT_EXCESSIVE_CONNECTION_OFFSET=S.CONFLATION_OFFSET=S.SERVER_INSTANCE_OFFSET=S.FLOW_CONTROL_CHECK_INTERVAL_OFFSET=S.VERSION_OFFSET=S.REQUEST_ID_OFFSET=S.REASON_OFFSET=S.CODE_OFFSET=S.TYPEID=undefined;var f=y("../QitchConstants"),d=(S.TYPEID=105,S.CODE_OFFSET=0),p=S.REASON_OFFSET=d+f.INT_LENGTH,h=S.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=S.VERSION_OFFSET=h+f.INT_LENGTH,E=S.FLOW_CONTROL_CHECK_INTERVAL_OFFSET=m+f.VERSION_LENGTH,_=S.SERVER_INSTANCE_OFFSET=E+f.INT_LENGTH,g=S.CONFLATION_OFFSET=_+f.SERVER_INSTANCE_LENGTH,T=S.REJECT_EXCESSIVE_CONNECTION_OFFSET=g+f.INT_LENGTH,b=S.MAX_ENTITLEMENTS_PER_SUBSCRIPTION_OFFSET=T+f.BOOLEAN_LENGTH;S.LENGTH=b+f.INT_LENGTH}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ConnectResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],28:[function(h,e,m){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";m.__esModule=!0,m.LENGTH=m.REASON_OFFSET=m.CODE_OFFSET=m.TYPEID=undefined;var f=h("../QitchConstants"),d=(m.TYPEID=106,m.CODE_OFFSET=0),p=m.REASON_OFFSET=d+f.INT_LENGTH;m.LENGTH=p+f.REASON_LENGTH}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ConnectionCloseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],29:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0,g.FIXED_LENGTH=g.EXCODE_OFFSET=g.CONFLATION_OFFSET=g.MIMETYPE_OFFSET=g.ACTION_OFFSET=g.REQUEST_ID_OFFSET=g.TYPEID=undefined;var f=_("../QitchConstants"),d=(g.TYPEID=114,g.REQUEST_ID_OFFSET=0),p=g.ACTION_OFFSET=d+f.INT_LENGTH,h=g.MIMETYPE_OFFSET=p+f.ACTION_LENGTH,m=g.CONFLATION_OFFSET=h+f.MIMETYPE_LENGTH,E=g.EXCODE_OFFSET=m+f.CONFLATION_LENGTH;g.FIXED_LENGTH=E+f.EXCODE_LENGTH}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ExchangeSubscribeMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],30:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E.LENGTH=E.REQUEST_ID_OFFSET=E.REASON_OFFSET=E.CODE_OFFSET=E.TYPEID=undefined;var f=m("../QitchConstants"),d=(E.TYPEID=115,E.CODE_OFFSET=0),p=E.REASON_OFFSET=d+f.INT_LENGTH,h=E.REQUEST_ID_OFFSET=p+f.REASON_LENGTH;E.LENGTH=h+f.INT_LENGTH}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ExchangeSubscribeResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],31:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E.LENGTH=E.REQUEST_ID_OFFSET=E.REASON_OFFSET=E.CODE_OFFSET=E.TYPEID=undefined;var f=m("../QitchConstants"),d=(E.TYPEID=116,E.CODE_OFFSET=0),p=E.REASON_OFFSET=d+f.INT_LENGTH,h=E.REQUEST_ID_OFFSET=p+f.REASON_LENGTH;E.LENGTH=h+f.INT_LENGTH}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ExchangeUnsubResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],32:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.SEQUENCE_NUMBER_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=107,h.SEQUENCE_NUMBER_OFFSET=0);h.LENGTH=d+f.INT_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/FlowMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],33:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.TIMESTAMP_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=101,h.TIMESTAMP_OFFSET=0);h.LENGTH=d+f.TIMESTAMP_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/HeartbeatDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],34:[function(h,e,m){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";m.__esModule=!0,m.LENGTH=m.REQUEST_ID_OFFSET=m.TIMESTAMP_OFFSET=m.TYPEID=undefined;var f=h("../QitchConstants"),d=(m.TYPEID=110,m.TIMESTAMP_OFFSET=0),p=m.REQUEST_ID_OFFSET=d+f.TIMESTAMP_LENGTH;m.LENGTH=p+f.INT_LENGTH}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/InitialDataSentDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],35:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.TIMESTAMP_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=112,h.TIMESTAMP_OFFSET=0);h.LENGTH=d+f.TIMESTAMP_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/ResubscribeMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],36:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0,_.LENGTH=_.SENDING_RATE_OFFSET=_.CURRENT_DELTA_OFFSET=_.MAX_EXCEED_OFFSET=_.TIMES_EXCEED_OFFSET=_.TYPEID=undefined;var f=E("../QitchConstants"),d=(_.TYPEID=111,_.TIMES_EXCEED_OFFSET=0),p=_.MAX_EXCEED_OFFSET=d+f.INT_LENGTH,h=_.CURRENT_DELTA_OFFSET=p+f.INT_LENGTH,m=_.SENDING_RATE_OFFSET=h+f.INT_LENGTH;_.LENGTH=m+f.INT_LENGTH}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SlowConnectionDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],37:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.REQUEST_ID_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=108,h.REQUEST_ID_OFFSET=0);h.LENGTH=d+f.INT_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/StatsMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],38:[function(y,e,S){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";S.__esModule=!0,S.LENGTH=S.NUMBER_OF_AVAILABLE_CONNECTIONS=S.NUMBER_OF_OPENED_CONNECTIONS=S.NUMBER_OF_AVAILABLE_L2_OFFSET=S.NUMBER_OF_SUBSCRIBED_L2_OFFSET=S.NUMBER_OF_AVAILABLE_L1_OFFSET=S.NUMBER_OF_SUBSCRIBED_L1_OFFSET=S.REQUEST_ID_OFFSET=S.REASON_OFFSET=S.CODE_OFFSET=S.TYPEID=undefined;var f=y("../QitchConstants"),d=(S.TYPEID=109,S.CODE_OFFSET=0),p=S.REASON_OFFSET=d+f.INT_LENGTH,h=S.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=S.NUMBER_OF_SUBSCRIBED_L1_OFFSET=h+f.INT_LENGTH,E=S.NUMBER_OF_AVAILABLE_L1_OFFSET=m+f.INT_LENGTH,_=S.NUMBER_OF_SUBSCRIBED_L2_OFFSET=E+f.INT_LENGTH,g=S.NUMBER_OF_AVAILABLE_L2_OFFSET=_+f.INT_LENGTH,T=S.NUMBER_OF_OPENED_CONNECTIONS=g+f.INT_LENGTH,b=S.NUMBER_OF_AVAILABLE_CONNECTIONS=T+f.INT_LENGTH;S.LENGTH=b+f.INT_LENGTH}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/StatsResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],39:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0,_.FIXED_LENGTH=_.MIMETYPE_OFFSET=_.OPERATION_OFFSET=_.REQUEST_ID_OFFSET=_.FIXED_OPERATION_LENGTH=_.TYPEID=undefined;var f=E("../QitchConstants"),d=(_.TYPEID=117,_.FIXED_OPERATION_LENGTH=11),p=_.REQUEST_ID_OFFSET=0,h=_.OPERATION_OFFSET=p+f.INT_LENGTH,m=_.MIMETYPE_OFFSET=h+d;_.FIXED_LENGTH=m+f.MIMETYPE_LENGTH}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubUnsubAlertMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],40:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0,g.LENGTH=g.OPERATION_OFFSET=g.REQUEST_ID_OFFSET=g.REASON_OFFSET=g.CODE_OFFSET=g.FIXED_OPERATION_LENGTH=g.TYPEID=undefined;var f=_("../QitchConstants"),d=(g.TYPEID=118,g.FIXED_OPERATION_LENGTH=12),p=g.CODE_OFFSET=0,h=g.REASON_OFFSET=p+f.INT_LENGTH,m=g.REQUEST_ID_OFFSET=h+f.REASON_LENGTH,E=g.OPERATION_OFFSET=m+f.INT_LENGTH;g.LENGTH=E+d}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubUnsubAlertResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],41:[function(T,e,b){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";b.__esModule=!0,b.FIXED_LENGTH=b.NUMBER_OF_TYPES_OFFSET=b.NUMBER_OF_SYMBOLS_OFFSET=b.CONFLATION_OFFSET=b.SKIP_HEAVY_INITIAL_LOAD_OFFSET=b.MIMETYPE_OFFSET=b.ACTION_OFFSET=b.REQUEST_ID_OFFSET=b.TYPEID=undefined;var f=T("../QitchConstants"),d=(b.TYPEID=102,b.REQUEST_ID_OFFSET=0),p=b.ACTION_OFFSET=d+f.INT_LENGTH,h=b.MIMETYPE_OFFSET=p+f.ACTION_LENGTH,m=b.SKIP_HEAVY_INITIAL_LOAD_OFFSET=h+f.MIMETYPE_LENGTH,E=b.CONFLATION_OFFSET=m+f.BOOLEAN_LENGTH,_=b.NUMBER_OF_SYMBOLS_OFFSET=E+f.CONFLATION_LENGTH,g=b.NUMBER_OF_TYPES_OFFSET=_+f.INT_LENGTH;b.FIXED_LENGTH=g+f.BYTE_LENGTH}).call(this,T("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},T("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],T("timers").setImmediate,T("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubscribeMessageDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],42:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0,T.FIXED_LENGTH=T.NUMBER_OF_INVALID_SYMBOLS_OFFSET=T.NUMBER_OF_REJECTED_SYMBOLS_OFFSET=T.NUMBER_OF_ENTITLEMENTS_OFFSET=T.REQUEST_ID_OFFSET=T.REASON_OFFSET=T.CODE_OFFSET=T.TYPEID=undefined;var f=g("../QitchConstants"),d=(T.TYPEID=103,T.CODE_OFFSET=0),p=T.REASON_OFFSET=d+f.INT_LENGTH,h=T.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=T.NUMBER_OF_ENTITLEMENTS_OFFSET=h+f.INT_LENGTH,E=T.NUMBER_OF_REJECTED_SYMBOLS_OFFSET=m+f.INT_LENGTH,_=T.NUMBER_OF_INVALID_SYMBOLS_OFFSET=E+f.INT_LENGTH;T.FIXED_LENGTH=_+f.INT_LENGTH}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/SubscribeResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],43:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0,_.FIXED_LENGTH=_.NUMBER_OF_UNSUBSCRIBED_ENTITLEMENTS_OFFSET=_.REQUEST_ID_OFFSET=_.REASON_OFFSET=_.CODE_OFFSET=_.TYPEID=undefined;var f=E("../QitchConstants"),d=(_.TYPEID=104,_.CODE_OFFSET=0),p=_.REASON_OFFSET=d+f.INT_LENGTH,h=_.REQUEST_ID_OFFSET=p+f.REASON_LENGTH,m=_.NUMBER_OF_UNSUBSCRIBED_ENTITLEMENTS_OFFSET=h+f.INT_LENGTH;_.FIXED_LENGTH=m+f.INT_LENGTH}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/controlMessageDefinition/UnsubscribeResponseDef.js","/lib/qitch/controlMessageDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],44:[function(v,e,O){(function(t,n,r,i,o,s,a,u,l,c,f){"use strict";O.__esModule=!0;var d=E(v("../Qitch")),p=E(v("../MessageHeader")),h=E(v("../BlockHeader")),m=v("../QitchConstants");function E(e){return e&&e.__esModule?e:{"default":e}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var g=function(){function n(e,t){if(_(this,n),null==e)throw"Decoders cannot be null";this.buffer=new ArrayBuffer(t),this.bufferView=new Int8Array(this.buffer),this.bufferPosition=0,this.bufferCapacity=t,this.decodeblockheader=new b(this),this.decodemessageheader=new y(this),this.decodemessage=new S(e,this),this.state=new T,this.state.current=this.decodeblockheader,this.docompact=!1,this.doflip=!1}return n.prototype.messagecount=function(){return this.state.messagecount},n.prototype.blocksequencenumber=function(){return this.state.blocksequencenumber},n.prototype.add=function(e,t,n){var r=0;if(null!=e){if(this.docompact){var i=this.bufferPosition<=this.bufferLimit?this.bufferLimit-this.bufferPosition:0;d["default"].copyArray(this.bufferView,this.bufferPosition,this.bufferView,0,i),this.bufferPosition=i,this.bufferLimit=this.bufferCapacity,this.docompact=!1}n+this.bufferPosition>this.bufferView.length?(r=n-(this.bufferView.length-this.bufferPosition),d["default"].copyArray(e,t,this.bufferView,this.bufferPosition,n-r),this.messagelength=this.bufferView.length,this.bufferPosition=this.bufferView.length):(d["default"].copyArray(e,t,this.bufferView,this.bufferPosition,n),this.messagelength=n,this.bufferPosition=this.bufferPosition+this.messagelength),this.doflip=!0}return r},n.prototype.decode=function(){this.doflip&&(this.bufferLimit=this.bufferPosition,this.bufferPosition=0,this.doflip=!1),this.state.current===this.decodeblockheader?(this.state.blocklength=-1,this.state.messagecount=-1,this.state.blocksequencenumber=-1,this.state.messagelength=-1,this.state.messagetype=-1):this.state.current===this.decodemessageheader&&(this.state.messagelength=-1,this.state.messagetype=-1);var e=0;try{do{if(-1!==(e=this.state.current.decode(this.state,this.bufferView,this.bufferLimit,this.bufferPosition))&&(this.state.previous=this.state.current,this.state.current=this.state.next,this.state.next=null,this.bufferPosition=e),null!=this.state.result&&e>=this.messagelength)break}while(0<=e)}catch(n){throw this.state.current=this.decodeblockheader,this.bufferPosition=0,this.bufferLimit=this.bufferCapacity,n}var t=this.state.result;return this.state.result=null,this.docompact=!0,t},n}(),T=function e(){_(this,e),this.previous=null,this.current=null,this.next=null,this.blocklength=0,this.messagecount=0,this.blocksequencenumber=0,this.messagelength=0,this.messagetype=0,this.result=null},b=function(){function t(e){_(this,t),this.blockDecoder=e}return t.prototype.decode=function(e,t,n,r){return n-r<m.BLOCK_HEADER_LENGTH?-1:(e.blocklength=h["default"].lengthGetValue(t,r),e.messagecount=h["default"].messageCountGetValue(t,r),e.blocksequencenumber=h["default"].sequenceGetValue(t,r),0<e.messagecount?e.next=this.blockDecoder.decodemessageheader:e.next=this.blockDecoder.decodeblockheader,r+m.BLOCK_HEADER_LENGTH)},t}(),y=function(){function t(e){_(this,t),this.blockDecoder=e}return t.prototype.decode=function(e,t,n,r){return n-r<m.MESSAGE_HEADER_LENGTH?-1:(e.messagelength=p["default"].lengthGetValue(t,r),e.messagetype=p["default"].typeGetValue(t,r),e.next=this.blockDecoder.decodemessage,r)},t}(),S=function(){function n(e,t){_(this,n),this.decoders=e,this.blockDecoder=t}return n.prototype.decode=function(e,t,n,r){if(n-r<e.messagelength+m.MESSAGE_HEADER_LENGTH)return-1;var i=this.decoders.decode(t,r);return null!=i&&(e.result||(e.result=[]),i.messagecount=e.messagecount,i.blocksequencenumber=e.blocksequencenumber,e.result.push(i)),e.messagecount--,0<e.messagecount?e.next=this.blockDecoder.decodemessageheader:e.next=this.blockDecoder.decodeblockheader,r+m.MESSAGE_HEADER_LENGTH+e.messagelength},n}();O["default"]=g}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/qitch/decoder/BlockDecoder.js","/lib/qitch/decoder")},{"../BlockHeader":19,"../MessageHeader":24,"../Qitch":25,"../QitchConstants":26,_process:131,buffer:121,timers:152}],45:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=E("../MessageHeader"),p=(f=d)&&f.__esModule?f:{"default":f},h=E("../QitchConstants");var m=function(){function n(e){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),null===e)throw"Decoders cannot be null";this.decoders=new Map;var t=void 0;for(t=0;t<e.length;t++)this.decoders.set(e[t].type(),e[t])}return n.prototype.decode=function(e,t){if(null==e)throw"The source cannot be null";if(0===e.length)return null;var n=p["default"].typeGetValue(e,t),r=this.decoders.get(n);if(null==r)return null;var i=p["default"].lengthGetValue(e,t);this._check(e,t,i);var o=new Int8Array(e.buffer,h.MESSAGE_HEADER_LENGTH+t,i);return r.decode(o,0)},n.prototype._check=function(e,t,n){var r=e.length-t,i=h.MESSAGE_HEADER_LENGTH+n;if(r<i)throw"Not enough data available. Available: "+r+" Required: "+i},n}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/decoder/MessageDecoder.js","/lib/qitch/decoder")},{"../MessageHeader":24,"../QitchConstants":26,_process:131,buffer:121,timers:152}],46:[function(J,e,Z){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";Z.__esModule=!0,Z.MessageBlock=Z.BinaryMessage=undefined;var f=V(J("./BlockDecoder")),d=V(J("./MessageDecoder")),p=J("../../message.js"),h=V(J("./dataDecoder/TradeDecoder")),m=V(J("./dataDecoder/SymbolInfoDecoder")),E=V(J("./dataDecoder/PricedataDecoder")),_=V(J("./dataDecoder/SymbolStatusDecoder")),g=V(J("./dataDecoder/QuoteDecoder")),T=V(J("./dataDecoder/DerivativeInfoDecoder")),b=V(J("./dataDecoder/IVGreeksDecoder")),y=V(J("./dataDecoder/LastSaleDecoder")),S=V(J("./dataDecoder/LimitUpLimitDownDecoder")),v=V(J("./dataDecoder/ImbalanceStatusDecoder")),O=V(J("./dataDecoder/NethousePositionDecoder")),w=V(J("./dataDecoder/IntervalDecoder")),I=V(J("./dataDecoder/MMQuoteDecoder")),N=V(J("./dataDecoder/PurgeBookDecoder")),A=V(J("./dataDecoder/BookDeleteDecoder")),F=V(J("./dataDecoder/BookOrderDecoder")),C=V(J("../../SMessage")),M=V(J("./controlMessageDecoder/HeartbeatDecoder")),D=V(J("./controlMessageDecoder/InitialDataSentDecoder")),L=V(J("./controlMessageDecoder/ConnectResponseDecoder")),R=V(J("./controlMessageDecoder/StatsResponseDecoder")),B=V(J("./controlMessageDecoder/SubscribeResponseDecoder")),U=V(J("./controlMessageDecoder/UnsubscribeResponseDecoder")),k=V(J("./controlMessageDecoder/SlowConnectionDecoder")),P=V(J("./controlMessageDecoder/ConnectionCloseDecoder")),H=V(J("./controlMessageDecoder/ResubscribeMessageDecoder")),G=V(J("./controlMessageDecoder/ExchangeSubscribeResponseDecoder")),x=V(J("./controlMessageDecoder/ExchangeUnsubResponseDecoder")),j=V(J("./dataDecoder/AlertDecoder")),q=V(J("./controlMessageDecoder/SubUnsubAlertResponseDecoder"));function V(e){return e&&e.__esModule?e:{"default":e}}function Y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var X=function(){function n(e){Q(this,n);var t=[new M["default"],new B["default"],new U["default"],new L["default"],new P["default"],new R["default"],new k["default"],new D["default"],new H["default"],new q["default"],new m["default"],new h["default"],new E["default"],new _["default"],new g["default"],new T["default"],new b["default"],new y["default"],new S["default"],new v["default"],new O["default"],new w["default"],new I["default"],new N["default"],new A["default"],new F["default"],new G["default"],new x["default"],new j["default"]];this.decoder=new f["default"](new d["default"](t),e)}return n.prototype.decode=function(e){for(var t=e.length,n=[],r=0;0<t;){var i=t-this.decoder.add(e,r,t);r+=i,t-=i;var o=this.decoder.decode();if(null!=o)if(1===o.length&&1===o[0].messagecount)n.push(this._messageImpl(o[0]));else if(1<o.length)for(var s=0;s<o.length;s++)1<o[s].messagecount?(n.push(this._messageBlockImpl(o.slice(s+1,s+o[s].messagecount))),s+=o[s].messagecount+1):n.push(this._messageImpl(o[s]));else{for(var a=[],u=0;null!=o;)a[u++]=o,o=this.decoder.decode();n.push(this._messageBlockImpl(a))}}return n},n.prototype._messageBlockImpl=function(e){if(null==e||!(e instanceof Array)||0===e.length)return null;var t=new Array(e.length),n=void 0;for(n=0;n<e.length;n++)t[n]=this._messageImpl(e[n]);var r=new z;return r.sequencenumber=this.decoder.blocksequencenumber(),r.timestamp=(new Date).getMilliseconds(),r.encoding=p.Encodings.NONE_CHAR,r.mimetype=p.MimeTypes.QITCH_CHAR,r.messages=t,r},n.prototype._messageImpl=function(e){var t=new W;return t.sequencenumber=e.blocksequencenumber,t.timestamp=(new Date).getTime(),t.encoding=p.Encodings.NONE_CHAR,t.mimetype=p.MimeTypes.QITCH_CHAR,t.decodedPayload=e,t.id=e.requestId,t},n}(),W=Z.BinaryMessage=function(t){function n(){Q(this,n);var e=Y(this,t.call(this));return e.type="1",e.decodedPayload=null,e}return K(n,t),n}(C["default"]),z=Z.MessageBlock=function(t){function n(){Q(this,n);var e=Y(this,t.call(this));return e.type="B",e.messages=null,e}return K(n,t),n}(C["default"]);Z["default"]=X}).call(this,J("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},J("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],J("timers").setImmediate,J("timers").clearImmediate,"/lib/qitch/decoder/QitchDecoder.js","/lib/qitch/decoder")},{"../../SMessage":5,"../../message.js":17,"./BlockDecoder":44,"./MessageDecoder":45,"./controlMessageDecoder/ConnectResponseDecoder":47,"./controlMessageDecoder/ConnectionCloseDecoder":48,"./controlMessageDecoder/ExchangeSubscribeResponseDecoder":49,"./controlMessageDecoder/ExchangeUnsubResponseDecoder":50,"./controlMessageDecoder/HeartbeatDecoder":51,"./controlMessageDecoder/InitialDataSentDecoder":52,"./controlMessageDecoder/ResubscribeMessageDecoder":53,"./controlMessageDecoder/SlowConnectionDecoder":54,"./controlMessageDecoder/StatsResponseDecoder":55,"./controlMessageDecoder/SubUnsubAlertResponseDecoder":56,"./controlMessageDecoder/SubscribeResponseDecoder":57,"./controlMessageDecoder/UnsubscribeResponseDecoder":58,"./dataDecoder/AlertDecoder":59,"./dataDecoder/BookDeleteDecoder":60,"./dataDecoder/BookOrderDecoder":61,"./dataDecoder/DerivativeInfoDecoder":62,"./dataDecoder/IVGreeksDecoder":63,"./dataDecoder/ImbalanceStatusDecoder":64,"./dataDecoder/IntervalDecoder":65,"./dataDecoder/LastSaleDecoder":66,"./dataDecoder/LimitUpLimitDownDecoder":67,"./dataDecoder/MMQuoteDecoder":68,"./dataDecoder/NethousePositionDecoder":69,"./dataDecoder/PricedataDecoder":70,"./dataDecoder/PurgeBookDecoder":71,"./dataDecoder/QuoteDecoder":72,"./dataDecoder/SymbolInfoDecoder":73,"./dataDecoder/SymbolStatusDecoder":74,"./dataDecoder/TradeDecoder":75,_process:131,buffer:121,timers:152}],47:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ConnectResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ConnectResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n.version=m["default"].version(e,t+d.VERSION_OFFSET),n.flowControlCheckInterval=m["default"].int32(e,t+d.FLOW_CONTROL_CHECK_INTERVAL_OFFSET),n.serverInstance=m["default"].serverInstance(e,t+d.SERVER_INSTANCE_OFFSET),n.conflationMs=m["default"].int32(e,t+d.CONFLATION_OFFSET),n.rejectExcessiveConnection=m["default"].bool(e,t+d.REJECT_EXCESSIVE_CONNECTION_OFFSET),n.maxEntitlementsPerSubscription=m["default"].int32(e,t+d.MAX_ENTITLEMENTS_PER_SUBSCRIPTION_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ConnectResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ConnectResponseDef":27,_process:131,buffer:121,timers:152}],48:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ConnectionCloseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ConnectionClose;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ConnectionCloseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ConnectionCloseDef":28,_process:131,buffer:121,timers:152}],49:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ExchangeSubscribeResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ExchangeSubscribeResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ExchangeSubscribeResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ExchangeSubscribeResponseDef":30,_process:131,buffer:121,timers:152}],50:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ExchangeUnsubResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ExchangeUnsubscribeResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ExchangeUnsubResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ExchangeUnsubResponseDef":31,_process:131,buffer:121,timers:152}],51:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/HeartbeatDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.Heartbeat;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/HeartbeatDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/HeartbeatDef":33,_process:131,buffer:121,timers:152}],52:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/InitialDataSentDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.InitialDataSent;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/InitialDataSentDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/InitialDataSentDef":34,_process:131,buffer:121,timers:152}],53:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/ResubscribeMessageDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.ResubscribeMessage;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/ResubscribeMessageDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/ResubscribeMessageDef":35,_process:131,buffer:121,timers:152}],54:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/SlowConnectionDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.SlowConnection;return n.timesExceeded=m["default"].int32(e,t+d.TIMES_EXCEED_OFFSET),n.maxExceed=m["default"].int32(e,t+d.MAX_EXCEED_OFFSET),n.currentDelta=m["default"].int32(e,t+d.CURRENT_DELTA_OFFSET),n.sendingRate=m["default"].int32(e,t+d.SENDING_RATE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/SlowConnectionDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/SlowConnectionDef":36,_process:131,buffer:121,timers:152}],55:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/StatsResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.StatsResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n.numberOfSubscribedSymbolsL1=m["default"].int32(e,t+d.NUMBER_OF_SUBSCRIBED_L1_OFFSET),n.numberOfAvailableSymbolsL1=m["default"].int32(e,t+d.NUMBER_OF_AVAILABLE_L1_OFFSET),n.numberOfSubscribedSymbolsL2=m["default"].int32(e,t+d.NUMBER_OF_SUBSCRIBED_L2_OFFSET),n.numberOfAvailableSymbolsL2=m["default"].int32(e,t+d.NUMBER_OF_AVAILABLE_L2_OFFSET),n.numberOfOpenedConnections=m["default"].int32(e,t+d.NUMBER_OF_OPENED_CONNECTIONS),n.numberOfAvailableConnections=m["default"].int32(e,t+d.NUMBER_OF_AVAILABLE_CONNECTIONS),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/StatsResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/StatsResponseDef":38,_process:131,buffer:121,timers:152}],56:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/SubUnsubAlertResponseDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.AlertSubUnsubResponse;return n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET),n.operation=m["default"].asciiString(e,t+d.OPERATION_OFFSET,d.FIXED_OPERATION_LENGTH),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/SubUnsubAlertResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../controlMessageDefinition/SubUnsubAlertResponseDef":40,_process:131,buffer:121,timers:152}],57:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(g("../../controlMessageDefinition/SubscribeResponseDef")),p=g("../../../streamer-api"),h=g("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f},E=g("../../QitchConstants");var _=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.control.SubscribeResponse;n.code=m["default"].int32(e,t+d.CODE_OFFSET),n.reason=m["default"].reason(e,t+d.REASON_OFFSET),n.requestId=m["default"].int32(e,t+d.REQUEST_ID_OFFSET);var r=m["default"].int32(e,t+d.NUMBER_OF_ENTITLEMENTS_OFFSET),i=m["default"].int32(e,t+d.NUMBER_OF_REJECTED_SYMBOLS_OFFSET),o=m["default"].int32(e,t+d.NUMBER_OF_INVALID_SYMBOLS_OFFSET);return n.entitlements=this._decodeEntitlements(e,t+d.FIXED_LENGTH,r),n.rejectedsymbols=this._decodeSymbolList(e,t+d.FIXED_LENGTH+r*E.ENTITLEMENT_LENGTH,i),n.invalidsymbols=this._decodeSymbolList(e,t+d.FIXED_LENGTH+r*E.ENTITLEMENT_LENGTH+i*E.SYMBOL_LENGTH,o),n},e.prototype._decodeEntitlements=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(m["default"].entitlement(e,t+i*E.ENTITLEMENT_LENGTH));return r},e.prototype._decodeSymbolList=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(m["default"].symbol(e,t+i*E.SYMBOL_LENGTH));return r},e}();T["default"]=_}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/SubscribeResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../QitchConstants":26,"../../controlMessageDefinition/SubscribeResponseDef":42,_process:131,buffer:121,timers:152}],58:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(g("../../controlMessageDefinition/UnsubscribeResponseDef")),p=g("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f},m=g("../../QitchConstants"),E=g("../../../streamer-api");var _=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new E.messages.control.UnsubscribeResponse;n.code=h["default"].int32(e,t+d.CODE_OFFSET),n.reason=h["default"].reason(e,t+d.REASON_OFFSET),n.requestId=h["default"].int32(e,t+d.REQUEST_ID_OFFSET);var r=h["default"].int32(e,t+d.NUMBER_OF_UNSUBSCRIBED_ENTITLEMENTS_OFFSET);return n.unsubscribed=this._decodeEntitlements(e,t+d.FIXED_LENGTH,r),n},e.prototype._decodeEntitlements=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(h["default"].entitlement(e,t+i*m.ENTITLEMENT_LENGTH));return r},e}();T["default"]=_}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/decoder/controlMessageDecoder/UnsubscribeResponseDecoder.js","/lib/qitch/decoder/controlMessageDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../QitchConstants":26,"../../controlMessageDefinition/UnsubscribeResponseDef":43,_process:131,buffer:121,timers:152}],59:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/AlertDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.Alert;return n.symbol=m["default"].symbol(e,t+d.SYMBOL_OFFSET),n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.instrumentType=m["default"].instrumenttype(e,t+d.INSTRUMENTTYPE_OFFSET),n.alertId=m["default"].int64(e,t+d.ALERT_ID_OFFSET),n.triggerValue=m["default"].dec8double(e,t+d.TRIGGER_VALUE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/AlertDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/AlertDef":82,_process:131,buffer:121,timers:152}],60:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/BookDeleteDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.BookDelete;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.orderReference=m["default"].orderreference(e,t+d.ORDER_REFERENCE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/BookDeleteDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/BookDeleteDef":83,_process:131,buffer:121,timers:152}],61:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/BookOrderDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.BookOrder;n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.marketMakerID=m["default"].mmid(e,t+d.MMID_OFFSET),n.orderID=m["default"].orderIdLegacy(e,t+d.ORDERID_OFFSET),n.orderSide=m["default"].orderside(e,t+d.SIDE_OFFSET),n.price=m["default"].dec8double(e,t+d.PRICE_OFFSET),n.size=m["default"].int32(e,t+d.SIZE_OFFSET),n.lastUpdate=m["default"].timestamp(e,t+d.LASTUPDATE_OFFSET);var r=m["default"].int32(e,t+d.FLAGS_OFFSET);return n.flags=r,n.display=d.BookOrderFlags.isDisplay(r),n.orderChangeType=m["default"].bookOrderChangeType(e,t+d.CHANGE_TYPE_OFFSET),n.orderReference=m["default"].orderreference(e,t+d.ORDER_REFERENCE_OFFSET),n.excode=m["default"].excode(e,t+d.EXCODE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/BookOrderDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/BookOrderDef":84,_process:131,buffer:121,timers:152}],62:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/DerivativeInfoDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.DerivativeInfo;return n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.rootSymbol=m["default"].symbol(e,t+d.ROOTSYMBOL_OFFSET),n.expiration=m["default"].timestamp(e,t+d.EXPIRATION_OFFSET),n.delivery=m["default"].timestamp(e,t+d.DELIVERY_OFFSET),n.openInterest=m["default"].int64(e,t+d.OPENINTEREST_OFFSET),n.contractSize=m["default"].int32(e,t+d.CONTRACTSIZE_OFFSET),n.callPutIndicator=m["default"].asciichar(e,t+d.CALLPUTINDICATOR_OFFSET),n.minTickSize=m["default"].dec8double(e,t+d.MINTICKSIZE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/DerivativeInfoDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/DerivativeInfoDef":85,_process:131,buffer:121,timers:152}],63:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/IVGreeksDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.IVGreeks;return n.locateCode=m["default"].locatecode(e,t+d.LOCATECODE_OFFSET),n.lastCalculation=m["default"].timestamp(e,t+d.LAST_CALCULATION_OFFSET),n.delta=m["default"].dec8double(e,t+d.DELTA_OFFSET),n.gamma=m["default"].dec8double(e,t+d.GAMMA_OFFSET),n.vega=m["default"].dec8double(e,t+d.VEGA_OFFSET),n.rho=m["default"].dec8double(e,t+d.RHO_OFFSET),n.theta=m["default"].dec8double(e,t+d.THETA_OFFSET),n.midIV=m["default"].dec8double(e,t+d.IMPLIED_VOLATILITY_OFFSET),n.midIVChange=m["default"].dec8double(e,t+d.IMPLIED_VOLATILITY_CHANGE_OFFSET),n.bidIV=m["default"].dec8double(e,t+d.BID_IMPLIED_VOLATILITY_OFFSET),n.askIV=m["default"].dec8double(e,t+d.ASK_IMPLIED_VOLATILITY_OFFSET),n.mark=m["default"].dec8double(e,t+d.MARK_OFFSET),n.intrinsicValue=m["default"].dec8double(e,t+d.INTRINSIC_VALUE_OFFSET),n.extrinsicValue=m["default"].dec8double(e,t+d.EXTRINSIC_VALUE_OFFSET),n.previousMark=m["default"].dec8double(e,t+d.PREVIOUS_MARK_OFFSET),n.markChange=m["default"].dec8double(e,t+d.MARK_CHANGE_OFFSET),n.markChangePercent=m["default"].dec8double(e,t+d.MARK_CHANGE_PERCENT_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/IVGreeksDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/IVGreeksDef":86,_process:131,buffer:121,timers:152}],64:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/ImbalanceStatusDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.ImbalanceStatus;return n.locateCode=m["default"].locatecode(e,t+d.LOCATECODE_OFFSET),n.imbalanceType=m["default"].imbalancetype(e,t+d.IMBALANCE_TYPE_OFFSET),n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.referencePrice=m["default"].dec8double(e,t+d.REFERENCEPRICE_OFFSET),n.size=m["default"].int64(e,t+d.SIZE_OFFSET),n.side=m["default"].orderside(e,t+d.ORDERSIDE_OFFSET),n.pairedVolume=m["default"].int32(e,t+d.PAIREDVOLUME_OFFSET),n.nearIndicativePrice=m["default"].dec8double(e,t+d.NEARINDICATIVEPRICE_OFFSET),n.farIndicativePrice=m["default"].dec8double(e,t+d.FARINDICATIVEPRICE_OFFSET),n.priceVariation=m["default"].dec8double(e,t+d.PRICEVARIATION_OFFSET),n.symbol=m["default"].symbol(e,t+d.SYMBOL_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/ImbalanceStatusDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/ImbalanceStatusDef":87,_process:131,buffer:121,timers:152}],65:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/IntervalDef")),d=_("../../../streamer-api"),p=m(_("../../Qitch")),h=(m(_("jsbi")),m(_("bignumber.js")));function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return f.TYPEID},e.prototype.decode=function(e,t){var n=new d.messages.market.Interval;return n.timestamp=p["default"].timestamp(e,t+f.TIMESTAMP_OFFSET),n.locateCode=p["default"].locatecode(e,t+f.SYMBOL_OFFSET),n.open=p["default"].dec8double(e,t+f.OPEN_OFFSET),n.low=p["default"].dec8double(e,t+f.LOW_OFFSET),n.high=p["default"].dec8double(e,t+f.HIGH_OFFSET),n.last=p["default"].dec8double(e,t+f.LAST_OFFSET),n.volume=p["default"].dec8double(e,t+f.LONGDECIMALVOLUME_OFFSET),n.startTime=p["default"].timestamp(e,t+f.STARTTIME_OFFSET),n.openTime=p["default"].timestamp(e,t+f.OPENTIME_OFFSET),n.lastTime=p["default"].timestamp(e,t+f.LASTTIME_OFFSET),n.tradeValue=p["default"].int64(e,t+f.TRADEVALUE_OFFSET),n.vwap=this._vwap(n),n.periodMs=p["default"].int32(e,t+f.PERIODMS_OFFSET),n},e.prototype._vwap=function(e){return null!=e.tradeValue&&null!=e.volume&&0!==e.volume.toNumber()?new h["default"](e.tradeValue.toString()).dividedBy(e.volume):null},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/IntervalDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/IntervalDef":88,_process:131,"bignumber.js":118,buffer:121,jsbi:128,timers:152}],66:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/LastSaleDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.LastSale;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.last=m["default"].dec8double(e,t+d.LAST_OFFSET),n.previousClose=m["default"].dec8double(e,t+d.PREVCLOSE_OFFSET),n.accumulatedVolume=m["default"].dec8double(e,t+d.DECIMALACCUMULATEDVOLUME_OFFSET),n.tick=m["default"].tick(e,t+d.TICK_OFFSET),n.change=this._change(n),n.percentChange=this._percentChange(n),n.lastTradeExcode=m["default"].excode(e,t+d.LASTTRADE_EXCODE_OFFSET),n},e.prototype._change=function(e){return null!=e.last&&null!=e.previousClose?e.last.minus(e.previousClose):null},e.prototype._percentChange=function(e){return null==e.last||null==e.previousClose||e.previousClose.isEqualTo(0)?null:(e.last-e.previousClose)/e.previousClose*100},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/LastSaleDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/LastSaleDef":89,_process:131,buffer:121,timers:152}],67:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/LimitUpLimitDownDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.LimitUpLimitDown;n.locateCode=m["default"].int32(e,t+d.LOCATECODE_OFFSET),n.lowerLimit=m["default"].dec8double(e,t+d.LOWERLIMIT_OFFSET),n.effectiveTime=m["default"].timestamp(e,t+d.EFFECTIVETIME_OFFSET),n.upperLimit=m["default"].dec8double(e,t+d.UPPERLIMIT_OFFSET);var r=m["default"].sbyte(e,t+d.PRICEBANDINDICATOR_OFFSET);return n.bidNotExecutable=d.LimitUpLimitDownFlags.isBidNotExecutable(r),n.askNotExecutable=d.LimitUpLimitDownFlags.isAskNotExecutable(r),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/LimitUpLimitDownDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/LimitUpLimitDownDef":90,_process:131,buffer:121,timers:152}],68:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/MMQuoteDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.MMQuote;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.bidPrice=m["default"].dec8double(e,t+d.BIDPRICE_OFFSET),n.bidSize=m["default"].dec8double(e,t+d.DECIMALBIDSIZE_OFFSET),n.askPrice=m["default"].dec8double(e,t+d.ASKPRICE_OFFSET),n.askSize=m["default"].dec8double(e,t+d.DECIMALASKSIZE_OFFSET),n.marketMakerID=m["default"].mmid(e,t+d.MMID_OFFSET),n.indicator=m["default"].asciichar(e,t+d.INDICATOR_OFFSET),n.bidChange=m["default"].dec8double(e,t+d.BIDCHANGE_OFFSET),n.askChange=m["default"].dec8double(e,t+d.ASKCHANGE_OFFSET),n.sharesPerSizeUnit=m["default"].int32(e,t+d.SHARESPERSIZEUNIT_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/MMQuoteDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/MMQuoteDef":91,_process:131,buffer:121,timers:152}],69:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/NethousePositionDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.NethousePosition;return n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.marketMakerID=m["default"].mmid(e,t+d.MMID_OFFSET),n.buyValue=m["default"].dec8double(e,t+d.BUYVALUE_OFFSET),n.buyVolume=m["default"].int64(e,t+d.BUYVOLUME_OFFSET),n.sellValue=m["default"].dec8double(e,t+d.SELLVALUE_OFFSET),n.sellVolume=m["default"].int64(e,t+d.SELLVOLUME_OFFSET),n.buyBlockValue=m["default"].dec8double(e,t+d.BUYBLOCKVALUE_OFFSET),n.buyBlockVolume=m["default"].int64(e,t+d.BUYBLOCKVOLUME_OFFSET),n.sellBlockValue=m["default"].dec8double(e,t+d.SELLBLOCKVALUE_OFFSET),n.sellBlockVolume=m["default"].int64(e,t+d.SELLBLOCKVOLUME_OFFSET),n.buyTransactions=m["default"].int32(e,t+d.BUYTRANSACTIONS_OFFSET),n.sellTransactions=m["default"].int32(e,t+d.SELLTRANSACTIONS_OFFSET),n.buyBlockTransactions=m["default"].int32(e,t+d.BUYBLOCKTRANSACTIONS_OFFSET),n.sellBlockTransactions=m["default"].int32(e,t+d.SELLBLOCKTRANSACTIONS_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/NethousePositionDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/NethousePositionDef":92,_process:131,buffer:121,timers:152}],70:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/PricedataDef")),p=_("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f},m=_("../../../streamer-api.js");var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new m.messages.market.PriceData;n.timestamp=h["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.locateCode=h["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.last=h["default"].dec8double(e,t+d.LAST_OFFSET),n.previousClose=h["default"].dec8double(e,t+d.PREVCLOSE_OFFSET),n.open=h["default"].dec8double(e,t+d.OPEN_OFFSET),n.high=h["default"].dec8double(e,t+d.HIGH_OFFSET),n.low=h["default"].dec8double(e,t+d.LOW_OFFSET),n.accumulatedVolume=h["default"].dec8double(e,t+d.DECIMALACCUMULATEDVOLUME_OFFSET),n.lastTradeTime=h["default"].timestamp(e,t+d.LASTTRADETIME_OFFSET),n.tick=h["default"].tick(e,t+d.TICK_OFFSET),n.lastTradeSize=h["default"].dec8double(e,t+d.DECIMALLASTTRADESIZE_OFFSET),n.close=h["default"].dec8double(e,t+d.CLOSE_OFFSET),n.tradeCount=h["default"].int64(e,t+d.TRADECOUNT_OFFSET),n.accumulatedPrice=null,n.accumulatedTradeValue=h["default"].dec8double(e,t+d.ACCUMULATEDTRADEVALUE_OFFSET),n.change=this._change(n),n.percentChange=this._percentChange(n);var r=h["default"].sbyte(e,t+d.FLAGS_OFFSET);return n.annualHigh=d.PricedataFlags.isAnnualHigh(r),n.annualLow=d.PricedataFlags.isAnnualLow(r),n.vwap=h["default"].dec8double(e,t+d.VWAP_OFFSET),n.twap=h["default"].dec8double(e,t+d.TWAP_OFFSET),n.preMarketTradeTime=h["default"].timestamp(e,t+d.PREMARKETTRADETIME_OFFSET),n.preMarketLast=h["default"].dec8double(e,t+d.PREMARKETLASTPRICE_OFFSET),n.preMarketVolume=h["default"].dec8double(e,t+d.DECIMALPREMARKETVOLUME_OFFSET),n.preMarketChange=h["default"].dec8double(e,t+d.PREMARKETCHANGE_OFFSET),n.preMarketPercentChange=this._premarketPercentChange(n),n.postMarketTradeTime=h["default"].timestamp(e,t+d.POSTMARKETTRADETIME_OFFSET),n.postMarketLast=h["default"].dec8double(e,t+d.POSTMARKETLASTPRICE_OFFSET),n.postMarketVolume=h["default"].dec8double(e,t+d.DECIMALPOSTMARKETVOLUME_OFFSET),n.postMarketChange=h["default"].dec8double(e,t+d.POSTMARKETCHANGE_OFFSET),n.postMarketPercentChange=this._postmarketPercentChange(n),n.lastTradeExcode=h["default"].excode(e,t+d.LASTTRADEEXCODE_OFFSET),n.currencyID=h["default"].currencyid(e,t+d.CURRENCYID_OFFSET),n.vwapVolume=h["default"].dec8double(e,t+d.VWAPVOLUME_OFFSET),n},e.prototype._change=function(e){return null!=e.last&&null!=e.previousClose?e.last.minus(e.previousClose):null},e.prototype._percentChange=function(e){return null==e.last||null==e.previousClose||e.previousClose.isEqualTo(0)?null:e.last.minus(e.previousClose).dividedBy(e.previousClose).multipliedBy(100)},e.prototype._premarketPercentChange=function(e){if(null!=e.preMarketChange){if(null!=e.close&&!e.close.isEqualTo(0))return e.preMarketChange.minus(e.close).dividedBy(e.close).multipliedBy(100);if(null!=e.previousClose&&!e.previousClose.isEqualTo(0))return e.preMarketChange.minus(e.previousClose).dividedBy(e.previousClose).multipliedBy(100)}return null},e.prototype._postmarketPercentChange=function(e){return null==e.postMarketLast||null==e.last||e.last.isEqualTo(0)?null:e.postMarketLast.minus(e.last).dividedBy(e.last).multipliedBy(100)},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/PricedataDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api.js":108,"../../Qitch":25,"../../marketDataDefinition/PricedataDef":93,_process:131,buffer:121,timers:152}],71:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/PurgeBookDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.PurgeBook;return n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/PurgeBookDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/PurgeBookDef":94,_process:131,buffer:121,timers:152}],72:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/QuoteDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.Quote;return n.locateCode=m["default"].locatecode(e,t+d.SYMBOL_OFFSET),n.timestamp=m["default"].timestamp(e,t+d.TIMESTAMP_OFFSET),n.askCondition=m["default"].asciichar(e,t+d.ASKCONDITION_OFFSET),n.askExcode=m["default"].excode(e,t+d.ASKEXCODE_OFFSET),n.askPrice=m["default"].dec8double(e,t+d.ASKPRICE_OFFSET),n.askSize=m["default"].dec8double(e,t+d.DECIMALASKSIZE_OFFSET),n.bidCondition=m["default"].asciichar(e,t+d.BIDCONDITION_OFFSET),n.bidExcode=m["default"].excode(e,t+d.BIDEXCODE_OFFSET),n.bidPrice=m["default"].dec8double(e,t+d.BIDPRICE_OFFSET),n.bidSize=m["default"].dec8double(e,t+d.DECIMALBIDSIZE_OFFSET),n.indicator=m["default"].asciichar(e,t+d.INDICATOR_OFFSET),n.sharesPerSizeUnit=m["default"].int32(e,t+d.SHARESPERSIZEUNIT_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/QuoteDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/QuoteDef":95,_process:131,buffer:121,timers:152}],73:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/SymbolInfoDef")),p=_("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f},m=_("../../../streamer-api.js");var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new m.messages.market.SymbolInfo;return n.symbol=h["default"].symbol(e,t+d.SYMBOL_OFFSET),n.locateCode=h["default"].locatecode(e,t+d.LOCATECODE_OFFSET),n.excode=h["default"].excode(e,t+d.EXCODE_OFFSET),n.instrumentType=h["default"].instrumenttype(e,t+d.INSTRUMENTTYPE_OFFSET),n.currencyId=h["default"].currencyid(e,t+d.CURRENCYID_OFFSET),n.haltStatus=h["default"].sbyte(e,t+d.HALTSTATUS_OFFSET),n.haltIndicator=h["default"].sbyte(e,t+d.HALTINDICATOR_OFFSET),n.regSHOStatus=h["default"].asciichar(e,t+d.REGSHOSTATUS_OFFSET),n.pqe=0<h["default"].sbyte(e,t+d.PQE_OFFSET),n.caveatEmptor=0<h["default"].sbyte(e,t+d.CAVEATEMPTOR_OFFSET),n.boardLotSize=h["default"].int32(e,t+d.BOARDLOTSIZE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/SymbolInfoDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api.js":108,"../../Qitch":25,"../../marketDataDefinition/SymbolInfoDef":96,_process:131,buffer:121,timers:152}],74:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/SymbolStatusDef")),p=_("../../../streamer-api"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.decode=function(e,t){var n=new p.messages.market.SymbolStatus;return n.locateCode=m["default"].locatecode(e,t+d.LOCATE_CODE_OFFSET),n.haltStatus=m["default"].sbyte(e,t+d.HALTSTATUS_OFFSET),n.haltIndicator=m["default"].sbyte(e,t+d.HALTINDICATOR_OFFSET),n.regSHOStatus=m["default"].asciichar(e,t+d.REGSHOSTATUS_OFFSET),n.closingCalculatedPrice=m["default"].dec8double(e,t+d.CLOSINGPRICE_OFFSET),n.effectiveTime=m["default"].timestamp(e,t+d.EFFECTIVETIME_OFFSET),n.openingTime=m["default"].timestamp(e,t+d.OPENINGTIME_OFFSET),n.note=m["default"].note(e,t+d.NOTE_OFFSET),n.symbol=m["default"].symbol(e,t+d.SYMBOL_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/SymbolStatusDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api":108,"../../Qitch":25,"../../marketDataDefinition/SymbolStatusDef":97,_process:131,buffer:121,timers:152}],75:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=_("../../Qitch"),p=(f=d)&&f.__esModule?f:{"default":f},h=_("../../../streamer-api.js"),m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../marketDataDefinition/TradeDef"));var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return m.TYPEID},e.prototype.decode=function(e,t){var n=new h.messages.market.Trade;return n.timestamp=p["default"].timestamp(e,t+m.TIMESTAMP_OFFSET),n.locateCode=p["default"].locatecode(e,t+m.SYMBOL_OFFSET),n.price=p["default"].dec8double(e,t+m.PRICE_OFFSET),n.size=p["default"].dec8double(e,t+m.DECIMALSIZE_OFFSET),n.indicator=p["default"].asciichar(e,t+m.INDICATOR_OFFSET),n.tick=p["default"].tick(e,t+m.TICK_OFFSET),n.accumulatedVolume=p["default"].dec8double(e,t+m.DECIMALACCUMULATEDVOLUME_OFFSET),n.sequenceNumber=p["default"].int32(e,t+m.SEQUENCENUMBER_OFFSET),n.flags=p["default"].int32(e,t+m.FLAGS_OFFSET),n.buyerID=p["default"].mmid(e,t+m.BUYERMMID_OFFSET),n.sellerID=p["default"].mmid(e,t+m.SELLERMMID_OFFSET),n.rangeIndicator=p["default"].rangeindicator(e,t+m.RANGEINDICATOR_OFFSET),n.matchID=p["default"].int64(e,t+m.MATCHID_OFFSET),n.vwap=p["default"].dec8double(e,t+m.VWAP_OFFSET),n.excode=p["default"].excode(e,t+m.EXCODE_OFFSET),n},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/decoder/dataDecoder/TradeDecoder.js","/lib/qitch/decoder/dataDecoder")},{"../../../streamer-api.js":108,"../../Qitch":25,"../../marketDataDefinition/TradeDef":98,_process:131,buffer:121,timers:152}],76:[function(I,e,N){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";N.__esModule=!0;var f=I("../../streamer-api"),d=S(I("../../SMessage")),p=I("../QitchConstants"),h=S(I("../BlockHeader")),m=I("../../streamer-utils"),E=S(I("../MessageHeader")),_=S(I("./controlMessageEncoder/StatsMessageEncoder")),g=S(I("./controlMessageEncoder/SubscribeMessageEncoder")),T=S(I("./controlMessageEncoder/FlowMessageEncoder")),b=S(I("./controlMessageEncoder/ExchangeSubscribeMessageEncoder")),y=S(I("./controlMessageEncoder/SubUnsubAlertMessageEncoder"));function S(e){return e&&e.__esModule?e:{"default":e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var O=function(){function e(){v(this,e),this.encoder=new w}return e.prototype.encode=function(e,t){if(null==e)throw"Argument cannot be null.";if(!e instanceof d["default"])throw"Wrong message type";var n=this.encoder.length(e.payload),r=p.BLOCK_HEADER_LENGTH+n,i=new ArrayBuffer(t+r),o=new Int8Array(i);return h["default"].lengthToBytes(o,t,n),h["default"].messageCountToBytes(o,t,1),h["default"].reservedToBytes(o,t,0),h["default"].sequenceToBytes(o,t,e.sequencenumber),this.encoder.encode(o,t+p.BLOCK_HEADER_LENGTH,e.payload)},e}(),w=function(){function e(){v(this,e),this[f.messages.MessageTypeNames.ctrl.STATS]=new _["default"],this[f.messages.MessageTypeNames.ctrl.FLOW]=new T["default"],this[f.messages.MessageTypeNames.ctrl.SUBSCRIBE]=new g["default"],this[f.messages.MessageTypeNames.ctrl.EXCHANGE_SUBSCRIBE]=new b["default"],this[f.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB]=new y["default"]}return e.prototype.length=function(e){var t=this[(0,m.messagetype)(e)];return null!==t?t.length(e)+p.MESSAGE_HEADER_LENGTH:0},e.prototype.encode=function(e,t,n){var r=this[(0,m.messagetype)(n)];return null!==r?(E["default"].lengthGetBytes(e,t,r.length(n)),E["default"].typeGetBytes(e,t,r.type()),r.encode(e,t+p.MESSAGE_HEADER_LENGTH,n)):e},e}();N["default"]=O}).call(this,I("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],I("timers").setImmediate,I("timers").clearImmediate,"/lib/qitch/encoder/QitchEncoder.js","/lib/qitch/encoder")},{"../../SMessage":5,"../../streamer-api":108,"../../streamer-utils":110,"../BlockHeader":19,"../MessageHeader":24,"../QitchConstants":26,"./controlMessageEncoder/ExchangeSubscribeMessageEncoder":77,"./controlMessageEncoder/FlowMessageEncoder":78,"./controlMessageEncoder/StatsMessageEncoder":79,"./controlMessageEncoder/SubUnsubAlertMessageEncoder":80,"./controlMessageEncoder/SubscribeMessageEncoder":81,_process:131,buffer:121,timers:152}],77:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/ExchangeSubscribeMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.FIXED_LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.id),h["default"].putAction(e,t+d.ACTION_OFFSET,n.action),h["default"].putMimetype(e,t+d.MIMETYPE_OFFSET,n.mimetype),h["default"].putConflation(e,t+d.CONFLATION_OFFSET,n.conflation),h["default"].putExcode(e,t+d.EXCODE_OFFSET,n.exchange),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/ExchangeSubscribeMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/ExchangeSubscribeMessageDef":29,_process:131,buffer:121,timers:152}],78:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/FlowMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.SEQUENCE_NUMBER_OFFSET,n.sequence),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/FlowMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/FlowMessageDef":32,_process:131,buffer:121,timers:152}],79:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/StatsMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.sequenceNumber),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/StatsMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/StatsMessageDef":37,_process:131,buffer:121,timers:152}],80:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(E("../../controlMessageDefinition/SubUnsubAlertMessageDef")),p=E("../../Qitch"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){return d.FIXED_LENGTH},e.prototype.encode=function(e,t,n){return h["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.id),h["default"].putAsciiString(e,t+d.OPERATION_OFFSET,n.operation,d.FIXED_OPERATION_LENGTH),h["default"].putMimetype(e,t+d.MIMETYPE_OFFSET,n.mimetype),e},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/SubUnsubAlertMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../controlMessageDefinition/SubUnsubAlertMessageDef":39,_process:131,buffer:121,timers:152}],81:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f,d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../../controlMessageDefinition/SubscribeMessageDef")),p=_("../../QitchConstants"),h=_("../../Qitch"),m=(f=h)&&f.__esModule?f:{"default":f};var E=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.type=function(){return d.TYPEID},e.prototype.length=function(e){var t=p.SYMBOL_LENGTH*e.symbols.length,n=p.MARKETDATATYPE_LENGTH*e.types.length;return d.FIXED_LENGTH+t+n},e.prototype.encode=function(e,t,n){var r=p.SYMBOL_LENGTH*n.symbols.length;return m["default"].putInt32(e,t+d.REQUEST_ID_OFFSET,n.id),m["default"].putAction(e,t+d.ACTION_OFFSET,n.action),m["default"].putMimetype(e,t+d.MIMETYPE_OFFSET,n.mimetype),m["default"].putBool(e,t+d.SKIP_HEAVY_INITIAL_LOAD_OFFSET,n.skipHeavyInitialLoad),m["default"].putConflation(e,t+d.CONFLATION_OFFSET,n.conflation),m["default"].putInt32(e,t+d.NUMBER_OF_SYMBOLS_OFFSET,n.symbols.length),m["default"].putByte(e,t+d.NUMBER_OF_TYPES_OFFSET,n.types.length),this._encodeSymbols(n,t+d.FIXED_LENGTH,e),this._encodeMarketdataTypes(n,t+d.FIXED_LENGTH+r,e),e},e.prototype._encodeSymbols=function(e,t,n){for(var r=0;r<e.symbols.length;r++)m["default"].putSymbol(n,t+r*p.SYMBOL_LENGTH,e.symbols[r])},e.prototype._encodeMarketdataTypes=function(e,t,n){for(var r=0;r<e.types.length;r++)m["default"].putMarketdatatype(n,t+r*p.MARKETDATATYPE_LENGTH,e.types[r])},e}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/encoder/controlMessageEncoder/SubscribeMessageEncoder.js","/lib/qitch/encoder/controlMessageEncoder")},{"../../Qitch":25,"../../QitchConstants":26,"../../controlMessageDefinition/SubscribeMessageDef":41,_process:131,buffer:121,timers:152}],82:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0,g.LENGTH=g.TRIGGER_VALUE_OFFSET=g.ALERT_ID_OFFSET=g.INSTRUMENTTYPE_OFFSET=g.TIMESTAMP_OFFSET=g.SYMBOL_OFFSET=g.TYPEID=undefined;var f=_("../QitchConstants"),d=(g.TYPEID=17,g.SYMBOL_OFFSET=0),p=g.TIMESTAMP_OFFSET=d+f.SYMBOL_LENGTH,h=g.INSTRUMENTTYPE_OFFSET=p+f.TIMESTAMP_LENGTH,m=g.ALERT_ID_OFFSET=h+f.INSTRUMENTTYPE_LENGTH,E=g.TRIGGER_VALUE_OFFSET=m+f.LONG_LENGTH;g.LENGTH=E+f.DOUBLE_LENGTH}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/qitch/marketDataDefinition/AlertDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],83:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0,E.LENGTH=E.ORDER_REFERENCE_OFFSET=E.SYMBOL_OFFSET=E.TIMESTAMP_OFFSET=E.TYPEID=undefined;var f=m("../QitchConstants"),d=(E.TYPEID=5,E.TIMESTAMP_OFFSET=0),p=E.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=E.ORDER_REFERENCE_OFFSET=p+f.LOCATECODE_LENGTH;E.LENGTH=h+f.ORDER_REFERENCE_LENGTH}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/qitch/marketDataDefinition/BookDeleteDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],84:[function(w,e,I){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";I.__esModule=!0,I.BookOrderFlags=I.LENGTH=I.EXCODE_OFFSET=I.ORDER_REFERENCE_OFFSET=I.CHANGE_TYPE_OFFSET=I.FLAGS_OFFSET=I.LASTUPDATE_OFFSET=I.SIZE_OFFSET=I.PRICE_OFFSET=I.SIDE_OFFSET=I.ORDERID_OFFSET=I.MMID_OFFSET=I.SYMBOL_OFFSET=I.TIMESTAMP_OFFSET=I.TYPEID=undefined;var f=w("../QitchConstants");I.TYPEID=4;var d=I.TIMESTAMP_OFFSET=0,p=I.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=I.MMID_OFFSET=p+f.LOCATECODE_LENGTH,m=I.ORDERID_OFFSET=h+f.MMID_LENGTH,E=I.SIDE_OFFSET=m+f.ORDERID_LENGTH,_=I.PRICE_OFFSET=E+f.ORDERSIDE_LENGTH,g=I.SIZE_OFFSET=_+f.DOUBLE_LENGTH,T=I.LASTUPDATE_OFFSET=g+f.INT_LENGTH,b=I.FLAGS_OFFSET=T+f.TIMESTAMP_LENGTH,y=I.CHANGE_TYPE_OFFSET=b+f.INT_LENGTH,S=I.ORDER_REFERENCE_OFFSET=y+f.ASCIICHAR_LENGTH,v=I.EXCODE_OFFSET=S+f.ORDER_REFERENCE_LENGTH,O=(I.LENGTH=v+f.EXCODE_LENGTH,I.BookOrderFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isLotsOf=function(e){return 0<(e&t.prototype.LOTSOF_MASK)},t.isAllOrNone=function(e){return 0<(e&t.prototype.ALLORNONE_MASK)},t.isMinimumFillVolume=function(e){return 0<(e&t.prototype.MINIMUMFILLVOLUME_MASK)},t.isNonResident=function(e){return 0<(e&t.prototype.NONRESIDENT_MASK)},t.isCashSettlement=function(e){return 0<(e&t.prototype.CASHSETTLEMENT_MASK)},t.isCashTodaySettlement=function(e){return 0<(e&t.prototype.CASHTODAYSETTLEMENT_MASK)},t.isDelayedDateSettlement=function(e){return 0<(e&t.prototype.DELAYEDDATESETTLEMENT_MASK)},t.isDerivativeRelatedSettlement=function(e){return 0<(e&t.prototype.DERIVATIVERELATEDSETTLEMENT_MASK)},t.isNonNetSettlement=function(e){return 0<(e&t.prototype.NONNETSETTLEMENT_MASK)},t.isMarketOrder=function(e){return 0<(e&t.prototype.MARKETORDER_MASK)},t.isFirmQuote=function(e){return 0<(e&t.prototype.FIRMQUOTE_MASK)},t.isDisplay=function(e){return 0<(e&t.prototype.DISPLAY_MASK)},t.isMarketPrice=function(e){return 0<(e&t.prototype.PRICE_MARKET_MASK)},t.isOpeningPrice=function(e){return 0<(e&t.prototype.PRICE_OPENING_MASK)},t.isPriceMustBeFilled=function(e){return 0<(e&t.prototype.PRICE_MUSTBEFILLED_MASK)},t.isFutureSettlement=function(e){return 0<(e&t.prototype.FUTURESETTLEMENT_MASK)},t.isNextDaySettlement=function(e){return 0<(e&t.prototype.NEXTDAYSETTLEMENT_MASK)},t}());O.prototype.LOTSOF_MASK=1,O.prototype.ALLORNONE_MASK=2,O.prototype.MINIMUMFILLVOLUME_MASK=4,O.prototype.NONRESIDENT_MASK=8,O.prototype.CASHSETTLEMENT_MASK=16,O.prototype.CASHTODAYSETTLEMENT_MASK=32,O.prototype.DELAYEDDATESETTLEMENT_MASK=64,O.prototype.DERIVATIVERELATEDSETTLEMENT_MASK=128,O.prototype.NONNETSETTLEMENT_MASK=256,O.prototype.MARKETORDER_MASK=512,O.prototype.FIRMQUOTE_MASK=1024,O.prototype.DISPLAY_MASK=16777216,O.prototype.PRICE_MARKET_MASK=268435456,O.prototype.PRICE_OPENING_MASK=536870912,O.prototype.PRICE_MUSTBEFILLED_MASK=1073741824,O.prototype.FUTURESETTLEMENT_MASK=2048,O.prototype.NEXTDAYSETTLEMENT_MASK=4096}).call(this,w("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],w("timers").setImmediate,w("timers").clearImmediate,"/lib/qitch/marketDataDefinition/BookOrderDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],85:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0,y.LENGTH=y.MINTICKSIZE_OFFSET=y.CALLPUTINDICATOR_OFFSET=y.CONTRACTSIZE_OFFSET=y.OPENINTEREST_OFFSET=y.DELIVERY_OFFSET=y.EXPIRATION_OFFSET=y.ROOTSYMBOL_OFFSET=y.SYMBOL_OFFSET=y.TYPEID=undefined;var f=b("../QitchConstants"),d=(y.TYPEID=12,y.SYMBOL_OFFSET=0),p=y.ROOTSYMBOL_OFFSET=d+f.LOCATECODE_LENGTH,h=y.EXPIRATION_OFFSET=p+f.SYMBOL_LENGTH,m=y.DELIVERY_OFFSET=h+f.TIMESTAMP_LENGTH,E=y.OPENINTEREST_OFFSET=m+f.TIMESTAMP_LENGTH,_=y.CONTRACTSIZE_OFFSET=E+f.LONG_LENGTH,g=y.CALLPUTINDICATOR_OFFSET=_+f.INT_LENGTH,T=y.MINTICKSIZE_OFFSET=g+f.ASCIICHAR_LENGTH;y.LENGTH=T+f.DOUBLE_LENGTH}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/qitch/marketDataDefinition/DerivativeInfoDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],86:[function(F,e,C){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";C.__esModule=!0,C.LENGTH=C.MARK_CHANGE_PERCENT_OFFSET=C.MARK_CHANGE_OFFSET=C.PREVIOUS_MARK_OFFSET=C.EXTRINSIC_VALUE_OFFSET=C.INTRINSIC_VALUE_OFFSET=C.MARK_OFFSET=C.LAST_CALCULATION_OFFSET=C.ASK_IMPLIED_VOLATILITY_OFFSET=C.BID_IMPLIED_VOLATILITY_OFFSET=C.IMPLIED_VOLATILITY_CHANGE_OFFSET=C.IMPLIED_VOLATILITY_OFFSET=C.THETA_OFFSET=C.RHO_OFFSET=C.VEGA_OFFSET=C.GAMMA_OFFSET=C.DELTA_OFFSET=C.LOCATECODE_OFFSET=C.TYPEID=undefined;var f=F("../QitchConstants"),d=(C.TYPEID=15,C.LOCATECODE_OFFSET=0),p=C.DELTA_OFFSET=d+f.INT_LENGTH,h=C.GAMMA_OFFSET=p+f.DOUBLE_LENGTH,m=C.VEGA_OFFSET=h+f.DOUBLE_LENGTH,E=C.RHO_OFFSET=m+f.DOUBLE_LENGTH,_=C.THETA_OFFSET=E+f.DOUBLE_LENGTH,g=C.IMPLIED_VOLATILITY_OFFSET=_+f.DOUBLE_LENGTH,T=C.IMPLIED_VOLATILITY_CHANGE_OFFSET=g+f.DOUBLE_LENGTH,b=C.BID_IMPLIED_VOLATILITY_OFFSET=T+f.DOUBLE_LENGTH,y=C.ASK_IMPLIED_VOLATILITY_OFFSET=b+f.DOUBLE_LENGTH,S=C.LAST_CALCULATION_OFFSET=y+f.DOUBLE_LENGTH,v=C.MARK_OFFSET=S+f.TIMESTAMP_LENGTH,O=C.INTRINSIC_VALUE_OFFSET=v+f.DOUBLE_LENGTH,w=C.EXTRINSIC_VALUE_OFFSET=O+f.DOUBLE_LENGTH,I=C.PREVIOUS_MARK_OFFSET=w+f.DOUBLE_LENGTH,N=C.MARK_CHANGE_OFFSET=I+f.DOUBLE_LENGTH,A=C.MARK_CHANGE_PERCENT_OFFSET=N+f.DOUBLE_LENGTH;C.LENGTH=A+f.DOUBLE_LENGTH}).call(this,F("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},F("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],F("timers").setImmediate,F("timers").clearImmediate,"/lib/qitch/marketDataDefinition/IVGreeksDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],87:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0,O.LENGTH=O.SYMBOL_OFFSET=O.PRICEVARIATION_OFFSET=O.FARINDICATIVEPRICE_OFFSET=O.NEARINDICATIVEPRICE_OFFSET=O.PAIREDVOLUME_OFFSET=O.ORDERSIDE_OFFSET=O.SIZE_OFFSET=O.REFERENCEPRICE_OFFSET=O.TIMESTAMP_OFFSET=O.IMBALANCE_TYPE_OFFSET=O.LOCATECODE_OFFSET=O.TYPEID=undefined;var f=v("../QitchConstants"),d=(O.TYPEID=16,O.LOCATECODE_OFFSET=0),p=O.IMBALANCE_TYPE_OFFSET=d+f.LOCATECODE_LENGTH,h=O.TIMESTAMP_OFFSET=p+f.IMBALANCETYPE_LENGTH,m=O.REFERENCEPRICE_OFFSET=h+f.TIMESTAMP_LENGTH,E=O.SIZE_OFFSET=m+f.DOUBLE_LENGTH,_=O.ORDERSIDE_OFFSET=E+f.LONG_LENGTH,g=O.PAIREDVOLUME_OFFSET=_+f.ORDERSIDE_LENGTH,T=O.NEARINDICATIVEPRICE_OFFSET=g+f.INT_LENGTH,b=O.FARINDICATIVEPRICE_OFFSET=T+f.DOUBLE_LENGTH,y=O.PRICEVARIATION_OFFSET=b+f.DOUBLE_LENGTH,S=O.SYMBOL_OFFSET=y+f.DOUBLE_LENGTH;O.LENGTH=S+f.SYMBOL_LENGTH}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/qitch/marketDataDefinition/ImbalanceStatusDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],88:[function(w,e,I){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";I.__esModule=!0,I.LENGTH=I.PERIODMS_OFFSET=I.LONGDECIMALVOLUME_OFFSET=I.TRADEVALUE_OFFSET=I.LASTTIME_OFFSET=I.OPENTIME_OFFSET=I.STARTTIME_OFFSET=I.VOLUME_OFFSET=I.LAST_OFFSET=I.HIGH_OFFSET=I.LOW_OFFSET=I.OPEN_OFFSET=I.SYMBOL_OFFSET=I.TIMESTAMP_OFFSET=I.TYPEID=undefined;var f=w("../QitchConstants"),d=(I.TYPEID=8,I.TIMESTAMP_OFFSET=0),p=I.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=I.OPEN_OFFSET=p+f.LOCATECODE_LENGTH,m=I.LOW_OFFSET=h+f.DOUBLE_LENGTH,E=I.HIGH_OFFSET=m+f.DOUBLE_LENGTH,_=I.LAST_OFFSET=E+f.DOUBLE_LENGTH,g=I.VOLUME_OFFSET=_+f.DOUBLE_LENGTH,T=I.STARTTIME_OFFSET=g+f.LONG_LENGTH,b=I.OPENTIME_OFFSET=T+f.TIMESTAMP_LENGTH,y=I.LASTTIME_OFFSET=b+f.TIMESTAMP_LENGTH,S=I.TRADEVALUE_OFFSET=y+f.TIMESTAMP_LENGTH,v=I.LONGDECIMALVOLUME_OFFSET=S+f.LONG_LENGTH,O=I.PERIODMS_OFFSET=v+f.DOUBLE_LENGTH;I.LENGTH=O+f.INT_LENGTH}).call(this,w("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],w("timers").setImmediate,w("timers").clearImmediate,"/lib/qitch/marketDataDefinition/IntervalDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],89:[function(b,e,y){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";y.__esModule=!0,y.LENGTH=y.DECIMALACCUMULATEDVOLUME_OFFSET=y.LASTTRADE_EXCODE_OFFSET=y.TICK_OFFSET=y.ACCUMULATEDVOLUME_OFFSET=y.PREVCLOSE_OFFSET=y.LAST_OFFSET=y.SYMBOL_OFFSET=y.TIMESTAMP_OFFSET=y.TYPEID=undefined;var f=b("../QitchConstants"),d=(b("./TradeDef"),y.TYPEID=13,y.TIMESTAMP_OFFSET=0),p=y.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=y.LAST_OFFSET=p+f.LOCATECODE_LENGTH,m=y.PREVCLOSE_OFFSET=h+f.DOUBLE_LENGTH,E=y.ACCUMULATEDVOLUME_OFFSET=m+f.DOUBLE_LENGTH,_=y.TICK_OFFSET=E+f.LONG_LENGTH,g=y.LASTTRADE_EXCODE_OFFSET=_+f.TICK_LENGTH,T=y.DECIMALACCUMULATEDVOLUME_OFFSET=g+f.EXCODE_LENGTH;y.LENGTH=T+f.DOUBLE_LENGTH}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/qitch/marketDataDefinition/LastSaleDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,"./TradeDef":98,_process:131,buffer:121,timers:152}],90:[function(g,e,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.__esModule=!0,T.LimitUpLimitDownFlags=T.LENGTH=T.UPPERLIMIT_OFFSET=T.LOWERLIMIT_OFFSET=T.EFFECTIVETIME_OFFSET=T.PRICEBANDINDICATOR_OFFSET=T.LOCATECODE_OFFSET=T.TYPEID=undefined;var f=g("../QitchConstants");T.TYPEID=14;var d=T.LOCATECODE_OFFSET=0,p=T.PRICEBANDINDICATOR_OFFSET=d+f.INT_LENGTH,h=T.EFFECTIVETIME_OFFSET=p+f.BYTE_LENGTH,m=T.LOWERLIMIT_OFFSET=h+f.TIMESTAMP_LENGTH,E=T.UPPERLIMIT_OFFSET=m+f.DOUBLE_LENGTH,_=(T.LENGTH=E+f.DOUBLE_LENGTH,T.LimitUpLimitDownFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isBidNotExecutable=function(e){return 0<(e&t.prototype.BID_NOT_EXECUTABLE)},t.isAskNotExecutable=function(e){return 0<(e&t.prototype.ASK_NOT_EXECUTABLE)},t}());_.prototype.BID_NOT_EXECUTABLE=1,_.prototype.ASK_NOT_EXECUTABLE=2}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/qitch/marketDataDefinition/LimitUpLimitDownDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],91:[function(w,e,I){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";I.__esModule=!0,I.LENGTH=I.DECIMALASKSIZE_OFFSET=I.DECIMALBIDSIZE_OFFSET=I.SHARESPERSIZEUNIT_OFFSET=I.ASKCHANGE_OFFSET=I.BIDCHANGE_OFFSET=I.INDICATOR_OFFSET=I.MMID_OFFSET=I.ASKSIZE_OFFSET=I.ASKPRICE_OFFSET=I.BIDSIZE_OFFSET=I.BIDPRICE_OFFSET=I.SYMBOL_OFFSET=I.TIMESTAMP_OFFSET=I.TYPEID=undefined;var f=w("../QitchConstants"),d=(I.TYPEID=7,I.TIMESTAMP_OFFSET=0),p=I.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=I.BIDPRICE_OFFSET=p+f.LOCATECODE_LENGTH,m=I.BIDSIZE_OFFSET=h+f.DOUBLE_LENGTH,E=I.ASKPRICE_OFFSET=m+f.INT_LENGTH,_=I.ASKSIZE_OFFSET=E+f.DOUBLE_LENGTH,g=I.MMID_OFFSET=_+f.INT_LENGTH,T=I.INDICATOR_OFFSET=g+f.MMID_LENGTH,b=I.BIDCHANGE_OFFSET=T+f.ASCIICHAR_LENGTH,y=I.ASKCHANGE_OFFSET=b+f.DOUBLE_LENGTH,S=I.SHARESPERSIZEUNIT_OFFSET=y+f.DOUBLE_LENGTH,v=I.DECIMALBIDSIZE_OFFSET=S+f.INT_LENGTH,O=I.DECIMALASKSIZE_OFFSET=v+f.DOUBLE_LENGTH;I.LENGTH=O+f.DOUBLE_LENGTH}).call(this,w("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],w("timers").setImmediate,w("timers").clearImmediate,"/lib/qitch/marketDataDefinition/MMQuoteDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],92:[function(N,e,A){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";A.__esModule=!0,A.LENGTH=A.SELLBLOCKTRANSACTIONS_OFFSET=A.BUYBLOCKTRANSACTIONS_OFFSET=A.SELLTRANSACTIONS_OFFSET=A.BUYTRANSACTIONS_OFFSET=A.SELLBLOCKVOLUME_OFFSET=A.SELLBLOCKVALUE_OFFSET=A.BUYBLOCKVOLUME_OFFSET=A.BUYBLOCKVALUE_OFFSET=A.SELLVOLUME_OFFSET=A.SELLVALUE_OFFSET=A.BUYVOLUME_OFFSET=A.BUYVALUE_OFFSET=A.MMID_OFFSET=A.SYMBOL_OFFSET=A.TIMESTAMP_OFFSET=A.TYPEID=undefined;var f=N("../QitchConstants"),d=(A.TYPEID=9,A.TIMESTAMP_OFFSET=0),p=A.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=A.MMID_OFFSET=p+f.LOCATECODE_LENGTH,m=A.BUYVALUE_OFFSET=h+f.MMID_LENGTH,E=A.BUYVOLUME_OFFSET=m+f.DOUBLE_LENGTH,_=A.SELLVALUE_OFFSET=E+f.LONG_LENGTH,g=A.SELLVOLUME_OFFSET=_+f.DOUBLE_LENGTH,T=A.BUYBLOCKVALUE_OFFSET=g+f.LONG_LENGTH,b=A.BUYBLOCKVOLUME_OFFSET=T+f.DOUBLE_LENGTH,y=A.SELLBLOCKVALUE_OFFSET=b+f.LONG_LENGTH,S=A.SELLBLOCKVOLUME_OFFSET=y+f.DOUBLE_LENGTH,v=A.BUYTRANSACTIONS_OFFSET=S+f.LONG_LENGTH,O=A.SELLTRANSACTIONS_OFFSET=v+f.INT_LENGTH,w=A.BUYBLOCKTRANSACTIONS_OFFSET=O+f.INT_LENGTH,I=A.SELLBLOCKTRANSACTIONS_OFFSET=w+f.INT_LENGTH;A.LENGTH=I+f.INT_LENGTH}).call(this,N("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},N("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],N("timers").setImmediate,N("timers").clearImmediate,"/lib/qitch/marketDataDefinition/NethousePositionDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],93:[function(Y,e,K){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";K.__esModule=!0,K.PricedataFlags=K.LENGTH=K.VWAPVOLUME_OFFSET=K.CURRENCYID_OFFSET=K.DECIMALLASTTRADESIZE_OFFSET=K.DECIMALPOSTMARKETVOLUME_OFFSET=K.DECIMALPREMARKETVOLUME_OFFSET=K.DECIMALACCUMULATEDVOLUME_OFFSET=K.LASTTRADEEXCODE_OFFSET=K.POSTMARKETCHANGE_OFFSET=K.POSTMARKETVOLUME_OFFSET=K.POSTMARKETLASTPRICE_OFFSET=K.POSTMARKETTRADETIME_OFFSET=K.PREMARKETCHANGE_OFFSET=K.PREMARKETVOLUME_OFFSET=K.PREMARKETLASTPRICE_OFFSET=K.PREMARKETTRADETIME_OFFSET=K.TWAP_OFFSET=K.VWAP_OFFSET=K.FLAGS_OFFSET=K.ACCUMULATEDTRADEVALUE_OFFSET=K.TRADECOUNT_OFFSET=K.CLOSE_OFFSET=K.LASTTRADESIZE_OFFSET=K.TICK_OFFSET=K.LASTTRADETIME_OFFSET=K.ACCUMULATEDVOLUME_OFFSET=K.LOW_OFFSET=K.HIGH_OFFSET=K.OPEN_OFFSET=K.PREVCLOSE_OFFSET=K.LAST_OFFSET=K.SYMBOL_OFFSET=K.TIMESTAMP_OFFSET=K.TYPEID=undefined;var f=Y("../QitchConstants");K.TYPEID=2;var d=K.TIMESTAMP_OFFSET=0,p=K.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=K.LAST_OFFSET=p+f.LOCATECODE_LENGTH,m=K.PREVCLOSE_OFFSET=h+f.DOUBLE_LENGTH,E=K.OPEN_OFFSET=m+f.DOUBLE_LENGTH,_=K.HIGH_OFFSET=E+f.DOUBLE_LENGTH,g=K.LOW_OFFSET=_+f.DOUBLE_LENGTH,T=K.ACCUMULATEDVOLUME_OFFSET=g+f.DOUBLE_LENGTH,b=K.LASTTRADETIME_OFFSET=T+f.LONG_LENGTH,y=K.TICK_OFFSET=b+f.TIMESTAMP_LENGTH,S=K.LASTTRADESIZE_OFFSET=y+f.TICK_LENGTH,v=K.CLOSE_OFFSET=S+f.INT_LENGTH,O=K.TRADECOUNT_OFFSET=v+f.DOUBLE_LENGTH,w=K.ACCUMULATEDTRADEVALUE_OFFSET=O+f.LONG_LENGTH,I=K.FLAGS_OFFSET=w+f.DOUBLE_LENGTH,N=K.VWAP_OFFSET=I+1,A=K.TWAP_OFFSET=N+f.DOUBLE_LENGTH,F=K.PREMARKETTRADETIME_OFFSET=A+f.TIMESTAMP_LENGTH,C=K.PREMARKETLASTPRICE_OFFSET=F+f.DOUBLE_LENGTH,M=K.PREMARKETVOLUME_OFFSET=C+f.LONG_LENGTH,D=K.PREMARKETCHANGE_OFFSET=M+f.DOUBLE_LENGTH,L=K.POSTMARKETTRADETIME_OFFSET=D+f.TIMESTAMP_LENGTH,R=K.POSTMARKETLASTPRICE_OFFSET=L+f.DOUBLE_LENGTH,B=K.POSTMARKETVOLUME_OFFSET=R+f.LONG_LENGTH,U=K.POSTMARKETCHANGE_OFFSET=B+f.DOUBLE_LENGTH,k=K.LASTTRADEEXCODE_OFFSET=U+f.DOUBLE_LENGTH,P=K.DECIMALACCUMULATEDVOLUME_OFFSET=k+f.EXCODE_LENGTH,H=K.DECIMALPREMARKETVOLUME_OFFSET=P+f.DOUBLE_LENGTH,G=K.DECIMALPOSTMARKETVOLUME_OFFSET=H+f.DOUBLE_LENGTH,x=K.DECIMALLASTTRADESIZE_OFFSET=G+f.DOUBLE_LENGTH,j=K.CURRENCYID_OFFSET=x+f.DOUBLE_LENGTH,q=K.VWAPVOLUME_OFFSET=j+f.CURRENCYID_LENGTH,V=(K.LENGTH=q+f.DOUBLE_LENGTH,K.PricedataFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isAnnualHigh=function(e){return 0<(e&t.prototype.ANNUALHIGH_MASK)},t.isAnnualLow=function(e){return 0<(e&t.prototype.ANNUALLOW_MASK)},t}());V.prototype.ANNUALHIGH_MASK=1,V.prototype.ANNUALLOW_MASK=2}).call(this,Y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],Y("timers").setImmediate,Y("timers").clearImmediate,"/lib/qitch/marketDataDefinition/PricedataDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],94:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.LENGTH=h.SYMBOL_OFFSET=h.TYPEID=undefined;var f=p("../QitchConstants"),d=(h.TYPEID=6,h.SYMBOL_OFFSET=0);h.LENGTH=d+f.LOCATECODE_LENGTH}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/qitch/marketDataDefinition/PurgeBookDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],95:[function(I,e,N){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";N.__esModule=!0,N.LENGTH=N.DECIMALBIDSIZE_OFFSET=N.DECIMALASKSIZE_OFFSET=N.SHARESPERSIZEUNIT_OFFSET=N.INDICATOR_OFFSET=N.BIDSIZE_OFFSET=N.BIDPRICE_OFFSET=N.BIDEXCODE_OFFSET=N.BIDCONDITION_OFFSET=N.ASKSIZE_OFFSET=N.ASKPRICE_OFFSET=N.ASKEXCODE_OFFSET=N.ASKCONDITION_OFFSET=N.SYMBOL_OFFSET=N.TIMESTAMP_OFFSET=N.TYPEID=undefined;var f=I("../QitchConstants"),d=(N.TYPEID=1,N.TIMESTAMP_OFFSET=0),p=N.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=N.ASKCONDITION_OFFSET=p+f.LOCATECODE_LENGTH,m=N.ASKEXCODE_OFFSET=h+f.ASCIICHAR_LENGTH,E=N.ASKPRICE_OFFSET=m+f.EXCODE_LENGTH,_=N.ASKSIZE_OFFSET=E+f.DOUBLE_LENGTH,g=N.BIDCONDITION_OFFSET=_+f.INT_LENGTH,T=N.BIDEXCODE_OFFSET=g+f.ASCIICHAR_LENGTH,b=N.BIDPRICE_OFFSET=T+f.EXCODE_LENGTH,y=N.BIDSIZE_OFFSET=b+f.DOUBLE_LENGTH,S=N.INDICATOR_OFFSET=y+f.INT_LENGTH,v=N.SHARESPERSIZEUNIT_OFFSET=S+f.ASCIICHAR_LENGTH,O=N.DECIMALASKSIZE_OFFSET=v+f.INT_LENGTH,w=N.DECIMALBIDSIZE_OFFSET=O+f.DOUBLE_LENGTH;N.LENGTH=w+f.DOUBLE_LENGTH}).call(this,I("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],I("timers").setImmediate,I("timers").clearImmediate,"/lib/qitch/marketDataDefinition/QuoteDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],96:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0,O.LENGTH=O.BOARDLOTSIZE_OFFSET=O.CAVEATEMPTOR_OFFSET=O.PQE_OFFSET=O.REGSHOSTATUS_OFFSET=O.HALTINDICATOR_OFFSET=O.HALTSTATUS_OFFSET=O.CURRENCYID_OFFSET=O.INSTRUMENTTYPE_OFFSET=O.EXCODE_OFFSET=O.LOCATECODE_OFFSET=O.SYMBOL_OFFSET=O.TYPEID=undefined;var f=v("../QitchConstants"),d=(O.TYPEID=10,O.SYMBOL_OFFSET=0),p=O.LOCATECODE_OFFSET=d+f.SYMBOL_LENGTH,h=O.EXCODE_OFFSET=p+f.LOCATECODE_LENGTH,m=O.INSTRUMENTTYPE_OFFSET=h+f.EXCODE_LENGTH,E=O.CURRENCYID_OFFSET=m+f.INSTRUMENTTYPE_LENGTH,_=O.HALTSTATUS_OFFSET=E+f.CURRENCYID_LENGTH,g=O.HALTINDICATOR_OFFSET=_+f.BYTE_LENGTH,T=O.REGSHOSTATUS_OFFSET=g+f.BYTE_LENGTH,b=O.PQE_OFFSET=T+f.ASCIICHAR_LENGTH,y=O.CAVEATEMPTOR_OFFSET=b+f.BYTE_LENGTH,S=O.BOARDLOTSIZE_OFFSET=y+f.BYTE_LENGTH;O.LENGTH=S+f.INT_LENGTH}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/qitch/marketDataDefinition/SymbolInfoDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],97:[function(y,e,S){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";S.__esModule=!0,S.LENGTH=S.SYMBOL_OFFSET=S.NOTE_OFFSET=S.OPENINGTIME_OFFSET=S.EFFECTIVETIME_OFFSET=S.CLOSINGPRICE_OFFSET=S.REGSHOSTATUS_OFFSET=S.HALTINDICATOR_OFFSET=S.HALTSTATUS_OFFSET=S.LOCATE_CODE_OFFSET=S.TYPEID=undefined;var f=y("../QitchConstants"),d=(S.TYPEID=11,S.LOCATE_CODE_OFFSET=0),p=S.HALTSTATUS_OFFSET=d+f.LOCATECODE_LENGTH,h=S.HALTINDICATOR_OFFSET=p+f.BYTE_LENGTH,m=S.REGSHOSTATUS_OFFSET=h+f.BYTE_LENGTH,E=S.CLOSINGPRICE_OFFSET=m+f.ASCIICHAR_LENGTH,_=S.EFFECTIVETIME_OFFSET=E+f.DOUBLE_LENGTH,g=S.OPENINGTIME_OFFSET=_+f.TIMESTAMP_LENGTH,T=S.NOTE_OFFSET=g+f.TIMESTAMP_LENGTH,b=S.SYMBOL_OFFSET=T+f.NOTE_LENGTH;S.LENGTH=b+f.SYMBOL_LENGTH}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/qitch/marketDataDefinition/SymbolStatusDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],98:[function(C,e,M){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";M.__esModule=!0,M.TradeFlags=M.LENGTH=M.DECIMALACCUMULATEDVOLUME_OFFSET=M.DECIMALSIZE_OFFSET=M.EXCODE_OFFSET=M.VWAP_OFFSET=M.MATCHID_OFFSET=M.RANGEINDICATOR_OFFSET=M.SELLERMMID_OFFSET=M.BUYERMMID_OFFSET=M.FLAGS_OFFSET=M.SEQUENCENUMBER_OFFSET=M.ACCUMULATEDVOLUME_OFFSET=M.TICK_OFFSET=M.INDICATOR_OFFSET=M.SIZE_OFFSET=M.PRICE_OFFSET=M.SYMBOL_OFFSET=M.TIMESTAMP_OFFSET=M.TYPEID=undefined;var f=C("../QitchConstants");M.TYPEID=3;var d=M.TIMESTAMP_OFFSET=0,p=M.SYMBOL_OFFSET=d+f.TIMESTAMP_LENGTH,h=M.PRICE_OFFSET=p+f.LOCATECODE_LENGTH,m=M.SIZE_OFFSET=h+f.DOUBLE_LENGTH,E=M.INDICATOR_OFFSET=m+f.INT_LENGTH,_=M.TICK_OFFSET=E+f.ASCIICHAR_LENGTH,g=M.ACCUMULATEDVOLUME_OFFSET=_+f.TICK_LENGTH,T=M.SEQUENCENUMBER_OFFSET=g+f.LONG_LENGTH,b=M.FLAGS_OFFSET=T+f.INT_LENGTH,y=M.BUYERMMID_OFFSET=b+f.INT_LENGTH,S=M.SELLERMMID_OFFSET=y+f.MMID_LENGTH,v=M.RANGEINDICATOR_OFFSET=S+f.MMID_LENGTH,O=M.MATCHID_OFFSET=v+f.RANGEINDICATOR_LENGTH,w=M.VWAP_OFFSET=O+f.LONG_LENGTH,I=M.EXCODE_OFFSET=w+f.DOUBLE_LENGTH,N=M.DECIMALSIZE_OFFSET=I+f.EXCODE_LENGTH,A=M.DECIMALACCUMULATEDVOLUME_OFFSET=N+f.DOUBLE_LENGTH,F=(M.LENGTH=A+f.DOUBLE_LENGTH,M.TradeFlags=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.isOpen=function(e){return 0<(e&t.prototype.OPEN_MASK)},t.isHigh=function(e){return 0<(e&t.prototype.HIGH_MASK)},t.isLow=function(e){return 0<(e&t.prototype.LOW_MASK)},t.isClose=function(e){return 0<(e&t.prototype.CLOSE_MASK)},t.isUpdateVolume=function(e){return 0<(e&t.prototype.UPDATEVOLUME_MASK)},t.isCancel=function(e){return 0<(e&t.prototype.CANCEL_MASK)},t.isFromBook=function(e){return 0<(e&t.prototype.FROMBOOK_MASK)},t.isATrade=function(e){return 0<(e&t.prototype.ISATRADE_MASK)},t.isIncrementVolume=function(e){return 0<(e&t.prototype.INCREMENTVOLUME_MASK)},t.isUpdateAfterHours=function(e){return 0<(e&t.prototype.UPDATEAFTERHOURS_MASK)},t.isUpdateLast=function(e){return 0<(e&t.prototype.UPDATELAST_MASK)},t.isAfterHoursTrade=function(e){return 0<(e&t.prototype.AFTERHOURSTRADE)},t.isIgnoreHighLow=function(e){return 0<(e&t.prototype.IGNOREHIGHLOW_MASK)},t.isParticipantOnly=function(e){return 0<(e&t.prototype.PARTICIPANTONLY_MAKS)},t.isBlockTrade=function(e){return 0<(e&t.prototype.BLOCKTRADE_MASK)},t.isIgnoreOpen=function(e){return 0<(e&t.prototype.IGNOREOPEN_MASK)},t.isTradeThroughExempt=function(e){return 0<(e&t.prototype.TRADETHROUGHEXEMPT)},t.isCorrection=function(e){return e&t.prototype.CORRECTION_MASK},t.isOutOfSequence=function(e){return e&t.prototype.OUTOFSEQUENCE_MASK},t}());F.prototype.OPEN_MASK=1048576,F.prototype.HIGH_MASK=2097152,F.prototype.LOW_MASK=4194304,F.prototype.CLOSE_MASK=8388608,F.prototype.UPDATEVOLUME_MASK=16777216,F.prototype.CANCEL_MASK=33554432,F.prototype.FROMBOOK_MASK=67108864,F.prototype.ISATRADE_MASK=65536,F.prototype.INCREMENTVOLUME_MASK=131072,F.prototype.UPDATEAFTERHOURS_MASK=262144,F.prototype.UPDATELAST_MASK=524288,F.prototype.AFTERHOURSTRADE=4096,F.prototype.IGNOREHIGHLOW_MASK=8192,F.prototype.PARTICIPANTONLY_MAKS=16384,F.prototype.BLOCKTRADE_MASK=32768,F.prototype.IGNOREOPEN_MASK=256,F.prototype.TRADETHROUGHEXEMPT=512,F.prototype.CORRECTION_MASK=134217728,F.prototype.OUTOFSEQUENCE_MASK=1024}).call(this,C("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},C("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],C("timers").setImmediate,C("timers").clearImmediate,"/lib/qitch/marketDataDefinition/TradeDef.js","/lib/qitch/marketDataDefinition")},{"../QitchConstants":26,_process:131,buffer:121,timers:152}],99:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f,d=m("./v1/SMessageDecoder_1.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._1=new p["default"]}return e.prototype.decode=function(e){if(null==e)throw"Argument cannot be null.";if(0==e.length)throw"Argument cannot be empty string.";var t=e.charAt(0),n=this["_"+t];if(null!=n)return n.decode(e);throw"Unsupported message type '"+t+"'."},e}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/SMessageDecoder.js","/lib/serialization")},{"./v1/SMessageDecoder_1.js":101,_process:131,buffer:121,timers:152}],100:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f,d=m("./v1/SMessageEncoder_1.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._1=new p["default"]}return e.prototype.encode=function(e){if(null==e)throw"Argument cannot be null.";var t=this["_"+e.type];if(null!=t)return t.encode(e);throw"Unsupported message type '"+e.type+"'."},e}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/SMessageEncoder.js","/lib/serialization")},{"./v1/SMessageEncoder_1.js":102,_process:131,buffer:121,timers:152}],101:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f=p(m("../../SMessage.js")),d=p(m("./codec.js"));function p(e){return e&&e.__esModule?e:{"default":e}}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.decode=function(e){if(null==e)throw"Argument cannot be null.";if(0==e.length)throw"Argument cannot be empty string.";var t=new f["default"];t.type=d["default"].TYPE;var n=Number(e.substr(d["default"].HEADERLENGTH_OFFSET,d["default"].USHORT_LENGTH_CHAR));t.sequencenumber=Number(e.substr(d["default"].SEQUENCENUMBER_OFFSET,d["default"].LONG_LENGTH_CHAR)),t.timestamp=Number(e.substr(d["default"].TIMESTAMP_OFFSET,d["default"].LONG_LENGTH_CHAR)),t.id=Number(e.substr(d["default"].ID_OFFSET,d["default"].USHORT_LENGTH_CHAR)),t.encoding=e.charAt(d["default"].ENCODING_OFFSET),t.mimetype=e.charAt(d["default"].MIMETYPE_OFFSET);var r=Number(e.substr(d["default"].PAYLOADLENGTH_OFFSET,d["default"].UINT_LENGTH_CHAR));return t.payload=e.substr(n,r),t},e}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/v1/SMessageDecoder_1.js","/lib/serialization/v1")},{"../../SMessage.js":5,"./codec.js":103,_process:131,buffer:121,timers:152}],102:[function(E,e,_){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";_.__esModule=!0;var f,d=E("../../message.js"),p=E("./codec.js"),h=(f=p)&&f.__esModule?f:{"default":f};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.encode=function(e){if(null==e)throw"Argument cannot be null.";var t=h["default"].TYPE;return t+=(0,d.lpad)(h["default"].HEADER_LENGTH_CHAR,h["default"].USHORT_LENGTH_CHAR),t+=(0,d.lpad)(e.sequencenumber,h["default"].LONG_LENGTH_CHAR),t+=(0,d.lpad)(e.timestamp,h["default"].LONG_LENGTH_CHAR),t+=(0,d.lpad)(e.id,h["default"].USHORT_LENGTH_CHAR),t+=e.encoding,t+=e.mimetype,t+=(0,d.lpad)(null!=e.payload?e.payload.length:0,h["default"].UINT_LENGTH_CHAR),null!=e.payload&&(t+=e.payload),t},e}();_["default"]=m}).call(this,E("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},E("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],E("timers").setImmediate,E("timers").clearImmediate,"/lib/serialization/v1/SMessageEncoder_1.js","/lib/serialization/v1")},{"../../message.js":17,"./codec.js":103,_process:131,buffer:121,timers:152}],103:[function(e,t,f){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";f.__esModule=!0,f["default"]=new function(){this.TYPE="1",this.USHORT_LENGTH_CHAR=5,this.USHORT_MIN=0,this.USHORT_MAX=65535,this.UINT_LENGTH_CHAR=10,this.UINT_MIN=0,this.UINT_MAX=4294967295,this.LONG_LENGTH_CHAR=20,this.LONG_MIN=Number.MIN_SAFE_INTEGER,this.LONG_MAX=Number.MAX_SAFE_INTEGER,this.TYPE_OFFSET=0,this.HEADERLENGTH_OFFSET=this.TYPE_OFFSET+1,this.SEQUENCENUMBER_OFFSET=this.HEADERLENGTH_OFFSET+this.USHORT_LENGTH_CHAR,this.TIMESTAMP_OFFSET=this.SEQUENCENUMBER_OFFSET+this.LONG_LENGTH_CHAR,this.ID_OFFSET=this.TIMESTAMP_OFFSET+this.LONG_LENGTH_CHAR,this.ENCODING_OFFSET=this.ID_OFFSET+this.USHORT_LENGTH_CHAR,this.MIMETYPE_OFFSET=this.ENCODING_OFFSET+1,this.PAYLOADLENGTH_OFFSET=this.MIMETYPE_OFFSET+1,this.HEADER_LENGTH_CHAR=this.PAYLOADLENGTH_OFFSET+this.UINT_LENGTH_CHAR}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/serialization/v1/codec.js","/lib/serialization/v1")},{_process:131,buffer:121,timers:152}],104:[function(e,t,f){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";
35
35
  /*
36
36
  Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
37
37
 
@@ -44,7 +44,7 @@ D(460,"Websocket error")};o.onclose=function(e){if(y("websocket.onclose"),clearT
44
44
  Copyright (C) 2010-2013 [Jeff Mesnil](http://jmesnil.net/)
45
45
  Copyright (C) 2012 [FuseSource, Inc.](http://fusesource.com)
46
46
  */
47
- (function(){var T,r,E,l,o={}.hasOwnProperty,s=[].slice;T={LF:"\n",NULL:"\0"},E=function(){var s;function g(e,t,n){this.command=e,this.headers=null!=t?t:{},this.body=null!=n?n:""}return g.prototype.toString=function(){var e,t,n,r,i;for(t in(n=!(e=[this.command])===this.headers["content-length"])&&delete this.headers["content-length"],i=this.headers)o.call(i,t)&&(r=i[t],e.push(t+":"+r));return this.body&&!n&&e.push("content-length:"+g.sizeOfUTF8(this.body)),e.push(T.LF+this.body),e.join(T.LF)},g.sizeOfUTF8=function(e){return e?encodeURI(e).match(/%..|./g).length:0},s=function(e){var t,n,r,i,o,s,a,u,l,c,f,d,p,h,m,E,_;for(i=e.search(RegExp(""+T.LF+T.LF)),r=(o=e.substring(0,i).split(T.LF)).shift(),s={},d=function(e){return e.replace(/^\s+|\s+$/g,"")},p=0,m=(E=o.reverse()).length;p<m;p++)u=(c=E[p]).indexOf(":"),s[d(c.substring(0,u))]=d(c.substring(u+1));if(t="",f=i+2,s["content-length"])l=parseInt(s["content-length"]),t=(""+e).substring(f,f+l);else for(n=null,a=h=f,_=e.length;(f<=_?h<_:_<h)&&(n=e.charAt(a))!==T.NULL;a=f<=_?++h:--h)t+=n;return new g(r,s,t)},g.unmarshall=function(i){var o;return function(){var e,t,n,r;for(r=[],e=0,t=(n=i.split(RegExp(""+T.NULL+T.LF+"*"))).length;e<t;e++)0<(null!=(o=n[e])?o.length:void 0)&&r.push(s(o));return r}()},g.marshall=function(e,t,n){return new g(e,t,n).toString()+T.NULL},g}(),r=function(){var m;function e(e){this.ws=e,this.ws.binaryType="arraybuffer",this.counter=0,this.connected=!1,this.heartbeat={outgoing:1e4,incoming:1e4},this.maxWebSocketFrameSize=16384,this.subscriptions={}}return e.prototype.debug=function(e){var t;return"undefined"!=typeof window&&null!==window&&null!=(t=window.console)?t.log(e):void 0},m=function(){return Date.now?Date.now():(new Date).valueOf},e.prototype._transmit=function(e,t,n){var r;for(r=E.marshall(e,t,n),"function"==typeof this.debug&&this.debug(">>> "+r);;){if(!(r.length>this.maxWebSocketFrameSize))return this.ws.send(r);this.ws.send(r.substring(0,this.maxWebSocketFrameSize)),r=r.substring(this.maxWebSocketFrameSize),"function"==typeof this.debug&&this.debug("remaining = "+r.length)}},e.prototype._setupHeartbeat=function(i){var e,t,n,o,r,s,a,u;if((r=i.version)===l.VERSIONS.V1_1||r===l.VERSIONS.V1_2)return t=(s=function(){var e,t,n,r;for(r=[],e=0,t=(n=i["heart-beat"].split(",")).length;e<t;e++)o=n[e],r.push(parseInt(o));return r}())[0],e=s[1],0!==this.heartbeat.outgoing&&0!==e&&(n=Math.max(this.heartbeat.outgoing,e),"function"==typeof this.debug&&this.debug("send PING every "+n+"ms"),this.pinger=l.setInterval(n,(a=this,function(){return a.ws.send(T.LF),"function"==typeof a.debug?a.debug(">>> PING"):void 0}))),0!==this.heartbeat.incoming&&0!==t?(n=Math.max(this.heartbeat.incoming,t),"function"==typeof this.debug&&this.debug("check PONG every "+n+"ms"),this.ponger=l.setInterval(n,(u=this,function(){var e;if(e=m()-u.serverActivity,2*n<e)return"function"==typeof u.debug&&u.debug("did not receive server activity for the last "+e+"ms"),u.ws.close()}))):void 0},e.prototype._parseConnect=function(){var e,t,n,r;switch(r={},(e=1<=arguments.length?s.call(arguments,0):[]).length){case 2:r=e[0],t=e[1];break;case 3:e[1]instanceof Function?(r=e[0],t=e[1],n=e[2]):(r.login=e[0],r.passcode=e[1],t=e[2]);break;case 4:r.login=e[0],r.passcode=e[1],t=e[2],n=e[3];break;default:r.login=e[0],r.passcode=e[1],t=e[2],n=e[3],r.host=e[4]}return[r,t,n]},e.prototype.connect=function(){var e,p,t,n,h,r,i;return e=1<=arguments.length?s.call(arguments,0):[],n=this._parseConnect.apply(this,e),t=n[0],this.connectCallback=n[1],p=n[2],"function"==typeof this.debug&&this.debug("Opening Web Socket..."),this.ws.onmessage=(h=this,function(e){var r,i,t,n,o,s,a,u,l,c,f,d;if(n="undefined"!=typeof ArrayBuffer&&e.data instanceof ArrayBuffer?(r=new Uint8Array(e.data),"function"==typeof h.debug&&h.debug("--- got data length: "+r.length),function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)i=r[e],n.push(String.fromCharCode(i));return n}().join("")):e.data,h.serverActivity=m(),n!==T.LF){for("function"==typeof h.debug&&h.debug("<<< "+n),d=[],l=0,c=(f=E.unmarshall(n)).length;l<c;l++)switch((o=f[l]).command){case"CONNECTED":"function"==typeof h.debug&&h.debug("connected to server "+o.headers.server),h.connected=!0,h._setupHeartbeat(o.headers),d.push("function"==typeof h.connectCallback?h.connectCallback(o):void 0);break;case"MESSAGE":u=o.headers.subscription,(a=h.subscriptions[u]||h.onreceive)?(t=h,s=o.headers["message-id"],o.ack=function(e){return null==e&&(e={}),t.ack(s,u,e)},o.nack=function(e){return null==e&&(e={}),t.nack(s,u,e)},d.push(a(o))):d.push("function"==typeof h.debug?h.debug("Unhandled received MESSAGE: "+o):void 0);break;case"RECEIPT":d.push("function"==typeof h.onreceipt?h.onreceipt(o):void 0);break;case"ERROR":d.push("function"==typeof p?p(o):void 0);break;default:d.push("function"==typeof h.debug?h.debug("Unhandled frame: "+o):void 0)}return d}"function"==typeof h.debug&&h.debug("<<< PONG")}),this.ws.onclose=(r=this,function(){var e;return e="Whoops! Lost connection to "+r.ws.url,"function"==typeof r.debug&&r.debug(e),r._cleanUp(),"function"==typeof p?p(e):void 0}),this.ws.onopen=(i=this,function(){return"function"==typeof i.debug&&i.debug("Web Socket Opened..."),t["accept-version"]=l.VERSIONS.supportedVersions(),t["heart-beat"]=[i.heartbeat.outgoing,i.heartbeat.incoming].join(","),i._transmit("CONNECT",t)})},e.prototype.disconnect=function(e,t){return null==t&&(t={}),this._transmit("DISCONNECT",t),this.ws.onclose=null,this.ws.close(),this._cleanUp(),"function"==typeof e?e():void 0},e.prototype._cleanUp=function(){if(this.connected=!1,this.pinger&&l.clearInterval(this.pinger),this.ponger)return l.clearInterval(this.ponger)},e.prototype.sendCustomFrame=function(e,t,n,r){return null==n&&(n={}),null==r&&(r=""),n.destination=e,this._transmit(t,n,r)},e.prototype.send=function(e,t,n){return null==t&&(t={}),null==n&&(n=""),t.destination=e,this._transmit("SEND",t,n)},e.prototype.subscribe=function(e,t,n){var r;return null==n&&(n={}),n.id||(n.id="sub-"+this.counter++),n.destination=e,this.subscriptions[n.id]=t,this._transmit("SUBSCRIBE",n),r=this,{id:n.id,unsubscribe:function(){return r.unsubscribe(n.id)}}},e.prototype.unsubscribe=function(e){return delete this.subscriptions[e],this._transmit("UNSUBSCRIBE",{id:e})},e.prototype.begin=function(e){var t,n;return n=e||"tx-"+this.counter++,this._transmit("BEGIN",{transaction:n}),t=this,{id:n,commit:function(){return t.commit(n)},abort:function(){return t.abort(n)}}},e.prototype.commit=function(e){return this._transmit("COMMIT",{transaction:e})},e.prototype.abort=function(e){return this._transmit("ABORT",{transaction:e})},e.prototype.ack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("ACK",n)},e.prototype.nack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("NACK",n)},e}(),l={VERSIONS:{V1_0:"1.0",V1_1:"1.1",V1_2:"1.2",supportedVersions:function(){return"1.1,1.0"}},client:function(e,t){var n;return null==t&&(t=["v10.stomp","v11.stomp"]),n=new(l.WebSocketClass||WebSocket)(e,t),new r(n)},over:function(e){return new r(e)},Frame:E},null!=f&&(f.Stomp=l),"undefined"!=typeof window&&null!==window?(l.setInterval=function(e,t){return window.setInterval(t,e)},l.clearInterval=function(e){return window.clearInterval(e)},window.Stomp=l):f||(self.Stomp=l)}).call(undefined)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/stomp.js/lib/stomp.js","/lib/stomp.js/lib")},{_process:131,buffer:121,timers:152}],105:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=_("../logging.js"),d=m(_("../EventSupport.js")),p=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../streamer-events.js")),h=m(_("../http.js"));function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function o(e,t,n){var r=3<arguments.length&&arguments[3]!==undefined?arguments[3]:3,i=arguments[4];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.openSocket=t,this.createTransmitter=e,this.log=(0,f.asLogger)(n),this.events=new d["default"](this),this.currentConn="",this.maxReconnectAttempts=r,this.maxReconnectsTotal=3,this.isFirstConnection=!0,this.pingUrl=i}return o.prototype.open=function(){var i=this,e={send:function(e){return i.socket.send(e)},sendCustomFrame:function(e,t,n,r){return i.socket.sendCustomFrame(e,t,n,r)}};this.isFirstConnection&&(this.on("reopen",function(e){var t=i.currentConn;i.currentConn=e.connectionId,i.events.fire("reconnect",p.event("Reconnection success",{previousConnectionId:t,currentConnectionId:i.currentConn}))}),this.transmitter=this.createTransmitter(e),this.transmitter.on("message",function(e){i.events.fire("message",e)})),this.socket=this.openSocket(function(e){return i.request=e,i.reconnect=!1,{onOpen:function(e){if("CONNECTED"===e.command){i.isConnectionUp=!0;var t=p.event("open",{connectionId:e.headers["user-name"]});i.log.info(t),i.events.fire("open",t),i.isFirstConnection||(i.maxReconnectsTotal--,i.events.fire("reopen",t)),i.currentConn=e.headers["user-name"]}},onError:function(e){i.isConnectionUp=!1,i.isServerUp(function(e,t){null!==e?(i.reconnect=!1,i.log.warn("Connection lost, Streamer Server isn't Up")):(i.reconnect=!0,i.log.warn("Connection lost, Streamer Server is Up"))})},onClose:function(){i.isConnectionUp=!1},onMessage:function(e){var t=JSON.parse(e.body);t.code!==undefined&&(401!=t.code&&403!=t.code||(i.log.info("Unable to reconnect with code: "+t.code+", reason: "+t.reason),i.reconnect=!1,i.isConnectionUp=!1)),i.transmitter.onMessage(e.body)}}},this.currentConn)},o.prototype.close=function(){if(this.socket)try{this.socket.close(),this.socket=null,this.reconnect&&this.tryReopen()}catch(e){this.events.fire("error",p.error("Error closing",{reason:e.message,cause:e,code:-3}))}},o.prototype.tryReopen=function(){var t=this;if(this.isConnectionUp||this.maxReconnectsTotal<=0)this.log.error("Connection is already open or max reconnects was reached, won't try to reconnect");else{this.isFirstConnection=!1;var n=this.maxReconnectAttempts;setTimeout(function e(){if(n<=0)return t.reconnect=!1,t.log.error("Error while reconnecting. No attempts left."),void(t.maxReconnectAttempts=0);!t.isConnectionUp&&t.reconnect&&(t.log.info("Attempting reconnect. Attempts left: "+n),t.reopen(n),n--,setTimeout(e,500))},500)}},o.prototype.reopen=function(e){try{this.open()}catch(t){this.log.warn("There was an error while reopening attempt #"+e),this.events.fire("error",t)}},o.prototype.send=function(e){try{this.transmitter.send(e)}catch(t){this.events.fire("error",p.error("Error sending message",{reason:t.message,cause:t,code:-4}))}},o.prototype.sendCustomFrame=function(e,t,n,r){try{this.transmitter.sendCustomFrame(e,t,n,r)}catch(i){this.events.fire("error",p.error("Error sending custom frame message",{reason:i.message,cause:i,code:-4}))}},o.prototype.isReconnect=function(){return this.request["x-Stream-isReconnect"]},o.prototype.setReconnect=function(e){this.reconnect=e},o.prototype.setServer=function(e){this.request["X-Stream-Instance"]=e},o.prototype.isClosed=function(){return null==this.socket},o.prototype.isServerUp=function(t){(0,h["default"])({url:this.pingUrl,success:function(e){return t(null,e)},type:"GET",failure:t})},o.prototype.setConnectionUp=function(e){this.isConnectionUp=e},o.prototype.on=function(e,t){return this.events.on(e,t)},o}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/stomp/StompConnection.js","/lib/stomp")},{"../EventSupport.js":2,"../http.js":14,"../logging.js":16,"../streamer-events.js":109,_process:131,buffer:121,timers:152}],106:[function(T,e,b){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";b.__esModule=!0,T("../polyfills.js");var f=T("../streamer-api.js"),d=T("../streamer-utils.js"),p=T("../logging.js"),O=T("../utils.js"),h=_(T("../UShortId.js")),m=_(T("../EventSupport.js")),E=T("../formatting.js"),w=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(T("../streamer-events.js"));function _(e){return e&&e.__esModule?e:{"default":e}}var g=function(){function i(e,t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.events=new m["default"],this.streamingService=e,this.format=t,this.log=(0,p.asLogger)(n),this.conn=e.createStompConnection(),this.conn.on("message",function(e){r._handlejsonmsg(e)}).on("close",function(e){r.doClose(e)}).on("error",function(e){r.pendingConnection&&r.pendingConnection(e),r.events.fire("error",e)}).on("reconnect",function(e){r.reconnectSuccess(e)}),this.requestid=new h["default"],this.pendingsubscriptions={},this.pendingUnsubscriptions={},this.pendingExchangeSubscriptions={},this.pendingExchangeUnsubscriptions={},this.pendingNewsSubscriptions={},this.pendingNewsUnsubscriptions={},this.pendingAlertSubscription={},this.pendingTradeSubscription={},this.pendingTradeUnsubscription={},this.pendingSCFMessages={},this.pendingCorpEventSubscription={},this.on("error",function(e){r.log.warn(e)})}return i.prototype.openStomp=function(e){try{this.pendingConnection=e,this.conn.open()}catch(t){e&&e(t)}},i.prototype.reconnectSuccess=function(e){this.events.fire("reconnectSuccess",e),this.log.info("Successful reconnection. Previous Id: "+e.previousConnectionId+" Current Id = "+e.currentConnectionId)},i.prototype.on=function(e,t){return this.events.on(e,t)},i.prototype.SCFSendMessage=function(e,t,n,r,i){var o=i||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={ids:[],callback:o},u=this.requestid.next(),l=void 0;if(r&&""!==r){try{l=JSON.parse(r)}catch(c){return this.log.info("Error parsing message content: "+c.message),void o(null,null)}a.dataTypes=l["@T"],a.action=l.action,l.id=u}a.ids.push(u),this.pendingSCFMessages[u]=a,this.sendCustomFrame(e,t,n,l)},i.prototype.subscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{subscribed:[],rejected:[],unentitled:[],invalidSymbols:[],messageFilters:[]}};0!==e.length&&0!==t.length?this._prepareSubscriptionRequests(e,u,f.messages.control.Action.SUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingsubscriptions[t]=u,e.id=t,i.send(e)}):s(null,u.result)},i.prototype.subscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.SUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeSubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.subscribeNews=function(e,t,n){var r=t&&"function"!=typeof t?t:null,i=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var o=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",o),void(i&&i(o))}var s={callback:i,mimetype:this.format,id:[],result:{newsFilters:[],rejectedNewsFilters:[],unentitledNewsFilters:[]}};0===e.length&&i(null,s.result);var a=this.buildNewsSubscribeRequest(e,s,f.messages.control.Action.SUBSCRIBE,r),u=this.requestid.next();this.pendingNewsSubscriptions[u]=s,a.id=u,this.send(a)},i.prototype.subscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.SUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.subUnsubAlerts=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{operation:""}},s=this.buildAlertsSubUnsubRequest(e,o),a=this.requestid.next();o.id.push(a),this.pendingAlertSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.subscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.SUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.getSessionStats=function(){if(this.isClosed()){var e=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",e)}else{var t=new f.messages.control.StatsMessage;this.send(t)}},i.prototype.cmdFilterNews=function(e){var t=e||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var n=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(t&&t(n))}var r={callback:t,mimetype:this.format},i=this.buildNewsCommandRequest(r,"NEWSCMDFILTER");this.send(i)},i.prototype.unsubscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{unsubscribed:[]}};0!==e.length&&0!==t.length||s&&s(null,u.result),this._prepareSubscriptionRequests(e,u,f.messages.control.Action.UNSUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingUnsubscriptions[t]=u,e.id=t,i.send(e)})},i.prototype.unsubscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.UNSUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeUnsubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.unsubscribeNews=function(e,t,n){e=Array.isArray(e)?e:[e];var r=t&&"function"!=typeof t?t:null,i=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var o=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",o),void(i&&i(o))}var s={callback:i,mimetype:this.format,id:[],result:{unsubscribed:[]}};0===e.length&&i&&i(null,s.result);var a=this.buildNewsSubscribeRequest(e,s,f.messages.control.Action.UNSUBSCRIBE,r),u=this.requestid.next();s.id.push(u),this.pendingNewsUnsubscriptions[u]=s,a.id=u,this.send(a)},i.prototype.unsubscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.UNSUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.unsubscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.UNSUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeUnsubscription[a]=o,s.id=a,this.send(s)}},i.prototype._handlejsonmsg=function(e){(0,d.iscontrolmessage)(e)&&e.__id in this.pendingSCFMessages?this.SCFHandlectrlmsg(e):(0,d.iscontrolmessage)(e)?this.handlectrlmsg(e):(0,d.isdatamessage)(e)?this._handledatamsg(e):this.events.fire("error",e)},i.prototype._prepareSubscriptionRequests=function(e,t,n,r){for(var i=0,o=-1,s=e.length,a=t.types.includes("ORDERBOOK"),u=[],l=0;l<s;l++)((i=this._getUpdatedNumberOfEntitlements(t.types.length,i,e[l],a))>=this.maxEntitlementsPerSubscription||l===s-1)&&(u.push(this._buildRequest(e.slice(o+1,l+1),t,n,r)),o=l,i=0);return u},i.prototype._buildRequest=function(e,t,n,r){var i=new f.messages.control.SubscribeMessage;return i.action=n,i.symbols=e,i.types=t.types,i.mimetype=t.mimetype,r&&r.skipHeavyInitialLoad&&(i.skipHeavyInitialLoad=!0),r&&(i.conflation=r.conflation,i.intervalPeriod=r.intervalPeriod),i},i.prototype.prepareExchangeSubscriptionRequest=function(e,t,n,r){for(var i=[],o=e.length,s=0;s<o;s++)i.push(this.buildExchangeRequest(e[s],t,n,r));return i},i.prototype.buildExchangeRequest=function(e,t,n,r){var i=new f.messages.control.ExchangeSubscribeMessage;return i.action=n,i.exchange=e,i.mimetype=t.mimetype,r&&(i.conflation=r.conflation),i},i.prototype.buildNewsSubscribeRequest=function(e,t,n,r){var i=new f.messages.control.NewsSubscribeMessage;return i.action=n,i.newsFilters=e,i.mimetype=t.mimetype,r&&r.skipHeavyInitialLoad&&(i.skipHeavyInitialLoad=r.skipHeavyInitialLoad),i},i.prototype.buildCorpEventRequest=function(e,t,n){var r=new f.messages.control.CorpEventSubscribeMessage;return r.symbols=e,r.action=n,r.corpEventTypes=t.corpEventTypes,r.allCorpEvents=t.allCorpEvents,r.mimeType=t.mimeType,r},i.prototype.buildAlertsSubUnsubRequest=function(e,t){var n=new f.messages.control.AlertsSubUnsubMessage;return n.operation=e,n.mimetype=t.mimetype,n},i.prototype.buildTradeSubscribeRequest=function(e,t,n){var r=new f.messages.control.TradeSubscribeMessage;return r.action=n,r.notificationType=e,r.mimetype=t.mimetype,r},i.prototype.buildNewsCommandRequest=function(e,t){var n=new f.messages.control.NewsCommandMessage;return n.newsAction=t,n.mimetype=e.mimetype,n},i.prototype._getUpdatedNumberOfEntitlements=function(e,t,n,r){var i=t;return r&&n.endsWith(":CC")?i+=14*e:i+=e,i},i.prototype.handlectrlmsg=function(e){switch(this.log.debug(E.msgfmt.fmt(e)),(0,d.messagetype)(e)){case f.messages.MessageTypeNames.ctrl.HEARTBEAT:this.onHeartbeat(e);break;case f.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE:this.onSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_RESPONSE:this.onExchangeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_SUBSCRIBE_RESPONSE:this.onNewsSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE:this.onAlertsSubUnsubResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE:this.onTradeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE:this.onUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE:this.onExchangeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_UNSUBSCRIBE_RESPONSE:this.onNewsUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_CMD_FILTER_RESPONSE:this.onNewsCmdFilterResponse(e);break;case f.messages.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE:this.onCorpEventResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE:this.onTradeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE:this.onConnectResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE:this.onConnectionClose(e);break;case f.messages.MessageTypeNames.ctrl.SLOW_CONNECTION:this.onSlowConnection(e);break;case f.messages.MessageTypeNames.ctrl.STATS_RESPONSE:this.onStatsResponse(e);break;case f.messages.MessageTypeNames.ctrl.INITIAL_DATA_SENT:this.onInitialDataSent(e);break;case f.messages.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE:this.onResubscribeMessage(e);break;case f.messages.MessageTypeNames.ctrl.OPEN_FLOW:this.onOpenFlow(e);break;case f.messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE:this.onReconnectMessage(e);break;case f.messages.MessageTypeNames.ctrl.MISSED_DATA_SENT:this.onMissedDataSent(e)}},i.prototype.SCFHandlectrlmsg=function(e){this.log.debug(E.msgfmt.fmt(e));var t=this.pendingSCFMessages[e.__id],n=t.callback;if((0,O.removeFromArray)(t.ids,e.__id),delete this.pendingSCFMessages[e.__id],200!=e.code){var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.ids.length&&n&&n(null,t)},i.prototype.onHeartbeat=function(e){},i.prototype.onSubscribeResponse=function(e){var t=this.pendingsubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.ids,e.__id),delete this.pendingsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;if(e.entitlements){var o=e.entitlements,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u,c=l,f=c.symbol,d=c.marketdatatype,p=c.entitlement;l={symbol:f,type:d},"NA"!==p?(this.log.debug("SUBSCRIBED <"+f+", "+d+">"),l.entitlement=p,i.subscribed.push(l)):(this.log.warn("NOT ENTITLED <"+f+","+d+">"),i.unentitled.push(l))}}if(e.rejectedSymbols){var h=e.rejectedSymbols,m=Array.isArray(h),E=0;for(h=m?h:h[Symbol.iterator]();;){var _;if(m){if(E>=h.length)break;_=h[E++]}else{if((E=h.next()).done)break;_=E.value}f=_;this.log.warn("REJECTED "+f),i.rejected.push(f)}}if(e.invalidSymbols){var g=e.invalidSymbols,T=Array.isArray(g),b=0;for(g=T?g:g[Symbol.iterator]();;){var y,S;if(T){if(b>=g.length)break;S=g[b++]}else{if((b=g.next()).done)break;S=b.value}var v=S;this.log.warn("INVALID SYMBOL "+v),(y=i.invalidSymbols).push.apply(y,e.invalidSymbols)}}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeSubscribeResponse=function(e){var t=this.pendingExchangeSubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingExchangeSubscriptions[e.__id],200!=e.code){var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onNewsSubscribeResponse=function(e){var t=this.pendingNewsSubscriptions[e.__id],n=t.callback;(0,O.removeFromArray)(t.id,e.__id),delete this.pendingNewsSubscriptions[e.__id];var r=t.result;if(200!=e.code){var i=w.error("Error subscribing to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.newsFilters.push(l)}}if(e.rejectedNewsFilters){var c=e.rejectedNewsFilters,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.rejectedNewsFilters.push(h)}}if(e.unentitledNewsFilters){var m=e.unentitledNewsFilters,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.unentitledNewsFilters.push(T)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onCorpEventResponse=function(e){var t=this.pendingCorpEventSubscription[e.__id],n=t.callback;(0,O.removeFromArray)(t.id,e.__id),delete this.pendingCorpEventSubscription[e.__id];var r=t.result;if(200!=e.code){var i=w.error("Error subscribing to Corporate Events",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.subscribed){var o=e.subscribed,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.subscribed.push(l)}}if(e.unsubscribed){var c=e.unsubscribed,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.unsubscribed.push(h)}}if(e.invalid){var m=e.invalid,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.invalid.push(T)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onAlertsSubUnsubResponse=function(e){var t=this.pendingAlertSubscription[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingAlertSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.operation&&(this.log.debug("Alerts "+e.operation),i.operation=e.operation),0===t.id.length&&n&&n(null,t.result)},i.prototype.onTradeSubscribeResponse=function(e){var t=this.pendingTradeSubscription[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingTradeSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onNewsUnsubscribeResponse=function(e){var t=this.pendingNewsUnsubscriptions[e.__id],n=t.callback;(0,O.removeFromArray)(t.id,e.__id),delete this.pendingNewsUnsubscriptions[e.__id];var r=t.result;if(200!=e.code&&!t.failed){t.failed=!0;var i=w.error("Error unsubscribing to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.unsubscribed.push(l)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onTradeUnsubscribeResponse=function(e){var t=this.pendingTradeUnsubscription[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingTradeUnsubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onUnsubscribeResponse=function(e){var t=this.pendingUnsubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.ids,e.__id),delete this.pendingUnsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&n(r))}for(var i=0;i<e.unsubscribed.length;++i){var o=t.result,s=e.unsubscribed[i],a=s.symbol,u=s.marketdatatype;this.log.debug("UNSUBSCRIBED <"+a+", "+u+">"),o.unsubscribed.push({symbol:a,type:u})}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeUnsubscribeResponse=function(e){var t=this.pendingExchangeUnsubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingExchangeUnsubscriptions[e.__id],200!=e.code){var r=w.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onReconnectMessage=function(e){450===e.code&&(this.events.fire("slow","Reconnection recieved a slow code: "+e.code),this._isSlowConnection=!0,this.conn.setReconnect=!1),this.events.fire("reconnectMessage",e)},i.prototype.onConnectResponse=function(e){if(200!==e.code){var t=w.error("Connection failed",{code:e.code,reason:e.reason});return this.events.fire("error",t),this.pendingConnection&&this.pendingConnection(t),void this.doClose(t)}if(this._serverversion=e.version,this.maxEntitlementsPerSubscription=e.maxEntitlementsPerSubscription,this.isClosed()){var n=w.error("Connection was already closed",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(this.pendingConnection&&this.pendingConnection(n))}this.conn.setServer(e.serverInstance),this.pendingConnection&&this.pendingConnection(null,this)},i.prototype.onConnectionClose=function(e){this.doClose(w.close({reason:e.reason,code:e.code}))},i.prototype.onSlowConnection=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("slow",e)},i.prototype.onStatsResponse=function(e){if(200==e.code)this.events.fire("stats",e);else{var t=w.error("Error getting stats",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onInitialDataSent=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("initialDataSent",e)},i.prototype.onResubscribeMessage=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("resubscribeMessage",e)},i.prototype.onMissedDataSent=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("missedDataSent",e)},i.prototype.onOpenFlow=function(e){this.conn.send(e)},i.prototype._handledatamsg=function(e){this.events.fire("message",e)},i.prototype.send=function(e){this.conn&&this.conn.send(e)},i.prototype.sendCustomFrame=function(e,t,n,r){this.conn&&this.conn.sendCustomFrame(e,t,n,r)},i.prototype.doClose=function(e){if(!this.isClosed()){var t=this.conn;this.conn=null,t.close(),this.events.fire("close",e),t.isReconnect()&&(this.events=new m["default"],this.conn=t)}},i.prototype.performReconnect=function(e){if(null!=this.conn&&this.conn.isReconnect()){if(this.conn.isConnectionUp)return void this.log.warn("Connection is not closed and won't try reconnect.");this.conn.setReconnect(!0),this.conn.tryReopen(),e&&e()}else this.log.warn("Reconnect flag is set to false")},i.prototype.close=function(e){this.doClose(w.close({reason:"Manually closed",code:200})),e&&e()},i.prototype.isClosed=function(){return null==this.conn},i}();b["default"]=g}).call(this,T("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},T("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],T("timers").setImmediate,T("timers").clearImmediate,"/lib/stomp/StompStream.js","/lib/stomp")},{"../EventSupport.js":2,"../UShortId.js":9,"../formatting.js":13,"../logging.js":16,"../polyfills.js":18,"../streamer-api.js":108,"../streamer-events.js":109,"../streamer-utils.js":110,"../utils.js":115,_process:131,buffer:121,timers:152}],107:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0,v("../polyfills.js");var f=v("../logging.js"),p=v("../streamer-api.js"),h=v("../message.js"),d=_(v("../transmission/JsonStompTransmitter.js")),m=_(v("./StompConnection.js")),E=_(v("./StompStream.js"));function _(e){return e&&e.__esModule?e:{"default":e}}var g="/ping/v1",T="/version/v1",b="/stream/connect",y="",S=function(){function o(e,t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.http=e,this.stompJs=t,this.log=(0,f.asLogger)(n),this.config=r||{},this.maxReconnectAttempts=this.config.maxReconnectAttempts,this.format=this.config.format,"application/json"===this.config.format&&(this.createTransmitter=function(e){return new d["default"](e,i.log)})}return o.prototype.openStompSocket=function(t,e){y="";var n={"X-Stream-Version":p.VERSION,"X-Stream-Lib":p.LIBRARY_NAME};this.addToHeaderParams("X-Stream-Version",p.VERSION),this.addToHeaderParams("X-Stream-Lib",p.LIBRARY_NAME);var r=this.config.conflation;null!=r&&""!==r&&(n["X-Stream-Conflation"]=r,this.addToHeaderParams("X-Stream-Conflation",r)),null!=e&&""!==e&&(n["X-Stream-Previous-Connection-Id"]=e,this.addToHeaderParams("X-Stream-Previous-Connection-Id",e));var i=this.config.intervalPeriod;null!=i&&""!==i&&(n["X-Stream-Interval-Period"]=i,this.addToHeaderParams("X-Stream-Interval-Period",i));var o=this.config.rejectExcessiveConnection;null!=o&&""!==o&&(n["X-Stream-Reject"]=o,this.addToHeaderParams("X-Stream-Reject",o)),"application/json"!==this.config.format&&this.config.format!==h.MimeTypes.QITCH||(n["X-Stream-Format"]=this.format,this.addToHeaderParams("X-Stream-Format",this.format)),"true"===this.config.updatesOnly&&(n["X-Stream-UpdatesOnly"]=!0,this.addToHeaderParams("X-Stream-UpdatesOnly",!0));var s=this.config.isReconnect;null!=s&&""!==s&&(n["x-Stream-isReconnect"]=s,this.addToHeaderParams("x-Stream-isReconnect",s));var a=this.config.alwaysReconnect;null!=a&&""!==a&&(n["x-Stream-isAlwaysReopen"]=a,this.addToHeaderParams("x-Stream-isAlwaysReopen",a)),"ALL"===this.config.isMissedData?(n["X-Stream-isReceiveAllMissedData"]=!0,this.addToHeaderParams("X-Stream-isReceiveAllMissedData",!0)):"LATEST"===this.config.isMissedData&&(n["X-Stream-isReceiveLatestMissedData"]=!0,this.addToHeaderParams("X-Stream-isReceiveLatestMissedData",!0));var u=this.config.stompWmid;null!=u&&(n.wmid=u,this.addToHeaderParams("wmid",u));var l=this.config.userSymbology;null!=l&&""!==l&&(n["X-Stream-User-Symbology"]=l,this.addToHeaderParams("X-Stream-User-Symbology",l)),Object.assign(n,this.config.credentials.getHeaders());var c=this.config.url+b+y,f=this.stompJs.Stomp.client(c),d=new p.messages.control.AuthenticationMessage;return this.config.credentials.sid!==undefined?(d.authenticationMethod="sid",d.authorization=this.config.credentials.sid):this.config.credentials.wmid!==undefined&&this.config.credentials.token!==undefined?(d.authenticationMethod="enterprise",d.wmid=this.config.credentials.wmid,d.authorization=this.config.credentials.token):this.config.credentials.wmid!==undefined?(d.authenticationMethod="wmid",d.authorization=this.config.credentials.wmid):this.config.credentials.data_token!==undefined&&(d.authenticationMethod="datatool",d.authorization=this.config.credentials.data_token),null!=this.config.conflation&&""!==this.config.conflation&&(d.conflation=this.config.conflation),null!=this.config.rejectExcessiveConnection&&""!==this.config.rejectExcessiveConnection&&(d.rejectExcessiveConnection=this.config.rejectExcessiveConnection),null!=this.config.entMax&&""!==this.config.entMax&&(d.entMax=this.config.entMax),f.connect(n,function(e){f.subscribe("/user/queue/messages",function(e){t(n).onMessage(e)}),t(n).onOpen(e),f.send("/stream/message",n,JSON.stringify(d))},function(e){t(n).onError(e)}),{send:function(e){f.send("/stream/message",n,e)},close:function(){f.disconnect(function(){t(n).onClose()})},sendCustomFrame:function(e,t,n,r){f.sendCustomFrame(e,t,n,r)}}},o.prototype.createStompConnection=function(){var n=this;return new m["default"](function(e){return n.createTransmitter(e)},function(e,t){return n.openStompSocket(e,t)},this.log,this.maxReconnectAttempts,this.config.host+g)},o.prototype.openStompStream=function(e){new E["default"](this,this.format,this.log).openStomp(e)},o.prototype.ping=function(t){this.http({url:this.config.host+g,success:function(e){return t(null,e)},type:"GET",failure:t})},o.prototype.getVersion=function(t){this.http({url:this.config.host+T,success:function(e){return t(null,e)},type:"GET",failure:t})},o.prototype.addToHeaderParams=function(e,t){y=""===y?y+"?"+e+"="+t:y+"&"+e+"="+t},o}();O["default"]=S}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/stomp/StompStreamingService.js","/lib/stomp")},{"../logging.js":16,"../message.js":17,"../polyfills.js":18,"../streamer-api.js":108,"../transmission/JsonStompTransmitter.js":111,"./StompConnection.js":105,"./StompStream.js":106,_process:131,buffer:121,timers:152}],108:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;d.LIBRARY_NAME="JavaScript",d.VERSION="2.58.0";var f=d.messages={};f.control={},f.market={},f.JSON_TYPE_PROPERTY="@T",f.MessageTypeNames={ctrl:{HEARTBEAT:"C1",SUBSCRIBE:"C2",SUBSCRIBE_RESPONSE:"C3",UNSUBSCRIBE_RESPONSE:"C4",CONNECT_RESPONSE:"C5",CONNECTION_CLOSE:"C6",FLOW:"C7",SLOW_CONNECTION:"C8",INITIAL_DATA_SENT:"C9",RESUBSCRIBE_MESSAGE:"C10",STATS:"C12",STATS_RESPONSE:"C13",EXCHANGE_SUBSCRIBE:"C14",EXCHANGE_RESPONSE:"C15",EXCHANGE_UNSUBSCRIBE_RESPONSE:"C16",NEWS_SUBSCRIBE:"C17",NEWS_FLT_ADD_RESPONSE:"C18",ALERTS_SUBUNSUB:"C19",ALERTS_SUBUNSUB_RESPONSE:"C20",TRADE_SUBSCRIBE:"C21",TRADE_SUBSCRIBE_RESPONSE:"C22",NEWS_FLT_DELETE_RESPONSE:"C23",NEWS_COMMAND:"C24",NEWS_FLT_GET_RESPONSE:"C26",AUTHENTICATION:"C27",OPEN_FLOW:"C28",RECONNECT_RESPONSE:"C29",TRADE_UNSUBSCRIBE_RESPONSE:"C30",MISSED_DATA_SENT:"C31",CORP_EVENT_MESSAGE:"C33",CORP_EVENT_RESPONSE:"C34",NEWS_FLT_MOCK_BASIC_RESPONSE:"C35",NEWS_FLT_UPDATE_RESPONSE:"C36",NEWS_FILTER_MESSAGE:"C37",NEWS_ERROR_MESSAGE:"C38",NEWS_SUCCESS_MESSAGE:"C39",NEWS_FLT_ADD_MESSAGE:"C40"},data:{QUOTE:"D1",PRICEDATA:"D2",TRADE:"D3",BOOKORDER:"D4",BOOKDELETE:"D5",PURGEBOOK:"D6",MMQUOTE:"D7",INTERVAL:"D8",NETHOUSEPOSITION:"D9",SYMBOLINFO:"D10",SYMBOLSTATUS:"D11",DERIVATIVEINFO:"D12",LASTSALE:"D13",LIMITUPLIMITDOWN:"D14",IVGREEKS:"D15",IMBALANCESTATUS:"D16",ALERT:"D17",NEWS:"D18",TRADENOTIFICATION:"D19",DIVIDEND:"D22",EARNINGS:"D23",SPLIT:"D24",SYMBOLCHANGED:"D25",PRICELEVEL:"D26",MMPRICELEVEL:"D27"}},f.Message=function(){},f.Message.prototype.init=function(e){this[f.JSON_TYPE_PROPERTY]=e},f.control.CtrlMessage=function(){},f.control.CtrlMessage.prototype=new f.Message,f.control.Heartbeat=function(){this.init(f.MessageTypeNames.ctrl.HEARTBEAT),this.timestamp=null},f.control.Heartbeat.prototype=new f.control.CtrlMessage,f.control.StatsMessage=function(){this.init(f.MessageTypeNames.ctrl.STATS)},f.control.StatsMessage.prototype=new f.control.CtrlMessage,f.control.SubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.SUBSCRIBE),this.action=null,this.symbols=[],this.types=[],this.mimetype=null,this.conflation=null},f.control.SubscribeMessage.prototype=new f.control.CtrlMessage,f.control.ExchangeSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.EXCHANGE_SUBSCRIBE),this.action=null,this.exchange=null,this.mimetype=null,this.conflation=null},f.control.ExchangeSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.NewsSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.NEWS_SUBSCRIBE),this.newsAction=null,this.newsFilters=null,this.filtersId=null,this.mimetype=null},f.control.NewsSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.NewsCommandMessage=function(){this.init(f.MessageTypeNames.ctrl.NEWS_COMMAND),this.newsAction=null,this.mimetype=null},f.control.NewsCommandMessage.prototype=new f.control.CtrlMessage,f.control.CorpEventSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.CORP_EVENT_MESSAGE),this.action=null,this.symbols=[],this.corpEventTypes=[],this.allCorpEvents=null,this.mimeType=null},f.control.CorpEventSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.AlertsSubUnsubMessage=function(){this.init(f.MessageTypeNames.ctrl.ALERTS_SUBUNSUB),this.operation=null,this.mimetype=null},f.control.AlertsSubUnsubMessage.prototype=new f.control.CtrlMessage,f.control.TradeSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.TRADE_SUBSCRIBE),this.action=null,this.notificationType=null,this.mimetype=null},f.control.TradeSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.BaseResponse=function(){this.code=null,this.reason=null},f.control.BaseResponse.prototype=new f.control.CtrlMessage,f.control.SubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE),this.entitlements=null,this.invalidsymbols=null,this.rejectedsymbols=null,this.messagefilters=null},f.control.SubscribeResponse.prototype=new f.control.BaseResponse,f.control.ExchangeSubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.EXCHANGE_RESPONSE)},f.control.ExchangeSubscribeResponse.prototype=new f.control.BaseResponse,f.control.AlertSubUnsubResponse=function(){this.init(f.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE)},f.control.AlertSubUnsubResponse.prototype=new f.control.BaseResponse,f.control.TradeSubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE)},f.control.TradeSubscribeResponse.prototype=new f.control.BaseResponse,f.control.UnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE),this.unsubscribed=null},f.control.UnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.ExchangeUnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE)},f.control.ExchangeUnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.NewsUnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.NEWS_UNSUBSCRIBE_RESPONSE),this.unsubscribed=null},f.control.NewsUnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.CorporateEventResponse=function(){this.init(f.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE),this.subscribed=[],this.unsubscribed=[],this.invalid=[]},f.control.CorporateEventResponse.prototype=new f.control.BaseResponse,f.control.TradeUnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE)},f.control.TradeUnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.StreamEntitlement=function(){this.symbol=null,this.marketdatatype=null,this.entitlement=null},f.control.ConnectResponse=function(){this.init(f.MessageTypeNames.ctrl.CONNECT_RESPONSE),this.version=null,this.flowControlCheckInterval=null,this.serverInstance=null,this.conflationMs=null},f.control.ConnectResponse.prototype=new f.control.BaseResponse,f.control.ReconnectResponse=function(){undefined.init(f.MessageTypeNames.ctrl.RECONNECT_RESPONSE),undefined.version=null,undefined.flowControlCheckInterval=null,undefined.serverInstance=null,undefined.conflationMs=null,undefined.previousSubscriptions=null},f.control.ConnectionClose=function(){this.init(f.MessageTypeNames.ctrl.CONNECTION_CLOSE),this.code=null,this.reason=null},f.control.ConnectionClose.prototype=new f.control.CtrlMessage,f.control.SlowConnection=function(){this.init(f.MessageTypeNames.ctrl.SLOW_CONNECTION),this.timesExceeded=null,this.maxExceed=null},f.control.SlowConnection.prototype=new f.control.CtrlMessage,f.control.FlowMessage=function(){this.init(f.MessageTypeNames.ctrl.FLOW),this.sequence=null},f.control.FlowMessage.prototype=new f.control.CtrlMessage,f.control.AuthenticationMessage=function(){this.init(f.MessageTypeNames.ctrl.AUTHENTICATION),this.authenticationMethod=null,this.wmid=null,this.authorization=null,this.conflation=150,this.rejectExcessiveConnection=!1,this.entMax=null},f.control.AuthenticationMessage.prototype=new f.control.CtrlMessage,f.control.StatsResponse=function(){this.init(f.MessageTypeNames.ctrl.STATS_RESPONSE),this.numberOfSubscribedSymbolsL1=null,this.numberOfAvailableSymbolsL1=null,this.numberOfSubscribedSymbolsL2=null,this.numberOfAvailableSymbolsL2=null,this.numberOfOpenedConnections=null,this.numberOfAvailableConnections=null,this.numberOfSubscribedExchanges=null,this.numberOfSubscribedTrades=null},f.control.StatsResponse.prototype=new f.control.BaseResponse,f.control.InitialDataSent=function(){this.init(f.MessageTypeNames.ctrl.INITIAL_DATA_SENT),this.timestamp=null},f.control.InitialDataSent.prototype=new f.control.CtrlMessage,f.control.ResubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE),this.timestamp=null},f.control.ResubscribeMessage.prototype=new f.control.CtrlMessage,f.control.MissedDataSent=function(){this.init(f.MessageTypeNames.ctrl.MISSED_DATA_SENT),this.timestamp=null},f.control.MissedDataSent.prototype=new f.control.CtrlMessage,f.control.StreamEntitlementType={RT:"Realtime",RTO:"Realtime CBOE ONE",RTN:"Realtime NASDAQ",RTB:"Realtime BATS",DL:"Delayed",DLO:"Delayed CBOE One",DLN:"Delayed NASDAQ",NA:"Not Entitled"},f.control.Action={SUBSCRIBE:"SUBSCRIBE",UNSUBSCRIBE:"UNSUBSCRIBE"},f.control.NewsAction={NEWS_FLT_ADD:"NEWS_FLT_ADD",NEWS_FLT_DELETE:"NEWS_FLT_DELETE",NEWS_FLT_UPDATE:"NEWS_FLT_UPDATE",NEWS_FLT_GET:"NEWS_FLT_GET",NEWS_FLT_MOCK_BASIC:"NEWS_FLT_MOCK_BASIC"},f.control.Association={AND:"AND",OR:"OR",NOT:"NOT"},f.control.MarketdataType={QUOTE:"QUOTE",PRICEDATA:"PRICEDATA",TRADE:"TRADE",MMQUOTE:"MMQUOTE",ORDERBOOK:"ORDERBOOK",INTERVAL:"INTERVAL",NETHOUSEPOSITION:"NETHOUSEPOSITION",LASTSALE:"LASTSALE",BOOKORDER:"BOOKORDER",BOOKDELETE:"BOOKDELETE",PRICELEVEL:"PRICELEVEL",MMPRICELEVEL:"MMPRICELEVEL",PURGEBOOK:"PURGEBOOK",LIMITUPLIMITDOWN:"LIMITUPLIMITDOWN",IVGREEKS:"IVGREEKS",IMBALANCESTATUS:"IMBALANCESTATUS"},f.market.SubscriptionTypes={QUOTE:"QUOTE",PRICEDATA:"PRICEDATA",TRADE:"TRADE",MMQUOTE:"MMQUOTE",ORDERBOOK:"ORDERBOOK",INTERVAL:"INTERVAL",NETHOUSEPOSITION:"NETHOUSEPOSITION",LASTSALE:"LASTSALE",LIMITUPLIMITDOWN:"LIMITUPLIMITDOWN",IVGREEKS:"IVGREEKS",IMBALANCESTATUS:"IMBALANCESTATUS"},f.market.CorporateEventTypes={DIVIDEND:"DIVIDEND",SPLIT:"SPLIT",EARNINGS:"EARNINGS",SYMBOLCHANGED:"SYMBOLCHANGED"},f.market.MarketDataResponseTypes={QUOTE:"QUOTE",PRICEDATA:"PRICEDATA",TRADE:"TRADE",INTERVAL:"INTERVAL",NETHOUSEPOSITION:"NETHOUSEPOSITION",MMQUOTE:"MMQUOTE",PRICELEVEL:"PRICELEVEL",MMPRICELEVEL:"MMPRICELEVEL",BOOKORDER:"BOOKORDER",PURGEBOOK:"PURGEBOOK",BOOKDELETE:"BOOKDELETE",SYMBOLINFO:"SYMBOLINFO",SYMBOLSTATUS:"SYMBOLSTATUS",DERIVATIVEINFO:"DERIVATIVEINFO",LASTSALE:"LASTSALE",LIMITUPLIMITDOWN:"LIMITUPLIMITDOWN",IVGREEKS:"IVGREEKS",IMBALANCESTATUS:"IMBALANCESTATUS",ALERT:"ALERT",NEWS:"NEWS",TRADENOTIFICATION:"TRADENOTIFICATION",NEWSERROR:"NEWSERROR",DIVIDEND:"DIVIDEND"},f.control.ResponseCodes={OK_CODE:200,OK_REASON:"OK",BADREQUEST_CODE:400,BADREQUEST_REASON:"Bad Request",UNAUTHORIZED_CODE:401,UNAUTHORIZED_REASON:"Unauthorized",TOOSLOW_CODE:450,TOOSLOW_REASON:"Too slow",DATA_SOURCE_RESET:454,DATA_SOURCE_RESET_REASON:"Data Source Was Reset",CONNECTION_LIMIT_EXCEEDED_CODE:452,CONNECTION_LIMIT_EXCEEDED_REASON:"Connection Limit Exceeded",INTERNALSERVERERROR_CODE:500,INTERNALSERVERERROR_REASON:"Internal Server Error"},f.market.DataMessage=function(){this.messageType=null},f.market.DataMessage.prototype=new f.Message,f.market.Quote=function(){this.init(f.MessageTypeNames.data.QUOTE)},f.market.Quote.prototype=new f.market.DataMessage,f.market.PriceData=function(){this.init(f.MessageTypeNames.data.PRICEDATA)},f.market.PriceData.prototype=new f.market.DataMessage,f.market.Trade=function(){this.init(f.MessageTypeNames.data.TRADE)},f.market.Trade.prototype=new f.market.DataMessage,f.market.MMQuote=function(){this.init(f.MessageTypeNames.data.MMQUOTE)},f.market.MMQuote.prototype=new f.market.DataMessage,f.market.PurgeBook=function(){this.init(f.MessageTypeNames.data.PURGEBOOK)},f.market.PurgeBook.prototype=new f.market.DataMessage,f.market.BookOrder=function(){this.init(f.MessageTypeNames.data.BOOKORDER)},f.market.BookOrder.prototype=new f.market.DataMessage,f.market.BookDelete=function(){this.init(f.MessageTypeNames.data.BOOKDELETE)},f.market.BookDelete.prototype=new f.market.DataMessage,f.market.PriceLevel=function(){this.init(f.MessageTypeNames.data.PRICELEVEL)},f.market.PriceLevel.prototype=new f.market.DataMessage,f.market.MMPriceLevel=function(){this.init(f.MessageTypeNames.data.MMPRICELEVEL)},f.market.MMPriceLevel.prototype=new f.market.DataMessage,f.market.Interval=function(){this.init(f.MessageTypeNames.data.INTERVAL)},f.market.Interval.prototype=new f.market.DataMessage,f.market.NethousePosition=function(){this.init(f.MessageTypeNames.data.NETHOUSEPOSITION)},f.market.NethousePosition.prototype=new f.market.DataMessage,f.market.SymbolInfo=function(){this.init(f.MessageTypeNames.data.SYMBOLINFO)},f.market.SymbolInfo.prototype=new f.market.DataMessage,f.market.SymbolStatus=function(){this.init(f.MessageTypeNames.data.SYMBOLSTATUS)},f.market.SymbolStatus.prototype=new f.market.DataMessage,f.market.DerivativeInfo=function(){this.init(f.MessageTypeNames.data.DERIVATIVEINFO)},f.market.DerivativeInfo.prototype=new f.market.DataMessage,f.market.IVGreeks=function(){this.init(f.MessageTypeNames.data.IVGREEKS)},f.market.IVGreeks.prototype=new f.market.DataMessage,f.market.LastSale=function(){this.init(f.MessageTypeNames.data.LASTSALE)},f.market.LastSale.prototype=new f.market.DataMessage,f.market.LimitUpLimitDown=function(){this.init(f.MessageTypeNames.data.LIMITUPLIMITDOWN)},f.market.LimitUpLimitDown.prototype=new f.market.DataMessage,f.market.ImbalanceStatus=function(){this.init(f.MessageTypeNames.data.IMBALANCESTATUS)},f.market.ImbalanceStatus.prototype=new f.market.DataMessage,f.market.Alert=function(){this.init(f.MessageTypeNames.data.ALERT)},f.market.Alert.prototype=new f.market.DataMessage,f.market.InstrumentType={1:"CASH",2:"BOND",3:"COMPOSITE",4:"FUTURE",5:"FUTURE_OPTION",6:"FOREX",7:"INDEX",8:"MUTUAL_FUND",9:"MONEY_MARKET_FUND",10:"MARKET_STAT",11:"EQUITY",12:"EQUITY_OPTION",13:"GOVT_BOND",14:"MUNI_BOND",15:"CORP_BOND",16:"ETF",17:"FUTURE_SPREAD",97:"OPTION_ROOT",98:"UNKNOWN",99:"RATE"},f.market.OrderSide={BUYSIDE:"B",SELLSIDE:"S"},f.market.ImbalanceType={0:"NONE",1:"MARKET",2:"MOC",3:"REGULATORY_IMBALANCE",4:"OPENING_IMBALANCE",5:"CLOSING_IMBALANCE",6:"IPO_IMBALANCE",7:"HALT_IMBALANCE",8:"EQUILIBRIUM"},f.market.OrderChangeType={A:"ADD",M:"MODIFY",C:"CANCEL",E:"EXECUTE"}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/streamer-api.js","/lib")},{_process:131,buffer:121,timers:152}],109:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,p("./polyfills");var f=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Object.assign(this,e)}return t.prototype.toString=function(){var e=this.type+"{",t=!0;for(var n in this)"type"!==n&&"function"!=typeof this[n]&&(t||(e+=", "),e+=n+": "+JSON.stringify(this[n]),t=!1);return e+="}"},t}(),d=h.event=function(e,t){return new f(Object.assign({type:e},t))};h.error=function(e,t){return d("error",Object.assign({description:e},t))},h.close=function(e){return d("close",e)}}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/streamer-events.js","/lib")},{"./polyfills":18,_process:131,buffer:121,timers:152}],110:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.getMessageName=h.entitlement=h.isvalid=h.iscontrolmessage=h.isdatamessage=h.messagetype=undefined;var f,d=p("./streamer-api.js");h.messagetype=function(e){return null===e?null:e[d.messages.JSON_TYPE_PROPERTY]},h.isdatamessage=function(e){if(null===e)return!1;var t=h.messagetype(e);return null!==t&&t.startsWith("D")},h.iscontrolmessage=function(e){if(null===e)return!1;var t=h.messagetype(e);return null!==t&&t.startsWith("C")},h.isvalid=function(e,t){var n=t.invalidSymbols;if(null==n)return!0;for(var r=0;r<n.length;r++){if(n[r]===e)return!1}return!0},h.entitlement=function(e,t,n){var r=n.entitlements;if(null!=r)for(var i=0;i<r.length;i++){var o=r[i];if(o.symbol===e&&o.marketdatatype===t)return o.entitlement}return null},h.getMessageName=(f={},function(e){var t=e[d.messages.JSON_TYPE_PROPERTY];if(!f[t]){var n=d.messages.MessageTypeNames.ctrl;for(var r in n)if(n[r]===t)return f[t]=r;var i=d.messages.MessageTypeNames.data;for(var o in i)if(i[o]===t)return f[t]=o;return f[t]=t}return f[t]})}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/streamer-utils.js","/lib")},{"./streamer-api.js":108,_process:131,buffer:121,timers:152}],111:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f,d=m("../EventSupport.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.socket=e,this.log=t,this.events=new p["default"](this)}return n.prototype.send=function(e,t){this.socket.send(JSON.stringify(e))},n.prototype.sendCustomFrame=function(e,t,n,r){this.socket.sendCustomFrame(e.toString(),t.toString(),JSON.parse(n),JSON.stringify(r))},n.prototype.onMessage=function(e){var t=null;try{t=JSON.parse(e)}catch(r){return void this.log.error(r)}var n=t;n.__id=n.requestId,this.events.fire("message",n)},n.prototype.on=function(e,t){return this.events.on(e,t)},n}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/transmission/JsonStompTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,_process:131,buffer:121,timers:152}],112:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;m("../message.js");var f,d=m("../EventSupport.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.socket=e,this.log=t,this.events=new p["default"](this)}return n.prototype.send=function(e,t){this.socket.push({trackMessageLength:!0,data:JSON.stringify(e)})},n.prototype.onMessage=function(e){var t=null;try{t=JSON.parse(e)}catch(o){return void this.log.error(o)}this.events.fire("sequence",t.seq);for(var n=t.data.length,r=0;r<n;r++){var i=t.data[r];i.__id=i.requestId,this.events.fire("message",i)}},n.prototype.on=function(e,t){return this.events.on(e,t)},n}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/transmission/JsonTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../message.js":17,_process:131,buffer:121,timers:152}],113:[function(S,e,v){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";v.__esModule=!0;var f=b(S("../EventSupport.js")),d=b(S("../SMessage")),p=S("../qitch/decoder/QitchDecoder"),h=b(p),m=b(S("../qitch/encoder/QitchEncoder")),E=b(S("../UShortId.js")),_=S("../message.js"),g=b(S("../qitch/LocateCodeInjector")),T=S("../utils");function b(e){return e&&e.__esModule?e:{"default":e}}var y=function(){function r(e,t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.socket=e,!(t instanceof m["default"]))throw"Wrong encoder";this.encoder=t,this.log=n,this.events=new f["default"](this),this.decoder=new h["default"](r.prototype.DEFAULT_BUFFERSIZE),this.locateCodeInjector=new g["default"]}return r.prototype.send=function(e,t){var n=new d["default"];n.sequencenumber=e.sequenceNumber,n.timestamp=(new Date).getTime(),n.id=null!=t?t:E["default"].NULL,n.encoding=_.Encodings.NONE_CHAR,n.mimetype=_.MimeTypes.QITCH_CHAR,n.payload=e;var r={trackMessageLength:!1,data:this.encoder.encode(n,0)};this.socket.push(r)},r.prototype.onMessage=function(e){var t=void 0;t=e instanceof ArrayBuffer?e:(0,T.asciiStringToArrayBuffer)(e);var n=null;try{n=this.decoder.decode(new Int8Array(t))}catch(o){return void this.log.error(o)}if(null!=n)for(var r=0;r<n.length;r++)if(n[r]instanceof p.MessageBlock)for(var i=0;i<n[r].messages.length;i++)this._processMessage(n[r].messages[i]);else this._processMessage(n[r]);else this.log.debug("Couldn't decode message. Ignoring unsupported message")},r.prototype.on=function(e,t){return this.events.on(e,t)},r.prototype._processMessage=function(e){this.locateCodeInjector.injectLocateCode(e.decodedPayload),this.events.fire("sequence",e.sequencenumber),e.decodedPayload.__id=e.id,this.events.fire("message",e.decodedPayload)},r}();y.prototype.DEFAULT_BUFFERSIZE=4096,v["default"]=y}).call(this,S("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},S("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],S("timers").setImmediate,S("timers").clearImmediate,"/lib/transmission/QitchTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../SMessage":5,"../UShortId.js":9,"../message.js":17,"../qitch/LocateCodeInjector":23,"../qitch/decoder/QitchDecoder":46,"../qitch/encoder/QitchEncoder":76,"../utils":115,_process:131,buffer:121,timers:152}],114:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=_("../message.js"),d=m(_("../SMessage.js")),p=m(_("../UShortId.js")),h=m(_("../EventSupport.js"));_("../formatting.js");function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function i(e,t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.socket=e,this.encoder=t,this.decoder=n,this.log=r,this.events=new h["default"](this)}return i.prototype.send=function(e,t){var n=new d["default"];n.sequencenumber=e.sequenceNumber,n.timestamp=(new Date).getTime(),n.id=null!=t?t:p["default"].NULL,n.encoding=f.Encodings.NONE_CHAR,n.mimetype=f.MimeTypes.JSON_CHAR,n.payload=JSON.stringify(e);var r={trackMessageLength:!0,data:this.encoder.encode(n)};this.socket.push(r)},i.prototype.onMessage=function(e){var t=this.decoder.decode(e);if(this.events.fire("sequence",t.sequencenumber),t.encoding===f.Encodings.NONE_CHAR)if(t.mimetype===f.MimeTypes.JSON_CHAR){var n=null;try{n=JSON.parse(t.payload)}catch(r){return void this.log.error(r)}n.__id=t.id,this.events.fire("message",n)}else this.log.debug("Unhandled mimetype: "+t.mimeType+" - "+t.payload);else this.log.debug("Unhandled encoding: "+t.encoding+" - "+t.payload)},i.prototype.on=function(e,t){return this.events.on(e,t)},i}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/transmission/SMessageTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../SMessage.js":5,"../UShortId.js":9,"../formatting.js":13,"../message.js":17,_process:131,buffer:121,timers:152}],115:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;d.forEachPartition=function(e,t,n){if(e)for(var r=0;r<e.length;r+=t){n(e.slice(r,r+t))}};var f=d.indexOf=function(e,t){for(var n=e.length,r=0;r<n;++r)if(t===e[r])return r;return-1};d.removeFromArray=function(e){for(var t,n,r=arguments.length<=1?0:arguments.length-1;0<r&&e.length;){var i;for(i=1+--r,t=arguments.length<=i?undefined:arguments[i];-1!==(n=f(e,t));)e.splice(n,1)}return e},d.asciiStringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,i=e.length;r<i;r++)n[r]=e.charCodeAt(r);return t}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/utils.js","/lib")},{_process:131,buffer:121,timers:152}],116:[function(e,f,t){(function(e,t,n,r,i,o,s,a,u,l,c){f.exports=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/array-equal/index.js","/node_modules/array-equal")},{_process:131,buffer:121,timers:152}],117:[function(e,t,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.byteLength=function(e){var t=_(e),n=t[0],r=t[1];return 3*(n+r)/4-r},T.toByteArray=function(e){for(var t,n=_(e),r=n[0],i=n[1],o=new p((l=r,c=i,3*(l+c)/4-c)),s=0,a=0<i?r-4:r,u=0;u<a;u+=4)t=d[e.charCodeAt(u)]<<18|d[e.charCodeAt(u+1)]<<12|d[e.charCodeAt(u+2)]<<6|d[e.charCodeAt(u+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=255&t;var l,c;2===i&&(t=d[e.charCodeAt(u)]<<2|d[e.charCodeAt(u+1)]>>4,o[s++]=255&t);1===i&&(t=d[e.charCodeAt(u)]<<10|d[e.charCodeAt(u+1)]<<4|d[e.charCodeAt(u+2)]>>2,o[s++]=t>>8&255,o[s++]=255&t);return o},T.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],o=0,s=n-r;o<s;o+=16383)i.push(g(e,o,s<o+16383?s:o+16383));1===r?(t=e[n-1],i.push(f[t>>2]+f[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(f[t>>10]+f[t>>4&63]+f[t<<2&63]+"="));return i.join("")};for(var f=[],d=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,E=h.length;m<E;++m)f[m]=h[m],d[h.charCodeAt(m)]=m;function _(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var r,i,o=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(f[(i=r)>>18&63]+f[i>>12&63]+f[i>>6&63]+f[63&i]);return o.join("")}d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/base64-js/index.js","/node_modules/base64-js")},{_process:131,buffer:121,timers:152}],118:[function(e,f,t){(function(e,t,n,r,i,o,s,a,u,l,c){!function(t){"use strict";
47
+ (function(){var T,r,E,l,o={}.hasOwnProperty,s=[].slice;T={LF:"\n",NULL:"\0"},E=function(){var s;function g(e,t,n){this.command=e,this.headers=null!=t?t:{},this.body=null!=n?n:""}return g.prototype.toString=function(){var e,t,n,r,i;for(t in(n=!(e=[this.command])===this.headers["content-length"])&&delete this.headers["content-length"],i=this.headers)o.call(i,t)&&(r=i[t],e.push(t+":"+r));return this.body&&!n&&e.push("content-length:"+g.sizeOfUTF8(this.body)),e.push(T.LF+this.body),e.join(T.LF)},g.sizeOfUTF8=function(e){return e?encodeURI(e).match(/%..|./g).length:0},s=function(e){var t,n,r,i,o,s,a,u,l,c,f,d,p,h,m,E,_;for(i=e.search(RegExp(""+T.LF+T.LF)),r=(o=e.substring(0,i).split(T.LF)).shift(),s={},d=function(e){return e.replace(/^\s+|\s+$/g,"")},p=0,m=(E=o.reverse()).length;p<m;p++)u=(c=E[p]).indexOf(":"),s[d(c.substring(0,u))]=d(c.substring(u+1));if(t="",f=i+2,s["content-length"])l=parseInt(s["content-length"]),t=(""+e).substring(f,f+l);else for(n=null,a=h=f,_=e.length;(f<=_?h<_:_<h)&&(n=e.charAt(a))!==T.NULL;a=f<=_?++h:--h)t+=n;return new g(r,s,t)},g.unmarshall=function(i){var o;return function(){var e,t,n,r;for(r=[],e=0,t=(n=i.split(RegExp(""+T.NULL+T.LF+"*"))).length;e<t;e++)0<(null!=(o=n[e])?o.length:void 0)&&r.push(s(o));return r}()},g.marshall=function(e,t,n){return new g(e,t,n).toString()+T.NULL},g}(),r=function(){var m;function e(e){this.ws=e,this.ws.binaryType="arraybuffer",this.counter=0,this.connected=!1,this.heartbeat={outgoing:1e4,incoming:1e4},this.maxWebSocketFrameSize=16384,this.subscriptions={}}return e.prototype.debug=function(e){var t;return"undefined"!=typeof window&&null!==window&&null!=(t=window.console)?t.log(e):void 0},m=function(){return Date.now?Date.now():(new Date).valueOf},e.prototype._transmit=function(e,t,n){var r;for(r=E.marshall(e,t,n),"function"==typeof this.debug&&this.debug(">>> "+r);;){if(!(r.length>this.maxWebSocketFrameSize))return this.ws.send(r);this.ws.send(r.substring(0,this.maxWebSocketFrameSize)),r=r.substring(this.maxWebSocketFrameSize),"function"==typeof this.debug&&this.debug("remaining = "+r.length)}},e.prototype._setupHeartbeat=function(i){var e,t,n,o,r,s,a,u;if((r=i.version)===l.VERSIONS.V1_1||r===l.VERSIONS.V1_2)return t=(s=function(){var e,t,n,r;for(r=[],e=0,t=(n=i["heart-beat"].split(",")).length;e<t;e++)o=n[e],r.push(parseInt(o));return r}())[0],e=s[1],0!==this.heartbeat.outgoing&&0!==e&&(n=Math.max(this.heartbeat.outgoing,e),"function"==typeof this.debug&&this.debug("send PING every "+n+"ms"),this.pinger=l.setInterval(n,(a=this,function(){return a.ws.send(T.LF),"function"==typeof a.debug?a.debug(">>> PING"):void 0}))),0!==this.heartbeat.incoming&&0!==t?(n=Math.max(this.heartbeat.incoming,t),"function"==typeof this.debug&&this.debug("check PONG every "+n+"ms"),this.ponger=l.setInterval(n,(u=this,function(){var e;if(e=m()-u.serverActivity,2*n<e)return"function"==typeof u.debug&&u.debug("did not receive server activity for the last "+e+"ms"),u.ws.close()}))):void 0},e.prototype._parseConnect=function(){var e,t,n,r;switch(r={},(e=1<=arguments.length?s.call(arguments,0):[]).length){case 2:r=e[0],t=e[1];break;case 3:e[1]instanceof Function?(r=e[0],t=e[1],n=e[2]):(r.login=e[0],r.passcode=e[1],t=e[2]);break;case 4:r.login=e[0],r.passcode=e[1],t=e[2],n=e[3];break;default:r.login=e[0],r.passcode=e[1],t=e[2],n=e[3],r.host=e[4]}return[r,t,n]},e.prototype.connect=function(){var e,p,t,n,h,r,i;return e=1<=arguments.length?s.call(arguments,0):[],n=this._parseConnect.apply(this,e),t=n[0],this.connectCallback=n[1],p=n[2],"function"==typeof this.debug&&this.debug("Opening Web Socket..."),this.ws.onmessage=(h=this,function(e){var r,i,t,n,o,s,a,u,l,c,f,d;if(n="undefined"!=typeof ArrayBuffer&&e.data instanceof ArrayBuffer?(r=new Uint8Array(e.data),"function"==typeof h.debug&&h.debug("--- got data length: "+r.length),function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)i=r[e],n.push(String.fromCharCode(i));return n}().join("")):e.data,h.serverActivity=m(),n!==T.LF){for("function"==typeof h.debug&&h.debug("<<< "+n),d=[],l=0,c=(f=E.unmarshall(n)).length;l<c;l++)switch((o=f[l]).command){case"CONNECTED":"function"==typeof h.debug&&h.debug("connected to server "+o.headers.server),h.connected=!0,h._setupHeartbeat(o.headers),d.push("function"==typeof h.connectCallback?h.connectCallback(o):void 0);break;case"MESSAGE":u=o.headers.subscription,(a=h.subscriptions[u]||h.onreceive)?(t=h,s=o.headers["message-id"],o.ack=function(e){return null==e&&(e={}),t.ack(s,u,e)},o.nack=function(e){return null==e&&(e={}),t.nack(s,u,e)},d.push(a(o))):d.push("function"==typeof h.debug?h.debug("Unhandled received MESSAGE: "+o):void 0);break;case"RECEIPT":d.push("function"==typeof h.onreceipt?h.onreceipt(o):void 0);break;case"ERROR":d.push("function"==typeof p?p(o):void 0);break;default:d.push("function"==typeof h.debug?h.debug("Unhandled frame: "+o):void 0)}return d}"function"==typeof h.debug&&h.debug("<<< PONG")}),this.ws.onclose=(r=this,function(){var e;return e="Whoops! Lost connection to "+r.ws.url,"function"==typeof r.debug&&r.debug(e),r._cleanUp(),"function"==typeof p?p(e):void 0}),this.ws.onopen=(i=this,function(){return"function"==typeof i.debug&&i.debug("Web Socket Opened..."),t["accept-version"]=l.VERSIONS.supportedVersions(),t["heart-beat"]=[i.heartbeat.outgoing,i.heartbeat.incoming].join(","),i._transmit("CONNECT",t)})},e.prototype.disconnect=function(e,t){return null==t&&(t={}),this._transmit("DISCONNECT",t),this.ws.onclose=null,this.ws.close(),this._cleanUp(),"function"==typeof e?e():void 0},e.prototype._cleanUp=function(){if(this.connected=!1,this.pinger&&l.clearInterval(this.pinger),this.ponger)return l.clearInterval(this.ponger)},e.prototype.sendCustomFrame=function(e,t,n,r){return null==n&&(n={}),null==r&&(r=""),n.destination=e,this._transmit(t,n,r)},e.prototype.send=function(e,t,n){return null==t&&(t={}),null==n&&(n=""),t.destination=e,this._transmit("SEND",t,n)},e.prototype.subscribe=function(e,t,n){var r;return null==n&&(n={}),n.id||(n.id="sub-"+this.counter++),n.destination=e,this.subscriptions[n.id]=t,this._transmit("SUBSCRIBE",n),r=this,{id:n.id,unsubscribe:function(){return r.unsubscribe(n.id)}}},e.prototype.unsubscribe=function(e){return delete this.subscriptions[e],this._transmit("UNSUBSCRIBE",{id:e})},e.prototype.begin=function(e){var t,n;return n=e||"tx-"+this.counter++,this._transmit("BEGIN",{transaction:n}),t=this,{id:n,commit:function(){return t.commit(n)},abort:function(){return t.abort(n)}}},e.prototype.commit=function(e){return this._transmit("COMMIT",{transaction:e})},e.prototype.abort=function(e){return this._transmit("ABORT",{transaction:e})},e.prototype.ack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("ACK",n)},e.prototype.nack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("NACK",n)},e}(),l={VERSIONS:{V1_0:"1.0",V1_1:"1.1",V1_2:"1.2",supportedVersions:function(){return"1.1,1.0"}},client:function(e,t){var n;return null==t&&(t=["v10.stomp","v11.stomp"]),n=new(l.WebSocketClass||WebSocket)(e,t),new r(n)},over:function(e){return new r(e)},Frame:E},null!=f&&(f.Stomp=l),"undefined"!=typeof window&&null!==window?(l.setInterval=function(e,t){return window.setInterval(t,e)},l.clearInterval=function(e){return window.clearInterval(e)},window.Stomp=l):f||(self.Stomp=l)}).call(undefined)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/stomp.js/lib/stomp.js","/lib/stomp.js/lib")},{_process:131,buffer:121,timers:152}],105:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=_("../logging.js"),d=m(_("../EventSupport.js")),p=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(_("../streamer-events.js")),h=m(_("../http.js"));function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function o(e,t,n){var r=3<arguments.length&&arguments[3]!==undefined?arguments[3]:3,i=arguments[4];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.openSocket=t,this.createTransmitter=e,this.log=(0,f.asLogger)(n),this.events=new d["default"](this),this.currentConn="",this.maxReconnectAttempts=r,this.maxReconnectsTotal=3,this.isFirstConnection=!0,this.pingUrl=i}return o.prototype.open=function(){var i=this,e={send:function(e){return i.socket.send(e)},sendCustomFrame:function(e,t,n,r){return i.socket.sendCustomFrame(e,t,n,r)}};this.isFirstConnection&&(this.on("reopen",function(e){var t=i.currentConn;i.currentConn=e.connectionId,i.events.fire("reconnect",p.event("Reconnection success",{previousConnectionId:t,currentConnectionId:i.currentConn}))}),this.transmitter=this.createTransmitter(e),this.transmitter.on("message",function(e){i.events.fire("message",e)})),this.socket=this.openSocket(function(e){return i.request=e,i.reconnect=!1,{onOpen:function(e){if("CONNECTED"===e.command){i.isConnectionUp=!0;var t=p.event("open",{connectionId:e.headers["user-name"]});i.log.info(t),i.events.fire("open",t),i.isFirstConnection||(i.maxReconnectsTotal--,i.events.fire("reopen",t)),i.currentConn=e.headers["user-name"]}},onError:function(e){i.isConnectionUp=!1,i.isServerUp(function(e,t){null!==e?(i.reconnect=!1,i.log.warn("Connection lost, Streamer Server isn't Up")):(i.reconnect=!0,i.log.warn("Connection lost, Streamer Server is Up"))})},onClose:function(){i.isConnectionUp=!1},onMessage:function(e){var t=JSON.parse(e.body);t.code!==undefined&&(401!=t.code&&403!=t.code||(i.log.info("Unable to reconnect with code: "+t.code+", reason: "+t.reason),i.reconnect=!1,i.isConnectionUp=!1)),i.transmitter.onMessage(e.body)}}},this.currentConn)},o.prototype.close=function(){if(this.socket)try{this.socket.close(),this.socket=null,this.reconnect&&this.tryReopen()}catch(e){this.events.fire("error",p.error("Error closing",{reason:e.message,cause:e,code:-3}))}},o.prototype.tryReopen=function(){var t=this;if(this.isConnectionUp||this.maxReconnectsTotal<=0)this.log.error("Connection is already open or max reconnects was reached, won't try to reconnect");else{this.isFirstConnection=!1;var n=this.maxReconnectAttempts;setTimeout(function e(){if(n<=0)return t.reconnect=!1,t.log.error("Error while reconnecting. No attempts left."),void(t.maxReconnectAttempts=0);!t.isConnectionUp&&t.reconnect&&(t.log.info("Attempting reconnect. Attempts left: "+n),t.reopen(n),n--,setTimeout(e,500))},500)}},o.prototype.reopen=function(e){try{this.open()}catch(t){this.log.warn("There was an error while reopening attempt #"+e),this.events.fire("error",t)}},o.prototype.send=function(e){try{this.transmitter.send(e)}catch(t){this.events.fire("error",p.error("Error sending message",{reason:t.message,cause:t,code:-4}))}},o.prototype.sendCustomFrame=function(e,t,n,r){try{this.transmitter.sendCustomFrame(e,t,n,r)}catch(i){this.events.fire("error",p.error("Error sending custom frame message",{reason:i.message,cause:i,code:-4}))}},o.prototype.isReconnect=function(){return this.request["x-Stream-isReconnect"]},o.prototype.setReconnect=function(e){this.reconnect=e},o.prototype.setServer=function(e){this.request["X-Stream-Instance"]=e},o.prototype.isClosed=function(){return null==this.socket},o.prototype.isServerUp=function(t){(0,h["default"])({url:this.pingUrl,success:function(e){return t(null,e)},type:"GET",failure:t})},o.prototype.setConnectionUp=function(e){this.isConnectionUp=e},o.prototype.on=function(e,t){return this.events.on(e,t)},o}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/stomp/StompConnection.js","/lib/stomp")},{"../EventSupport.js":2,"../http.js":14,"../logging.js":16,"../streamer-events.js":109,_process:131,buffer:121,timers:152}],106:[function(T,e,b){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";b.__esModule=!0,T("../polyfills.js");var f=T("../streamer-api.js"),d=T("../streamer-utils.js"),p=T("../logging.js"),O=T("../utils.js"),h=_(T("../UShortId.js")),m=_(T("../EventSupport.js")),E=T("../formatting.js"),w=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(T("../streamer-events.js"));function _(e){return e&&e.__esModule?e:{"default":e}}var g=function(){function i(e,t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.events=new m["default"],this.streamingService=e,this.format=t,this.log=(0,p.asLogger)(n),this.conn=e.createStompConnection(),this.conn.on("message",function(e){r._handlejsonmsg(e)}).on("close",function(e){r.doClose(e)}).on("error",function(e){r.pendingConnection&&r.pendingConnection(e),r.events.fire("error",e)}).on("reconnect",function(e){r.reconnectSuccess(e)}),this.requestid=new h["default"],this.pendingsubscriptions={},this.pendingUnsubscriptions={},this.pendingExchangeSubscriptions={},this.pendingExchangeUnsubscriptions={},this.pendingNewsSubscriptions={},this.pendingNewsUnsubscriptions={},this.pendingAlertSubscription={},this.pendingTradeSubscription={},this.pendingTradeUnsubscription={},this.pendingSCFMessages={},this.pendingCorpEventSubscription={},this.on("error",function(e){r.log.warn(e)})}return i.prototype.openStomp=function(e){try{this.pendingConnection=e,this.conn.open()}catch(t){e&&e(t)}},i.prototype.reconnectSuccess=function(e){this.events.fire("reconnectSuccess",e),this.log.info("Successful reconnection. Previous Id: "+e.previousConnectionId+" Current Id = "+e.currentConnectionId)},i.prototype.on=function(e,t){return this.events.on(e,t)},i.prototype.SCFSendMessage=function(e,t,n,r,i){var o=i||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={ids:[],callback:o},u=this.requestid.next(),l=void 0;if(r&&""!==r){try{l=JSON.parse(r)}catch(c){return this.log.info("Error parsing message content: "+c.message),void o(null,null)}a.dataTypes=l["@T"],a.action=l.action,l.id=u}a.ids.push(u),this.pendingSCFMessages[u]=a,this.sendCustomFrame(e,t,n,l)},i.prototype.subscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{subscribed:[],rejected:[],unentitled:[],invalidSymbols:[],messageFilters:[]}};0!==e.length&&0!==t.length?this._prepareSubscriptionRequests(e,u,f.messages.control.Action.SUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingsubscriptions[t]=u,e.id=t,i.send(e)}):s(null,u.result)},i.prototype.subscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.SUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeSubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.subscribeNews=function(e,t,n){var r=t&&"function"!=typeof t?t:null,i=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var o=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",o),void(i&&i(o))}var s={callback:i,mimetype:this.format,id:[],result:{newsFilters:[],rejectedNewsFilters:[],unentitledNewsFilters:[]}};0===e.length&&i(null,s.result);var a=this.buildNewsSubscribeRequest(e,s,f.messages.control.Action.SUBSCRIBE,r),u=this.requestid.next();this.pendingNewsSubscriptions[u]=s,a.id=u,this.send(a)},i.prototype.subscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.SUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.subUnsubAlerts=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{operation:""}},s=this.buildAlertsSubUnsubRequest(e,o),a=this.requestid.next();o.id.push(a),this.pendingAlertSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.subscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.SUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeSubscription[a]=o,s.id=a,this.send(s)}},i.prototype.getSessionStats=function(){if(this.isClosed()){var e=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",e)}else{var t=new f.messages.control.StatsMessage;this.send(t)}},i.prototype.cmdFilterNews=function(e){var t=e||(optsOrCallback&&"function"==typeof optsOrCallback?optsOrCallback:null);if(this.isClosed()){var n=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(t&&t(n))}var r={callback:t,mimetype:this.format},i=this.buildNewsCommandRequest(r,"NEWSCMDFILTER");this.send(i)},i.prototype.unsubscribe=function(e,t,n,r){var i=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=n&&"function"!=typeof n?n:null,s=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(s&&s(a))}var u={ids:[],types:t,mimetype:this.format,callback:s,result:{unsubscribed:[]}};0!==e.length&&0!==t.length||s&&s(null,u.result),this._prepareSubscriptionRequests(e,u,f.messages.control.Action.UNSUBSCRIBE,o).forEach(function(e){var t=i.requestid.next();u.ids.push(t),i.pendingUnsubscriptions[t]=u,e.id=t,i.send(e)})},i.prototype.unsubscribeExchange=function(e,t,n){var r=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()});var i=t&&"function"!=typeof t?t:null,o=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",s),void(o&&o(s))}var a={callback:o,mimetype:this.format,id:[],result:{subscribed:[],rejected:[]}};0===e.length&&o(null,a.result),this.prepareExchangeSubscriptionRequest(e,a,f.messages.control.Action.UNSUBSCRIBE,i).forEach(function(e){var t=r.requestid.next();a.id.push(t),a.exchange=e.exchange,a.conflation=e.conflation,r.pendingExchangeUnsubscriptions[t]=a,e.id=t,r.send(e)})},i.prototype.unsubscribeNews=function(e,t,n){e=Array.isArray(e)?e:[e];var r=t&&"function"!=typeof t?t:null,i=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var o=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",o),void(i&&i(o))}var s={callback:i,mimetype:this.format,id:[],result:{unsubscribed:[]}};0===e.length&&i&&i(null,s.result);var a=this.buildNewsSubscribeRequest(e,s,f.messages.control.Action.UNSUBSCRIBE,r),u=this.requestid.next();s.id.push(u),this.pendingNewsUnsubscriptions[u]=s,a.id=u,this.send(a)},i.prototype.unsubscribeCorpEvents=function(e,t,n,r,i){e&&(e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()})),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var o=i||(r&&"function"==typeof r?r:null);if(this.isClosed()){var s=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",s)}else{var a={id:[],symbols:e,corpEventTypes:t,allCorpEvents:n,mimeType:this.format,callback:o,result:{subscribed:[],unsubscribed:[],invalid:[]}};0===t.length&&o(null,a.result);var u=this.buildCorpEventRequest(e,a,f.messages.control.Action.UNSUBSCRIBE),l=this.requestid.next();a.id.push(l),this.pendingCorpEventSubscription[l]=a,u.id=l,this.send(u)}},i.prototype.unsubscribeTrade=function(e,t,n){var r=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var i=w.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});this.events.fire("error",i)}else{var o={id:[],mimetype:this.format,callback:r,result:{notificationType:""}},s=this.buildTradeSubscribeRequest(e,o,f.messages.control.Action.UNSUBSCRIBE),a=this.requestid.next();o.id.push(a),this.pendingTradeUnsubscription[a]=o,s.id=a,this.send(s)}},i.prototype._handlejsonmsg=function(e){(0,d.iscontrolmessage)(e)&&e.__id in this.pendingSCFMessages?this.SCFHandlectrlmsg(e):(0,d.iscontrolmessage)(e)?this.handlectrlmsg(e):(0,d.isdatamessage)(e)?this._handledatamsg(e):this.events.fire("error",e)},i.prototype._prepareSubscriptionRequests=function(e,t,n,r){for(var i=0,o=-1,s=e.length,a=t.types.includes("ORDERBOOK"),u=[],l=0;l<s;l++)((i=this._getUpdatedNumberOfEntitlements(t.types.length,i,e[l],a))>=this.maxEntitlementsPerSubscription||l===s-1)&&(u.push(this._buildRequest(e.slice(o+1,l+1),t,n,r)),o=l,i=0);return u},i.prototype._buildRequest=function(e,t,n,r){var i=new f.messages.control.SubscribeMessage;return i.action=n,i.symbols=e,i.types=t.types,i.mimetype=t.mimetype,r&&r.skipHeavyInitialLoad&&(i.skipHeavyInitialLoad=!0),r&&(i.conflation=r.conflation,i.intervalPeriod=r.intervalPeriod),i},i.prototype.prepareExchangeSubscriptionRequest=function(e,t,n,r){for(var i=[],o=e.length,s=0;s<o;s++)i.push(this.buildExchangeRequest(e[s],t,n,r));return i},i.prototype.buildExchangeRequest=function(e,t,n,r){var i=new f.messages.control.ExchangeSubscribeMessage;return i.action=n,i.exchange=e,i.mimetype=t.mimetype,r&&(i.conflation=r.conflation),i},i.prototype.buildNewsSubscribeRequest=function(e,t,n,r){var i=new f.messages.control.NewsSubscribeMessage;return i.action=n,i.newsFilters=e,i.mimetype=t.mimetype,r&&r.skipHeavyInitialLoad&&(i.skipHeavyInitialLoad=r.skipHeavyInitialLoad),i},i.prototype.buildCorpEventRequest=function(e,t,n){var r=new f.messages.control.CorpEventSubscribeMessage;return r.symbols=e,r.action=n,r.corpEventTypes=t.corpEventTypes,r.allCorpEvents=t.allCorpEvents,r.mimeType=t.mimeType,r},i.prototype.buildAlertsSubUnsubRequest=function(e,t){var n=new f.messages.control.AlertsSubUnsubMessage;return n.operation=e,n.mimetype=t.mimetype,n},i.prototype.buildTradeSubscribeRequest=function(e,t,n){var r=new f.messages.control.TradeSubscribeMessage;return r.action=n,r.notificationType=e,r.mimetype=t.mimetype,r},i.prototype.buildNewsCommandRequest=function(e,t){var n=new f.messages.control.NewsCommandMessage;return n.newsAction=t,n.mimetype=e.mimetype,n},i.prototype._getUpdatedNumberOfEntitlements=function(e,t,n,r){var i=t;return r&&n.endsWith(":CC")?i+=14*e:i+=e,i},i.prototype.handlectrlmsg=function(e){switch(this.log.debug(E.msgfmt.fmt(e)),(0,d.messagetype)(e)){case f.messages.MessageTypeNames.ctrl.HEARTBEAT:this.onHeartbeat(e);break;case f.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE:this.onSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_RESPONSE:this.onExchangeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_SUBSCRIBE_RESPONSE:this.onNewsSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE:this.onAlertsSubUnsubResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE:this.onTradeSubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE:this.onUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE:this.onExchangeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_UNSUBSCRIBE_RESPONSE:this.onNewsUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.NEWS_CMD_FILTER_RESPONSE:this.onNewsCmdFilterResponse(e);break;case f.messages.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE:this.onCorpEventResponse(e);break;case f.messages.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE:this.onTradeUnsubscribeResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE:this.onConnectResponse(e);break;case f.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE:this.onConnectionClose(e);break;case f.messages.MessageTypeNames.ctrl.SLOW_CONNECTION:this.onSlowConnection(e);break;case f.messages.MessageTypeNames.ctrl.STATS_RESPONSE:this.onStatsResponse(e);break;case f.messages.MessageTypeNames.ctrl.INITIAL_DATA_SENT:this.onInitialDataSent(e);break;case f.messages.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE:this.onResubscribeMessage(e);break;case f.messages.MessageTypeNames.ctrl.OPEN_FLOW:this.onOpenFlow(e);break;case f.messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE:this.onReconnectMessage(e);break;case f.messages.MessageTypeNames.ctrl.MISSED_DATA_SENT:this.onMissedDataSent(e)}},i.prototype.SCFHandlectrlmsg=function(e){this.log.debug(E.msgfmt.fmt(e));var t=this.pendingSCFMessages[e.__id],n=t.callback;if((0,O.removeFromArray)(t.ids,e.__id),delete this.pendingSCFMessages[e.__id],200!=e.code){var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.ids.length&&n&&n(null,t)},i.prototype.onHeartbeat=function(e){},i.prototype.onSubscribeResponse=function(e){var t=this.pendingsubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.ids,e.__id),delete this.pendingsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;if(e.entitlements){var o=e.entitlements,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u,c=l,f=c.symbol,d=c.marketdatatype,p=c.entitlement;l={symbol:f,type:d},"NA"!==p?(this.log.debug("SUBSCRIBED <"+f+", "+d+">"),l.entitlement=p,i.subscribed.push(l)):(this.log.warn("NOT ENTITLED <"+f+","+d+">"),i.unentitled.push(l))}}if(e.rejectedSymbols){var h=e.rejectedSymbols,m=Array.isArray(h),E=0;for(h=m?h:h[Symbol.iterator]();;){var _;if(m){if(E>=h.length)break;_=h[E++]}else{if((E=h.next()).done)break;_=E.value}f=_;this.log.warn("REJECTED "+f),i.rejected.push(f)}}if(e.invalidSymbols){var g=e.invalidSymbols,T=Array.isArray(g),b=0;for(g=T?g:g[Symbol.iterator]();;){var y,S;if(T){if(b>=g.length)break;S=g[b++]}else{if((b=g.next()).done)break;S=b.value}var v=S;this.log.warn("INVALID SYMBOL "+v),(y=i.invalidSymbols).push.apply(y,e.invalidSymbols)}}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeSubscribeResponse=function(e){var t=this.pendingExchangeSubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingExchangeSubscriptions[e.__id],200!=e.code){var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onNewsSubscribeResponse=function(e){var t=this.pendingNewsSubscriptions[e.__id],n=t.callback;(0,O.removeFromArray)(t.id,e.__id),delete this.pendingNewsSubscriptions[e.__id];var r=t.result;if(200!=e.code){var i=w.error("Error subscribing to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.newsFilters.push(l)}}if(e.rejectedNewsFilters){var c=e.rejectedNewsFilters,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.rejectedNewsFilters.push(h)}}if(e.unentitledNewsFilters){var m=e.unentitledNewsFilters,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.unentitledNewsFilters.push(T)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onCorpEventResponse=function(e){var t=this.pendingCorpEventSubscription[e.__id],n=t.callback;(0,O.removeFromArray)(t.id,e.__id),delete this.pendingCorpEventSubscription[e.__id];var r=t.result;if(200!=e.code){var i=w.error("Error subscribing to Corporate Events",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.subscribed){var o=e.subscribed,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.subscribed.push(l)}}if(e.unsubscribed){var c=e.unsubscribed,f=Array.isArray(c),d=0;for(c=f?c:c[Symbol.iterator]();;){var p;if(f){if(d>=c.length)break;p=c[d++]}else{if((d=c.next()).done)break;p=d.value}var h=p;r.unsubscribed.push(h)}}if(e.invalid){var m=e.invalid,E=Array.isArray(m),_=0;for(m=E?m:m[Symbol.iterator]();;){var g;if(E){if(_>=m.length)break;g=m[_++]}else{if((_=m.next()).done)break;g=_.value}var T=g;r.invalid.push(T)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onAlertsSubUnsubResponse=function(e){var t=this.pendingAlertSubscription[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingAlertSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.operation&&(this.log.debug("Alerts "+e.operation),i.operation=e.operation),0===t.id.length&&n&&n(null,t.result)},i.prototype.onTradeSubscribeResponse=function(e){var t=this.pendingTradeSubscription[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingTradeSubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onNewsUnsubscribeResponse=function(e){var t=this.pendingNewsUnsubscriptions[e.__id],n=t.callback;(0,O.removeFromArray)(t.id,e.__id),delete this.pendingNewsUnsubscriptions[e.__id];var r=t.result;if(200!=e.code&&!t.failed){t.failed=!0;var i=w.error("Error unsubscribing to news",{code:e.code,reason:e.reason});return this.events.fire("error",i),void(n&&t.callback(i))}if(e.newsFilters){var o=e.newsFilters,s=Array.isArray(o),a=0;for(o=s?o:o[Symbol.iterator]();;){var u;if(s){if(a>=o.length)break;u=o[a++]}else{if((a=o.next()).done)break;u=a.value}var l=u;r.unsubscribed.push(l)}}0===t.id.length&&n&&n(null,t.result)},i.prototype.onTradeUnsubscribeResponse=function(e){var t=this.pendingTradeUnsubscription[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingTradeUnsubscription[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var i=t.result;e.notificationType&&(this.log.debug("Trade "+e.notificationType),i.notificationType=e.notificationType),0===t.id.length&&n&&n(null,t.result)},i.prototype.onUnsubscribeResponse=function(e){var t=this.pendingUnsubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.ids,e.__id),delete this.pendingUnsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=w.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&n(r))}for(var i=0;i<e.unsubscribed.length;++i){var o=t.result,s=e.unsubscribed[i],a=s.symbol,u=s.marketdatatype;this.log.debug("UNSUBSCRIBED <"+a+", "+u+">"),o.unsubscribed.push({symbol:a,type:u})}0!==t.ids.length||t.failed||n&&n(null,t.result)},i.prototype.onExchangeUnsubscribeResponse=function(e){var t=this.pendingExchangeUnsubscriptions[e.__id],n=t.callback;if((0,O.removeFromArray)(t.id,e.__id),delete this.pendingExchangeUnsubscriptions[e.__id],200!=e.code){var r=w.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}0===t.id.length&&n&&n(null,t)},i.prototype.onReconnectMessage=function(e){450===e.code&&(this.events.fire("slow","Reconnection recieved a slow code: "+e.code),this._isSlowConnection=!0,this.conn.setReconnect=!1),this.events.fire("reconnectMessage",e)},i.prototype.onConnectResponse=function(e){if(200!==e.code){var t=w.error("Connection failed",{code:e.code,reason:e.reason});return this.events.fire("error",t),this.pendingConnection&&this.pendingConnection(t),void this.doClose(t)}if(this._serverversion=e.version,this.maxEntitlementsPerSubscription=e.maxEntitlementsPerSubscription,this.isClosed()){var n=w.error("Connection was already closed",{code:-1,reason:"Already disconnected"});return this.events.fire("error",n),void(this.pendingConnection&&this.pendingConnection(n))}this.conn.setServer(e.serverInstance),this.pendingConnection&&this.pendingConnection(null,this)},i.prototype.onConnectionClose=function(e){this.doClose(w.close({reason:e.reason,code:e.code}))},i.prototype.onSlowConnection=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("slow",e)},i.prototype.onStatsResponse=function(e){if(200==e.code)this.events.fire("stats",e);else{var t=w.error("Error getting stats",{code:e.code,reason:e.reason});this.events.fire("error",t)}},i.prototype.onInitialDataSent=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("initialDataSent",e)},i.prototype.onResubscribeMessage=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("resubscribeMessage",e)},i.prototype.onMissedDataSent=function(e){this.log.debug(E.msgfmt.fmt(e)),this.events.fire("missedDataSent",e)},i.prototype.onOpenFlow=function(e){this.conn.send(e)},i.prototype._handledatamsg=function(e){this.events.fire("message",e)},i.prototype.send=function(e){this.conn&&this.conn.send(e)},i.prototype.sendCustomFrame=function(e,t,n,r){this.conn&&this.conn.sendCustomFrame(e,t,n,r)},i.prototype.doClose=function(e){if(!this.isClosed()){var t=this.conn;this.conn=null,t.close(),this.events.fire("close",e),t.isReconnect()&&(this.events=new m["default"],this.conn=t)}},i.prototype.performReconnect=function(e){if(null!=this.conn&&this.conn.isReconnect()){if(this.conn.isConnectionUp)return void this.log.warn("Connection is not closed and won't try reconnect.");this.conn.setReconnect(!0),this.conn.tryReopen(),e&&e()}else this.log.warn("Reconnect flag is set to false")},i.prototype.close=function(e){this.doClose(w.close({reason:"Manually closed",code:200})),e&&e()},i.prototype.isClosed=function(){return null==this.conn},i}();b["default"]=g}).call(this,T("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},T("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],T("timers").setImmediate,T("timers").clearImmediate,"/lib/stomp/StompStream.js","/lib/stomp")},{"../EventSupport.js":2,"../UShortId.js":9,"../formatting.js":13,"../logging.js":16,"../polyfills.js":18,"../streamer-api.js":108,"../streamer-events.js":109,"../streamer-utils.js":110,"../utils.js":115,_process:131,buffer:121,timers:152}],107:[function(v,e,O){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";O.__esModule=!0,v("../polyfills.js");var f=v("../logging.js"),p=v("../streamer-api.js"),h=v("../message.js"),d=_(v("../transmission/JsonStompTransmitter.js")),m=_(v("./StompConnection.js")),E=_(v("./StompStream.js"));function _(e){return e&&e.__esModule?e:{"default":e}}var g="/ping/v1",T="/version/v1",b="/stream/connect",y="",S=function(){function o(e,t,n,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.http=e,this.stompJs=t,this.log=(0,f.asLogger)(n),this.config=r||{},this.maxReconnectAttempts=this.config.maxReconnectAttempts,this.format=this.config.format,"application/json"===this.config.format&&(this.createTransmitter=function(e){return new d["default"](e,i.log)})}return o.prototype.openStompSocket=function(t,e){y="";var n={"X-Stream-Version":p.VERSION,"X-Stream-Lib":p.LIBRARY_NAME};this.addToHeaderParams("X-Stream-Version",p.VERSION),this.addToHeaderParams("X-Stream-Lib",p.LIBRARY_NAME);var r=this.config.conflation;null!=r&&""!==r&&(n["X-Stream-Conflation"]=r,this.addToHeaderParams("X-Stream-Conflation",r)),null!=e&&""!==e&&(n["X-Stream-Previous-Connection-Id"]=e,this.addToHeaderParams("X-Stream-Previous-Connection-Id",e));var i=this.config.intervalPeriod;null!=i&&""!==i&&(n["X-Stream-Interval-Period"]=i,this.addToHeaderParams("X-Stream-Interval-Period",i));var o=this.config.rejectExcessiveConnection;null!=o&&""!==o&&(n["X-Stream-Reject"]=o,this.addToHeaderParams("X-Stream-Reject",o)),"application/json"!==this.config.format&&this.config.format!==h.MimeTypes.QITCH||(n["X-Stream-Format"]=this.format,this.addToHeaderParams("X-Stream-Format",this.format)),"true"===this.config.updatesOnly&&(n["X-Stream-UpdatesOnly"]=!0,this.addToHeaderParams("X-Stream-UpdatesOnly",!0));var s=this.config.isReconnect;null!=s&&""!==s&&(n["x-Stream-isReconnect"]=s,this.addToHeaderParams("x-Stream-isReconnect",s));var a=this.config.alwaysReconnect;null!=a&&""!==a&&(n["x-Stream-isAlwaysReopen"]=a,this.addToHeaderParams("x-Stream-isAlwaysReopen",a)),"ALL"===this.config.isMissedData?(n["X-Stream-isReceiveAllMissedData"]=!0,this.addToHeaderParams("X-Stream-isReceiveAllMissedData",!0)):"LATEST"===this.config.isMissedData&&(n["X-Stream-isReceiveLatestMissedData"]=!0,this.addToHeaderParams("X-Stream-isReceiveLatestMissedData",!0));var u=this.config.stompWmid;null!=u&&(n.wmid=u,this.addToHeaderParams("wmid",u));var l=this.config.userSymbology;null!=l&&""!==l&&(n["X-Stream-User-Symbology"]=l,this.addToHeaderParams("X-Stream-User-Symbology",l)),Object.assign(n,this.config.credentials.getHeaders());var c=this.config.url+b+y,f=this.stompJs.Stomp.client(c),d=new p.messages.control.AuthenticationMessage;return this.config.credentials.sid!==undefined?(d.authenticationMethod="sid",d.authorization=this.config.credentials.sid):this.config.credentials.wmid!==undefined&&this.config.credentials.token!==undefined?(d.authenticationMethod="enterprise",d.wmid=this.config.credentials.wmid,d.authorization=this.config.credentials.token):this.config.credentials.wmid!==undefined?(d.authenticationMethod="wmid",d.authorization=this.config.credentials.wmid):this.config.credentials.data_token!==undefined&&(d.authenticationMethod="datatool",d.authorization=this.config.credentials.data_token),null!=this.config.conflation&&""!==this.config.conflation&&(d.conflation=this.config.conflation),null!=this.config.rejectExcessiveConnection&&""!==this.config.rejectExcessiveConnection&&(d.rejectExcessiveConnection=this.config.rejectExcessiveConnection),null!=this.config.entMax&&""!==this.config.entMax&&(d.entMax=this.config.entMax),f.connect(n,function(e){f.subscribe("/user/queue/messages",function(e){t(n).onMessage(e)}),t(n).onOpen(e),f.send("/stream/message",n,JSON.stringify(d))},function(e){t(n).onError(e)}),{send:function(e){f.send("/stream/message",n,e)},close:function(){f.disconnect(function(){t(n).onClose()})},sendCustomFrame:function(e,t,n,r){f.sendCustomFrame(e,t,n,r)}}},o.prototype.createStompConnection=function(){var n=this;return new m["default"](function(e){return n.createTransmitter(e)},function(e,t){return n.openStompSocket(e,t)},this.log,this.maxReconnectAttempts,this.config.host+g)},o.prototype.openStompStream=function(e){new E["default"](this,this.format,this.log).openStomp(e)},o.prototype.ping=function(t){this.http({url:this.config.host+g,success:function(e){return t(null,e)},type:"GET",failure:t})},o.prototype.getVersion=function(t){this.http({url:this.config.host+T,success:function(e){return t(null,e)},type:"GET",failure:t})},o.prototype.addToHeaderParams=function(e,t){y=""===y?y+"?"+e+"="+t:y+"&"+e+"="+t},o}();O["default"]=S}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/stomp/StompStreamingService.js","/lib/stomp")},{"../logging.js":16,"../message.js":17,"../polyfills.js":18,"../streamer-api.js":108,"../transmission/JsonStompTransmitter.js":111,"./StompConnection.js":105,"./StompStream.js":106,_process:131,buffer:121,timers:152}],108:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;d.LIBRARY_NAME="JavaScript",d.VERSION="2.60.0";var f=d.messages={};f.control={},f.market={},f.JSON_TYPE_PROPERTY="@T",f.MessageTypeNames={ctrl:{HEARTBEAT:"C1",SUBSCRIBE:"C2",SUBSCRIBE_RESPONSE:"C3",UNSUBSCRIBE_RESPONSE:"C4",CONNECT_RESPONSE:"C5",CONNECTION_CLOSE:"C6",FLOW:"C7",SLOW_CONNECTION:"C8",INITIAL_DATA_SENT:"C9",RESUBSCRIBE_MESSAGE:"C10",STATS:"C12",STATS_RESPONSE:"C13",EXCHANGE_SUBSCRIBE:"C14",EXCHANGE_RESPONSE:"C15",EXCHANGE_UNSUBSCRIBE_RESPONSE:"C16",NEWS_SUBSCRIBE:"C17",NEWS_FLT_ADD_RESPONSE:"C18",ALERTS_SUBUNSUB:"C19",ALERTS_SUBUNSUB_RESPONSE:"C20",TRADE_SUBSCRIBE:"C21",TRADE_SUBSCRIBE_RESPONSE:"C22",NEWS_FLT_DELETE_RESPONSE:"C23",NEWS_COMMAND:"C24",NEWS_FLT_GET_RESPONSE:"C26",AUTHENTICATION:"C27",OPEN_FLOW:"C28",RECONNECT_RESPONSE:"C29",TRADE_UNSUBSCRIBE_RESPONSE:"C30",MISSED_DATA_SENT:"C31",CORP_EVENT_MESSAGE:"C33",CORP_EVENT_RESPONSE:"C34",NEWS_FLT_MOCK_BASIC_RESPONSE:"C35",NEWS_FLT_UPDATE_RESPONSE:"C36",NEWS_FILTER_MESSAGE:"C37",NEWS_ERROR_MESSAGE:"C38",NEWS_SUCCESS_MESSAGE:"C39",AUTH_TOKEN:"C41",AUTH_TOKEN_RESPONSE:"C42"},data:{QUOTE:"D1",PRICEDATA:"D2",TRADE:"D3",BOOKORDER:"D4",BOOKDELETE:"D5",PURGEBOOK:"D6",MMQUOTE:"D7",INTERVAL:"D8",NETHOUSEPOSITION:"D9",SYMBOLINFO:"D10",SYMBOLSTATUS:"D11",DERIVATIVEINFO:"D12",LASTSALE:"D13",LIMITUPLIMITDOWN:"D14",IVGREEKS:"D15",IMBALANCESTATUS:"D16",ALERT:"D17",NEWS:"D18",TRADENOTIFICATION:"D19",DIVIDEND:"D22",EARNINGS:"D23",SPLIT:"D24",SYMBOLCHANGED:"D25",PRICELEVEL:"D26",MMPRICELEVEL:"D27",ORDEREXECUTED:"D28"}},f.Message=function(){},f.Message.prototype.init=function(e){this[f.JSON_TYPE_PROPERTY]=e},f.control.CtrlMessage=function(){},f.control.CtrlMessage.prototype=new f.Message,f.control.Heartbeat=function(){this.init(f.MessageTypeNames.ctrl.HEARTBEAT),this.timestamp=null},f.control.Heartbeat.prototype=new f.control.CtrlMessage,f.control.StatsMessage=function(){this.init(f.MessageTypeNames.ctrl.STATS)},f.control.StatsMessage.prototype=new f.control.CtrlMessage,f.control.SubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.SUBSCRIBE),this.action=null,this.symbols=[],this.types=[],this.mimetype=null,this.conflation=null},f.control.SubscribeMessage.prototype=new f.control.CtrlMessage,f.control.ExchangeSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.EXCHANGE_SUBSCRIBE),this.action=null,this.exchange=null,this.mimetype=null,this.conflation=null},f.control.ExchangeSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.NewsSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.NEWS_SUBSCRIBE),this.newsAction=null,this.newsFilters=null,this.filtersId=null,this.mimetype=null},f.control.NewsSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.NewsCommandMessage=function(){this.init(f.MessageTypeNames.ctrl.NEWS_COMMAND),this.newsAction=null,this.mimetype=null},f.control.NewsCommandMessage.prototype=new f.control.CtrlMessage,f.control.CorpEventSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.CORP_EVENT_MESSAGE),this.action=null,this.symbols=[],this.corpEventTypes=[],this.allCorpEvents=null,this.mimeType=null},f.control.CorpEventSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.AlertsSubUnsubMessage=function(){this.init(f.MessageTypeNames.ctrl.ALERTS_SUBUNSUB),this.operation=null,this.mimetype=null},f.control.AlertsSubUnsubMessage.prototype=new f.control.CtrlMessage,f.control.TradeSubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.TRADE_SUBSCRIBE),this.action=null,this.notificationType=null,this.mimetype=null},f.control.TradeSubscribeMessage.prototype=new f.control.CtrlMessage,f.control.AuthTokenMessage=function(){this.init(f.MessageTypeNames.ctrl.AUTH_TOKEN),this.authMethod=null,this.authParams=null,this.mimetype=null},f.control.AuthTokenMessage.prototype=new f.control.CtrlMessage,f.control.BaseResponse=function(){this.code=null,this.reason=null},f.control.BaseResponse.prototype=new f.control.CtrlMessage,f.control.SubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE),this.entitlements=null,this.invalidsymbols=null,this.rejectedsymbols=null,this.messagefilters=null},f.control.SubscribeResponse.prototype=new f.control.BaseResponse,f.control.ExchangeSubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.EXCHANGE_RESPONSE)},f.control.ExchangeSubscribeResponse.prototype=new f.control.BaseResponse,f.control.AlertSubUnsubResponse=function(){this.init(f.MessageTypeNames.ctrl.ALERTS_SUBUNSUB_RESPONSE)},f.control.AlertSubUnsubResponse.prototype=new f.control.BaseResponse,f.control.TradeSubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE)},f.control.TradeSubscribeResponse.prototype=new f.control.BaseResponse,f.control.UnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE),this.unsubscribed=null},f.control.UnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.ExchangeUnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE)},f.control.ExchangeUnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.NewsUnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.NEWS_UNSUBSCRIBE_RESPONSE),this.unsubscribed=null},f.control.NewsUnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.CorporateEventResponse=function(){this.init(f.MessageTypeNames.ctrl.CORP_EVENT_RESPONSE),this.subscribed=[],this.unsubscribed=[],this.invalid=[]},f.control.CorporateEventResponse.prototype=new f.control.BaseResponse,f.control.TradeUnsubscribeResponse=function(){this.init(f.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE)},f.control.TradeUnsubscribeResponse.prototype=new f.control.BaseResponse,f.control.StreamEntitlement=function(){this.symbol=null,this.marketdatatype=null,this.entitlement=null},f.control.ConnectResponse=function(){this.init(f.MessageTypeNames.ctrl.CONNECT_RESPONSE),this.version=null,this.flowControlCheckInterval=null,this.serverInstance=null,this.conflationMs=null},f.control.ConnectResponse.prototype=new f.control.BaseResponse,f.control.ReconnectResponse=function(){undefined.init(f.MessageTypeNames.ctrl.RECONNECT_RESPONSE),undefined.version=null,undefined.flowControlCheckInterval=null,undefined.serverInstance=null,undefined.conflationMs=null,undefined.previousSubscriptions=null},f.control.ConnectionClose=function(){this.init(f.MessageTypeNames.ctrl.CONNECTION_CLOSE),this.code=null,this.reason=null},f.control.ConnectionClose.prototype=new f.control.CtrlMessage,f.control.SlowConnection=function(){this.init(f.MessageTypeNames.ctrl.SLOW_CONNECTION),this.timesExceeded=null,this.maxExceed=null,this.currentDelta=null,this.sendingRate=null},f.control.SlowConnection.prototype=new f.control.CtrlMessage,f.control.FlowMessage=function(){this.init(f.MessageTypeNames.ctrl.FLOW),this.sequence=null},f.control.FlowMessage.prototype=new f.control.CtrlMessage,f.control.AuthenticationMessage=function(){this.init(f.MessageTypeNames.ctrl.AUTHENTICATION),this.authenticationMethod=null,this.wmid=null,this.authorization=null,this.conflation=150,this.rejectExcessiveConnection=!1,this.entMax=null},f.control.AuthenticationMessage.prototype=new f.control.CtrlMessage,f.control.StatsResponse=function(){this.init(f.MessageTypeNames.ctrl.STATS_RESPONSE),this.numberOfSubscribedSymbolsL1=null,this.numberOfAvailableSymbolsL1=null,this.numberOfSubscribedSymbolsL2=null,this.numberOfAvailableSymbolsL2=null,this.numberOfOpenedConnections=null,this.numberOfAvailableConnections=null,this.numberOfSubscribedExchanges=null,this.numberOfSubscribedTrades=null},f.control.StatsResponse.prototype=new f.control.BaseResponse,f.control.InitialDataSent=function(){this.init(f.MessageTypeNames.ctrl.INITIAL_DATA_SENT),this.timestamp=null},f.control.InitialDataSent.prototype=new f.control.CtrlMessage,f.control.ResubscribeMessage=function(){this.init(f.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE),this.timestamp=null},f.control.ResubscribeMessage.prototype=new f.control.CtrlMessage,f.control.MissedDataSent=function(){this.init(f.MessageTypeNames.ctrl.MISSED_DATA_SENT),this.timestamp=null},f.control.MissedDataSent.prototype=new f.control.CtrlMessage,f.control.StreamEntitlementType={RT:"Realtime",RTO:"Realtime CBOE ONE",RTN:"Realtime NASDAQ",RTB:"Realtime BATS",DL:"Delayed",DLO:"Delayed CBOE One",DLN:"Delayed NASDAQ",LCQ:"Low Cost QM",NA:"Not Entitled"},f.control.Action={SUBSCRIBE:"SUBSCRIBE",UNSUBSCRIBE:"UNSUBSCRIBE"},f.control.NewsAction={NEWS_FLT_ADD:"NEWS_FLT_ADD",NEWS_FLT_DELETE:"NEWS_FLT_DELETE",NEWS_FLT_UPDATE:"NEWS_FLT_UPDATE",NEWS_FLT_GET:"NEWS_FLT_GET",NEWS_FLT_MOCK_BASIC:"NEWS_FLT_MOCK_BASIC"},f.control.Association={AND:"AND",OR:"OR",NOT:"NOT"},f.control.MarketdataType={QUOTE:"QUOTE",PRICEDATA:"PRICEDATA",TRADE:"TRADE",MMQUOTE:"MMQUOTE",ORDERBOOK:"ORDERBOOK",INTERVAL:"INTERVAL",NETHOUSEPOSITION:"NETHOUSEPOSITION",LASTSALE:"LASTSALE",BOOKORDER:"BOOKORDER",BOOKDELETE:"BOOKDELETE",PRICELEVEL:"PRICELEVEL",MMPRICELEVEL:"MMPRICELEVEL",PURGEBOOK:"PURGEBOOK",LIMITUPLIMITDOWN:"LIMITUPLIMITDOWN",IVGREEKS:"IVGREEKS",IMBALANCESTATUS:"IMBALANCESTATUS"},f.market.SubscriptionTypes={QUOTE:"QUOTE",PRICEDATA:"PRICEDATA",TRADE:"TRADE",MMQUOTE:"MMQUOTE",ORDERBOOK:"ORDERBOOK",INTERVAL:"INTERVAL",NETHOUSEPOSITION:"NETHOUSEPOSITION",LASTSALE:"LASTSALE",LIMITUPLIMITDOWN:"LIMITUPLIMITDOWN",IVGREEKS:"IVGREEKS",IMBALANCESTATUS:"IMBALANCESTATUS",ORDEREXECUTED:"ORDEREXECUTED"},f.market.CorporateEventTypes={DIVIDEND:"DIVIDEND",SPLIT:"SPLIT",EARNINGS:"EARNINGS",SYMBOLCHANGED:"SYMBOLCHANGED"},f.market.MarketDataResponseTypes={QUOTE:"QUOTE",PRICEDATA:"PRICEDATA",TRADE:"TRADE",INTERVAL:"INTERVAL",NETHOUSEPOSITION:"NETHOUSEPOSITION",MMQUOTE:"MMQUOTE",PRICELEVEL:"PRICELEVEL",MMPRICELEVEL:"MMPRICELEVEL",BOOKORDER:"BOOKORDER",PURGEBOOK:"PURGEBOOK",BOOKDELETE:"BOOKDELETE",SYMBOLINFO:"SYMBOLINFO",SYMBOLSTATUS:"SYMBOLSTATUS",DERIVATIVEINFO:"DERIVATIVEINFO",LASTSALE:"LASTSALE",LIMITUPLIMITDOWN:"LIMITUPLIMITDOWN",IVGREEKS:"IVGREEKS",IMBALANCESTATUS:"IMBALANCESTATUS",ALERT:"ALERT",NEWS:"NEWS",TRADENOTIFICATION:"TRADENOTIFICATION",NEWSERROR:"NEWSERROR",DIVIDEND:"DIVIDEND",ORDEREXECUTED:"ORDEREXECUTED"},f.control.ResponseCodes={OK_CODE:200,OK_REASON:"OK",BADREQUEST_CODE:400,BADREQUEST_REASON:"Bad Request",UNAUTHORIZED_CODE:401,UNAUTHORIZED_REASON:"Unauthorized",TOOSLOW_CODE:450,TOOSLOW_REASON:"Too slow",DATA_SOURCE_RESET:454,DATA_SOURCE_RESET_REASON:"Data Source Was Reset",CONNECTION_LIMIT_EXCEEDED_CODE:452,CONNECTION_LIMIT_EXCEEDED_REASON:"Connection Limit Exceeded",INTERNALSERVERERROR_CODE:500,INTERNALSERVERERROR_REASON:"Internal Server Error"},f.market.DataMessage=function(){this.messageType=null},f.market.DataMessage.prototype=new f.Message,f.market.Quote=function(){this.init(f.MessageTypeNames.data.QUOTE)},f.market.Quote.prototype=new f.market.DataMessage,f.market.PriceData=function(){this.init(f.MessageTypeNames.data.PRICEDATA)},f.market.PriceData.prototype=new f.market.DataMessage,f.market.Trade=function(){this.init(f.MessageTypeNames.data.TRADE)},f.market.Trade.prototype=new f.market.DataMessage,f.market.MMQuote=function(){this.init(f.MessageTypeNames.data.MMQUOTE)},f.market.MMQuote.prototype=new f.market.DataMessage,f.market.PurgeBook=function(){this.init(f.MessageTypeNames.data.PURGEBOOK)},f.market.PurgeBook.prototype=new f.market.DataMessage,f.market.BookOrder=function(){this.init(f.MessageTypeNames.data.BOOKORDER)},f.market.BookOrder.prototype=new f.market.DataMessage,f.market.BookDelete=function(){this.init(f.MessageTypeNames.data.BOOKDELETE)},f.market.BookDelete.prototype=new f.market.DataMessage,f.market.PriceLevel=function(){this.init(f.MessageTypeNames.data.PRICELEVEL)},f.market.PriceLevel.prototype=new f.market.DataMessage,f.market.MMPriceLevel=function(){this.init(f.MessageTypeNames.data.MMPRICELEVEL)},f.market.MMPriceLevel.prototype=new f.market.DataMessage,f.market.Interval=function(){this.init(f.MessageTypeNames.data.INTERVAL)},f.market.Interval.prototype=new f.market.DataMessage,f.market.NethousePosition=function(){this.init(f.MessageTypeNames.data.NETHOUSEPOSITION)},f.market.NethousePosition.prototype=new f.market.DataMessage,f.market.SymbolInfo=function(){this.init(f.MessageTypeNames.data.SYMBOLINFO)},f.market.SymbolInfo.prototype=new f.market.DataMessage,f.market.SymbolStatus=function(){this.init(f.MessageTypeNames.data.SYMBOLSTATUS)},f.market.SymbolStatus.prototype=new f.market.DataMessage,f.market.DerivativeInfo=function(){this.init(f.MessageTypeNames.data.DERIVATIVEINFO)},f.market.DerivativeInfo.prototype=new f.market.DataMessage,f.market.IVGreeks=function(){this.init(f.MessageTypeNames.data.IVGREEKS)},f.market.IVGreeks.prototype=new f.market.DataMessage,f.market.LastSale=function(){this.init(f.MessageTypeNames.data.LASTSALE)},f.market.LastSale.prototype=new f.market.DataMessage,f.market.LimitUpLimitDown=function(){this.init(f.MessageTypeNames.data.LIMITUPLIMITDOWN)},f.market.LimitUpLimitDown.prototype=new f.market.DataMessage,f.market.ImbalanceStatus=function(){this.init(f.MessageTypeNames.data.IMBALANCESTATUS)},f.market.ImbalanceStatus.prototype=new f.market.DataMessage,f.market.Alert=function(){this.init(f.MessageTypeNames.data.ALERT)},f.market.Alert.prototype=new f.market.DataMessage,f.market.OrderExecuted=function(){this.init(f.MessageTypeNames.data.ORDEREXECUTED)},f.market.OrderExecuted.prototype=new f.market.DataMessage,f.market.InstrumentType={1:"CASH",2:"BOND",3:"COMPOSITE",4:"FUTURE",5:"FUTURE_OPTION",6:"FOREX",7:"INDEX",8:"MUTUAL_FUND",9:"MONEY_MARKET_FUND",10:"MARKET_STAT",11:"EQUITY",12:"EQUITY_OPTION",13:"GOVT_BOND",14:"MUNI_BOND",15:"CORP_BOND",16:"ETF",17:"FUTURE_SPREAD",97:"OPTION_ROOT",98:"UNKNOWN",99:"RATE"},f.market.OrderSide={BUYSIDE:"B",SELLSIDE:"S"},f.market.ImbalanceType={0:"NONE",1:"MARKET",2:"MOC",3:"REGULATORY_IMBALANCE",4:"OPENING_IMBALANCE",5:"CLOSING_IMBALANCE",6:"IPO_IMBALANCE",7:"HALT_IMBALANCE",8:"EQUILIBRIUM"},f.market.OrderChangeType={A:"ADD",M:"MODIFY",C:"CANCEL",E:"EXECUTE"}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/streamer-api.js","/lib")},{_process:131,buffer:121,timers:152}],109:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,p("./polyfills");var f=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Object.assign(this,e)}return t.prototype.toString=function(){var e=this.type+"{",t=!0;for(var n in this)"type"!==n&&"function"!=typeof this[n]&&(t||(e+=", "),e+=n+": "+JSON.stringify(this[n]),t=!1);return e+="}"},t}(),d=h.event=function(e,t){return new f(Object.assign({type:e},t))};h.error=function(e,t){return d("error",Object.assign({description:e},t))},h.close=function(e){return d("close",e)}}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/streamer-events.js","/lib")},{"./polyfills":18,_process:131,buffer:121,timers:152}],110:[function(p,e,h){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";h.__esModule=!0,h.getMessageName=h.entitlement=h.isvalid=h.iscontrolmessage=h.isdatamessage=h.messagetype=undefined;var f,d=p("./streamer-api.js");h.messagetype=function(e){return null===e?null:e[d.messages.JSON_TYPE_PROPERTY]},h.isdatamessage=function(e){if(null===e)return!1;var t=h.messagetype(e);return null!==t&&t.startsWith("D")},h.iscontrolmessage=function(e){if(null===e)return!1;var t=h.messagetype(e);return null!==t&&t.startsWith("C")},h.isvalid=function(e,t){var n=t.invalidSymbols;if(null==n)return!0;for(var r=0;r<n.length;r++){if(n[r]===e)return!1}return!0},h.entitlement=function(e,t,n){var r=n.entitlements;if(null!=r)for(var i=0;i<r.length;i++){var o=r[i];if(o.symbol===e&&o.marketdatatype===t)return o.entitlement}return null},h.getMessageName=(f={},function(e){var t=e[d.messages.JSON_TYPE_PROPERTY];if(!f[t]){var n=d.messages.MessageTypeNames.ctrl;for(var r in n)if(n[r]===t)return f[t]=r;var i=d.messages.MessageTypeNames.data;for(var o in i)if(i[o]===t)return f[t]=o;return f[t]=t}return f[t]})}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/streamer-utils.js","/lib")},{"./streamer-api.js":108,_process:131,buffer:121,timers:152}],111:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;var f,d=m("../EventSupport.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.socket=e,this.log=t,this.events=new p["default"](this)}return n.prototype.send=function(e,t){this.socket.send(JSON.stringify(e))},n.prototype.sendCustomFrame=function(e,t,n,r){this.socket.sendCustomFrame(e.toString(),t.toString(),JSON.parse(n),JSON.stringify(r))},n.prototype.onMessage=function(e){var t=null;try{t=JSON.parse(e)}catch(r){return void this.log.error(r)}var n=t;n.__id=n.requestId,this.events.fire("message",n)},n.prototype.on=function(e,t){return this.events.on(e,t)},n}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/transmission/JsonStompTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,_process:131,buffer:121,timers:152}],112:[function(m,e,E){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";E.__esModule=!0;m("../message.js");var f,d=m("../EventSupport.js"),p=(f=d)&&f.__esModule?f:{"default":f};var h=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.socket=e,this.log=t,this.events=new p["default"](this)}return n.prototype.send=function(e,t){this.socket.push({trackMessageLength:!0,data:JSON.stringify(e)})},n.prototype.onMessage=function(e){var t=null;try{t=JSON.parse(e)}catch(o){return void this.log.error(o)}this.events.fire("sequence",t.seq);for(var n=t.data.length,r=0;r<n;r++){var i=t.data[r];i.__id=i.requestId,this.events.fire("message",i)}},n.prototype.on=function(e,t){return this.events.on(e,t)},n}();E["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/transmission/JsonTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../message.js":17,_process:131,buffer:121,timers:152}],113:[function(S,e,v){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";v.__esModule=!0;var f=b(S("../EventSupport.js")),d=b(S("../SMessage")),p=S("../qitch/decoder/QitchDecoder"),h=b(p),m=b(S("../qitch/encoder/QitchEncoder")),E=b(S("../UShortId.js")),_=S("../message.js"),g=b(S("../qitch/LocateCodeInjector")),T=S("../utils");function b(e){return e&&e.__esModule?e:{"default":e}}var y=function(){function r(e,t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.socket=e,!(t instanceof m["default"]))throw"Wrong encoder";this.encoder=t,this.log=n,this.events=new f["default"](this),this.decoder=new h["default"](r.prototype.DEFAULT_BUFFERSIZE),this.locateCodeInjector=new g["default"]}return r.prototype.send=function(e,t){var n=new d["default"];n.sequencenumber=e.sequenceNumber,n.timestamp=(new Date).getTime(),n.id=null!=t?t:E["default"].NULL,n.encoding=_.Encodings.NONE_CHAR,n.mimetype=_.MimeTypes.QITCH_CHAR,n.payload=e;var r={trackMessageLength:!1,data:this.encoder.encode(n,0)};this.socket.push(r)},r.prototype.onMessage=function(e){var t=void 0;t=e instanceof ArrayBuffer?e:(0,T.asciiStringToArrayBuffer)(e);var n=null;try{n=this.decoder.decode(new Int8Array(t))}catch(o){return void this.log.error(o)}if(null!=n)for(var r=0;r<n.length;r++)if(n[r]instanceof p.MessageBlock)for(var i=0;i<n[r].messages.length;i++)this._processMessage(n[r].messages[i]);else this._processMessage(n[r]);else this.log.debug("Couldn't decode message. Ignoring unsupported message")},r.prototype.on=function(e,t){return this.events.on(e,t)},r.prototype._processMessage=function(e){this.locateCodeInjector.injectLocateCode(e.decodedPayload),this.events.fire("sequence",e.sequencenumber),e.decodedPayload.__id=e.id,this.events.fire("message",e.decodedPayload)},r}();y.prototype.DEFAULT_BUFFERSIZE=4096,v["default"]=y}).call(this,S("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},S("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],S("timers").setImmediate,S("timers").clearImmediate,"/lib/transmission/QitchTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../SMessage":5,"../UShortId.js":9,"../message.js":17,"../qitch/LocateCodeInjector":23,"../qitch/decoder/QitchDecoder":46,"../qitch/encoder/QitchEncoder":76,"../utils":115,_process:131,buffer:121,timers:152}],114:[function(_,e,g){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";g.__esModule=!0;var f=_("../message.js"),d=m(_("../SMessage.js")),p=m(_("../UShortId.js")),h=m(_("../EventSupport.js"));_("../formatting.js");function m(e){return e&&e.__esModule?e:{"default":e}}var E=function(){function i(e,t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.socket=e,this.encoder=t,this.decoder=n,this.log=r,this.events=new h["default"](this)}return i.prototype.send=function(e,t){var n=new d["default"];n.sequencenumber=e.sequenceNumber,n.timestamp=(new Date).getTime(),n.id=null!=t?t:p["default"].NULL,n.encoding=f.Encodings.NONE_CHAR,n.mimetype=f.MimeTypes.JSON_CHAR,n.payload=JSON.stringify(e);var r={trackMessageLength:!0,data:this.encoder.encode(n)};this.socket.push(r)},i.prototype.onMessage=function(e){var t=this.decoder.decode(e);if(this.events.fire("sequence",t.sequencenumber),t.encoding===f.Encodings.NONE_CHAR)if(t.mimetype===f.MimeTypes.JSON_CHAR){var n=null;try{n=JSON.parse(t.payload)}catch(r){return void this.log.error(r)}n.__id=t.id,this.events.fire("message",n)}else this.log.debug("Unhandled mimetype: "+t.mimeType+" - "+t.payload);else this.log.debug("Unhandled encoding: "+t.encoding+" - "+t.payload)},i.prototype.on=function(e,t){return this.events.on(e,t)},i}();g["default"]=E}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/lib/transmission/SMessageTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../SMessage.js":5,"../UShortId.js":9,"../formatting.js":13,"../message.js":17,_process:131,buffer:121,timers:152}],115:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";d.__esModule=!0;d.forEachPartition=function(e,t,n){if(e)for(var r=0;r<e.length;r+=t){n(e.slice(r,r+t))}};var f=d.indexOf=function(e,t){for(var n=e.length,r=0;r<n;++r)if(t===e[r])return r;return-1};d.removeFromArray=function(e){for(var t,n,r=arguments.length<=1?0:arguments.length-1;0<r&&e.length;){var i;for(i=1+--r,t=arguments.length<=i?undefined:arguments[i];-1!==(n=f(e,t));)e.splice(n,1)}return e},d.asciiStringToArrayBuffer=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,i=e.length;r<i;r++)n[r]=e.charCodeAt(r);return t}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/utils.js","/lib")},{_process:131,buffer:121,timers:152}],116:[function(e,f,t){(function(e,t,n,r,i,o,s,a,u,l,c){f.exports=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/array-equal/index.js","/node_modules/array-equal")},{_process:131,buffer:121,timers:152}],117:[function(e,t,T){(function(e,t,n,r,i,o,s,a,u,l,c){"use strict";T.byteLength=function(e){var t=_(e),n=t[0],r=t[1];return 3*(n+r)/4-r},T.toByteArray=function(e){for(var t,n=_(e),r=n[0],i=n[1],o=new p((l=r,c=i,3*(l+c)/4-c)),s=0,a=0<i?r-4:r,u=0;u<a;u+=4)t=d[e.charCodeAt(u)]<<18|d[e.charCodeAt(u+1)]<<12|d[e.charCodeAt(u+2)]<<6|d[e.charCodeAt(u+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=255&t;var l,c;2===i&&(t=d[e.charCodeAt(u)]<<2|d[e.charCodeAt(u+1)]>>4,o[s++]=255&t);1===i&&(t=d[e.charCodeAt(u)]<<10|d[e.charCodeAt(u+1)]<<4|d[e.charCodeAt(u+2)]>>2,o[s++]=t>>8&255,o[s++]=255&t);return o},T.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],o=0,s=n-r;o<s;o+=16383)i.push(g(e,o,s<o+16383?s:o+16383));1===r?(t=e[n-1],i.push(f[t>>2]+f[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(f[t>>10]+f[t>>4&63]+f[t<<2&63]+"="));return i.join("")};for(var f=[],d=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,E=h.length;m<E;++m)f[m]=h[m],d[h.charCodeAt(m)]=m;function _(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var r,i,o=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(f[(i=r)>>18&63]+f[i>>12&63]+f[i>>6&63]+f[63&i]);return o.join("")}d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/base64-js/index.js","/node_modules/base64-js")},{_process:131,buffer:121,timers:152}],118:[function(e,f,t){(function(e,t,n,r,i,o,s,a,u,l,c){!function(t){"use strict";
48
48
  /*
49
49
  * bignumber.js v9.0.0
50
50
  * A JavaScript library for arbitrary-precision arithmetic.
@@ -90,7 +90,7 @@ D(460,"Websocket error")};o.onclose=function(e){if(y("websocket.onclose"),clearT
90
90
  * toString |
91
91
  * valueOf |
92
92
  *
93
- */var n,M=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,D=Math.ceil,L=Math.floor,R="[BigNumber Error] ",B=R+"Number primitive has more than 15 significant digits: ",U=1e14,k=14,P=9007199254740991,H=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],G=1e7,x=1e9;function j(e){var t=0|e;return 0<e||e===t?t:t-1}function q(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=k-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function V(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,l=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return l<u^n?1:-1;for(a=(u=i.length)<(l=o.length)?u:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return u==l?0:l<u^n?1:-1}function Y(e,t,n,r){if(e<t||n<e||e!==L(e))throw Error(R+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Q(e){var t=e.c.length-1;return j(e.e/k)==t&&e.c[t]%2!=0}function K(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function X(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var g,f,d,n,l,s,a,u,c,p,r=A.prototype={constructor:A,toString:null,valueOf:null},h=new A(1),T=20,b=4,m=-7,E=21,_=-1e7,y=1e7,S=!1,i=1,v=0,O={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},w="0123456789abcdefghijklmnopqrstuvwxyz";function A(e,t){var n,r,i,o,s,a,u,l,c=this;if(!(c instanceof A))return new A(e,t);if(null==t){if(e&&!0===e._isBigNumber)return c.s=e.s,void(!e.c||e.e>y?c.c=c.e=null:e.e<_?c.c=[c.e=0]:(c.e=e.e,c.c=e.c.slice()));if((a="number"==typeof e)&&0*e==0){if(c.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,s=e;10<=s;s/=10,o++);return void(y<o?c.c=c.e=null:(c.e=o,c.c=[e]))}l=String(e)}else{if(!M.test(l=String(e)))return d(c,l,a);c.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}-1<(o=l.indexOf("."))&&(l=l.replace(".","")),0<(s=l.search(/e/i))?(o<0&&(o=s),o+=+l.slice(s+1),l=l.substring(0,s)):o<0&&(o=l.length)}else{if(Y(t,2,w.length,"Base"),10==t)return F(c=new A(e),T+c.e+1,b);if(l=String(e),a="number"==typeof e){if(0*e!=0)return d(c,l,a,t);if(c.s=1/e<0?(l=l.slice(1),-1):1,A.DEBUG&&15<l.replace(/^0\.0*|\./,"").length)throw Error(B+e)}else c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(n=w.slice(0,t),o=s=0,u=l.length;s<u;s++)if(n.indexOf(r=l.charAt(s))<0){if("."==r){if(o<s){o=u;continue}}else if(!i&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){i=!0,s=-1,o=0;continue}return d(c,String(e),a,t)}a=!1,-1<(o=(l=f(l,t,10,c.s)).indexOf("."))?l=l.replace(".",""):o=l.length}for(s=0;48===l.charCodeAt(s);s++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(s,++u)){if(u-=s,a&&A.DEBUG&&15<u&&(P<e||e!==L(e)))throw Error(B+c.s*e);if((o=o-s-1)>y)c.c=c.e=null;else if(o<_)c.c=[c.e=0];else{if(c.e=o,c.c=[],s=(o+1)%k,o<0&&(s+=k),s<u){for(s&&c.c.push(+l.slice(0,s)),u-=k;s<u;)c.c.push(+l.slice(s,s+=k));s=k-(l=l.slice(s)).length}else s-=u;for(;s--;l+="0");c.c.push(+l)}}else c.c=[c.e=0]}function o(e,t,n,r){var i,o,s,a,u;if(null==n?n=b:Y(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=q(e.c),u=1==r||2==r&&(s<=m||E<=s)?K(u,s):X(u,s,"0");else if(o=(e=F(new A(e),t,n)).e,a=(u=q(e.c)).length,1==r||2==r&&(t<=o||o<=m)){for(;a<t;u+="0",a++);u=K(u,o)}else if(t-=s,u=X(u,o,"0"),a<o+1){if(0<--t)for(u+=".";t--;u+="0");}else if(0<(t+=o-a))for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function I(e,t){for(var n,r=1,i=new A(e[0]);r<e.length;r++){if(!(n=new A(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function N(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];10<=i;i/=10,r++);return(n=r+n*k-1)>y?e.c=e.e=null:n<_?e.c=[e.e=0]:(e.e=n,e.c=t),e}function F(e,t,n,r){var i,o,s,a,u,l,c,f=e.c,d=H;if(f){e:{for(i=1,a=f[0];10<=a;a/=10,i++);if((o=t-i)<0)o+=k,s=t,c=(u=f[l=0])/d[i-s-1]%10|0;else if((l=D((o+1)/k))>=f.length){if(!r)break e;for(;f.length<=l;f.push(0));u=c=0,s=(o%=k)-k+(i=1)}else{for(u=a=f[l],i=1;10<=a;a/=10,i++);c=(s=(o%=k)-k+i)<0?0:u/d[i-s-1]%10|0}if(r=r||t<0||null!=f[l+1]||(s<0?u:u%d[i-s-1]),r=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):5<c||5==c&&(4==n||r||6==n&&(0<o?0<s?u/d[i-s]:0:f[l-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=d[(k-t%k)%k],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=l,a=1,l--):(f.length=l+1,a=d[k-o],f[l]=0<s?L(u/d[i-s]%d[s])*a:0),r)for(;;){if(0==l){for(o=1,s=f[0];10<=s;s/=10,o++);for(s=f[0]+=a,a=1;10<=s;s/=10,a++);o!=a&&(e.e++,f[0]==U&&(f[0]=1));break}if(f[l]+=a,f[l]!=U)break;f[l--]=0,a=1}for(o=f.length;0===f[--o];f.pop());}e.e>y?e.c=e.e=null:e.e<_&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return null===n?e.toString():(t=q(e.c),t=n<=m||E<=n?K(t,n):X(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(R+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Y(n=e[t],0,x,t),T=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(Y(n=e[t],0,8,t),b=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(Y(n[0],-x,0,t),Y(n[1],0,x,t),m=n[0],E=n[1]):(Y(n,-x,x,t),m=-(E=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)Y(n[0],-x,-1,t),Y(n[1],1,x,t),_=n[0],y=n[1];else{if(Y(n,-x,x,t),!n)throw Error(R+t+" cannot be zero: "+n);_=-(y=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(R+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw S=!n,Error(R+"crypto unavailable");S=n}else S=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(Y(n=e[t],0,9,t),i=n),e.hasOwnProperty(t="POW_PRECISION")&&(Y(n=e[t],0,x,t),v=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(R+t+" not an object: "+n);O=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(R+t+" invalid: "+n);w=n}}return{DECIMAL_PLACES:T,ROUNDING_MODE:b,EXPONENTIAL_AT:[m,E],RANGE:[_,y],CRYPTO:S,MODULO_MODE:i,POW_PRECISION:v,FORMAT:O,ALPHABET:w}},A.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!A.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&-x<=i&&i<=x&&i===L(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%k)<1&&(t+=k),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||U<=n||n!==L(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(R+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return I(arguments,r.lt)},A.minimum=A.min=function(){return I(arguments,r.gt)},A.random=(n=9007199254740992,l=Math.random()*n&2097151?function(){return L(Math.random()*n)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,o,s=0,a=[],u=new A(h);if(null==e?e=T:Y(e,0,x),i=D(e/k),S)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)9e15<=(o=131072*t[s]+(t[s+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(a.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw S=!1,Error(R+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)9e15<=(o=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])?crypto.randomBytes(7).copy(t,s):(a.push(o%1e14),s+=7);s=i/7}if(!S)for(;s<i;)(o=l())<9e15&&(a[s++]=o%1e14);for(i=a[--s],e%=k,i&&e&&(o=H[k-e],a[s]=L(i/o)*o);0===a[s];a.pop(),s--);if(s<0)a=[r=0];else{for(r=-1;0===a[0];a.splice(0,1),r-=k);for(s=1,o=a[0];10<=o;o/=10,s++);s<k&&(r-=k-s)}return u.e=r,u.c=a,u}),A.sum=function(){for(var e=1,t=arguments,n=new A(t[0]);e<t.length;)n=n.plus(t[e++]);return n},f=function(){var E="0123456789";function _(e,t,n,r){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(e,t,n,r,i){var o,s,a,u,l,c,f,d,p=e.indexOf("."),h=T,m=b;for(0<=p&&(u=v,v=0,e=e.replace(".",""),c=(d=new A(t)).pow(e.length-p),v=u,d.c=_(X(q(c.c),c.e,"0"),10,n,E),d.e=d.c.length),a=u=(f=_(e,t,n,i?(o=w,E):(o=E,w))).length;0==f[--u];f.pop());if(!f[0])return o.charAt(0);if(p<0?--a:(c.c=f,c.e=a,c.s=r,f=(c=g(c,d,h,m,n)).c,l=c.r,a=c.e),p=f[s=a+h+1],u=n/2,l=l||s<0||null!=f[s+1],l=m<4?(null!=p||l)&&(0==m||m==(c.s<0?3:2)):u<p||p==u&&(4==m||l||6==m&&1&f[s-1]||m==(c.s<0?8:7)),s<1||!f[0])e=l?X(o.charAt(1),-h,o.charAt(0)):o.charAt(0);else{if(f.length=s,l)for(--n;++f[--s]>n;)f[s]=0,s||(++a,f=[1].concat(f));for(u=f.length;!f[--u];);for(p=0,e="";p<=u;e+=o.charAt(f[p++]));e=X(e,a,o.charAt(0))}return e}}(),g=function(){function w(e,t,n){var r,i,o,s,a=0,u=e.length,l=t%G,c=t/G|0;for(e=e.slice();u--;)a=((i=l*(o=e[u]%G)+(r=c*o+(s=e[u]/G|0)*l)%G*G+a)/n|0)+(r/G|0)+c*s,e[u]=i%n;return a&&(e=[a].concat(e)),e}function I(e,t,n,r){var i,o;if(n!=r)o=r<n?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function N(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(e,t,n,r,i){var o,s,a,u,l,c,f,d,p,h,m,E,_,g,T,b,y,S=e.s==t.s?1:-1,v=e.c,O=t.c;if(!(v&&v[0]&&O&&O[0]))return new A(e.s&&t.s&&(v?!O||v[0]!=O[0]:O)?v&&0==v[0]||!O?0*S:S/0:NaN);for(p=(d=new A(S)).c=[],S=n+(s=e.e-t.e)+1,i||(i=U,s=j(e.e/k)-j(t.e/k),S=S/k|0),a=0;O[a]==(v[a]||0);a++);if(O[a]>(v[a]||0)&&s--,S<0)p.push(1),u=!0;else{for(g=v.length,b=O.length,S+=2,1<(l=L(i/(O[a=0]+1)))&&(O=w(O,l,i),v=w(v,l,i),b=O.length,g=v.length),_=b,m=(h=v.slice(0,b)).length;m<b;h[m++]=0);y=O.slice(),y=[0].concat(y),T=O[0],O[1]>=i/2&&T++;do{if(l=0,(o=I(O,h,b,m))<0){if(E=h[0],b!=m&&(E=E*i+(h[1]||0)),1<(l=L(E/T)))for(i<=l&&(l=i-1),f=(c=w(O,l,i)).length,m=h.length;1==I(c,h,f,m);)l--,N(c,b<f?y:O,f,i),f=c.length,o=1;else 0==l&&(o=l=1),f=(c=O.slice()).length;if(f<m&&(c=[0].concat(c)),N(h,c,m,i),m=h.length,-1==o)for(;I(O,h,b,m)<1;)l++,N(h,b<m?y:O,m,i),m=h.length}else 0===o&&(l++,h=[0]);p[a++]=l,h[0]?h[m++]=v[_]||0:(h=[v[_]],m=1)}while((_++<g||null!=h[0])&&S--);u=null!=h[0],p[0]||p.splice(0,1)}if(i==U){for(a=1,S=p[0];10<=S;S/=10,a++);F(d,n+(d.e=a+s*k-1)+1,r,u)}else d.e=s,d.r=+u;return d}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,a=/^([^.]+)\.$/,u=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g,d=function(e,t,n,r){var i,o=n?t:t.replace(p,"");if(c.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(s,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,o=o.replace(a,"$1").replace(u,"0.$1")),t!=o))return new A(o,i);if(A.DEBUG)throw Error(R+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},r.absoluteValue=r.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},r.comparedTo=function(e,t){return V(this,new A(e,t))},r.decimalPlaces=r.dp=function(e,t){var n,r,i;if(null!=e)return Y(e,0,x),null==t?t=b:Y(t,0,8),F(new A(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-j(this.e/k))*k,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},r.dividedBy=r.div=function(e,t){return g(this,new A(e,t),T,b)},r.dividedToIntegerBy=r.idiv=function(e,t){return g(this,new A(e,t),0,1)},r.exponentiatedBy=r.pow=function(e,t){var n,r,i,o,s,a,u,l,c=this;if((e=new A(e)).c&&!e.isInteger())throw Error(R+"Exponent not an integer: "+C(e));if(null!=t&&(t=new A(t)),s=14<e.e,!c.c||!c.c[0]||1==c.c[0]&&!c.e&&1==c.c.length||!e.c||!e.c[0])return l=new A(Math.pow(+C(c),s?2-Q(e):+C(e))),t?l.mod(t):l;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(r=!a&&c.isInteger()&&t.isInteger())&&(c=c.mod(t))}else{if(9<e.e&&(0<c.e||c.e<-1||(0==c.e?1<c.c[0]||s&&24e7<=c.c[1]:c.c[0]<8e13||s&&c.c[0]<=9999975e7)))return o=c.s<0&&Q(e)?-0:0,-1<c.e&&(o=1/o),new A(a?1/o:o);v&&(o=D(v/k+2))}for(s?(n=new A(.5),a&&(e.s=1),u=Q(e)):u=(i=Math.abs(+C(e)))%2,l=new A(h);;){if(u){if(!(l=l.times(c)).c)break;o?l.c.length>o&&(l.c.length=o):r&&(l=l.mod(t))}if(i){if(0===(i=L(i/2)))break;u=i%2}else if(F(e=e.times(n),e.e+1,1),14<e.e)u=Q(e);else{if(0==(i=+C(e)))break;u=i%2}c=c.times(c),o?c.c&&c.c.length>o&&(c.c.length=o):r&&(c=c.mod(t))}return r?l:(a&&(l=h.div(l)),t?l.mod(t):o?F(l,v,b,void 0):l)},r.integerValue=function(e){var t=new A(this);return null==e?e=b:Y(e,0,8),F(t,t.e+1,e)},r.isEqualTo=r.eq=function(e,t){return 0===V(this,new A(e,t))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(e,t){return 0<V(this,new A(e,t))},r.isGreaterThanOrEqualTo=r.gte=function(e,t){return 1===(t=V(this,new A(e,t)))||0===t},r.isInteger=function(){return!!this.c&&j(this.e/k)>this.c.length-2},r.isLessThan=r.lt=function(e,t){return V(this,new A(e,t))<0},r.isLessThanOrEqualTo=r.lte=function(e,t){return-1===(t=V(this,new A(e,t)))||0===t},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return 0<this.s},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(e,t){var n,r,i,o,s=this.s;if(t=(e=new A(e,t)).s,!s||!t)return new A(NaN);if(s!=t)return e.s=-t,this.plus(e);var a=this.e/k,u=e.e/k,l=this.c,c=e.c;if(!a||!u){if(!l||!c)return l?(e.s=-t,e):new A(c?this:NaN);if(!l[0]||!c[0])return c[0]?(e.s=-t,e):new A(l[0]?this:3==b?-0:0)}if(a=j(a),u=j(u),l=l.slice(),s=a-u){for((o=s<0)?(s=-s,i=l):(u=a,i=c),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(o=(s=l.length)<(t=c.length))?s:t,s=t=0;t<r;t++)if(l[t]!=c[t]){o=l[t]<c[t];break}if(o&&(i=l,l=c,c=i,e.s=-e.s),0<(t=(r=c.length)-(n=l.length)))for(;t--;l[n++]=0);for(t=U-1;s<r;){if(l[--r]<c[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=U}l[r]-=c[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?N(e,l,u):(e.s=3==b?-1:1,e.c=[e.e=0],e)},r.modulo=r.mod=function(e,t){var n,r;return e=new A(e,t),!this.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||this.c&&!this.c[0]?new A(this):(9==i?(r=e.s,e.s=1,n=g(this,e,0,3),e.s=r,n.s*=r):n=g(this,e,0,i),(e=this.minus(n.times(e))).c[0]||1!=i||(e.s=this.s),e)},r.multipliedBy=r.times=function(e,t){var n,r,i,o,s,a,u,l,c,f,d,p,h,m,E,_=this.c,g=(e=new A(e,t)).c;if(!(_&&g&&_[0]&&g[0]))return!this.s||!e.s||_&&!_[0]&&!g||g&&!g[0]&&!_?e.c=e.e=e.s=null:(e.s*=this.s,_&&g?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=j(this.e/k)+j(e.e/k),e.s*=this.s,(u=_.length)<(f=g.length)&&(h=_,_=g,g=h,i=u,u=f,f=i),i=u+f,h=[];i--;h.push(0));for(m=U,E=G,i=f;0<=--i;){for(n=0,d=g[i]%E,p=g[i]/E|0,o=i+(s=u);i<o;)n=((l=d*(l=_[--s]%E)+(a=p*l+(c=_[s]/E|0)*d)%E*E+h[o]+n)/m|0)+(a/E|0)+p*c,h[o--]=l%m;h[o]=n}return n?++r:h.splice(0,1),N(e,h,r)},r.negated=function(){var e=new A(this);return e.s=-e.s||null,e},r.plus=function(e,t){var n,r=this.s;if(t=(e=new A(e,t)).s,!r||!t)return new A(NaN);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/k,o=e.e/k,s=this.c,a=e.c;if(!i||!o){if(!s||!a)return new A(r/0);if(!s[0]||!a[0])return a[0]?e:new A(s[0]?this:0*r)}if(i=j(i),o=j(o),s=s.slice(),r=i-o){for(0<r?(o=i,n=a):(r=-r,n=s),n.reverse();r--;n.push(0));n.reverse()}for((r=s.length)-(t=a.length)<0&&(n=a,a=s,s=n,t=r),r=0;t;)r=(s[--t]=s[t]+a[t]+r)/U|0,s[t]=U===s[t]?0:s[t]%U;return r&&(s=[r].concat(s),++o),N(e,s,o)},r.precision=r.sd=function(e,t){var n,r,i;if(null!=e&&e!==!!e)return Y(e,1,x),null==t?t=b:Y(t,0,8),F(new A(this),e,t);if(!(n=this.c))return null;if(r=(i=n.length-1)*k+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];10<=i;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},r.shiftedBy=function(e){return Y(e,-P,P),this.times("1e"+e)},r.squareRoot=r.sqrt=function(){var e,t,n,r,i,o=this.c,s=this.s,a=this.e,u=T+4,l=new A("0.5");if(1!==s||!o||!o[0])return new A(!s||s<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(s=Math.sqrt(+C(this)))||s==1/0?(((t=q(o)).length+a)%2==0&&(t+="0"),s=Math.sqrt(+t),a=j((a+1)/2)-(a<0||a%2),n=new A(t=s==1/0?"1e"+a:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+a)):n=new A(s+""),n.c[0])for((s=(a=n.e)+u)<3&&(s=0);;)if(i=n,n=l.times(i.plus(g(this,i,u,1))),q(i.c).slice(0,s)===(t=q(n.c)).slice(0,s)){if(n.e<a&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(F(n,n.e+T+2,1),e=!n.times(n).eq(this));break}if(!r&&(F(i,i.e+T+2,0),i.times(i).eq(this))){n=i;break}u+=4,s+=4,r=1}return F(n,n.e+T+1,b,e)},r.toExponential=function(e,t){return null!=e&&(Y(e,0,x),e++),o(this,e,t,1)},r.toFixed=function(e,t){return null!=e&&(Y(e,0,x),e=e+this.e+1),o(this,e,t)},r.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=O;else if("object"!=typeof n)throw Error(R+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,o=r.split("."),s=+n.groupSize,a=+n.secondaryGroupSize,u=n.groupSeparator||"",l=o[0],c=o[1],f=this.s<0,d=f?l.slice(1):l,p=d.length;if(a&&(i=s,s=a,p-=a=i),0<s&&0<p){for(i=p%s||s,l=d.substr(0,i);i<p;i+=s)l+=u+d.substr(i,s);0<a&&(l+=u+d.slice(i)),f&&(l="-"+l)}r=c?l+(n.decimalSeparator||"")+((a=+n.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):c):l}return(n.prefix||"")+r+(n.suffix||"")},r.toFraction=function(e){var t,n,r,i,o,s,a,u,l,c,f,d,p=this.c;if(null!=e&&(!(a=new A(e)).isInteger()&&(a.c||1!==a.s)||a.lt(h)))throw Error(R+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+C(a));if(!p)return new A(this);for(t=new A(h),l=n=new A(h),r=u=new A(h),d=q(p),o=t.e=d.length-this.e-1,t.c[0]=H[(s=o%k)<0?k+s:s],e=!e||0<a.comparedTo(t)?0<o?t:l:a,s=y,y=1/0,a=new A(d),u.c[0]=0;c=g(a,t,0,1),1!=(i=n.plus(c.times(r))).comparedTo(e);)n=r,r=i,l=u.plus(c.times(i=l)),u=i,t=a.minus(c.times(i=t)),a=i;return i=g(e.minus(n),r,0,1),u=u.plus(i.times(l)),n=n.plus(i.times(r)),u.s=l.s=this.s,f=g(l,r,o*=2,b).minus(this).abs().comparedTo(g(u,n,o,b).minus(this).abs())<1?[l,r]:[u,n],y=s,f},r.toNumber=function(){return+C(this)},r.toPrecision=function(e,t){return null!=e&&Y(e,1,x),o(this,e,t,2)},r.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=m||E<=i?K(q(n.c),i):X(q(n.c),i,"0"):10===e?t=X(q((n=F(new A(n),T+i+1,b)).c),n.e,"0"):(Y(e,2,w.length,"Base"),t=f(X(q(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},r.valueOf=r.toJSON=function(){return C(this)},r._isBigNumber=!0,null!=t&&A.set(t),A}())["default"]=n.BigNumber=n,void 0!==f&&f.exports?f.exports=n:(t||(t="undefined"!=typeof self&&self?self:window),t.BigNumber=n)}(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/bignumber.js/bignumber.js","/node_modules/bignumber.js")},{_process:131,buffer:121,timers:152}],119:[function(e,t,n){(function(e,t,n,r,i,o,s,a,u,l,c){}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/browser-resolve/empty.js","/node_modules/browser-resolve")},{_process:131,buffer:121,timers:152}],120:[function(e,t,n){(function(e,t,n,r,i,o,s,a,u,l,c){}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/browserify/lib/_empty.js","/node_modules/browserify/lib")},{_process:131,buffer:121,timers:152}],121:[function(Y,e,Q){(function(e,t,f,n,r,i,o,s,a,u,l){"use strict";var c=Y("base64-js"),d=Y("ieee754");Q.Buffer=f,Q.SlowBuffer=function(e){+e!=e&&(e=0);return f.alloc(+e)},Q.INSPECT_MAX_BYTES=50;var p=2147483647;function h(e){if(p<e)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=f.prototype,t}function f(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return _(e)}return m(e,t,n)}function m(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return q(e)||e&&q(e.buffer)?function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=t===undefined&&n===undefined?new Uint8Array(e):n===undefined?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=f.prototype,r}(e,t,n):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|b(e,t),r=h(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t):function(e){if(f.isBuffer(e)){var t=0|T(e.length),n=h(t);return 0===n.length||e.copy(n,0,0,t),n}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||V(e.length)?h(0):g(e);if("Buffer"===e.type&&Array.isArray(e.data))return g(e.data)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.")}(e)}function E(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('"size" argument must not be negative')}function _(e){return E(e),h(e<0?0:0|T(e))}function g(e){for(var t=e.length<0?0:0|T(e.length),n=h(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function T(e){if(p<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|e}function b(e,t){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case undefined:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return x(e).length;default:if(r)return G(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(r!==undefined&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a/=s=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(a<n+u&&(n=a-u),o=n;0<=o;o--){for(var f=!0,d=0;d<u;d++)if(l(e,o+d)!==l(t,d)){f=!1;break}if(f)return o}return-1}function O(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?i<(r=Number(r))&&(r=i):r=i;var o=t.length;o/2<r&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return j(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,l=e[i],c=null,f=239<l?4:223<l?3:191<l?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&127<(u=(31&l)<<6|63&o)&&(c=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&2047<(u=(15&l)<<12|(63&o)<<6|63&s)&&(u<55296||57343<u)&&(c=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&65535<(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)&&u<1114112&&(c=u)}null===c?(c=65533,f=1):65535<c&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}(r)}Q.kMaxLength=p,(f.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{get:function(){return this instanceof f?this.buffer:undefined}}),Object.defineProperty(f.prototype,"offset",{get:function(){return this instanceof f?this.byteOffset:undefined}}),"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=function(e,t,n){return m(e,t,n)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(e,t,n){return i=t,o=n,E(r=e),r<=0?h(r):i!==undefined?"string"==typeof o?h(r).fill(i,o):h(r).fill(i):h(r);var r,i,o},f.allocUnsafe=function(e){return _(e)},f.allocUnsafeSlow=function(e){return _(e)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer},f.compare=function(e,t){if(!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var n;if(t===undefined)for(n=t=0;n<e.length;++n)t+=e[n].length;var r=f.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(ArrayBuffer.isView(o)&&(o=f.from(o)),!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},f.byteLength=b,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},f.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},f.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},f.prototype.toLocaleString=f.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?N(this,0,e):function(e,t,n){var r=!1;if((t===undefined||t<0)&&(t=0),t>this.length)return"";if((n===undefined||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return F(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",t=Q.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},f.prototype.compare=function(e,t,n,r,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(t===undefined&&(t=0),n===undefined&&(n=e?e.length:0),r===undefined&&(r=0),i===undefined&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),l=e.slice(t,n),c=0;c<a;++c)if(u[c]!==l[c]){o=u[c],s=l[c];break}return o<s?-1:s<o?1:0},f.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},f.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},f.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)},f.prototype.write=function(e,t,n,r){if(t===undefined)r="utf8",n=this.length,t=0;else if(n===undefined&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,r===undefined&&(r="utf8")):(r=n,n=undefined)}var i=this.length-t;if((n===undefined||i<n)&&(n=i),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,s,a,u,l,c,f,d,p,h=!1;;)switch(r){case"hex":return O(this,e,t,n);case"utf8":case"utf-8":return d=t,p=n,j(G(e,(f=this).length-d),f,d,p);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return u=this,l=t,c=n,j(x(e),u,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=t,a=n,j(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,(o=this).length-s),o,s,a);default:if(h)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),h=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function F(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function M(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var i="",o=t;o<n;++o)i+=H(e[o]);return i}function D(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,0,n,4),d.write(e,t,n,r,23,4),n+4}function k(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,0,n,8),d.write(e,t,n,r,52,8),n+8}f.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=t===undefined?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=f.prototype,r},f.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},f.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;0<t&&(i*=256);)r+=this[e+--t]*i;return r},f.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return(i*=128)<=r&&(r-=Math.pow(2,8*t)),r},f.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];0<r&&(i*=256);)o+=this[e+--r]*i;return(i*=128)<=o&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),d.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),d.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),d.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),d.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},f.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;0<=--i&&(o*=256);)this[t+i]=e/o&255;return t+n},f.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},f.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;0<=--o&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},f.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},f.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},f.prototype.writeDoubleLE=function(e,t,n){return k(this,e,t,!0,n)},f.prototype.writeDoubleBE=function(e,t,n){return k(this,e,t,!1,n)},f.prototype.copy=function(e,t,n,r){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0<r&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var o=i-1;0<=o;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},f.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),r!==undefined&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=n===undefined?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=f.isBuffer(e)?e:new f(e,r),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var P=/[^+/0-9A-Za-z-_]/g;function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){var n;t=t||Infinity;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if(55295<(n=e.charCodeAt(s))&&n<57344){if(!i){if(56319<n){-1<(t-=3)&&o.push(239,191,189);continue}if(s+1===r){-1<(t-=3)&&o.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(t-=3)&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(t-=3)&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function x(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function q(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function V(e){return e!=e}}).call(this,Y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],Y("timers").setImmediate,Y("timers").clearImmediate,"/node_modules/buffer/index.js","/node_modules/buffer")},{_process:131,"base64-js":117,buffer:121,ieee754:126,timers:152}],122:[function(e,f,t){(function(e,t,n,r,i,o,s,a,u,l,c){f.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/builtin-status-codes/browser.js","/node_modules/builtin-status-codes")},{_process:131,buffer:121,timers:152}],123:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){function f(e){return Object.prototype.toString.call(e)}d.isArray=
93
+ */var n,M=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,D=Math.ceil,L=Math.floor,R="[BigNumber Error] ",B=R+"Number primitive has more than 15 significant digits: ",U=1e14,k=14,P=9007199254740991,H=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],G=1e7,x=1e9;function j(e){var t=0|e;return 0<e||e===t?t:t-1}function q(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=k-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function V(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,l=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return l<u^n?1:-1;for(a=(u=i.length)<(l=o.length)?u:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return u==l?0:l<u^n?1:-1}function Y(e,t,n,r){if(e<t||n<e||e!==L(e))throw Error(R+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function K(e){var t=e.c.length-1;return j(e.e/k)==t&&e.c[t]%2!=0}function Q(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function X(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var g,f,d,n,l,s,a,u,c,p,r=A.prototype={constructor:A,toString:null,valueOf:null},h=new A(1),T=20,b=4,m=-7,E=21,_=-1e7,y=1e7,S=!1,i=1,v=0,O={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},w="0123456789abcdefghijklmnopqrstuvwxyz";function A(e,t){var n,r,i,o,s,a,u,l,c=this;if(!(c instanceof A))return new A(e,t);if(null==t){if(e&&!0===e._isBigNumber)return c.s=e.s,void(!e.c||e.e>y?c.c=c.e=null:e.e<_?c.c=[c.e=0]:(c.e=e.e,c.c=e.c.slice()));if((a="number"==typeof e)&&0*e==0){if(c.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,s=e;10<=s;s/=10,o++);return void(y<o?c.c=c.e=null:(c.e=o,c.c=[e]))}l=String(e)}else{if(!M.test(l=String(e)))return d(c,l,a);c.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}-1<(o=l.indexOf("."))&&(l=l.replace(".","")),0<(s=l.search(/e/i))?(o<0&&(o=s),o+=+l.slice(s+1),l=l.substring(0,s)):o<0&&(o=l.length)}else{if(Y(t,2,w.length,"Base"),10==t)return F(c=new A(e),T+c.e+1,b);if(l=String(e),a="number"==typeof e){if(0*e!=0)return d(c,l,a,t);if(c.s=1/e<0?(l=l.slice(1),-1):1,A.DEBUG&&15<l.replace(/^0\.0*|\./,"").length)throw Error(B+e)}else c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(n=w.slice(0,t),o=s=0,u=l.length;s<u;s++)if(n.indexOf(r=l.charAt(s))<0){if("."==r){if(o<s){o=u;continue}}else if(!i&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){i=!0,s=-1,o=0;continue}return d(c,String(e),a,t)}a=!1,-1<(o=(l=f(l,t,10,c.s)).indexOf("."))?l=l.replace(".",""):o=l.length}for(s=0;48===l.charCodeAt(s);s++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(s,++u)){if(u-=s,a&&A.DEBUG&&15<u&&(P<e||e!==L(e)))throw Error(B+c.s*e);if((o=o-s-1)>y)c.c=c.e=null;else if(o<_)c.c=[c.e=0];else{if(c.e=o,c.c=[],s=(o+1)%k,o<0&&(s+=k),s<u){for(s&&c.c.push(+l.slice(0,s)),u-=k;s<u;)c.c.push(+l.slice(s,s+=k));s=k-(l=l.slice(s)).length}else s-=u;for(;s--;l+="0");c.c.push(+l)}}else c.c=[c.e=0]}function o(e,t,n,r){var i,o,s,a,u;if(null==n?n=b:Y(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=q(e.c),u=1==r||2==r&&(s<=m||E<=s)?Q(u,s):X(u,s,"0");else if(o=(e=F(new A(e),t,n)).e,a=(u=q(e.c)).length,1==r||2==r&&(t<=o||o<=m)){for(;a<t;u+="0",a++);u=Q(u,o)}else if(t-=s,u=X(u,o,"0"),a<o+1){if(0<--t)for(u+=".";t--;u+="0");}else if(0<(t+=o-a))for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function I(e,t){for(var n,r=1,i=new A(e[0]);r<e.length;r++){if(!(n=new A(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function N(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];10<=i;i/=10,r++);return(n=r+n*k-1)>y?e.c=e.e=null:n<_?e.c=[e.e=0]:(e.e=n,e.c=t),e}function F(e,t,n,r){var i,o,s,a,u,l,c,f=e.c,d=H;if(f){e:{for(i=1,a=f[0];10<=a;a/=10,i++);if((o=t-i)<0)o+=k,s=t,c=(u=f[l=0])/d[i-s-1]%10|0;else if((l=D((o+1)/k))>=f.length){if(!r)break e;for(;f.length<=l;f.push(0));u=c=0,s=(o%=k)-k+(i=1)}else{for(u=a=f[l],i=1;10<=a;a/=10,i++);c=(s=(o%=k)-k+i)<0?0:u/d[i-s-1]%10|0}if(r=r||t<0||null!=f[l+1]||(s<0?u:u%d[i-s-1]),r=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):5<c||5==c&&(4==n||r||6==n&&(0<o?0<s?u/d[i-s]:0:f[l-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=d[(k-t%k)%k],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=l,a=1,l--):(f.length=l+1,a=d[k-o],f[l]=0<s?L(u/d[i-s]%d[s])*a:0),r)for(;;){if(0==l){for(o=1,s=f[0];10<=s;s/=10,o++);for(s=f[0]+=a,a=1;10<=s;s/=10,a++);o!=a&&(e.e++,f[0]==U&&(f[0]=1));break}if(f[l]+=a,f[l]!=U)break;f[l--]=0,a=1}for(o=f.length;0===f[--o];f.pop());}e.e>y?e.c=e.e=null:e.e<_&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return null===n?e.toString():(t=q(e.c),t=n<=m||E<=n?Q(t,n):X(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=e,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(R+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Y(n=e[t],0,x,t),T=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(Y(n=e[t],0,8,t),b=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(Y(n[0],-x,0,t),Y(n[1],0,x,t),m=n[0],E=n[1]):(Y(n,-x,x,t),m=-(E=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)Y(n[0],-x,-1,t),Y(n[1],1,x,t),_=n[0],y=n[1];else{if(Y(n,-x,x,t),!n)throw Error(R+t+" cannot be zero: "+n);_=-(y=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(R+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw S=!n,Error(R+"crypto unavailable");S=n}else S=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(Y(n=e[t],0,9,t),i=n),e.hasOwnProperty(t="POW_PRECISION")&&(Y(n=e[t],0,x,t),v=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(R+t+" not an object: "+n);O=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(R+t+" invalid: "+n);w=n}}return{DECIMAL_PLACES:T,ROUNDING_MODE:b,EXPONENTIAL_AT:[m,E],RANGE:[_,y],CRYPTO:S,MODULO_MODE:i,POW_PRECISION:v,FORMAT:O,ALPHABET:w}},A.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!A.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&-x<=i&&i<=x&&i===L(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%k)<1&&(t+=k),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||U<=n||n!==L(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(R+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return I(arguments,r.lt)},A.minimum=A.min=function(){return I(arguments,r.gt)},A.random=(n=9007199254740992,l=Math.random()*n&2097151?function(){return L(Math.random()*n)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,o,s=0,a=[],u=new A(h);if(null==e?e=T:Y(e,0,x),i=D(e/k),S)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)9e15<=(o=131072*t[s]+(t[s+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(a.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw S=!1,Error(R+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)9e15<=(o=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])?crypto.randomBytes(7).copy(t,s):(a.push(o%1e14),s+=7);s=i/7}if(!S)for(;s<i;)(o=l())<9e15&&(a[s++]=o%1e14);for(i=a[--s],e%=k,i&&e&&(o=H[k-e],a[s]=L(i/o)*o);0===a[s];a.pop(),s--);if(s<0)a=[r=0];else{for(r=-1;0===a[0];a.splice(0,1),r-=k);for(s=1,o=a[0];10<=o;o/=10,s++);s<k&&(r-=k-s)}return u.e=r,u.c=a,u}),A.sum=function(){for(var e=1,t=arguments,n=new A(t[0]);e<t.length;)n=n.plus(t[e++]);return n},f=function(){var E="0123456789";function _(e,t,n,r){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(e,t,n,r,i){var o,s,a,u,l,c,f,d,p=e.indexOf("."),h=T,m=b;for(0<=p&&(u=v,v=0,e=e.replace(".",""),c=(d=new A(t)).pow(e.length-p),v=u,d.c=_(X(q(c.c),c.e,"0"),10,n,E),d.e=d.c.length),a=u=(f=_(e,t,n,i?(o=w,E):(o=E,w))).length;0==f[--u];f.pop());if(!f[0])return o.charAt(0);if(p<0?--a:(c.c=f,c.e=a,c.s=r,f=(c=g(c,d,h,m,n)).c,l=c.r,a=c.e),p=f[s=a+h+1],u=n/2,l=l||s<0||null!=f[s+1],l=m<4?(null!=p||l)&&(0==m||m==(c.s<0?3:2)):u<p||p==u&&(4==m||l||6==m&&1&f[s-1]||m==(c.s<0?8:7)),s<1||!f[0])e=l?X(o.charAt(1),-h,o.charAt(0)):o.charAt(0);else{if(f.length=s,l)for(--n;++f[--s]>n;)f[s]=0,s||(++a,f=[1].concat(f));for(u=f.length;!f[--u];);for(p=0,e="";p<=u;e+=o.charAt(f[p++]));e=X(e,a,o.charAt(0))}return e}}(),g=function(){function w(e,t,n){var r,i,o,s,a=0,u=e.length,l=t%G,c=t/G|0;for(e=e.slice();u--;)a=((i=l*(o=e[u]%G)+(r=c*o+(s=e[u]/G|0)*l)%G*G+a)/n|0)+(r/G|0)+c*s,e[u]=i%n;return a&&(e=[a].concat(e)),e}function I(e,t,n,r){var i,o;if(n!=r)o=r<n?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function N(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(e,t,n,r,i){var o,s,a,u,l,c,f,d,p,h,m,E,_,g,T,b,y,S=e.s==t.s?1:-1,v=e.c,O=t.c;if(!(v&&v[0]&&O&&O[0]))return new A(e.s&&t.s&&(v?!O||v[0]!=O[0]:O)?v&&0==v[0]||!O?0*S:S/0:NaN);for(p=(d=new A(S)).c=[],S=n+(s=e.e-t.e)+1,i||(i=U,s=j(e.e/k)-j(t.e/k),S=S/k|0),a=0;O[a]==(v[a]||0);a++);if(O[a]>(v[a]||0)&&s--,S<0)p.push(1),u=!0;else{for(g=v.length,b=O.length,S+=2,1<(l=L(i/(O[a=0]+1)))&&(O=w(O,l,i),v=w(v,l,i),b=O.length,g=v.length),_=b,m=(h=v.slice(0,b)).length;m<b;h[m++]=0);y=O.slice(),y=[0].concat(y),T=O[0],O[1]>=i/2&&T++;do{if(l=0,(o=I(O,h,b,m))<0){if(E=h[0],b!=m&&(E=E*i+(h[1]||0)),1<(l=L(E/T)))for(i<=l&&(l=i-1),f=(c=w(O,l,i)).length,m=h.length;1==I(c,h,f,m);)l--,N(c,b<f?y:O,f,i),f=c.length,o=1;else 0==l&&(o=l=1),f=(c=O.slice()).length;if(f<m&&(c=[0].concat(c)),N(h,c,m,i),m=h.length,-1==o)for(;I(O,h,b,m)<1;)l++,N(h,b<m?y:O,m,i),m=h.length}else 0===o&&(l++,h=[0]);p[a++]=l,h[0]?h[m++]=v[_]||0:(h=[v[_]],m=1)}while((_++<g||null!=h[0])&&S--);u=null!=h[0],p[0]||p.splice(0,1)}if(i==U){for(a=1,S=p[0];10<=S;S/=10,a++);F(d,n+(d.e=a+s*k-1)+1,r,u)}else d.e=s,d.r=+u;return d}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,a=/^([^.]+)\.$/,u=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g,d=function(e,t,n,r){var i,o=n?t:t.replace(p,"");if(c.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(s,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,o=o.replace(a,"$1").replace(u,"0.$1")),t!=o))return new A(o,i);if(A.DEBUG)throw Error(R+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},r.absoluteValue=r.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},r.comparedTo=function(e,t){return V(this,new A(e,t))},r.decimalPlaces=r.dp=function(e,t){var n,r,i;if(null!=e)return Y(e,0,x),null==t?t=b:Y(t,0,8),F(new A(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-j(this.e/k))*k,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},r.dividedBy=r.div=function(e,t){return g(this,new A(e,t),T,b)},r.dividedToIntegerBy=r.idiv=function(e,t){return g(this,new A(e,t),0,1)},r.exponentiatedBy=r.pow=function(e,t){var n,r,i,o,s,a,u,l,c=this;if((e=new A(e)).c&&!e.isInteger())throw Error(R+"Exponent not an integer: "+C(e));if(null!=t&&(t=new A(t)),s=14<e.e,!c.c||!c.c[0]||1==c.c[0]&&!c.e&&1==c.c.length||!e.c||!e.c[0])return l=new A(Math.pow(+C(c),s?2-K(e):+C(e))),t?l.mod(t):l;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(r=!a&&c.isInteger()&&t.isInteger())&&(c=c.mod(t))}else{if(9<e.e&&(0<c.e||c.e<-1||(0==c.e?1<c.c[0]||s&&24e7<=c.c[1]:c.c[0]<8e13||s&&c.c[0]<=9999975e7)))return o=c.s<0&&K(e)?-0:0,-1<c.e&&(o=1/o),new A(a?1/o:o);v&&(o=D(v/k+2))}for(s?(n=new A(.5),a&&(e.s=1),u=K(e)):u=(i=Math.abs(+C(e)))%2,l=new A(h);;){if(u){if(!(l=l.times(c)).c)break;o?l.c.length>o&&(l.c.length=o):r&&(l=l.mod(t))}if(i){if(0===(i=L(i/2)))break;u=i%2}else if(F(e=e.times(n),e.e+1,1),14<e.e)u=K(e);else{if(0==(i=+C(e)))break;u=i%2}c=c.times(c),o?c.c&&c.c.length>o&&(c.c.length=o):r&&(c=c.mod(t))}return r?l:(a&&(l=h.div(l)),t?l.mod(t):o?F(l,v,b,void 0):l)},r.integerValue=function(e){var t=new A(this);return null==e?e=b:Y(e,0,8),F(t,t.e+1,e)},r.isEqualTo=r.eq=function(e,t){return 0===V(this,new A(e,t))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(e,t){return 0<V(this,new A(e,t))},r.isGreaterThanOrEqualTo=r.gte=function(e,t){return 1===(t=V(this,new A(e,t)))||0===t},r.isInteger=function(){return!!this.c&&j(this.e/k)>this.c.length-2},r.isLessThan=r.lt=function(e,t){return V(this,new A(e,t))<0},r.isLessThanOrEqualTo=r.lte=function(e,t){return-1===(t=V(this,new A(e,t)))||0===t},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return 0<this.s},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(e,t){var n,r,i,o,s=this.s;if(t=(e=new A(e,t)).s,!s||!t)return new A(NaN);if(s!=t)return e.s=-t,this.plus(e);var a=this.e/k,u=e.e/k,l=this.c,c=e.c;if(!a||!u){if(!l||!c)return l?(e.s=-t,e):new A(c?this:NaN);if(!l[0]||!c[0])return c[0]?(e.s=-t,e):new A(l[0]?this:3==b?-0:0)}if(a=j(a),u=j(u),l=l.slice(),s=a-u){for((o=s<0)?(s=-s,i=l):(u=a,i=c),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(o=(s=l.length)<(t=c.length))?s:t,s=t=0;t<r;t++)if(l[t]!=c[t]){o=l[t]<c[t];break}if(o&&(i=l,l=c,c=i,e.s=-e.s),0<(t=(r=c.length)-(n=l.length)))for(;t--;l[n++]=0);for(t=U-1;s<r;){if(l[--r]<c[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=U}l[r]-=c[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?N(e,l,u):(e.s=3==b?-1:1,e.c=[e.e=0],e)},r.modulo=r.mod=function(e,t){var n,r;return e=new A(e,t),!this.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||this.c&&!this.c[0]?new A(this):(9==i?(r=e.s,e.s=1,n=g(this,e,0,3),e.s=r,n.s*=r):n=g(this,e,0,i),(e=this.minus(n.times(e))).c[0]||1!=i||(e.s=this.s),e)},r.multipliedBy=r.times=function(e,t){var n,r,i,o,s,a,u,l,c,f,d,p,h,m,E,_=this.c,g=(e=new A(e,t)).c;if(!(_&&g&&_[0]&&g[0]))return!this.s||!e.s||_&&!_[0]&&!g||g&&!g[0]&&!_?e.c=e.e=e.s=null:(e.s*=this.s,_&&g?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=j(this.e/k)+j(e.e/k),e.s*=this.s,(u=_.length)<(f=g.length)&&(h=_,_=g,g=h,i=u,u=f,f=i),i=u+f,h=[];i--;h.push(0));for(m=U,E=G,i=f;0<=--i;){for(n=0,d=g[i]%E,p=g[i]/E|0,o=i+(s=u);i<o;)n=((l=d*(l=_[--s]%E)+(a=p*l+(c=_[s]/E|0)*d)%E*E+h[o]+n)/m|0)+(a/E|0)+p*c,h[o--]=l%m;h[o]=n}return n?++r:h.splice(0,1),N(e,h,r)},r.negated=function(){var e=new A(this);return e.s=-e.s||null,e},r.plus=function(e,t){var n,r=this.s;if(t=(e=new A(e,t)).s,!r||!t)return new A(NaN);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/k,o=e.e/k,s=this.c,a=e.c;if(!i||!o){if(!s||!a)return new A(r/0);if(!s[0]||!a[0])return a[0]?e:new A(s[0]?this:0*r)}if(i=j(i),o=j(o),s=s.slice(),r=i-o){for(0<r?(o=i,n=a):(r=-r,n=s),n.reverse();r--;n.push(0));n.reverse()}for((r=s.length)-(t=a.length)<0&&(n=a,a=s,s=n,t=r),r=0;t;)r=(s[--t]=s[t]+a[t]+r)/U|0,s[t]=U===s[t]?0:s[t]%U;return r&&(s=[r].concat(s),++o),N(e,s,o)},r.precision=r.sd=function(e,t){var n,r,i;if(null!=e&&e!==!!e)return Y(e,1,x),null==t?t=b:Y(t,0,8),F(new A(this),e,t);if(!(n=this.c))return null;if(r=(i=n.length-1)*k+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];10<=i;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},r.shiftedBy=function(e){return Y(e,-P,P),this.times("1e"+e)},r.squareRoot=r.sqrt=function(){var e,t,n,r,i,o=this.c,s=this.s,a=this.e,u=T+4,l=new A("0.5");if(1!==s||!o||!o[0])return new A(!s||s<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(s=Math.sqrt(+C(this)))||s==1/0?(((t=q(o)).length+a)%2==0&&(t+="0"),s=Math.sqrt(+t),a=j((a+1)/2)-(a<0||a%2),n=new A(t=s==1/0?"1e"+a:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+a)):n=new A(s+""),n.c[0])for((s=(a=n.e)+u)<3&&(s=0);;)if(i=n,n=l.times(i.plus(g(this,i,u,1))),q(i.c).slice(0,s)===(t=q(n.c)).slice(0,s)){if(n.e<a&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(F(n,n.e+T+2,1),e=!n.times(n).eq(this));break}if(!r&&(F(i,i.e+T+2,0),i.times(i).eq(this))){n=i;break}u+=4,s+=4,r=1}return F(n,n.e+T+1,b,e)},r.toExponential=function(e,t){return null!=e&&(Y(e,0,x),e++),o(this,e,t,1)},r.toFixed=function(e,t){return null!=e&&(Y(e,0,x),e=e+this.e+1),o(this,e,t)},r.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=O;else if("object"!=typeof n)throw Error(R+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,o=r.split("."),s=+n.groupSize,a=+n.secondaryGroupSize,u=n.groupSeparator||"",l=o[0],c=o[1],f=this.s<0,d=f?l.slice(1):l,p=d.length;if(a&&(i=s,s=a,p-=a=i),0<s&&0<p){for(i=p%s||s,l=d.substr(0,i);i<p;i+=s)l+=u+d.substr(i,s);0<a&&(l+=u+d.slice(i)),f&&(l="-"+l)}r=c?l+(n.decimalSeparator||"")+((a=+n.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):c):l}return(n.prefix||"")+r+(n.suffix||"")},r.toFraction=function(e){var t,n,r,i,o,s,a,u,l,c,f,d,p=this.c;if(null!=e&&(!(a=new A(e)).isInteger()&&(a.c||1!==a.s)||a.lt(h)))throw Error(R+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+C(a));if(!p)return new A(this);for(t=new A(h),l=n=new A(h),r=u=new A(h),d=q(p),o=t.e=d.length-this.e-1,t.c[0]=H[(s=o%k)<0?k+s:s],e=!e||0<a.comparedTo(t)?0<o?t:l:a,s=y,y=1/0,a=new A(d),u.c[0]=0;c=g(a,t,0,1),1!=(i=n.plus(c.times(r))).comparedTo(e);)n=r,r=i,l=u.plus(c.times(i=l)),u=i,t=a.minus(c.times(i=t)),a=i;return i=g(e.minus(n),r,0,1),u=u.plus(i.times(l)),n=n.plus(i.times(r)),u.s=l.s=this.s,f=g(l,r,o*=2,b).minus(this).abs().comparedTo(g(u,n,o,b).minus(this).abs())<1?[l,r]:[u,n],y=s,f},r.toNumber=function(){return+C(this)},r.toPrecision=function(e,t){return null!=e&&Y(e,1,x),o(this,e,t,2)},r.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=m||E<=i?Q(q(n.c),i):X(q(n.c),i,"0"):10===e?t=X(q((n=F(new A(n),T+i+1,b)).c),n.e,"0"):(Y(e,2,w.length,"Base"),t=f(X(q(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},r.valueOf=r.toJSON=function(){return C(this)},r._isBigNumber=!0,null!=t&&A.set(t),A}())["default"]=n.BigNumber=n,void 0!==f&&f.exports?f.exports=n:(t||(t="undefined"!=typeof self&&self?self:window),t.BigNumber=n)}(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/bignumber.js/bignumber.js","/node_modules/bignumber.js")},{_process:131,buffer:121,timers:152}],119:[function(e,t,n){(function(e,t,n,r,i,o,s,a,u,l,c){}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/browser-resolve/empty.js","/node_modules/browser-resolve")},{_process:131,buffer:121,timers:152}],120:[function(e,t,n){(function(e,t,n,r,i,o,s,a,u,l,c){}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/browserify/lib/_empty.js","/node_modules/browserify/lib")},{_process:131,buffer:121,timers:152}],121:[function(Y,e,K){(function(e,t,f,n,r,i,o,s,a,u,l){"use strict";var c=Y("base64-js"),d=Y("ieee754");K.Buffer=f,K.SlowBuffer=function(e){+e!=e&&(e=0);return f.alloc(+e)},K.INSPECT_MAX_BYTES=50;var p=2147483647;function h(e){if(p<e)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=f.prototype,t}function f(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return _(e)}return m(e,t,n)}function m(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return q(e)||e&&q(e.buffer)?function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=t===undefined&&n===undefined?new Uint8Array(e):n===undefined?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=f.prototype,r}(e,t,n):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|b(e,t),r=h(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t):function(e){if(f.isBuffer(e)){var t=0|T(e.length),n=h(t);return 0===n.length||e.copy(n,0,0,t),n}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||V(e.length)?h(0):g(e);if("Buffer"===e.type&&Array.isArray(e.data))return g(e.data)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.")}(e)}function E(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('"size" argument must not be negative')}function _(e){return E(e),h(e<0?0:0|T(e))}function g(e){for(var t=e.length<0?0:0|T(e.length),n=h(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function T(e){if(p<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|e}function b(e,t){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case undefined:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return x(e).length;default:if(r)return G(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(r!==undefined&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a/=s=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(a<n+u&&(n=a-u),o=n;0<=o;o--){for(var f=!0,d=0;d<u;d++)if(l(e,o+d)!==l(t,d)){f=!1;break}if(f)return o}return-1}function O(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?i<(r=Number(r))&&(r=i):r=i;var o=t.length;o/2<r&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return j(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,l=e[i],c=null,f=239<l?4:223<l?3:191<l?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&127<(u=(31&l)<<6|63&o)&&(c=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&2047<(u=(15&l)<<12|(63&o)<<6|63&s)&&(u<55296||57343<u)&&(c=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&65535<(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)&&u<1114112&&(c=u)}null===c?(c=65533,f=1):65535<c&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}(r)}K.kMaxLength=p,(f.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{get:function(){return this instanceof f?this.buffer:undefined}}),Object.defineProperty(f.prototype,"offset",{get:function(){return this instanceof f?this.byteOffset:undefined}}),"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=function(e,t,n){return m(e,t,n)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(e,t,n){return i=t,o=n,E(r=e),r<=0?h(r):i!==undefined?"string"==typeof o?h(r).fill(i,o):h(r).fill(i):h(r);var r,i,o},f.allocUnsafe=function(e){return _(e)},f.allocUnsafeSlow=function(e){return _(e)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer},f.compare=function(e,t){if(!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var n;if(t===undefined)for(n=t=0;n<e.length;++n)t+=e[n].length;var r=f.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(ArrayBuffer.isView(o)&&(o=f.from(o)),!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},f.byteLength=b,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},f.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},f.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},f.prototype.toLocaleString=f.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?N(this,0,e):function(e,t,n){var r=!1;if((t===undefined||t<0)&&(t=0),t>this.length)return"";if((n===undefined||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return F(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",t=K.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},f.prototype.compare=function(e,t,n,r,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(t===undefined&&(t=0),n===undefined&&(n=e?e.length:0),r===undefined&&(r=0),i===undefined&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),l=e.slice(t,n),c=0;c<a;++c)if(u[c]!==l[c]){o=u[c],s=l[c];break}return o<s?-1:s<o?1:0},f.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},f.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},f.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)},f.prototype.write=function(e,t,n,r){if(t===undefined)r="utf8",n=this.length,t=0;else if(n===undefined&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,r===undefined&&(r="utf8")):(r=n,n=undefined)}var i=this.length-t;if((n===undefined||i<n)&&(n=i),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,s,a,u,l,c,f,d,p,h=!1;;)switch(r){case"hex":return O(this,e,t,n);case"utf8":case"utf-8":return d=t,p=n,j(G(e,(f=this).length-d),f,d,p);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return u=this,l=t,c=n,j(x(e),u,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=t,a=n,j(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,(o=this).length-s),o,s,a);default:if(h)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),h=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function F(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function M(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var i="",o=t;o<n;++o)i+=H(e[o]);return i}function D(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,0,n,4),d.write(e,t,n,r,23,4),n+4}function k(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,0,n,8),d.write(e,t,n,r,52,8),n+8}f.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=t===undefined?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=f.prototype,r},f.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},f.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;0<t&&(i*=256);)r+=this[e+--t]*i;return r},f.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return(i*=128)<=r&&(r-=Math.pow(2,8*t)),r},f.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];0<r&&(i*=256);)o+=this[e+--r]*i;return(i*=128)<=o&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),d.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),d.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),d.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),d.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},f.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;0<=--i&&(o*=256);)this[t+i]=e/o&255;return t+n},f.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},f.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;0<=--o&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},f.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},f.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},f.prototype.writeDoubleLE=function(e,t,n){return k(this,e,t,!0,n)},f.prototype.writeDoubleBE=function(e,t,n){return k(this,e,t,!1,n)},f.prototype.copy=function(e,t,n,r){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0<r&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var o=i-1;0<=o;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},f.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),r!==undefined&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=n===undefined?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=f.isBuffer(e)?e:new f(e,r),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var P=/[^+/0-9A-Za-z-_]/g;function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){var n;t=t||Infinity;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if(55295<(n=e.charCodeAt(s))&&n<57344){if(!i){if(56319<n){-1<(t-=3)&&o.push(239,191,189);continue}if(s+1===r){-1<(t-=3)&&o.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(t-=3)&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(t-=3)&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function x(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function q(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function V(e){return e!=e}}).call(this,Y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],Y("timers").setImmediate,Y("timers").clearImmediate,"/node_modules/buffer/index.js","/node_modules/buffer")},{_process:131,"base64-js":117,buffer:121,ieee754:126,timers:152}],122:[function(e,f,t){(function(e,t,n,r,i,o,s,a,u,l,c){f.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/builtin-status-codes/browser.js","/node_modules/builtin-status-codes")},{_process:131,buffer:121,timers:152}],123:[function(e,t,d){(function(e,t,n,r,i,o,s,a,u,l,c){function f(e){return Object.prototype.toString.call(e)}d.isArray=
94
94
  // Copyright Joyent, Inc. and other Node contributors.
95
95
  function(e){return Array.isArray?Array.isArray(e):"[object Array]"===f(e)},d.isBoolean=function(e){return"boolean"==typeof e},d.isNull=function(e){return null===e},d.isNullOrUndefined=function(e){return null==e},d.isNumber=function(e){return"number"==typeof e},d.isString=function(e){return"string"==typeof e},d.isSymbol=function(e){return"symbol"==typeof e},d.isUndefined=function(e){return void 0===e},d.isRegExp=function(e){return"[object RegExp]"===f(e)},d.isObject=function(e){return"object"==typeof e&&null!==e},d.isDate=function(e){return"[object Date]"===f(e)},d.isError=function(e){return"[object Error]"===f(e)||e instanceof Error},d.isFunction=function(e){return"function"==typeof e},d.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},d.isBuffer=n.isBuffer}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/core-util-is/lib/util.js","/node_modules/core-util-is/lib")},{_process:131,buffer:121,timers:152}],124:[function(e,I,t){(function(e,t,n,r,i,o,s,a,u,l,c){
96
96
  // Copyright Joyent, Inc. and other Node contributors.