dd-trace 5.103.0 → 5.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-3rdparty.csv +90 -102
- package/index.d.ts +107 -6
- package/package.json +18 -17
- package/packages/datadog-core/src/storage.js +1 -1
- package/packages/datadog-instrumentations/src/aerospike.js +1 -1
- package/packages/datadog-instrumentations/src/ai.js +8 -7
- package/packages/datadog-instrumentations/src/aws-sdk.js +15 -2
- package/packages/datadog-instrumentations/src/azure-cosmos.js +7 -0
- package/packages/datadog-instrumentations/src/azure-functions.js +3 -0
- package/packages/datadog-instrumentations/src/cassandra-driver.js +5 -2
- package/packages/datadog-instrumentations/src/cucumber.js +181 -35
- package/packages/datadog-instrumentations/src/dns.js +54 -18
- package/packages/datadog-instrumentations/src/elasticsearch.js +4 -4
- package/packages/datadog-instrumentations/src/fastify.js +142 -82
- package/packages/datadog-instrumentations/src/graphql.js +188 -67
- package/packages/datadog-instrumentations/src/grpc/client.js +48 -32
- package/packages/datadog-instrumentations/src/helpers/ai-messages.js +322 -14
- package/packages/datadog-instrumentations/src/helpers/callback-instrumentor.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/hooks.js +4 -0
- package/packages/datadog-instrumentations/src/helpers/instrument.js +2 -1
- package/packages/datadog-instrumentations/src/helpers/kafka.js +17 -0
- package/packages/datadog-instrumentations/src/helpers/openai-ai-guard.js +269 -0
- package/packages/datadog-instrumentations/src/helpers/promise-instrumentor.js +42 -0
- package/packages/datadog-instrumentations/src/helpers/register.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/rewriter/compiler.js +3 -2
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +19 -6
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/azure-cosmos.js +50 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +2 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/langgraph.js +4 -2
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/playwright.js +85 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +31 -229
- package/packages/datadog-instrumentations/src/hono.js +54 -3
- package/packages/datadog-instrumentations/src/http/client.js +2 -2
- package/packages/datadog-instrumentations/src/http/server.js +9 -4
- package/packages/datadog-instrumentations/src/ioredis.js +3 -3
- package/packages/datadog-instrumentations/src/jest/coverage-backfill.js +163 -0
- package/packages/datadog-instrumentations/src/jest.js +390 -183
- package/packages/datadog-instrumentations/src/kafkajs.js +140 -17
- package/packages/datadog-instrumentations/src/mariadb.js +1 -1
- package/packages/datadog-instrumentations/src/memcached.js +2 -1
- package/packages/datadog-instrumentations/src/mocha/main.js +399 -107
- package/packages/datadog-instrumentations/src/mocha/utils.js +48 -8
- package/packages/datadog-instrumentations/src/mongodb-core.js +1 -1
- package/packages/datadog-instrumentations/src/mongoose.js +10 -12
- package/packages/datadog-instrumentations/src/mysql.js +2 -2
- package/packages/datadog-instrumentations/src/mysql2.js +1 -1
- package/packages/datadog-instrumentations/src/nats.js +182 -0
- package/packages/datadog-instrumentations/src/nyc.js +38 -1
- package/packages/datadog-instrumentations/src/openai.js +33 -18
- package/packages/datadog-instrumentations/src/oracledb.js +6 -1
- package/packages/datadog-instrumentations/src/pg.js +1 -1
- package/packages/datadog-instrumentations/src/pino.js +17 -5
- package/packages/datadog-instrumentations/src/playwright.js +537 -297
- package/packages/datadog-instrumentations/src/router.js +80 -34
- package/packages/datadog-instrumentations/src/stripe.js +1 -1
- package/packages/datadog-instrumentations/src/vitest.js +246 -149
- package/packages/datadog-plugin-avsc/src/schema_iterator.js +1 -1
- package/packages/datadog-plugin-azure-cosmos/src/index.js +144 -0
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +1 -1
- package/packages/datadog-plugin-azure-functions/src/index.js +5 -2
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +1 -1
- package/packages/datadog-plugin-bunyan/src/index.js +28 -0
- package/packages/datadog-plugin-cucumber/src/index.js +17 -3
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +223 -45
- package/packages/datadog-plugin-cypress/src/support.js +69 -1
- package/packages/datadog-plugin-dns/src/lookup.js +8 -6
- package/packages/datadog-plugin-elasticsearch/src/index.js +28 -8
- package/packages/datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription.js +1 -1
- package/packages/datadog-plugin-graphql/src/execute.js +2 -0
- package/packages/datadog-plugin-graphql/src/resolve.js +64 -67
- package/packages/datadog-plugin-graphql/src/utils.js +4 -1
- package/packages/datadog-plugin-http/src/server.js +40 -15
- package/packages/datadog-plugin-jest/src/index.js +11 -3
- package/packages/datadog-plugin-jest/src/util.js +15 -8
- package/packages/datadog-plugin-kafkajs/src/batch-consumer.js +1 -1
- package/packages/datadog-plugin-kafkajs/src/producer.js +35 -0
- package/packages/datadog-plugin-langgraph/src/stream.js +1 -1
- package/packages/datadog-plugin-mocha/src/index.js +19 -4
- package/packages/datadog-plugin-mongodb-core/src/index.js +311 -35
- package/packages/datadog-plugin-nats/src/consumer.js +43 -0
- package/packages/datadog-plugin-nats/src/index.js +20 -0
- package/packages/datadog-plugin-nats/src/producer.js +62 -0
- package/packages/datadog-plugin-nats/src/util.js +33 -0
- package/packages/datadog-plugin-next/src/index.js +5 -3
- package/packages/datadog-plugin-openai/src/tracing.js +15 -2
- package/packages/datadog-plugin-oracledb/src/index.js +13 -2
- package/packages/datadog-plugin-pino/src/index.js +42 -0
- package/packages/datadog-plugin-playwright/src/index.js +4 -4
- package/packages/datadog-plugin-protobufjs/src/schema_iterator.js +1 -1
- package/packages/datadog-plugin-redis/src/index.js +37 -2
- package/packages/datadog-plugin-rhea/src/producer.js +1 -1
- package/packages/datadog-plugin-router/src/index.js +33 -44
- package/packages/datadog-plugin-selenium/src/index.js +1 -1
- package/packages/datadog-plugin-undici/src/index.js +19 -0
- package/packages/datadog-plugin-vitest/src/index.js +24 -20
- package/packages/datadog-plugin-winston/src/index.js +30 -0
- package/packages/datadog-shimmer/src/shimmer.js +49 -21
- package/packages/dd-trace/src/aiguard/index.js +1 -1
- package/packages/dd-trace/src/aiguard/sdk.js +1 -1
- package/packages/dd-trace/src/appsec/api_security_sampler.js +1 -1
- package/packages/dd-trace/src/appsec/blocking.js +2 -2
- package/packages/dd-trace/src/appsec/index.js +11 -4
- package/packages/dd-trace/src/appsec/reporter.js +24 -11
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +1 -1
- package/packages/dd-trace/src/appsec/sdk/utils.js +1 -1
- package/packages/dd-trace/src/appsec/user_tracking.js +5 -4
- package/packages/dd-trace/src/baggage.js +7 -1
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +0 -1
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +25 -13
- package/packages/dd-trace/src/ci-visibility/requests/request.js +3 -1
- package/packages/dd-trace/src/ci-visibility/test-api-manual/test-api-manual-plugin.js +5 -3
- package/packages/dd-trace/src/ci-visibility/test-optimization-cache.js +70 -6
- package/packages/dd-trace/src/config/generated-config-types.d.ts +7 -2
- package/packages/dd-trace/src/config/supported-configurations.json +36 -8
- package/packages/dd-trace/src/crashtracking/crashtracker.js +15 -3
- package/packages/dd-trace/src/datastreams/context.js +4 -2
- package/packages/dd-trace/src/datastreams/writer.js +2 -4
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +5 -8
- package/packages/dd-trace/src/encode/0.4.js +124 -108
- package/packages/dd-trace/src/encode/0.5.js +114 -26
- package/packages/dd-trace/src/encode/agentless-ci-visibility.js +57 -42
- package/packages/dd-trace/src/encode/agentless-json.js +4 -2
- package/packages/dd-trace/src/encode/coverage-ci-visibility.js +32 -13
- package/packages/dd-trace/src/encode/span-stats.js +16 -16
- package/packages/dd-trace/src/encode/tags-processors.js +16 -0
- package/packages/dd-trace/src/exporters/common/agents.js +3 -1
- package/packages/dd-trace/src/exporters/common/request.js +3 -1
- package/packages/dd-trace/src/id.js +17 -4
- package/packages/dd-trace/src/lambda/handler.js +2 -4
- package/packages/dd-trace/src/llmobs/plugins/ai/util.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/genai/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/handlers/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/langchain/index.js +9 -7
- package/packages/dd-trace/src/llmobs/plugins/langgraph/index.js +1 -1
- package/packages/dd-trace/src/llmobs/plugins/openai/index.js +1 -1
- package/packages/dd-trace/src/llmobs/sdk.js +10 -16
- package/packages/dd-trace/src/llmobs/span_processor.js +3 -3
- package/packages/dd-trace/src/llmobs/tagger.js +9 -1
- package/packages/dd-trace/src/llmobs/telemetry.js +1 -1
- package/packages/dd-trace/src/llmobs/util.js +66 -3
- package/packages/dd-trace/src/log/index.js +1 -1
- package/packages/dd-trace/src/log/writer.js +3 -1
- package/packages/dd-trace/src/msgpack/chunk.js +394 -10
- package/packages/dd-trace/src/msgpack/index.js +96 -2
- package/packages/dd-trace/src/noop/span.js +3 -1
- package/packages/dd-trace/src/openfeature/encoding.js +70 -0
- package/packages/dd-trace/src/openfeature/flagging_provider.js +20 -0
- package/packages/dd-trace/src/openfeature/span-enrichment-hook.js +143 -0
- package/packages/dd-trace/src/openfeature/span-enrichment.js +149 -0
- package/packages/dd-trace/src/openfeature/writers/exposures.js +51 -20
- package/packages/dd-trace/src/opentelemetry/metrics/periodic_metric_reader.js +1 -1
- package/packages/dd-trace/src/opentelemetry/span-helpers.js +4 -3
- package/packages/dd-trace/src/opentelemetry/span.js +1 -1
- package/packages/dd-trace/src/opentracing/propagation/log.js +18 -7
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +62 -67
- package/packages/dd-trace/src/opentracing/span.js +59 -19
- package/packages/dd-trace/src/opentracing/span_context.js +49 -0
- package/packages/dd-trace/src/plugins/apollo.js +3 -1
- package/packages/dd-trace/src/plugins/ci_plugin.js +23 -33
- package/packages/dd-trace/src/plugins/database.js +7 -6
- package/packages/dd-trace/src/plugins/index.js +4 -0
- package/packages/dd-trace/src/plugins/log_injection.js +56 -0
- package/packages/dd-trace/src/plugins/log_plugin.js +3 -46
- package/packages/dd-trace/src/plugins/outbound.js +1 -1
- package/packages/dd-trace/src/plugins/plugin.js +15 -17
- package/packages/dd-trace/src/plugins/tracing.js +48 -8
- package/packages/dd-trace/src/plugins/util/git.js +3 -1
- package/packages/dd-trace/src/plugins/util/test.js +318 -13
- package/packages/dd-trace/src/plugins/util/web.js +89 -64
- package/packages/dd-trace/src/priority_sampler.js +2 -2
- package/packages/dd-trace/src/profiling/profiler.js +2 -2
- package/packages/dd-trace/src/profiling/profilers/wall.js +10 -4
- package/packages/dd-trace/src/sampling_rule.js +7 -7
- package/packages/dd-trace/src/scope.js +7 -5
- package/packages/dd-trace/src/service-naming/extra-services.js +14 -0
- package/packages/dd-trace/src/service-naming/schemas/v0/messaging.js +10 -0
- package/packages/dd-trace/src/service-naming/schemas/v1/messaging.js +8 -0
- package/packages/dd-trace/src/service-naming/source-resolver.js +46 -0
- package/packages/dd-trace/src/span_format.js +190 -58
- package/packages/dd-trace/src/spanleak.js +1 -1
- package/packages/dd-trace/src/standalone/index.js +3 -3
- package/packages/dd-trace/src/tagger.js +0 -2
- package/vendor/dist/@apm-js-collab/code-transformer/index.js +70 -39
- package/vendor/dist/@datadog/sketches-js/LICENSE +10 -36
- package/vendor/dist/@datadog/sketches-js/index.js +1 -1
- package/vendor/dist/protobufjs/index.js +1 -1
- package/vendor/dist/protobufjs/minimal/index.js +1 -1
- package/packages/dd-trace/src/msgpack/encoder.js +0 -308
- package/packages/dd-trace/src/plugins/structured_log_plugin.js +0 -9
- package/vendor/dist/opentracing/LICENSE +0 -201
- package/vendor/dist/opentracing/binary_carrier.d.ts +0 -11
- package/vendor/dist/opentracing/constants.d.ts +0 -61
- package/vendor/dist/opentracing/examples/demo/demo.d.ts +0 -2
- package/vendor/dist/opentracing/ext/tags.d.ts +0 -90
- package/vendor/dist/opentracing/functions.d.ts +0 -20
- package/vendor/dist/opentracing/global_tracer.d.ts +0 -14
- package/vendor/dist/opentracing/index.d.ts +0 -12
- package/vendor/dist/opentracing/index.js +0 -1
- package/vendor/dist/opentracing/mock_tracer/index.d.ts +0 -5
- package/vendor/dist/opentracing/mock_tracer/mock_context.d.ts +0 -13
- package/vendor/dist/opentracing/mock_tracer/mock_report.d.ts +0 -16
- package/vendor/dist/opentracing/mock_tracer/mock_span.d.ts +0 -50
- package/vendor/dist/opentracing/mock_tracer/mock_tracer.d.ts +0 -26
- package/vendor/dist/opentracing/noop.d.ts +0 -8
- package/vendor/dist/opentracing/reference.d.ts +0 -33
- package/vendor/dist/opentracing/span.d.ts +0 -147
- package/vendor/dist/opentracing/span_context.d.ts +0 -26
- package/vendor/dist/opentracing/test/api_compatibility.d.ts +0 -16
- package/vendor/dist/opentracing/test/mocktracer_implemenation.d.ts +0 -3
- package/vendor/dist/opentracing/test/noop_implementation.d.ts +0 -4
- package/vendor/dist/opentracing/test/opentracing_api.d.ts +0 -3
- package/vendor/dist/opentracing/test/unittest.d.ts +0 -2
- package/vendor/dist/opentracing/tracer.d.ts +0 -127
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var __webpack_modules__={"./@protobufjs/aspromise/index.js"(t){t.exports=asPromise;function asPromise(t,r){for(var e=Array(arguments.length-1),i=0,o=2,n=!0;o<arguments.length;)e[i++]=arguments[o++];return new Promise(function(o,s){e[i]=function(t){if(n)if(n=!1,t)s(t);else{for(var r=Array(arguments.length-1),e=0;e<r.length;)r[e++]=arguments[e];o.apply(null,r)}};try{t.apply(r||null,e)}catch(t){n&&(n=!1,s(t))}})}},"./@protobufjs/base64/index.js"(t,r){var e=r;e.length=function(t){var r=t.length;if(!r)return 0;for(var e=0;--r%4>1&&"="===t.charAt(r);)++e;return Math.ceil(3*t.length)/4-e};for(var i=Array(64),o=Array(123),n=0;n<64;)o[i[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;e.encode=function(t,r,e){for(var o,n=null,s=[],u=0,f=0;r<e;){var a=t[r++];switch(f){case 0:s[u++]=i[a>>2],o=(3&a)<<4,f=1;break;case 1:s[u++]=i[o|a>>4],o=(15&a)<<2,f=2;break;case 2:s[u++]=i[o|a>>6],s[u++]=i[63&a],f=0}u>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,s)),u=0)}return(f&&(s[u++]=i[o],s[u++]=61,1===f&&(s[u++]=61)),n)?(u&&n.push(String.fromCharCode.apply(String,s.slice(0,u))),n.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var s="invalid encoding";e.decode=function(t,r,e){for(var i,n=e,u=0,f=0;f<t.length;){var a=t.charCodeAt(f++);if(61===a&&u>1)break;if(void 0===(a=o[a]))throw Error(s);switch(u){case 0:i=a,u=1;break;case 1:r[e++]=i<<2|(48&a)>>4,i=a,u=2;break;case 2:r[e++]=(15&i)<<4|(60&a)>>2,i=a,u=3;break;case 3:r[e++]=(3&i)<<6|a,u=0}}if(1===u)throw Error(s);return e-n},e.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},"./@protobufjs/eventemitter/index.js"(t){function EventEmitter(){this._listeners={}}t.exports=EventEmitter,EventEmitter.prototype.on=function(t,r,e){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:e||this}),this},EventEmitter.prototype.off=function(t,r){if(void 0===t)this._listeners={};else if(void 0===r)this._listeners[t]=[];else for(var e=this._listeners[t],i=0;i<e.length;)e[i].fn===r?e.splice(i,1):++i;return this},EventEmitter.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var e=[],i=1;i<arguments.length;)e.push(arguments[i++]);for(i=0;i<r.length;)r[i].fn.apply(r[i++].ctx,e)}return this}},"./@protobufjs/float/index.js"(t){function factory(t){return"u">typeof Float32Array?!function(){var r=new Float32Array([-0]),e=new Uint8Array(r.buffer),i=128===e[3];function writeFloat_f32_cpy(t,i,o){r[0]=t,i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3]}function writeFloat_f32_rev(t,i,o){r[0]=t,i[o]=e[3],i[o+1]=e[2],i[o+2]=e[1],i[o+3]=e[0]}function readFloat_f32_cpy(t,i){return e[0]=t[i],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],r[0]}function readFloat_f32_rev(t,i){return e[3]=t[i],e[2]=t[i+1],e[1]=t[i+2],e[0]=t[i+3],r[0]}t.writeFloatLE=i?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=i?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=i?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=i?readFloat_f32_rev:readFloat_f32_cpy}():!function(){function writeFloat_ieee754(t,r,e,i){var o=+(r<0);if(o&&(r=-r),0===r)t(1/r>0?0:0x80000000,e,i);else if(isNaN(r))t(0x7fc00000,e,i);else if(r>34028234663852886e22)t((o<<31|0x7f800000)>>>0,e,i);else if(r<11754943508222875e-54)t((o<<31|Math.round(r/1401298464324817e-60))>>>0,e,i);else{var n=Math.floor(Math.log(r)/Math.LN2),s=8388607&Math.round(r*Math.pow(2,-n)*8388608);t((o<<31|n+127<<23|s)>>>0,e,i)}}function readFloat_ieee754(t,r,e){var i=t(r,e),o=(i>>31)*2+1,n=i>>>23&255,s=8388607&i;return 255===n?s?NaN:1/0*o:0===n?1401298464324817e-60*o*s:o*Math.pow(2,n-150)*(s+8388608)}t.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),t.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),t.readFloatLE=readFloat_ieee754.bind(null,readUintLE),t.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}(),"u">typeof Float64Array?!function(){var r=new Float64Array([-0]),e=new Uint8Array(r.buffer),i=128===e[7];function writeDouble_f64_cpy(t,i,o){r[0]=t,i[o]=e[0],i[o+1]=e[1],i[o+2]=e[2],i[o+3]=e[3],i[o+4]=e[4],i[o+5]=e[5],i[o+6]=e[6],i[o+7]=e[7]}function writeDouble_f64_rev(t,i,o){r[0]=t,i[o]=e[7],i[o+1]=e[6],i[o+2]=e[5],i[o+3]=e[4],i[o+4]=e[3],i[o+5]=e[2],i[o+6]=e[1],i[o+7]=e[0]}function readDouble_f64_cpy(t,i){return e[0]=t[i],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],e[6]=t[i+6],e[7]=t[i+7],r[0]}function readDouble_f64_rev(t,i){return e[7]=t[i],e[6]=t[i+1],e[5]=t[i+2],e[4]=t[i+3],e[3]=t[i+4],e[2]=t[i+5],e[1]=t[i+6],e[0]=t[i+7],r[0]}t.writeDoubleLE=i?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=i?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=i?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=i?readDouble_f64_rev:readDouble_f64_cpy}():!function(){function writeDouble_ieee754(t,r,e,i,o,n){var s,u=+(i<0);if(u&&(i=-i),0===i)t(0,o,n+r),t(1/i>0?0:0x80000000,o,n+e);else if(isNaN(i))t(0,o,n+r),t(0x7ff80000,o,n+e);else if(i>17976931348623157e292)t(0,o,n+r),t((u<<31|0x7ff00000)>>>0,o,n+e);else if(i<22250738585072014e-324)t((s=i/5e-324)>>>0,o,n+r),t((u<<31|s/0x100000000)>>>0,o,n+e);else{var f=Math.floor(Math.log(i)/Math.LN2);1024===f&&(f=1023),t(0x10000000000000*(s=i*Math.pow(2,-f))>>>0,o,n+r),t((u<<31|f+1023<<20|1048576*s&1048575)>>>0,o,n+e)}}function readDouble_ieee754(t,r,e,i,o){var n=t(i,o+r),s=t(i,o+e),u=(s>>31)*2+1,f=s>>>20&2047,a=0x100000000*(1048575&s)+n;return 2047===f?a?NaN:1/0*u:0===f?5e-324*u*a:u*Math.pow(2,f-1075)*(a+0x10000000000000)}t.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),t.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),t.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),t.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}(),t}function writeUintLE(t,r,e){r[e]=255&t,r[e+1]=t>>>8&255,r[e+2]=t>>>16&255,r[e+3]=t>>>24}function writeUintBE(t,r,e){r[e]=t>>>24,r[e+1]=t>>>16&255,r[e+2]=t>>>8&255,r[e+3]=255&t}function readUintLE(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}function readUintBE(t,r){return(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}t.exports=factory(factory)},"./@protobufjs/inquire/index.js"(module){module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},"./@protobufjs/pool/index.js"(t){t.exports=pool;function pool(t,r,e){var i=e||8192,o=i>>>1,n=null,s=i;return function(e){if(e<1||e>o)return t(e);s+e>i&&(n=t(i),s=0);var u=r.call(n,s,s+=e);return 7&s&&(s=(7|s)+1),u}}},"./@protobufjs/utf8/index.js"(t,r){var e=r;e.length=function(t){for(var r=0,e=0,i=0;i<t.length;++i)(e=t.charCodeAt(i))<128?r+=1:e<2048?r+=2:(64512&e)==55296&&(64512&t.charCodeAt(i+1))==56320?(++i,r+=4):r+=3;return r},e.read=function(t,r,e){if(e-r<1)return"";for(var i,o=null,n=[],s=0;r<e;)(i=t[r++])<128?n[s++]=i:i>191&&i<224?n[s++]=(31&i)<<6|63&t[r++]:i>239&&i<365?(i=((7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,n[s++]=55296+(i>>10),n[s++]=56320+(1023&i)):n[s++]=(15&i)<<12|(63&t[r++])<<6|63&t[r++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,n)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,n.slice(0,s))),o.join("")):String.fromCharCode.apply(String,n.slice(0,s))},e.write=function(t,r,e){for(var i,o,n=e,s=0;s<t.length;++s)(i=t.charCodeAt(s))<128?r[e++]=i:(i<2048?r[e++]=i>>6|192:((64512&i)==55296&&(64512&(o=t.charCodeAt(s+1)))==56320?(i=65536+((1023&i)<<10)+(1023&o),++s,r[e++]=i>>18|240,r[e++]=i>>12&63|128):r[e++]=i>>12|224,r[e++]=i>>6&63|128),r[e++]=63&i|128);return e-n}},"./protobufjs/minimal.js"(t,r,e){t.exports=e("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,r,e){var i=r;function configure(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}i.build="minimal",i.Writer=e("./protobufjs/src/writer.js"),i.BufferWriter=e("./protobufjs/src/writer_buffer.js"),i.Reader=e("./protobufjs/src/reader.js"),i.BufferReader=e("./protobufjs/src/reader_buffer.js"),i.util=e("./protobufjs/src/util/minimal.js"),i.rpc=e("./protobufjs/src/rpc.js"),i.roots=e("./protobufjs/src/roots.js"),i.configure=configure,configure()},"./protobufjs/src/reader.js"(t,r,e){t.exports=Reader;var i,o=e("./protobufjs/src/util/minimal.js"),n=o.LongBits,s=o.utf8;function indexOutOfRange(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length}var u="u">typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new Reader(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new Reader(t);throw Error("illegal buffer")},create=function(){return o.Buffer?function(t){return(Reader.create=function(t){return o.Buffer.isBuffer(t)?new i(t):u(t)})(t)}:u};function readLongVarint(){var t=new n(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*r)>>>0,t}if(this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new n(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader.create=create(),Reader.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,Reader.prototype.uint32=function(){var t=0xffffffff;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return t}}(),Reader.prototype.int32=function(){return 0|this.uint32()},Reader.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},Reader.prototype.bool=function(){return 0!==this.uint32()},Reader.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var t=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},Reader.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var t=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.bytes=function(){var t=this.uint32(),r=this.pos,e=this.pos+t;if(e>this.len)throw indexOutOfRange(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,e);if(r===e){var i=o.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,e)},Reader.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},Reader.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw indexOutOfRange(this,t);this.pos+=t}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(128&this.buf[this.pos++]);return this},Reader.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){i=t,Reader.create=create(),i._configure();var r=o.Long?"toLong":"toNumber";o.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[r](!1)},uint64:function(){return readLongVarint.call(this)[r](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[r](!1)},fixed64:function(){return readFixed64.call(this)[r](!0)},sfixed64:function(){return readFixed64.call(this)[r](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,r,e){t.exports=BufferReader;var i=e("./protobufjs/src/reader.js");(BufferReader.prototype=Object.create(i.prototype)).constructor=BufferReader;var o=e("./protobufjs/src/util/minimal.js");function BufferReader(t){i.call(this,t)}BufferReader._configure=function(){o.Buffer&&(BufferReader.prototype._slice=o.Buffer.prototype.slice)},BufferReader.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},BufferReader._configure()},"./protobufjs/src/roots.js"(t){t.exports={}},"./protobufjs/src/rpc.js"(t,r,e){r.Service=e("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,r,e){t.exports=Service;var i=e("./protobufjs/src/util/minimal.js");function Service(t,r,e){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!e}(Service.prototype=Object.create(i.EventEmitter.prototype)).constructor=Service,Service.prototype.rpcCall=function rpcCall(t,r,e,o,n){if(!o)throw TypeError("request must be specified");var s=this;if(!n)return i.asPromise(rpcCall,s,t,r,e,o);if(!s.rpcImpl)return void setTimeout(function(){n(Error("already ended"))},0);try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(r,i){if(r)return s.emit("error",r,t),n(r);if(null===i)return void s.end(!0);if(!(i instanceof e))try{i=e[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(r){return s.emit("error",r,t),n(r)}return s.emit("data",i,t),n(null,i)})}catch(r){s.emit("error",r,t),setTimeout(function(){n(r)},0);return}},Service.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},"./protobufjs/src/util/longbits.js"(t,r,e){t.exports=LongBits;var i=e("./protobufjs/src/util/minimal.js");function LongBits(t,r){this.lo=t>>>0,this.hi=r>>>0}var o=LongBits.zero=new LongBits(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var n=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return o;var r=t<0;r&&(t=-t);var e=t>>>0,i=(t-e)/0x100000000>>>0;return r&&(i=~i>>>0,e=~e>>>0,++e>0xffffffff&&(e=0,++i>0xffffffff&&(i=0))),new LongBits(e,i)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if(i.isString(t))if(!i.Long)return LongBits.fromNumber(parseInt(t,10));else t=i.Long.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):o},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,e=~this.hi>>>0;return r||(e=e+1>>>0),-(r+0x100000000*e)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===n?o:new LongBits((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},LongBits.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},LongBits.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},LongBits.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},LongBits.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,e=this.hi>>>24;return 0===e?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:e<128?9:10}},"./protobufjs/src/util/minimal.js"(t,r,e){var i=r;function merge(t,r,e){for(var i=Object.keys(r),o=0;o<i.length;++o)void 0!==t[i[o]]&&e||(t[i[o]]=r[i[o]]);return t}function newError(t){function CustomError(t,r){if(!(this instanceof CustomError))return new CustomError(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&merge(this,r)}return CustomError.prototype=Object.create(Error.prototype,{constructor:{value:CustomError,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),CustomError}i.asPromise=e("./@protobufjs/aspromise/index.js"),i.base64=e("./@protobufjs/base64/index.js"),i.EventEmitter=e("./@protobufjs/eventemitter/index.js"),i.float=e("./@protobufjs/float/index.js"),i.inquire=e("./@protobufjs/inquire/index.js"),i.utf8=e("./@protobufjs/utf8/index.js"),i.pool=e("./@protobufjs/pool/index.js"),i.LongBits=e("./protobufjs/src/util/longbits.js"),i.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.isset=i.isSet=function(t,r){var e=t[r];return!!(null!=e&&t.hasOwnProperty(r))&&("object"!=typeof e||(Array.isArray(e)?e.length:Object.keys(e).length)>0)},i.Buffer=function(){try{var t=i.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(t){return"number"==typeof t?i.Buffer?i._Buffer_allocUnsafe(t):new i.Array(t):i.Buffer?i._Buffer_from(t):"u"<typeof Uint8Array?t:new Uint8Array(t)},i.Array="u">typeof Uint8Array?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(t){return t?i.LongBits.from(t).toHash():i.LongBits.zeroHash},i.longFromHash=function(t,r){var e=i.LongBits.fromHash(t);return i.Long?i.Long.fromBits(e.lo,e.hi,r):e.toNumber(!!r)},i.merge=merge,i.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},i.newError=newError,i.ProtocolError=newError("ProtocolError"),i.oneOfGetter=function(t){for(var r={},e=0;e<t.length;++e)r[t[e]]=1;return function(){for(var t=Object.keys(this),e=t.length-1;e>-1;--e)if(1===r[t[e]]&&void 0!==this[t[e]]&&null!==this[t[e]])return t[e]}},i.oneOfSetter=function(t){return function(r){for(var e=0;e<t.length;++e)t[e]!==r&&delete this[t[e]]}},i.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},i._configure=function(){var t=i.Buffer;if(!t){i._Buffer_from=i._Buffer_allocUnsafe=null;return}i._Buffer_from=t.from!==Uint8Array.from&&t.from||function(r,e){return new t(r,e)},i._Buffer_allocUnsafe=t.allocUnsafe||function(r){return new t(r)}}},"./protobufjs/src/writer.js"(t,r,e){t.exports=Writer;var i,o=e("./protobufjs/src/util/minimal.js"),n=o.LongBits,s=o.base64,u=o.utf8;function Op(t,r,e){this.fn=t,this.len=r,this.next=void 0,this.val=e}function noop(){}function State(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Writer(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create=function(){return o.Buffer?function(){return(Writer.create=function(){return new i})()}:function(){return new Writer}};function writeByte(t,r,e){r[e]=255&t}function writeVarint32(t,r,e){for(;t>127;)r[e++]=127&t|128,t>>>=7;r[e]=t}function VarintOp(t,r){this.len=t,this.next=void 0,this.val=r}function writeVarint64(t,r,e){for(;t.hi;)r[e++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)r[e++]=127&t.lo|128,t.lo=t.lo>>>7;r[e++]=t.lo}function writeFixed32(t,r,e){r[e]=255&t,r[e+1]=t>>>8&255,r[e+2]=t>>>16&255,r[e+3]=t>>>24}Writer.create=create(),Writer.alloc=function(t){return new o.Array(t)},o.Array!==Array&&(Writer.alloc=o.pool(Writer.alloc,o.Array.prototype.subarray)),Writer.prototype._push=function(t,r,e){return this.tail=this.tail.next=new Op(t,r,e),this.len+=r,this},VarintOp.prototype=Object.create(Op.prototype),VarintOp.prototype.fn=writeVarint32,Writer.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new VarintOp((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5,t)).len,this},Writer.prototype.int32=function(t){return t<0?this._push(writeVarint64,10,n.fromNumber(t)):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var r=n.from(t);return this._push(writeVarint64,r.length(),r)},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var r=n.from(t).zzEncode();return this._push(writeVarint64,r.length(),r)},Writer.prototype.bool=function(t){return this._push(writeByte,1,+!!t)},Writer.prototype.fixed32=function(t){return this._push(writeFixed32,4,t>>>0)},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var r=n.from(t);return this._push(writeFixed32,4,r.lo)._push(writeFixed32,4,r.hi)},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._push(o.float.writeFloatLE,4,t)},Writer.prototype.double=function(t){return this._push(o.float.writeDoubleLE,8,t)};var f=o.Array.prototype.set?function(t,r,e){r.set(t,e)}:function(t,r,e){for(var i=0;i<t.length;++i)r[e+i]=t[i]};Writer.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(writeByte,1,0);if(o.isString(t)){var e=Writer.alloc(r=s.length(t));s.decode(t,e,0),t=e}return this.uint32(r)._push(f,r,t)},Writer.prototype.string=function(t){var r=u.length(t);return r?this.uint32(r)._push(u.write,r,t):this._push(writeByte,1,0)},Writer.prototype.fork=function(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this},Writer.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this},Writer.prototype.ldelim=function(){var t=this.head,r=this.tail,e=this.len;return this.reset().uint32(e),e&&(this.tail.next=t.next,this.tail=r,this.len+=e),this},Writer.prototype.finish=function(){for(var t=this.head.next,r=this.constructor.alloc(this.len),e=0;t;)t.fn(t.val,r,e),e+=t.len,t=t.next;return r},Writer._configure=function(t){i=t,Writer.create=create(),i._configure()}},"./protobufjs/src/writer_buffer.js"(t,r,e){t.exports=BufferWriter;var i=e("./protobufjs/src/writer.js");(BufferWriter.prototype=Object.create(i.prototype)).constructor=BufferWriter;var o=e("./protobufjs/src/util/minimal.js");function BufferWriter(){i.call(this)}function writeStringBuffer(t,r,e){t.length<40?o.utf8.write(t,r,e):r.utf8Write?r.utf8Write(t,e):r.write(t,e)}BufferWriter._configure=function(){BufferWriter.alloc=o._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(t,r,e){r.set(t,e)}:function(t,r,e){if(t.copy)t.copy(r,e,0,t.length);else for(var i=0;i<t.length;)r[e++]=t[i++]}},BufferWriter.prototype.bytes=function(t){o.isString(t)&&(t=o._Buffer_from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this._push(BufferWriter.writeBytesBuffer,r,t),this},BufferWriter.prototype.string=function(t){var r=o.Buffer.byteLength(t);return this.uint32(r),r&&this._push(writeStringBuffer,r,t),this},BufferWriter._configure()}},__webpack_module_cache__={};function __webpack_require__(t){var r=__webpack_module_cache__[t];if(void 0!==r)return r.exports;var e=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(e.exports,e,e.exports,__webpack_require__),e.exports}var __webpack_exports__=__webpack_require__("./protobufjs/minimal.js");module.exports=__webpack_exports__})();
|
|
1
|
+
(()=>{var t={"./protobufjs/src/util sync recursive"(t){function webpackEmptyContext(t){var r=Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./protobufjs/src/util sync recursive",t.exports=webpackEmptyContext},"./long/umd/index.js"(t,r){!function(e,i){function preferDefault(t){return t.default||t}"function"==typeof define&&define.amd?define([],function(){var t={};return i(t),preferDefault(t)}):(i(r),t.exports=preferDefault(r))}("u">typeof globalThis?globalThis:"u">typeof self&&self,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Long(t,r,e){this.low=0|t,this.high=0|r,this.unsigned=!!e}function isLong(t){return!0===(t&&t.__isLong__)}function ctz32(t){var r=Math.clz32(t&-t);return t?31-r:r}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var e={},i={};function fromInt(t,r){var n,o,s;if(r)return(t>>>=0,(s=0<=t&&t<256)&&(o=i[t]))?o:(n=fromBits(t,0,!0),s&&(i[t]=n),n);return(t|=0,(s=-128<=t&&t<128)&&(o=e[t]))?o:(n=fromBits(t,t<0?-1:0,!1),s&&(e[t]=n),n)}function fromNumber(t,r){if(isNaN(t))return r?a:h;if(r){if(t<0)return a;if(t>=s)return d}else{if(t<=-u)return m;if(t+1>=u)return p}return t<0?fromNumber(-t,r).neg():fromBits(t%o|0,t/o|0,r)}function fromBits(t,r,e){return new Long(t,r,e)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var n=Math.pow;function fromString(t,r,e){if(0===t.length)throw Error("empty string");if("number"==typeof r?(e=r,r=!1):r=!!r,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return r?a:h;if((e=e||10)<2||36<e)throw RangeError("radix");if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return fromString(t.substring(1),r,e).neg();for(var i,o=fromNumber(n(e,8)),s=h,u=0;u<t.length;u+=8){var f=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+f),e);if(f<8){var c=fromNumber(n(e,f));s=s.mul(c).add(fromNumber(l))}else s=(s=s.mul(o)).add(fromNumber(l))}return s.unsigned=r,s}function fromValue(t,r){return"number"==typeof t?fromNumber(t,r):"string"==typeof t?fromString(t,r):fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)}Long.fromString=fromString,Long.fromValue=fromValue;var o=0x100000000,s=0xffffffffffffffff,u=0x8000000000000000,f=fromInt(0x1000000),h=fromInt(0);Long.ZERO=h;var a=fromInt(0,!0);Long.UZERO=a;var l=fromInt(1);Long.ONE=l;var c=fromInt(1,!0);Long.UONE=c;var g=fromInt(-1);Long.NEG_ONE=g;var p=fromBits(-1,0x7fffffff,!1);Long.MAX_VALUE=p;var d=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=d;var m=fromBits(0,-0x80000000,!1);Long.MIN_VALUE=m;var b=Long.prototype;b.toInt=function(){return this.unsigned?this.low>>>0:this.low},b.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},b.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(!this.eq(m))return"-"+this.neg().toString(t);else{var r=fromNumber(t),e=this.div(r),i=e.mul(r).sub(this);return e.toString(t)+i.toInt().toString(t)}for(var o=fromNumber(n(t,6),this.unsigned),s=this,u="";;){var f=s.div(o),h=(s.sub(f.mul(o)).toInt()>>>0).toString(t);if((s=f).isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},b.getHighBits=function(){return this.high},b.getHighBitsUnsigned=function(){return this.high>>>0},b.getLowBits=function(){return this.low},b.getLowBitsUnsigned=function(){return this.low>>>0},b.getNumBitsAbs=function(){if(this.isNegative())return this.eq(m)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return 0!=this.high?r+33:r+1},b.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&-1===t&&(0!==this.low||-2097152!==this.high)},b.isZero=function(){return 0===this.high&&0===this.low},b.eqz=b.isZero,b.isNegative=function(){return!this.unsigned&&this.high<0},b.isPositive=function(){return this.unsigned||this.high>=0},b.isOdd=function(){return(1&this.low)==1},b.isEven=function(){return(1&this.low)==0},b.equals=function(t){return isLong(t)||(t=fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},b.eq=b.equals,b.notEquals=function(t){return!this.eq(t)},b.neq=b.notEquals,b.ne=b.notEquals,b.lessThan=function(t){return 0>this.comp(t)},b.lt=b.lessThan,b.lessThanOrEqual=function(t){return 0>=this.comp(t)},b.lte=b.lessThanOrEqual,b.le=b.lessThanOrEqual,b.greaterThan=function(t){return this.comp(t)>0},b.gt=b.greaterThan,b.greaterThanOrEqual=function(t){return this.comp(t)>=0},b.gte=b.greaterThanOrEqual,b.ge=b.greaterThanOrEqual,b.compare=function(t){if(isLong(t)||(t=fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),e=t.isNegative();return r&&!e?-1:!r&&e?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},b.comp=b.compare,b.negate=function(){return!this.unsigned&&this.eq(m)?m:this.not().add(l)},b.neg=b.negate,b.add=function(t){isLong(t)||(t=fromValue(t));var r,e,i=this.high>>>16,n=65535&this.high,o=this.low>>>16,s=65535&this.low,u=t.high>>>16,f=65535&t.high,h=t.low>>>16,a=65535&t.low,l=0,c=0;return r=0+((e=0+(s+a))>>>16),e&=65535,r+=o+h,c+=r>>>16,r&=65535,c+=n+f,l+=c>>>16,c&=65535,l+=i+u,fromBits(r<<16|e,(l&=65535)<<16|c,this.unsigned)},b.subtract=function(t){return isLong(t)||(t=fromValue(t)),this.add(t.neg())},b.sub=b.subtract,b.multiply=function(t){if(this.isZero())return this;if(isLong(t)||(t=fromValue(t)),r)return fromBits(r.mul(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned);if(t.isZero())return this.unsigned?a:h;if(this.eq(m))return t.isOdd()?m:h;if(t.eq(m))return this.isOdd()?m:h;if(this.isNegative())if(t.isNegative())return this.neg().mul(t.neg());else return this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(f)&&t.lt(f))return fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var e,i,n=this.high>>>16,o=65535&this.high,s=this.low>>>16,u=65535&this.low,l=t.high>>>16,c=65535&t.high,g=t.low>>>16,p=65535&t.low,d=0,b=0;return e=0+((i=0+u*p)>>>16),i&=65535,e+=s*p,b+=e>>>16,e&=65535,e+=u*g,b+=e>>>16,e&=65535,b+=o*p,d+=b>>>16,b&=65535,b+=s*g,d+=b>>>16,b&=65535,b+=u*c,d+=b>>>16,b&=65535,d+=n*p+o*g+s*c+u*l,fromBits(e<<16|i,(d&=65535)<<16|b,this.unsigned)},b.mul=b.multiply,b.divide=function(t){if(isLong(t)||(t=fromValue(t)),t.isZero())throw Error("division by zero");if(r){var e,i,o;return this.unsigned||-0x80000000!==this.high||-1!==t.low||-1!==t.high?fromBits((this.unsigned?r.div_u:r.div_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?a:h;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return a;if(t.gt(this.shru(1)))return c;o=a}else{if(this.eq(m))if(t.eq(l)||t.eq(g))return m;else return t.eq(m)?l:(e=this.shr(1).div(t).shl(1)).eq(h)?t.isNegative()?l:g:(i=this.sub(t.mul(e)),o=e.add(i.div(t)));if(t.eq(m))return this.unsigned?a:h;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=h}for(i=this;i.gte(t);){for(var s=Math.ceil(Math.log(e=Math.max(1,Math.floor(i.toNumber()/t.toNumber())))/Math.LN2),u=s<=48?1:n(2,s-48),f=fromNumber(e),p=f.mul(t);p.isNegative()||p.gt(i);)e-=u,p=(f=fromNumber(e,this.unsigned)).mul(t);f.isZero()&&(f=l),o=o.add(f),i=i.sub(p)}return o},b.div=b.divide,b.modulo=function(t){return(isLong(t)||(t=fromValue(t)),r)?fromBits((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},b.mod=b.modulo,b.rem=b.modulo,b.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},b.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},b.clz=b.countLeadingZeros,b.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},b.ctz=b.countTrailingZeros,b.and=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low&t.low,this.high&t.high,this.unsigned)},b.or=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low|t.low,this.high|t.high,this.unsigned)},b.xor=function(t){return isLong(t)||(t=fromValue(t)),fromBits(this.low^t.low,this.high^t.high,this.unsigned)},b.shiftLeft=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):fromBits(0,this.low<<t-32,this.unsigned)},b.shl=b.shiftLeft,b.shiftRight=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},b.shr=b.shiftRight,b.shiftRightUnsigned=function(t){return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?fromBits(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):32===t?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>t-32,0,this.unsigned)},b.shru=b.shiftRightUnsigned,b.shr_u=b.shiftRightUnsigned,b.rotateLeft=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,fromBits(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))},b.rotl=b.rotateLeft,b.rotateRight=function(t){var r;return(isLong(t)&&(t=t.toInt()),0==(t&=63))?this:32===t?fromBits(this.high,this.low,this.unsigned):t<32?(r=32-t,fromBits(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,fromBits(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))},b.rotr=b.rotateRight,b.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},b.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},b.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},b.toBytesLE=function(){var t=this.high,r=this.low;return[255&r,r>>>8&255,r>>>16&255,r>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},b.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,r>>>24,r>>>16&255,r>>>8&255,255&r]},Long.fromBytes=function(t,r,e){return e?Long.fromBytesLE(t,r):Long.fromBytesBE(t,r)},Long.fromBytesLE=function(t,r){return new Long(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},Long.fromBytesBE=function(t,r){return new Long(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},"function"==typeof BigInt&&(Long.fromBigInt=function(t,r){return fromBits(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),r)},Long.fromValue=function(t,r){return"bigint"==typeof t?Long.fromBigInt(t,r):fromValue(t,r)},b.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t}),t.default=Long})},"./protobufjs/minimal.js"(t,r,e){"use strict";t.exports=e("./protobufjs/src/index-minimal.js")},"./protobufjs/src/index-minimal.js"(t,r,e){"use strict";function configure(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=e("./protobufjs/src/writer.js"),r.BufferWriter=e("./protobufjs/src/writer_buffer.js"),r.Reader=e("./protobufjs/src/reader.js"),r.BufferReader=e("./protobufjs/src/reader_buffer.js"),r.util=e("./protobufjs/src/util/minimal.js"),r.rpc=e("./protobufjs/src/rpc.js"),r.roots=e("./protobufjs/src/roots.js"),r.configure=configure,configure()},"./protobufjs/src/reader.js"(t,r,e){"use strict";t.exports=Reader;var i,n=e("./protobufjs/src/util/minimal.js"),o=n.LongBits,s=n.utf8;function indexOutOfRange(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function Reader(t){this.buf=t,this.pos=0,this.len=t.length}var u="u">typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new Reader(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new Reader(t);throw Error("illegal buffer")},create=function(){return n.Buffer?function(t){return(Reader.create=function(t){return n.Buffer.isBuffer(t)?new i(t):u(t)})(t)}:u};function readLongVarint(){var t=new o(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*r)>>>0,t}if(this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw indexOutOfRange(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function readFixed32_end(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new o(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader.create=create(),Reader.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,Reader.prototype.raw=function(t,r){return Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},Reader.prototype.uint32=function(){var t=this.buf,r=this.pos,e=(127&t[r])>>>0;if(t[r++]<128||(e=(e|(127&t[r])<<7)>>>0,t[r++]<128)||(e=(e|(127&t[r])<<14)>>>0,t[r++]<128)||(e=(e|(127&t[r])<<21)>>>0,t[r++]<128)||(e=(e|(15&t[r])<<28)>>>0,t[r++]<128))return this.pos=r,e;for(var i=0;i<5;++i){if(r>=this.len)throw this.pos=r,indexOutOfRange(this);if(t[r++]<128)return this.pos=r,e}throw this.pos=r,Error("invalid varint encoding")},Reader.prototype.tag=function(){var t=this.buf,r=this.pos,e=(127&t[r])>>>0;if(t[r++]<128||(e=(e|(127&t[r])<<7)>>>0,t[r++]<128)||(e=(e|(127&t[r])<<14)>>>0,t[r++]<128)||(e=(e|(127&t[r])<<21)>>>0,t[r++]<128))return this.pos=r,e;if(e=(e|(15&t[r])<<28)>>>0,t[r]<128&&(112&t[r])==0)return this.pos=r+1,e;throw this.pos=r+1,Error("invalid tag encoding")},Reader.prototype.int32=function(){return 0|this.uint32()},Reader.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)},Reader.prototype.bool=function(){for(var t,r=!1,e=0;e<10;++e){if(this.pos>=this.len)throw indexOutOfRange(this);if(127&(t=this.buf[this.pos++])&&(r=!0),t<128)return r}throw Error("invalid varint encoding")},Reader.prototype.fixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.sfixed32=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return 0|readFixed32_end(this.buf,this.pos+=4)},Reader.prototype.float=function(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},Reader.prototype.double=function(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},Reader.prototype.bytes=function(){var t=this.uint32(),r=this.pos,e=this.pos+t;if(e>this.len)throw indexOutOfRange(this,t);return this.pos=e,this.raw(r,e)},Reader.prototype.string=function(){var t=this.uint32(),r=this.pos,e=this.pos+t;if(e>this.len)throw indexOutOfRange(this,t);return this.pos=e,s.read(this.buf,r,e)},Reader.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw indexOutOfRange(this,t);this.pos+=t}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(128&this.buf[this.pos++]);return this},Reader.recursionLimit=n.recursionLimit,Reader.prototype.skipType=function(t,r,e){if(void 0===r&&(r=0),r>Reader.recursionLimit)throw Error("max depth exceeded");if(0===e)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var i=this.tag(),n=i>>>3;if(t=7&i,!n)throw Error("illegal tag: field number 0");if(4===t){if(void 0!==e&&n!==e)throw Error("invalid end group tag");break}this.skipType(t,r+1,n)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},Reader._configure=function(t){i=t,Reader.create=create(),i._configure();var r=n.Long?"toLong":"toNumber";n.merge(Reader.prototype,{int64:function(){return readLongVarint.call(this)[r](!1)},uint64:function(){return readLongVarint.call(this)[r](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[r](!1)},fixed64:function(){return readFixed64.call(this)[r](!0)},sfixed64:function(){return readFixed64.call(this)[r](!1)}})}},"./protobufjs/src/reader_buffer.js"(t,r,e){"use strict";t.exports=BufferReader;var i=e("./protobufjs/src/reader.js");(BufferReader.prototype=Object.create(i.prototype)).constructor=BufferReader;var n=e("./protobufjs/src/util/minimal.js");function BufferReader(t){i.call(this,t)}BufferReader._configure=function(){n.Buffer&&(BufferReader.prototype._slice=n.Buffer.prototype.slice)},BufferReader.prototype.raw=function(t,r){return t===r?n.Buffer.alloc(0):this._slice.call(this.buf,t,r)},BufferReader.prototype.string=function(){var t=this.uint32(),r=this.pos,e=this.pos+t;if(e>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=e,this.buf.utf8Slice?this.buf.utf8Slice(r,e):this.buf.toString("utf-8",r,e)},BufferReader._configure()},"./protobufjs/src/roots.js"(t){"use strict";t.exports={}},"./protobufjs/src/rpc.js"(t,r,e){"use strict";r.Service=e("./protobufjs/src/rpc/service.js")},"./protobufjs/src/rpc/service.js"(t,r,e){"use strict";t.exports=Service;var i=e("./protobufjs/src/util/minimal.js");function Service(t,r,e){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!e}(Service.prototype=Object.create(i.EventEmitter.prototype)).constructor=Service,Service.prototype.rpcCall=function rpcCall(t,r,e,n,o){if(!n)throw TypeError("request must be specified");var s=this;if(!o)return i.asPromise(rpcCall,s,t,r,e,n);if(!s.rpcImpl)return void setTimeout(function(){o(Error("already ended"))},0);try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](n).finish(),function(r,i){if(r)return s.emit("error",r,t),o(r);if(null===i)return void s.end(!0);if(!(i instanceof e))try{i=e[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(r){return s.emit("error",r,t),o(r)}return s.emit("data",i,t),o(null,i)})}catch(r){s.emit("error",r,t),setTimeout(function(){o(r)},0);return}},Service.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},"./protobufjs/src/util/aspromise.js"(t){"use strict";t.exports=function asPromise(t,r){for(var e=Array(arguments.length-1),i=0,n=2,o=!0;n<arguments.length;)e[i++]=arguments[n++];return new Promise(function(n,s){e[i]=function(t){if(o)if(o=!1,t)s(t);else{for(var r=Array(arguments.length-1),e=0;e<r.length;)r[e++]=arguments[e];n.apply(null,r)}};try{t.apply(r||null,e)}catch(t){o&&(o=!1,s(t))}})}},"./protobufjs/src/util/base64.js"(t,r){"use strict";r.length=function(t){var r=t.length;if(!r)return 0;for(;r>0&&"="===t.charAt(r-1);)--r;return Math.floor(3*r/4)};for(var e=Array(64),i=Array(123),n=0;n<64;)i[e[n]=n<26?n+65:n<52?n+71:n<62?n-4:n-59|43]=n++;i[45]=62,i[95]=63,r.encode=function(t,r,i){for(var n,o=null,s=[],u=0,f=0;r<i;){var h=t[r++];switch(f){case 0:s[u++]=e[h>>2],n=(3&h)<<4,f=1;break;case 1:s[u++]=e[n|h>>4],n=(15&h)<<2,f=2;break;case 2:s[u++]=e[n|h>>6],s[u++]=e[63&h],f=0}u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0)}return(f&&(s[u++]=e[n],s[u++]=61,1===f&&(s[u++]=61)),o)?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var o="invalid encoding";r.decode=function(t,r,e){for(var n,s=e,u=0,f=0;f<t.length;){var h=t.charCodeAt(f++);if(61===h&&u>1)break;if(void 0===(h=i[h]))throw Error(o);switch(u){case 0:n=h,u=1;break;case 1:r[e++]=n<<2|(48&h)>>4,n=h,u=2;break;case 2:r[e++]=(15&n)<<4|(60&h)>>2,n=h,u=3;break;case 3:r[e++]=(3&n)<<6|h,u=0}}if(1===u)throw Error(o);return e-s};var s=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,f=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(t){return s.test(t)||u.test(t)&&f.test(t)}},"./protobufjs/src/util/eventemitter.js"(t){"use strict";function EventEmitter(){this._listeners=Object.create(null)}t.exports=EventEmitter,EventEmitter.prototype.on=function(t,r,e){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:e||this}),this},EventEmitter.prototype.off=function(t,r){if(void 0===t)this._listeners=Object.create(null);else if(void 0===r)this._listeners[t]=[];else{var e=this._listeners[t];if(!e)return this;for(var i=0;i<e.length;)e[i].fn===r?e.splice(i,1):++i}return this},EventEmitter.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var e=[],i=1;i<arguments.length;)e.push(arguments[i++]);for(i=0;i<r.length;)r[i].fn.apply(r[i++].ctx,e)}return this}},"./protobufjs/src/util/float.js"(t){"use strict";function factory(t){if("u">typeof Float32Array)!function(){var r=new Float32Array([-0]),e=new Uint8Array(r.buffer),i=128===e[3];function writeFloat_f32_cpy(t,i,n){r[0]=t,i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2],i[n+3]=e[3]}function writeFloat_f32_rev(t,i,n){r[0]=t,i[n]=e[3],i[n+1]=e[2],i[n+2]=e[1],i[n+3]=e[0]}function readFloat_f32_cpy(t,i){return e[0]=t[i],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],r[0]}function readFloat_f32_rev(t,i){return e[3]=t[i],e[2]=t[i+1],e[1]=t[i+2],e[0]=t[i+3],r[0]}t.writeFloatLE=i?writeFloat_f32_cpy:writeFloat_f32_rev,t.writeFloatBE=i?writeFloat_f32_rev:writeFloat_f32_cpy,t.readFloatLE=i?readFloat_f32_cpy:readFloat_f32_rev,t.readFloatBE=i?readFloat_f32_rev:readFloat_f32_cpy}();else{function writeFloat_ieee754(t,r,e,i){var n=+(r<0);if(n&&(r=-r),0===r)t(1/r>0?0:0x80000000,e,i);else if(isNaN(r))t(0x7fc00000,e,i);else if(r>34028234663852886e22)t((n<<31|0x7f800000)>>>0,e,i);else if(r<11754943508222875e-54)t((n<<31|Math.round(r/1401298464324817e-60))>>>0,e,i);else{var o=Math.floor(Math.log(r)/Math.LN2),s=8388607&Math.round(r*Math.pow(2,-o)*8388608);t((n<<31|o+127<<23|s)>>>0,e,i)}}function readFloat_ieee754(t,r,e){var i=t(r,e),n=(i>>31)*2+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:1/0*n:0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}t.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),t.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),t.readFloatLE=readFloat_ieee754.bind(null,readUintLE),t.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}if("u">typeof Float64Array)!function(){var r=new Float64Array([-0]),e=new Uint8Array(r.buffer),i=128===e[7];function writeDouble_f64_cpy(t,i,n){r[0]=t,i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2],i[n+3]=e[3],i[n+4]=e[4],i[n+5]=e[5],i[n+6]=e[6],i[n+7]=e[7]}function writeDouble_f64_rev(t,i,n){r[0]=t,i[n]=e[7],i[n+1]=e[6],i[n+2]=e[5],i[n+3]=e[4],i[n+4]=e[3],i[n+5]=e[2],i[n+6]=e[1],i[n+7]=e[0]}function readDouble_f64_cpy(t,i){return e[0]=t[i],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],e[6]=t[i+6],e[7]=t[i+7],r[0]}function readDouble_f64_rev(t,i){return e[7]=t[i],e[6]=t[i+1],e[5]=t[i+2],e[4]=t[i+3],e[3]=t[i+4],e[2]=t[i+5],e[1]=t[i+6],e[0]=t[i+7],r[0]}t.writeDoubleLE=i?writeDouble_f64_cpy:writeDouble_f64_rev,t.writeDoubleBE=i?writeDouble_f64_rev:writeDouble_f64_cpy,t.readDoubleLE=i?readDouble_f64_cpy:readDouble_f64_rev,t.readDoubleBE=i?readDouble_f64_rev:readDouble_f64_cpy}();else{function writeDouble_ieee754(t,r,e,i,n,o){var s,u=+(i<0);if(u&&(i=-i),0===i)t(0,n,o+r),t(1/i>0?0:0x80000000,n,o+e);else if(isNaN(i))t(0,n,o+r),t(0x7ff80000,n,o+e);else if(i>17976931348623157e292)t(0,n,o+r),t((u<<31|0x7ff00000)>>>0,n,o+e);else if(i<22250738585072014e-324)t((s=i/5e-324)>>>0,n,o+r),t((u<<31|s/0x100000000)>>>0,n,o+e);else{var f=Math.floor(Math.log(i)/Math.LN2);1024===f&&(f=1023),t(0x10000000000000*(s=i*Math.pow(2,-f))>>>0,n,o+r),t((u<<31|f+1023<<20|1048576*s&1048575)>>>0,n,o+e)}}function readDouble_ieee754(t,r,e,i,n){var o=t(i,n+r),s=t(i,n+e),u=(s>>31)*2+1,f=s>>>20&2047,h=0x100000000*(1048575&s)+o;return 2047===f?h?NaN:1/0*u:0===f?5e-324*u*h:u*Math.pow(2,f-1075)*(h+0x10000000000000)}t.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),t.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),t.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),t.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}return t}function writeUintLE(t,r,e){r[e]=255&t,r[e+1]=t>>>8&255,r[e+2]=t>>>16&255,r[e+3]=t>>>24}function writeUintBE(t,r,e){r[e]=t>>>24,r[e+1]=t>>>16&255,r[e+2]=t>>>8&255,r[e+3]=255&t}function readUintLE(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0}function readUintBE(t,r){return(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0}t.exports=factory(factory)},"./protobufjs/src/util/inquire.js"(t,r,e){"use strict";t.exports=function inquire(t){try{var r=e("./protobufjs/src/util sync recursive")(t);if(r&&(r.length||Object.keys(r).length))return r;return null}catch(t){return null}}},"./protobufjs/src/util/longbits.js"(t,r,e){"use strict";t.exports=LongBits;var i=e("./protobufjs/src/util/minimal.js");function LongBits(t,r){this.lo=t>>>0,this.hi=r>>>0}var n=LongBits.zero=new LongBits(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var o=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function(t){if(0===t)return n;var r=t<0;r&&(t=-t);var e=t>>>0,i=(t-e)/0x100000000>>>0;return r&&(i=~i>>>0,e=~e>>>0,++e>0xffffffff&&(e=0,++i>0xffffffff&&(i=0))),new LongBits(e,i)},LongBits.from=function(t){if("number"==typeof t)return LongBits.fromNumber(t);if(i.isString(t))if(!i.Long)return LongBits.fromNumber(parseInt(t,10));else t=i.Long.fromString(t);return t.low||t.high?new LongBits(t.low>>>0,t.high>>>0):n},LongBits.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,e=~this.hi>>>0;return r||(e=e+1>>>0),-(r+0x100000000*e)}return this.lo+0x100000000*this.hi},LongBits.prototype.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;LongBits.fromHash=function(t){return t===o?n:new LongBits((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},LongBits.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},LongBits.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},LongBits.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},LongBits.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,e=this.hi>>>24;return 0===e?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:e<128?9:10}},"./protobufjs/src/util/minimal.js"(t,r,e){"use strict";function isUnsafeProperty(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function merge(t){var r="boolean"==typeof arguments[arguments.length-1],e=r?arguments.length-1:arguments.length;r=r&&arguments[arguments.length-1];for(var i=1;i<e;++i){var n=arguments[i];if(n)for(var o=Object.keys(n),s=0;s<o.length;++s)isUnsafeProperty(o[s])||void 0!==t[o[s]]&&r||(t[o[s]]=n[o[s]])}return t}function newError(t){function CustomError(t,r){if(!(this instanceof CustomError))return new CustomError(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,CustomError):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&merge(this,r)}return CustomError.prototype=Object.create(Error.prototype,{constructor:{value:CustomError,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),CustomError}r.asPromise=e("./protobufjs/src/util/aspromise.js"),r.base64=e("./protobufjs/src/util/base64.js"),r.EventEmitter=e("./protobufjs/src/util/eventemitter.js"),r.float=e("./protobufjs/src/util/float.js"),r.inquire=e("./protobufjs/src/util/inquire.js"),r.utf8=e("./protobufjs/src/util/utf8.js"),r.pool=e("./protobufjs/src/util/pool.js"),r.LongBits=e("./protobufjs/src/util/longbits.js"),r.isUnsafeProperty=isUnsafeProperty,r.isNode=!!("u">typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"u">typeof window&&window||"u">typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,r){var e=t[r];return!!(null!=e&&t.hasOwnProperty(r))&&("object"!=typeof e||(Array.isArray(e)?e.length:Object.keys(e).length)>0)},r.Buffer=function(){try{var t=r.global.Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r._Buffer_allocUnsafe(t):new r.Array(t):r.Buffer?r._Buffer_from(t):"u"<typeof Uint8Array?t:new Uint8Array(t)},r.Array="u">typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var t=e("./long/umd/index.js");return t&&t.isLong?t:null}catch(t){return null}}(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,e){var i=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(i.lo,i.hi,e):i.toNumber(!!e)},r.longFromKey=function(t,e){return r.key64Re.test(t)&&!r.key32Re.test(t)?r.longFromHash(t,e):t},r.boolFromKey=function(t){return"true"===t||"1"===t},r.merge=merge,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(t,r,e){Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:void 0===e||e,configurable:!0,writable:!0})},r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=newError,r.ProtocolError=newError("ProtocolError"),r.oneOfGetter=function(t){for(var r={},e=0;e<t.length;++e)r[t[e]]=1;return function(){for(var t=Object.keys(this),e=t.length-1;e>-1;--e)if(1===r[t[e]]&&void 0!==this[t[e]]&&null!==this[t[e]])return t[e]}},r.oneOfSetter=function(t){return function(r){for(var e=0;e<t.length;++e)t[e]!==r&&delete this[t[e]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var t=r.Buffer;if(!t){r._Buffer_from=r._Buffer_allocUnsafe=null;return}r._Buffer_from=t.from!==Uint8Array.from&&t.from||function(r,e){return new t(r,e)},r._Buffer_allocUnsafe=t.allocUnsafe||function(r){return new t(r)}}},"./protobufjs/src/util/pool.js"(t){"use strict";t.exports=function pool(t,r,e){var i=e||8192,n=i>>>1,o=null,s=i;return function(e){if(e<1||e>n)return t(e);s+e>i&&(o=t(i),s=0);var u=r.call(o,s,s+=e);return 7&s&&(s=(7|s)+1),u}}},"./protobufjs/src/util/utf8.js"(t,r){"use strict";function utf8_read_js(t,r,e,i){for(var n=r;n<e;){var o=t[n++];if(o<=127)i+=String.fromCharCode(o);else if(o>=192&&o<224){var s=(31&o)<<6|63&t[n++];i+=s>=128?String.fromCharCode(s):"�"}else if(o>=224&&o<240){var u=(15&o)<<12|(63&t[n++])<<6|63&t[n++];i+=u>=2048?String.fromCharCode(u):"�"}else if(o>=240){var f=(7&o)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++];f<65536||f>1114111?i+="�":(f-=65536,i+=String.fromCharCode(55296+(f>>10)),i+=String.fromCharCode(56320+(1023&f)))}}return i}r.length=function(t){for(var r=0,e=0,i=0;i<t.length;++i)(e=t.charCodeAt(i))<128?r+=1:e<2048?r+=2:(64512&e)==55296&&(64512&t.charCodeAt(i+1))==56320?(++i,r+=4):r+=3;return r},r.read=function(t,r,e){if(e-r<1)return"";for(var i,n,o,s,u,f,h,a,l="",c=r;c+7<e;c+=8){if(i=t[c],n=t[c+1],o=t[c+2],s=t[c+3],u=t[c+4],f=t[c+5],(i|n|o|s|u|f|(h=t[c+6])|(a=t[c+7]))&128)return utf8_read_js(t,c,e,l);l+=String.fromCharCode(i,n,o,s,u,f,h,a)}for(;c<e;++c){if(128&(i=t[c]))return utf8_read_js(t,c,e,l);l+=String.fromCharCode(i)}return l},r.write=function(t,r,e){for(var i,n,o=e,s=0;s<t.length;++s)(i=t.charCodeAt(s))<128?r[e++]=i:(i<2048?r[e++]=i>>6|192:((64512&i)==55296&&(64512&(n=t.charCodeAt(s+1)))==56320?(i=65536+((1023&i)<<10)+(1023&n),++s,r[e++]=i>>18|240,r[e++]=i>>12&63|128):r[e++]=i>>12|224,r[e++]=i>>6&63|128),r[e++]=63&i|128);return e-o}},"./protobufjs/src/writer.js"(t,r,e){"use strict";t.exports=Writer;var i,n=e("./protobufjs/src/util/minimal.js"),o=n.LongBits,s=n.base64,u=n.utf8;function Op(t,r,e){this.fn=t,this.len=r,this.next=void 0,this.val=e}function noop(){}function State(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function Writer(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create=function(){return n.Buffer?function(){return(Writer.create=function(){return new i})()}:function(){return new Writer}};function writeByte(t,r,e){r[e]=255&t}function writeStringAscii(t,r,e){for(var i=0;i<t.length;)r[e++]=t.charCodeAt(i++)}function writeVarint32(t,r,e){for(;t>127;)r[e++]=127&t|128,t>>>=7;r[e]=t}function VarintOp(t,r){this.len=t,this.next=void 0,this.val=r}function writeVarint64(t,r,e){for(var i=t.lo,n=t.hi;n;)r[e++]=127&i|128,i=(i>>>7|n<<25)>>>0,n>>>=7;for(;i>127;)r[e++]=127&i|128,i>>>=7;r[e++]=i}function writeFixed32(t,r,e){r[e]=255&t,r[e+1]=t>>>8&255,r[e+2]=t>>>16&255,r[e+3]=t>>>24}Writer.create=create(),Writer.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(Writer.alloc=n.pool(Writer.alloc,n.Array.prototype.subarray)),Writer.prototype._push=function(t,r,e){return this.tail=this.tail.next=new Op(t,r,e),this.len+=r,this},VarintOp.prototype=Object.create(Op.prototype),VarintOp.prototype.fn=writeVarint32,Writer.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new VarintOp((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<0x10000000?4:5,t)).len,this},Writer.prototype.int32=function(t){return(t|=0)<0?this._push(writeVarint64,10,o.fromNumber(t)):this.uint32(t)},Writer.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},Writer.prototype.uint64=function(t){var r=o.from(t);return this._push(writeVarint64,r.length(),r)},Writer.prototype.int64=Writer.prototype.uint64,Writer.prototype.sint64=function(t){var r=o.from(t).zzEncode();return this._push(writeVarint64,r.length(),r)},Writer.prototype.bool=function(t){return this._push(writeByte,1,+!!t)},Writer.prototype.fixed32=function(t){return this._push(writeFixed32,4,t>>>0)},Writer.prototype.sfixed32=Writer.prototype.fixed32,Writer.prototype.fixed64=function(t){var r=o.from(t);return this._push(writeFixed32,4,r.lo)._push(writeFixed32,4,r.hi)},Writer.prototype.sfixed64=Writer.prototype.fixed64,Writer.prototype.float=function(t){return this._push(n.float.writeFloatLE,4,t)},Writer.prototype.double=function(t){return this._push(n.float.writeDoubleLE,8,t)};var f=n.Array.prototype.set?function(t,r,e){r.set(t,e)}:function(t,r,e){for(var i=0;i<t.length;++i)r[e+i]=t[i]};Writer.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(writeByte,1,0);if(n.isString(t)){var e=Writer.alloc(r=s.length(t));s.decode(t,e,0),t=e}return this.uint32(r)._push(f,r,t)},Writer.prototype.raw=function(t){var r=t.length>>>0;return r?this._push(f,r,t):this},Writer.prototype.string=function(t){var r=u.length(t);return r?this.uint32(r)._push(r===t.length?writeStringAscii:u.write,r,t):this._push(writeByte,1,0)},Writer.prototype.fork=function(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this},Writer.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this},Writer.prototype.ldelim=function(){var t=this.head,r=this.tail,e=this.len;return this.reset().uint32(e),e&&(this.tail.next=t.next,this.tail=r,this.len+=e),this},Writer.prototype.finish=function(){return this.finishInto(this.constructor.alloc(this.len),0)},Writer.prototype.finishInto=function(t,r){void 0===r&&(r=0);for(var e=this.head.next,i=r;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},Writer._configure=function(t){i=t,Writer.create=create(),i._configure()}},"./protobufjs/src/writer_buffer.js"(t,r,e){"use strict";t.exports=BufferWriter;var i=e("./protobufjs/src/writer.js");(BufferWriter.prototype=Object.create(i.prototype)).constructor=BufferWriter;var n=e("./protobufjs/src/util/minimal.js");function BufferWriter(){i.call(this)}function writeStringBufferAscii(t,r,e){for(var i=0;i<t.length;)r[e++]=t.charCodeAt(i++)}function writeStringBuffer(t,r,e){t.length<40?n.utf8.write(t,r,e):r.utf8Write?r.utf8Write(t,e):r.write(t,e)}BufferWriter._configure=function(){BufferWriter.alloc=n._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(t,r,e){r.set(t,e)}:function(t,r,e){if(t.copy)t.copy(r,e,0,t.length);else for(var i=0;i<t.length;)r[e++]=t[i++]}},BufferWriter.prototype.bytes=function(t){n.isString(t)&&(t=n._Buffer_from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this._push(BufferWriter.writeBytesBuffer,r,t),this},BufferWriter.prototype.raw=function(t){var r=t.length>>>0;return r?this._push(BufferWriter.writeBytesBuffer,r,t):this},BufferWriter.prototype.string=function(t){var r=n.Buffer.byteLength(t);return this.uint32(r),r&&this._push(r===t.length&&r<40?writeStringBufferAscii:writeStringBuffer,r,t),this},BufferWriter._configure()}},r={};function __webpack_require__(e){var i=r[e];if(void 0!==i)return i.exports;var n=r[e]={exports:{}};return t[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r);var e=__webpack_require__("./protobufjs/minimal.js");module.exports=e})();
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const MsgpackChunk = require('./chunk')
|
|
4
|
-
|
|
5
|
-
class MsgpackEncoder {
|
|
6
|
-
encode (value) {
|
|
7
|
-
const bytes = new MsgpackChunk()
|
|
8
|
-
this.encodeValue(bytes, value)
|
|
9
|
-
|
|
10
|
-
return bytes.buffer.subarray(0, bytes.length)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
encodeValue (bytes, value) {
|
|
14
|
-
switch (typeof value) {
|
|
15
|
-
case 'bigint':
|
|
16
|
-
this.encodeBigInt(bytes, value)
|
|
17
|
-
break
|
|
18
|
-
case 'boolean':
|
|
19
|
-
this.encodeBoolean(bytes, value)
|
|
20
|
-
break
|
|
21
|
-
case 'number':
|
|
22
|
-
this.encodeNumber(bytes, value)
|
|
23
|
-
break
|
|
24
|
-
case 'object':
|
|
25
|
-
if (value === null) {
|
|
26
|
-
this.encodeNull(bytes, value)
|
|
27
|
-
} else if (Array.isArray(value)) {
|
|
28
|
-
this.encodeArray(bytes, value)
|
|
29
|
-
} else if (Buffer.isBuffer(value) || ArrayBuffer.isView(value)) {
|
|
30
|
-
this.encodeBin(bytes, value)
|
|
31
|
-
} else {
|
|
32
|
-
this.encodeMap(bytes, value)
|
|
33
|
-
}
|
|
34
|
-
break
|
|
35
|
-
case 'string':
|
|
36
|
-
this.encodeString(bytes, value)
|
|
37
|
-
break
|
|
38
|
-
case 'symbol':
|
|
39
|
-
this.encodeString(bytes, value.toString())
|
|
40
|
-
break
|
|
41
|
-
default: // function, symbol, undefined
|
|
42
|
-
this.encodeNull(bytes, value)
|
|
43
|
-
break
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
encodeNull (bytes) {
|
|
48
|
-
const offset = bytes.length
|
|
49
|
-
|
|
50
|
-
bytes.reserve(1)
|
|
51
|
-
bytes.buffer[offset] = 0xC0
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
encodeBoolean (bytes, value) {
|
|
55
|
-
const offset = bytes.length
|
|
56
|
-
|
|
57
|
-
bytes.reserve(1)
|
|
58
|
-
bytes.buffer[offset] = value ? 0xC3 : 0xC2
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
encodeString (bytes, value) {
|
|
62
|
-
bytes.write(value)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
encodeFixArray (bytes, size = 0) {
|
|
66
|
-
const offset = bytes.length
|
|
67
|
-
|
|
68
|
-
bytes.reserve(1)
|
|
69
|
-
bytes.buffer[offset] = 0x90 + size
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
encodeArrayPrefix (bytes, value) {
|
|
73
|
-
const length = value.length
|
|
74
|
-
const offset = bytes.length
|
|
75
|
-
|
|
76
|
-
bytes.reserve(5)
|
|
77
|
-
bytes.buffer[offset] = 0xDD
|
|
78
|
-
bytes.buffer[offset + 1] = length >> 24
|
|
79
|
-
bytes.buffer[offset + 2] = length >> 16
|
|
80
|
-
bytes.buffer[offset + 3] = length >> 8
|
|
81
|
-
bytes.buffer[offset + 4] = length
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
encodeArray (bytes, value) {
|
|
85
|
-
if (value.length < 16) {
|
|
86
|
-
this.encodeFixArray(bytes, value.length)
|
|
87
|
-
} else {
|
|
88
|
-
this.encodeArrayPrefix(bytes, value)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
for (const item of value) {
|
|
92
|
-
this.encodeValue(bytes, item)
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
encodeFixMap (bytes, size = 0) {
|
|
97
|
-
const offset = bytes.length
|
|
98
|
-
|
|
99
|
-
bytes.reserve(1)
|
|
100
|
-
bytes.buffer[offset] = 0x80 + size
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
encodeMapPrefix (bytes, keysLength) {
|
|
104
|
-
const offset = bytes.length
|
|
105
|
-
|
|
106
|
-
bytes.reserve(5)
|
|
107
|
-
bytes.buffer[offset] = 0xDF
|
|
108
|
-
bytes.buffer[offset + 1] = keysLength >> 24
|
|
109
|
-
bytes.buffer[offset + 2] = keysLength >> 16
|
|
110
|
-
bytes.buffer[offset + 3] = keysLength >> 8
|
|
111
|
-
bytes.buffer[offset + 4] = keysLength
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
encodeByte (bytes, value) {
|
|
115
|
-
bytes.reserve(1)
|
|
116
|
-
bytes.buffer[bytes.length - 1] = value
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
encodeBin (bytes, value) {
|
|
120
|
-
const offset = bytes.length
|
|
121
|
-
|
|
122
|
-
if (value.byteLength < 256) {
|
|
123
|
-
bytes.reserve(2)
|
|
124
|
-
bytes.buffer[offset] = 0xC4
|
|
125
|
-
bytes.buffer[offset + 1] = value.byteLength
|
|
126
|
-
} else if (value.byteLength < 65_536) {
|
|
127
|
-
bytes.reserve(3)
|
|
128
|
-
bytes.buffer[offset] = 0xC5
|
|
129
|
-
bytes.buffer[offset + 1] = value.byteLength >> 8
|
|
130
|
-
bytes.buffer[offset + 2] = value.byteLength
|
|
131
|
-
} else {
|
|
132
|
-
bytes.reserve(5)
|
|
133
|
-
bytes.buffer[offset] = 0xC6
|
|
134
|
-
bytes.buffer[offset + 1] = value.byteLength >> 24
|
|
135
|
-
bytes.buffer[offset + 2] = value.byteLength >> 16
|
|
136
|
-
bytes.buffer[offset + 3] = value.byteLength >> 8
|
|
137
|
-
bytes.buffer[offset + 4] = value.byteLength
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
bytes.set(value)
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
encodeInteger (bytes, value) {
|
|
144
|
-
const offset = bytes.length
|
|
145
|
-
|
|
146
|
-
bytes.reserve(5)
|
|
147
|
-
bytes.buffer[offset] = 0xCE
|
|
148
|
-
bytes.buffer[offset + 1] = value >> 24
|
|
149
|
-
bytes.buffer[offset + 2] = value >> 16
|
|
150
|
-
bytes.buffer[offset + 3] = value >> 8
|
|
151
|
-
bytes.buffer[offset + 4] = value
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
encodeShort (bytes, value) {
|
|
155
|
-
const offset = bytes.length
|
|
156
|
-
|
|
157
|
-
bytes.reserve(3)
|
|
158
|
-
bytes.buffer[offset] = 0xCD
|
|
159
|
-
bytes.buffer[offset + 1] = value >> 8
|
|
160
|
-
bytes.buffer[offset + 2] = value
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
encodeLong (bytes, value) {
|
|
164
|
-
const offset = bytes.length
|
|
165
|
-
const hi = (value / 2 ** 32) >> 0
|
|
166
|
-
const lo = value >>> 0
|
|
167
|
-
|
|
168
|
-
bytes.reserve(9)
|
|
169
|
-
bytes.buffer[offset] = 0xCF
|
|
170
|
-
bytes.buffer[offset + 1] = hi >> 24
|
|
171
|
-
bytes.buffer[offset + 2] = hi >> 16
|
|
172
|
-
bytes.buffer[offset + 3] = hi >> 8
|
|
173
|
-
bytes.buffer[offset + 4] = hi
|
|
174
|
-
bytes.buffer[offset + 5] = lo >> 24
|
|
175
|
-
bytes.buffer[offset + 6] = lo >> 16
|
|
176
|
-
bytes.buffer[offset + 7] = lo >> 8
|
|
177
|
-
bytes.buffer[offset + 8] = lo
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
encodeNumber (bytes, value) {
|
|
181
|
-
if (Number.isNaN(value)) {
|
|
182
|
-
value = 0
|
|
183
|
-
}
|
|
184
|
-
if (Number.isInteger(value)) {
|
|
185
|
-
if (value >= 0) {
|
|
186
|
-
this.encodeUnsigned(bytes, value)
|
|
187
|
-
} else {
|
|
188
|
-
this.encodeSigned(bytes, value)
|
|
189
|
-
}
|
|
190
|
-
} else {
|
|
191
|
-
this.encodeFloat(bytes, value)
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
encodeSigned (bytes, value) {
|
|
196
|
-
const offset = bytes.length
|
|
197
|
-
|
|
198
|
-
if (value >= -0x20) {
|
|
199
|
-
bytes.reserve(1)
|
|
200
|
-
bytes.buffer[offset] = value
|
|
201
|
-
} else if (value >= -0x80) {
|
|
202
|
-
bytes.reserve(2)
|
|
203
|
-
bytes.buffer[offset] = 0xD0
|
|
204
|
-
bytes.buffer[offset + 1] = value
|
|
205
|
-
} else if (value >= -0x80_00) {
|
|
206
|
-
bytes.reserve(3)
|
|
207
|
-
bytes.buffer[offset] = 0xD1
|
|
208
|
-
bytes.buffer[offset + 1] = value >> 8
|
|
209
|
-
bytes.buffer[offset + 2] = value
|
|
210
|
-
} else if (value >= -0x80_00_00_00) {
|
|
211
|
-
bytes.reserve(5)
|
|
212
|
-
bytes.buffer[offset] = 0xD2
|
|
213
|
-
bytes.buffer[offset + 1] = value >> 24
|
|
214
|
-
bytes.buffer[offset + 2] = value >> 16
|
|
215
|
-
bytes.buffer[offset + 3] = value >> 8
|
|
216
|
-
bytes.buffer[offset + 4] = value
|
|
217
|
-
} else {
|
|
218
|
-
const hi = Math.floor(value / 2 ** 32)
|
|
219
|
-
const lo = value >>> 0
|
|
220
|
-
|
|
221
|
-
bytes.reserve(9)
|
|
222
|
-
bytes.buffer[offset] = 0xD3
|
|
223
|
-
bytes.buffer[offset + 1] = hi >> 24
|
|
224
|
-
bytes.buffer[offset + 2] = hi >> 16
|
|
225
|
-
bytes.buffer[offset + 3] = hi >> 8
|
|
226
|
-
bytes.buffer[offset + 4] = hi
|
|
227
|
-
bytes.buffer[offset + 5] = lo >> 24
|
|
228
|
-
bytes.buffer[offset + 6] = lo >> 16
|
|
229
|
-
bytes.buffer[offset + 7] = lo >> 8
|
|
230
|
-
bytes.buffer[offset + 8] = lo
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
encodeUnsigned (bytes, value) {
|
|
235
|
-
const offset = bytes.length
|
|
236
|
-
|
|
237
|
-
if (value <= 0x7F) {
|
|
238
|
-
bytes.reserve(1)
|
|
239
|
-
bytes.buffer[offset] = value
|
|
240
|
-
} else if (value <= 0xFF) {
|
|
241
|
-
bytes.reserve(2)
|
|
242
|
-
bytes.buffer[offset] = 0xCC
|
|
243
|
-
bytes.buffer[offset + 1] = value
|
|
244
|
-
} else if (value <= 0xFF_FF) {
|
|
245
|
-
bytes.reserve(3)
|
|
246
|
-
bytes.buffer[offset] = 0xCD
|
|
247
|
-
bytes.buffer[offset + 1] = value >> 8
|
|
248
|
-
bytes.buffer[offset + 2] = value
|
|
249
|
-
} else if (value <= 0xFF_FF_FF_FF) {
|
|
250
|
-
bytes.reserve(5)
|
|
251
|
-
bytes.buffer[offset] = 0xCE
|
|
252
|
-
bytes.buffer[offset + 1] = value >> 24
|
|
253
|
-
bytes.buffer[offset + 2] = value >> 16
|
|
254
|
-
bytes.buffer[offset + 3] = value >> 8
|
|
255
|
-
bytes.buffer[offset + 4] = value
|
|
256
|
-
} else {
|
|
257
|
-
const hi = (value / 2 ** 32) >> 0
|
|
258
|
-
const lo = value >>> 0
|
|
259
|
-
|
|
260
|
-
bytes.reserve(9)
|
|
261
|
-
bytes.buffer[offset] = 0xCF
|
|
262
|
-
bytes.buffer[offset + 1] = hi >> 24
|
|
263
|
-
bytes.buffer[offset + 2] = hi >> 16
|
|
264
|
-
bytes.buffer[offset + 3] = hi >> 8
|
|
265
|
-
bytes.buffer[offset + 4] = hi
|
|
266
|
-
bytes.buffer[offset + 5] = lo >> 24
|
|
267
|
-
bytes.buffer[offset + 6] = lo >> 16
|
|
268
|
-
bytes.buffer[offset + 7] = lo >> 8
|
|
269
|
-
bytes.buffer[offset + 8] = lo
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// TODO: Support BigInt larger than 64bit.
|
|
274
|
-
encodeBigInt (bytes, value) {
|
|
275
|
-
const offset = bytes.length
|
|
276
|
-
|
|
277
|
-
bytes.reserve(9)
|
|
278
|
-
|
|
279
|
-
if (value >= 0n) {
|
|
280
|
-
bytes.buffer[offset] = 0xCF
|
|
281
|
-
bytes.view.setBigUint64(offset + 1, value)
|
|
282
|
-
} else {
|
|
283
|
-
bytes.buffer[offset] = 0xD3
|
|
284
|
-
bytes.view.setBigInt64(offset + 1, value)
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
encodeMap (bytes, value) {
|
|
289
|
-
const keys = Object.keys(value)
|
|
290
|
-
|
|
291
|
-
this.encodeMapPrefix(bytes, keys.length)
|
|
292
|
-
|
|
293
|
-
for (const key of keys) {
|
|
294
|
-
this.encodeValue(bytes, key)
|
|
295
|
-
this.encodeValue(bytes, value[key])
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
encodeFloat (bytes, value) {
|
|
300
|
-
const offset = bytes.length
|
|
301
|
-
|
|
302
|
-
bytes.reserve(9)
|
|
303
|
-
bytes.buffer[offset] = 0xCB
|
|
304
|
-
bytes.view.setFloat64(offset + 1, value)
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
module.exports = { MsgpackEncoder }
|