File Manager

Path: /home/liffinac1/domains/fxinvestcapital.us/public_html/db_files/a_data/

Viewing File: protobuf-handler.js

(window.webpackJsonp=window.webpackJsonp||[]).push([["protobuf-handler"],{0:function(e,t){},1:function(e,t){},"1qYw":function(e,t){e.exports={package:null,syntax:"proto2",messages:[{name:"Msg",syntax:"proto2",fields:[{rule:"optional",type:"Commands",name:"command_number",id:1},{rule:"optional",type:"bytes",name:"data",id:2},{rule:"optional",type:"int32",name:"time",id:3}],enums:[{name:"Commands",syntax:"proto2",values:[{name:"chart_create_session",id:0},{name:"chart_delete_session",id:1},{name:"resolve_symbol",id:2},{name:"create_series",id:3},{name:"create_study",id:4},{name:"message",id:5},{name:"timescale_update",id:6},{name:"du",id:7},{name:"series_loading",id:8},{name:"series_completed",id:9},{name:"series_error",id:10},{name:"series_deleted",id:11},{name:"series_timeframe",id:12},{name:"first_bar_time",id:13},{name:"study_loading",id:14},{name:"study_completed",id:15},{name:"switch_timezone",id:16},{name:"request_studies_metadata",id:17},{name:"remove_series",id:18},{name:"modify_series",id:19},{name:"request_more_data",id:20},{name:"get_first_bar_time",id:21},{name:"create_child_study",id:22},{name:"remove_study",id:23},{name:"modify_study",id:24},{name:"create_pointset",id:25},{name:"symbol_resolved",id:26},{name:"study_deleted",id:27},{name:"protocol_error",id:28},{name:"critical_error",id:29},{name:"set_auth_token",id:30},{name:"studies_metadata",id:31},{name:"set_data_quality",id:32},{name:"quote_create_session",id:33},{name:"quote_set_fields",id:34},{name:"quote_delete_session",id:35},{name:"quote_add_symbols",id:36},{name:"quote_remove_symbols",id:37},{name:"quote_switch_timezone",id:38},{name:"quote_fast_symbols",id:39},{name:"quote_hibernate_all",id:40},{name:"qsd",id:41},{name:"quote_list_fields",id:42},{name:"depth_create_session",id:43},{name:"depth_delete_session",id:44},{name:"depth_set_symbol",id:45},{name:"depth_clear_symbol",id:46},{name:"depth_set_scale",id:47},{name:"depth_symbol_success",id:48},{name:"depth_symbol_error",id:49},{name:"depth_symbol_cleared",id:50},{name:"dd",id:51},{name:"depth_bar_last_value",id:52},{name:"remove_pointset",id:53},{name:"study_error",id:54},{name:"modify_pointset",id:55},{name:"switch_protocol",id:56},{name:"symbol_error",id:57},{name:"request_more_tickmarks",id:58},{name:"tickmark_update",id:59},{name:"error_message",id:60},{name:"wrong_message_type",id:61},{name:"mock_fire_tick",id:62},{name:"pointset_error",id:63},{name:"quote_fire_tick",id:64},{name:"quote_fire_crash",id:65},{name:"child_study_rebind",id:66},{name:"replay_point",id:67},{name:"replay_create_session",id:68},{name:"replay_delete_session",id:69},{name:"replay_add_series",id:70},{name:"replay_remove_series",id:71},{name:"replay_reset",id:72},{name:"replay_step",id:73},{name:"replay_error",id:74},{name:"replay_ok",id:75},{name:"replay_start",id:76},{name:"replay_stop",id:77},{name:"replay_resolutions",id:78},{name:"replay_data_end",id:79},{name:"replay_set_resolution",id:80},{name:"protocol_switched",id:81},{name:"replay_instance_id",id:82},{name:"unsupported_resolution",id:83},{
name:"quote_completed",id:84},{name:"set_broker",id:85}]}]},{name:"chart_create_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"parameters",id:2}]},{name:"chart_delete_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"switch_timezone",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"timezone",id:2}]},{name:"request_studies_metadata",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"meta_name",id:2}]},{name:"resolve_symbol",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"resolve_name",id:2},{rule:"optional",type:"string",name:"symbol",id:3}]},{name:"symbol_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2},{rule:"repeated",type:"string",name:"reason",id:3},{rule:"optional",type:"int32",name:"time",id:4}]},{name:"create_series",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"resolve_name",id:4},{rule:"optional",type:"string",name:"resolution",id:5},{rule:"optional",type:"string",name:"bars",id:6},{rule:"optional",type:"string",name:"frame",id:7}]},{name:"remove_series",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2}]},{name:"modify_series",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"resolve_name",id:4},{rule:"optional",type:"string",name:"resolution",id:5},{rule:"optional",type:"string",name:"frame",id:6}]},{name:"request_more_data",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"int32",name:"count",id:3}]},{name:"get_first_bar_time",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol_name",id:2},{rule:"optional",type:"string",name:"resolution",id:3}]},{name:"create_study",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"study_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"parent",id:4},{rule:"optional",type:"string",name:"study",id:5},{rule:"optional",type:"bytes",name:"inputs",id:6}]},{name:"create_child_study",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"study_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{
rule:"optional",type:"string",name:"parent",id:4},{rule:"optional",type:"string",name:"study",id:5},{rule:"optional",type:"bytes",name:"inputs",id:6}]},{name:"child_study_rebind",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"study_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"parent",id:4},{rule:"optional",type:"string",name:"study",id:5},{rule:"optional",type:"bytes",name:"inputs",id:6}]},{name:"remove_study",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"study_name",id:2}]},{name:"modify_study",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"study_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"bytes",name:"inputs",id:4}]},{name:"create_pointset",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"ps_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"symbol",id:4},{rule:"optional",type:"string",name:"interval",id:5},{rule:"optional",type:"string",name:"points",id:6}]},{name:"modify_pointset",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"ps_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"points",id:4}]},{name:"remove_pointset",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"ps_name",id:2}]},{name:"quote_create_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"quote_set_fields",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"fields",id:2}]},{name:"quote_delete_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"quote_add_symbols",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbols",id:2}]},{name:"quote_remove_symbols",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"repeated",type:"string",name:"symbols",id:2}]},{name:"quote_switch_timezone",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"timezone",id:2}]},{name:"quote_fast_symbols",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbols",id:2}]},{name:"quote_hibernate_all",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"quote_fire_tick",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2}]},{name:"quote_fire_crash",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{
rule:"optional",type:"string",name:"symbol",id:2}]},{name:"depth_create_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"double",name:"multiplier",id:2},{rule:"optional",type:"int32",name:"viewport_width",id:3}]},{name:"depth_delete_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"depth_set_symbol",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2}]},{name:"depth_clear_symbol",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"depth_set_scale",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"double",name:"scale",id:2}]},{name:"replay_create_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"replay_delete_session",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"replay_add_series",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2},{rule:"optional",type:"string",name:"symbol",id:3},{rule:"optional",type:"string",name:"resolution",id:4}]},{name:"replay_remove_series",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2},{rule:"optional",type:"string",name:"symbol",id:3},{rule:"optional",type:"string",name:"resolution",id:4}]},{name:"replay_reset",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2},{rule:"optional",type:"int32",name:"time",id:3}]},{name:"replay_step",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2},{rule:"optional",type:"int32",name:"length",id:3}]},{name:"replay_start",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2},{rule:"optional",type:"int32",name:"delay",id:3}]},{name:"replay_stop",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2}]},{name:"replay_set_resolution",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2},{rule:"optional",type:"string",name:"resolution",id:3}]},{name:"set_auth_token",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"token",id:1}]},{name:"set_data_quality",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"quality",id:1}]},{name:"set_broker",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"broker_name",id:1}]},{name:"request_more_tickmarks",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"int32",name:"bars",id:3}]},{name:"switch_protocol",
syntax:"proto2",fields:[{rule:"optional",type:"DataType",name:"protocol",id:1}],enums:[{name:"DataType",syntax:"proto2",values:[{name:"json",id:0},{name:"protobuf",id:1}]}]},{name:"protocol_switched",syntax:"proto2",fields:[{rule:"optional",type:"DataType",name:"protocol",id:1}],enums:[{name:"DataType",syntax:"proto2",values:[{name:"json",id:0},{name:"protobuf",id:1}]}]},{name:"mock_fire_tick",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2},{rule:"optional",type:"double",name:"time",id:3},{rule:"optional",type:"double",name:"price",id:4},{rule:"optional",type:"double",name:"size",id:5}]},{name:"message",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"text",id:1}]},{name:"protocol_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"text",id:1}]},{name:"critical_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"reason",id:2},{rule:"optional",type:"string",name:"info",id:3}]},{name:"error_message",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"params",id:2}]},{name:"wrong_message_type",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"fail_message",id:1}]},{name:"series_loading",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"int32",name:"time",id:4}]},{name:"series_completed",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"update_mode",id:3},{rule:"optional",type:"string",name:"turnaround",id:4},{rule:"optional",type:"int32",name:"time",id:5}]},{name:"series_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"reason",id:4},{rule:"optional",type:"string",name:"node",id:5},{rule:"optional",type:"int32",name:"time",id:6}]},{name:"series_deleted",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"int32",name:"time",id:4}]},{name:"series_timeframe",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"int32",name:"left",id:4},{rule:"optional",type:"int32",name:"right",id:5},{rule:"optional",type:"string",name:"timeframe",id:6},{rule:"optional",type:"bool",name:"isAccurateData",id:7}]},{name:"first_bar_time",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",
type:"string",name:"symbol_id",id:2},{rule:"optional",type:"double",name:"time",id:3}]},{name:"unsupported_resolution",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"object_id",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"resolution",id:4}]},{name:"study_loading",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"int32",name:"time",id:4}]},{name:"study_completed",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"series_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:4},{rule:"optional",type:"int32",name:"time",id:5}]},{name:"study_deleted",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"study_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"int32",name:"time",id:4}]},{name:"study_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"study_name",id:2},{rule:"optional",type:"string",name:"turnaround",id:3},{rule:"optional",type:"string",name:"reason",id:4},{rule:"optional",type:"string",name:"node",id:5},{rule:"optional",type:"int32",name:"time",id:6}]},{name:"timescale_update",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"timescale",name:"timescale",id:2},{rule:"optional",type:"objects",name:"objects",id:3},{rule:"optional",type:"int32",name:"time",id:4}]},{name:"du",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"objects",name:"objects",id:2}]},{name:"timescale",syntax:"proto2",fields:[{rule:"optional",type:"int32",name:"index",id:1},{rule:"optional",type:"int32",name:"zoffset",id:2},{rule:"repeated",type:"double",name:"changes",id:3},{rule:"repeated",type:"marks",name:"marks",id:4},{rule:"repeated",type:"index_diff",name:"index_diff",id:5}]},{name:"tickmark_update",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"int32",name:"index",id:2},{rule:"optional",type:"int32",name:"zoffset",id:3},{rule:"repeated",type:"double",name:"changes",id:4},{rule:"repeated",type:"marks",name:"marks",id:5}]},{name:"marks",syntax:"proto2",fields:[{rule:"repeated",type:"double",name:"value",id:1}]},{name:"index_diff",syntax:"proto2",fields:[{rule:"repeated",type:"int32",name:"index",id:1}]},{name:"objects",syntax:"proto2",fields:[{rule:"repeated",type:"series",name:"series",id:1}]},{name:"series",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"series_name",id:1},{rule:"optional",type:"string",name:"node",id:2},{rule:"repeated",type:"s",name:"data",id:3},{rule:"optional",type:"ns",name:"ns",id:4},{rule:"optional",type:"string",name:"turnaround",id:5},{
rule:"optional",type:"int32",name:"last_bar_close",id:6}]},{name:"ns",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"d",id:1},{rule:"optional",type:"bool",name:"nochange",id:2},{rule:"repeated",type:"int32",name:"indexes",id:3}]},{name:"st",syntax:"proto2",fields:[{rule:"optional",type:"int32",name:"i",id:1},{rule:"repeated",type:"double",name:"value",id:2}]},{name:"s",syntax:"proto2",fields:[{rule:"optional",type:"int32",name:"i",id:1},{rule:"repeated",type:"double",name:"value",id:2}]},{name:"symbol_resolved",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol_name",id:2},{rule:"optional",type:"string",name:"symbol_info",id:3},{rule:"optional",type:"int32",name:"time",id:4}]},{name:"studies_metadata",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"meta_name",id:2},{rule:"optional",type:"string",name:"metadata",id:3}]},{name:"qsd",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol_name",id:2},{rule:"optional",type:"string",name:"status",id:3},{rule:"optional",type:"string",name:"values",id:4},{rule:"optional",type:"double",name:"lp",id:5},{rule:"optional",type:"float",name:"ch",id:6},{rule:"optional",type:"float",name:"chp",id:7},{rule:"optional",type:"double",name:"high_price",id:8},{rule:"optional",type:"double",name:"low_price",id:9},{rule:"optional",type:"double",name:"volume",id:10},{rule:"optional",type:"double",name:"rtc",id:11},{rule:"optional",type:"float",name:"rch",id:12},{rule:"optional",type:"float",name:"rchp",id:13},{rule:"optional",type:"float",name:"bid",id:14},{rule:"optional",type:"float",name:"ask",id:15},{rule:"optional",type:"float",name:"bid_size",id:16},{rule:"optional",type:"float",name:"ask_size",id:17},{rule:"optional",type:"string",name:"rest",id:19}]},{name:"quote_list_fields",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"fields",id:2}]},{name:"quote_completed",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol_name",id:2}]},{name:"depth_symbol_success",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2}]},{name:"depth_symbol_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2},{rule:"optional",type:"string",name:"reason",id:3}]},{name:"depth_symbol_cleared",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2}]},{name:"dd",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"depth_data",name:"depth_data",id:2}]},{name:"depth_data",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"symbol",id:1},{rule:"optional",type:"double",name:"left",id:2},{rule:"optional",
type:"double",name:"right",id:3},{rule:"repeated",type:"bs",name:"bids",id:4},{rule:"repeated",type:"bs",name:"asks",id:5}]},{name:"bs",syntax:"proto2",fields:[{rule:"optional",type:"double",name:"price",id:1},{rule:"optional",type:"double",name:"volume",id:2}]},{name:"depth_bar_last_value",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"symbol",id:2},{rule:"optional",type:"double",name:"last_value",id:3}]},{name:"pointset_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"set_id",id:2},{rule:"optional",type:"string",name:"turnaround",id:3}]},{name:"replay_point",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"int32",name:"time",id:3}]},{name:"replay_ok",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2}]},{name:"replay_error",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"turnaround",id:2},{rule:"optional",type:"string",name:"reason",id:3},{rule:"optional",type:"string",name:"info",id:4}]},{name:"replay_resolutions",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"base_resolution",id:2},{rule:"optional",type:"string",name:"min_resolution",id:3}]},{name:"replay_data_end",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1}]},{name:"replay_instance_id",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"session",id:1},{rule:"optional",type:"string",name:"id",id:2}]}],isNamespace:!0}},"5iuW":function(e,t,i){"use strict";var r=i("DPDv"),n=i("1qYw"),s=function(){for(var e in this._protoMessage=r.loadJson(n).build(),this._Msg=this._protoMessage.Msg,this._commandByNumber=[],this._Msg.Commands)this._commandByNumber[this._Msg.Commands[e]]=e};s.prototype.decode_message=function(e){var t=this._Msg.decode(e),i=this._commandByNumber[t.command_number];return{m:i,p:this._protoMessage[i].decode(t.data),time:t.time}},s.prototype.encode_command=function(e,t){return this._Msg.encode({command_number:e,data:this._protoMessage[e].encode(t)}).toBuffer()},e.exports=s},DGy1:function(e,t,i){var r,n,s;n=[i("yXba")],void 0===(s="function"==typeof(r=function(e){"use strict";var t=function(e,i,n){if(void 0===e&&(e=t.DEFAULT_CAPACITY),void 0===i&&(i=t.DEFAULT_ENDIAN),void 0===n&&(n=t.DEFAULT_NOASSERT),!n){if((e|=0)<0)throw RangeError("Illegal capacity");i=!!i,n=!!n}this.buffer=0===e?r:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=i,this.noAssert=n};t.VERSION="5.0.1",t.LITTLE_ENDIAN=!0,t.BIG_ENDIAN=!1,t.DEFAULT_CAPACITY=16,t.DEFAULT_ENDIAN=t.BIG_ENDIAN,t.DEFAULT_NOASSERT=!1,t.Long=e||null;var i=t.prototype;i.__isByteBuffer__,Object.defineProperty(i,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1})
;var r=new ArrayBuffer(0),n=String.fromCharCode;function s(e){var t=0;return function(){return t<e.length?e.charCodeAt(t++):null}}function o(){var e=[],t=[];return function(){if(0===arguments.length)return t.join("")+n.apply(String,e);e.length+arguments.length>1024&&(t.push(n.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function a(e,t,i,r,n){var s,o,a=8*n-r-1,l=(1<<a)-1,f=l>>1,u=-7,h=i?n-1:0,p=i?-1:1,d=e[t+h];for(h+=p,s=d&(1<<-u)-1,d>>=-u,u+=a;u>0;s=256*s+e[t+h],h+=p,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=256*o+e[t+h],h+=p,u-=8);if(0===s)s=1-f;else{if(s===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),s-=f}return(d?-1:1)*o*Math.pow(2,s-r)}function l(e,t,i,r,n,s){var o,a,l,f=8*s-n-1,u=(1<<f)-1,h=u>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:s-1,c=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(a=0,o=u):o+h>=1?(a=(t*l-1)*Math.pow(2,n),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[i+d]=255&a,d+=c,a/=256,n-=8);for(o=o<<n|a,f+=n;f>0;e[i+d]=255&o,d+=c,o/=256,f-=8);e[i+d-c]|=128*y}t.accessor=function(){return Uint8Array},t.allocate=function(e,i,r){return new t(e,i,r)},t.concat=function(e,i,r,n){"boolean"!=typeof i&&"string"==typeof i||(n=r,r=i,i=void 0);for(var s,o=0,a=0,l=e.length;a<l;++a)t.isByteBuffer(e[a])||(e[a]=t.wrap(e[a],i)),(s=e[a].limit-e[a].offset)>0&&(o+=s);if(0===o)return new t(0,r,n);var f,u=new t(o,r,n);for(a=0;a<l;)(s=(f=e[a++]).limit-f.offset)<=0||(u.view.set(f.view.subarray(f.offset,f.limit),u.offset),u.offset+=s);return u.limit=u.offset,u.offset=0,u},t.isByteBuffer=function(e){return!0===(e&&e.__isByteBuffer__)},t.type=function(){return ArrayBuffer},t.wrap=function(e,r,n,s){if("string"!=typeof r&&(s=n,n=r,r=void 0),"string"==typeof e)switch(void 0===r&&(r="utf8"),r){case"base64":return t.fromBase64(e,n);case"hex":return t.fromHex(e,n);case"binary":return t.fromBinary(e,n);case"utf8":return t.fromUTF8(e,n);case"debug":return t.fromDebug(e,n);default:throw Error("Unsupported encoding: "+r)}if(null===e||"object"!=typeof e)throw TypeError("Illegal buffer");var o;if(t.isByteBuffer(e))return(o=i.clone.call(e)).markedOffset=-1,o;if(e instanceof Uint8Array)o=new t(0,n,s),e.length>0&&(o.buffer=e.buffer,o.offset=e.byteOffset,o.limit=e.byteOffset+e.byteLength,o.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)o=new t(0,n,s),e.byteLength>0&&(o.buffer=e,o.offset=0,o.limit=e.byteLength,o.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(o=new t(e.length,n,s)).limit=e.length;for(var a=0;a<e.length;++a)o.view[a]=e[a]}return o},i.writeBitSet=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if(!(e instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)")
;if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,n=t,s=e.length,o=s>>3,a=0;for(t+=this.writeVarint32(s,t);o--;)r=1&!!e[a++]|(1&!!e[a++])<<1|(1&!!e[a++])<<2|(1&!!e[a++])<<3|(1&!!e[a++])<<4|(1&!!e[a++])<<5|(1&!!e[a++])<<6|(1&!!e[a++])<<7,this.writeByte(r,t++);if(a<s){var l=0;for(r=0;a<s;)r|=(1&!!e[a++])<<l++;this.writeByte(r,t++)}return i?(this.offset=t,this):t-n},i.readBitSet=function(e){var t=void 0===e;t&&(e=this.offset);var i,r=this.readVarint32(e),n=r.value,s=n>>3,o=0,a=[];for(e+=r.length;s--;)i=this.readByte(e++),a[o++]=!!(1&i),a[o++]=!!(2&i),a[o++]=!!(4&i),a[o++]=!!(8&i),a[o++]=!!(16&i),a[o++]=!!(32&i),a[o++]=!!(64&i),a[o++]=!!(128&i);if(o<n){var l=0;for(i=this.readByte(e++);o<n;)a[o++]=!!(i>>l++&1)}return t&&(this.offset=e),a},i.readBytes=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var r=this.slice(t,t+e);return i&&(this.offset+=e),r},i.writeBytes=i.append,i.writeInt8=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},i.writeByte=i.writeInt8,i.readInt8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return 128==(128&i)&&(i=-(255-i+1)),t&&(this.offset+=1),i},i.readByte=i.readInt8,i.writeUint8=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=1,this.view[t]=e,i&&(this.offset+=1),this},i.writeUInt8=i.writeUint8,i.readUint8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i=this.view[e];return t&&(this.offset+=1),i},i.readUInt8=i.readUint8,i.writeInt16=function(e,t){var i=void 0===t;if(i&&(t=this.offset),
!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},i.writeShort=i.writeInt16,i.readInt16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),32768==(32768&i)&&(i=-(65535-i+1)),t&&(this.offset+=2),i},i.readShort=i.readInt16,i.writeUint16=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),i&&(this.offset+=2),this},i.writeUInt16=i.writeUint16,i.readUint16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e],i|=this.view[e+1]<<8):(i=this.view[e]<<8,i|=this.view[e+1]),t&&(this.offset+=2),i},i.readUInt16=i.readUint16,i.writeInt32=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},i.writeInt=i.writeInt32,i.readInt32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)")
;if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),i|=0,t&&(this.offset+=4),i},i.readInt=i.readInt32,i.writeUint32=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),i&&(this.offset+=4),this},i.writeUInt32=i.writeUint32,i.readUint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0),t&&(this.offset+=4),i},i.readUInt32=i.readUint32,e&&(i.writeInt64=function(t,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=t.low,o=t.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=o>>>24&255,this.view[i+2]=o>>>16&255,this.view[i+1]=o>>>8&255,this.view[i]=255&o):(this.view[i]=o>>>24&255,this.view[i+1]=o>>>16&255,this.view[i+2]=o>>>8&255,this.view[i+3]=255&o,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},i.writeLong=i.writeInt64,i.readInt64=function(t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0
;this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0,t+=4,n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0):(n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0,t+=4,r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0);var s=new e(r,n,!1);return i&&(this.offset+=8),s},i.readLong=i.readInt64,i.writeUint64=function(t,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=t.low,o=t.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=o>>>24&255,this.view[i+2]=o>>>16&255,this.view[i+1]=o>>>8&255,this.view[i]=255&o):(this.view[i]=o>>>24&255,this.view[i+1]=o>>>16&255,this.view[i+2]=o>>>8&255,this.view[i+3]=255&o,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},i.writeUInt64=i.writeUint64,i.readUint64=function(t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0,t+=4,n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0):(n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0,t+=4,r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0);var s=new e(r,n,!0);return i&&(this.offset+=8),s},i.readUInt64=i.readUint64),i.writeFloat32=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=4,l(this.view,e,t,this.littleEndian,23,4),i&&(this.offset+=4),this},i.writeFloat=i.writeFloat32,i.readFloat32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)")
;if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var i=a(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),i},i.readFloat=i.readFloat32,i.writeFloat64=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var r=this.buffer.byteLength;return t>r&&this.resize((r*=2)>t?r:t),t-=8,l(this.view,e,t,this.littleEndian,52,8),i&&(this.offset+=8),this},i.writeDouble=i.writeFloat64,i.readFloat64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var i=a(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),i},i.readDouble=i.readFloat64,t.MAX_VARINT32_BYTES=5,t.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},t.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},t.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},i.writeVarint32=function(e,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,s=t.calculateVarint32(e);i+=s;var o=this.buffer.byteLength;for(i>o&&this.resize((o*=2)>i?o:i),i-=s,e>>>=0;e>=128;)n=127&e|128,this.view[i++]=n,e>>>=7;return this.view[i++]=e,r?(this.offset=i,this):s},i.writeVarint32ZigZag=function(e,i){return this.writeVarint32(t.zigZagEncode32(e),i)},i.readVarint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,r=0,n=0;do{if(!this.noAssert&&e>this.limit){var s=Error("Truncated");throw s.truncated=!0,s}i=this.view[e++],r<5&&(n|=(127&i)<<7*r),++r}while(0!=(128&i));return n|=0,t?(this.offset=e,n):{value:n,length:r}},i.readVarint32ZigZag=function(e){var i=this.readVarint32(e);return"object"==typeof i?i.value=t.zigZagDecode32(i.value):i=t.zigZagDecode32(i),i},e&&(t.MAX_VARINT64_BYTES=10,t.calculateVarint64=function(t){"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t));var i=t.toInt()>>>0,r=t.shiftRightUnsigned(28).toInt()>>>0,n=t.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==r?i<16384?i<128?1:2:i<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:n<128?9:10},t.zigZagEncode64=function(t){
return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned()},t.zigZagDecode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftRightUnsigned(1).xor(t.and(e.ONE).toSigned().negate()).toSigned()},i.writeVarint64=function(i,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof i)i=e.fromNumber(i);else if("string"==typeof i)i=e.fromString(i);else if(!(i&&i instanceof e))throw TypeError("Illegal value: "+i+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof i?i=e.fromNumber(i,!1):"string"==typeof i?i=e.fromString(i,!1):!1!==i.unsigned&&(i=i.toSigned());var s=t.calculateVarint64(i),o=i.toInt()>>>0,a=i.shiftRightUnsigned(28).toInt()>>>0,l=i.shiftRightUnsigned(56).toInt()>>>0;r+=s;var f=this.buffer.byteLength;switch(r>f&&this.resize((f*=2)>r?f:r),r-=s,s){case 10:this.view[r+9]=l>>>7&1;case 9:this.view[r+8]=9!==s?128|l:127&l;case 8:this.view[r+7]=8!==s?a>>>21|128:a>>>21&127;case 7:this.view[r+6]=7!==s?a>>>14|128:a>>>14&127;case 6:this.view[r+5]=6!==s?a>>>7|128:a>>>7&127;case 5:this.view[r+4]=5!==s?128|a:127&a;case 4:this.view[r+3]=4!==s?o>>>21|128:o>>>21&127;case 3:this.view[r+2]=3!==s?o>>>14|128:o>>>14&127;case 2:this.view[r+1]=2!==s?o>>>7|128:o>>>7&127;case 1:this.view[r]=1!==s?128|o:127&o}return n?(this.offset+=s,this):s},i.writeVarint64ZigZag=function(e,i){return this.writeVarint64(t.zigZagEncode64(e),i)},i.readVarint64=function(t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=0,s=0,o=0,a=0;if(n=127&(a=this.view[t++]),128&a&&(n|=(127&(a=this.view[t++]))<<7,(128&a||this.noAssert&&void 0===a)&&(n|=(127&(a=this.view[t++]))<<14,(128&a||this.noAssert&&void 0===a)&&(n|=(127&(a=this.view[t++]))<<21,(128&a||this.noAssert&&void 0===a)&&(s=127&(a=this.view[t++]),(128&a||this.noAssert&&void 0===a)&&(s|=(127&(a=this.view[t++]))<<7,(128&a||this.noAssert&&void 0===a)&&(s|=(127&(a=this.view[t++]))<<14,(128&a||this.noAssert&&void 0===a)&&(s|=(127&(a=this.view[t++]))<<21,(128&a||this.noAssert&&void 0===a)&&(o=127&(a=this.view[t++]),(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[t++]))<<7,128&a||this.noAssert&&void 0===a))))))))))throw Error("Buffer overrun");var l=e.fromBits(n|s<<28,s>>>4|o<<24,!1);return i?(this.offset=t,l):{value:l,length:t-r}},i.readVarint64ZigZag=function(i){var r=this.readVarint64(i);return r&&r.value instanceof e?r.value=t.zigZagDecode64(r.value):r=t.zigZagDecode64(r),r}),i.writeCString=function(e,t){var i=void 0===t;i&&(t=this.offset);var r,n=e.length
;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(r=0;r<n;++r)if(0===e.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}n=u.calculateUTF16asUTF8(s(e))[1],t+=n+1;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=n+1,u.encodeUTF16toUTF8(s(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,i?(this.offset=t,this):n},i.readCString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var i,r=e,n=-1;return u.decodeUTF8toUTF16(function(){if(0===n)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(n=this.view[e++])?null:n}.bind(this),i=o(),!0),t?(this.offset=e,i()):{string:i(),length:e-r}},i.writeIString=function(e,t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r,n=t;r=u.calculateUTF16asUTF8(s(e),this.noAssert)[1],t+=4+r;var o=this.buffer.byteLength;if(t>o&&this.resize((o*=2)>t?o:t),t-=4+r,this.littleEndian?(this.view[t+3]=r>>>24&255,this.view[t+2]=r>>>16&255,this.view[t+1]=r>>>8&255,this.view[t]=255&r):(this.view[t]=r>>>24&255,this.view[t+1]=r>>>16&255,this.view[t+2]=r>>>8&255,this.view[t+3]=255&r),t+=4,u.encodeUTF16toUTF8(s(e),function(e){this.view[t++]=e}.bind(this)),t!==n+4+r)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+r));return i?(this.offset=t,this):t-n},i.readIString=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var r=e,n=this.readUint32(e),s=this.readUTF8String(n,t.METRICS_BYTES,e+=4);return e+=s.length,i?(this.offset=e,s.string):{string:s.string,length:e-r}},t.METRICS_CHARS="c",t.METRICS_BYTES="b",i.writeUTF8String=function(e,t){var i,r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n=t;i=u.calculateUTF16asUTF8(s(e))[1],t+=i;var o=this.buffer.byteLength;return t>o&&this.resize((o*=2)>t?o:t),t-=i,u.encodeUTF16toUTF8(s(e),function(e){this.view[t++]=e}.bind(this)),r?(this.offset=t,this):t-n},
i.writeString=i.writeUTF8String,t.calculateUTF8Chars=function(e){return u.calculateUTF16asUTF8(s(e))[0]},t.calculateUTF8Bytes=function(e){return u.calculateUTF16asUTF8(s(e))[1]},t.calculateString=t.calculateUTF8Bytes,i.readUTF8String=function(e,i,r){"number"==typeof i&&(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),void 0===i&&(i=t.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var s,a=0,l=r;if(i===t.METRICS_CHARS){if(s=o(),u.decodeUTF8(function(){return a<e&&r<this.limit?this.view[r++]:null}.bind(this),(function(e){++a,u.UTF8toUTF16(e,s)})),a!==e)throw RangeError("Illegal range: Truncated data, "+a+" == "+e);return n?(this.offset=r,s()):{string:s(),length:r-l}}if(i===t.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+e+") <= "+this.buffer.byteLength)}var f=r+e;if(u.decodeUTF8toUTF16(function(){return r<f?this.view[r++]:null}.bind(this),s=o(),this.noAssert),r!==f)throw RangeError("Illegal range: Truncated data, "+r+" == "+f);return n?(this.offset=r,s()):{string:s(),length:r-l}}throw TypeError("Unsupported metrics: "+i)},i.readString=i.readUTF8String,i.writeVString=function(e,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,o,a=i;n=u.calculateUTF16asUTF8(s(e),this.noAssert)[1],o=t.calculateVarint32(n),i+=o+n;var l=this.buffer.byteLength;if(i>l&&this.resize((l*=2)>i?l:i),i-=o+n,i+=this.writeVarint32(n,i),u.encodeUTF16toUTF8(s(e),function(e){this.view[i++]=e}.bind(this)),i!==a+n+o)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+n+o));return r?(this.offset=i,this):i-a},i.readVString=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,n=this.readVarint32(e),s=this.readUTF8String(n.value,t.METRICS_BYTES,e+=n.length);return e+=s.length,i?(this.offset=e,s.string):{string:s.string,length:e-r}},i.append=function(e,i,r){"number"!=typeof i&&"string"==typeof i||(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}
e instanceof t||(e=t.wrap(e,i));var s=e.limit-e.offset;if(s<=0)return this;r+=s;var o=this.buffer.byteLength;return r>o&&this.resize((o*=2)>r?o:r),r-=s,this.view.set(e.view.subarray(e.offset,e.limit),r),e.offset+=s,n&&(this.offset+=s),this},i.appendTo=function(e,t){return e.append(this,t),this},i.assert=function(e){return this.noAssert=!e,this},i.capacity=function(){return this.buffer.byteLength},i.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},i.clone=function(e){var i=new t(0,this.littleEndian,this.noAssert);return e?(i.buffer=new ArrayBuffer(this.buffer.byteLength),i.view=new Uint8Array(i.buffer)):(i.buffer=this.buffer,i.view=this.view),i.offset=this.offset,i.markedOffset=this.markedOffset,i.limit=this.limit,i},i.compact=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var i=t-e;if(0===i)return this.buffer=r,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),s=new Uint8Array(n);return s.set(this.view.subarray(e,t)),this.buffer=n,this.view=s,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=i,this},i.copy=function(e,i){if(void 0===e&&(e=this.offset),void 0===i&&(i=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(e===i)return new t(0,this.littleEndian,this.noAssert);var r=i-e,n=new t(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=e),this.copyTo(n,0,e,i),n},i.copyTo=function(e,i,r,n){var s,o;if(!this.noAssert&&!t.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(i=(o=void 0===i)?e.offset:0|i,r=(s=void 0===r)?this.offset:0|r,n=void 0===n?this.limit:0|n,i<0||i>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+i+" <= "+e.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var a=n-r;return 0===a?e:(e.ensureCapacity(i+a),e.view.set(this.view.subarray(r,n),i),s&&(this.offset+=a),o&&(e.offset+=a),this)},i.ensureCapacity=function(e){var t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this},i.fill=function(e,t,i){var r=void 0===t;if(r&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),void 0===t&&(t=this.offset),void 0===i&&(i=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,
"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t>=i)return this;for(;t<i;)this.view[t++]=e;return r&&(this.offset=t),this},i.flip=function(){return this.limit=this.offset,this.offset=0,this},i.mark=function(e){if(e=void 0===e?this.offset:e,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},i.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},i.LE=function(e){return this.littleEndian=void 0===e||!!e,this},i.BE=function(e){return this.littleEndian=void 0!==e&&!e,this},i.prepend=function(e,i,r){"number"!=typeof i&&"string"==typeof i||(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}e instanceof t||(e=t.wrap(e,i));var s=e.limit-e.offset;if(s<=0)return this;var o=s-r;if(o>0){var a=new ArrayBuffer(this.buffer.byteLength+o),l=new Uint8Array(a);l.set(this.view.subarray(r,this.buffer.byteLength),s),this.buffer=a,this.view=l,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,r+=o}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),r-s),e.offset=e.limit,n&&(this.offset-=s),this},i.prependTo=function(e,t){return e.prepend(this,t),this},i.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},i.remaining=function(){return this.limit-this.offset},i.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},i.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength<e){var t=new ArrayBuffer(e),i=new Uint8Array(t);i.set(this.view),this.buffer=t,this.view=i}return this},i.reverse=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t||Array.prototype.reverse.call(this.view.subarray(e,t)),this},i.skip=function(e){if(!this.noAssert){
if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},i.slice=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=e,i.limit=t,i},i.toBuffer=function(e){var t=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(!e&&0===t&&i===this.buffer.byteLength)return this.buffer;if(t===i)return r;var n=new ArrayBuffer(i-t);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(t,i),0),n},i.toArrayBuffer=i.toBuffer,i.toString=function(e,t,i){if(void 0===e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(i=t=e="utf8"),e){case"utf8":return this.toUTF8(t,i);case"base64":return this.toBase64(t,i);case"hex":return this.toHex(t,i);case"binary":return this.toBinary(t,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var f=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],r=0,n=t.length;r<n;++r)i[t[r]]=r;return e.encode=function(e,i){for(var r,n;null!==(r=e());)i(t[r>>2&63]),n=(3&r)<<4,null!==(r=e())?(i(t[63&((n|=r>>4&15)|r>>4&15)]),n=(15&r)<<2,null!==(r=e())?(i(t[63&(n|r>>6&3)]),i(t[63&r])):(i(t[63&n]),i(61))):(i(t[63&n]),i(61),i(61))},e.decode=function(e,t){var r,n,s;function o(e){throw Error("Illegal character code: "+e)}for(;null!==(r=e());)if(void 0===(n=i[r])&&o(r),null!==(r=e())&&(void 0===(s=i[r])&&o(r),t(n<<2>>>0|(48&s)>>4),null!==(r=e()))){if(void 0===(n=i[r])){if(61===r)break;o(r)}if(t((15&s)<<4>>>0|(60&n)>>2),null!==(r=e())){if(void 0===(s=i[r])){if(61===r)break;o(r)}t((3&n)<<6>>>0|s)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();i.toBase64=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var i;return f.encode(function(){return e<t?this.view[e++]:null}.bind(this),i=o()),i()},t.fromBase64=function(e,i){
if("string"!=typeof e)throw TypeError("str");var r=new t(e.length/4*3,i),n=0;return f.decode(s(e),(function(e){r.view[n++]=e})),r.limit=n,r},t.btoa=function(e){return t.fromBinary(e).toBase64()},t.atob=function(e){return t.fromBase64(e).toBinary()},i.toBinary=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var i=[],r=[];e<t;)i.push(this.view[e++]),i.length>=1024&&(r.push(String.fromCharCode.apply(String,i)),i=[]);return r.join("")+String.fromCharCode.apply(String,i)},t.fromBinary=function(e,i){if("string"!=typeof e)throw TypeError("str");for(var r,n=0,s=e.length,o=new t(s,i);n<s;){if((r=e.charCodeAt(n))>255)throw RangeError("illegal char code: "+r);o.view[n++]=r}return o.limit=s,o},i.toDebug=function(e){for(var t,i=-1,r=this.buffer.byteLength,n="",s="",o="";i<r;){if(-1!==i&&(n+=(t=this.view[i])<16?"0"+t.toString(16).toUpperCase():t.toString(16).toUpperCase(),e&&(s+=t>32&&t<127?String.fromCharCode(t):".")),++i,e&&i>0&&i%16==0&&i!==r){for(;n.length<51;)n+=" ";o+=n+s+"\n",n=s=""}i===this.offset&&i===this.limit?n+=i===this.markedOffset?"!":"|":i===this.offset?n+=i===this.markedOffset?"[":"<":i===this.limit?n+=i===this.markedOffset?"]":">":n+=i===this.markedOffset?"'":e||0!==i&&i!==r?" ":""}if(e&&" "!==n){for(;n.length<51;)n+=" ";o+=n+s+"\n"}return e?o:n},t.fromDebug=function(e,i,r){for(var n,s,o=e.length,a=new t((o+1)/3|0,i,r),l=0,f=0,u=!1,h=!1,p=!1,d=!1,c=!1;l<o;){switch(n=e.charAt(l++)){case"!":if(!r){if(h||p||d){c=!0;break}h=p=d=!0}a.offset=a.markedOffset=a.limit=f,u=!1;break;case"|":if(!r){if(h||d){c=!0;break}h=d=!0}a.offset=a.limit=f,u=!1;break;case"[":if(!r){if(h||p){c=!0;break}h=p=!0}a.offset=a.markedOffset=f,u=!1;break;case"<":if(!r){if(h){c=!0;break}h=!0}a.offset=f,u=!1;break;case"]":if(!r){if(d||p){c=!0;break}d=p=!0}a.limit=a.markedOffset=f,u=!1;break;case">":if(!r){if(d){c=!0;break}d=!0}a.limit=f,u=!1;break;case"'":if(!r){if(p){c=!0;break}p=!0}a.markedOffset=f,u=!1;break;case" ":u=!1;break;default:if(!r&&u){c=!0;break}if(s=parseInt(n+e.charAt(l++),16),!r&&(isNaN(s)||s<0||s>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[f++]=s,u=!0}if(c)throw TypeError("Illegal str: Invalid symbol at "+l)}if(!r){if(!h||!d)throw TypeError("Illegal str: Missing offset or limit");if(f<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+o)}return a},i.toHex=function(e,t){if(e=void 0===e?this.offset:e,t=void 0===t?this.limit:t,!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var i,r=new Array(t-e);e<t;)(i=this.view[e++])<16?r.push("0",i.toString(16)):r.push(i.toString(16));return r.join("")},t.fromHex=function(e,i,r){if(!r){if("string"!=typeof e)throw TypeError("Illegal str: Not a string")
;if(e.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,s=e.length,o=new t(s/2|0,i),a=0,l=0;a<s;a+=2){if(n=parseInt(e.substring(a,a+2),16),!r&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[l++]=n}return o.limit=l,o};var u=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<128?t(127&i):i<2048?(t(i>>6&31|192),t(63&i|128)):i<65536?(t(i>>12&15|224),t(i>>6&63|128),t(63&i|128)):(t(i>>18&7|240),t(i>>12&63|128),t(i>>6&63|128),t(63&i|128)),i=null},decodeUTF8:function(e,t){for(var i,r,n,s,o=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(i=e());)if(0==(128&i))t(i);else if(192==(224&i))null===(r=e())&&o([i,r]),t((31&i)<<6|63&r);else if(224==(240&i))(null===(r=e())||null===(n=e()))&&o([i,r,n]),t((15&i)<<12|(63&r)<<6|63&n);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(r=e())||null===(n=e())||null===(s=e()))&&o([i,r,n,s]),t((7&i)<<18|(63&r)<<12|(63&n)<<6|63&s)}},UTF16toUTF8:function(e,t){for(var i,r=null;null!==(i=null!==r?r:e());)i>=55296&&i<=57343&&null!==(r=e())&&r>=56320&&r<=57343?(t(1024*(i-55296)+r-56320+65536),r=null):t(i);null!==r&&t(r)},UTF8toUTF16:function(e,t){var i=null;for("number"==typeof e&&(i=e,e=function(){return null});null!==i||null!==(i=e());)i<=65535?t(i):(t(55296+((i-=65536)>>10)),t(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,i){e.UTF16toUTF8(t,(function(t){e.encodeUTF8(t,i)}))},decodeUTF8toUTF16:function(t,i){e.decodeUTF8(t,(function(t){e.UTF8toUTF16(t,i)}))},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,i=0;null!==(t=e());)i+=t<128?1:t<2048?2:t<65536?3:4;return i},calculateUTF16asUTF8:function(t){var i=0,r=0;return e.UTF16toUTF8(t,(function(e){++i,r+=e<128?1:e<2048?2:e<65536?3:4})),[i,r]}};return e}();return i.toUTF8=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var i;try{u.decodeUTF8toUTF16(function(){return e<t?this.view[e++]:null}.bind(this),i=o())}catch(r){if(e!==t)throw RangeError("Illegal range: Truncated data, "+e+" != "+t)}return i()},t.fromUTF8=function(e,i,r){if(!r&&"string"!=typeof e)throw TypeError("Illegal str: Not a string");var n=new t(u.calculateUTF16asUTF8(s(e),!0)[1],i,r),o=0;return u.encodeUTF16toUTF8(s(e),(function(e){n.view[o++]=e})),n.limit=o,n},t})?r.apply(t,n):r)||(e.exports=s)},DPDv:function(e,t,i){(function(r){var n,s,o;s=[i("DGy1")],void 0===(o="function"==typeof(n=function(e,t){"use strict";var n,s={};return s.ByteBuffer=e,s.Long=e.Long||null,s.VERSION="5.0.3",s.WIRE_TYPES={},s.WIRE_TYPES.VARINT=0,
s.WIRE_TYPES.BITS64=1,s.WIRE_TYPES.LDELIM=2,s.WIRE_TYPES.STARTGROUP=3,s.WIRE_TYPES.ENDGROUP=4,s.WIRE_TYPES.BITS32=5,s.PACKABLE_WIRE_TYPES=[s.WIRE_TYPES.VARINT,s.WIRE_TYPES.BITS64,s.WIRE_TYPES.BITS32],s.TYPES={int32:{name:"int32",wireType:s.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:s.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:s.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:s.WIRE_TYPES.VARINT,defaultValue:s.Long?s.Long.ZERO:void 0},uint64:{name:"uint64",wireType:s.WIRE_TYPES.VARINT,defaultValue:s.Long?s.Long.UZERO:void 0},sint64:{name:"sint64",wireType:s.WIRE_TYPES.VARINT,defaultValue:s.Long?s.Long.ZERO:void 0},bool:{name:"bool",wireType:s.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:s.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:s.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:s.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:s.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:s.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:s.WIRE_TYPES.BITS64,defaultValue:s.Long?s.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:s.WIRE_TYPES.BITS64,defaultValue:s.Long?s.Long.ZERO:void 0},float:{name:"float",wireType:s.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:s.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:s.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:s.WIRE_TYPES.STARTGROUP,defaultValue:null}},s.MAP_KEY_TYPES=[s.TYPES.int32,s.TYPES.sint32,s.TYPES.sfixed32,s.TYPES.uint32,s.TYPES.fixed32,s.TYPES.int64,s.TYPES.sint64,s.TYPES.sfixed64,s.TYPES.uint64,s.TYPES.fixed64,s.TYPES.bool,s.TYPES.string,s.TYPES.bytes],s.ID_MIN=1,s.ID_MAX=536870911,s.convertFieldsToCamelCase=!1,s.populateAccessors=!0,s.populateDefaults=!0,s.Util=((n={}).IS_NODE=!("object"!=typeof r||r+""!="[object process]"||r.browser),n.XHR=function(){for(var e=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],t=null,i=0;i<e.length;i++){try{t=e[i]()}catch(r){continue}break}if(!t)throw Error("XMLHttpRequest is not supported");return t},n.fetch=function(e,t){if(t&&"function"!=typeof t&&(t=null),n.IS_NODE){var r=i(1);if(t)r.readFile(e,(function(e,i){t(e?null:""+i)}));else try{return r.readFileSync(e)}catch(o){return null}}else{var s=n.XHR();if(s.open("GET",e,!!t),s.setRequestHeader("Accept","text/plain"),"function"==typeof s.overrideMimeType&&s.overrideMimeType("text/plain"),!t)return s.send(null),200==s.status||0==s.status&&"string"==typeof s.responseText?s.responseText:null;if(s.onreadystatechange=function(){4==s.readyState&&(200==s.status||0==s.status&&"string"==typeof s.responseText?t(s.responseText):t(null))},4==s.readyState)return;s.send(null)}},n.toCamelCase=function(e){return e.replace(/_([a-zA-Z])/g,(function(e,t){return t.toUpperCase()}))},n),s.Lang={
DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},s.Reflect=function(t){var i={},r=function(e,t,i){this.builder=e,this.parent=t,this.name=i,this.className},n=r.prototype;n.fqn=function(){for(var e=this.name,t=this;null!=(t=t.parent);)e=t.name+"."+e;return e},n.toString=function(e){return(e?this.className+" ":"")+this.fqn()},n.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},i.T=r;var s=function(e,t,i,n,s){r.call(this,e,t,i),this.className="Namespace",this.children=[],this.options=n||{},this.syntax=s||"proto2"},o=s.prototype=Object.create(r.prototype);o.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],i=0,r=this.children.length;i<r;++i)this.children[i]instanceof e&&t.push(this.children[i]);return t},o.addChild=function(e){var t;if(t=this.getChild(e.name))if(t instanceof u.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName))t.name=t.originalName;else{if(!(e instanceof u.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+e.name);e.name=e.originalName}this.children.push(e)},o.getChild=function(e){for(var t="number"==typeof e?"id":"name",i=0,r=this.children.length;i<r;++i)if(this.children[i][t]===e)return this.children[i];return null},o.resolve=function(e,t){var r,n="string"==typeof e?e.split("."):e,s=this,o=0;if(""===n[o]){for(;null!==s.parent;)s=s.parent;o++}do{do{if(!(s instanceof i.Namespace)){s=null;break}if(!(r=s.getChild(n[o]))||!(r instanceof i.T)||t&&!(r instanceof i.Namespace)){s=null;break}s=r,o++}while(o<n.length);if(null!=s)break;if(null!==this.parent)return this.parent.resolve(e,t)}while(null!=s);return s},o.qn=function(e){var t=[],r=e;do{t.unshift(r.name),r=r.parent}while(null!==r);for(var n=1;n<=t.length;n++){var s=t.slice(t.length-n);if(e===this.resolve(s,e instanceof i.Namespace))return s.join(".")}return e.fqn()},o.build=function(){for(var e,t={},i=this.children,r=0,n=i.length;r<n;++r)(e=i[r])instanceof s&&(t[e.name]=e.build());return Object.defineProperty&&Object.defineProperty(t,"$options",{value:this.buildOpt()}),t},o.buildOpt=function(){
for(var e={},t=Object.keys(this.options),i=0,r=t.length;i<r;++i){var n=t[i],s=this.options[t[i]];e[n]=s}return e},o.getOption=function(e){return void 0===e?this.options:void 0!==this.options[e]?this.options[e]:null},i.Namespace=s;var a=function(e,i,r,n,s){if(this.type=e,this.resolvedType=i,this.isMapKey=r,this.syntax=n,this.name=s,r&&t.MAP_KEY_TYPES.indexOf(e)<0)throw Error("Invalid map key type: "+e.name)},l=a.prototype;function f(e,i){if(e&&"number"==typeof e.low&&"number"==typeof e.high&&"boolean"==typeof e.unsigned&&e.low==e.low&&e.high==e.high)return new t.Long(e.low,e.high,void 0===i?e.unsigned:i);if("string"==typeof e)return t.Long.fromString(e,i||!1,10);if("number"==typeof e)return t.Long.fromNumber(e,i||!1);throw Error("not convertible to Long")}a.defaultFieldValue=function(i){if("string"==typeof i&&(i=t.TYPES[i]),void 0===i.defaultValue)throw Error("default value for type "+i.name+" is not supported");return i==t.TYPES.bytes?new e(0):i.defaultValue},l.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},l.verifyValue=function(i){var r=this;function n(e,t){throw Error("Illegal value for "+r.toString(!0)+" of type "+r.type.name+": "+e+" ("+t+")")}switch(this.type){case t.TYPES.int32:case t.TYPES.sint32:case t.TYPES.sfixed32:return("number"!=typeof i||i==i&&i%1!=0)&&n(typeof i,"not an integer"),i>4294967295?0|i:i;case t.TYPES.uint32:case t.TYPES.fixed32:return("number"!=typeof i||i==i&&i%1!=0)&&n(typeof i,"not an integer"),i<0?i>>>0:i;case t.TYPES.int64:case t.TYPES.sint64:case t.TYPES.sfixed64:if(t.Long)try{return f(i,!1)}catch(l){n(typeof i,l.message)}else n(typeof i,"requires Long.js");case t.TYPES.uint64:case t.TYPES.fixed64:if(t.Long)try{return f(i,!0)}catch(l){n(typeof i,l.message)}else n(typeof i,"requires Long.js");case t.TYPES.bool:return"boolean"!=typeof i&&n(typeof i,"not a boolean"),i;case t.TYPES.float:case t.TYPES.double:return"number"!=typeof i&&n(typeof i,"not a number"),i;case t.TYPES.string:return"string"==typeof i||i&&i instanceof String||n(typeof i,"not a string"),""+i;case t.TYPES.bytes:return e.isByteBuffer(i)?i:e.wrap(i,"base64");case t.TYPES.enum:var s=this.resolvedType.getChildren(t.Reflect.Enum.Value);for(a=0;a<s.length;a++){if(s[a].name==i)return s[a].id;if(s[a].id==i)return s[a].id}if("proto3"===this.syntax)return("number"!=typeof i||i==i&&i%1!=0)&&n(typeof i,"not an integer"),(i>4294967295||i<0)&&n(typeof i,"not in range for uint32"),i;n(i,"not a valid enum value");case t.TYPES.group:case t.TYPES.message:if(i&&"object"==typeof i||n(typeof i,"object expected"),i instanceof this.resolvedType.clazz)return i;if(i instanceof t.Builder.Message){var o={};for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);i=o}return new this.resolvedType.clazz(i)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+i+" (undefined type "+this.type+")")},l.calculateLength=function(i,r){if(null===r)return 0;var n;switch(this.type){case t.TYPES.int32:return r<0?e.calculateVarint64(r):e.calculateVarint32(r);case t.TYPES.uint32:return e.calculateVarint32(r)
;case t.TYPES.sint32:return e.calculateVarint32(e.zigZagEncode32(r));case t.TYPES.fixed32:case t.TYPES.sfixed32:case t.TYPES.float:return 4;case t.TYPES.int64:case t.TYPES.uint64:return e.calculateVarint64(r);case t.TYPES.sint64:return e.calculateVarint64(e.zigZagEncode64(r));case t.TYPES.fixed64:case t.TYPES.sfixed64:return 8;case t.TYPES.bool:return 1;case t.TYPES.enum:return e.calculateVarint32(r);case t.TYPES.double:return 8;case t.TYPES.string:return n=e.calculateUTF8Bytes(r),e.calculateVarint32(n)+n;case t.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");return e.calculateVarint32(r.remaining())+r.remaining();case t.TYPES.message:return n=this.resolvedType.calculate(r),e.calculateVarint32(n)+n;case t.TYPES.group:return(n=this.resolvedType.calculate(r))+e.calculateVarint32(i<<3|t.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")},l.encodeValue=function(i,r,n){if(null===r)return n;switch(this.type){case t.TYPES.int32:r<0?n.writeVarint64(r):n.writeVarint32(r);break;case t.TYPES.uint32:n.writeVarint32(r);break;case t.TYPES.sint32:n.writeVarint32ZigZag(r);break;case t.TYPES.fixed32:n.writeUint32(r);break;case t.TYPES.sfixed32:n.writeInt32(r);break;case t.TYPES.int64:case t.TYPES.uint64:n.writeVarint64(r);break;case t.TYPES.sint64:n.writeVarint64ZigZag(r);break;case t.TYPES.fixed64:n.writeUint64(r);break;case t.TYPES.sfixed64:n.writeInt64(r);break;case t.TYPES.bool:"string"==typeof r?n.writeVarint32("false"===r.toLowerCase()?0:!!r):n.writeVarint32(r?1:0);break;case t.TYPES.enum:n.writeVarint32(r);break;case t.TYPES.float:n.writeFloat32(r);break;case t.TYPES.double:n.writeFloat64(r);break;case t.TYPES.string:n.writeVString(r);break;case t.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");var s=r.offset;n.writeVarint32(r.remaining()),n.append(r),r.offset=s;break;case t.TYPES.message:var o=(new e).LE();this.resolvedType.encode(r,o),n.writeVarint32(o.offset),n.append(o.flip());break;case t.TYPES.group:this.resolvedType.encode(r,n),n.writeVarint32(i<<3|t.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")}return n},l.decode=function(e,i,r){if(i!=this.type.wireType)throw Error("Unexpected wire type for element");var n,s;switch(this.type){case t.TYPES.int32:return 0|e.readVarint32();case t.TYPES.uint32:return e.readVarint32()>>>0;case t.TYPES.sint32:return 0|e.readVarint32ZigZag();case t.TYPES.fixed32:return e.readUint32()>>>0;case t.TYPES.sfixed32:return 0|e.readInt32();case t.TYPES.int64:return e.readVarint64();case t.TYPES.uint64:return e.readVarint64().toUnsigned();case t.TYPES.sint64:return e.readVarint64ZigZag();case t.TYPES.fixed64:return e.readUint64();case t.TYPES.sfixed64:return e.readInt64();case t.TYPES.bool:return!!e.readVarint32();case t.TYPES.enum:return e.readVarint32();case t.TYPES.float:return e.readFloat()
;case t.TYPES.double:return e.readDouble();case t.TYPES.string:return e.readVString();case t.TYPES.bytes:if(s=e.readVarint32(),e.remaining()<s)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+s+" required but got only "+e.remaining());return(n=e.clone()).limit=n.offset+s,e.offset+=s,n;case t.TYPES.message:return s=e.readVarint32(),this.resolvedType.decode(e,s);case t.TYPES.group:return this.resolvedType.decode(e,-1,r)}throw Error("[INTERNAL] Illegal decode type")},l.valueFromString=function(i){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case t.TYPES.int32:case t.TYPES.sint32:case t.TYPES.sfixed32:case t.TYPES.uint32:case t.TYPES.fixed32:return this.verifyValue(parseInt(i));case t.TYPES.int64:case t.TYPES.sint64:case t.TYPES.sfixed64:case t.TYPES.uint64:case t.TYPES.fixed64:return this.verifyValue(i);case t.TYPES.bool:return"true"===i;case t.TYPES.string:return this.verifyValue(i);case t.TYPES.bytes:return e.fromBinary(i)}},l.valueToString=function(e){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===t.TYPES.bytes?e.toString("binary"):e.toString()},i.Element=a;var u=function(e,t,i,r,n,o){s.call(this,e,t,i,r,o),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!n,this._fields=null,this._fieldsById=null,this._fieldsByName=null},h=u.prototype=Object.create(s.prototype);function p(e,i){var r=i.readVarint32(),n=7&r,s=r>>>3;switch(n){case t.WIRE_TYPES.VARINT:do{r=i.readUint8()}while(128==(128&r));break;case t.WIRE_TYPES.BITS64:i.offset+=8;break;case t.WIRE_TYPES.LDELIM:r=i.readVarint32(),i.offset+=r;break;case t.WIRE_TYPES.STARTGROUP:p(s,i);break;case t.WIRE_TYPES.ENDGROUP:if(s===e)return!1;throw Error("Illegal GROUPEND after unknown group: "+s+" ("+e+" expected)");case t.WIRE_TYPES.BITS32:i.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+e+": "+n)}return!0}h.build=function(i){if(this.clazz&&!i)return this.clazz;var r=function(t,i){var r=i.getChildren(t.Reflect.Message.Field),n=i.getChildren(t.Reflect.Message.OneOf),s=function(o,a){t.Builder.Message.call(this);for(var l=0,f=n.length;l<f;++l)this[n[l].name]=null;for(l=0,f=r.length;l<f;++l){var u=r[l];this[u.name]=u.repeated?[]:u.map?new t.Map(u):null,!u.required&&"proto3"!==i.syntax||null===u.defaultValue||(this[u.name]=u.defaultValue)}var h;if(arguments.length>0)if(1!==arguments.length||null===o||"object"!=typeof o||!("function"!=typeof o.encode||o instanceof s)||Array.isArray(o)||o instanceof t.Map||e.isByteBuffer(o)||o instanceof ArrayBuffer||t.Long&&o instanceof t.Long)for(l=0,f=arguments.length;l<f;++l)void 0!==(h=arguments[l])&&this.$set(r[l].name,h);else this.$set(o)},o=s.prototype=Object.create(t.Builder.Message.prototype);o.add=function(e,r,n){var s=i._fieldsByName[e];if(!n){if(!s)throw Error(this+"#"+e+" is undefined");if(!(s instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+s.toString(!0));if(!s.repeated)throw Error(this+"#"+e+" is not a repeated field")
;r=s.verifyValue(r,!0)}return null===this[e]&&(this[e]=[]),this[e].push(r),this},o.$add=o.add,o.set=function(e,r,n){if(e&&"object"==typeof e){for(var s in n=r,e)e.hasOwnProperty(s)&&void 0!==(r=e[s])&&void 0===i._oneofsByName[s]&&this.$set(s,r,n);return this}var o=i._fieldsByName[e];if(n)this[e]=r;else{if(!o)throw Error(this+"#"+e+" is not a field: undefined");if(!(o instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+o.toString(!0));this[o.name]=r=o.verifyValue(r)}if(o&&o.oneof){var a=this[o.oneof.name];null!==r?(null!==a&&a!==o.name&&(this[a]=null),this[o.oneof.name]=o.name):a===e&&(this[o.oneof.name]=null)}return this},o.$set=o.set,o.get=function(e,r){if(r)return this[e];var n=i._fieldsByName[e];if(!(n&&n instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: undefined");if(!(n instanceof t.Reflect.Message.Field))throw Error(this+"#"+e+" is not a field: "+n.toString(!0));return this[n.name]},o.$get=o.get;for(var a=0;a<r.length;a++){var l=r[a];l instanceof t.Reflect.Message.ExtensionField||i.builder.options.populateAccessors&&function(e){var t=e.originalName.replace(/(_[a-zA-Z])/g,(function(e){return e.toUpperCase().replace("_","")}));t=t.substring(0,1).toUpperCase()+t.substring(1);var r=e.originalName.replace(/([A-Z])/g,(function(e){return"_"+e})),n=function(t,i){return this[e.name]=i?t:e.verifyValue(t),this},s=function(){return this[e.name]};null===i.getChild("set"+t)&&(o["set"+t]=n),null===i.getChild("set_"+r)&&(o["set_"+r]=n),null===i.getChild("get"+t)&&(o["get"+t]=s),null===i.getChild("get_"+r)&&(o["get_"+r]=s)}(l)}function f(i,r,n,s){if(null===i||"object"!=typeof i){if(s&&s instanceof t.Reflect.Enum){var o=t.Reflect.Enum.getName(s.object,i);if(null!==o)return o}return i}if(e.isByteBuffer(i))return r?i.toBase64():i.toBuffer();if(t.Long.isLong(i))return n?i.toString():t.Long.fromValue(i);var a;if(Array.isArray(i))return a=[],i.forEach((function(e,t){a[t]=f(e,r,n,s)})),a;if(a={},i instanceof t.Map){for(var l=i.entries(),u=l.next();!u.done;u=l.next())a[i.keyElem.valueToString(u.value[0])]=f(u.value[1],r,n,i.valueElem.resolvedType);return a}var h=i.$type,p=void 0;for(var d in i)i.hasOwnProperty(d)&&(h&&(p=h.getChild(d))?a[d]=f(i[d],r,n,p.resolvedType):a[d]=f(i[d],r,n));return a}return o.encode=function(t,r){"boolean"==typeof t&&(r=t,t=void 0);var n=!1;t||(t=new e,n=!0);var s=t.littleEndian;try{return i.encode(this,t.LE(),r),(n?t.flip():t).LE(s)}catch(o){throw t.LE(s),o}},s.encode=function(e,t,i){return new s(e).encode(t,i)},o.calculate=function(){return i.calculate(this)},o.encodeDelimited=function(t,r){var n=!1;t||(t=new e,n=!0);var s=(new e).LE();return i.encode(this,s,r).flip(),t.writeVarint32(s.remaining()),t.append(s),n?t.flip():t},o.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toArrayBuffer()),e}},o.toArrayBuffer=o.encodeAB,o.encodeNB=function(){try{return this.encode().toBuffer()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBuffer()),e}},o.toBuffer=o.encodeNB,o.encode64=function(){try{
return this.encode().toBase64()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toBase64()),e}},o.toBase64=o.encode64,o.encodeHex=function(){try{return this.encode().toHex()}catch(e){throw e.encoded&&(e.encoded=e.encoded.toHex()),e}},o.toHex=o.encodeHex,o.toRaw=function(e,t){return f(this,!!e,!!t,this.$type)},o.encodeJSON=function(){return JSON.stringify(f(this,!0,!0,this.$type))},s.decode=function(t,r,n){"string"==typeof r&&(n=r,r=-1),"string"==typeof t?t=e.wrap(t,n||"base64"):e.isByteBuffer(t)||(t=e.wrap(t));var s=t.littleEndian;try{var o=i.decode(t.LE(),r);return t.LE(s),o}catch(a){throw t.LE(s),a}},s.decodeDelimited=function(t,r){if("string"==typeof t?t=e.wrap(t,r||"base64"):e.isByteBuffer(t)||(t=e.wrap(t)),t.remaining()<1)return null;var n=t.offset,s=t.readVarint32();if(t.remaining()<s)return t.offset=n,null;try{var o=i.decode(t.slice(t.offset,t.offset+s).LE());return t.offset+=s,o}catch(a){throw t.offset+=s,a}},s.decode64=function(e){return s.decode(e,"base64")},s.decodeHex=function(e){return s.decode(e,"hex")},s.decodeJSON=function(e){return new s(JSON.parse(e))},o.toString=function(){return i.toString()},Object.defineProperty&&(Object.defineProperty(s,"$options",{value:i.buildOpt()}),Object.defineProperty(o,"$options",{value:s.$options}),Object.defineProperty(s,"$type",{value:i}),Object.defineProperty(o,"$type",{value:i})),s}(t,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var n,s=0,o=this.children.length;s<o;s++)if((n=this.children[s])instanceof m||n instanceof u||n instanceof b){if(r.hasOwnProperty(n.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+n.toString(!0)+" cannot override static property '"+n.name+"'");r[n.name]=n.build()}else if(n instanceof u.Field)n.build(),this._fields.push(n),this._fieldsById[n.id]=n,this._fieldsByName[n.name]=n;else if(n instanceof u.OneOf)this._oneofsByName[n.name]=n;else if(!(n instanceof u.OneOf||n instanceof v))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[s].toString(!0));return this.clazz=r},h.encode=function(e,t,i){for(var r,n,s=null,o=0,a=this._fields.length;o<a;++o)n=e[(r=this._fields[o]).name],r.required&&null===n?null===s&&(s=r):r.encode(i?n:r.verifyValue(n),t,e);if(null!==s){var l=Error("Missing at least one required field for "+this.toString(!0)+": "+s);throw l.encoded=t,l}return t},h.calculate=function(e){for(var t,i,r=0,n=0,s=this._fields.length;n<s;++n){if(i=e[(t=this._fields[n]).name],t.required&&null===i)throw Error("Missing at least one required field for "+this.toString(!0)+": "+t);r+=t.calculate(i,e)}return r},h.decode=function(e,i,r){"number"!=typeof i&&(i=-1);for(var n,s,o,a,l=e.offset,f=new this.clazz;e.offset<l+i||-1===i&&e.remaining()>0;){if(o=(n=e.readVarint32())>>>3,(s=7&n)===t.WIRE_TYPES.ENDGROUP){if(o!==r)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+o+" ("+(r?r+" expected":"not a group")+")");break}if(a=this._fieldsById[o]){if(a.repeated&&!a.options.packed)f[a.name].push(a.decode(s,e));else if(a.map){var u=a.decode(s,e)
;f[a.name].set(u[0],u[1])}else if(f[a.name]=a.decode(s,e),a.oneof){var h=f[a.oneof.name];null!==h&&h!==a.name&&(f[h]=null),f[a.oneof.name]=a.name}}else switch(s){case t.WIRE_TYPES.VARINT:e.readVarint32();break;case t.WIRE_TYPES.BITS32:e.offset+=4;break;case t.WIRE_TYPES.BITS64:e.offset+=8;break;case t.WIRE_TYPES.LDELIM:var d=e.readVarint32();e.offset+=d;break;case t.WIRE_TYPES.STARTGROUP:for(;p(o,e););break;default:throw Error("Illegal wire type for unknown field "+o+" in "+this.toString(!0)+"#decode: "+s)}}for(var c=0,y=this._fields.length;c<y;++c)if(null===f[(a=this._fields[c]).name])if("proto3"===this.syntax)f[a.name]=a.defaultValue;else{if(a.required){var m=Error("Missing at least one required field for "+this.toString(!0)+": "+a.name);throw m.decoded=f,m}t.populateDefaults&&null!==a.defaultValue&&(f[a.name]=a.defaultValue)}return f},i.Message=u;var d=function(e,i,n,s,o,a,l,f,h,p){r.call(this,e,i,a),this.className="Message.Field",this.required="required"===n,this.repeated="repeated"===n,this.map="map"===n,this.keyType=s||null,this.type=o,this.resolvedType=null,this.id=l,this.options=f||{},this.defaultValue=null,this.oneof=h||null,this.syntax=p||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,!this.builder.options.convertFieldsToCamelCase||this instanceof u.ExtensionField||(this.name=t.Util.toCamelCase(this.name))},c=d.prototype=Object.create(r.prototype);c.build=function(){this.element=new a(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new a(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?void 0!==this.options.default&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=a.defaultFieldValue(this.type)},c.verifyValue=function(e,i){i=i||!1;var r,n=this;function s(e,t){throw Error("Illegal value for "+n.toString(!0)+" of type "+n.type.name+": "+e+" ("+t+")")}if(null===e)return this.required&&s(typeof e,"required"),"proto3"===this.syntax&&this.type!==t.TYPES.message&&s(typeof e,"proto3 field without field presence cannot be null"),null;if(this.repeated&&!i){Array.isArray(e)||(e=[e]);var o=[];for(r=0;r<e.length;r++)o.push(this.element.verifyValue(e[r]));return o}return this.map&&!i?e instanceof t.Map?e:(e instanceof Object||s(typeof e,"expected ProtoBuf.Map or raw object for map field"),new t.Map(this,e)):(!this.repeated&&Array.isArray(e)&&s(typeof e,"no array expected"),this.element.verifyValue(e))},c.hasWirePresence=function(e,i){if("proto3"!==this.syntax)return null!==e;if(this.oneof&&i[this.oneof.name]===this.name)return!0;switch(this.type){case t.TYPES.int32:case t.TYPES.sint32:case t.TYPES.sfixed32:case t.TYPES.uint32:case t.TYPES.fixed32:return 0!==e;case t.TYPES.int64:case t.TYPES.sint64:case t.TYPES.sfixed64:case t.TYPES.uint64:case t.TYPES.fixed64:return 0!==e.low||0!==e.high;case t.TYPES.bool:return e;case t.TYPES.float:case t.TYPES.double:return 0!==e;case t.TYPES.string:return e.length>0;case t.TYPES.bytes:return e.remaining()>0;case t.TYPES.enum:return 0!==e
;case t.TYPES.message:return null!==e;default:return!0}},c.encode=function(i,r,n){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===i||this.repeated&&0==i.length)return r;try{var s;if(this.repeated)if(this.options.packed&&t.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){r.writeVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),r.ensureCapacity(r.offset+=1);var o=r.offset;for(s=0;s<i.length;s++)this.element.encodeValue(this.id,i[s],r);var a=r.offset-o,l=e.calculateVarint32(a);if(l>1){var f=r.slice(o,r.offset);o+=l-1,r.offset=o,r.append(f)}r.writeVarint32(a,o-l)}else for(s=0;s<i.length;s++)r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,i[s],r);else this.map?i.forEach((function(i,n,s){var o=e.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,n)+e.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,i);r.writeVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),r.writeVarint32(o),r.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,n,r),r.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,i,r)}),this):this.hasWirePresence(i,n)&&(r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,i,r))}catch(u){throw Error("Illegal value for "+this.toString(!0)+": "+i+" ("+u+")")}return r},c.calculate=function(i,r){if(i=this.verifyValue(i),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===i||this.repeated&&0==i.length)return 0;var n=0;try{var s,o;if(this.repeated)if(this.options.packed&&t.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(n+=e.calculateVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),o=0,s=0;s<i.length;s++)o+=this.element.calculateLength(this.id,i[s]);n+=e.calculateVarint32(o),n+=o}else for(s=0;s<i.length;s++)n+=e.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,i[s]);else this.map?i.forEach((function(i,r,s){var o=e.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,r)+e.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,i);n+=e.calculateVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),n+=e.calculateVarint32(o),n+=o}),this):this.hasWirePresence(i,r)&&(n+=e.calculateVarint32(this.id<<3|this.type.wireType),n+=this.element.calculateLength(this.id,i))}catch(a){throw Error("Illegal value for "+this.toString(!0)+": "+i+" ("+a+")")}return n},c.decode=function(e,i,r){var n,s;if(!(!this.map&&e==this.type.wireType||!r&&this.repeated&&this.options.packed&&e==t.WIRE_TYPES.LDELIM||this.map&&e==t.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+e+" ("+this.type.wireType+" expected)");if(e==t.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&t.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!r){s=i.readVarint32(),s=i.offset+s;for(var o=[];i.offset<s;)o.push(this.decode(this.type.wireType,i,!0));return o}if(this.map){
var l=a.defaultFieldValue(this.keyType);if(n=a.defaultFieldValue(this.type),s=i.readVarint32(),i.remaining()<s)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+s+" required but got only "+i.remaining());var f=i.clone();for(f.limit=f.offset+s,i.offset+=s;f.remaining()>0;){var u=f.readVarint32();e=7&u;var h=u>>>3;if(1===h)l=this.keyElement.decode(f,e,h);else{if(2!==h)throw Error("Unexpected tag in map field key/value submessage");n=this.element.decode(f,e,h)}}return[l,n]}return this.element.decode(i,e,this.id)},i.Message.Field=d;var y=function(e,t,i,r,n,s,o){d.call(this,e,t,i,null,r,n,s,o),this.extension};y.prototype=Object.create(d.prototype),i.Message.ExtensionField=y,i.Message.OneOf=function(e,t,i){r.call(this,e,t,i),this.fields=[]};var m=function(e,t,i,r,n){s.call(this,e,t,i,r,n),this.className="Enum",this.object=null};m.getName=function(e,t){for(var i,r=Object.keys(e),n=0;n<r.length;++n)if(e[i=r[n]]===t)return i;return null},(m.prototype=Object.create(s.prototype)).build=function(e){if(this.object&&!e)return this.object;for(var i=new t.Builder.Enum,r=this.getChildren(m.Value),n=0,s=r.length;n<s;++n)i[r[n].name]=r[n].id;return Object.defineProperty&&Object.defineProperty(i,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=i},i.Enum=m;var g=function(e,t,i,n){r.call(this,e,t,i),this.className="Enum.Value",this.id=n};g.prototype=Object.create(r.prototype),i.Enum.Value=g;var v=function(e,t,i,n){r.call(this,e,t,i),this.field=n};v.prototype=Object.create(r.prototype),i.Extension=v;var b=function(e,t,i,r){s.call(this,e,t,i,r),this.className="Service",this.clazz=null};(b.prototype=Object.create(s.prototype)).build=function(i){return this.clazz&&!i?this.clazz:this.clazz=function(t,i){for(var r=function(e){t.Builder.Service.call(this),this.rpcImpl=e||function(e,t,i){setTimeout(i.bind(this,Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")),0)}},n=r.prototype=Object.create(t.Builder.Service.prototype),s=i.getChildren(t.Reflect.Service.RPCMethod),o=0;o<s.length;o++)!function(t){n[t.name]=function(r,n){try{try{r=t.resolvedRequestType.clazz.decode(e.wrap(r))}catch(s){if(!(s instanceof TypeError))throw s}if(null===r||"object"!=typeof r)throw Error("Illegal arguments");r instanceof t.resolvedRequestType.clazz||(r=new t.resolvedRequestType.clazz(r)),this.rpcImpl(t.fqn(),r,(function(e,r){if(e)n(e);else{null===r&&(r="");try{r=t.resolvedResponseType.clazz.decode(r)}catch(s){}r&&r instanceof t.resolvedResponseType.clazz?n(null,r):n(Error("Illegal response type received in service method "+i.name+"#"+t.name))}}))}catch(s){setTimeout(n.bind(this,s),0)}},r[t.name]=function(e,i,n){new r(e)[t.name](i,n)},Object.defineProperty&&(Object.defineProperty(r[t.name],"$options",{value:t.buildOpt()}),Object.defineProperty(n[t.name],"$options",{value:r[t.name].$options}))}(s[o]);return Object.defineProperty&&(Object.defineProperty(r,"$options",{value:i.buildOpt()}),Object.defineProperty(n,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:i}),
Object.defineProperty(n,"$type",{value:i})),r}(t,this)},i.Service=b;var w=function(e,t,i,n){r.call(this,e,t,i),this.className="Service.Method",this.options=n||{}};(w.prototype=Object.create(r.prototype)).buildOpt=o.buildOpt,i.Service.Method=w;var E=function(e,t,i,r,n,s,o,a){w.call(this,e,t,i,a),this.className="Service.RPCMethod",this.requestName=r,this.responseName=n,this.requestStream=s,this.responseStream=o,this.resolvedRequestType=null,this.resolvedResponseType=null};return E.prototype=Object.create(w.prototype),i.Service.RPCMethod=E,i}(s),s.Builder=function(e,t,r){var n=function(e){this.ns=new r.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=e||{}},s=n.prototype;return n.isMessage=function(e){return"string"==typeof e.name&&void 0===e.values&&void 0===e.rpc},n.isMessageField=function(e){return"string"==typeof e.rule&&"string"==typeof e.name&&"string"==typeof e.type&&void 0!==e.id},n.isEnum=function(e){return"string"==typeof e.name&&!(void 0===e.values||!Array.isArray(e.values)||0===e.values.length)},n.isService=function(e){return!("string"!=typeof e.name||"object"!=typeof e.rpc||!e.rpc)},n.isExtend=function(e){return"string"==typeof e.ref},s.reset=function(){return this.ptr=this.ns,this},s.define=function(e){if("string"!=typeof e||!t.TYPEREF.test(e))throw Error("illegal namespace: "+e);return e.split(".").forEach((function(e){var t=this.ptr.getChild(e);null===t&&this.ptr.addChild(t=new r.Namespace(this,this.ptr,e)),this.ptr=t}),this),this},s.create=function(t){if(!t)return this;if(Array.isArray(t)){if(0===t.length)return this;t=t.slice()}else t=[t];for(var i=[t];i.length>0;){if(t=i.pop(),!Array.isArray(t))throw Error("not a valid namespace: "+JSON.stringify(t));for(;t.length>0;){var s=t.shift();if(n.isMessage(s)){var o=new r.Message(this,this.ptr,s.name,s.options,s.isGroup,s.syntax),a={};s.oneofs&&Object.keys(s.oneofs).forEach((function(e){o.addChild(a[e]=new r.Message.OneOf(this,o,e))}),this),s.fields&&s.fields.forEach((function(e){if(null!==o.getChild(0|e.id))throw Error("duplicate or invalid field id in "+o.name+": "+e.id);if(e.options&&"object"!=typeof e.options)throw Error("illegal field options in "+o.name+"#"+e.name);var t=null;if("string"==typeof e.oneof&&!(t=a[e.oneof]))throw Error("illegal oneof in "+o.name+"#"+e.name+": "+e.oneof);e=new r.Message.Field(this,o,e.rule,e.keytype,e.type,e.name,e.id,e.options,t,s.syntax),t&&t.fields.push(e),o.addChild(e)}),this);var l=[];if(s.enums&&s.enums.forEach((function(e){l.push(e)})),s.messages&&s.messages.forEach((function(e){l.push(e)})),s.services&&s.services.forEach((function(e){l.push(e)})),s.extensions&&("number"==typeof s.extensions[0]?o.extensions=[s.extensions]:o.extensions=s.extensions),this.ptr.addChild(o),l.length>0){i.push(t),t=l,l=null,this.ptr=o,o=null;continue}l=null}else if(n.isEnum(s))o=new r.Enum(this,this.ptr,s.name,s.options,s.syntax),s.values.forEach((function(e){o.addChild(new r.Enum.Value(this,o,e.name,e.id))}),this),
this.ptr.addChild(o);else if(n.isService(s))o=new r.Service(this,this.ptr,s.name,s.options),Object.keys(s.rpc).forEach((function(e){var t=s.rpc[e];o.addChild(new r.Service.RPCMethod(this,o,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(o);else{if(!n.isExtend(s))throw Error("not a valid definition: "+JSON.stringify(s));if(o=this.ptr.resolve(s.ref,!0))s.fields.forEach((function(t){if(null!==o.getChild(0|t.id))throw Error("duplicate extended field id in "+o.name+": "+t.id);if(o.extensions){var i=!1;if(o.extensions.forEach((function(e){t.id>=e[0]&&t.id<=e[1]&&(i=!0)})),!i)throw Error("illegal extended field id in "+o.name+": "+t.id+" (not within valid ranges)")}var n=t.name;this.options.convertFieldsToCamelCase&&(n=e.Util.toCamelCase(n));var s=new r.Message.ExtensionField(this,o,t.rule,t.type,this.ptr.fqn()+"."+n,t.id,t.options),a=new r.Extension(this,this.ptr,t.name,s);s.extension=a,this.ptr.addChild(a),o.addChild(s)}),this);else if(!/\.?google\.protobuf\./.test(s.ref))throw Error("extended message "+s.ref+" is not defined")}s=null,o=null}t=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},s.import=function(t,r){var n="/";if("string"==typeof r){if(e.Util.IS_NODE&&(r=i(0).resolve(r)),!0===this.files[r])return this.reset();this.files[r]=!0}else if("object"==typeof r){var s,o=r.root;if(e.Util.IS_NODE&&(o=i(0).resolve(o)),(o.indexOf("\\")>=0||r.file.indexOf("\\")>=0)&&(n="\\"),s=e.Util.IS_NODE?i(0).join(o,r.file):o+n+r.file,!0===this.files[s])return this.reset();this.files[s]=!0}if(t.imports&&t.imports.length>0){var a,l=!1;"object"==typeof r?(this.importRoot=r.root,l=!0,a=this.importRoot,r=r.file,(a.indexOf("\\")>=0||r.indexOf("\\")>=0)&&(n="\\")):"string"==typeof r?this.importRoot?a=this.importRoot:r.indexOf("/")>=0?""===(a=r.replace(/\/[^\/]*$/,""))&&(a="/"):r.indexOf("\\")>=0?(a=r.replace(/\\[^\\]*$/,""),n="\\"):a=".":a=null;for(var f=0;f<t.imports.length;f++)if("string"==typeof t.imports[f]){if(!a)throw Error("cannot determine import root");var u=t.imports[f];if("google/protobuf/descriptor.proto"===u)continue;if(u=e.Util.IS_NODE?i(0).join(a,u):a+n+u,!0===this.files[u])continue;/\.proto$/i.test(u)&&!e.DotProto&&(u=u.replace(/\.proto$/,".json"));var h=e.Util.fetch(u);if(null===h)throw Error("failed to import '"+u+"' in '"+r+"': file not found");/\.json$/i.test(u)?this.import(JSON.parse(h+""),u):this.import(e.DotProto.Parser.parse(h),u)}else r?/\.(\w+)$/.test(r)?this.import(t.imports[f],r.replace(/^(.+)\.(\w+)$/,(function(e,t,i){return t+"_import"+f+"."+i}))):this.import(t.imports[f],r+"_import"+f):this.import(t.imports[f]);l&&(this.importRoot=null)}t.package&&this.define(t.package),t.syntax&&function e(t){t.messages&&t.messages.forEach((function(i){i.syntax=t.syntax,e(i)})),t.enums&&t.enums.forEach((function(e){e.syntax=t.syntax}))}(t);var p=this.ptr;return t.options&&Object.keys(t.options).forEach((function(e){p.options[e]=t.options[e]})),t.messages&&(this.create(t.messages),this.ptr=p),t.enums&&(this.create(t.enums),this.ptr=p),
t.services&&(this.create(t.services),this.ptr=p),t.extends&&this.create(t.extends),this.reset()},s.resolveAll=function(){var i;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof r.Namespace)this.ptr.children.forEach((function(e){this.ptr=e,this.resolveAll()}),this);else if(this.ptr instanceof r.Message.Field){if(t.TYPE.test(this.ptr.type))this.ptr.type=e.TYPES[this.ptr.type];else{if(!t.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(i=(this.ptr instanceof r.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=i,i instanceof r.Enum){if(this.ptr.type=e.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==i.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(i instanceof r.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=i.isGroup?e.TYPES.group:e.TYPES.message}}if(this.ptr.map){if(!t.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=e.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==e.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof e.Reflect.Service.Method){if(!(this.ptr instanceof e.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!((i=this.ptr.parent.resolve(this.ptr.requestName,!0))&&i instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=i,!((i=this.ptr.parent.resolve(this.ptr.responseName,!0))&&i instanceof e.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=i}else if(!(this.ptr instanceof e.Reflect.Message.OneOf||this.ptr instanceof e.Reflect.Extension||this.ptr instanceof e.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},s.build=function(e){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!e)return this.result;for(var t="string"==typeof e?e.split("."):e,i=this.result,r=0;r<t.length;r++){if(!i[t[r]]){i=null;break}i=i[t[r]]}return i},s.lookup=function(e,t){return e?this.ns.resolve(e,t):this.ns},s.toString=function(){return"Builder"},n.Message=function(){},n.Enum=function(){},n.Service=function(){},n}(s,s.Lang,s.Reflect),s.Map=function(e,t){var i=function(e,i){if(!e.map)throw Error("field is not a map");if(this.field=e,this.keyElem=new t.Element(e.keyType,null,!0,e.syntax),this.valueElem=new t.Element(e.type,e.resolvedType,!1,e.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){
return Object.keys(this.map).length}}),i)for(var r=Object.keys(i),n=0;n<r.length;n++){var s=this.keyElem.valueFromString(r[n]),o=this.valueElem.verifyValue(i[r[n]]);this.map[this.keyElem.valueToString(s)]={key:s,value:o}}},r=i.prototype;function n(e){var t=0;return{next:function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}}return r.clear=function(){this.map={}},r.delete=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e)),i=t in this.map;return delete this.map[t],i},r.entries=function(){for(var e,t=[],i=Object.keys(this.map),r=0;r<i.length;r++)t.push([(e=this.map[i[r]]).key,e.value]);return n(t)},r.keys=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].key);return n(e)},r.values=function(){for(var e=[],t=Object.keys(this.map),i=0;i<t.length;i++)e.push(this.map[t[i]].value);return n(e)},r.forEach=function(e,t){for(var i,r=Object.keys(this.map),n=0;n<r.length;n++)e.call(t,(i=this.map[r[n]]).value,i.key,this)},r.set=function(e,t){var i=this.keyElem.verifyValue(e),r=this.valueElem.verifyValue(t);return this.map[this.keyElem.valueToString(i)]={key:i,value:r},this},r.get=function(e){var t=this.keyElem.valueToString(this.keyElem.verifyValue(e));if(t in this.map)return this.map[t].value},r.has=function(e){return this.keyElem.valueToString(this.keyElem.verifyValue(e))in this.map},i}(0,s.Reflect),s.newBuilder=function(e){return void 0===(e=e||{}).convertFieldsToCamelCase&&(e.convertFieldsToCamelCase=s.convertFieldsToCamelCase),void 0===e.populateAccessors&&(e.populateAccessors=s.populateAccessors),new s.Builder(e)},s.loadJson=function(e,t,i){return("string"==typeof t||t&&"string"==typeof t.file&&"string"==typeof t.root)&&(i=t,t=null),t&&"object"==typeof t||(t=s.newBuilder()),"string"==typeof e&&(e=JSON.parse(e)),t.import(e,i),t.resolveAll(),t},s.loadJsonFile=function(e,t,i){if(t&&"object"==typeof t?(i=t,t=null):t&&"function"==typeof t||(t=null),t)return s.Util.fetch("string"==typeof e?e:e.root+"/"+e.file,(function(r){if(null!==r)try{t(null,s.loadJson(JSON.parse(r),i,e))}catch(n){t(n)}else t(Error("Failed to fetch file"))}));var r=s.Util.fetch("object"==typeof e?e.root+"/"+e.file:e);return null===r?null:s.loadJson(JSON.parse(r),i,e)},s})?n.apply(t,s):n)||(e.exports=o)}).call(this,i("KCCg"))},KCCg:function(e,t){var i,r,n=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(i===setTimeout)return setTimeout(e,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(e){i=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,f=[],u=!1,h=-1;function p(){u&&l&&(u=!1,l.length?f=l.concat(f):h=-1,f.length&&d())}function d(){if(!u){var e=a(p);u=!0;for(var t=f.length;t;){for(l=f,f=[];++h<t;)l&&l[h].run();h=-1,t=f.length}l=null,u=!1,function(e){
if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function c(e,t){this.fun=e,this.array=t}function y(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];f.push(new c(e,t)),1!==f.length||u||a(d)},c.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},lxLC:function(e,t,i){"use strict";e.exports=function(){var e=i("5iuW"),t=i("DPDv").ByteBuffer;this._protobufTranslator=new e,this.set_broker=function(e){return{broker_name:e}},this.set_data_quality=function(){return{quality:"low"}},this.quote_create_session=function(e){return{session:e}},this.quote_delete_session=function(e){return{session:e}},this.quote_set_fields=function(e,t){return{session:e,fields:JSON.stringify(t)}},this.quote_add_symbols=function(e,t){return{session:e,symbols:JSON.stringify(t)}},this.quote_remove_symbols=function(e,t){return{session:e,symbols:t}},this.quote_fast_symbols=function(e,t){return{session:e,symbols:"object"==typeof t?JSON.stringify(t):JSON.stringify([t])}},this.quote_hibernate_all=function(e){return{session:e}},this.depth_create_session=function(e,t,i){return{session:e,multiplier:t,viewport_width:i}},this.depth_delete_session=function(e){return{session:e}},this.depth_set_symbol=function(e,t){return{session:e,symbol:t}},this.depth_clear_symbol=function(e){return{session:e}},this.depth_set_scale=function(e,t){return{session:e,scale:t}},this.chart_create_session=function(e,t){return{session:e,parameters:t?"disable_statistics":""}},this.chart_delete_session=function(e){return{session:e}},this.set_auth_token=function(e){return{token:e}},this.switch_timezone=function(e,t){return{session:e,timezone:t}},this.resolve_symbol=function(e,t,i){return{session:e,resolve_name:t,symbol:i}},this.create_series=function(e,t,i,r,n,s,o){var a={session:e,series_name:t,turnaround:i=i||"",resolve_name:r,resolution:n,bars:"object"==typeof s?JSON.stringify(s):JSON.stringify([s])};return null!==o&&(a.frame=o),a},this.remove_series=function(e,t){return{session:e,series_name:t}},this.modify_series=function(e,t,i,r,n,s){var o={session:e,series_name:t,turnaround:i=i||"",resolve_name:r,resolution:n};return null!==s&&(o.frame=s),o},this.request_more_data=function(e,t,i){return{session:e,series_name:t,count:i}},this.request_studies_metadata=function(e,t){return{session:e,meta_name:t}},this.create_study=function(e,i,r,n,s,o){return{session:e,study_name:i,turnaround:r=r||"",parent:n,study:s,
inputs:t.fromUTF8(JSON.stringify(o))}},this.create_child_study=function(e,t,i,r,n,s){return this.create_study(e,t,i,r,n,s)},this.child_study_rebind=function(e,i,r,n,s,o){return{session:e,study_name:i,turnaround:r=r||"",parent:n,study:s,inputs:t.fromUTF8(JSON.stringify(o))}},this.remove_study=function(e,t){return{session:e,study_name:t}},this.modify_study=function(e,i,r,n){return{session:e,study_name:i,turnaround:r=r||"",inputs:t.fromUTF8(JSON.stringify(n))}},this.create_pointset=function(e,t,i,r,n,s){return{session:e,ps_name:t,turnaround:i=i||"",symbol:r,interval:n,points:JSON.stringify([s])}},this.modify_pointset=function(e,t,i,r){return{session:e,ps_name:t,turnaround:i=i||"",points:JSON.stringify([r])}},this.remove_pointset=function(e,t){return{session:e,ps_name:t}},this.request_more_tickmarks=function(e,t,i){return{session:e,series_name:t,bars:i}},this.get_first_bar_time=function(e,t,i){return{session:e,symbol_name:t,resolution:i}},this.replay_create_session=function(e){return{session:e}},this.replay_delete_session=function(e){return{session:e}},this.replay_reset=function(e,t,i){return{session:e,time:i,turnaround:t}},this.replay_start=function(e,t,i){return{session:e,turnaround:t,delay:i}},this.replay_stop=function(e,t){return{session:e,turnaround:t}},this.replay_step=function(e,t,i){return{session:e,length:i,turnaround:t}},this.replay_add_series=function(e,t,i,r){return{session:e,symbol:i,resolution:r,turnaround:t}},this.replay_remove_series=function(e,t,i,r){return{session:e,symbol:i,resolution:r,turnaround:t}},this.replay_set_resolution=function(e,t,i){return{session:e,turnaround:t,resolution:i}},this.convertTimescaleResponse=function(e){for(var t=e.marks,i=0;i<t.length;++i)t[i]={span:t[i].value[0],time:t[i].value[1],index:t[i].value[2]};if(void 0!==e.index_diff){var r=e.index_diff;for(i=0;i<r.length;++i)r[i]={old:r[i].index[0],new:r[i].index[1]}}else e.index_diff=[];return e},this.getDataUpdateObjects=function(e){return e.params[0].series},this.getTimescaleObjects=function(e){return e.params[1].series},this.getTimescaleChangeset=function(e){return e.params[0]},this._convertObjectToArray=function(e){return Object.keys(e).map((function(t){return e[t]}))},this.prepareDataUpdateObjects=function(e,t,i){t.forEach((function(t){for(var r in t.plots)for(var n in t.plots[r].value)1e100===t.plots[r].value[n]&&(t.plots[r].value[n]=void 0);t.last_bar_close&&(t.lastBar={closeTime:t.last_bar_close},delete t.last_bar_close);var s={method:"data_update",params:t};i(e,t.customId,s)}))},this.unpack=function(e){var t;function i(e){return{v:e.volume,p:e.price}}switch((e=this._protobufTranslator.decode_message(e)).session=e.p.session,e.method=e.m,t=e.p,e.method){case"symbol_resolved":e.p.symbol_info=JSON.parse(e.p.symbol_info),e.p=this._convertObjectToArray(e.p);break;case"studies_metadata":t.metadata=JSON.parse(t.metadata),e.p=this._convertObjectToArray(e.p);break;case"qsd":if(e.method="quote_symbol_data",t.values)t.values=JSON.parse(t.values);else{t.values={}
;["lp","ch","chp","high_price","low_price","volume","rtc","rch","rchp","bid","ask","bid_size","ask_size","series_data"].forEach((function(e){var i,r,n;void 0!==t[e]&&null!==t[e]&&(t.values[e]="series_data"===e?t[e]:"chp"===e||"rchp"===e?(i=t[e],r=4,n=Math.pow(10,r),Math.round(i*n)/n):t[e])}));var r=JSON.parse(t.rest);Object.keys(r).forEach((function(e){t.values[e]=r[e]}))}var n={symbolname:t.symbol_name,status:t.status,values:t.values};n.values.change=t.values.ch,n.values.last_price=t.values.lp,n.values.change_percent=t.values.chp;var s=[t.session,n];e.p=s,e.params=e.p,delete t.values.ch,delete t.values.lp,delete t.values.chp;break;case"du":e.method="data_update",t.objects.series.forEach((function(e){e.data.forEach((function(e){e.index=e.i,delete e.i,delete e.v})),e.plots=e.data,e.ns.d=""===e.ns.d?"":e.ns.d,e.ns.indexes=e.ns.nochange?"nochange":e.ns.indexes,e.nonseries=e.ns,e.customId=e.series_name,delete e.ns,delete e.data})),e.p=this._convertObjectToArray(e.p);break;case"tickmark_update":var o={index:t.index,zoffset:t.zoffset,changes:t.changes,marks:t.marks};s=[t.session,o];e.p=s;break;case"timescale_update":t.objects.series.forEach((function(e){e.data.forEach((function(e){e.index=e.i,delete e.i,delete e.v})),e.plots=e.data,e.ns.d=""===e.ns.d?"":e.ns.d,e.ns.indexes=e.ns.nochange?"nochange":e.ns.indexes,e.nonseries=e.ns,e.customId=e.series_name,delete e.ns,delete e.data})),e.p=this._convertObjectToArray(e.p);break;case"dd":(t=t.depth_data).asks=t.asks.map(i),t.bids=t.bids.map(i),e.p=this._convertObjectToArray(e.p);break;case"symbol_error":var a=this._convertObjectToArray(t.reason);e.p=[t.session,t.symbol].concat(a);break;default:e.p=this._convertObjectToArray(e.p)}return e.params=e.p,e},this.prepareEncodeMessage=function(e,t){return this._protobufTranslator.encode_command(e,t)}}},yXba:function(e,t,i){var r,n,s;n=[],void 0===(s="function"==typeof(r=function(){"use strict";function e(e,t,i){this.low=0|e,this.high=0|t,this.unsigned=!!i}function t(e){return!0===(e&&e.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var i={},r={};function n(e,t){var n,s,a;return t?(a=0<=(e>>>=0)&&e<256)&&(s=r[e])?s:(n=o(e,(0|e)<0?-1:0,!0),a&&(r[e]=n),n):(a=-128<=(e|=0)&&e<128)&&(s=i[e])?s:(n=o(e,e<0?-1:0,!1),a&&(i[e]=n),n)}function s(e,t){if(isNaN(e)||!isFinite(e))return t?y:c;if(t){if(e<0)return y;if(e>=h)return w}else{if(e<=-p)return E;if(e+1>=p)return b}return e<0?s(-e,t).neg():o(e%u|0,e/u|0,t)}function o(t,i,r){return new e(t,i,r)}e.fromInt=n,e.fromNumber=s,e.fromBits=o;var a=Math.pow;function l(e,t,i){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return c;if("number"==typeof t?(i=t,t=!1):t=!!t,(i=i||10)<2||36<i)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return l(e.substring(1),t,i).neg();for(var n=s(a(i,8)),o=c,f=0;f<e.length;f+=8){var u=Math.min(8,e.length-f),h=parseInt(e.substring(f,f+u),i);if(u<8){var p=s(a(i,u));o=o.mul(p).add(s(h))
}else o=(o=o.mul(n)).add(s(h))}return o.unsigned=t,o}function f(t){return t instanceof e?t:"number"==typeof t?s(t):"string"==typeof t?l(t):o(t.low,t.high,t.unsigned)}e.fromString=l,e.fromValue=f;var u=4294967296,h=u*u,p=h/2,d=n(1<<24),c=n(0);e.ZERO=c;var y=n(0,!0);e.UZERO=y;var m=n(1);e.ONE=m;var g=n(1,!0);e.UONE=g;var v=n(-1);e.NEG_ONE=v;var b=o(-1,2147483647,!1);e.MAX_VALUE=b;var w=o(-1,-1,!0);e.MAX_UNSIGNED_VALUE=w;var E=o(0,-2147483648,!1);e.MIN_VALUE=E;var _=e.prototype;return _.toInt=function(){return this.unsigned?this.low>>>0:this.low},_.toNumber=function(){return this.unsigned?(this.high>>>0)*u+(this.low>>>0):this.high*u+(this.low>>>0)},_.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var t=s(e),i=this.div(t),r=i.mul(t).sub(this);return i.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var n=s(a(e,6),this.unsigned),o=this,l="";;){var f=o.div(n),u=(o.sub(f.mul(n)).toInt()>>>0).toString(e);if((o=f).isZero())return u+l;for(;u.length<6;)u="0"+u;l=""+u+l}},_.getHighBits=function(){return this.high},_.getHighBitsUnsigned=function(){return this.high>>>0},_.getLowBits=function(){return this.low},_.getLowBitsUnsigned=function(){return this.low>>>0},_.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},_.isZero=function(){return 0===this.high&&0===this.low},_.isNegative=function(){return!this.unsigned&&this.high<0},_.isPositive=function(){return this.unsigned||this.high>=0},_.isOdd=function(){return 1==(1&this.low)},_.isEven=function(){return 0==(1&this.low)},_.equals=function(e){return t(e)||(e=f(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},_.eq=_.equals,_.notEquals=function(e){return!this.eq(e)},_.neq=_.notEquals,_.lessThan=function(e){return this.comp(e)<0},_.lt=_.lessThan,_.lessThanOrEqual=function(e){return this.comp(e)<=0},_.lte=_.lessThanOrEqual,_.greaterThan=function(e){return this.comp(e)>0},_.gt=_.greaterThan,_.greaterThanOrEqual=function(e){return this.comp(e)>=0},_.gte=_.greaterThanOrEqual,_.compare=function(e){if(t(e)||(e=f(e)),this.eq(e))return 0;var i=this.isNegative(),r=e.isNegative();return i&&!r?-1:!i&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},_.comp=_.compare,_.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(m)},_.neg=_.negate,_.add=function(e){t(e)||(e=f(e));var i=this.high>>>16,r=65535&this.high,n=this.low>>>16,s=65535&this.low,a=e.high>>>16,l=65535&e.high,u=e.low>>>16,h=0,p=0,d=0,c=0;return d+=(c+=s+(65535&e.low))>>>16,p+=(d+=n+u)>>>16,h+=(p+=r+l)>>>16,h+=i+a,o((d&=65535)<<16|(c&=65535),(h&=65535)<<16|(p&=65535),this.unsigned)},_.subtract=function(e){return t(e)||(e=f(e)),this.add(e.neg())},_.sub=_.subtract,_.multiply=function(e){if(this.isZero())return c;if(t(e)||(e=f(e)),e.isZero())return c
;if(this.eq(E))return e.isOdd()?E:c;if(e.eq(E))return this.isOdd()?E:c;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(d)&&e.lt(d))return s(this.toNumber()*e.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,n=this.low>>>16,a=65535&this.low,l=e.high>>>16,u=65535&e.high,h=e.low>>>16,p=65535&e.low,y=0,m=0,g=0,v=0;return g+=(v+=a*p)>>>16,m+=(g+=n*p)>>>16,g&=65535,m+=(g+=a*h)>>>16,y+=(m+=r*p)>>>16,m&=65535,y+=(m+=n*h)>>>16,m&=65535,y+=(m+=a*u)>>>16,y+=i*p+r*h+n*u+a*l,o((g&=65535)<<16|(v&=65535),(y&=65535)<<16|(m&=65535),this.unsigned)},_.mul=_.multiply,_.divide=function(e){if(t(e)||(e=f(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?y:c;var i,r,n;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return g;n=y}else{if(this.eq(E))return e.eq(m)||e.eq(v)?E:e.eq(E)?m:(i=this.shr(1).div(e).shl(1)).eq(c)?e.isNegative()?m:v:(r=this.sub(e.mul(i)),n=i.add(r.div(e)));if(e.eq(E))return this.unsigned?y:c;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=c}for(r=this;r.gte(e);){i=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(i)/Math.LN2),l=o<=48?1:a(2,o-48),u=s(i),h=u.mul(e);h.isNegative()||h.gt(r);)h=(u=s(i-=l,this.unsigned)).mul(e);u.isZero()&&(u=m),n=n.add(u),r=r.sub(h)}return n},_.div=_.divide,_.modulo=function(e){return t(e)||(e=f(e)),this.sub(this.div(e).mul(e))},_.mod=_.modulo,_.not=function(){return o(~this.low,~this.high,this.unsigned)},_.and=function(e){return t(e)||(e=f(e)),o(this.low&e.low,this.high&e.high,this.unsigned)},_.or=function(e){return t(e)||(e=f(e)),o(this.low|e.low,this.high|e.high,this.unsigned)},_.xor=function(e){return t(e)||(e=f(e)),o(this.low^e.low,this.high^e.high,this.unsigned)},_.shiftLeft=function(e){return t(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?o(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):o(0,this.low<<e-32,this.unsigned)},_.shl=_.shiftLeft,_.shiftRight=function(e){return t(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?o(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):o(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},_.shr=_.shiftRight,_.shiftRightUnsigned=function(e){if(t(e)&&(e=e.toInt()),0==(e&=63))return this;var i=this.high;return e<32?o(this.low>>>e|i<<32-e,i>>>e,this.unsigned):o(32===e?i:i>>>e-32,0,this.unsigned)},_.shru=_.shiftRightUnsigned,_.toSigned=function(){return this.unsigned?o(this.low,this.high,!1):this},_.toUnsigned=function(){return this.unsigned?this:o(this.low,this.high,!0)},_.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},_.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},_.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t]},e})?r.apply(t,n):r)||(e.exports=s)}}]);