/*! For license information please see protobuf-handler.64b4f5f31854d1ed8e48.js.LICENSE.txt */ (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:"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}]},{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}]},{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:"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}]},{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 n=i("DPDv"),r=i("1qYw"),s=function(){for(var e in this._protoMessage=n.loadJson(r).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 n,r,s;r=[i("yXba")],void 0===(s="function"==typeof(n=function(e){"use strict";var t=function(e,i,r){if(void 0===e&&(e=t.DEFAULT_CAPACITY),void 0===i&&(i=t.DEFAULT_ENDIAN),void 0===r&&(r=t.DEFAULT_NOASSERT),!r){if((e|=0)<0)throw RangeError("Illegal capacity");i=!!i,r=!!r}this.buffer=0===e?n: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=r};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 n=new ArrayBuffer(0),r=String.fromCharCode;function s(e){var t=0;return function(){return t1024&&(t.push(r.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}} function a(e,t,i,n,r){var s,o,a=8*r-n-1,l=(1<>1,u=-7,h=i?r-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+=n;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,n),s-=f}return(d?-1:1)*o*Math.pow(2,s-n)}function l(e,t,i,n,r,s){var o,a,l,f=8*s-r-1,u=(1<>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,c=n?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,r),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,r),o=0));r>=8;e[i+d]=255&a,d+=c,a/=256,r-=8);for(o=o<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,n){return new t(e,i,n)},t.concat=function(e,i,n,r){"boolean"!=typeof i&&"string"==typeof i||(r=n,n=i,i=void 0);for(var s,o=0,a=0,l=e.length;a0&&(o+=s);if(0===o)return new t(0,n,r);var f,u=new t(o,n,r);for(a=0;a0&&(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,r,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,r,s)).limit=e.length;for(var a=0;a>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,r=t,s=e.length,o=s>>3,a=0;for(t+=this.writeVarint32(s,t);o--;)n=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(n,t++);if(a>3,o=0,a=[];for(e+=n.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>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 n=this.slice(t,t+e);return i&&(this.offset+=e),n},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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=void 0===i;if(n&&(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 r=this.buffer.byteLength;i>r&&this.resize((r*=2)>i?r: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),n&&(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 n=0,r=0;this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0,t+=4,r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,t+=4,n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0);var s=new e(n,r,!1);return i&&(this.offset+=8),s},i.readLong=i.readInt64, i.writeUint64=function(t,i){var n=void 0===i;if(n&&(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 r=this.buffer.byteLength;i>r&&this.resize((r*=2)>i?r: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),n&&(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 n=0,r=0;this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0,t+=4,r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,t+=4,n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0);var s=new e(n,r,!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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n: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 n=void 0===i;if(n&&(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 r,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;)r=127&e|128,this.view[i++]=r,e>>>=7;return this.view[i++]=e,n?(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,n=0,r=0;do{if(!this.noAssert&&e>this.limit){var s=Error("Truncated");throw s.truncated=!0,s}i=this.view[e++],n<5&&(r|=(127&i)<<7*n),++n}while(0!=(128&i));return r|=0,t?(this.offset=e,r):{value:r,length:n}},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,n=t.shiftRightUnsigned(28).toInt()>>>0,r=t.shiftRightUnsigned(56).toInt()>>>0;return 0==r?0==n?i<16384?i<128?1:2:i<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:r<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,n){var r=void 0===n;if(r&&(n=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 n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+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;n+=s;var f=this.buffer.byteLength;switch(n>f&&this.resize((f*=2)>n?f:n),n-=s,s){case 10:this.view[n+9]=l>>>7&1;case 9:this.view[n+8]=9!==s?128|l:127&l;case 8:this.view[n+7]=8!==s?a>>>21|128:a>>>21&127;case 7:this.view[n+6]=7!==s?a>>>14|128:a>>>14&127;case 6:this.view[n+5]=6!==s?a>>>7|128:a>>>7&127;case 5:this.view[n+4]=5!==s?128|a:127&a;case 4:this.view[n+3]=4!==s?o>>>21|128:o>>>21&127;case 3:this.view[n+2]=3!==s?o>>>14|128:o>>>14&127;case 2:this.view[n+1]=2!==s?o>>>7|128:o>>>7&127;case 1:this.view[n]=1!==s?128|o:127&o}return r?(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 n=t,r=0,s=0,o=0,a=0;if(r=127&(a=this.view[t++]),128&a&&(r|=(127&(a=this.view[t++]))<<7,(128&a||this.noAssert&&void 0===a)&&(r|=(127&(a=this.view[t++]))<<14,(128&a||this.noAssert&&void 0===a)&&(r|=(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(r|s<<28,s>>>4|o<<24,!1);return i?(this.offset=t,l):{value:l,length:t-n}},i.readVarint64ZigZag=function(i){var n=this.readVarint64(i);return n&&n.value instanceof e?n.value=t.zigZagDecode64(n.value):n=t.zigZagDecode64(n),n}),i.writeCString=function(e,t){var i=void 0===t;i&&(t=this.offset);var n,r=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(n=0;n>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=u.calculateUTF16asUTF8(s(e))[1],t+=r+1;var o=this.buffer.byteLength ;return t>o&&this.resize((o*=2)>t?o:t),t-=r+1,u.encodeUTF16toUTF8(s(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,i?(this.offset=t,this):r},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,n=e,r=-1;return u.decodeUTF8toUTF16(function(){if(0===r)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(r=this.view[e++])?null:r}.bind(this),i=o(),!0),t?(this.offset=e,i()):{string:i(),length:e-n}},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 n,r=t;n=u.calculateUTF16asUTF8(s(e),this.noAssert)[1],t+=4+n;var o=this.buffer.byteLength;if(t>o&&this.resize((o*=2)>t?o:t),t-=4+n,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),t+=4,u.encodeUTF16toUTF8(s(e),function(e){this.view[t++]=e}.bind(this)),t!==r+4+n)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+n));return i?(this.offset=t,this):t-r},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 n=e,r=this.readUint32(e),s=this.readUTF8String(r,t.METRICS_BYTES,e+=4);return e+=s.length,i?(this.offset=e,s.string):{string:s.string,length:e-n}},t.METRICS_CHARS="c",t.METRICS_BYTES="b",i.writeUTF8String=function(e,t){var i,n=void 0===t;if(n&&(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 r=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)),n?(this.offset=t,this):t-r},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,n){"number"==typeof i&&(n=i,i=void 0);var r=void 0===n;if(r&&(n=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 n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var s,a=0,l=n;if(i===t.METRICS_CHARS){if(s=o(),u.decodeUTF8(function(){return a>>=0)<0||n+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+e+") <= "+this.buffer.byteLength)}var f=n+e;if(u.decodeUTF8toUTF16(function(){return n>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var r,o,a=i;r=u.calculateUTF16asUTF8(s(e),this.noAssert)[1],o=t.calculateVarint32(r),i+=o+r;var l=this.buffer.byteLength;if(i>l&&this.resize((l*=2)>i?l:i),i-=o+r,i+=this.writeVarint32(r,i),u.encodeUTF16toUTF8(s(e),function(e){this.view[i++]=e}.bind(this)),i!==a+r+o)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+r+o));return n?(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 n=e,r=this.readVarint32(e),s=this.readUTF8String(r.value,t.METRICS_BYTES,e+=r.length);return e+=s.length,i?(this.offset=e,s.string):{string:s.string,length:e-n}},i.append=function(e,i,n){"number"!=typeof i&&"string"==typeof i||(n=i,i=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof t||(e=t.wrap(e,i));var s=e.limit-e.offset;if(s<=0)return this;n+=s;var o=this.buffer.byteLength;return n>o&&this.resize((o*=2)>n?o:n),n-=s,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=s,r&&(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=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(i),s=new Uint8Array(r);return s.set(this.view.subarray(e,t)),this.buffer=r,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 n=i-e,r=new t(n,this.littleEndian,this.noAssert);return r.offset=0,r.limit=n,r.markedOffset>=0&&(r.markedOffset-=e),this.copyTo(r,0,e,i),r},i.copyTo=function(e,i,n,r){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,n=(s=void 0===n)?this.offset:0|n,r=void 0===r?this.limit:0|r,i<0||i>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+i+" <= "+e.buffer.byteLength);if(n<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var a=r-n;return 0===a?e:(e.ensureCapacity(i+a),e.view.set(this.view.subarray(n,r),i),s&&(this.offset+=a),o&&(e.offset+=a),this)},i.ensureCapacity=function(e){var t=this.buffer.byteLength;return te?t:e):this},i.fill=function(e,t,i){var n=void 0===t;if(n&&(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>>=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,n){"number"!=typeof i&&"string"==typeof i||(n=i,i=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+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-n;if(o>0){var a=new ArrayBuffer(this.buffer.byteLength+o),l=new Uint8Array(a);l.set(this.view.subarray(n,this.buffer.byteLength),s),this.buffer=a,this.view=l,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,n+=o}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),n-s),e.offset=e.limit,r&&(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>>=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 n;var r=new ArrayBuffer(i-t);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(t,i),0),r},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=[],n=0,r=t.length;n>2&63]),r=(3&n)<<4,null!==(n=e())?(i(t[63&((r|=n>>4&15)|n>>4&15)]),r=(15&n)<<2,null!==(n=e())?(i(t[63&(r|n>>6&3)]),i(t[63&n])):(i(t[63&r]),i(61))):(i(t[63&r]),i(61),i(61))},e.decode=function(e,t){var n,r,s;function o(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(void 0===(r=i[n])&&o(n),null!==(n=e())&&(void 0===(s=i[n])&&o(n),t(r<<2>>>0|(48&s)>>4),null!==(n=e()))){if(void 0===(r=i[n])){if(61===n)break;o(n)}if(t((15&s)<<4>>>0|(60&r)>>2),null!==(n=e())){if(void 0===(s=i[n])){if(61===n)break;o(n)}t((3&r)<<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 ethis.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var i=[],n=[];e=1024&&(n.push(String.fromCharCode.apply(String,i)),i=[]);return n.join("")+String.fromCharCode.apply(String,i)},t.fromBinary=function(e,i){if("string"!=typeof e)throw TypeError("str");for(var n,r=0,s=e.length,o=new t(s,i);r255)throw RangeError("illegal char code: "+n);o.view[r++]=n}return o.limit=s,o},i.toDebug=function(e){for(var t,i=-1,n=this.buffer.byteLength,r="",s="",o="";i32&&t<127?String.fromCharCode(t):".")),++i,e&&i>0&&i%16==0&&i!==n){for(;r.length<51;)r+=" ";o+=r+s+"\n",r=s=""}i===this.offset&&i===this.limit?r+=i===this.markedOffset?"!":"|":i===this.offset?r+=i===this.markedOffset?"[":"<":i===this.limit?r+=i===this.markedOffset?"]":">":r+=i===this.markedOffset?"'":e||0!==i&&i!==n?" ":""}if(e&&" "!==r){for(;r.length<51;)r+=" ";o+=r+s+"\n"}return e?o:r},t.fromDebug=function(e,i,n){for(var r,s,o=e.length,a=new t((o+1)/3|0,i,n),l=0,f=0,u=!1,h=!1,p=!1,d=!1,c=!1;l":if(!n){if(d){c=!0;break}d=!0}a.limit=f,u=!1;break;case"'":if(!n){if(p){c=!0;break}p=!0}a.markedOffset=f,u=!1;break;case" ":u=!1;break;default:if(!n&&u){c=!0;break}if(s=parseInt(r+e.charAt(l++),16),!n&&(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(!n){if(!h||!d)throw TypeError("Illegal str: Missing offset or limit");if(f>>=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,n=new Array(t-e);e255))throw TypeError("Illegal str: Contains non-hex characters");o.view[l++]=r}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,n,r,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===(n=e())&&o([i,n]),t((31&i)<<6|63&n);else if(224==(240&i))(null===(n=e())||null===(r=e()))&&o([i,n,r]),t((15&i)<<12|(63&n)<<6|63&r);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(n=e())||null===(r=e())||null===(s=e()))&&o([i,n,r,s]),t((7&i)<<18|(63&n)<<12|(63&r)<<6|63&s)}},UTF16toUTF8:function(e,t){for(var i,n=null;null!==(i=null!==n?n:e());)i>=55296&&i<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(i-55296)+n-56320+65536),n=null):t(i);null!==n&&t(n)},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,n=0;return e.UTF16toUTF8(t,(function(e){++i,n+=e<128?1:e<2048?2:e<65536?3:4})),[i,n]}};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]/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={},n=function(e,t,i){this.builder=e,this.parent=t,this.name=i,this.className},r=n.prototype;r.fqn=function(){for(var e=this.name,t=this;null!=(t=t.parent);)e=t.name+"."+e;return e},r.toString=function(e){return(e?this.className+" ":"")+this.fqn()},r.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},i.T=n;var s=function(e,t,i,r,s){n.call(this,e,t,i),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=s||"proto2"},o=s.prototype=Object.create(n.prototype);o.getChildren=function(e){if(null==(e=e||null))return this.children.slice();for(var t=[],i=0,n=this.children.length;i4294967295?0|i:i;case t.TYPES.uint32:case t.TYPES.fixed32:return("number"!=typeof i||i==i&&i%1!=0)&&r(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){r(typeof i,l.message)}else r(typeof i,"requires Long.js");case t.TYPES.uint64:case t.TYPES.fixed64:if(t.Long)try{return f(i,!0)}catch(l){r(typeof i,l.message)}else r(typeof i,"requires Long.js");case t.TYPES.bool:return"boolean"!=typeof i&&r(typeof i,"not a boolean"),i;case t.TYPES.float:case t.TYPES.double:return"number"!=typeof i&&r(typeof i,"not a number"),i;case t.TYPES.string:return"string"==typeof i||i&&i instanceof String||r(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;a4294967295||i<0)&&r(typeof i,"not in range for uint32"),i;r(i,"not a valid enum value");case t.TYPES.group:case t.TYPES.message:if(i&&"object"==typeof i||r(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,n){if(null===n)return 0;var r;switch(this.type){case t.TYPES.int32:return n<0?e.calculateVarint64(n):e.calculateVarint32(n);case t.TYPES.uint32:return e.calculateVarint32(n);case t.TYPES.sint32:return e.calculateVarint32(e.zigZagEncode32(n));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(n);case t.TYPES.sint64:return e.calculateVarint64(e.zigZagEncode64(n));case t.TYPES.fixed64:case t.TYPES.sfixed64:return 8;case t.TYPES.bool: return 1;case t.TYPES.enum:return e.calculateVarint32(n);case t.TYPES.double:return 8;case t.TYPES.string:return r=e.calculateUTF8Bytes(n),e.calculateVarint32(r)+r;case t.TYPES.bytes:if(n.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+n.remaining()+" bytes remaining");return e.calculateVarint32(n.remaining())+n.remaining();case t.TYPES.message:return r=this.resolvedType.calculate(n),e.calculateVarint32(r)+r;case t.TYPES.group:return(r=this.resolvedType.calculate(n))+e.calculateVarint32(i<<3|t.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+n+" (unknown type)")},l.encodeValue=function(i,n,r){if(null===n)return r;switch(this.type){case t.TYPES.int32:n<0?r.writeVarint64(n):r.writeVarint32(n);break;case t.TYPES.uint32:r.writeVarint32(n);break;case t.TYPES.sint32:r.writeVarint32ZigZag(n);break;case t.TYPES.fixed32:r.writeUint32(n);break;case t.TYPES.sfixed32:r.writeInt32(n);break;case t.TYPES.int64:case t.TYPES.uint64:r.writeVarint64(n);break;case t.TYPES.sint64:r.writeVarint64ZigZag(n);break;case t.TYPES.fixed64:r.writeUint64(n);break;case t.TYPES.sfixed64:r.writeInt64(n);break;case t.TYPES.bool:"string"==typeof n?r.writeVarint32("false"===n.toLowerCase()?0:!!n):r.writeVarint32(n?1:0);break;case t.TYPES.enum:r.writeVarint32(n);break;case t.TYPES.float:r.writeFloat32(n);break;case t.TYPES.double:r.writeFloat64(n);break;case t.TYPES.string:r.writeVString(n);break;case t.TYPES.bytes:if(n.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+n.remaining()+" bytes remaining");var s=n.offset;r.writeVarint32(n.remaining()),r.append(n),n.offset=s;break;case t.TYPES.message:var o=(new e).LE();this.resolvedType.encode(n,o),r.writeVarint32(o.offset),r.append(o.flip());break;case t.TYPES.group:this.resolvedType.encode(n,r),r.writeVarint32(i<<3|t.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+n+" (unknown type)")}return r},l.decode=function(e,i,n){if(i!=this.type.wireType)throw Error("Unexpected wire type for element");var r,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()>>3;switch(r){case t.WIRE_TYPES.VARINT:do{n=i.readUint8()}while(128==(128&n));break;case t.WIRE_TYPES.BITS64:i.offset+=8;break;case t.WIRE_TYPES.LDELIM:n=i.readVarint32(),i.offset+=n;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+": "+r)}return!0}h.build=function(i){if(this.clazz&&!i)return this.clazz;var n=function(t,i){var n=i.getChildren(t.Reflect.Message.Field),r=i.getChildren(t.Reflect.Message.OneOf),s=function(o,a){t.Builder.Message.call(this);for(var l=0,f=r.length;l0)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;l0;){if(o=(r=e.readVarint32())>>>3,(s=7&r)===t.WIRE_TYPES.ENDGROUP){if(o!==n)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+o+" ("+(n?n+" 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;c0;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,n,r){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 n;try{var s ;if(this.repeated)if(this.options.packed&&t.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){n.writeVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),n.ensureCapacity(n.offset+=1);var o=n.offset;for(s=0;s1){var f=n.slice(o,n.offset);o+=l-1,n.offset=o,n.append(f)}n.writeVarint32(a,o-l)}else for(s=0;s=0){for(r+=e.calculateVarint32(this.id<<3|t.WIRE_TYPES.LDELIM),o=0,s=0;s=0&&!n){s=i.readVarint32(),s=i.offset+s;for(var o=[];i.offset0;){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");r=this.element.decode(f,e,h)}}return[l,r]}return this.element.decode(i,e,this.id)},i.Message.Field=d;var y=function(e,t,i,n,r,s,o){d.call(this,e,t,i,null,n,r,s,o),this.extension};y.prototype=Object.create(d.prototype),i.Message.ExtensionField=y,i.Message.OneOf=function(e,t,i){n.call(this,e,t,i),this.fields=[]};var g=function(e,t,i,n,r){s.call(this,e,t,i,n,r),this.className="Enum",this.object=null};g.getName=function(e,t){for(var i,n=Object.keys(e),r=0;r0;){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(r.isMessage(s)){var o=new n.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 n.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 n.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(r.isEnum(s))o=new n.Enum(this,this.ptr,s.name,s.options,s.syntax),s.values.forEach((function(e){o.addChild(new n.Enum.Value(this,o,e.name,e.id))}),this),this.ptr.addChild(o);else if(r.isService(s))o=new n.Service(this,this.ptr,s.name,s.options),Object.keys(s.rpc).forEach((function(e){var t=s.rpc[e];o.addChild(new n.Service.RPCMethod(this,o,e,t.request,t.response,!!t.request_stream,!!t.response_stream,t.options))}),this),this.ptr.addChild(o);else{ if(!r.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 r=t.name;this.options.convertFieldsToCamelCase&&(r=e.Util.toCamelCase(r));var s=new n.Message.ExtensionField(this,o,t.rule,t.type,this.ptr.fqn()+"."+r,t.id,t.options),a=new n.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,n){var r="/";if("string"==typeof n){if(e.Util.IS_NODE&&(n=i(0).resolve(n)),!0===this.files[n])return this.reset();this.files[n]=!0}else if("object"==typeof n){var s,o=n.root;if(e.Util.IS_NODE&&(o=i(0).resolve(o)),(o.indexOf("\\")>=0||n.file.indexOf("\\")>=0)&&(r="\\"),s=e.Util.IS_NODE?i(0).join(o,n.file):o+r+n.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 n?(this.importRoot=n.root,l=!0,a=this.importRoot,n=n.file,(a.indexOf("\\")>=0||n.indexOf("\\")>=0)&&(r="\\")):"string"==typeof n?this.importRoot?a=this.importRoot:n.indexOf("/")>=0?""===(a=n.replace(/\/[^\/]*$/,""))&&(a="/"):n.indexOf("\\")>=0?(a=n.replace(/\\[^\\]*$/,""),r="\\"):a=".":a=null;for(var f=0;f1)for(var i=1;i>>=0)&&e<256)&&(s=n[e])?s:(r=o(e,(0|e)<0?-1:0,!0),a&&(n[e]=r),r):(a=-128<=(e|=0)&&e<128)&&(s=i[e])?s:(r=o(e,e<0?-1:0,!1),a&&(i[e]=r),r)}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,n){return new e(t,i,n)}e.fromInt=r,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||360)throw Error("interior hyphen");if(0===n)return l(e.substring(1),t,i).neg();for(var r=s(a(i,8)),o=c,f=0;f>>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>>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<=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(),n=e.isNegative();return i&&!n?-1:!i&&n?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(g)},_.neg=_.negate,_.add=function(e){t(e)||(e=f(e));var i=this.high>>>16,n=65535&this.high,r=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+=r+u)>>>16,h+=(p+=n+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,n=65535&this.high,r=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,g=0,m=0,v=0;return m+=(v+=a*p)>>>16, g+=(m+=r*p)>>>16,m&=65535,g+=(m+=a*h)>>>16,y+=(g+=n*p)>>>16,g&=65535,y+=(g+=r*h)>>>16,g&=65535,y+=(g+=a*u)>>>16,y+=i*p+n*h+r*u+a*l,o((m&=65535)<<16|(v&=65535),(y&=65535)<<16|(g&=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,n,r;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return m;r=y}else{if(this.eq(E))return e.eq(g)||e.eq(v)?E:e.eq(E)?g:(i=this.shr(1).div(e).shl(1)).eq(c)?e.isNegative()?g:v:(n=this.sub(e.mul(i)),r=i.add(n.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();r=c}for(n=this;n.gte(e);){i=Math.max(1,Math.floor(n.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(n);)h=(u=s(i-=l,this.unsigned)).mul(e);u.isZero()&&(u=g),r=r.add(u),n=n.sub(h)}return r},_.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<>>32-e,this.unsigned):o(0,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})?n.apply(t,r):n)||(e.exports=s)}}]);