@vercel/otel 1.3.1-e26a383e-20240221194233 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
1
  if (globalThis.performance === undefined) {
2
2
  globalThis.performance = { timeOrigin: 0, now: () => Date.now() };
3
3
  }
4
- var Il=Object.create;var jr=Object.defineProperty;var wl=Object.getOwnPropertyDescriptor;var Cl=Object.getOwnPropertyNames;var Ul=Object.getPrototypeOf,Ml=Object.prototype.hasOwnProperty;var Fr=(u,n)=>()=>(u&&(n=u(u=0)),n);var m=(u,n)=>()=>(n||u((n={exports:{}}).exports,n),n.exports);var Re=(u,n,o,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of Cl(n))!Ml.call(u,l)&&l!==o&&jr(u,l,{get:()=>n[l],enumerable:!(c=wl(n,l))||c.enumerable});return u},et=(u,n,o)=>(Re(u,n,"default"),o&&Re(o,n,"default")),P=(u,n,o)=>(o=u!=null?Il(Ul(u)):{},Re(n||!u||!u.__esModule?jr(o,"default",{value:u,enumerable:!0}):o,u)),U=u=>Re(jr({},"__esModule",{value:!0}),u);var y={};import*as Vp from"@opentelemetry/api";var b=Fr(()=>{et(y,Vp)});var se=m(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.isTracingSuppressed=vt.unsuppressTracing=vt.suppressTracing=void 0;var Dl=(b(),U(y)),qr=(0,Dl.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Bl(u){return u.setValue(qr,!0)}vt.suppressTracing=Bl;function kl(u){return u.deleteValue(qr)}vt.unsuppressTracing=kl;function Vl(u){return u.getValue(qr)===!0}vt.isTracingSuppressed=Vl});var Kr=m(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.BAGGAGE_MAX_TOTAL_LENGTH=G.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=G.BAGGAGE_MAX_NAME_VALUE_PAIRS=G.BAGGAGE_HEADER=G.BAGGAGE_ITEMS_SEPARATOR=G.BAGGAGE_PROPERTIES_SEPARATOR=G.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;G.BAGGAGE_KEY_PAIR_SEPARATOR="=";G.BAGGAGE_PROPERTIES_SEPARATOR=";";G.BAGGAGE_ITEMS_SEPARATOR=",";G.BAGGAGE_HEADER="baggage";G.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;G.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;G.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Xr=m(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.parseKeyPairsIntoRecord=ct.parsePairKeyValue=ct.getKeyPairs=ct.serializeKeyPairs=void 0;var Gl=(b(),U(y)),Ct=Kr();function Hl(u){return u.reduce((n,o)=>{let c=`${n}${n!==""?Ct.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Ct.BAGGAGE_MAX_TOTAL_LENGTH?n:c},"")}ct.serializeKeyPairs=Hl;function jl(u){return u.getAllEntries().map(([n,o])=>{let c=`${encodeURIComponent(n)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Ct.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}ct.getKeyPairs=jl;function To(u){let n=u.split(Ct.BAGGAGE_PROPERTIES_SEPARATOR);if(n.length<=0)return;let o=n.shift();if(!o)return;let c=o.indexOf(Ct.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let l=decodeURIComponent(o.substring(0,c).trim()),i=decodeURIComponent(o.substring(c+1).trim()),e;return n.length>0&&(e=(0,Gl.baggageEntryMetadataFromString)(n.join(Ct.BAGGAGE_PROPERTIES_SEPARATOR))),{key:l,value:i,metadata:e}}ct.parsePairKeyValue=To;function Fl(u){return typeof u!="string"||u.length===0?{}:u.split(Ct.BAGGAGE_ITEMS_SEPARATOR).map(n=>To(n)).filter(n=>n!==void 0&&n.value.length>0).reduce((n,o)=>(n[o.key]=o.value,n),{})}ct.parseKeyPairsIntoRecord=Fl});var Oo=m(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.W3CBaggagePropagator=void 0;var Yr=(b(),U(y)),ql=se(),Ut=Kr(),Jr=Xr(),zr=class{inject(n,o,c){let l=Yr.propagation.getBaggage(n);if(!l||(0,ql.isTracingSuppressed)(n))return;let i=(0,Jr.getKeyPairs)(l).filter(t=>t.length<=Ut.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Ut.BAGGAGE_MAX_NAME_VALUE_PAIRS),e=(0,Jr.serializeKeyPairs)(i);e.length>0&&c.set(o,Ut.BAGGAGE_HEADER,e)}extract(n,o,c){let l=c.get(o,Ut.BAGGAGE_HEADER),i=Array.isArray(l)?l.join(Ut.BAGGAGE_ITEMS_SEPARATOR):l;if(!i)return n;let e={};return i.length===0||(i.split(Ut.BAGGAGE_ITEMS_SEPARATOR).forEach(r=>{let a=(0,Jr.parsePairKeyValue)(r);if(a){let s={value:a.value};a.metadata&&(s.metadata=a.metadata),e[a.key]=s}}),Object.entries(e).length===0)?n:Yr.propagation.setBaggage(n,Yr.propagation.createBaggage(e))}fields(){return[Ut.BAGGAGE_HEADER]}};Le.W3CBaggagePropagator=zr});var go=m(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.AnchoredClock=void 0;var Wr=class{constructor(n,o){this._monotonicClock=o,this._epochMillis=n.now(),this._performanceMillis=o.now()}now(){let n=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+n}};Ie.AnchoredClock=Wr});var Ro=m(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.isAttributeValue=_t.isAttributeKey=_t.sanitizeAttributes=void 0;var Ao=(b(),U(y));function Kl(u){let n={};if(typeof u!="object"||u==null)return n;for(let[o,c]of Object.entries(u)){if(!No(o)){Ao.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Po(c)){Ao.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?n[o]=c.slice():n[o]=c}return n}_t.sanitizeAttributes=Kl;function No(u){return typeof u=="string"&&u.length>0}_t.isAttributeKey=No;function Po(u){return u==null?!0:Array.isArray(u)?Xl(u):xo(u)}_t.isAttributeValue=Po;function Xl(u){let n;for(let o of u)if(o!=null){if(!n){if(xo(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}return!0}function xo(u){switch(typeof u){case"number":case"boolean":case"string":return!0}return!1}});var $r=m(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.loggingErrorHandler=void 0;var Yl=(b(),U(y));function Jl(){return u=>{Yl.diag.error(zl(u))}}we.loggingErrorHandler=Jl;function zl(u){return typeof u=="string"?u:JSON.stringify(Wl(u))}function Wl(u){let n={},o=u;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(n[c])return;let l=o[c];l&&(n[c]=String(l))}),o=Object.getPrototypeOf(o);return n}});var Qr=m(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.globalErrorHandler=Ft.setGlobalErrorHandler=void 0;var $l=$r(),Lo=(0,$l.loggingErrorHandler)();function Ql(u){Lo=u}Ft.setGlobalErrorHandler=Ql;function Zl(u){try{Lo(u)}catch{}}Ft.globalErrorHandler=Zl});var Zr=m(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.TracesSamplerValues=void 0;var tc;(function(u){u.AlwaysOff="always_off",u.AlwaysOn="always_on",u.ParentBasedAlwaysOff="parentbased_always_off",u.ParentBasedAlwaysOn="parentbased_always_on",u.ParentBasedTraceIdRatio="parentbased_traceidratio",u.TraceIdRatio="traceidratio"})(tc=fe.TracesSamplerValues||(fe.TracesSamplerValues={}))});var Ue=m(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce._globalThis=void 0;Ce._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var Me=m(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.getEnvWithoutDefaults=w.parseEnvironment=w.DEFAULT_ENVIRONMENT=w.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=w.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=w.DEFAULT_ATTRIBUTE_COUNT_LIMIT=w.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Et=(b(),U(y)),ec=Zr(),rc=Ue(),nc=",",oc=["OTEL_SDK_DISABLED"];function ic(u){return oc.indexOf(u)>-1}var ac=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function uc(u){return ac.indexOf(u)>-1}var lc=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function cc(u){return lc.indexOf(u)>-1}w.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;w.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;w.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;w.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;w.DEFAULT_ENVIRONMENT={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Et.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:w.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:w.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:w.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:w.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:w.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:w.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:w.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:w.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ec.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function sc(u,n,o){if(typeof o[u]>"u")return;let c=String(o[u]);n[u]=c.toLowerCase()==="true"}function fc(u,n,o,c=-1/0,l=1/0){if(typeof o[u]<"u"){let i=Number(o[u]);isNaN(i)||(i<c?n[u]=c:i>l?n[u]=l:n[u]=i)}}function pc(u,n,o,c=nc){let l=o[u];typeof l=="string"&&(n[u]=l.split(c).map(i=>i.trim()))}var dc={ALL:Et.DiagLogLevel.ALL,VERBOSE:Et.DiagLogLevel.VERBOSE,DEBUG:Et.DiagLogLevel.DEBUG,INFO:Et.DiagLogLevel.INFO,WARN:Et.DiagLogLevel.WARN,ERROR:Et.DiagLogLevel.ERROR,NONE:Et.DiagLogLevel.NONE};function yc(u,n,o){let c=o[u];if(typeof c=="string"){let l=dc[c.toUpperCase()];l!=null&&(n[u]=l)}}function tn(u){let n={};for(let o in w.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":yc(c,n,u);break;default:if(ic(c))sc(c,n,u);else if(uc(c))fc(c,n,u);else if(cc(c))pc(c,n,u);else{let l=u[c];typeof l<"u"&&l!==null&&(n[c]=String(l))}}}return n}w.parseEnvironment=tn;function hc(){return typeof process<"u"&&process&&process.env?tn(process.env):tn(rc._globalThis)}w.getEnvWithoutDefaults=hc});var wo=m(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.getEnv=void 0;var Io=Me(),mc=Ue();function vc(){let u=(0,Io.parseEnvironment)(mc._globalThis);return Object.assign({},Io.DEFAULT_ENVIRONMENT,u)}De.getEnv=vc});var Co=m(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.hexToBase64=void 0;function _c(u){let n=u.length,o="";for(let c=0;c<n;c+=2){let l=u.substring(c,c+2),i=parseInt(l,16);o+=String.fromCharCode(i)}return btoa(o)}Be.hexToBase64=_c});var Mo=m(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.RandomIdGenerator=void 0;var Ec=8,bc=16,en=class{constructor(){this.generateTraceId=Uo(bc),this.generateSpanId=Uo(Ec)}};Ve.RandomIdGenerator=en;var ke=Array(32);function Uo(u){return function(){for(let o=0;o<u*2;o++)ke[o]=Math.floor(Math.random()*16)+48,ke[o]>=58&&(ke[o]+=39);return String.fromCharCode.apply(null,ke.slice(0,u*2))}}});var Do=m(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.otperformance=void 0;Ge.otperformance=performance});var rn=m(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.VERSION=void 0;He.VERSION="1.19.0"});var Bo=m(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.MessageTypeValues=x.RpcGrpcStatusCodeValues=x.MessagingOperationValues=x.MessagingDestinationKindValues=x.HttpFlavorValues=x.NetHostConnectionSubtypeValues=x.NetHostConnectionTypeValues=x.NetTransportValues=x.FaasInvokedProviderValues=x.FaasDocumentOperationValues=x.FaasTriggerValues=x.DbCassandraConsistencyLevelValues=x.DbSystemValues=x.SemanticAttributes=void 0;x.SemanticAttributes={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"};x.DbSystemValues={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"};x.DbCassandraConsistencyLevelValues={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"};x.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};x.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};x.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};x.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};x.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};x.NetHostConnectionSubtypeValues={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"};x.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};x.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};x.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};x.RpcGrpcStatusCodeValues={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16};x.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var ko=m(Mt=>{"use strict";var Sc=Mt&&Mt.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Tc=Mt&&Mt.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Sc(n,u,o)};Object.defineProperty(Mt,"__esModule",{value:!0});Tc(Bo(),Mt)});var Vo=m(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.TelemetrySdkLanguageValues=H.OsTypeValues=H.HostArchValues=H.AwsEcsLaunchtypeValues=H.CloudPlatformValues=H.CloudProviderValues=H.SemanticResourceAttributes=void 0;H.SemanticResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"};H.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};H.CloudPlatformValues={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"};H.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};H.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};H.OsTypeValues={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"};H.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var Go=m(Dt=>{"use strict";var Oc=Dt&&Dt.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),gc=Dt&&Dt.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Oc(n,u,o)};Object.defineProperty(Dt,"__esModule",{value:!0});gc(Vo(),Dt)});var St=m(bt=>{"use strict";var Ac=bt&&bt.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Ho=bt&&bt.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Ac(n,u,o)};Object.defineProperty(bt,"__esModule",{value:!0});Ho(ko(),bt);Ho(Go(),bt)});var jo=m(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.SDK_INFO=void 0;var Nc=rn(),pe=St();je.SDK_INFO={[pe.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[pe.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[pe.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:pe.TelemetrySdkLanguageValues.WEBJS,[pe.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Nc.VERSION}});var Fo=m(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.unrefTimer=void 0;function Pc(u){}Fe.unrefTimer=Pc});var nn=m(J=>{"use strict";var xc=J&&J.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Bt=J&&J.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&xc(n,u,o)};Object.defineProperty(J,"__esModule",{value:!0});Bt(wo(),J);Bt(Ue(),J);Bt(Co(),J);Bt(Mo(),J);Bt(Do(),J);Bt(jo(),J);Bt(Fo(),J)});var Yo=m(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.addHrTimes=L.isTimeInput=L.isTimeInputHrTime=L.hrTimeToMicroseconds=L.hrTimeToMilliseconds=L.hrTimeToNanoseconds=L.hrTimeToTimeStamp=L.hrTimeDuration=L.timeInputToHrTime=L.hrTime=L.getTimeOrigin=L.millisToHrTime=void 0;var on=nn(),qo=9,Rc=6,Lc=Math.pow(10,Rc),qe=Math.pow(10,qo);function de(u){let n=u/1e3,o=Math.trunc(n),c=Math.round(u%1e3*Lc);return[o,c]}L.millisToHrTime=de;function an(){let u=on.otperformance.timeOrigin;if(typeof u!="number"){let n=on.otperformance;u=n.timing&&n.timing.fetchStart}return u}L.getTimeOrigin=an;function Ko(u){let n=de(an()),o=de(typeof u=="number"?u:on.otperformance.now());return Xo(n,o)}L.hrTime=Ko;function Ic(u){if(un(u))return u;if(typeof u=="number")return u<an()?Ko(u):de(u);if(u instanceof Date)return de(u.getTime());throw TypeError("Invalid input type")}L.timeInputToHrTime=Ic;function wc(u,n){let o=n[0]-u[0],c=n[1]-u[1];return c<0&&(o-=1,c+=qe),[o,c]}L.hrTimeDuration=wc;function Cc(u){let n=qo,o=`${"0".repeat(n)}${u[1]}Z`,c=o.substr(o.length-n-1);return new Date(u[0]*1e3).toISOString().replace("000Z",c)}L.hrTimeToTimeStamp=Cc;function Uc(u){return u[0]*qe+u[1]}L.hrTimeToNanoseconds=Uc;function Mc(u){return u[0]*1e3+u[1]/1e6}L.hrTimeToMilliseconds=Mc;function Dc(u){return u[0]*1e6+u[1]/1e3}L.hrTimeToMicroseconds=Dc;function un(u){return Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"}L.isTimeInputHrTime=un;function Bc(u){return un(u)||typeof u=="number"||u instanceof Date}L.isTimeInput=Bc;function Xo(u,n){let o=[u[0]+n[0],u[1]+n[1]];return o[1]>=qe&&(o[1]-=qe,o[0]+=1),o}L.addHrTimes=Xo});var zo=m(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0})});var Wo=m(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.ExportResultCode=void 0;var kc;(function(u){u[u.SUCCESS=0]="SUCCESS",u[u.FAILED=1]="FAILED"})(kc=ye.ExportResultCode||(ye.ExportResultCode={}))});var Qo=m(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.CompositePropagator=void 0;var $o=(b(),U(y)),ln=class{constructor(n={}){var o;this._propagators=(o=n.propagators)!==null&&o!==void 0?o:[],this._fields=Array.from(new Set(this._propagators.map(c=>typeof c.fields=="function"?c.fields():[]).reduce((c,l)=>c.concat(l),[])))}inject(n,o,c){for(let l of this._propagators)try{l.inject(n,o,c)}catch(i){$o.diag.warn(`Failed to inject with ${l.constructor.name}. Err: ${i.message}`)}}extract(n,o,c){return this._propagators.reduce((l,i)=>{try{return i.extract(l,o,c)}catch(e){$o.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return l},n)}fields(){return this._fields.slice()}};Ke.CompositePropagator=ln});var Zo=m(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.validateValue=qt.validateKey=void 0;var cn="[_0-9a-z-*/]",Vc=`[a-z]${cn}{0,255}`,Gc=`[a-z0-9]${cn}{0,240}@[a-z]${cn}{0,13}`,Hc=new RegExp(`^(?:${Vc}|${Gc})$`),jc=/^[ -~]{0,255}[!-~]$/,Fc=/,|=/;function qc(u){return Hc.test(u)}qt.validateKey=qc;function Kc(u){return jc.test(u)&&!Fc.test(u)}qt.validateValue=Kc});var fn=m(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.TraceState=void 0;var ti=Zo(),ei=32,Xc=512,ri=",",ni="=",sn=class u{constructor(n){this._internalState=new Map,n&&this._parse(n)}set(n,o){let c=this._clone();return c._internalState.has(n)&&c._internalState.delete(n),c._internalState.set(n,o),c}unset(n){let o=this._clone();return o._internalState.delete(n),o}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,o)=>(n.push(o+ni+this.get(o)),n),[]).join(ri)}_parse(n){n.length>Xc||(this._internalState=n.split(ri).reverse().reduce((o,c)=>{let l=c.trim(),i=l.indexOf(ni);if(i!==-1){let e=l.slice(0,i),t=l.slice(i+1,c.length);(0,ti.validateKey)(e)&&(0,ti.validateValue)(t)&&o.set(e,t)}return o},new Map),this._internalState.size>ei&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ei))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new u;return n._internalState=new Map(this._internalState),n}};Xe.TraceState=sn});var ii=m(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.W3CTraceContextPropagator=j.parseTraceParent=j.TRACE_STATE_HEADER=j.TRACE_PARENT_HEADER=void 0;var Ye=(b(),U(y)),Yc=se(),Jc=fn();j.TRACE_PARENT_HEADER="traceparent";j.TRACE_STATE_HEADER="tracestate";var zc="00",Wc="(?!ff)[\\da-f]{2}",$c="(?![0]{32})[\\da-f]{32}",Qc="(?![0]{16})[\\da-f]{16}",Zc="[\\da-f]{2}",ts=new RegExp(`^\\s?(${Wc})-(${$c})-(${Qc})-(${Zc})(-.*)?\\s?$`);function oi(u){let n=ts.exec(u);return!n||n[1]==="00"&&n[5]?null:{traceId:n[2],spanId:n[3],traceFlags:parseInt(n[4],16)}}j.parseTraceParent=oi;var pn=class{inject(n,o,c){let l=Ye.trace.getSpanContext(n);if(!l||(0,Yc.isTracingSuppressed)(n)||!(0,Ye.isSpanContextValid)(l))return;let i=`${zc}-${l.traceId}-${l.spanId}-0${Number(l.traceFlags||Ye.TraceFlags.NONE).toString(16)}`;c.set(o,j.TRACE_PARENT_HEADER,i),l.traceState&&c.set(o,j.TRACE_STATE_HEADER,l.traceState.serialize())}extract(n,o,c){let l=c.get(o,j.TRACE_PARENT_HEADER);if(!l)return n;let i=Array.isArray(l)?l[0]:l;if(typeof i!="string")return n;let e=oi(i);if(!e)return n;e.isRemote=!0;let t=c.get(o,j.TRACE_STATE_HEADER);if(t){let r=Array.isArray(t)?t.join(","):t;e.traceState=new Jc.TraceState(typeof r=="string"?r:void 0)}return Ye.trace.setSpanContext(n,e)}fields(){return[j.TRACE_PARENT_HEADER,j.TRACE_STATE_HEADER]}};j.W3CTraceContextPropagator=pn});var ui=m(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0})});var li=m(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.getRPCMetadata=rt.deleteRPCMetadata=rt.setRPCMetadata=rt.RPCType=void 0;var es=(b(),U(y)),dn=(0,es.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),rs;(function(u){u.HTTP="http"})(rs=rt.RPCType||(rt.RPCType={}));function ns(u,n){return u.setValue(dn,n)}rt.setRPCMetadata=ns;function os(u){return u.deleteValue(dn)}rt.deleteRPCMetadata=os;function is(u){return u.getValue(dn)}rt.getRPCMetadata=is});var hn=m(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.AlwaysOffSampler=void 0;var as=(b(),U(y)),yn=class{shouldSample(){return{decision:as.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Je.AlwaysOffSampler=yn});var vn=m(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.AlwaysOnSampler=void 0;var us=(b(),U(y)),mn=class{shouldSample(){return{decision:us.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};ze.AlwaysOnSampler=mn});var si=m($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ParentBasedSampler=void 0;var We=(b(),U(y)),ls=Qr(),ci=hn(),_n=vn(),En=class{constructor(n){var o,c,l,i;this._root=n.root,this._root||((0,ls.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new _n.AlwaysOnSampler),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new _n.AlwaysOnSampler,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new ci.AlwaysOffSampler,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new _n.AlwaysOnSampler,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new ci.AlwaysOffSampler}shouldSample(n,o,c,l,i,e){let t=We.trace.getSpanContext(n);return!t||!(0,We.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&We.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&We.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};$e.ParentBasedSampler=En});var fi=m(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.TraceIdRatioBasedSampler=void 0;var bn=(b(),U(y)),Sn=class{constructor(n=0){this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(n,o){return{decision:(0,bn.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?bn.SamplingDecision.RECORD_AND_SAMPLED:bn.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n}_accumulate(n){let o=0;for(let c=0;c<n.length/8;c++){let l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o}};Qe.TraceIdRatioBasedSampler=Sn});var mi=m(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.isPlainObject=void 0;var cs="[object Object]",ss="[object Null]",fs="[object Undefined]",ps=Function.prototype,pi=ps.toString,ds=pi.call(Object),ys=hs(Object.getPrototypeOf,Object),di=Object.prototype,yi=di.hasOwnProperty,kt=Symbol?Symbol.toStringTag:void 0,hi=di.toString;function hs(u,n){return function(o){return u(n(o))}}function ms(u){if(!vs(u)||_s(u)!==cs)return!1;let n=ys(u);if(n===null)return!0;let o=yi.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&pi.call(o)===ds}Ze.isPlainObject=ms;function vs(u){return u!=null&&typeof u=="object"}function _s(u){return u==null?u===void 0?fs:ss:kt&&kt in Object(u)?Es(u):bs(u)}function Es(u){let n=yi.call(u,kt),o=u[kt],c=!1;try{u[kt]=void 0,c=!0}catch{}let l=hi.call(u);return c&&(n?u[kt]=o:delete u[kt]),l}function bs(u){return hi.call(u)}});var Si=m(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.merge=void 0;var vi=mi(),Ss=20;function Ts(...u){let n=u.shift(),o=new WeakMap;for(;u.length>0;)n=Ei(n,u.shift(),0,o);return n}rr.merge=Ts;function Tn(u){return er(u)?u.slice():u}function Ei(u,n,o=0,c){let l;if(!(o>Ss)){if(o++,tr(u)||tr(n)||bi(n))l=Tn(n);else if(er(u)){if(l=u.slice(),er(n))for(let i=0,e=n.length;i<e;i++)l.push(Tn(n[i]));else if(he(n)){let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e];l[r]=Tn(n[r])}}}else if(he(u))if(he(n)){if(!Os(u,n))return n;l=Object.assign({},u);let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e],a=n[r];if(tr(a))typeof a>"u"?delete l[r]:l[r]=a;else{let s=l[r],d=a;if(_i(u,r,c)||_i(n,r,c))delete l[r];else{if(he(s)&&he(d)){let v=c.get(s)||[],S=c.get(d)||[];v.push({obj:u,key:r}),S.push({obj:n,key:r}),c.set(s,v),c.set(d,S)}l[r]=Ei(l[r],a,o,c)}}}}else l=n;return l}}function _i(u,n,o){let c=o.get(u[n])||[];for(let l=0,i=c.length;l<i;l++){let e=c[l];if(e.key===n&&e.obj===u)return!0}return!1}function er(u){return Array.isArray(u)}function bi(u){return typeof u=="function"}function he(u){return!tr(u)&&!er(u)&&!bi(u)&&typeof u=="object"}function tr(u){return typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Date||u instanceof RegExp||u===null}function Os(u,n){return!(!(0,vi.isPlainObject)(u)||!(0,vi.isPlainObject)(n))}});var Ti=m(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.callWithTimeout=Kt.TimeoutError=void 0;var nr=class u extends Error{constructor(n){super(n),Object.setPrototypeOf(this,u.prototype)}};Kt.TimeoutError=nr;function gs(u,n){let o,c=new Promise(function(i,e){o=setTimeout(function(){e(new nr("Operation timed out."))},n)});return Promise.race([u,c]).then(l=>(clearTimeout(o),l),l=>{throw clearTimeout(o),l})}Kt.callWithTimeout=gs});var gi=m(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.isUrlIgnored=Xt.urlMatches=void 0;function Oi(u,n){return typeof n=="string"?u===n:!!u.match(n)}Xt.urlMatches=Oi;function As(u,n){if(!n)return!1;for(let o of n)if(Oi(u,o))return!0;return!1}Xt.isUrlIgnored=As});var Ai=m(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.isWrapped=void 0;function Ns(u){return typeof u=="function"&&typeof u.__original=="function"&&typeof u.__unwrap=="function"&&u.__wrapped===!0}or.isWrapped=Ns});var Ni=m(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.Deferred=void 0;var On=class{constructor(){this._promise=new Promise((n,o)=>{this._resolve=n,this._reject=o})}get promise(){return this._promise}resolve(n){this._resolve(n)}reject(n){this._reject(n)}};ir.Deferred=On});var Pi=m(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.BindOnceFuture=void 0;var Ps=Ni(),gn=class{constructor(n,o){this._callback=n,this._that=o,this._isCalled=!1,this._deferred=new Ps.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...n){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...n)).then(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};ar.BindOnceFuture=gn});var Ri=m(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur._export=void 0;var xi=(b(),U(y)),xs=se();function Rs(u,n){return new Promise(o=>{xi.context.with((0,xs.suppressTracing)(xi.context.active()),()=>{u.export(n,c=>{o(c)})})})}ur._export=Rs});var M=m(g=>{"use strict";var Ls=g&&g.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),R=g&&g.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Ls(n,u,o)};Object.defineProperty(g,"__esModule",{value:!0});g.internal=g.baggageUtils=void 0;R(Oo(),g);R(go(),g);R(Ro(),g);R(Qr(),g);R($r(),g);R(Yo(),g);R(zo(),g);R(Wo(),g);g.baggageUtils=Xr();R(nn(),g);R(Qo(),g);R(ii(),g);R(ui(),g);R(li(),g);R(hn(),g);R(vn(),g);R(si(),g);R(fi(),g);R(se(),g);R(fn(),g);R(Me(),g);R(Si(),g);R(Zr(),g);R(Ti(),g);R(gi(),g);R(Ai(),g);R(Pi(),g);R(rn(),g);var Is=Ri();g.internal={_export:Is._export}});var Wi=m(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.disableInstrumentations=Nt.enableInstrumentations=Nt.parseInstrumentationOptions=void 0;function zi(u=[]){let n=[];for(let o=0,c=u.length;o<c;o++){let l=u[o];if(Array.isArray(l)){let i=zi(l);n=n.concat(i.instrumentations)}else typeof l=="function"?n.push(new l):l.instrumentationName&&n.push(l)}return{instrumentations:n}}Nt.parseInstrumentationOptions=zi;function Js(u,n,o){for(let c=0,l=u.length;c<l;c++){let i=u[c];n&&i.setTracerProvider(n),o&&i.setMeterProvider(o),i.getConfig().enabled||i.enable()}}Nt.enableInstrumentations=Js;function zs(u){u.forEach(n=>n.disable())}Nt.disableInstrumentations=zs});var Qi=m(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.registerInstrumentations=void 0;var $i=(b(),U(y)),Nn=Wi();function Ws(u){let{instrumentations:n}=(0,Nn.parseInstrumentationOptions)(u.instrumentations),o=u.tracerProvider||$i.trace.getTracerProvider(),c=u.meterProvider||$i.metrics.getMeterProvider();return(0,Nn.enableInstrumentations)(n,o,c),()=>{(0,Nn.disableInstrumentations)(n)}}dr.registerInstrumentations=Ws});var _e={};import*as mm from"async_hooks";var Ya=Fr(()=>{et(_e,mm)});var Ee={};import*as vm from"events";var Ja=Fr(()=>{et(Ee,vm)});var za=m(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.AbstractAsyncHooksContextManager=void 0;var Nf=(Ja(),U(Ee)),Pf=["addListener","on","once","prependListener","prependOnceListener"],kn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(n,o){return o instanceof Nf.EventEmitter?this._bindEventEmitter(n,o):typeof o=="function"?this._bindFunction(n,o):o}_bindFunction(n,o){let c=this,l=function(...i){return c.with(n,()=>o.apply(this,i))};return Object.defineProperty(l,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),l}_bindEventEmitter(n,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),Pf.forEach(l=>{o[l]!==void 0&&(o[l]=this._patchAddListener(o,o[l],n))}),typeof o.removeListener=="function"&&(o.removeListener=this._patchRemoveListener(o,o.removeListener)),typeof o.off=="function"&&(o.off=this._patchRemoveListener(o,o.off)),typeof o.removeAllListeners=="function"&&(o.removeAllListeners=this._patchRemoveAllListeners(o,o.removeAllListeners))),o}_patchRemoveListener(n,o){let c=this;return function(l,i){var e;let t=(e=c._getPatchMap(n))===null||e===void 0?void 0:e[l];if(t===void 0)return o.call(this,l,i);let r=t.get(i);return o.call(this,l,r||i)}}_patchRemoveAllListeners(n,o){let c=this;return function(l){let i=c._getPatchMap(n);return i!==void 0&&(arguments.length===0?c._createPatchMap(n):i[l]!==void 0&&delete i[l]),o.apply(this,arguments)}}_patchAddListener(n,o,c){let l=this;return function(i,e){if(l._wrapped)return o.call(this,i,e);let t=l._getPatchMap(n);t===void 0&&(t=l._createPatchMap(n));let r=t[i];r===void 0&&(r=new WeakMap,t[i]=r);let a=l.bind(c,e);r.set(e,a),l._wrapped=!0;try{return o.call(this,i,a)}finally{l._wrapped=!1}}}_createPatchMap(n){let o=Object.create(null);return n[this._kOtListeners]=o,o}_getPatchMap(n){return n[this._kOtListeners]}};Or.AbstractAsyncHooksContextManager=kn});var Wa=m(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.AsyncLocalStorageContextManager=void 0;var xf=(b(),U(y)),Rf=(Ya(),U(_e)),Lf=za(),Vn=class extends Lf.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Rf.AsyncLocalStorage}active(){var n;return(n=this._asyncLocalStorage.getStore())!==null&&n!==void 0?n:xf.ROOT_CONTEXT}with(n,o,c,...l){let i=c==null?o:o.bind(c);return this._asyncLocalStorage.run(n,i,...l)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};gr.AsyncLocalStorageContextManager=Vn});var qn=m(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.toAnyValue=Pt.toKeyValue=Pt.toAttributes=void 0;function Cf(u){return Object.keys(u).map(n=>jn(n,u[n]))}Pt.toAttributes=Cf;function jn(u,n){return{key:u,value:Fn(n)}}Pt.toKeyValue=jn;function Fn(u){let n=typeof u;return n==="string"?{stringValue:u}:n==="number"?Number.isInteger(u)?{intValue:u}:{doubleValue:u}:n==="boolean"?{boolValue:u}:u instanceof Uint8Array?{bytesValue:u}:Array.isArray(u)?{arrayValue:{values:u.map(Fn)}}:n==="object"&&u!=null?{kvlistValue:{values:Object.entries(u).map(([o,c])=>jn(o,c))}}:{}}Pt.toAnyValue=Fn});var ru=m(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.toOtlpSpanEvent=xt.toOtlpLink=xt.sdkSpanToOtlpSpan=void 0;var Kn=qn();function Uf(u,n){var o;let c=u.spanContext(),l=u.status;return{traceId:n.encodeSpanContext(c.traceId),spanId:n.encodeSpanContext(c.spanId),parentSpanId:n.encodeOptionalSpanContext(u.parentSpanId),traceState:(o=c.traceState)===null||o===void 0?void 0:o.serialize(),name:u.name,kind:u.kind==null?0:u.kind+1,startTimeUnixNano:n.encodeHrTime(u.startTime),endTimeUnixNano:n.encodeHrTime(u.endTime),attributes:(0,Kn.toAttributes)(u.attributes),droppedAttributesCount:u.droppedAttributesCount,events:u.events.map(i=>eu(i,n)),droppedEventsCount:u.droppedEventsCount,status:{code:l.code,message:l.message},links:u.links.map(i=>tu(i,n)),droppedLinksCount:u.droppedLinksCount}}xt.sdkSpanToOtlpSpan=Uf;function tu(u,n){var o;return{attributes:u.attributes?(0,Kn.toAttributes)(u.attributes):[],spanId:n.encodeSpanContext(u.context.spanId),traceId:n.encodeSpanContext(u.context.traceId),traceState:(o=u.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:u.droppedAttributesCount||0}}xt.toOtlpLink=tu;function eu(u,n){return{attributes:u.attributes?(0,Kn.toAttributes)(u.attributes):[],name:u.name,timeUnixNano:n.encodeHrTime(u.time),droppedAttributesCount:u.droppedAttributesCount||0}}xt.toOtlpSpanEvent=eu});var uu=m(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.getOtlpEncoder=Q.encodeAsString=Q.encodeAsLongBits=Q.toLongBits=Q.hrTimeToNanos=void 0;var Pr=M(),Mf=BigInt(1e9);function Xn(u){return BigInt(u[0])*Mf+BigInt(u[1])}Q.hrTimeToNanos=Xn;function ou(u){let n=Number(BigInt.asUintN(32,u)),o=Number(BigInt.asUintN(32,u>>BigInt(32)));return{low:n,high:o}}Q.toLongBits=ou;function Yn(u){let n=Xn(u);return ou(n)}Q.encodeAsLongBits=Yn;function iu(u){return Xn(u).toString()}Q.encodeAsString=iu;var Df=typeof BigInt<"u"?iu:Pr.hrTimeToNanoseconds;function nu(u){return u}function au(u){if(u!==void 0)return(0,Pr.hexToBase64)(u)}var Bf={encodeHrTime:Yn,encodeSpanContext:Pr.hexToBase64,encodeOptionalSpanContext:au};function kf(u){var n,o;if(u===void 0)return Bf;let c=(n=u.useLongBits)!==null&&n!==void 0?n:!0,l=(o=u.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?Yn:Df,encodeSpanContext:l?nu:Pr.hexToBase64,encodeOptionalSpanContext:l?nu:au}}Q.getOtlpEncoder=kf});var Jn=m(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.createExportTraceServiceRequest=void 0;var Vf=qn(),Gf=ru(),Hf=uu();function jf(u,n){let o=(0,Hf.getOtlpEncoder)(n);return{resourceSpans:qf(u,o)}}xr.createExportTraceServiceRequest=jf;function Ff(u){let n=new Map;for(let o of u){let c=n.get(o.resource);c||(c=new Map,n.set(o.resource,c));let l=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,i=c.get(l);i||(i=[],c.set(l,i)),i.push(o)}return n}function qf(u,n){let o=Ff(u),c=[],l=o.entries(),i=l.next();for(;!i.done;){let[e,t]=i.value,r=[],a=t.values(),s=a.next();for(;!s.done;){let v=s.value;if(v.length>0){let{name:S,version:O,schemaUrl:A}=v[0].instrumentationLibrary,q=v.map(tt=>(0,Gf.sdkSpanToOtlpSpan)(tt,n));r.push({scope:{name:S,version:O},spans:q,schemaUrl:A})}s=a.next()}let d={resource:{attributes:(0,Vf.toAttributes)(e.attributes),droppedAttributesCount:0},scopeSpans:r,schemaUrl:void 0};c.push(d),i=l.next()}return c}});var Se=m(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.parseRetryAfterToMills=C.isExportRetryable=C.invalidTimeout=C.configureExporterTimeout=C.appendRootPathToUrlIfNeeded=C.appendResourcePathToUrl=C.parseHeaders=C.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=C.DEFAULT_EXPORT_MAX_BACKOFF=C.DEFAULT_EXPORT_INITIAL_BACKOFF=C.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var zn=(b(),U(y)),lu=M(),cu=1e4;C.DEFAULT_EXPORT_MAX_ATTEMPTS=5;C.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;C.DEFAULT_EXPORT_MAX_BACKOFF=5e3;C.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function Kf(u={}){let n={};return Object.entries(u).forEach(([o,c])=>{typeof c<"u"?n[o]=String(c):zn.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),n}C.parseHeaders=Kf;function Xf(u,n){return u.endsWith("/")||(u=u+"/"),u+n}C.appendResourcePathToUrl=Xf;function Yf(u){try{let n=new URL(u);return n.pathname===""&&(n.pathname=n.pathname+"/"),n.toString()}catch{return zn.diag.warn(`Could not parse export URL: '${u}'`),u}}C.appendRootPathToUrlIfNeeded=Yf;function Jf(u){return typeof u=="number"?u<=0?Wn(u,cu):u:zf()}C.configureExporterTimeout=Jf;function zf(){var u;let n=Number((u=(0,lu.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&u!==void 0?u:(0,lu.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return n<=0?Wn(n,cu):n}function Wn(u,n){return zn.diag.warn("Timeout must be greater than 0",u),n}C.invalidTimeout=Wn;function Wf(u){return[429,502,503,504].includes(u)}C.isExportRetryable=Wf;function $f(u){if(u==null)return-1;let n=Number.parseInt(u,10);if(Number.isInteger(n))return n>0?n*1e3:-1;let o=new Date(u).getTime()-Date.now();return o>=0?o:0}C.parseRetryAfterToMills=$f});var Lr=m(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.OTLPExporterBase=void 0;var su=(b(),U(y)),Te=M(),Qf=Se(),$n=class{constructor(n={}){this._sendingPromises=[],this.url=this.getDefaultUrl(n),typeof n.hostname=="string"&&(this.hostname=n.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Te.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof n.concurrencyLimit=="number"?n.concurrencyLimit:30,this.timeoutMillis=(0,Qf.configureExporterTimeout)(n.timeoutMillis),this.onInit(n)}export(n,o){if(this._shutdownOnce.isCalled){o({code:Te.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:Te.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(n).then(()=>{o({code:Te.ExportResultCode.SUCCESS})}).catch(c=>{o({code:Te.ExportResultCode.FAILED,error:c})})}_export(n){return new Promise((o,c)=>{try{su.diag.debug("items to be sent",n),this.send(n,o,c)}catch(l){c(l)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return su.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Rr.OTLPExporterBase=$n});var Zn=m(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.OTLPExporterError=void 0;var Qn=class extends Error{constructor(n,o,c){super(n),this.name="OTLPExporterError",this.data=c,this.code=o}};wr.OTLPExporterError=Qn});var to=m(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.sendWithXhr=ne.sendWithBeacon=void 0;var du=(b(),U(y)),Oe=Zn(),re=Se();function ep(u,n,o,c,l){if(navigator.sendBeacon(n,new Blob([u],o)))du.diag.debug("sendBeacon - can send",u),c();else{let i=new Oe.OTLPExporterError(`sendBeacon - cannot send ${u}`);l(i)}}ne.sendWithBeacon=ep;function rp(u,n,o,c,l,i){let e,t,r=!1,a=setTimeout(()=>{if(clearTimeout(e),r=!0,t.readyState===XMLHttpRequest.DONE){let d=new Oe.OTLPExporterError("Request Timeout");i(d)}else t.abort()},c),s=(d=re.DEFAULT_EXPORT_MAX_ATTEMPTS,v=re.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{t=new XMLHttpRequest,t.open("POST",n),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),o)).forEach(([O,A])=>{t.setRequestHeader(O,A)}),t.send(u),t.onreadystatechange=()=>{if(t.readyState===XMLHttpRequest.DONE&&r===!1)if(t.status>=200&&t.status<=299)du.diag.debug("xhr success",u),l(),clearTimeout(a),clearTimeout(e);else if(t.status&&(0,re.isExportRetryable)(t.status)&&d>0){let O;v=re.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*v,t.getResponseHeader("Retry-After")?O=(0,re.parseRetryAfterToMills)(t.getResponseHeader("Retry-After")):O=Math.round(Math.random()*(re.DEFAULT_EXPORT_MAX_BACKOFF-v)+v),e=setTimeout(()=>{s(d-1,v)},O)}else{let O=new Oe.OTLPExporterError(`Failed to export with XHR (status: ${t.status})`,t.status);i(O),clearTimeout(a),clearTimeout(e)}},t.onabort=()=>{if(r){let O=new Oe.OTLPExporterError("Request Timeout");i(O)}clearTimeout(a),clearTimeout(e)},t.onerror=()=>{if(r){let O=new Oe.OTLPExporterError("Request Timeout");i(O)}clearTimeout(a),clearTimeout(e)}};s()}ne.sendWithXhr=rp});var hu=m(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.OTLPExporterBrowserBase=void 0;var np=Lr(),op=Se(),yu=to(),ip=(b(),U(y)),Cr=M(),eo=class extends np.OTLPExporterBase{constructor(n={}){super(n),this._useXHR=!1,this._useXHR=!!n.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,op.parseHeaders)(n.headers),Cr.baggageUtils.parseKeyPairsIntoRecord((0,Cr.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Cr._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Cr._globalThis.removeEventListener("unload",this.shutdown)}send(n,o,c){if(this._shutdownOnce.isCalled){ip.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=JSON.stringify(l),e=new Promise((r,a)=>{this._useXHR?(0,yu.sendWithXhr)(i,this.url,this._headers,this.timeoutMillis,r,a):(0,yu.sendWithBeacon)(i,this.url,{type:"application/json"},r,a)}).then(o,c);this._sendingPromises.push(e);let t=()=>{let r=this._sendingPromises.indexOf(e);this._sendingPromises.splice(r,1)};e.then(t,t)}};Ur.OTLPExporterBrowserBase=eo});var mu=m(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.sendWithXhr=oe.OTLPExporterBrowserBase=void 0;var ap=hu();Object.defineProperty(oe,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return ap.OTLPExporterBrowserBase}});var up=to();Object.defineProperty(oe,"sendWithXhr",{enumerable:!0,get:function(){return up.sendWithXhr}})});var vu=m(D=>{"use strict";var lp=D&&D.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),cp=D&&D.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&lp(n,u,o)};Object.defineProperty(D,"__esModule",{value:!0});D.invalidTimeout=D.configureExporterTimeout=D.appendRootPathToUrlIfNeeded=D.appendResourcePathToUrl=D.parseHeaders=D.OTLPExporterError=D.OTLPExporterBase=void 0;cp(mu(),D);var sp=Lr();Object.defineProperty(D,"OTLPExporterBase",{enumerable:!0,get:function(){return sp.OTLPExporterBase}});var fp=Zn();Object.defineProperty(D,"OTLPExporterError",{enumerable:!0,get:function(){return fp.OTLPExporterError}});var ge=Se();Object.defineProperty(D,"parseHeaders",{enumerable:!0,get:function(){return ge.parseHeaders}});Object.defineProperty(D,"appendResourcePathToUrl",{enumerable:!0,get:function(){return ge.appendResourcePathToUrl}});Object.defineProperty(D,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return ge.appendRootPathToUrlIfNeeded}});Object.defineProperty(D,"configureExporterTimeout",{enumerable:!0,get:function(){return ge.configureExporterTimeout}});Object.defineProperty(D,"invalidTimeout",{enumerable:!0,get:function(){return ge.invalidTimeout}})});var Eu=m(($m,_u)=>{"use strict";_u.exports=pp;function pp(u,n){for(var o=new Array(arguments.length-1),c=0,l=2,i=!0;l<arguments.length;)o[c++]=arguments[l++];return new Promise(function(t,r){o[c]=function(s){if(i)if(i=!1,s)r(s);else{for(var d=new Array(arguments.length-1),v=0;v<d.length;)d[v++]=arguments[v];t.apply(null,d)}};try{u.apply(n||null,o)}catch(a){i&&(i=!1,r(a))}})}});var Ou=m(Tu=>{"use strict";var Mr=Tu;Mr.length=function(n){var o=n.length;if(!o)return 0;for(var c=0;--o%4>1&&n.charAt(o)==="=";)++c;return Math.ceil(n.length*3)/4-c};var ie=new Array(64),Su=new Array(123);for(it=0;it<64;)Su[ie[it]=it<26?it+65:it<52?it+71:it<62?it-4:it-59|43]=it++;var it;Mr.encode=function(n,o,c){for(var l=null,i=[],e=0,t=0,r;o<c;){var a=n[o++];switch(t){case 0:i[e++]=ie[a>>2],r=(a&3)<<4,t=1;break;case 1:i[e++]=ie[r|a>>4],r=(a&15)<<2,t=2;break;case 2:i[e++]=ie[r|a>>6],i[e++]=ie[a&63],t=0;break}e>8191&&((l||(l=[])).push(String.fromCharCode.apply(String,i)),e=0)}return t&&(i[e++]=ie[r],i[e++]=61,t===1&&(i[e++]=61)),l?(e&&l.push(String.fromCharCode.apply(String,i.slice(0,e))),l.join("")):String.fromCharCode.apply(String,i.slice(0,e))};var bu="invalid encoding";Mr.decode=function(n,o,c){for(var l=c,i=0,e,t=0;t<n.length;){var r=n.charCodeAt(t++);if(r===61&&i>1)break;if((r=Su[r])===void 0)throw Error(bu);switch(i){case 0:e=r,i=1;break;case 1:o[c++]=e<<2|(r&48)>>4,e=r,i=2;break;case 2:o[c++]=(e&15)<<4|(r&60)>>2,e=r,i=3;break;case 3:o[c++]=(e&3)<<6|r,i=0;break}}if(i===1)throw Error(bu);return c-l};Mr.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)}});var Au=m((Zm,gu)=>{"use strict";gu.exports=Dr;function Dr(){this._listeners={}}Dr.prototype.on=function(n,o,c){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:o,ctx:c||this}),this};Dr.prototype.off=function(n,o){if(n===void 0)this._listeners={};else if(o===void 0)this._listeners[n]=[];else for(var c=this._listeners[n],l=0;l<c.length;)c[l].fn===o?c.splice(l,1):++l;return this};Dr.prototype.emit=function(n){var o=this._listeners[n];if(o){for(var c=[],l=1;l<arguments.length;)c.push(arguments[l++]);for(l=0;l<o.length;)o[l].fn.apply(o[l++].ctx,c)}return this}});var wu=m((tv,Iu)=>{"use strict";Iu.exports=Nu(Nu);function Nu(u){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),o=new Uint8Array(n.buffer),c=o[3]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3]}function i(r,a,s){n[0]=r,a[s]=o[3],a[s+1]=o[2],a[s+2]=o[1],a[s+3]=o[0]}u.writeFloatLE=c?l:i,u.writeFloatBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],n[0]}function t(r,a){return o[3]=r[a],o[2]=r[a+1],o[1]=r[a+2],o[0]=r[a+3],n[0]}u.readFloatLE=c?e:t,u.readFloatBE=c?t:e}():function(){function n(c,l,i,e){var t=l<0?1:0;if(t&&(l=-l),l===0)c(1/l>0?0:2147483648,i,e);else if(isNaN(l))c(2143289344,i,e);else if(l>34028234663852886e22)c((t<<31|2139095040)>>>0,i,e);else if(l<11754943508222875e-54)c((t<<31|Math.round(l/1401298464324817e-60))>>>0,i,e);else{var r=Math.floor(Math.log(l)/Math.LN2),a=Math.round(l*Math.pow(2,-r)*8388608)&8388607;c((t<<31|r+127<<23|a)>>>0,i,e)}}u.writeFloatLE=n.bind(null,Pu),u.writeFloatBE=n.bind(null,xu);function o(c,l,i){var e=c(l,i),t=(e>>31)*2+1,r=e>>>23&255,a=e&8388607;return r===255?a?NaN:t*(1/0):r===0?t*1401298464324817e-60*a:t*Math.pow(2,r-150)*(a+8388608)}u.readFloatLE=o.bind(null,Ru),u.readFloatBE=o.bind(null,Lu)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),o=new Uint8Array(n.buffer),c=o[7]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3],a[s+4]=o[4],a[s+5]=o[5],a[s+6]=o[6],a[s+7]=o[7]}function i(r,a,s){n[0]=r,a[s]=o[7],a[s+1]=o[6],a[s+2]=o[5],a[s+3]=o[4],a[s+4]=o[3],a[s+5]=o[2],a[s+6]=o[1],a[s+7]=o[0]}u.writeDoubleLE=c?l:i,u.writeDoubleBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],o[4]=r[a+4],o[5]=r[a+5],o[6]=r[a+6],o[7]=r[a+7],n[0]}function t(r,a){return o[7]=r[a],o[6]=r[a+1],o[5]=r[a+2],o[4]=r[a+3],o[3]=r[a+4],o[2]=r[a+5],o[1]=r[a+6],o[0]=r[a+7],n[0]}u.readDoubleLE=c?e:t,u.readDoubleBE=c?t:e}():function(){function n(c,l,i,e,t,r){var a=e<0?1:0;if(a&&(e=-e),e===0)c(0,t,r+l),c(1/e>0?0:2147483648,t,r+i);else if(isNaN(e))c(0,t,r+l),c(2146959360,t,r+i);else if(e>17976931348623157e292)c(0,t,r+l),c((a<<31|2146435072)>>>0,t,r+i);else{var s;if(e<22250738585072014e-324)s=e/5e-324,c(s>>>0,t,r+l),c((a<<31|s/4294967296)>>>0,t,r+i);else{var d=Math.floor(Math.log(e)/Math.LN2);d===1024&&(d=1023),s=e*Math.pow(2,-d),c(s*4503599627370496>>>0,t,r+l),c((a<<31|d+1023<<20|s*1048576&1048575)>>>0,t,r+i)}}}u.writeDoubleLE=n.bind(null,Pu,0,4),u.writeDoubleBE=n.bind(null,xu,4,0);function o(c,l,i,e,t){var r=c(e,t+l),a=c(e,t+i),s=(a>>31)*2+1,d=a>>>20&2047,v=4294967296*(a&1048575)+r;return d===2047?v?NaN:s*(1/0):d===0?s*5e-324*v:s*Math.pow(2,d-1075)*(v+4503599627370496)}u.readDoubleLE=o.bind(null,Ru,0,4),u.readDoubleBE=o.bind(null,Lu,4,0)}(),u}function Pu(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}function xu(u,n,o){n[o]=u>>>24,n[o+1]=u>>>16&255,n[o+2]=u>>>8&255,n[o+3]=u&255}function Ru(u,n){return(u[n]|u[n+1]<<8|u[n+2]<<16|u[n+3]<<24)>>>0}function Lu(u,n){return(u[n]<<24|u[n+1]<<16|u[n+2]<<8|u[n+3])>>>0}});var Cu=m((exports,module)=>{"use strict";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(u){}return null}});var Mu=m(Uu=>{"use strict";var ro=Uu;ro.length=function(n){for(var o=0,c=0,l=0;l<n.length;++l)c=n.charCodeAt(l),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(n.charCodeAt(l+1)&64512)===56320?(++l,o+=4):o+=3;return o};ro.read=function(n,o,c){var l=c-o;if(l<1)return"";for(var i=null,e=[],t=0,r;o<c;)r=n[o++],r<128?e[t++]=r:r>191&&r<224?e[t++]=(r&31)<<6|n[o++]&63:r>239&&r<365?(r=((r&7)<<18|(n[o++]&63)<<12|(n[o++]&63)<<6|n[o++]&63)-65536,e[t++]=55296+(r>>10),e[t++]=56320+(r&1023)):e[t++]=(r&15)<<12|(n[o++]&63)<<6|n[o++]&63,t>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,e)),t=0);return i?(t&&i.push(String.fromCharCode.apply(String,e.slice(0,t))),i.join("")):String.fromCharCode.apply(String,e.slice(0,t))};ro.write=function(n,o,c){for(var l=c,i,e,t=0;t<n.length;++t)i=n.charCodeAt(t),i<128?o[c++]=i:i<2048?(o[c++]=i>>6|192,o[c++]=i&63|128):(i&64512)===55296&&((e=n.charCodeAt(t+1))&64512)===56320?(i=65536+((i&1023)<<10)+(e&1023),++t,o[c++]=i>>18|240,o[c++]=i>>12&63|128,o[c++]=i>>6&63|128,o[c++]=i&63|128):(o[c++]=i>>12|224,o[c++]=i>>6&63|128,o[c++]=i&63|128);return c-l}});var Bu=m((rv,Du)=>{"use strict";Du.exports=dp;function dp(u,n,o){var c=o||8192,l=c>>>1,i=null,e=c;return function(r){if(r<1||r>l)return u(r);e+r>c&&(i=u(c),e=0);var a=n.call(i,e,e+=r);return e&7&&(e=(e|7)+1),a}}});var Vu=m((nv,ku)=>{"use strict";ku.exports=V;var Ae=Lt();function V(u,n){this.lo=u>>>0,this.hi=n>>>0}var Gt=V.zero=new V(0,0);Gt.toNumber=function(){return 0};Gt.zzEncode=Gt.zzDecode=function(){return this};Gt.length=function(){return 1};var yp=V.zeroHash="\0\0\0\0\0\0\0\0";V.fromNumber=function(n){if(n===0)return Gt;var o=n<0;o&&(n=-n);var c=n>>>0,l=(n-c)/4294967296>>>0;return o&&(l=~l>>>0,c=~c>>>0,++c>4294967295&&(c=0,++l>4294967295&&(l=0))),new V(c,l)};V.from=function(n){if(typeof n=="number")return V.fromNumber(n);if(Ae.isString(n))if(Ae.Long)n=Ae.Long.fromString(n);else return V.fromNumber(parseInt(n,10));return n.low||n.high?new V(n.low>>>0,n.high>>>0):Gt};V.prototype.toNumber=function(n){if(!n&&this.hi>>>31){var o=~this.lo+1>>>0,c=~this.hi>>>0;return o||(c=c+1>>>0),-(o+c*4294967296)}return this.lo+this.hi*4294967296};V.prototype.toLong=function(n){return Ae.Long?new Ae.Long(this.lo|0,this.hi|0,!!n):{low:this.lo|0,high:this.hi|0,unsigned:!!n}};var Rt=String.prototype.charCodeAt;V.fromHash=function(n){return n===yp?Gt:new V((Rt.call(n,0)|Rt.call(n,1)<<8|Rt.call(n,2)<<16|Rt.call(n,3)<<24)>>>0,(Rt.call(n,4)|Rt.call(n,5)<<8|Rt.call(n,6)<<16|Rt.call(n,7)<<24)>>>0)};V.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};V.prototype.zzEncode=function(){var n=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^n)>>>0,this.lo=(this.lo<<1^n)>>>0,this};V.prototype.zzDecode=function(){var n=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^n)>>>0,this.hi=(this.hi>>>1^n)>>>0,this};V.prototype.length=function(){var n=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?n<16384?n<128?1:2:n<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var Lt=m(no=>{"use strict";var _=no;_.asPromise=Eu();_.base64=Ou();_.EventEmitter=Au();_.float=wu();_.inquire=Cu();_.utf8=Mu();_.pool=Bu();_.LongBits=Vu();_.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);_.global=_.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||no;_.emptyArray=Object.freeze?Object.freeze([]):[];_.emptyObject=Object.freeze?Object.freeze({}):{};_.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};_.isString=function(n){return typeof n=="string"||n instanceof String};_.isObject=function(n){return n&&typeof n=="object"};_.isset=_.isSet=function(n,o){var c=n[o];return c!=null&&n.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};_.Buffer=function(){try{var u=_.inquire("buffer").Buffer;return u.prototype.utf8Write?u:null}catch{return null}}();_._Buffer_from=null;_._Buffer_allocUnsafe=null;_.newBuffer=function(n){return typeof n=="number"?_.Buffer?_._Buffer_allocUnsafe(n):new _.Array(n):_.Buffer?_._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)};_.Array=typeof Uint8Array<"u"?Uint8Array:Array;_.Long=_.global.dcodeIO&&_.global.dcodeIO.Long||_.global.Long||_.inquire("long");_.key2Re=/^true|false|0|1$/;_.key32Re=/^-?(?:0|[1-9][0-9]*)$/;_.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;_.longToHash=function(n){return n?_.LongBits.from(n).toHash():_.LongBits.zeroHash};_.longFromHash=function(n,o){var c=_.LongBits.fromHash(n);return _.Long?_.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Gu(u,n,o){for(var c=Object.keys(n),l=0;l<c.length;++l)(u[c[l]]===void 0||!o)&&(u[c[l]]=n[c[l]]);return u}_.merge=Gu;_.lcFirst=function(n){return n.charAt(0).toLowerCase()+n.substring(1)};function Hu(u){function n(o,c){if(!(this instanceof n))return new n(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&Gu(this,c)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return u},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}_.newError=Hu;_.ProtocolError=Hu("ProtocolError");_.oneOfGetter=function(n){for(var o={},c=0;c<n.length;++c)o[n[c]]=1;return function(){for(var l=Object.keys(this),i=l.length-1;i>-1;--i)if(o[l[i]]===1&&this[l[i]]!==void 0&&this[l[i]]!==null)return l[i]}};_.oneOfSetter=function(n){return function(o){for(var c=0;c<n.length;++c)n[c]!==o&&delete this[n[c]]}};_.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};_._configure=function(){var u=_.Buffer;if(!u){_._Buffer_from=_._Buffer_allocUnsafe=null;return}_._Buffer_from=u.from!==Uint8Array.from&&u.from||function(o,c){return new u(o,c)},_._Buffer_allocUnsafe=u.allocUnsafe||function(o){return new u(o)}}});var so=m((iv,Ku)=>{"use strict";Ku.exports=N;var Z=Lt(),oo,Br=Z.LongBits,ju=Z.base64,Fu=Z.utf8;function Ne(u,n,o){this.fn=u,this.len=n,this.next=void 0,this.val=o}function ao(){}function hp(u){this.head=u.head,this.tail=u.tail,this.len=u.len,this.next=u.states}function N(){this.len=0,this.head=new Ne(ao,0,0),this.tail=this.head,this.states=null}var qu=function(){return Z.Buffer?function(){return(N.create=function(){return new oo})()}:function(){return new N}};N.create=qu();N.alloc=function(n){return new Z.Array(n)};Z.Array!==Array&&(N.alloc=Z.pool(N.alloc,Z.Array.prototype.subarray));N.prototype._push=function(n,o,c){return this.tail=this.tail.next=new Ne(n,o,c),this.len+=o,this};function uo(u,n,o){n[o]=u&255}function mp(u,n,o){for(;u>127;)n[o++]=u&127|128,u>>>=7;n[o]=u}function lo(u,n){this.len=u,this.next=void 0,this.val=n}lo.prototype=Object.create(Ne.prototype);lo.prototype.fn=mp;N.prototype.uint32=function(n){return this.len+=(this.tail=this.tail.next=new lo((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};N.prototype.int32=function(n){return n<0?this._push(co,10,Br.fromNumber(n)):this.uint32(n)};N.prototype.sint32=function(n){return this.uint32((n<<1^n>>31)>>>0)};function co(u,n,o){for(;u.hi;)n[o++]=u.lo&127|128,u.lo=(u.lo>>>7|u.hi<<25)>>>0,u.hi>>>=7;for(;u.lo>127;)n[o++]=u.lo&127|128,u.lo=u.lo>>>7;n[o++]=u.lo}N.prototype.uint64=function(n){var o=Br.from(n);return this._push(co,o.length(),o)};N.prototype.int64=N.prototype.uint64;N.prototype.sint64=function(n){var o=Br.from(n).zzEncode();return this._push(co,o.length(),o)};N.prototype.bool=function(n){return this._push(uo,1,n?1:0)};function io(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}N.prototype.fixed32=function(n){return this._push(io,4,n>>>0)};N.prototype.sfixed32=N.prototype.fixed32;N.prototype.fixed64=function(n){var o=Br.from(n);return this._push(io,4,o.lo)._push(io,4,o.hi)};N.prototype.sfixed64=N.prototype.fixed64;N.prototype.float=function(n){return this._push(Z.float.writeFloatLE,4,n)};N.prototype.double=function(n){return this._push(Z.float.writeDoubleLE,8,n)};var vp=Z.Array.prototype.set?function(n,o,c){o.set(n,c)}:function(n,o,c){for(var l=0;l<n.length;++l)o[c+l]=n[l]};N.prototype.bytes=function(n){var o=n.length>>>0;if(!o)return this._push(uo,1,0);if(Z.isString(n)){var c=N.alloc(o=ju.length(n));ju.decode(n,c,0),n=c}return this.uint32(o)._push(vp,o,n)};N.prototype.string=function(n){var o=Fu.length(n);return o?this.uint32(o)._push(Fu.write,o,n):this._push(uo,1,0)};N.prototype.fork=function(){return this.states=new hp(this),this.head=this.tail=new Ne(ao,0,0),this.len=0,this};N.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 Ne(ao,0,0),this.len=0),this};N.prototype.ldelim=function(){var n=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=n.next,this.tail=o,this.len+=c),this};N.prototype.finish=function(){for(var n=this.head.next,o=this.constructor.alloc(this.len),c=0;n;)n.fn(n.val,o,c),c+=n.len,n=n.next;return o};N._configure=function(u){oo=u,N.create=qu(),oo._configure()}});var Ju=m((av,Yu)=>{"use strict";Yu.exports=st;var Xu=so();(st.prototype=Object.create(Xu.prototype)).constructor=st;var It=Lt();function st(){Xu.call(this)}st._configure=function(){st.alloc=It._Buffer_allocUnsafe,st.writeBytesBuffer=It.Buffer&&It.Buffer.prototype instanceof Uint8Array&&It.Buffer.prototype.set.name==="set"?function(n,o,c){o.set(n,c)}:function(n,o,c){if(n.copy)n.copy(o,c,0,n.length);else for(var l=0;l<n.length;)o[c++]=n[l++]}};st.prototype.bytes=function(n){It.isString(n)&&(n=It._Buffer_from(n,"base64"));var o=n.length>>>0;return this.uint32(o),o&&this._push(st.writeBytesBuffer,o,n),this};function _p(u,n,o){u.length<40?It.utf8.write(u,n,o):n.utf8Write?n.utf8Write(u,o):n.write(u,o)}st.prototype.string=function(n){var o=It.Buffer.byteLength(n);return this.uint32(o),o&&this._push(_p,o,n),this};st._configure()});var yo=m((uv,Zu)=>{"use strict";Zu.exports=B;var at=Lt(),po,$u=at.LongBits,Ep=at.utf8;function ut(u,n){return RangeError("index out of range: "+u.pos+" + "+(n||1)+" > "+u.len)}function B(u){this.buf=u,this.pos=0,this.len=u.length}var zu=typeof Uint8Array<"u"?function(n){if(n instanceof Uint8Array||Array.isArray(n))return new B(n);throw Error("illegal buffer")}:function(n){if(Array.isArray(n))return new B(n);throw Error("illegal buffer")},Qu=function(){return at.Buffer?function(o){return(B.create=function(l){return at.Buffer.isBuffer(l)?new po(l):zu(l)})(o)}:zu};B.create=Qu();B.prototype._slice=at.Array.prototype.subarray||at.Array.prototype.slice;B.prototype.uint32=function(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,ut(this,10);return n}}();B.prototype.int32=function(){return this.uint32()|0};B.prototype.sint32=function(){var n=this.uint32();return n>>>1^-(n&1)|0};function fo(){var u=new $u(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return u;if(u.lo=(u.lo|(this.buf[this.pos]&127)<<28)>>>0,u.hi=(u.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return u;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw ut(this);if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,u}if(this.len-this.pos>4){for(;n<5;++n)if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}else for(;n<5;++n){if(this.pos>=this.len)throw ut(this);if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}B.prototype.bool=function(){return this.uint32()!==0};function kr(u,n){return(u[n-4]|u[n-3]<<8|u[n-2]<<16|u[n-1]<<24)>>>0}B.prototype.fixed32=function(){if(this.pos+4>this.len)throw ut(this,4);return kr(this.buf,this.pos+=4)};B.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ut(this,4);return kr(this.buf,this.pos+=4)|0};function Wu(){if(this.pos+8>this.len)throw ut(this,8);return new $u(kr(this.buf,this.pos+=4),kr(this.buf,this.pos+=4))}B.prototype.float=function(){if(this.pos+4>this.len)throw ut(this,4);var n=at.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};B.prototype.double=function(){if(this.pos+8>this.len)throw ut(this,4);var n=at.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};B.prototype.bytes=function(){var n=this.uint32(),o=this.pos,c=this.pos+n;if(c>this.len)throw ut(this,n);if(this.pos+=n,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var l=at.Buffer;return l?l.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};B.prototype.string=function(){var n=this.bytes();return Ep.read(n,0,n.length)};B.prototype.skip=function(n){if(typeof n=="number"){if(this.pos+n>this.len)throw ut(this,n);this.pos+=n}else do if(this.pos>=this.len)throw ut(this);while(this.buf[this.pos++]&128);return this};B.prototype.skipType=function(u){switch(u){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(u=this.uint32()&7)!==4;)this.skipType(u);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+u+" at offset "+this.pos)}return this};B._configure=function(u){po=u,B.create=Qu(),po._configure();var n=at.Long?"toLong":"toNumber";at.merge(B.prototype,{int64:function(){return fo.call(this)[n](!1)},uint64:function(){return fo.call(this)[n](!0)},sint64:function(){return fo.call(this).zzDecode()[n](!1)},fixed64:function(){return Wu.call(this)[n](!0)},sfixed64:function(){return Wu.call(this)[n](!1)}})}});var nl=m((lv,rl)=>{"use strict";rl.exports=Ht;var el=yo();(Ht.prototype=Object.create(el.prototype)).constructor=Ht;var tl=Lt();function Ht(u){el.call(this,u)}Ht._configure=function(){tl.Buffer&&(Ht.prototype._slice=tl.Buffer.prototype.slice)};Ht.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};Ht._configure()});var il=m((cv,ol)=>{"use strict";ol.exports=Pe;var ho=Lt();(Pe.prototype=Object.create(ho.EventEmitter.prototype)).constructor=Pe;function Pe(u,n,o){if(typeof u!="function")throw TypeError("rpcImpl must be a function");ho.EventEmitter.call(this),this.rpcImpl=u,this.requestDelimited=!!n,this.responseDelimited=!!o}Pe.prototype.rpcCall=function u(n,o,c,l,i){if(!l)throw TypeError("request must be specified");var e=this;if(!i)return ho.asPromise(u,e,n,o,c,l);if(!e.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return e.rpcImpl(n,o[e.requestDelimited?"encodeDelimited":"encode"](l).finish(),function(r,a){if(r)return e.emit("error",r,n),i(r);if(a===null){e.end(!0);return}if(!(a instanceof c))try{a=c[e.responseDelimited?"decodeDelimited":"decode"](a)}catch(s){return e.emit("error",s,n),i(s)}return e.emit("data",a,n),i(null,a)})}catch(t){e.emit("error",t,n),setTimeout(function(){i(t)},0);return}};Pe.prototype.end=function(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var ul=m(al=>{"use strict";var bp=al;bp.Service=il()});var cl=m((fv,ll)=>{"use strict";ll.exports={}});var pl=m(fl=>{"use strict";var K=fl;K.build="minimal";K.Writer=so();K.BufferWriter=Ju();K.Reader=yo();K.BufferReader=nl();K.util=Lt();K.rpc=ul();K.roots=cl();K.configure=sl;function sl(){K.util._configure(),K.Writer._configure(K.BufferWriter),K.Reader._configure(K.BufferReader)}sl()});var yl=m((dv,dl)=>{"use strict";dl.exports=pl()});var ml=m((yv,hl)=>{"use strict";var E=yl(),h=E.Reader,T=E.Writer,p=E.util,f=E.roots.default||(E.roots.default={});f.opentelemetry=function(){var u={};return u.proto=function(){var n={};return n.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.stringValue=null,l.prototype.boolValue=null,l.prototype.intValue=null,l.prototype.doubleValue=null,l.prototype.arrayValue=null,l.prototype.kvlistValue=null,l.prototype.bytesValue=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.stringValue!=null&&Object.hasOwnProperty.call(t,"stringValue")&&r.uint32(10).string(t.stringValue),t.boolValue!=null&&Object.hasOwnProperty.call(t,"boolValue")&&r.uint32(16).bool(t.boolValue),t.intValue!=null&&Object.hasOwnProperty.call(t,"intValue")&&r.uint32(24).int64(t.intValue),t.doubleValue!=null&&Object.hasOwnProperty.call(t,"doubleValue")&&r.uint32(33).double(t.doubleValue),t.arrayValue!=null&&Object.hasOwnProperty.call(t,"arrayValue")&&f.opentelemetry.proto.common.v1.ArrayValue.encode(t.arrayValue,r.uint32(42).fork()).ldelim(),t.kvlistValue!=null&&Object.hasOwnProperty.call(t,"kvlistValue")&&f.opentelemetry.proto.common.v1.KeyValueList.encode(t.kvlistValue,r.uint32(50).fork()).ldelim(),t.bytesValue!=null&&Object.hasOwnProperty.call(t,"bytesValue")&&r.uint32(58).bytes(t.bytesValue),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.common.v1.AnyValue;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.stringValue=t.string();break}case 2:{s.boolValue=t.bool();break}case 3:{s.intValue=t.int64();break}case 4:{s.doubleValue=t.double();break}case 5:{s.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.decode(t,t.uint32());break}case 6:{s.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.decode(t,t.uint32());break}case 7:{s.bytesValue=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(r.value=1,!p.isString(t.stringValue)))return"stringValue: string expected";if(t.boolValue!=null&&t.hasOwnProperty("boolValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.boolValue!="boolean")return"boolValue: boolean expected"}if(t.intValue!=null&&t.hasOwnProperty("intValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.intValue)&&!(t.intValue&&p.isInteger(t.intValue.low)&&p.isInteger(t.intValue.high)))return"intValue: integer|Long expected"}if(t.doubleValue!=null&&t.hasOwnProperty("doubleValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.doubleValue!="number")return"doubleValue: number expected"}if(t.arrayValue!=null&&t.hasOwnProperty("arrayValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.ArrayValue.verify(t.arrayValue);if(a)return"arrayValue."+a}}if(t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.KeyValueList.verify(t.kvlistValue);if(a)return"kvlistValue."+a}}if(t.bytesValue!=null&&t.hasOwnProperty("bytesValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!(t.bytesValue&&typeof t.bytesValue.length=="number"||p.isString(t.bytesValue)))return"bytesValue: buffer expected"}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.common.v1.AnyValue)return t;var r=new f.opentelemetry.proto.common.v1.AnyValue;if(t.stringValue!=null&&(r.stringValue=String(t.stringValue)),t.boolValue!=null&&(r.boolValue=!!t.boolValue),t.intValue!=null&&(p.Long?(r.intValue=p.Long.fromValue(t.intValue)).unsigned=!1:typeof t.intValue=="string"?r.intValue=parseInt(t.intValue,10):typeof t.intValue=="number"?r.intValue=t.intValue:typeof t.intValue=="object"&&(r.intValue=new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber())),t.doubleValue!=null&&(r.doubleValue=Number(t.doubleValue)),t.arrayValue!=null){if(typeof t.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");r.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.fromObject(t.arrayValue)}if(t.kvlistValue!=null){if(typeof t.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");r.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.fromObject(t.kvlistValue)}return t.bytesValue!=null&&(typeof t.bytesValue=="string"?p.base64.decode(t.bytesValue,r.bytesValue=p.newBuffer(p.base64.length(t.bytesValue)),0):t.bytesValue.length>=0&&(r.bytesValue=t.bytesValue)),r},l.toObject=function(t,r){r||(r={});var a={};return t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(a.stringValue=t.stringValue,r.oneofs&&(a.value="stringValue")),t.boolValue!=null&&t.hasOwnProperty("boolValue")&&(a.boolValue=t.boolValue,r.oneofs&&(a.value="boolValue")),t.intValue!=null&&t.hasOwnProperty("intValue")&&(typeof t.intValue=="number"?a.intValue=r.longs===String?String(t.intValue):t.intValue:a.intValue=r.longs===String?p.Long.prototype.toString.call(t.intValue):r.longs===Number?new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber():t.intValue,r.oneofs&&(a.value="intValue")),t.doubleValue!=null&&t.hasOwnProperty("doubleValue")&&(a.doubleValue=r.json&&!isFinite(t.doubleValue)?String(t.doubleValue):t.doubleValue,r.oneofs&&(a.value="doubleValue")),t.arrayValue!=null&&t.hasOwnProperty("arrayValue")&&(a.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.toObject(t.arrayValue,r),r.oneofs&&(a.value="arrayValue")),t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")&&(a.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.toObject(t.kvlistValue,r),r.oneofs&&(a.value="kvlistValue")),t.bytesValue!=null&&t.hasOwnProperty("bytesValue")&&(a.bytesValue=r.bytes===String?p.base64.encode(t.bytesValue,0,t.bytesValue.length):r.bytes===Array?Array.prototype.slice.call(t.bytesValue):t.bytesValue,r.oneofs&&(a.value="bytesValue")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.AnyValue"},l}(),c.ArrayValue=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.AnyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.ArrayValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.AnyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.ArrayValue)return e;var t=new f.opentelemetry.proto.common.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.ArrayValue"},l}(),c.KeyValueList=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValueList;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValueList)return e;var t=new f.opentelemetry.proto.common.v1.KeyValueList;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValueList"},l}(),c.KeyValue=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.key=null,l.prototype.value=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.value,t.uint32(18).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.key=e.string();break}case 2:{a.value=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.key!=null&&e.hasOwnProperty("key")&&!p.isString(e.key))return"key: string expected";if(e.value!=null&&e.hasOwnProperty("value")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.value);if(t)return"value."+t}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValue)return e;var t=new f.opentelemetry.proto.common.v1.KeyValue;if(e.key!=null&&(t.key=String(e.key)),e.value!=null){if(typeof e.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");t.value=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.value)}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.key="",r.value=null),e.key!=null&&e.hasOwnProperty("key")&&(r.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(r.value=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.value,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValue"},l}(),c.InstrumentationScope=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.name=null,l.prototype.version=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(18).string(e.version),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(32).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.InstrumentationScope;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.name=e.string();break}case 2:{a.version=e.string();break}case 3:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.version!=null&&e.hasOwnProperty("version")&&!p.isString(e.version))return"version: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.InstrumentationScope)return e;var t=new f.opentelemetry.proto.common.v1.InstrumentationScope;if(e.name!=null&&(t.name=String(e.name)),e.version!=null&&(t.version=String(e.version)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.name="",r.version="",r.droppedAttributesCount=0),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.version!=null&&e.hasOwnProperty("version")&&(r.version=e.version),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.InstrumentationScope"},l}(),c}(),o}(),n.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(16).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.resource.v1.Resource;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.resource.v1.Resource)return e;var t=new f.opentelemetry.proto.resource.v1.Resource;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.droppedAttributesCount=0),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.resource.v1.Resource"},l}(),c}(),o}(),n.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function l(i){if(this.resourceSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceSpans=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var r=0;r<e.resourceSpans.length;++r)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.TracesData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceSpans&&a.resourceSpans.length||(a.resourceSpans=[]),a.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var t=0;t<e.resourceSpans.length;++t){var r=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[t]);if(r)return"resourceSpans."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.TracesData)return e;var t=new f.opentelemetry.proto.trace.v1.TracesData;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");t.resourceSpans=[];for(var r=0;r<e.resourceSpans.length;++r){if(typeof e.resourceSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");t.resourceSpans[r]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){r.resourceSpans=[];for(var a=0;a<e.resourceSpans.length;++a)r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.TracesData"},l}(),c.ResourceSpans=function(){function l(i){if(this.scopeSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeSpans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(var r=0;r<e.scopeSpans.length;++r)f.opentelemetry.proto.trace.v1.ScopeSpans.encode(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ResourceSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeSpans&&a.scopeSpans.length||(a.scopeSpans=[]),a.scopeSpans.push(f.opentelemetry.proto.trace.v1.ScopeSpans.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeSpans!=null&&e.hasOwnProperty("scopeSpans")){if(!Array.isArray(e.scopeSpans))return"scopeSpans: array expected";for(var r=0;r<e.scopeSpans.length;++r){var t=f.opentelemetry.proto.trace.v1.ScopeSpans.verify(e.scopeSpans[r]);if(t)return"scopeSpans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ResourceSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ResourceSpans;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeSpans){if(!Array.isArray(e.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");t.scopeSpans=[];for(var r=0;r<e.scopeSpans.length;++r){if(typeof e.scopeSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");t.scopeSpans[r]=f.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(e.scopeSpans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeSpans=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeSpans&&e.scopeSpans.length){r.scopeSpans=[];for(var a=0;a<e.scopeSpans.length;++a)r.scopeSpans[a]=f.opentelemetry.proto.trace.v1.ScopeSpans.toObject(e.scopeSpans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ResourceSpans"},l}(),c.ScopeSpans=function(){function l(i){if(this.spans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.spans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(var r=0;r<e.spans.length;++r)f.opentelemetry.proto.trace.v1.Span.encode(e.spans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ScopeSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.spans&&a.spans.length||(a.spans=[]),a.spans.push(f.opentelemetry.proto.trace.v1.Span.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.spans!=null&&e.hasOwnProperty("spans")){if(!Array.isArray(e.spans))return"spans: array expected";for(var r=0;r<e.spans.length;++r){var t=f.opentelemetry.proto.trace.v1.Span.verify(e.spans[r]);if(t)return"spans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ScopeSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ScopeSpans;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.spans){if(!Array.isArray(e.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");t.spans=[];for(var r=0;r<e.spans.length;++r){if(typeof e.spans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");t.spans[r]=f.opentelemetry.proto.trace.v1.Span.fromObject(e.spans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.spans=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.spans&&e.spans.length){r.spans=[];for(var a=0;a<e.spans.length;++a)r.spans[a]=f.opentelemetry.proto.trace.v1.Span.toObject(e.spans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ScopeSpans"},l}(),c.Span=function(){function l(i){if(this.attributes=[],this.events=[],this.links=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.traceId=null,l.prototype.spanId=null,l.prototype.traceState=null,l.prototype.parentSpanId=null,l.prototype.name=null,l.prototype.kind=null,l.prototype.startTimeUnixNano=null,l.prototype.endTimeUnixNano=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.events=p.emptyArray,l.prototype.droppedEventsCount=null,l.prototype.links=p.emptyArray,l.prototype.droppedLinksCount=null,l.prototype.status=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&t.uint32(26).string(e.traceState),e.parentSpanId!=null&&Object.hasOwnProperty.call(e,"parentSpanId")&&t.uint32(34).bytes(e.parentSpanId),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(42).string(e.name),e.kind!=null&&Object.hasOwnProperty.call(e,"kind")&&t.uint32(48).int32(e.kind),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(57).fixed64(e.startTimeUnixNano),e.endTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"endTimeUnixNano")&&t.uint32(65).fixed64(e.endTimeUnixNano),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(74).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(80).uint32(e.droppedAttributesCount),e.events!=null&&e.events.length)for(var r=0;r<e.events.length;++r)f.opentelemetry.proto.trace.v1.Span.Event.encode(e.events[r],t.uint32(90).fork()).ldelim();if(e.droppedEventsCount!=null&&Object.hasOwnProperty.call(e,"droppedEventsCount")&&t.uint32(96).uint32(e.droppedEventsCount),e.links!=null&&e.links.length)for(var r=0;r<e.links.length;++r)f.opentelemetry.proto.trace.v1.Span.Link.encode(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&Object.hasOwnProperty.call(e,"droppedLinksCount")&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&Object.hasOwnProperty.call(e,"status")&&f.opentelemetry.proto.trace.v1.Status.encode(e.status,t.uint32(122).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Span;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.traceId=e.bytes();break}case 2:{a.spanId=e.bytes();break}case 3:{a.traceState=e.string();break}case 4:{a.parentSpanId=e.bytes();break}case 5:{a.name=e.string();break}case 6:{a.kind=e.int32();break}case 7:{a.startTimeUnixNano=e.fixed64();break}case 8:{a.endTimeUnixNano=e.fixed64();break}case 9:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 10:{a.droppedAttributesCount=e.uint32();break}case 11:{a.events&&a.events.length||(a.events=[]),a.events.push(f.opentelemetry.proto.trace.v1.Span.Event.decode(e,e.uint32()));break}case 12:{a.droppedEventsCount=e.uint32();break}case 13:{a.links&&a.links.length||(a.links=[]),a.links.push(f.opentelemetry.proto.trace.v1.Span.Link.decode(e,e.uint32()));break}case 14:{a.droppedLinksCount=e.uint32();break}case 15:{a.status=f.opentelemetry.proto.trace.v1.Status.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||p.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!p.isString(e.traceState))return"traceState: string expected";if(e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&!(e.parentSpanId&&typeof e.parentSpanId.length=="number"||p.isString(e.parentSpanId)))return"parentSpanId: buffer expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.kind!=null&&e.hasOwnProperty("kind"))switch(e.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&!p.isInteger(e.endTimeUnixNano)&&!(e.endTimeUnixNano&&p.isInteger(e.endTimeUnixNano.low)&&p.isInteger(e.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(e.events!=null&&e.hasOwnProperty("events")){if(!Array.isArray(e.events))return"events: array expected";for(var t=0;t<e.events.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Event.verify(e.events[t]);if(r)return"events."+r}}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&!p.isInteger(e.droppedEventsCount))return"droppedEventsCount: integer expected";if(e.links!=null&&e.hasOwnProperty("links")){if(!Array.isArray(e.links))return"links: array expected";for(var t=0;t<e.links.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Link.verify(e.links[t]);if(r)return"links."+r}}if(e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&!p.isInteger(e.droppedLinksCount))return"droppedLinksCount: integer expected";if(e.status!=null&&e.hasOwnProperty("status")){var r=f.opentelemetry.proto.trace.v1.Status.verify(e.status);if(r)return"status."+r}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Span)return e;var t=new f.opentelemetry.proto.trace.v1.Span;switch(e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),e.traceState!=null&&(t.traceState=String(e.traceState)),e.parentSpanId!=null&&(typeof e.parentSpanId=="string"?p.base64.decode(e.parentSpanId,t.parentSpanId=p.newBuffer(p.base64.length(e.parentSpanId)),0):e.parentSpanId.length>=0&&(t.parentSpanId=e.parentSpanId)),e.name!=null&&(t.name=String(e.name)),e.kind){default:if(typeof e.kind=="number"){t.kind=e.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:t.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:t.kind=1;break;case"SPAN_KIND_SERVER":case 2:t.kind=2;break;case"SPAN_KIND_CLIENT":case 3:t.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:t.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:t.kind=5;break}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.endTimeUnixNano!=null&&(p.Long?(t.endTimeUnixNano=p.Long.fromValue(e.endTimeUnixNano)).unsigned=!1:typeof e.endTimeUnixNano=="string"?t.endTimeUnixNano=parseInt(e.endTimeUnixNano,10):typeof e.endTimeUnixNano=="number"?t.endTimeUnixNano=e.endTimeUnixNano:typeof e.endTimeUnixNano=="object"&&(t.endTimeUnixNano=new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber())),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.events){if(!Array.isArray(e.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");t.events=[];for(var r=0;r<e.events.length;++r){if(typeof e.events[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");t.events[r]=f.opentelemetry.proto.trace.v1.Span.Event.fromObject(e.events[r])}}if(e.droppedEventsCount!=null&&(t.droppedEventsCount=e.droppedEventsCount>>>0),e.links){if(!Array.isArray(e.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");t.links=[];for(var r=0;r<e.links.length;++r){if(typeof e.links[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");t.links[r]=f.opentelemetry.proto.trace.v1.Span.Link.fromObject(e.links[r])}}if(e.droppedLinksCount!=null&&(t.droppedLinksCount=e.droppedLinksCount>>>0),e.status!=null){if(typeof e.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");t.status=f.opentelemetry.proto.trace.v1.Status.fromObject(e.status)}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[],r.events=[],r.links=[]),t.defaults){if(t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),r.traceState="",t.bytes===String?r.parentSpanId="":(r.parentSpanId=[],t.bytes!==Array&&(r.parentSpanId=p.newBuffer(r.parentSpanId))),r.name="",r.kind=t.enums===String?"SPAN_KIND_UNSPECIFIED":0,p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.endTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.endTimeUnixNano=t.longs===String?"0":0;r.droppedAttributesCount=0,r.droppedEventsCount=0,r.droppedLinksCount=0,r.status=null}if(e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(r.traceState=e.traceState),e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&(r.parentSpanId=t.bytes===String?p.base64.encode(e.parentSpanId,0,e.parentSpanId.length):t.bytes===Array?Array.prototype.slice.call(e.parentSpanId):e.parentSpanId),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.kind!=null&&e.hasOwnProperty("kind")&&(r.kind=t.enums===String?f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]===void 0?e.kind:f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]:e.kind),e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&(typeof e.endTimeUnixNano=="number"?r.endTimeUnixNano=t.longs===String?String(e.endTimeUnixNano):e.endTimeUnixNano:r.endTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.endTimeUnixNano):t.longs===Number?new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber():e.endTimeUnixNano),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.events&&e.events.length){r.events=[];for(var s=0;s<e.events.length;++s)r.events[s]=f.opentelemetry.proto.trace.v1.Span.Event.toObject(e.events[s],t)}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&(r.droppedEventsCount=e.droppedEventsCount),e.links&&e.links.length){r.links=[];for(var s=0;s<e.links.length;++s)r.links[s]=f.opentelemetry.proto.trace.v1.Span.Link.toObject(e.links[s],t)}return e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&(r.droppedLinksCount=e.droppedLinksCount),e.status!=null&&e.hasOwnProperty("status")&&(r.status=f.opentelemetry.proto.trace.v1.Status.toObject(e.status,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span"},l.SpanKind=function(){var i={},e=Object.create(i);return e[i[0]="SPAN_KIND_UNSPECIFIED"]=0,e[i[1]="SPAN_KIND_INTERNAL"]=1,e[i[2]="SPAN_KIND_SERVER"]=2,e[i[3]="SPAN_KIND_CLIENT"]=3,e[i[4]="SPAN_KIND_PRODUCER"]=4,e[i[5]="SPAN_KIND_CONSUMER"]=5,e}(),l.Event=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.timeUnixNano=null,i.prototype.name=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(9).fixed64(t.timeUnixNano),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(18).string(t.name),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(32).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Event;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 2:{s.name=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Event)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Event;if(t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.name!=null&&(r.name=String(t.name)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.name="",a.droppedAttributesCount=0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Event"},i}(),l.Link=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&r.uint32(26).string(t.traceState),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(34).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(40).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Link;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 5:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||p.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!p.isString(t.traceState))return"traceState: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Link)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Link;if(t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceState!=null&&(r.traceState=String(t.traceState)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults&&(r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId))),r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),a.traceState="",a.droppedAttributesCount=0),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(a.traceState=t.traceState),t.attributes&&t.attributes.length){a.attributes=[];for(var s=0;s<t.attributes.length;++s)a.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Link"},i}(),l}(),c.Status=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.message=null,l.prototype.code=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.message!=null&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&t.uint32(24).int32(e.code),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Status;e.pos<r;){var s=e.uint32();switch(s>>>3){case 2:{a.message=e.string();break}case 3:{a.code=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.message!=null&&e.hasOwnProperty("message")&&!p.isString(e.message))return"message: string expected";if(e.code!=null&&e.hasOwnProperty("code"))switch(e.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Status)return e;var t=new f.opentelemetry.proto.trace.v1.Status;switch(e.message!=null&&(t.message=String(e.message)),e.code){default:if(typeof e.code=="number"){t.code=e.code;break}break;case"STATUS_CODE_UNSET":case 0:t.code=0;break;case"STATUS_CODE_OK":case 1:t.code=1;break;case"STATUS_CODE_ERROR":case 2:t.code=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.message="",r.code=t.enums===String?"STATUS_CODE_UNSET":0),e.message!=null&&e.hasOwnProperty("message")&&(r.message=e.message),e.code!=null&&e.hasOwnProperty("code")&&(r.code=t.enums===String?f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]===void 0?e.code:f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]:e.code),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Status"},l.StatusCode=function(){var i={},e=Object.create(i);return e[i[0]="STATUS_CODE_UNSET"]=0,e[i[1]="STATUS_CODE_OK"]=1,e[i[2]="STATUS_CODE_ERROR"]=2,e}(),l}(),c}(),o}(),n.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var l={};return l.TraceService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportTraceServiceRequest=function(){function i(e){if(this.resourceSpans=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceSpans=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var a=0;a<t.resourceSpans.length;++a)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var r=0;r<t.resourceSpans.length;++r){var a=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[r]);if(a)return"resourceSpans."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");r.resourceSpans=[];for(var a=0;a<t.resourceSpans.length;++a){if(typeof t.resourceSpans[a]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){a.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)a.resourceSpans[s]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},i}(),l.ExportTraceServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},i}(),l.ExportTracePartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedSpans=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedSpans!=null&&Object.hasOwnProperty.call(t,"rejectedSpans")&&r.uint32(8).int64(t.rejectedSpans),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedSpans=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&!p.isInteger(t.rejectedSpans)&&!(t.rejectedSpans&&p.isInteger(t.rejectedSpans.low)&&p.isInteger(t.rejectedSpans.high))?"rejectedSpans: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return t.rejectedSpans!=null&&(p.Long?(r.rejectedSpans=p.Long.fromValue(t.rejectedSpans)).unsigned=!1:typeof t.rejectedSpans=="string"?r.rejectedSpans=parseInt(t.rejectedSpans,10):typeof t.rejectedSpans=="number"?r.rejectedSpans=t.rejectedSpans:typeof t.rejectedSpans=="object"&&(r.rejectedSpans=new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedSpans=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedSpans=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&(typeof t.rejectedSpans=="number"?a.rejectedSpans=r.longs===String?String(t.rejectedSpans):t.rejectedSpans:a.rejectedSpans=r.longs===String?p.Long.prototype.toString.call(t.rejectedSpans):r.longs===Number?new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber():t.rejectedSpans),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},i}(),l}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var l={};return l.MetricsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportMetricsServiceRequest=function(){function i(e){if(this.resourceMetrics=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceMetrics=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var a=0;a<t.resourceMetrics.length;++a)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var r=0;r<t.resourceMetrics.length;++r){var a=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[r]);if(a)return"resourceMetrics."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");r.resourceMetrics=[];for(var a=0;a<t.resourceMetrics.length;++a){if(typeof t.resourceMetrics[a]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){a.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)a.resourceMetrics[s]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},i}(),l.ExportMetricsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},i}(),l.ExportMetricsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedDataPoints=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedDataPoints!=null&&Object.hasOwnProperty.call(t,"rejectedDataPoints")&&r.uint32(8).int64(t.rejectedDataPoints),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedDataPoints=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&!p.isInteger(t.rejectedDataPoints)&&!(t.rejectedDataPoints&&p.isInteger(t.rejectedDataPoints.low)&&p.isInteger(t.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return t.rejectedDataPoints!=null&&(p.Long?(r.rejectedDataPoints=p.Long.fromValue(t.rejectedDataPoints)).unsigned=!1:typeof t.rejectedDataPoints=="string"?r.rejectedDataPoints=parseInt(t.rejectedDataPoints,10):typeof t.rejectedDataPoints=="number"?r.rejectedDataPoints=t.rejectedDataPoints:typeof t.rejectedDataPoints=="object"&&(r.rejectedDataPoints=new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedDataPoints=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedDataPoints=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&(typeof t.rejectedDataPoints=="number"?a.rejectedDataPoints=r.longs===String?String(t.rejectedDataPoints):t.rejectedDataPoints:a.rejectedDataPoints=r.longs===String?p.Long.prototype.toString.call(t.rejectedDataPoints):r.longs===Number?new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber():t.rejectedDataPoints),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},i}(),l}(),c}(),o.logs=function(){var c={};return c.v1=function(){var l={};return l.LogsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportLogsServiceRequest=function(){function i(e){if(this.resourceLogs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceLogs=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var a=0;a<t.resourceLogs.length;++a)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var r=0;r<t.resourceLogs.length;++r){var a=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[r]);if(a)return"resourceLogs."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");r.resourceLogs=[];for(var a=0;a<t.resourceLogs.length;++a){if(typeof t.resourceLogs[a]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){a.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)a.resourceLogs[s]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},i}(),l.ExportLogsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},i}(),l.ExportLogsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedLogRecords=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedLogRecords!=null&&Object.hasOwnProperty.call(t,"rejectedLogRecords")&&r.uint32(8).int64(t.rejectedLogRecords),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedLogRecords=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&!p.isInteger(t.rejectedLogRecords)&&!(t.rejectedLogRecords&&p.isInteger(t.rejectedLogRecords.low)&&p.isInteger(t.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return t.rejectedLogRecords!=null&&(p.Long?(r.rejectedLogRecords=p.Long.fromValue(t.rejectedLogRecords)).unsigned=!1:typeof t.rejectedLogRecords=="string"?r.rejectedLogRecords=parseInt(t.rejectedLogRecords,10):typeof t.rejectedLogRecords=="number"?r.rejectedLogRecords=t.rejectedLogRecords:typeof t.rejectedLogRecords=="object"&&(r.rejectedLogRecords=new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedLogRecords=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedLogRecords=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&(typeof t.rejectedLogRecords=="number"?a.rejectedLogRecords=r.longs===String?String(t.rejectedLogRecords):t.rejectedLogRecords:a.rejectedLogRecords=r.longs===String?p.Long.prototype.toString.call(t.rejectedLogRecords):r.longs===Number?new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber():t.rejectedLogRecords),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},i}(),l}(),c}(),o}(),n.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function l(i){if(this.resourceMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceMetrics=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var r=0;r<e.resourceMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.MetricsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceMetrics&&a.resourceMetrics.length||(a.resourceMetrics=[]),a.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var t=0;t<e.resourceMetrics.length;++t){var r=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[t]);if(r)return"resourceMetrics."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.MetricsData)return e;var t=new f.opentelemetry.proto.metrics.v1.MetricsData;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");t.resourceMetrics=[];for(var r=0;r<e.resourceMetrics.length;++r){if(typeof e.resourceMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");t.resourceMetrics[r]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){r.resourceMetrics=[];for(var a=0;a<e.resourceMetrics.length;++a)r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.MetricsData"},l}(),c.ResourceMetrics=function(){function l(i){if(this.scopeMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeMetrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeMetrics!=null&&e.scopeMetrics.length)for(var r=0;r<e.scopeMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(e.scopeMetrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeMetrics&&a.scopeMetrics.length||(a.scopeMetrics=[]),a.scopeMetrics.push(f.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeMetrics!=null&&e.hasOwnProperty("scopeMetrics")){if(!Array.isArray(e.scopeMetrics))return"scopeMetrics: array expected";for(var r=0;r<e.scopeMetrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(e.scopeMetrics[r]);if(t)return"scopeMetrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ResourceMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeMetrics){if(!Array.isArray(e.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");t.scopeMetrics=[];for(var r=0;r<e.scopeMetrics.length;++r){if(typeof e.scopeMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");t.scopeMetrics[r]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(e.scopeMetrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeMetrics=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeMetrics&&e.scopeMetrics.length){r.scopeMetrics=[];for(var a=0;a<e.scopeMetrics.length;++a)r.scopeMetrics[a]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(e.scopeMetrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},l}(),c.ScopeMetrics=function(){function l(i){if(this.metrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.metrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.metrics!=null&&e.metrics.length)for(var r=0;r<e.metrics.length;++r)f.opentelemetry.proto.metrics.v1.Metric.encode(e.metrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.metrics&&a.metrics.length||(a.metrics=[]),a.metrics.push(f.opentelemetry.proto.metrics.v1.Metric.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.metrics!=null&&e.hasOwnProperty("metrics")){if(!Array.isArray(e.metrics))return"metrics: array expected";for(var r=0;r<e.metrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.Metric.verify(e.metrics[r]);if(t)return"metrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ScopeMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.metrics){if(!Array.isArray(e.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");t.metrics=[];for(var r=0;r<e.metrics.length;++r){if(typeof e.metrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");t.metrics[r]=f.opentelemetry.proto.metrics.v1.Metric.fromObject(e.metrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.metrics=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.metrics&&e.metrics.length){r.metrics=[];for(var a=0;a<e.metrics.length;++a)r.metrics[a]=f.opentelemetry.proto.metrics.v1.Metric.toObject(e.metrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},l}(),c.Metric=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.name=null,l.prototype.description=null,l.prototype.unit=null,l.prototype.gauge=null,l.prototype.sum=null,l.prototype.histogram=null,l.prototype.exponentialHistogram=null,l.prototype.summary=null;var i;return Object.defineProperty(l.prototype,"data",{get:p.oneOfGetter(i=["gauge","sum","histogram","exponentialHistogram","summary"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(10).string(t.name),t.description!=null&&Object.hasOwnProperty.call(t,"description")&&r.uint32(18).string(t.description),t.unit!=null&&Object.hasOwnProperty.call(t,"unit")&&r.uint32(26).string(t.unit),t.gauge!=null&&Object.hasOwnProperty.call(t,"gauge")&&f.opentelemetry.proto.metrics.v1.Gauge.encode(t.gauge,r.uint32(42).fork()).ldelim(),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&f.opentelemetry.proto.metrics.v1.Sum.encode(t.sum,r.uint32(58).fork()).ldelim(),t.histogram!=null&&Object.hasOwnProperty.call(t,"histogram")&&f.opentelemetry.proto.metrics.v1.Histogram.encode(t.histogram,r.uint32(74).fork()).ldelim(),t.exponentialHistogram!=null&&Object.hasOwnProperty.call(t,"exponentialHistogram")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(t.exponentialHistogram,r.uint32(82).fork()).ldelim(),t.summary!=null&&Object.hasOwnProperty.call(t,"summary")&&f.opentelemetry.proto.metrics.v1.Summary.encode(t.summary,r.uint32(90).fork()).ldelim(),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Metric;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.name=t.string();break}case 2:{s.description=t.string();break}case 3:{s.unit=t.string();break}case 5:{s.gauge=f.opentelemetry.proto.metrics.v1.Gauge.decode(t,t.uint32());break}case 7:{s.sum=f.opentelemetry.proto.metrics.v1.Sum.decode(t,t.uint32());break}case 9:{s.histogram=f.opentelemetry.proto.metrics.v1.Histogram.decode(t,t.uint32());break}case 10:{s.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(t,t.uint32());break}case 11:{s.summary=f.opentelemetry.proto.metrics.v1.Summary.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.description!=null&&t.hasOwnProperty("description")&&!p.isString(t.description))return"description: string expected";if(t.unit!=null&&t.hasOwnProperty("unit")&&!p.isString(t.unit))return"unit: string expected";if(t.gauge!=null&&t.hasOwnProperty("gauge")){r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Gauge.verify(t.gauge);if(a)return"gauge."+a}}if(t.sum!=null&&t.hasOwnProperty("sum")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Sum.verify(t.sum);if(a)return"sum."+a}}if(t.histogram!=null&&t.hasOwnProperty("histogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Histogram.verify(t.histogram);if(a)return"histogram."+a}}if(t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(t.exponentialHistogram);if(a)return"exponentialHistogram."+a}}if(t.summary!=null&&t.hasOwnProperty("summary")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Summary.verify(t.summary);if(a)return"summary."+a}}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Metric)return t;var r=new f.opentelemetry.proto.metrics.v1.Metric;if(t.name!=null&&(r.name=String(t.name)),t.description!=null&&(r.description=String(t.description)),t.unit!=null&&(r.unit=String(t.unit)),t.gauge!=null){if(typeof t.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");r.gauge=f.opentelemetry.proto.metrics.v1.Gauge.fromObject(t.gauge)}if(t.sum!=null){if(typeof t.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");r.sum=f.opentelemetry.proto.metrics.v1.Sum.fromObject(t.sum)}if(t.histogram!=null){if(typeof t.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");r.histogram=f.opentelemetry.proto.metrics.v1.Histogram.fromObject(t.histogram)}if(t.exponentialHistogram!=null){if(typeof t.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");r.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(t.exponentialHistogram)}if(t.summary!=null){if(typeof t.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");r.summary=f.opentelemetry.proto.metrics.v1.Summary.fromObject(t.summary)}return r},l.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.name="",a.description="",a.unit=""),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.description!=null&&t.hasOwnProperty("description")&&(a.description=t.description),t.unit!=null&&t.hasOwnProperty("unit")&&(a.unit=t.unit),t.gauge!=null&&t.hasOwnProperty("gauge")&&(a.gauge=f.opentelemetry.proto.metrics.v1.Gauge.toObject(t.gauge,r),r.oneofs&&(a.data="gauge")),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=f.opentelemetry.proto.metrics.v1.Sum.toObject(t.sum,r),r.oneofs&&(a.data="sum")),t.histogram!=null&&t.hasOwnProperty("histogram")&&(a.histogram=f.opentelemetry.proto.metrics.v1.Histogram.toObject(t.histogram,r),r.oneofs&&(a.data="histogram")),t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")&&(a.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(t.exponentialHistogram,r),r.oneofs&&(a.data="exponentialHistogram")),t.summary!=null&&t.hasOwnProperty("summary")&&(a.summary=f.opentelemetry.proto.metrics.v1.Summary.toObject(t.summary,r),r.oneofs&&(a.data="summary")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Metric"},l}(),c.Gauge=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Gauge;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Gauge)return e;var t=new f.opentelemetry.proto.metrics.v1.Gauge;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Gauge"},l}(),c.Sum=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.prototype.isMonotonic=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),e.isMonotonic!=null&&Object.hasOwnProperty.call(e,"isMonotonic")&&t.uint32(24).bool(e.isMonotonic),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Sum;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}case 3:{a.isMonotonic=e.bool();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&typeof e.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Sum)return e;var t=new f.opentelemetry.proto.metrics.v1.Sum;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return e.isMonotonic!=null&&(t.isMonotonic=!!e.isMonotonic),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,r.isMonotonic=!1),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&(r.isMonotonic=e.isMonotonic),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Sum"},l}(),c.Histogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Histogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Histogram)return e;var t=new f.opentelemetry.proto.metrics.v1.Histogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Histogram"},l}(),c.ExponentialHistogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogram)return e;var t=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},l}(),c.Summary=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Summary;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Summary)return e;var t=new f.opentelemetry.proto.metrics.v1.Summary;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Summary"},l}(),c.AggregationTemporality=function(){var l={},i=Object.create(l);return i[l[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,i[l[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,i[l[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,i}(),c.DataPointFlags=function(){var l={},i=Object.create(l);return i[l[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,i[l[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,i}(),c.NumberDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(33).double(t.asDouble),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(42).fork()).ldelim();if(t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(64).uint32(t.flags),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 5:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.NumberDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},l}(),c.HistogramDataPoint=function(){function l(e){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.bucketCounts=p.emptyArray,l.prototype.explicitBounds=p.emptyArray,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null,l.prototype.min=null,l.prototype.max=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.bucketCounts!=null&&t.bucketCounts.length){r.uint32(50).fork();for(var a=0;a<t.bucketCounts.length;++a)r.fixed64(t.bucketCounts[a]);r.ldelim()}if(t.explicitBounds!=null&&t.explicitBounds.length){r.uint32(58).fork();for(var a=0;a<t.explicitBounds.length;++a)r.double(t.explicitBounds[a]);r.ldelim()}if(t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(66).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(74).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(89).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(97).double(t.max),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{if(s.bucketCounts&&s.bucketCounts.length||(s.bucketCounts=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.bucketCounts.push(t.fixed64());else s.bucketCounts.push(t.fixed64());break}case 7:{if(s.explicitBounds&&s.explicitBounds.length||(s.explicitBounds=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.explicitBounds.push(t.double());else s.explicitBounds.push(t.double());break}case 8:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 10:{s.flags=t.uint32();break}case 11:{s.min=t.double();break}case 12:{s.max=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.bucketCounts!=null&&t.hasOwnProperty("bucketCounts")){if(!Array.isArray(t.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<t.bucketCounts.length;++a)if(!p.isInteger(t.bucketCounts[a])&&!(t.bucketCounts[a]&&p.isInteger(t.bucketCounts[a].low)&&p.isInteger(t.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}if(t.explicitBounds!=null&&t.hasOwnProperty("explicitBounds")){if(!Array.isArray(t.explicitBounds))return"explicitBounds: array expected";for(var a=0;a<t.explicitBounds.length;++a)if(typeof t.explicitBounds[a]!="number")return"explicitBounds: number[] expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.HistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.bucketCounts){if(!Array.isArray(t.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");r.bucketCounts=[];for(var a=0;a<t.bucketCounts.length;++a)p.Long?(r.bucketCounts[a]=p.Long.fromValue(t.bucketCounts[a])).unsigned=!1:typeof t.bucketCounts[a]=="string"?r.bucketCounts[a]=parseInt(t.bucketCounts[a],10):typeof t.bucketCounts[a]=="number"?r.bucketCounts[a]=t.bucketCounts[a]:typeof t.bucketCounts[a]=="object"&&(r.bucketCounts[a]=new p.LongBits(t.bucketCounts[a].low>>>0,t.bucketCounts[a].high>>>0).toNumber())}if(t.explicitBounds){if(!Array.isArray(t.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");r.explicitBounds=[];for(var a=0;a<t.explicitBounds.length;++a)r.explicitBounds[a]=Number(t.explicitBounds[a])}if(t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.bucketCounts=[],a.explicitBounds=[],a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.bucketCounts&&t.bucketCounts.length){a.bucketCounts=[];for(var d=0;d<t.bucketCounts.length;++d)typeof t.bucketCounts[d]=="number"?a.bucketCounts[d]=r.longs===String?String(t.bucketCounts[d]):t.bucketCounts[d]:a.bucketCounts[d]=r.longs===String?p.Long.prototype.toString.call(t.bucketCounts[d]):r.longs===Number?new p.LongBits(t.bucketCounts[d].low>>>0,t.bucketCounts[d].high>>>0).toNumber():t.bucketCounts[d]}if(t.explicitBounds&&t.explicitBounds.length){a.explicitBounds=[];for(var d=0;d<t.explicitBounds.length;++d)a.explicitBounds[d]=r.json&&!isFinite(t.explicitBounds[d])?String(t.explicitBounds[d]):t.explicitBounds[d]}if(t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},l}(),c.ExponentialHistogramDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.scale=null,l.prototype.zeroCount=null,l.prototype.positive=null,l.prototype.negative=null,l.prototype.flags=null,l.prototype.exemplars=p.emptyArray,l.prototype.min=null,l.prototype.max=null,l.prototype.zeroThreshold=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(10).fork()).ldelim();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.scale!=null&&Object.hasOwnProperty.call(t,"scale")&&r.uint32(48).sint32(t.scale),t.zeroCount!=null&&Object.hasOwnProperty.call(t,"zeroCount")&&r.uint32(57).fixed64(t.zeroCount),t.positive!=null&&Object.hasOwnProperty.call(t,"positive")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.positive,r.uint32(66).fork()).ldelim(),t.negative!=null&&Object.hasOwnProperty.call(t,"negative")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.negative,r.uint32(74).fork()).ldelim(),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(90).fork()).ldelim();return t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(97).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(105).double(t.max),t.zeroThreshold!=null&&Object.hasOwnProperty.call(t,"zeroThreshold")&&r.uint32(113).double(t.zeroThreshold),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.scale=t.sint32();break}case 7:{s.zeroCount=t.fixed64();break}case 8:{s.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 9:{s.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 10:{s.flags=t.uint32();break}case 11:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 12:{s.min=t.double();break}case 13:{s.max=t.double();break}case 14:{s.zeroThreshold=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.scale!=null&&t.hasOwnProperty("scale")&&!p.isInteger(t.scale))return"scale: integer expected";if(t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&!p.isInteger(t.zeroCount)&&!(t.zeroCount&&p.isInteger(t.zeroCount.low)&&p.isInteger(t.zeroCount.high)))return"zeroCount: integer|Long expected";if(t.positive!=null&&t.hasOwnProperty("positive")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.positive);if(s)return"positive."+s}if(t.negative!=null&&t.hasOwnProperty("negative")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.negative);if(s)return"negative."+s}if(t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags))return"flags: integer expected";if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&typeof t.zeroThreshold!="number"?"zeroThreshold: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.scale!=null&&(r.scale=t.scale|0),t.zeroCount!=null&&(p.Long?(r.zeroCount=p.Long.fromValue(t.zeroCount)).unsigned=!1:typeof t.zeroCount=="string"?r.zeroCount=parseInt(t.zeroCount,10):typeof t.zeroCount=="number"?r.zeroCount=t.zeroCount:typeof t.zeroCount=="object"&&(r.zeroCount=new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber())),t.positive!=null){if(typeof t.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");r.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.positive)}if(t.negative!=null){if(typeof t.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");r.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.negative)}if(t.flags!=null&&(r.flags=t.flags>>>0),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),t.zeroThreshold!=null&&(r.zeroThreshold=Number(t.zeroThreshold)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[],a.exemplars=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;if(a.scale=0,p.Long){var s=new p.Long(0,0,!1);a.zeroCount=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.zeroCount=r.longs===String?"0":0;a.positive=null,a.negative=null,a.flags=0,a.zeroThreshold=0}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.scale!=null&&t.hasOwnProperty("scale")&&(a.scale=t.scale),t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&(typeof t.zeroCount=="number"?a.zeroCount=r.longs===String?String(t.zeroCount):t.zeroCount:a.zeroCount=r.longs===String?p.Long.prototype.toString.call(t.zeroCount):r.longs===Number?new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber():t.zeroCount),t.positive!=null&&t.hasOwnProperty("positive")&&(a.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.positive,r)),t.negative!=null&&t.hasOwnProperty("negative")&&(a.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.negative,r)),t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}return t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&(a.zeroThreshold=r.json&&!isFinite(t.zeroThreshold)?String(t.zeroThreshold):t.zeroThreshold),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},l.Buckets=function(){function e(t){if(this.bucketCounts=[],t)for(var r=Object.keys(t),a=0;a<r.length;++a)t[r[a]]!=null&&(this[r[a]]=t[r[a]])}return e.prototype.offset=null,e.prototype.bucketCounts=p.emptyArray,e.create=function(r){return new e(r)},e.encode=function(r,a){if(a||(a=T.create()),r.offset!=null&&Object.hasOwnProperty.call(r,"offset")&&a.uint32(8).sint32(r.offset),r.bucketCounts!=null&&r.bucketCounts.length){a.uint32(18).fork();for(var s=0;s<r.bucketCounts.length;++s)a.uint64(r.bucketCounts[s]);a.ldelim()}return a},e.encodeDelimited=function(r,a){return this.encode(r,a).ldelim()},e.decode=function(r,a){r instanceof h||(r=h.create(r));for(var s=a===void 0?r.len:r.pos+a,d=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;r.pos<s;){var v=r.uint32();switch(v>>>3){case 1:{d.offset=r.sint32();break}case 2:{if(d.bucketCounts&&d.bucketCounts.length||(d.bucketCounts=[]),(v&7)===2)for(var S=r.uint32()+r.pos;r.pos<S;)d.bucketCounts.push(r.uint64());else d.bucketCounts.push(r.uint64());break}default:r.skipType(v&7);break}}return d},e.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},e.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.offset!=null&&r.hasOwnProperty("offset")&&!p.isInteger(r.offset))return"offset: integer expected";if(r.bucketCounts!=null&&r.hasOwnProperty("bucketCounts")){if(!Array.isArray(r.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<r.bucketCounts.length;++a)if(!p.isInteger(r.bucketCounts[a])&&!(r.bucketCounts[a]&&p.isInteger(r.bucketCounts[a].low)&&p.isInteger(r.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}return null},e.fromObject=function(r){if(r instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return r;var a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(r.offset!=null&&(a.offset=r.offset|0),r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");a.bucketCounts=[];for(var s=0;s<r.bucketCounts.length;++s)p.Long?(a.bucketCounts[s]=p.Long.fromValue(r.bucketCounts[s])).unsigned=!0:typeof r.bucketCounts[s]=="string"?a.bucketCounts[s]=parseInt(r.bucketCounts[s],10):typeof r.bucketCounts[s]=="number"?a.bucketCounts[s]=r.bucketCounts[s]:typeof r.bucketCounts[s]=="object"&&(a.bucketCounts[s]=new p.LongBits(r.bucketCounts[s].low>>>0,r.bucketCounts[s].high>>>0).toNumber(!0))}return a},e.toObject=function(r,a){a||(a={});var s={};if((a.arrays||a.defaults)&&(s.bucketCounts=[]),a.defaults&&(s.offset=0),r.offset!=null&&r.hasOwnProperty("offset")&&(s.offset=r.offset),r.bucketCounts&&r.bucketCounts.length){s.bucketCounts=[];for(var d=0;d<r.bucketCounts.length;++d)typeof r.bucketCounts[d]=="number"?s.bucketCounts[d]=a.longs===String?String(r.bucketCounts[d]):r.bucketCounts[d]:s.bucketCounts[d]=a.longs===String?p.Long.prototype.toString.call(r.bucketCounts[d]):a.longs===Number?new p.LongBits(r.bucketCounts[d].low>>>0,r.bucketCounts[d].high>>>0).toNumber(!0):r.bucketCounts[d]}return s},e.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},e.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},e}(),l}(),c.SummaryDataPoint=function(){function l(i){if(this.attributes=[],this.quantileValues=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.quantileValues=p.emptyArray,l.prototype.flags=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),e.quantileValues!=null&&e.quantileValues.length)for(var r=0;r<e.quantileValues.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(e.quantileValues[r],t.uint32(50).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(64).uint32(e.flags),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;e.pos<r;){var s=e.uint32();switch(s>>>3){case 7:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.startTimeUnixNano=e.fixed64();break}case 3:{a.timeUnixNano=e.fixed64();break}case 4:{a.count=e.fixed64();break}case 5:{a.sum=e.double();break}case 6:{a.quantileValues&&a.quantileValues.length||(a.quantileValues=[]),a.quantileValues.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(e,e.uint32()));break}case 8:{a.flags=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!p.isInteger(e.count)&&!(e.count&&p.isInteger(e.count.low)&&p.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&typeof e.sum!="number")return"sum: number expected";if(e.quantileValues!=null&&e.hasOwnProperty("quantileValues")){if(!Array.isArray(e.quantileValues))return"quantileValues: array expected";for(var t=0;t<e.quantileValues.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(e.quantileValues[t]);if(r)return"quantileValues."+r}}return e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint)return e;var t=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(p.Long?(t.count=p.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?t.count=parseInt(e.count,10):typeof e.count=="number"?t.count=e.count:typeof e.count=="object"&&(t.count=new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(t.sum=Number(e.sum)),e.quantileValues){if(!Array.isArray(e.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");t.quantileValues=[];for(var r=0;r<e.quantileValues.length;++r){if(typeof e.quantileValues[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");t.quantileValues[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(e.quantileValues[r])}}return e.flags!=null&&(t.flags=e.flags>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.quantileValues=[],r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.count=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.count=t.longs===String?"0":0;r.sum=0,r.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?r.count=t.longs===String?String(e.count):e.count:r.count=t.longs===String?p.Long.prototype.toString.call(e.count):t.longs===Number?new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(r.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum),e.quantileValues&&e.quantileValues.length){r.quantileValues=[];for(var s=0;s<e.quantileValues.length;++s)r.quantileValues[s]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(e.quantileValues[s],t)}if(e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},l.ValueAtQuantile=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.quantile=null,i.prototype.value=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.quantile!=null&&Object.hasOwnProperty.call(t,"quantile")&&r.uint32(9).double(t.quantile),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&r.uint32(17).double(t.value),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.quantile=t.double();break}case 2:{s.value=t.double();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.quantile!=null&&t.hasOwnProperty("quantile")&&typeof t.quantile!="number"?"quantile: number expected":t.value!=null&&t.hasOwnProperty("value")&&typeof t.value!="number"?"value: number expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return t;var r=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return t.quantile!=null&&(r.quantile=Number(t.quantile)),t.value!=null&&(r.value=Number(t.value)),r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.quantile=0,a.value=0),t.quantile!=null&&t.hasOwnProperty("quantile")&&(a.quantile=r.json&&!isFinite(t.quantile)?String(t.quantile):t.quantile),t.value!=null&&t.hasOwnProperty("value")&&(a.value=r.json&&!isFinite(t.value)?String(t.value):t.value),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},i}(),l}(),c.Exemplar=function(){function l(e){if(this.filteredAttributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.filteredAttributes=p.emptyArray,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.spanId=null,l.prototype.traceId=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(17).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(25).double(t.asDouble),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(34).bytes(t.spanId),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(42).bytes(t.traceId),t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.filteredAttributes!=null&&t.filteredAttributes.length)for(var a=0;a<t.filteredAttributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.filteredAttributes[a],r.uint32(58).fork()).ldelim();return r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Exemplar;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.filteredAttributes&&s.filteredAttributes.length||(s.filteredAttributes=[]),s.filteredAttributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.timeUnixNano=t.fixed64();break}case 3:{s.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 4:{s.spanId=t.bytes();break}case 5:{s.traceId=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.filteredAttributes!=null&&t.hasOwnProperty("filteredAttributes")){if(!Array.isArray(t.filteredAttributes))return"filteredAttributes: array expected";for(var a=0;a<t.filteredAttributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.filteredAttributes[a]);if(s)return"filteredAttributes."+s}}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}return t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId))?"spanId: buffer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||p.isString(t.traceId))?"traceId: buffer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Exemplar)return t;var r=new f.opentelemetry.proto.metrics.v1.Exemplar;if(t.filteredAttributes){if(!Array.isArray(t.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");r.filteredAttributes=[];for(var a=0;a<t.filteredAttributes.length;++a){if(typeof t.filteredAttributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");r.filteredAttributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.filteredAttributes[a])}}return t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.filteredAttributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId)))}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.filteredAttributes&&t.filteredAttributes.length){a.filteredAttributes=[];for(var d=0;d<t.filteredAttributes.length;++d)a.filteredAttributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.filteredAttributes[d],r)}return a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Exemplar"},l}(),c}(),o}(),n.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function l(i){if(this.resourceLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceLogs=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var r=0;r<e.resourceLogs.length;++r)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceLogs&&a.resourceLogs.length||(a.resourceLogs=[]),a.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var t=0;t<e.resourceLogs.length;++t){var r=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[t]);if(r)return"resourceLogs."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogsData)return e;var t=new f.opentelemetry.proto.logs.v1.LogsData;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");t.resourceLogs=[];for(var r=0;r<e.resourceLogs.length;++r){if(typeof e.resourceLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");t.resourceLogs[r]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){r.resourceLogs=[];for(var a=0;a<e.resourceLogs.length;++a)r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogsData"},l}(),c.ResourceLogs=function(){function l(i){if(this.scopeLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeLogs=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeLogs!=null&&e.scopeLogs.length)for(var r=0;r<e.scopeLogs.length;++r)f.opentelemetry.proto.logs.v1.ScopeLogs.encode(e.scopeLogs[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ResourceLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeLogs&&a.scopeLogs.length||(a.scopeLogs=[]),a.scopeLogs.push(f.opentelemetry.proto.logs.v1.ScopeLogs.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeLogs!=null&&e.hasOwnProperty("scopeLogs")){if(!Array.isArray(e.scopeLogs))return"scopeLogs: array expected";for(var r=0;r<e.scopeLogs.length;++r){var t=f.opentelemetry.proto.logs.v1.ScopeLogs.verify(e.scopeLogs[r]);if(t)return"scopeLogs."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ResourceLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ResourceLogs;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeLogs){if(!Array.isArray(e.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");t.scopeLogs=[];for(var r=0;r<e.scopeLogs.length;++r){if(typeof e.scopeLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");t.scopeLogs[r]=f.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(e.scopeLogs[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeLogs=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeLogs&&e.scopeLogs.length){r.scopeLogs=[];for(var a=0;a<e.scopeLogs.length;++a)r.scopeLogs[a]=f.opentelemetry.proto.logs.v1.ScopeLogs.toObject(e.scopeLogs[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ResourceLogs"},l}(),c.ScopeLogs=function(){function l(i){if(this.logRecords=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.logRecords=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.logRecords!=null&&e.logRecords.length)for(var r=0;r<e.logRecords.length;++r)f.opentelemetry.proto.logs.v1.LogRecord.encode(e.logRecords[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ScopeLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.logRecords&&a.logRecords.length||(a.logRecords=[]),a.logRecords.push(f.opentelemetry.proto.logs.v1.LogRecord.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.logRecords!=null&&e.hasOwnProperty("logRecords")){if(!Array.isArray(e.logRecords))return"logRecords: array expected";for(var r=0;r<e.logRecords.length;++r){var t=f.opentelemetry.proto.logs.v1.LogRecord.verify(e.logRecords[r]);if(t)return"logRecords."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ScopeLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ScopeLogs;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.logRecords){if(!Array.isArray(e.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");t.logRecords=[];for(var r=0;r<e.logRecords.length;++r){if(typeof e.logRecords[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");t.logRecords[r]=f.opentelemetry.proto.logs.v1.LogRecord.fromObject(e.logRecords[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.logRecords=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.logRecords&&e.logRecords.length){r.logRecords=[];for(var a=0;a<e.logRecords.length;++a)r.logRecords[a]=f.opentelemetry.proto.logs.v1.LogRecord.toObject(e.logRecords[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ScopeLogs"},l}(),c.SeverityNumber=function(){var l={},i=Object.create(l);return i[l[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,i[l[1]="SEVERITY_NUMBER_TRACE"]=1,i[l[2]="SEVERITY_NUMBER_TRACE2"]=2,i[l[3]="SEVERITY_NUMBER_TRACE3"]=3,i[l[4]="SEVERITY_NUMBER_TRACE4"]=4,i[l[5]="SEVERITY_NUMBER_DEBUG"]=5,i[l[6]="SEVERITY_NUMBER_DEBUG2"]=6,i[l[7]="SEVERITY_NUMBER_DEBUG3"]=7,i[l[8]="SEVERITY_NUMBER_DEBUG4"]=8,i[l[9]="SEVERITY_NUMBER_INFO"]=9,i[l[10]="SEVERITY_NUMBER_INFO2"]=10,i[l[11]="SEVERITY_NUMBER_INFO3"]=11,i[l[12]="SEVERITY_NUMBER_INFO4"]=12,i[l[13]="SEVERITY_NUMBER_WARN"]=13,i[l[14]="SEVERITY_NUMBER_WARN2"]=14,i[l[15]="SEVERITY_NUMBER_WARN3"]=15,i[l[16]="SEVERITY_NUMBER_WARN4"]=16,i[l[17]="SEVERITY_NUMBER_ERROR"]=17,i[l[18]="SEVERITY_NUMBER_ERROR2"]=18,i[l[19]="SEVERITY_NUMBER_ERROR3"]=19,i[l[20]="SEVERITY_NUMBER_ERROR4"]=20,i[l[21]="SEVERITY_NUMBER_FATAL"]=21,i[l[22]="SEVERITY_NUMBER_FATAL2"]=22,i[l[23]="SEVERITY_NUMBER_FATAL3"]=23,i[l[24]="SEVERITY_NUMBER_FATAL4"]=24,i}(),c.LogRecordFlags=function(){var l={},i=Object.create(l);return i[l[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,i[l[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,i}(),c.LogRecord=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.timeUnixNano=null,l.prototype.observedTimeUnixNano=null,l.prototype.severityNumber=null,l.prototype.severityText=null,l.prototype.body=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.flags=null,l.prototype.traceId=null,l.prototype.spanId=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(9).fixed64(e.timeUnixNano),e.severityNumber!=null&&Object.hasOwnProperty.call(e,"severityNumber")&&t.uint32(16).int32(e.severityNumber),e.severityText!=null&&Object.hasOwnProperty.call(e,"severityText")&&t.uint32(26).string(e.severityText),e.body!=null&&Object.hasOwnProperty.call(e,"body")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.body,t.uint32(42).fork()).ldelim(),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(50).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(56).uint32(e.droppedAttributesCount),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(69).fixed32(e.flags),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(74).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(82).bytes(e.spanId),e.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"observedTimeUnixNano")&&t.uint32(89).fixed64(e.observedTimeUnixNano),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogRecord;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.timeUnixNano=e.fixed64();break}case 11:{a.observedTimeUnixNano=e.fixed64();break}case 2:{a.severityNumber=e.int32();break}case 3:{a.severityText=e.string();break}case 5:{a.body=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}case 6:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 7:{a.droppedAttributesCount=e.uint32();break}case 8:{a.flags=e.fixed32();break}case 9:{a.traceId=e.bytes();break}case 10:{a.spanId=e.bytes();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&!p.isInteger(e.observedTimeUnixNano)&&!(e.observedTimeUnixNano&&p.isInteger(e.observedTimeUnixNano.low)&&p.isInteger(e.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(e.severityNumber!=null&&e.hasOwnProperty("severityNumber"))switch(e.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(e.severityText!=null&&e.hasOwnProperty("severityText")&&!p.isString(e.severityText))return"severityText: string expected";if(e.body!=null&&e.hasOwnProperty("body")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.body);if(t)return"body."+t}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var t=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(t)return"attributes."+t}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||p.isString(e.traceId))?"traceId: buffer expected":e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId))?"spanId: buffer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogRecord)return e;var t=new f.opentelemetry.proto.logs.v1.LogRecord;switch(e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.observedTimeUnixNano!=null&&(p.Long?(t.observedTimeUnixNano=p.Long.fromValue(e.observedTimeUnixNano)).unsigned=!1:typeof e.observedTimeUnixNano=="string"?t.observedTimeUnixNano=parseInt(e.observedTimeUnixNano,10):typeof e.observedTimeUnixNano=="number"?t.observedTimeUnixNano=e.observedTimeUnixNano:typeof e.observedTimeUnixNano=="object"&&(t.observedTimeUnixNano=new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber())),e.severityNumber){default:if(typeof e.severityNumber=="number"){t.severityNumber=e.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:t.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:t.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:t.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:t.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:t.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:t.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:t.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:t.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:t.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:t.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:t.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:t.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:t.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:t.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:t.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:t.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:t.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:t.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:t.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:t.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:t.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:t.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:t.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:t.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:t.severityNumber=24;break}if(e.severityText!=null&&(t.severityText=String(e.severityText)),e.body!=null){if(typeof e.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");t.body=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.body)}if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.flags!=null&&(t.flags=e.flags>>>0),e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(r.severityNumber=t.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,r.severityText="",r.body=null,r.droppedAttributesCount=0,r.flags=0,t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),p.Long){var a=new p.Long(0,0,!1);r.observedTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.observedTimeUnixNano=t.longs===String?"0":0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.severityNumber!=null&&e.hasOwnProperty("severityNumber")&&(r.severityNumber=t.enums===String?f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]===void 0?e.severityNumber:f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]:e.severityNumber),e.severityText!=null&&e.hasOwnProperty("severityText")&&(r.severityText=e.severityText),e.body!=null&&e.hasOwnProperty("body")&&(r.body=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.body,t)),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&(typeof e.observedTimeUnixNano=="number"?r.observedTimeUnixNano=t.longs===String?String(e.observedTimeUnixNano):e.observedTimeUnixNano:r.observedTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.observedTimeUnixNano):t.longs===Number?new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber():e.observedTimeUnixNano),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogRecord"},l}(),c}(),o}(),n}(),u}();hl.exports=f});var mo=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.ServiceClientType=void 0;var Sp;(function(u){u[u.SPANS=0]="SPANS",u[u.METRICS=1]="METRICS",u[u.LOGS=2]="LOGS"})(Sp=xe.ServiceClientType||(xe.ServiceClientType={}))});var _o=m(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.getExportRequestProto=void 0;var vo=ml(),vl=mo();function Tp(u){return u===vl.ServiceClientType.SPANS?vo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:u===vl.ServiceClientType.LOGS?vo.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:vo.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}Vr.getExportRequestProto=Tp});var _l=m(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.OTLPProtoExporterBrowserBase=void 0;var Op=(b(),U(y)),Eo=vu(),gp=_o(),bo=class extends Eo.OTLPExporterBrowserBase{constructor(n={}){super(n)}send(n,o,c){if(this._shutdownOnce.isCalled){Op.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=(0,gp.getExportRequestProto)(this.getServiceClientType()),e=i.create(l);if(e){let t=i.encode(e).finish();t&&(0,Eo.sendWithXhr)(new Blob([t],{type:"application/x-protobuf"}),this.url,Object.assign(Object.assign({},this._headers),{"Content-Type":"application/x-protobuf",Accept:"application/x-protobuf"}),this.timeoutMillis,o,c)}else c(new Eo.OTLPExporterError("No proto"))}};Gr.OTLPProtoExporterBrowserBase=bo});var El=m(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.ServiceClientType=ae.OTLPProtoExporterBrowserBase=void 0;var Ap=_l();Object.defineProperty(ae,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return Ap.OTLPProtoExporterBrowserBase}});var Np=mo();Object.defineProperty(ae,"ServiceClientType",{enumerable:!0,get:function(){return Np.ServiceClientType}})});b();var Wt=P(M());b();var I=P(M()),Tt=P(St());var Li="exception";var ws=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Cs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ii=function(){function u(n,o,c,l,i,e,t,r,a,s){t===void 0&&(t=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:y.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=l,this.parentSpanId=e,this.kind=i,this.links=t;var d=Date.now();this._performanceStartTime=I.otperformance.now(),this._performanceOffset=d-(this._performanceStartTime+(0,I.getTimeOrigin)()),this._startTimeProvided=r!=null,this.startTime=this._getTime(r??d),this.resource=n.resource,this.instrumentationLibrary=n.instrumentationLibrary,this._spanLimits=n.getSpanLimits(),s!=null&&this.setAttributes(s),this._spanProcessor=n.getActiveSpanProcessor(),this._spanProcessor.onStart(this,o),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return u.prototype.spanContext=function(){return this._spanContext},u.prototype.setAttribute=function(n,o){return o==null||this._isSpanEnded()?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):(0,I.isAttributeValue)(o)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?(this._droppedAttributesCount++,this):(this.attributes[n]=this._truncateToSize(o),this):(y.diag.warn("Invalid attribute value set for key: "+n),this)},u.prototype.setAttributes=function(n){var o,c;try{for(var l=ws(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Cs(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.addEvent=function(n,o,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return y.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(y.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,I.isTimeInput)(o)&&((0,I.isTimeInput)(c)||(c=o),o=void 0);var l=(0,I.sanitizeAttributes)(o);return this.events.push({name:n,attributes:l,time:this._getTime(c),droppedAttributesCount:0}),this},u.prototype.setStatus=function(n){return this._isSpanEnded()?this:(this.status=n,this)},u.prototype.updateName=function(n){return this._isSpanEnded()?this:(this.name=n,this)},u.prototype.end=function(n){if(this._isSpanEnded()){y.diag.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(n),this._duration=(0,I.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(y.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this)},u.prototype._getTime=function(n){if(typeof n=="number"&&n<I.otperformance.now())return(0,I.hrTime)(n+this._performanceOffset);if(typeof n=="number")return(0,I.millisToHrTime)(n);if(n instanceof Date)return(0,I.millisToHrTime)(n.getTime());if((0,I.isTimeInputHrTime)(n))return n;if(this._startTimeProvided)return(0,I.millisToHrTime)(Date.now());var o=I.otperformance.now()-this._performanceStartTime;return(0,I.addHrTimes)(this.startTime,(0,I.millisToHrTime)(o))},u.prototype.isRecording=function(){return this._ended===!1},u.prototype.recordException=function(n,o){var c={};typeof n=="string"?c[Tt.SemanticAttributes.EXCEPTION_MESSAGE]=n:n&&(n.code?c[Tt.SemanticAttributes.EXCEPTION_TYPE]=n.code.toString():n.name&&(c[Tt.SemanticAttributes.EXCEPTION_TYPE]=n.name),n.message&&(c[Tt.SemanticAttributes.EXCEPTION_MESSAGE]=n.message),n.stack&&(c[Tt.SemanticAttributes.EXCEPTION_STACKTRACE]=n.stack)),c[Tt.SemanticAttributes.EXCEPTION_TYPE]||c[Tt.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(Li,c,o):y.diag.warn("Failed to record an exception "+n)},Object.defineProperty(u.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),u.prototype._isSpanEnded=function(){return this._ended&&y.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substr(0,o)},u.prototype._truncateToSize=function(n){var o=this,c=this._attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u}();b();var k=P(M());var ft;(function(u){u[u.NOT_RECORD=0]="NOT_RECORD",u[u.RECORD=1]="RECORD",u[u.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}));var pt=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},u.prototype.toString=function(){return"AlwaysOffSampler"},u}();var $=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},u.prototype.toString=function(){return"AlwaysOnSampler"},u}();b();var wi=P(M());var Ot=function(){function u(n){var o,c,l,i;this._root=n.root,this._root||((0,wi.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new $),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new $,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new pt,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new $,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new pt}return u.prototype.shouldSample=function(n,o,c,l,i,e){var t=y.trace.getSpanContext(n);return!t||!(0,y.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&y.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&y.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)},u.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},u}();b();var Yt=function(){function u(n){n===void 0&&(n=0),this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}return u.prototype.shouldSample=function(n,o){return{decision:(0,y.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},u.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},u.prototype._normalize=function(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n},u.prototype._accumulate=function(n){for(var o=0,c=0;c<n.length/8;c++){var l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o},u}();var Us=(0,k.getEnv)(),Ms=k.TracesSamplerValues.AlwaysOn,Jt=1;function lr(){return{sampler:An(Us),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,k.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,k.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,k.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,k.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,k.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function An(u){switch(u===void 0&&(u=(0,k.getEnv)()),u.OTEL_TRACES_SAMPLER){case k.TracesSamplerValues.AlwaysOn:return new $;case k.TracesSamplerValues.AlwaysOff:return new pt;case k.TracesSamplerValues.ParentBasedAlwaysOn:return new Ot({root:new $});case k.TracesSamplerValues.ParentBasedAlwaysOff:return new Ot({root:new pt});case k.TracesSamplerValues.TraceIdRatio:return new Yt(Ci(u));case k.TracesSamplerValues.ParentBasedTraceIdRatio:return new Ot({root:new Yt(Ci(u))});default:return y.diag.error('OTEL_TRACES_SAMPLER value "'+u.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Ms+'".'),new $}}function Ci(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Jt+"."),Jt;var n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Jt+"."),Jt):n<0||n>1?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Jt+"."),Jt):n}var zt=P(M());function Ui(u){var n={sampler:An()},o=lr(),c=Object.assign({},o,n,u);return c.generalLimits=Object.assign({},o.generalLimits,u.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,u.spanLimits||{}),c}function Mi(u){var n,o,c,l,i,e,t,r,a,s,d,v,S=Object.assign({},u.spanLimits),O=(0,zt.getEnvWithoutDefaults)();return S.attributeCountLimit=(e=(i=(l=(o=(n=u.spanLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:(c=u.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&l!==void 0?l:O.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:O.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&e!==void 0?e:zt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,S.attributeValueLengthLimit=(v=(d=(s=(r=(t=u.spanLimits)===null||t===void 0?void 0:t.attributeValueLengthLimit)!==null&&r!==void 0?r:(a=u.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&s!==void 0?s:O.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:O.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&v!==void 0?v:zt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},u,{spanLimits:S})}b();var z=P(M()),Di=function(){function u(n,o){this._exporter=n,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var c=(0,z.getEnv)();this._maxExportBatchSize=typeof o?.maxExportBatchSize=="number"?o.maxExportBatchSize:c.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof o?.maxQueueSize=="number"?o.maxQueueSize:c.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof o?.scheduledDelayMillis=="number"?o.scheduledDelayMillis:c.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof o?.exportTimeoutMillis=="number"?o.exportTimeoutMillis:c.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new z.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(y.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){this._shutdownOnce.isCalled||n.spanContext().traceFlags&y.TraceFlags.SAMPLED&&this._addToBuffer(n)},u.prototype.shutdown=function(){return this._shutdownOnce.call()},u.prototype._shutdown=function(){var n=this;return Promise.resolve().then(function(){return n.onShutdown()}).then(function(){return n._flushAll()}).then(function(){return n._exporter.shutdown()})},u.prototype._addToBuffer=function(n){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&y.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(y.diag.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(n),this._maybeStartTimer()},u.prototype._flushAll=function(){var n=this;return new Promise(function(o,c){for(var l=[],i=Math.ceil(n._finishedSpans.length/n._maxExportBatchSize),e=0,t=i;e<t;e++)l.push(n._flushOneBatch());Promise.all(l).then(function(){o()}).catch(c)})},u.prototype._flushOneBatch=function(){var n=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(o,c){var l=setTimeout(function(){c(new Error("Timeout"))},n._exportTimeoutMillis);y.context.with((0,z.suppressTracing)(y.context.active()),function(){var i=n._finishedSpans.splice(0,n._maxExportBatchSize),e=function(){return n._exporter.export(i,function(r){var a;clearTimeout(l),r.code===z.ExportResultCode.SUCCESS?o():c((a=r.error)!==null&&a!==void 0?a:new Error("BatchSpanProcessor: span export failed"))})},t=i.map(function(r){return r.resource}).filter(function(r){return r.asyncAttributesPending});t.length===0?e():Promise.all(t.map(function(r){var a;return(a=r.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(r)})).then(e,function(r){(0,z.globalErrorHandler)(r),c(r)})})})},u.prototype._maybeStartTimer=function(){var n=this;if(!this._isExporting){var o=function(){n._isExporting=!0,n._flushOneBatch().then(function(){n._isExporting=!1,n._finishedSpans.length>0&&(n._clearTimer(),n._maybeStartTimer())}).catch(function(c){n._isExporting=!1,(0,z.globalErrorHandler)(c)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return o();this._timer===void 0&&(this._timer=setTimeout(function(){return o()},this._scheduledDelayMillis),(0,z.unrefTimer)(this._timer))}},u.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},u}();var Ds=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),me=function(u){Ds(n,u);function n(o,c){var l=u.call(this,o,c)||this;return l.onInit(c),l}return n.prototype.onInit=function(o){var c=this;o?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&c.forceFlush()},this._pageHideListener=function(){c.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},n.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},n}(Di);var Bs=8,ks=16,sr=function(){function u(){this.generateTraceId=Bi(ks),this.generateSpanId=Bi(Bs)}return u}();var cr=Array(32);function Bi(u){return function(){for(var o=0;o<u*2;o++)cr[o]=Math.floor(Math.random()*16)+48,cr[o]>=58&&(cr[o]+=39);return String.fromCharCode.apply(null,cr.slice(0,u*2))}}var ki=function(){function u(n,o,c){this._tracerProvider=c;var l=Ui(o);this._sampler=l.sampler,this._generalLimits=l.generalLimits,this._spanLimits=l.spanLimits,this._idGenerator=o.idGenerator||new sr,this.resource=c.resource,this.instrumentationLibrary=n}return u.prototype.startSpan=function(n,o,c){var l,i,e;o===void 0&&(o={}),c===void 0&&(c=y.context.active()),o.root&&(c=y.trace.deleteSpan(c));var t=y.trace.getSpan(c);if((0,Wt.isTracingSuppressed)(c)){y.diag.debug("Instrumentation suppressed, returning Noop Span");var r=y.trace.wrapSpanContext(y.INVALID_SPAN_CONTEXT);return r}var a=t?.spanContext(),s=this._idGenerator.generateSpanId(),d,v,S;!a||!y.trace.isSpanContextValid(a)?d=this._idGenerator.generateTraceId():(d=a.traceId,v=a.traceState,S=a.spanId);var O=(l=o.kind)!==null&&l!==void 0?l:y.SpanKind.INTERNAL,A=((i=o.links)!==null&&i!==void 0?i:[]).map(function(So){return{context:So.context,attributes:(0,Wt.sanitizeAttributes)(So.attributes)}}),q=(0,Wt.sanitizeAttributes)(o.attributes),tt=this._sampler.shouldSample(c,d,n,O,q,A);v=(e=tt.traceState)!==null&&e!==void 0?e:v;var X=tt.decision===y.SamplingDecision.RECORD_AND_SAMPLED?y.TraceFlags.SAMPLED:y.TraceFlags.NONE,W={traceId:d,spanId:s,traceFlags:X,traceState:v};if(tt.decision===y.SamplingDecision.NOT_RECORD){y.diag.debug("Recording is off, propagating context in a non-recording span");var r=y.trace.wrapSpanContext(W);return r}var Y=(0,Wt.sanitizeAttributes)(Object.assign(q,tt.attributes)),Ll=new Ii(this,c,n,W,O,S,A,o.startTime,void 0,Y);return Ll},u.prototype.startActiveSpan=function(n,o,c,l){var i,e,t;if(!(arguments.length<2)){arguments.length===2?t=o:arguments.length===3?(i=o,t=c):(i=o,e=c,t=l);var r=e??y.context.active(),a=this.startSpan(n,i,r),s=y.trace.setSpan(r,a);return y.context.with(s,t,void 0,a)}},u.prototype.getGeneralLimits=function(){return this._generalLimits},u.prototype.getSpanLimits=function(){return this._spanLimits},u.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},u}();b();var nt=P(M());b();var gt=P(St()),fr=P(M());function Vi(){return"unknown_service"}var At=function(){return At=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},At.apply(this,arguments)},Vs=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Gs=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Hs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},F=function(){function u(n,o){var c=this,l;this._attributes=n,this.asyncAttributesPending=o!=null,this._syncAttributes=(l=this._attributes)!==null&&l!==void 0?l:{},this._asyncAttributesPromise=o?.then(function(i){return c._attributes=Object.assign({},c._attributes,i),c.asyncAttributesPending=!1,i},function(i){return y.diag.debug("a resource's async attributes promise rejected: %s",i),c.asyncAttributesPending=!1,{}})}return u.empty=function(){return u.EMPTY},u.default=function(){var n;return new u((n={},n[gt.SemanticResourceAttributes.SERVICE_NAME]=Vi(),n[gt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=fr.SDK_INFO[gt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],n[gt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=fr.SDK_INFO[gt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],n[gt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=fr.SDK_INFO[gt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],n))},Object.defineProperty(u.prototype,"attributes",{get:function(){var n;return this.asyncAttributesPending&&y.diag.error("Accessing resource attributes before async attributes settled"),(n=this._attributes)!==null&&n!==void 0?n:{}},enumerable:!1,configurable:!0}),u.prototype.waitForAsyncAttributes=function(){return Vs(this,void 0,void 0,function(){return Gs(this,function(n){switch(n.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},u.prototype.merge=function(n){var o=this,c;if(!n)return this;var l=At(At({},this._syncAttributes),(c=n._syncAttributes)!==null&&c!==void 0?c:n.attributes);if(!this._asyncAttributesPromise&&!n._asyncAttributesPromise)return new u(l);var i=Promise.all([this._asyncAttributesPromise,n._asyncAttributesPromise]).then(function(e){var t,r=Hs(e,2),a=r[0],s=r[1];return At(At(At(At({},o._syncAttributes),a),(t=n._syncAttributes)!==null&&t!==void 0?t:n.attributes),s)});return new u(l,i)},u.EMPTY=new u({}),u}();b();var Gi=P(M()),Hi=P(St());var js=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Fs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},qs=function(){function u(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return u.prototype.detect=function(n){var o={},c=(0,Gi.getEnv)(),l=c.OTEL_RESOURCE_ATTRIBUTES,i=c.OTEL_SERVICE_NAME;if(l)try{var e=this._parseResourceAttributes(l);Object.assign(o,e)}catch(t){y.diag.debug("EnvDetector failed: "+t.message)}return i&&(o[Hi.SemanticResourceAttributes.SERVICE_NAME]=i),new F(o)},u.prototype._parseResourceAttributes=function(n){var o,c;if(!n)return{};var l={},i=n.split(this._COMMA_SEPARATOR,-1);try{for(var e=js(i),t=e.next();!t.done;t=e.next()){var r=t.value,a=r.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length===2){var s=Fs(a,2),d=s[0],v=s[1];if(d=d.trim(),v=v.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(d))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(v))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);l[d]=decodeURIComponent(v)}}}catch(S){o={error:S}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.prototype._isValid=function(n){return n.length<=this._MAX_LENGTH&&this._isBaggageOctetString(n)},u.prototype._isBaggageOctetString=function(n){for(var o=0;o<n.length;o++){var c=n.charCodeAt(o);if(c<33||c===44||c===59||c===92||c>126)return!1}return!0},u.prototype._isValidAndNotEmpty=function(n){return n.length>0&&this._isValid(n)},u}(),ji=new qs;b();var Fi=function(u){return u!==null&&typeof u=="object"&&typeof u.then=="function"};var Ks=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Xs=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var qi=function(u){var n;u===void 0&&(u={});var o=((n=u.detectors)!==null&&n!==void 0?n:[]).map(function(l){try{var i=l.detect(u),e;if(Fi(i)){var t=function(){return Ks(void 0,void 0,void 0,function(){var r;return Xs(this,function(a){switch(a.label){case 0:return[4,i];case 1:return r=a.sent(),[2,r.attributes]}})})};e=new F({},t())}else e=i;return e.waitForAsyncAttributes?e.waitForAsyncAttributes().then(function(){return y.diag.debug(l.constructor.name+" found resource.",e)}):y.diag.debug(l.constructor.name+" found resource.",e),e}catch(r){return y.diag.error(l.constructor.name+" failed: "+r.message),F.empty()}}),c=o.reduce(function(l,i){return l.merge(i)},F.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(function(){Ys(o)}),c},Ys=function(u){u.forEach(function(n){if(Object.keys(n.attributes).length>0){var o=JSON.stringify(n.attributes,null,4);y.diag.verbose(o)}})};var Ki=P(M()),pr=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Xi=function(){function u(n){this._spanProcessors=n}return u.prototype.forceFlush=function(){var n,o,c=[];try{for(var l=pr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.forceFlush())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t){Promise.all(c).then(function(){t()}).catch(function(r){(0,Ki.globalErrorHandler)(r||new Error("MultiSpanProcessor: forceFlush failed")),t()})})},u.prototype.onStart=function(n,o){var c,l;try{for(var i=pr(this._spanProcessors),e=i.next();!e.done;e=i.next()){var t=e.value;t.onStart(n,o)}}catch(r){c={error:r}}finally{try{e&&!e.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}}},u.prototype.onEnd=function(n){var o,c;try{for(var l=pr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;e.onEnd(n)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}},u.prototype.shutdown=function(){var n,o,c=[];try{for(var l=pr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.shutdown())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t,r){Promise.all(c).then(function(){t()},r)})},u}();var Yi=function(){function u(){}return u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){},u.prototype.shutdown=function(){return Promise.resolve()},u.prototype.forceFlush=function(){return Promise.resolve()},u}();var Vt;(function(u){u[u.resolved=0]="resolved",u[u.timeout=1]="timeout",u[u.error=2]="error",u[u.unresolved=3]="unresolved"})(Vt||(Vt={}));var Ji=function(){function u(n){n===void 0&&(n={});var o;this._registeredSpanProcessors=[],this._tracers=new Map;var c=(0,nt.merge)({},lr(),Mi(n));this.resource=(o=c.resource)!==null&&o!==void 0?o:F.empty(),this.resource=F.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});var l=this._buildExporterFromEnv();if(l!==void 0){var i=new me(l);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Yi}return u.prototype.getTracer=function(n,o,c){var l=n+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._tracers.has(l)||this._tracers.set(l,new ki({name:n,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(l)},u.prototype.addSpanProcessor=function(n){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current span processor",o)}),this._registeredSpanProcessors.push(n),this.activeSpanProcessor=new Xi(this._registeredSpanProcessors)},u.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},u.prototype.register=function(n){n===void 0&&(n={}),y.trace.setGlobalTracerProvider(this),n.propagator===void 0&&(n.propagator=this._buildPropagatorFromEnv()),n.contextManager&&y.context.setGlobalContextManager(n.contextManager),n.propagator&&y.propagation.setGlobalPropagator(n.propagator)},u.prototype.forceFlush=function(){var n=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(function(c){return new Promise(function(l){var i,e=setTimeout(function(){l(new Error("Span processor did not completed within timeout period of "+n+" ms")),i=Vt.timeout},n);c.forceFlush().then(function(){clearTimeout(e),i!==Vt.timeout&&(i=Vt.resolved,l(i))}).catch(function(t){clearTimeout(e),i=Vt.error,l(t)})})});return new Promise(function(c,l){Promise.all(o).then(function(i){var e=i.filter(function(t){return t!==Vt.resolved});e.length>0?l(e):c()}).catch(function(i){return l([i])})})},u.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},u.prototype._getPropagator=function(n){var o;return(o=this.constructor._registeredPropagators.get(n))===null||o===void 0?void 0:o()},u.prototype._getSpanExporter=function(n){var o;return(o=this.constructor._registeredExporters.get(n))===null||o===void 0?void 0:o()},u.prototype._buildPropagatorFromEnv=function(){var n=this,o=Array.from(new Set((0,nt.getEnv)().OTEL_PROPAGATORS)),c=o.map(function(i){var e=n._getPropagator(i);return e||y.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),e}),l=c.reduce(function(i,e){return e&&i.push(e),i},[]);if(l.length!==0)return o.length===1?l[0]:new nt.CompositePropagator({propagators:l})},u.prototype._buildExporterFromEnv=function(){var n=(0,nt.getEnv)().OTEL_TRACES_EXPORTER;if(!(n==="none"||n==="")){var o=this._getSpanExporter(n);return o||y.diag.error('Exporter "'+n+'" requested through environment variable is unavailable.'),o}},u._registeredPropagators=new Map([["tracecontext",function(){return new nt.W3CTraceContextPropagator}],["baggage",function(){return new nt.W3CBaggagePropagator}]]),u._registeredExporters=new Map,u}();b();var dt={};et(dt,Uy);import*as Uy from"@opentelemetry/api-logs";var Nl=P(Qi(),1);b();var yr=P(M());b();b();b();var $t=P(M()),$s=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Qs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Zi=function(){function u(n,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var l=c.timestamp,i=c.observedTimestamp,e=c.severityNumber,t=c.severityText,r=c.body,a=c.attributes,s=a===void 0?{}:a,d=c.context,v=Date.now();if(this.hrTime=(0,$t.timeInputToHrTime)(l??v),this.hrTimeObserved=(0,$t.timeInputToHrTime)(i??v),d){var S=y.trace.getSpanContext(d);S&&y.isSpanContextValid(S)&&(this.spanContext=S)}this.severityNumber=e,this.severityText=t,this.body=r,this.resource=n.resource,this.instrumentationScope=o,this._logRecordLimits=n.logRecordLimits,this.setAttributes(s)}return Object.defineProperty(u.prototype,"severityText",{get:function(){return this._severityText},set:function(n){this._isLogRecordReadonly()||(this._severityText=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(n){this._isLogRecordReadonly()||(this._severityNumber=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"body",{get:function(){return this._body},set:function(n){this._isLogRecordReadonly()||(this._body=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),u.prototype.setAttribute=function(n,o){return this._isLogRecordReadonly()?this:o===null?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):!(0,$t.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(y.diag.warn("Invalid attribute value set for key: "+n),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?this:((0,$t.isAttributeValue)(o)?this.attributes[n]=this._truncateToSize(o):this.attributes[n]=o,this))},u.prototype.setAttributes=function(n){var o,c;try{for(var l=$s(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Qs(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.setBody=function(n){return this.body=n,this},u.prototype.setSeverityNumber=function(n){return this.severityNumber=n,this},u.prototype.setSeverityText=function(n){return this.severityText=n,this},u.prototype._makeReadonly=function(){this._isReadonly=!0},u.prototype._truncateToSize=function(n){var o=this,c=this._logRecordLimits.attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substring(0,o)},u.prototype._isLogRecordReadonly=function(){return this._isReadonly&&y.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly},u}();var Pn=function(){return Pn=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},Pn.apply(this,arguments)},ta=function(){function u(n,o){this.instrumentationScope=n,this._sharedState=o}return u.prototype.emit=function(n){var o=n.context||y.context.active(),c=new Zi(this._sharedState,this.instrumentationScope,Pn({context:o},n));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()},u}();var yt=P(M());function ea(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,yt.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,yt.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function ra(u){var n,o,c,l,i,e,t=(0,yt.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(n=u.attributeCountLimit)!==null&&n!==void 0?n:t.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:t.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:yt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(e=(i=(l=u.attributeValueLengthLimit)!==null&&l!==void 0?l:t.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&i!==void 0?i:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&e!==void 0?e:yt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var ia=P(M()),na=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},oa=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},aa=function(){function u(n,o){this.processors=n,this.forceFlushTimeoutMillis=o}return u.prototype.forceFlush=function(){return na(this,void 0,void 0,function(){var n;return oa(this,function(o){switch(o.label){case 0:return n=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(c){return(0,ia.callWithTimeout)(c.forceFlush(),n)}))];case 1:return o.sent(),[2]}})})},u.prototype.onEmit=function(n,o){this.processors.forEach(function(c){return c.onEmit(n,o)})},u.prototype.shutdown=function(){return na(this,void 0,void 0,function(){return oa(this,function(n){switch(n.label){case 0:return[4,Promise.all(this.processors.map(function(o){return o.shutdown()}))];case 1:return n.sent(),[2]}})})},u}();var ua=function(){function u(){}return u.prototype.forceFlush=function(){return Promise.resolve()},u.prototype.onEmit=function(n,o){},u.prototype.shutdown=function(){return Promise.resolve()},u}();var la=function(){function u(n,o,c){this.resource=n,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new ua}return u}();var Zs="unknown",xn=function(){function u(n){n===void 0&&(n={});var o=(0,yr.merge)({},ea(),n),c=o.resource,l=c===void 0?F.default():c,i=o.logRecordLimits,e=o.forceFlushTimeoutMillis;this._sharedState=new la(l,e,ra(i)),this._shutdownOnce=new yr.BindOnceFuture(this._shutdown,this)}return u.prototype.getLogger=function(n,o,c){if(this._shutdownOnce.isCalled)return y.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),dt.NOOP_LOGGER;n||y.diag.warn("Logger requested without instrumentation scope name.");var l=n||Zs,i=l+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new ta({name:l,version:o,schemaUrl:c?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)},u.prototype.addLogRecordProcessor=function(n){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current log record processor",o)}),this._sharedState.registeredLogRecordProcessors.push(n),this._sharedState.activeProcessor=new aa(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(y.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},u.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(y.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},u.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},u}();var hr;(function(u){u[u.DELTA=0]="DELTA",u[u.CUMULATIVE=1]="CUMULATIVE"})(hr||(hr={}));var tf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),ca=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},sa=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var ef=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};function fa(u){return u!=null}function pa(u){var n=Object.keys(u);return n.length===0?"":(n=n.sort(),JSON.stringify(n.map(function(o){return[o,u[o]]})))}function da(u){var n,o;return u.name+":"+((n=u.version)!==null&&n!==void 0?n:"")+":"+((o=u.schemaUrl)!==null&&o!==void 0?o:"")}var rf=function(u){tf(n,u);function n(o){var c=u.call(this,o)||this;return Object.setPrototypeOf(c,n.prototype),c}return n}(Error);function Rn(u,n){var o,c=new Promise(function(i,e){o=setTimeout(function(){e(new rf("Operation timed out."))},n)});return Promise.race([u,c]).then(function(l){return clearTimeout(o),l},function(l){throw clearTimeout(o),l})}function ya(u){return ca(this,void 0,void 0,function(){var n=this;return sa(this,function(o){return[2,Promise.all(u.map(function(c){return ca(n,void 0,void 0,function(){var l,i;return sa(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,c];case 1:return l=e.sent(),[2,{status:"fulfilled",value:l}];case 2:return i=e.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function ha(u){return u.status==="rejected"}function ma(u,n){var o,c;if(u.size!==n.size)return!1;try{for(var l=ef(u),i=l.next();!i.done;i=l.next()){var e=i.value;if(!n.has(e))return!1}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return!0}function va(u,n){return u.toLowerCase()===n.toLowerCase()}b();var ht;(function(u){u.COUNTER="COUNTER",u.HISTOGRAM="HISTOGRAM",u.UP_DOWN_COUNTER="UP_DOWN_COUNTER",u.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",u.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",u.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(ht||(ht={}));function mt(u,n,o){var c,l,i,e;return of(u)||y.diag.warn('Invalid metric name: "'+u+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:u,type:n,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(l=o?.unit)!==null&&l!==void 0?l:"",valueType:(i=o?.valueType)!==null&&i!==void 0?i:y.ValueType.DOUBLE,advice:(e=o?.advice)!==null&&e!==void 0?e:{}}}function _a(u,n){var o,c;return{name:(o=u.name)!==null&&o!==void 0?o:n.name,description:(c=u.description)!==null&&c!==void 0?c:n.description,type:n.type,unit:n.unit,valueType:n.valueType,advice:n.advice}}function Ea(u,n){return va(u.name,n.name)&&u.unit===n.unit&&u.type===n.type&&u.valueType===n.valueType}var nf=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function of(u){return u.match(nf)!=null}b();var ba=function(){function u(){this._registeredViews=[]}return u.prototype.addView=function(n){this._registeredViews.push(n)},u.prototype.findViews=function(n,o){var c=this,l=this._registeredViews.filter(function(i){return c._matchInstrument(i.instrumentSelector,n)&&c._matchMeter(i.meterSelector,o)});return l},u.prototype._matchInstrument=function(n,o){return(n.getType()===void 0||o.type===n.getType())&&n.getNameFilter().match(o.name)&&n.getUnitFilter().match(o.unit)},u.prototype._matchMeter=function(n,o){return n.getNameFilter().match(o.name)&&(o.version===void 0||n.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||n.getSchemaUrlFilter().match(o.schemaUrl))},u}();b();var Sa=P(M()),Qt=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Ln=function(){function u(n,o){this._writableMetricStorage=n,this._descriptor=o}return u.prototype._record=function(n,o,c){if(o===void 0&&(o={}),c===void 0&&(c=y.context.active()),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._descriptor.name+": "+n);return}this._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._writableMetricStorage.record(n,o,c,(0,Sa.millisToHrTime)(Date.now()))},u}();var Ta=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){this._record(o,c,l)},n}(Ln);var Oa=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){if(o<0){y.diag.warn("negative value provided to counter "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(Ln);var ga=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.record=function(o,c,l){if(o<0){y.diag.warn("negative value provided to histogram "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(Ln);var mr=function(){function u(n,o,c){this._observableRegistry=c,this._descriptor=n,this._metricStorages=o}return u.prototype.addCallback=function(n){this._observableRegistry.addCallback(n,this)},u.prototype.removeCallback=function(n){this._observableRegistry.removeCallback(n,this)},u}();var Aa=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(mr);var Na=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(mr);var Pa=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(mr);function ve(u){return u instanceof mr}var xa=function(){function u(n){this._meterSharedState=n}return u.prototype.createHistogram=function(n,o){var c=mt(n,ht.HISTOGRAM,o),l=this._meterSharedState.registerMetricStorage(c);return new ga(l,c)},u.prototype.createCounter=function(n,o){var c=mt(n,ht.COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new Oa(l,c)},u.prototype.createUpDownCounter=function(n,o){var c=mt(n,ht.UP_DOWN_COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new Ta(l,c)},u.prototype.createObservableGauge=function(n,o){var c=mt(n,ht.OBSERVABLE_GAUGE,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Na(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableCounter=function(n,o){var c=mt(n,ht.OBSERVABLE_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Aa(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableUpDownCounter=function(n,o){var c=mt(n,ht.OBSERVABLE_UP_DOWN_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Pa(c,l,this._meterSharedState.observableRegistry)},u.prototype.addBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.addBatchCallback(n,o)},u.prototype.removeBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.removeBatchCallback(n,o)},u}();var vr=function(){function u(n){this._instrumentDescriptor=n}return u.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},u.prototype.updateDescription=function(n){this._instrumentDescriptor=mt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:n,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},u}();var af=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Ra=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},uf=function(){function u(n){this._hash=n,this._valueMap=new Map,this._keyMap=new Map}return u.prototype.get=function(n,o){return o??(o=this._hash(n)),this._valueMap.get(o)},u.prototype.getOrDefault=function(n,o){var c=this._hash(n);if(this._valueMap.has(c))return this._valueMap.get(c);var l=o();return this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,l),l},u.prototype.set=function(n,o,c){c??(c=this._hash(n)),this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,o)},u.prototype.has=function(n,o){return o??(o=this._hash(n)),this._valueMap.has(o)},u.prototype.keys=function(){var n,o;return Ra(this,function(c){switch(c.label){case 0:n=this._keyMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},u.prototype.entries=function(){var n,o;return Ra(this,function(c){switch(c.label){case 0:n=this._valueMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[this._keyMap.get(o.value[0]),o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},Object.defineProperty(u.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),u}();var ot=function(u){af(n,u);function n(){return u.call(this,pa)||this}return n}(uf);var lf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},_r=function(){function u(n){this._aggregator=n,this._activeCollectionStorage=new ot,this._cumulativeMemoStorage=new ot}return u.prototype.record=function(n,o,c,l){var i=this,e=this._activeCollectionStorage.getOrDefault(o,function(){return i._aggregator.createAccumulation(l)});e?.record(n)},u.prototype.batchCumulate=function(n,o){var c=this;Array.from(n.entries()).forEach(function(l){var i=lf(l,3),e=i[0],t=i[1],r=i[2],a=c._aggregator.createAccumulation(o);a?.record(t);var s=a;if(c._cumulativeMemoStorage.has(e,r)){var d=c._cumulativeMemoStorage.get(e,r);s=c._aggregator.diff(d,a)}if(c._activeCollectionStorage.has(e,r)){var v=c._activeCollectionStorage.get(e,r);s=c._aggregator.merge(v,s)}c._cumulativeMemoStorage.set(e,a,r),c._activeCollectionStorage.set(e,s,r)})},u.prototype.collect=function(){var n=this._activeCollectionStorage;return this._activeCollectionStorage=new ot,n},u}();var In=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},La=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Er=function(){function u(n,o){var c=this;this._aggregator=n,this._unreportedAccumulations=new Map,this._reportHistory=new Map,o.forEach(function(l){c._unreportedAccumulations.set(l,[])})}return u.prototype.buildMetrics=function(n,o,c,l){this._stashAccumulations(c);var i=this._getMergedUnreportedAccumulations(n),e=i,t;if(this._reportHistory.has(n)){var r=this._reportHistory.get(n),a=r.collectionTime;t=r.aggregationTemporality,t===hr.CUMULATIVE?e=u.merge(r.accumulations,i,this._aggregator):e=u.calibrateStartTime(r.accumulations,i,a)}else t=n.selectAggregationTemporality(o.type);this._reportHistory.set(n,{accumulations:e,collectionTime:l,aggregationTemporality:t});var s=cf(e);if(s.length!==0)return this._aggregator.toMetricData(o,t,s,l)},u.prototype._stashAccumulations=function(n){var o,c,l=this._unreportedAccumulations.keys();try{for(var i=In(l),e=i.next();!e.done;e=i.next()){var t=e.value,r=this._unreportedAccumulations.get(t);r===void 0&&(r=[],this._unreportedAccumulations.set(t,r)),r.push(n)}}catch(a){o={error:a}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}},u.prototype._getMergedUnreportedAccumulations=function(n){var o,c,l=new ot,i=this._unreportedAccumulations.get(n);if(this._unreportedAccumulations.set(n,[]),i===void 0)return l;try{for(var e=In(i),t=e.next();!t.done;t=e.next()){var r=t.value;l=u.merge(l,r,this._aggregator)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.merge=function(n,o,c){for(var l=n,i=o.entries(),e=i.next();e.done!==!0;){var t=La(e.value,3),r=t[0],a=t[1],s=t[2];if(n.has(r,s)){var d=n.get(r,s),v=c.merge(d,a);l.set(r,v,s)}else l.set(r,a,s);e=i.next()}return l},u.calibrateStartTime=function(n,o,c){var l,i;try{for(var e=In(n.keys()),t=e.next();!t.done;t=e.next()){var r=La(t.value,2),a=r[0],s=r[1],d=o.get(a,s);d?.setStartTime(c)}}catch(v){l={error:v}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(l)throw l.error}}return o},u}();function cf(u){return Array.from(u.entries())}var sf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),ff=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ia=function(u){sf(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new _r(c),e._temporalMetricStorage=new Er(c,i),e}return n.prototype.record=function(o,c){var l=this,i=new ot;Array.from(o.entries()).forEach(function(e){var t=ff(e,2),r=t[0],a=t[1];i.set(l._attributesProcessor.process(r),a)}),this._deltaMetricStorage.batchCumulate(i,c)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(vr);b();function wn(u,n){var o="";return u.unit!==n.unit&&(o+=" - Unit '"+u.unit+"' does not match '"+n.unit+`'
4
+ var Il=Object.create;var Fr=Object.defineProperty;var wl=Object.getOwnPropertyDescriptor;var Cl=Object.getOwnPropertyNames;var Ul=Object.getPrototypeOf,Ml=Object.prototype.hasOwnProperty;var qr=(u,n)=>()=>(u&&(n=u(u=0)),n);var m=(u,n)=>()=>(n||u((n={exports:{}}).exports,n),n.exports);var Le=(u,n,o,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let l of Cl(n))!Ml.call(u,l)&&l!==o&&Fr(u,l,{get:()=>n[l],enumerable:!(c=wl(n,l))||c.enumerable});return u},et=(u,n,o)=>(Le(u,n,"default"),o&&Le(o,n,"default")),P=(u,n,o)=>(o=u!=null?Il(Ul(u)):{},Le(n||!u||!u.__esModule?Fr(o,"default",{value:u,enumerable:!0}):o,u)),M=u=>Le(Fr({},"__esModule",{value:!0}),u);var y={};import*as Vp from"@opentelemetry/api";var b=qr(()=>{et(y,Vp)});var se=m(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.isTracingSuppressed=vt.unsuppressTracing=vt.suppressTracing=void 0;var Dl=(b(),M(y)),Kr=(0,Dl.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Bl(u){return u.setValue(Kr,!0)}vt.suppressTracing=Bl;function kl(u){return u.deleteValue(Kr)}vt.unsuppressTracing=kl;function Vl(u){return u.getValue(Kr)===!0}vt.isTracingSuppressed=Vl});var Xr=m(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.BAGGAGE_MAX_TOTAL_LENGTH=H.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=H.BAGGAGE_MAX_NAME_VALUE_PAIRS=H.BAGGAGE_HEADER=H.BAGGAGE_ITEMS_SEPARATOR=H.BAGGAGE_PROPERTIES_SEPARATOR=H.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;H.BAGGAGE_KEY_PAIR_SEPARATOR="=";H.BAGGAGE_PROPERTIES_SEPARATOR=";";H.BAGGAGE_ITEMS_SEPARATOR=",";H.BAGGAGE_HEADER="baggage";H.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;H.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;H.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Yr=m(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.parseKeyPairsIntoRecord=ct.parsePairKeyValue=ct.getKeyPairs=ct.serializeKeyPairs=void 0;var Gl=(b(),M(y)),Ct=Xr();function Hl(u){return u.reduce((n,o)=>{let c=`${n}${n!==""?Ct.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Ct.BAGGAGE_MAX_TOTAL_LENGTH?n:c},"")}ct.serializeKeyPairs=Hl;function jl(u){return u.getAllEntries().map(([n,o])=>{let c=`${encodeURIComponent(n)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Ct.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}ct.getKeyPairs=jl;function Oo(u){let n=u.split(Ct.BAGGAGE_PROPERTIES_SEPARATOR);if(n.length<=0)return;let o=n.shift();if(!o)return;let c=o.indexOf(Ct.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let l=decodeURIComponent(o.substring(0,c).trim()),i=decodeURIComponent(o.substring(c+1).trim()),e;return n.length>0&&(e=(0,Gl.baggageEntryMetadataFromString)(n.join(Ct.BAGGAGE_PROPERTIES_SEPARATOR))),{key:l,value:i,metadata:e}}ct.parsePairKeyValue=Oo;function Fl(u){return typeof u!="string"||u.length===0?{}:u.split(Ct.BAGGAGE_ITEMS_SEPARATOR).map(n=>Oo(n)).filter(n=>n!==void 0&&n.value.length>0).reduce((n,o)=>(n[o.key]=o.value,n),{})}ct.parseKeyPairsIntoRecord=Fl});var go=m(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.W3CBaggagePropagator=void 0;var Jr=(b(),M(y)),ql=se(),Ut=Xr(),zr=Yr(),Wr=class{inject(n,o,c){let l=Jr.propagation.getBaggage(n);if(!l||(0,ql.isTracingSuppressed)(n))return;let i=(0,zr.getKeyPairs)(l).filter(t=>t.length<=Ut.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Ut.BAGGAGE_MAX_NAME_VALUE_PAIRS),e=(0,zr.serializeKeyPairs)(i);e.length>0&&c.set(o,Ut.BAGGAGE_HEADER,e)}extract(n,o,c){let l=c.get(o,Ut.BAGGAGE_HEADER),i=Array.isArray(l)?l.join(Ut.BAGGAGE_ITEMS_SEPARATOR):l;if(!i)return n;let e={};return i.length===0||(i.split(Ut.BAGGAGE_ITEMS_SEPARATOR).forEach(r=>{let a=(0,zr.parsePairKeyValue)(r);if(a){let s={value:a.value};a.metadata&&(s.metadata=a.metadata),e[a.key]=s}}),Object.entries(e).length===0)?n:Jr.propagation.setBaggage(n,Jr.propagation.createBaggage(e))}fields(){return[Ut.BAGGAGE_HEADER]}};Ie.W3CBaggagePropagator=Wr});var Ao=m(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.AnchoredClock=void 0;var $r=class{constructor(n,o){this._monotonicClock=o,this._epochMillis=n.now(),this._performanceMillis=o.now()}now(){let n=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+n}};we.AnchoredClock=$r});var Lo=m(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.isAttributeValue=_t.isAttributeKey=_t.sanitizeAttributes=void 0;var No=(b(),M(y));function Kl(u){let n={};if(typeof u!="object"||u==null)return n;for(let[o,c]of Object.entries(u)){if(!Po(o)){No.diag.warn(`Invalid attribute key: ${o}`);continue}if(!xo(c)){No.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?n[o]=c.slice():n[o]=c}return n}_t.sanitizeAttributes=Kl;function Po(u){return typeof u=="string"&&u.length>0}_t.isAttributeKey=Po;function xo(u){return u==null?!0:Array.isArray(u)?Xl(u):Ro(u)}_t.isAttributeValue=xo;function Xl(u){let n;for(let o of u)if(o!=null){if(!n){if(Ro(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}return!0}function Ro(u){switch(typeof u){case"number":case"boolean":case"string":return!0}return!1}});var Qr=m(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.loggingErrorHandler=void 0;var Yl=(b(),M(y));function Jl(){return u=>{Yl.diag.error(zl(u))}}Ce.loggingErrorHandler=Jl;function zl(u){return typeof u=="string"?u:JSON.stringify(Wl(u))}function Wl(u){let n={},o=u;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(n[c])return;let l=o[c];l&&(n[c]=String(l))}),o=Object.getPrototypeOf(o);return n}});var Zr=m(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.globalErrorHandler=Ft.setGlobalErrorHandler=void 0;var $l=Qr(),Io=(0,$l.loggingErrorHandler)();function Ql(u){Io=u}Ft.setGlobalErrorHandler=Ql;function Zl(u){try{Io(u)}catch{}}Ft.globalErrorHandler=Zl});var tn=m(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.TracesSamplerValues=void 0;var tc;(function(u){u.AlwaysOff="always_off",u.AlwaysOn="always_on",u.ParentBasedAlwaysOff="parentbased_always_off",u.ParentBasedAlwaysOn="parentbased_always_on",u.ParentBasedTraceIdRatio="parentbased_traceidratio",u.TraceIdRatio="traceidratio"})(tc=fe.TracesSamplerValues||(fe.TracesSamplerValues={}))});var Me=m(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue._globalThis=void 0;Ue._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var De=m(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.getEnvWithoutDefaults=C.parseEnvironment=C.DEFAULT_ENVIRONMENT=C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=C.DEFAULT_ATTRIBUTE_COUNT_LIMIT=C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Et=(b(),M(y)),ec=tn(),rc=Me(),nc=",",oc=["OTEL_SDK_DISABLED"];function ic(u){return oc.indexOf(u)>-1}var ac=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function uc(u){return ac.indexOf(u)>-1}var lc=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function cc(u){return lc.indexOf(u)>-1}C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;C.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;C.DEFAULT_ENVIRONMENT={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Et.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:C.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:C.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:C.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:C.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ec.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function sc(u,n,o){if(typeof o[u]>"u")return;let c=String(o[u]);n[u]=c.toLowerCase()==="true"}function fc(u,n,o,c=-1/0,l=1/0){if(typeof o[u]<"u"){let i=Number(o[u]);isNaN(i)||(i<c?n[u]=c:i>l?n[u]=l:n[u]=i)}}function pc(u,n,o,c=nc){let l=o[u];typeof l=="string"&&(n[u]=l.split(c).map(i=>i.trim()))}var dc={ALL:Et.DiagLogLevel.ALL,VERBOSE:Et.DiagLogLevel.VERBOSE,DEBUG:Et.DiagLogLevel.DEBUG,INFO:Et.DiagLogLevel.INFO,WARN:Et.DiagLogLevel.WARN,ERROR:Et.DiagLogLevel.ERROR,NONE:Et.DiagLogLevel.NONE};function yc(u,n,o){let c=o[u];if(typeof c=="string"){let l=dc[c.toUpperCase()];l!=null&&(n[u]=l)}}function en(u){let n={};for(let o in C.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":yc(c,n,u);break;default:if(ic(c))sc(c,n,u);else if(uc(c))fc(c,n,u);else if(cc(c))pc(c,n,u);else{let l=u[c];typeof l<"u"&&l!==null&&(n[c]=String(l))}}}return n}C.parseEnvironment=en;function hc(){return typeof process<"u"&&process&&process.env?en(process.env):en(rc._globalThis)}C.getEnvWithoutDefaults=hc});var Co=m(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.getEnv=void 0;var wo=De(),mc=Me();function vc(){let u=(0,wo.parseEnvironment)(mc._globalThis);return Object.assign({},wo.DEFAULT_ENVIRONMENT,u)}Be.getEnv=vc});var Uo=m(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.hexToBase64=void 0;function _c(u){let n=u.length,o="";for(let c=0;c<n;c+=2){let l=u.substring(c,c+2),i=parseInt(l,16);o+=String.fromCharCode(i)}return btoa(o)}ke.hexToBase64=_c});var Do=m(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.RandomIdGenerator=void 0;var Ec=8,bc=16,rn=class{constructor(){this.generateTraceId=Mo(bc),this.generateSpanId=Mo(Ec)}};Ge.RandomIdGenerator=rn;var Ve=Array(32);function Mo(u){return function(){for(let o=0;o<u*2;o++)Ve[o]=Math.floor(Math.random()*16)+48,Ve[o]>=58&&(Ve[o]+=39);return String.fromCharCode.apply(null,Ve.slice(0,u*2))}}});var Bo=m(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.otperformance=void 0;He.otperformance=performance});var nn=m(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.VERSION=void 0;je.VERSION="1.19.0"});var ko=m(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.MessageTypeValues=x.RpcGrpcStatusCodeValues=x.MessagingOperationValues=x.MessagingDestinationKindValues=x.HttpFlavorValues=x.NetHostConnectionSubtypeValues=x.NetHostConnectionTypeValues=x.NetTransportValues=x.FaasInvokedProviderValues=x.FaasDocumentOperationValues=x.FaasTriggerValues=x.DbCassandraConsistencyLevelValues=x.DbSystemValues=x.SemanticAttributes=void 0;x.SemanticAttributes={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"};x.DbSystemValues={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"};x.DbCassandraConsistencyLevelValues={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"};x.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};x.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};x.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};x.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};x.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};x.NetHostConnectionSubtypeValues={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"};x.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};x.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};x.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};x.RpcGrpcStatusCodeValues={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16};x.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var Vo=m(Mt=>{"use strict";var Sc=Mt&&Mt.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Tc=Mt&&Mt.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Sc(n,u,o)};Object.defineProperty(Mt,"__esModule",{value:!0});Tc(ko(),Mt)});var Go=m(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.TelemetrySdkLanguageValues=j.OsTypeValues=j.HostArchValues=j.AwsEcsLaunchtypeValues=j.CloudPlatformValues=j.CloudProviderValues=j.SemanticResourceAttributes=void 0;j.SemanticResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"};j.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};j.CloudPlatformValues={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"};j.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};j.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};j.OsTypeValues={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"};j.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var Ho=m(Dt=>{"use strict";var Oc=Dt&&Dt.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),gc=Dt&&Dt.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Oc(n,u,o)};Object.defineProperty(Dt,"__esModule",{value:!0});gc(Go(),Dt)});var St=m(bt=>{"use strict";var Ac=bt&&bt.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),jo=bt&&bt.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Ac(n,u,o)};Object.defineProperty(bt,"__esModule",{value:!0});jo(Vo(),bt);jo(Ho(),bt)});var Fo=m(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.SDK_INFO=void 0;var Nc=nn(),pe=St();Fe.SDK_INFO={[pe.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[pe.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[pe.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:pe.TelemetrySdkLanguageValues.WEBJS,[pe.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Nc.VERSION}});var qo=m(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.unrefTimer=void 0;function Pc(u){}qe.unrefTimer=Pc});var on=m(z=>{"use strict";var xc=z&&z.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),Bt=z&&z.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&xc(n,u,o)};Object.defineProperty(z,"__esModule",{value:!0});Bt(Co(),z);Bt(Me(),z);Bt(Uo(),z);Bt(Do(),z);Bt(Bo(),z);Bt(Fo(),z);Bt(qo(),z)});var Jo=m(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.addHrTimes=I.isTimeInput=I.isTimeInputHrTime=I.hrTimeToMicroseconds=I.hrTimeToMilliseconds=I.hrTimeToNanoseconds=I.hrTimeToTimeStamp=I.hrTimeDuration=I.timeInputToHrTime=I.hrTime=I.getTimeOrigin=I.millisToHrTime=void 0;var an=on(),Ko=9,Rc=6,Lc=Math.pow(10,Rc),Ke=Math.pow(10,Ko);function de(u){let n=u/1e3,o=Math.trunc(n),c=Math.round(u%1e3*Lc);return[o,c]}I.millisToHrTime=de;function un(){let u=an.otperformance.timeOrigin;if(typeof u!="number"){let n=an.otperformance;u=n.timing&&n.timing.fetchStart}return u}I.getTimeOrigin=un;function Xo(u){let n=de(un()),o=de(typeof u=="number"?u:an.otperformance.now());return Yo(n,o)}I.hrTime=Xo;function Ic(u){if(ln(u))return u;if(typeof u=="number")return u<un()?Xo(u):de(u);if(u instanceof Date)return de(u.getTime());throw TypeError("Invalid input type")}I.timeInputToHrTime=Ic;function wc(u,n){let o=n[0]-u[0],c=n[1]-u[1];return c<0&&(o-=1,c+=Ke),[o,c]}I.hrTimeDuration=wc;function Cc(u){let n=Ko,o=`${"0".repeat(n)}${u[1]}Z`,c=o.substr(o.length-n-1);return new Date(u[0]*1e3).toISOString().replace("000Z",c)}I.hrTimeToTimeStamp=Cc;function Uc(u){return u[0]*Ke+u[1]}I.hrTimeToNanoseconds=Uc;function Mc(u){return u[0]*1e3+u[1]/1e6}I.hrTimeToMilliseconds=Mc;function Dc(u){return u[0]*1e6+u[1]/1e3}I.hrTimeToMicroseconds=Dc;function ln(u){return Array.isArray(u)&&u.length===2&&typeof u[0]=="number"&&typeof u[1]=="number"}I.isTimeInputHrTime=ln;function Bc(u){return ln(u)||typeof u=="number"||u instanceof Date}I.isTimeInput=Bc;function Yo(u,n){let o=[u[0]+n[0],u[1]+n[1]];return o[1]>=Ke&&(o[1]-=Ke,o[0]+=1),o}I.addHrTimes=Yo});var Wo=m(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0})});var $o=m(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.ExportResultCode=void 0;var kc;(function(u){u[u.SUCCESS=0]="SUCCESS",u[u.FAILED=1]="FAILED"})(kc=ye.ExportResultCode||(ye.ExportResultCode={}))});var Zo=m(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.CompositePropagator=void 0;var Qo=(b(),M(y)),cn=class{constructor(n={}){var o;this._propagators=(o=n.propagators)!==null&&o!==void 0?o:[],this._fields=Array.from(new Set(this._propagators.map(c=>typeof c.fields=="function"?c.fields():[]).reduce((c,l)=>c.concat(l),[])))}inject(n,o,c){for(let l of this._propagators)try{l.inject(n,o,c)}catch(i){Qo.diag.warn(`Failed to inject with ${l.constructor.name}. Err: ${i.message}`)}}extract(n,o,c){return this._propagators.reduce((l,i)=>{try{return i.extract(l,o,c)}catch(e){Qo.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return l},n)}fields(){return this._fields.slice()}};Xe.CompositePropagator=cn});var ti=m(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.validateValue=qt.validateKey=void 0;var sn="[_0-9a-z-*/]",Vc=`[a-z]${sn}{0,255}`,Gc=`[a-z0-9]${sn}{0,240}@[a-z]${sn}{0,13}`,Hc=new RegExp(`^(?:${Vc}|${Gc})$`),jc=/^[ -~]{0,255}[!-~]$/,Fc=/,|=/;function qc(u){return Hc.test(u)}qt.validateKey=qc;function Kc(u){return jc.test(u)&&!Fc.test(u)}qt.validateValue=Kc});var pn=m(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.TraceState=void 0;var ei=ti(),ri=32,Xc=512,ni=",",oi="=",fn=class u{constructor(n){this._internalState=new Map,n&&this._parse(n)}set(n,o){let c=this._clone();return c._internalState.has(n)&&c._internalState.delete(n),c._internalState.set(n,o),c}unset(n){let o=this._clone();return o._internalState.delete(n),o}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,o)=>(n.push(o+oi+this.get(o)),n),[]).join(ni)}_parse(n){n.length>Xc||(this._internalState=n.split(ni).reverse().reduce((o,c)=>{let l=c.trim(),i=l.indexOf(oi);if(i!==-1){let e=l.slice(0,i),t=l.slice(i+1,c.length);(0,ei.validateKey)(e)&&(0,ei.validateValue)(t)&&o.set(e,t)}return o},new Map),this._internalState.size>ri&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ri))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new u;return n._internalState=new Map(this._internalState),n}};Ye.TraceState=fn});var ai=m(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.W3CTraceContextPropagator=F.parseTraceParent=F.TRACE_STATE_HEADER=F.TRACE_PARENT_HEADER=void 0;var Je=(b(),M(y)),Yc=se(),Jc=pn();F.TRACE_PARENT_HEADER="traceparent";F.TRACE_STATE_HEADER="tracestate";var zc="00",Wc="(?!ff)[\\da-f]{2}",$c="(?![0]{32})[\\da-f]{32}",Qc="(?![0]{16})[\\da-f]{16}",Zc="[\\da-f]{2}",ts=new RegExp(`^\\s?(${Wc})-(${$c})-(${Qc})-(${Zc})(-.*)?\\s?$`);function ii(u){let n=ts.exec(u);return!n||n[1]==="00"&&n[5]?null:{traceId:n[2],spanId:n[3],traceFlags:parseInt(n[4],16)}}F.parseTraceParent=ii;var dn=class{inject(n,o,c){let l=Je.trace.getSpanContext(n);if(!l||(0,Yc.isTracingSuppressed)(n)||!(0,Je.isSpanContextValid)(l))return;let i=`${zc}-${l.traceId}-${l.spanId}-0${Number(l.traceFlags||Je.TraceFlags.NONE).toString(16)}`;c.set(o,F.TRACE_PARENT_HEADER,i),l.traceState&&c.set(o,F.TRACE_STATE_HEADER,l.traceState.serialize())}extract(n,o,c){let l=c.get(o,F.TRACE_PARENT_HEADER);if(!l)return n;let i=Array.isArray(l)?l[0]:l;if(typeof i!="string")return n;let e=ii(i);if(!e)return n;e.isRemote=!0;let t=c.get(o,F.TRACE_STATE_HEADER);if(t){let r=Array.isArray(t)?t.join(","):t;e.traceState=new Jc.TraceState(typeof r=="string"?r:void 0)}return Je.trace.setSpanContext(n,e)}fields(){return[F.TRACE_PARENT_HEADER,F.TRACE_STATE_HEADER]}};F.W3CTraceContextPropagator=dn});var li=m(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0})});var ci=m(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.getRPCMetadata=rt.deleteRPCMetadata=rt.setRPCMetadata=rt.RPCType=void 0;var es=(b(),M(y)),yn=(0,es.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),rs;(function(u){u.HTTP="http"})(rs=rt.RPCType||(rt.RPCType={}));function ns(u,n){return u.setValue(yn,n)}rt.setRPCMetadata=ns;function os(u){return u.deleteValue(yn)}rt.deleteRPCMetadata=os;function is(u){return u.getValue(yn)}rt.getRPCMetadata=is});var mn=m(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.AlwaysOffSampler=void 0;var as=(b(),M(y)),hn=class{shouldSample(){return{decision:as.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};ze.AlwaysOffSampler=hn});var _n=m(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.AlwaysOnSampler=void 0;var us=(b(),M(y)),vn=class{shouldSample(){return{decision:us.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};We.AlwaysOnSampler=vn});var fi=m(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.ParentBasedSampler=void 0;var $e=(b(),M(y)),ls=Zr(),si=mn(),En=_n(),bn=class{constructor(n){var o,c,l,i;this._root=n.root,this._root||((0,ls.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new En.AlwaysOnSampler),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new En.AlwaysOnSampler,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new si.AlwaysOffSampler,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new En.AlwaysOnSampler,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new si.AlwaysOffSampler}shouldSample(n,o,c,l,i,e){let t=$e.trace.getSpanContext(n);return!t||!(0,$e.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&$e.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&$e.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Qe.ParentBasedSampler=bn});var pi=m(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.TraceIdRatioBasedSampler=void 0;var Sn=(b(),M(y)),Tn=class{constructor(n=0){this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(n,o){return{decision:(0,Sn.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?Sn.SamplingDecision.RECORD_AND_SAMPLED:Sn.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n}_accumulate(n){let o=0;for(let c=0;c<n.length/8;c++){let l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o}};Ze.TraceIdRatioBasedSampler=Tn});var vi=m(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.isPlainObject=void 0;var cs="[object Object]",ss="[object Null]",fs="[object Undefined]",ps=Function.prototype,di=ps.toString,ds=di.call(Object),ys=hs(Object.getPrototypeOf,Object),yi=Object.prototype,hi=yi.hasOwnProperty,kt=Symbol?Symbol.toStringTag:void 0,mi=yi.toString;function hs(u,n){return function(o){return u(n(o))}}function ms(u){if(!vs(u)||_s(u)!==cs)return!1;let n=ys(u);if(n===null)return!0;let o=hi.call(n,"constructor")&&n.constructor;return typeof o=="function"&&o instanceof o&&di.call(o)===ds}tr.isPlainObject=ms;function vs(u){return u!=null&&typeof u=="object"}function _s(u){return u==null?u===void 0?fs:ss:kt&&kt in Object(u)?Es(u):bs(u)}function Es(u){let n=hi.call(u,kt),o=u[kt],c=!1;try{u[kt]=void 0,c=!0}catch{}let l=mi.call(u);return c&&(n?u[kt]=o:delete u[kt]),l}function bs(u){return mi.call(u)}});var Ti=m(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.merge=void 0;var _i=vi(),Ss=20;function Ts(...u){let n=u.shift(),o=new WeakMap;for(;u.length>0;)n=bi(n,u.shift(),0,o);return n}nr.merge=Ts;function On(u){return rr(u)?u.slice():u}function bi(u,n,o=0,c){let l;if(!(o>Ss)){if(o++,er(u)||er(n)||Si(n))l=On(n);else if(rr(u)){if(l=u.slice(),rr(n))for(let i=0,e=n.length;i<e;i++)l.push(On(n[i]));else if(he(n)){let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e];l[r]=On(n[r])}}}else if(he(u))if(he(n)){if(!Os(u,n))return n;l=Object.assign({},u);let i=Object.keys(n);for(let e=0,t=i.length;e<t;e++){let r=i[e],a=n[r];if(er(a))typeof a>"u"?delete l[r]:l[r]=a;else{let s=l[r],d=a;if(Ei(u,r,c)||Ei(n,r,c))delete l[r];else{if(he(s)&&he(d)){let v=c.get(s)||[],S=c.get(d)||[];v.push({obj:u,key:r}),S.push({obj:n,key:r}),c.set(s,v),c.set(d,S)}l[r]=bi(l[r],a,o,c)}}}}else l=n;return l}}function Ei(u,n,o){let c=o.get(u[n])||[];for(let l=0,i=c.length;l<i;l++){let e=c[l];if(e.key===n&&e.obj===u)return!0}return!1}function rr(u){return Array.isArray(u)}function Si(u){return typeof u=="function"}function he(u){return!er(u)&&!rr(u)&&!Si(u)&&typeof u=="object"}function er(u){return typeof u=="string"||typeof u=="number"||typeof u=="boolean"||typeof u>"u"||u instanceof Date||u instanceof RegExp||u===null}function Os(u,n){return!(!(0,_i.isPlainObject)(u)||!(0,_i.isPlainObject)(n))}});var Oi=m(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.callWithTimeout=Kt.TimeoutError=void 0;var or=class u extends Error{constructor(n){super(n),Object.setPrototypeOf(this,u.prototype)}};Kt.TimeoutError=or;function gs(u,n){let o,c=new Promise(function(i,e){o=setTimeout(function(){e(new or("Operation timed out."))},n)});return Promise.race([u,c]).then(l=>(clearTimeout(o),l),l=>{throw clearTimeout(o),l})}Kt.callWithTimeout=gs});var Ai=m(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.isUrlIgnored=Xt.urlMatches=void 0;function gi(u,n){return typeof n=="string"?u===n:!!u.match(n)}Xt.urlMatches=gi;function As(u,n){if(!n)return!1;for(let o of n)if(gi(u,o))return!0;return!1}Xt.isUrlIgnored=As});var Ni=m(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.isWrapped=void 0;function Ns(u){return typeof u=="function"&&typeof u.__original=="function"&&typeof u.__unwrap=="function"&&u.__wrapped===!0}ir.isWrapped=Ns});var Pi=m(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.Deferred=void 0;var gn=class{constructor(){this._promise=new Promise((n,o)=>{this._resolve=n,this._reject=o})}get promise(){return this._promise}resolve(n){this._resolve(n)}reject(n){this._reject(n)}};ar.Deferred=gn});var xi=m(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.BindOnceFuture=void 0;var Ps=Pi(),An=class{constructor(n,o){this._callback=n,this._that=o,this._isCalled=!1,this._deferred=new Ps.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...n){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...n)).then(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};ur.BindOnceFuture=An});var Li=m(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr._export=void 0;var Ri=(b(),M(y)),xs=se();function Rs(u,n){return new Promise(o=>{Ri.context.with((0,xs.suppressTracing)(Ri.context.active()),()=>{u.export(n,c=>{o(c)})})})}lr._export=Rs});var D=m(O=>{"use strict";var Ls=O&&O.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),R=O&&O.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&Ls(n,u,o)};Object.defineProperty(O,"__esModule",{value:!0});O.internal=O.baggageUtils=void 0;R(go(),O);R(Ao(),O);R(Lo(),O);R(Zr(),O);R(Qr(),O);R(Jo(),O);R(Wo(),O);R($o(),O);O.baggageUtils=Yr();R(on(),O);R(Zo(),O);R(ai(),O);R(li(),O);R(ci(),O);R(mn(),O);R(_n(),O);R(fi(),O);R(pi(),O);R(se(),O);R(pn(),O);R(De(),O);R(Ti(),O);R(tn(),O);R(Oi(),O);R(Ai(),O);R(Ni(),O);R(xi(),O);R(nn(),O);var Is=Li();O.internal={_export:Is._export}});var $i=m(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.disableInstrumentations=Nt.enableInstrumentations=Nt.parseInstrumentationOptions=void 0;function Wi(u=[]){let n=[];for(let o=0,c=u.length;o<c;o++){let l=u[o];if(Array.isArray(l)){let i=Wi(l);n=n.concat(i.instrumentations)}else typeof l=="function"?n.push(new l):l.instrumentationName&&n.push(l)}return{instrumentations:n}}Nt.parseInstrumentationOptions=Wi;function Js(u,n,o){for(let c=0,l=u.length;c<l;c++){let i=u[c];n&&i.setTracerProvider(n),o&&i.setMeterProvider(o),i.getConfig().enabled||i.enable()}}Nt.enableInstrumentations=Js;function zs(u){u.forEach(n=>n.disable())}Nt.disableInstrumentations=zs});var Zi=m(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.registerInstrumentations=void 0;var Qi=(b(),M(y)),Pn=$i();function Ws(u){let{instrumentations:n}=(0,Pn.parseInstrumentationOptions)(u.instrumentations),o=u.tracerProvider||Qi.trace.getTracerProvider(),c=u.meterProvider||Qi.metrics.getMeterProvider();return(0,Pn.enableInstrumentations)(n,o,c),()=>{(0,Pn.disableInstrumentations)(n)}}yr.registerInstrumentations=Ws});var _e={};import*as mm from"async_hooks";var Ja=qr(()=>{et(_e,mm)});var Ee={};import*as vm from"events";var za=qr(()=>{et(Ee,vm)});var Wa=m(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.AbstractAsyncHooksContextManager=void 0;var Nf=(za(),M(Ee)),Pf=["addListener","on","once","prependListener","prependOnceListener"],Vn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(n,o){return o instanceof Nf.EventEmitter?this._bindEventEmitter(n,o):typeof o=="function"?this._bindFunction(n,o):o}_bindFunction(n,o){let c=this,l=function(...i){return c.with(n,()=>o.apply(this,i))};return Object.defineProperty(l,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),l}_bindEventEmitter(n,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),Pf.forEach(l=>{o[l]!==void 0&&(o[l]=this._patchAddListener(o,o[l],n))}),typeof o.removeListener=="function"&&(o.removeListener=this._patchRemoveListener(o,o.removeListener)),typeof o.off=="function"&&(o.off=this._patchRemoveListener(o,o.off)),typeof o.removeAllListeners=="function"&&(o.removeAllListeners=this._patchRemoveAllListeners(o,o.removeAllListeners))),o}_patchRemoveListener(n,o){let c=this;return function(l,i){var e;let t=(e=c._getPatchMap(n))===null||e===void 0?void 0:e[l];if(t===void 0)return o.call(this,l,i);let r=t.get(i);return o.call(this,l,r||i)}}_patchRemoveAllListeners(n,o){let c=this;return function(l){let i=c._getPatchMap(n);return i!==void 0&&(arguments.length===0?c._createPatchMap(n):i[l]!==void 0&&delete i[l]),o.apply(this,arguments)}}_patchAddListener(n,o,c){let l=this;return function(i,e){if(l._wrapped)return o.call(this,i,e);let t=l._getPatchMap(n);t===void 0&&(t=l._createPatchMap(n));let r=t[i];r===void 0&&(r=new WeakMap,t[i]=r);let a=l.bind(c,e);r.set(e,a),l._wrapped=!0;try{return o.call(this,i,a)}finally{l._wrapped=!1}}}_createPatchMap(n){let o=Object.create(null);return n[this._kOtListeners]=o,o}_getPatchMap(n){return n[this._kOtListeners]}};gr.AbstractAsyncHooksContextManager=Vn});var $a=m(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.AsyncLocalStorageContextManager=void 0;var xf=(b(),M(y)),Rf=(Ja(),M(_e)),Lf=Wa(),Gn=class extends Lf.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Rf.AsyncLocalStorage}active(){var n;return(n=this._asyncLocalStorage.getStore())!==null&&n!==void 0?n:xf.ROOT_CONTEXT}with(n,o,c,...l){let i=c==null?o:o.bind(c);return this._asyncLocalStorage.run(n,i,...l)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Ar.AsyncLocalStorageContextManager=Gn});var Kn=m(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.toAnyValue=Pt.toKeyValue=Pt.toAttributes=void 0;function Cf(u){return Object.keys(u).map(n=>Fn(n,u[n]))}Pt.toAttributes=Cf;function Fn(u,n){return{key:u,value:qn(n)}}Pt.toKeyValue=Fn;function qn(u){let n=typeof u;return n==="string"?{stringValue:u}:n==="number"?Number.isInteger(u)?{intValue:u}:{doubleValue:u}:n==="boolean"?{boolValue:u}:u instanceof Uint8Array?{bytesValue:u}:Array.isArray(u)?{arrayValue:{values:u.map(qn)}}:n==="object"&&u!=null?{kvlistValue:{values:Object.entries(u).map(([o,c])=>Fn(o,c))}}:{}}Pt.toAnyValue=qn});var nu=m(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.toOtlpSpanEvent=xt.toOtlpLink=xt.sdkSpanToOtlpSpan=void 0;var Xn=Kn();function Uf(u,n){var o;let c=u.spanContext(),l=u.status;return{traceId:n.encodeSpanContext(c.traceId),spanId:n.encodeSpanContext(c.spanId),parentSpanId:n.encodeOptionalSpanContext(u.parentSpanId),traceState:(o=c.traceState)===null||o===void 0?void 0:o.serialize(),name:u.name,kind:u.kind==null?0:u.kind+1,startTimeUnixNano:n.encodeHrTime(u.startTime),endTimeUnixNano:n.encodeHrTime(u.endTime),attributes:(0,Xn.toAttributes)(u.attributes),droppedAttributesCount:u.droppedAttributesCount,events:u.events.map(i=>ru(i,n)),droppedEventsCount:u.droppedEventsCount,status:{code:l.code,message:l.message},links:u.links.map(i=>eu(i,n)),droppedLinksCount:u.droppedLinksCount}}xt.sdkSpanToOtlpSpan=Uf;function eu(u,n){var o;return{attributes:u.attributes?(0,Xn.toAttributes)(u.attributes):[],spanId:n.encodeSpanContext(u.context.spanId),traceId:n.encodeSpanContext(u.context.traceId),traceState:(o=u.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:u.droppedAttributesCount||0}}xt.toOtlpLink=eu;function ru(u,n){return{attributes:u.attributes?(0,Xn.toAttributes)(u.attributes):[],name:u.name,timeUnixNano:n.encodeHrTime(u.time),droppedAttributesCount:u.droppedAttributesCount||0}}xt.toOtlpSpanEvent=ru});var lu=m(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.getOtlpEncoder=Q.encodeAsString=Q.encodeAsLongBits=Q.toLongBits=Q.hrTimeToNanos=void 0;var xr=D(),Mf=BigInt(1e9);function Yn(u){return BigInt(u[0])*Mf+BigInt(u[1])}Q.hrTimeToNanos=Yn;function iu(u){let n=Number(BigInt.asUintN(32,u)),o=Number(BigInt.asUintN(32,u>>BigInt(32)));return{low:n,high:o}}Q.toLongBits=iu;function Jn(u){let n=Yn(u);return iu(n)}Q.encodeAsLongBits=Jn;function au(u){return Yn(u).toString()}Q.encodeAsString=au;var Df=typeof BigInt<"u"?au:xr.hrTimeToNanoseconds;function ou(u){return u}function uu(u){if(u!==void 0)return(0,xr.hexToBase64)(u)}var Bf={encodeHrTime:Jn,encodeSpanContext:xr.hexToBase64,encodeOptionalSpanContext:uu};function kf(u){var n,o;if(u===void 0)return Bf;let c=(n=u.useLongBits)!==null&&n!==void 0?n:!0,l=(o=u.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?Jn:Df,encodeSpanContext:l?ou:xr.hexToBase64,encodeOptionalSpanContext:l?ou:uu}}Q.getOtlpEncoder=kf});var zn=m(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.createExportTraceServiceRequest=void 0;var Vf=Kn(),Gf=nu(),Hf=lu();function jf(u,n){let o=(0,Hf.getOtlpEncoder)(n);return{resourceSpans:qf(u,o)}}Rr.createExportTraceServiceRequest=jf;function Ff(u){let n=new Map;for(let o of u){let c=n.get(o.resource);c||(c=new Map,n.set(o.resource,c));let l=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,i=c.get(l);i||(i=[],c.set(l,i)),i.push(o)}return n}function qf(u,n){let o=Ff(u),c=[],l=o.entries(),i=l.next();for(;!i.done;){let[e,t]=i.value,r=[],a=t.values(),s=a.next();for(;!s.done;){let v=s.value;if(v.length>0){let{name:S,version:g,schemaUrl:L}=v[0].instrumentationLibrary,A=v.map(K=>(0,Gf.sdkSpanToOtlpSpan)(K,n));r.push({scope:{name:S,version:g},spans:A,schemaUrl:L})}s=a.next()}let d={resource:{attributes:(0,Vf.toAttributes)(e.attributes),droppedAttributesCount:0},scopeSpans:r,schemaUrl:void 0};c.push(d),i=l.next()}return c}});var Se=m(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.parseRetryAfterToMills=U.isExportRetryable=U.invalidTimeout=U.configureExporterTimeout=U.appendRootPathToUrlIfNeeded=U.appendResourcePathToUrl=U.parseHeaders=U.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=U.DEFAULT_EXPORT_MAX_BACKOFF=U.DEFAULT_EXPORT_INITIAL_BACKOFF=U.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var Wn=(b(),M(y)),cu=D(),su=1e4;U.DEFAULT_EXPORT_MAX_ATTEMPTS=5;U.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;U.DEFAULT_EXPORT_MAX_BACKOFF=5e3;U.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function Kf(u={}){let n={};return Object.entries(u).forEach(([o,c])=>{typeof c<"u"?n[o]=String(c):Wn.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),n}U.parseHeaders=Kf;function Xf(u,n){return u.endsWith("/")||(u=u+"/"),u+n}U.appendResourcePathToUrl=Xf;function Yf(u){try{let n=new URL(u);return n.pathname===""&&(n.pathname=n.pathname+"/"),n.toString()}catch{return Wn.diag.warn(`Could not parse export URL: '${u}'`),u}}U.appendRootPathToUrlIfNeeded=Yf;function Jf(u){return typeof u=="number"?u<=0?$n(u,su):u:zf()}U.configureExporterTimeout=Jf;function zf(){var u;let n=Number((u=(0,cu.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&u!==void 0?u:(0,cu.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return n<=0?$n(n,su):n}function $n(u,n){return Wn.diag.warn("Timeout must be greater than 0",u),n}U.invalidTimeout=$n;function Wf(u){return[429,502,503,504].includes(u)}U.isExportRetryable=Wf;function $f(u){if(u==null)return-1;let n=Number.parseInt(u,10);if(Number.isInteger(n))return n>0?n*1e3:-1;let o=new Date(u).getTime()-Date.now();return o>=0?o:0}U.parseRetryAfterToMills=$f});var Ir=m(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.OTLPExporterBase=void 0;var fu=(b(),M(y)),Te=D(),Qf=Se(),Qn=class{constructor(n={}){this._sendingPromises=[],this.url=this.getDefaultUrl(n),typeof n.hostname=="string"&&(this.hostname=n.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Te.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof n.concurrencyLimit=="number"?n.concurrencyLimit:30,this.timeoutMillis=(0,Qf.configureExporterTimeout)(n.timeoutMillis),this.onInit(n)}export(n,o){if(this._shutdownOnce.isCalled){o({code:Te.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:Te.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(n).then(()=>{o({code:Te.ExportResultCode.SUCCESS})}).catch(c=>{o({code:Te.ExportResultCode.FAILED,error:c})})}_export(n){return new Promise((o,c)=>{try{fu.diag.debug("items to be sent",n),this.send(n,o,c)}catch(l){c(l)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return fu.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Lr.OTLPExporterBase=Qn});var to=m(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.OTLPExporterError=void 0;var Zn=class extends Error{constructor(n,o,c){super(n),this.name="OTLPExporterError",this.data=c,this.code=o}};Cr.OTLPExporterError=Zn});var eo=m(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.sendWithXhr=ne.sendWithBeacon=void 0;var yu=(b(),M(y)),Oe=to(),re=Se();function ep(u,n,o,c,l){if(navigator.sendBeacon(n,new Blob([u],o)))yu.diag.debug("sendBeacon - can send",u),c();else{let i=new Oe.OTLPExporterError(`sendBeacon - cannot send ${u}`);l(i)}}ne.sendWithBeacon=ep;function rp(u,n,o,c,l,i){let e,t,r=!1,a=setTimeout(()=>{if(clearTimeout(e),r=!0,t.readyState===XMLHttpRequest.DONE){let d=new Oe.OTLPExporterError("Request Timeout");i(d)}else t.abort()},c),s=(d=re.DEFAULT_EXPORT_MAX_ATTEMPTS,v=re.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{t=new XMLHttpRequest,t.open("POST",n),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),o)).forEach(([g,L])=>{t.setRequestHeader(g,L)}),t.send(u),t.onreadystatechange=()=>{if(t.readyState===XMLHttpRequest.DONE&&r===!1)if(t.status>=200&&t.status<=299)yu.diag.debug("xhr success",u),l(),clearTimeout(a),clearTimeout(e);else if(t.status&&(0,re.isExportRetryable)(t.status)&&d>0){let g;v=re.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*v,t.getResponseHeader("Retry-After")?g=(0,re.parseRetryAfterToMills)(t.getResponseHeader("Retry-After")):g=Math.round(Math.random()*(re.DEFAULT_EXPORT_MAX_BACKOFF-v)+v),e=setTimeout(()=>{s(d-1,v)},g)}else{let g=new Oe.OTLPExporterError(`Failed to export with XHR (status: ${t.status})`,t.status);i(g),clearTimeout(a),clearTimeout(e)}},t.onabort=()=>{if(r){let g=new Oe.OTLPExporterError("Request Timeout");i(g)}clearTimeout(a),clearTimeout(e)},t.onerror=()=>{if(r){let g=new Oe.OTLPExporterError("Request Timeout");i(g)}clearTimeout(a),clearTimeout(e)}};s()}ne.sendWithXhr=rp});var mu=m(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.OTLPExporterBrowserBase=void 0;var np=Ir(),op=Se(),hu=eo(),ip=(b(),M(y)),Ur=D(),ro=class extends np.OTLPExporterBase{constructor(n={}){super(n),this._useXHR=!1,this._useXHR=!!n.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,op.parseHeaders)(n.headers),Ur.baggageUtils.parseKeyPairsIntoRecord((0,Ur.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Ur._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Ur._globalThis.removeEventListener("unload",this.shutdown)}send(n,o,c){if(this._shutdownOnce.isCalled){ip.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=JSON.stringify(l),e=new Promise((r,a)=>{this._useXHR?(0,hu.sendWithXhr)(i,this.url,this._headers,this.timeoutMillis,r,a):(0,hu.sendWithBeacon)(i,this.url,{type:"application/json"},r,a)}).then(o,c);this._sendingPromises.push(e);let t=()=>{let r=this._sendingPromises.indexOf(e);this._sendingPromises.splice(r,1)};e.then(t,t)}};Mr.OTLPExporterBrowserBase=ro});var vu=m(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.sendWithXhr=oe.OTLPExporterBrowserBase=void 0;var ap=mu();Object.defineProperty(oe,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return ap.OTLPExporterBrowserBase}});var up=eo();Object.defineProperty(oe,"sendWithXhr",{enumerable:!0,get:function(){return up.sendWithXhr}})});var _u=m(B=>{"use strict";var lp=B&&B.__createBinding||(Object.create?function(u,n,o,c){c===void 0&&(c=o),Object.defineProperty(u,c,{enumerable:!0,get:function(){return n[o]}})}:function(u,n,o,c){c===void 0&&(c=o),u[c]=n[o]}),cp=B&&B.__exportStar||function(u,n){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(n,o)&&lp(n,u,o)};Object.defineProperty(B,"__esModule",{value:!0});B.invalidTimeout=B.configureExporterTimeout=B.appendRootPathToUrlIfNeeded=B.appendResourcePathToUrl=B.parseHeaders=B.OTLPExporterError=B.OTLPExporterBase=void 0;cp(vu(),B);var sp=Ir();Object.defineProperty(B,"OTLPExporterBase",{enumerable:!0,get:function(){return sp.OTLPExporterBase}});var fp=to();Object.defineProperty(B,"OTLPExporterError",{enumerable:!0,get:function(){return fp.OTLPExporterError}});var ge=Se();Object.defineProperty(B,"parseHeaders",{enumerable:!0,get:function(){return ge.parseHeaders}});Object.defineProperty(B,"appendResourcePathToUrl",{enumerable:!0,get:function(){return ge.appendResourcePathToUrl}});Object.defineProperty(B,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return ge.appendRootPathToUrlIfNeeded}});Object.defineProperty(B,"configureExporterTimeout",{enumerable:!0,get:function(){return ge.configureExporterTimeout}});Object.defineProperty(B,"invalidTimeout",{enumerable:!0,get:function(){return ge.invalidTimeout}})});var bu=m(($m,Eu)=>{"use strict";Eu.exports=pp;function pp(u,n){for(var o=new Array(arguments.length-1),c=0,l=2,i=!0;l<arguments.length;)o[c++]=arguments[l++];return new Promise(function(t,r){o[c]=function(s){if(i)if(i=!1,s)r(s);else{for(var d=new Array(arguments.length-1),v=0;v<d.length;)d[v++]=arguments[v];t.apply(null,d)}};try{u.apply(n||null,o)}catch(a){i&&(i=!1,r(a))}})}});var gu=m(Ou=>{"use strict";var Dr=Ou;Dr.length=function(n){var o=n.length;if(!o)return 0;for(var c=0;--o%4>1&&n.charAt(o)==="=";)++c;return Math.ceil(n.length*3)/4-c};var ie=new Array(64),Tu=new Array(123);for(it=0;it<64;)Tu[ie[it]=it<26?it+65:it<52?it+71:it<62?it-4:it-59|43]=it++;var it;Dr.encode=function(n,o,c){for(var l=null,i=[],e=0,t=0,r;o<c;){var a=n[o++];switch(t){case 0:i[e++]=ie[a>>2],r=(a&3)<<4,t=1;break;case 1:i[e++]=ie[r|a>>4],r=(a&15)<<2,t=2;break;case 2:i[e++]=ie[r|a>>6],i[e++]=ie[a&63],t=0;break}e>8191&&((l||(l=[])).push(String.fromCharCode.apply(String,i)),e=0)}return t&&(i[e++]=ie[r],i[e++]=61,t===1&&(i[e++]=61)),l?(e&&l.push(String.fromCharCode.apply(String,i.slice(0,e))),l.join("")):String.fromCharCode.apply(String,i.slice(0,e))};var Su="invalid encoding";Dr.decode=function(n,o,c){for(var l=c,i=0,e,t=0;t<n.length;){var r=n.charCodeAt(t++);if(r===61&&i>1)break;if((r=Tu[r])===void 0)throw Error(Su);switch(i){case 0:e=r,i=1;break;case 1:o[c++]=e<<2|(r&48)>>4,e=r,i=2;break;case 2:o[c++]=(e&15)<<4|(r&60)>>2,e=r,i=3;break;case 3:o[c++]=(e&3)<<6|r,i=0;break}}if(i===1)throw Error(Su);return c-l};Dr.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)}});var Nu=m((Zm,Au)=>{"use strict";Au.exports=Br;function Br(){this._listeners={}}Br.prototype.on=function(n,o,c){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:o,ctx:c||this}),this};Br.prototype.off=function(n,o){if(n===void 0)this._listeners={};else if(o===void 0)this._listeners[n]=[];else for(var c=this._listeners[n],l=0;l<c.length;)c[l].fn===o?c.splice(l,1):++l;return this};Br.prototype.emit=function(n){var o=this._listeners[n];if(o){for(var c=[],l=1;l<arguments.length;)c.push(arguments[l++]);for(l=0;l<o.length;)o[l].fn.apply(o[l++].ctx,c)}return this}});var Cu=m((tv,wu)=>{"use strict";wu.exports=Pu(Pu);function Pu(u){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),o=new Uint8Array(n.buffer),c=o[3]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3]}function i(r,a,s){n[0]=r,a[s]=o[3],a[s+1]=o[2],a[s+2]=o[1],a[s+3]=o[0]}u.writeFloatLE=c?l:i,u.writeFloatBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],n[0]}function t(r,a){return o[3]=r[a],o[2]=r[a+1],o[1]=r[a+2],o[0]=r[a+3],n[0]}u.readFloatLE=c?e:t,u.readFloatBE=c?t:e}():function(){function n(c,l,i,e){var t=l<0?1:0;if(t&&(l=-l),l===0)c(1/l>0?0:2147483648,i,e);else if(isNaN(l))c(2143289344,i,e);else if(l>34028234663852886e22)c((t<<31|2139095040)>>>0,i,e);else if(l<11754943508222875e-54)c((t<<31|Math.round(l/1401298464324817e-60))>>>0,i,e);else{var r=Math.floor(Math.log(l)/Math.LN2),a=Math.round(l*Math.pow(2,-r)*8388608)&8388607;c((t<<31|r+127<<23|a)>>>0,i,e)}}u.writeFloatLE=n.bind(null,xu),u.writeFloatBE=n.bind(null,Ru);function o(c,l,i){var e=c(l,i),t=(e>>31)*2+1,r=e>>>23&255,a=e&8388607;return r===255?a?NaN:t*(1/0):r===0?t*1401298464324817e-60*a:t*Math.pow(2,r-150)*(a+8388608)}u.readFloatLE=o.bind(null,Lu),u.readFloatBE=o.bind(null,Iu)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),o=new Uint8Array(n.buffer),c=o[7]===128;function l(r,a,s){n[0]=r,a[s]=o[0],a[s+1]=o[1],a[s+2]=o[2],a[s+3]=o[3],a[s+4]=o[4],a[s+5]=o[5],a[s+6]=o[6],a[s+7]=o[7]}function i(r,a,s){n[0]=r,a[s]=o[7],a[s+1]=o[6],a[s+2]=o[5],a[s+3]=o[4],a[s+4]=o[3],a[s+5]=o[2],a[s+6]=o[1],a[s+7]=o[0]}u.writeDoubleLE=c?l:i,u.writeDoubleBE=c?i:l;function e(r,a){return o[0]=r[a],o[1]=r[a+1],o[2]=r[a+2],o[3]=r[a+3],o[4]=r[a+4],o[5]=r[a+5],o[6]=r[a+6],o[7]=r[a+7],n[0]}function t(r,a){return o[7]=r[a],o[6]=r[a+1],o[5]=r[a+2],o[4]=r[a+3],o[3]=r[a+4],o[2]=r[a+5],o[1]=r[a+6],o[0]=r[a+7],n[0]}u.readDoubleLE=c?e:t,u.readDoubleBE=c?t:e}():function(){function n(c,l,i,e,t,r){var a=e<0?1:0;if(a&&(e=-e),e===0)c(0,t,r+l),c(1/e>0?0:2147483648,t,r+i);else if(isNaN(e))c(0,t,r+l),c(2146959360,t,r+i);else if(e>17976931348623157e292)c(0,t,r+l),c((a<<31|2146435072)>>>0,t,r+i);else{var s;if(e<22250738585072014e-324)s=e/5e-324,c(s>>>0,t,r+l),c((a<<31|s/4294967296)>>>0,t,r+i);else{var d=Math.floor(Math.log(e)/Math.LN2);d===1024&&(d=1023),s=e*Math.pow(2,-d),c(s*4503599627370496>>>0,t,r+l),c((a<<31|d+1023<<20|s*1048576&1048575)>>>0,t,r+i)}}}u.writeDoubleLE=n.bind(null,xu,0,4),u.writeDoubleBE=n.bind(null,Ru,4,0);function o(c,l,i,e,t){var r=c(e,t+l),a=c(e,t+i),s=(a>>31)*2+1,d=a>>>20&2047,v=4294967296*(a&1048575)+r;return d===2047?v?NaN:s*(1/0):d===0?s*5e-324*v:s*Math.pow(2,d-1075)*(v+4503599627370496)}u.readDoubleLE=o.bind(null,Lu,0,4),u.readDoubleBE=o.bind(null,Iu,4,0)}(),u}function xu(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}function Ru(u,n,o){n[o]=u>>>24,n[o+1]=u>>>16&255,n[o+2]=u>>>8&255,n[o+3]=u&255}function Lu(u,n){return(u[n]|u[n+1]<<8|u[n+2]<<16|u[n+3]<<24)>>>0}function Iu(u,n){return(u[n]<<24|u[n+1]<<16|u[n+2]<<8|u[n+3])>>>0}});var Uu=m((exports,module)=>{"use strict";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(u){}return null}});var Du=m(Mu=>{"use strict";var no=Mu;no.length=function(n){for(var o=0,c=0,l=0;l<n.length;++l)c=n.charCodeAt(l),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(n.charCodeAt(l+1)&64512)===56320?(++l,o+=4):o+=3;return o};no.read=function(n,o,c){var l=c-o;if(l<1)return"";for(var i=null,e=[],t=0,r;o<c;)r=n[o++],r<128?e[t++]=r:r>191&&r<224?e[t++]=(r&31)<<6|n[o++]&63:r>239&&r<365?(r=((r&7)<<18|(n[o++]&63)<<12|(n[o++]&63)<<6|n[o++]&63)-65536,e[t++]=55296+(r>>10),e[t++]=56320+(r&1023)):e[t++]=(r&15)<<12|(n[o++]&63)<<6|n[o++]&63,t>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,e)),t=0);return i?(t&&i.push(String.fromCharCode.apply(String,e.slice(0,t))),i.join("")):String.fromCharCode.apply(String,e.slice(0,t))};no.write=function(n,o,c){for(var l=c,i,e,t=0;t<n.length;++t)i=n.charCodeAt(t),i<128?o[c++]=i:i<2048?(o[c++]=i>>6|192,o[c++]=i&63|128):(i&64512)===55296&&((e=n.charCodeAt(t+1))&64512)===56320?(i=65536+((i&1023)<<10)+(e&1023),++t,o[c++]=i>>18|240,o[c++]=i>>12&63|128,o[c++]=i>>6&63|128,o[c++]=i&63|128):(o[c++]=i>>12|224,o[c++]=i>>6&63|128,o[c++]=i&63|128);return c-l}});var ku=m((rv,Bu)=>{"use strict";Bu.exports=dp;function dp(u,n,o){var c=o||8192,l=c>>>1,i=null,e=c;return function(r){if(r<1||r>l)return u(r);e+r>c&&(i=u(c),e=0);var a=n.call(i,e,e+=r);return e&7&&(e=(e|7)+1),a}}});var Gu=m((nv,Vu)=>{"use strict";Vu.exports=G;var Ae=Lt();function G(u,n){this.lo=u>>>0,this.hi=n>>>0}var Gt=G.zero=new G(0,0);Gt.toNumber=function(){return 0};Gt.zzEncode=Gt.zzDecode=function(){return this};Gt.length=function(){return 1};var yp=G.zeroHash="\0\0\0\0\0\0\0\0";G.fromNumber=function(n){if(n===0)return Gt;var o=n<0;o&&(n=-n);var c=n>>>0,l=(n-c)/4294967296>>>0;return o&&(l=~l>>>0,c=~c>>>0,++c>4294967295&&(c=0,++l>4294967295&&(l=0))),new G(c,l)};G.from=function(n){if(typeof n=="number")return G.fromNumber(n);if(Ae.isString(n))if(Ae.Long)n=Ae.Long.fromString(n);else return G.fromNumber(parseInt(n,10));return n.low||n.high?new G(n.low>>>0,n.high>>>0):Gt};G.prototype.toNumber=function(n){if(!n&&this.hi>>>31){var o=~this.lo+1>>>0,c=~this.hi>>>0;return o||(c=c+1>>>0),-(o+c*4294967296)}return this.lo+this.hi*4294967296};G.prototype.toLong=function(n){return Ae.Long?new Ae.Long(this.lo|0,this.hi|0,!!n):{low:this.lo|0,high:this.hi|0,unsigned:!!n}};var Rt=String.prototype.charCodeAt;G.fromHash=function(n){return n===yp?Gt:new G((Rt.call(n,0)|Rt.call(n,1)<<8|Rt.call(n,2)<<16|Rt.call(n,3)<<24)>>>0,(Rt.call(n,4)|Rt.call(n,5)<<8|Rt.call(n,6)<<16|Rt.call(n,7)<<24)>>>0)};G.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};G.prototype.zzEncode=function(){var n=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^n)>>>0,this.lo=(this.lo<<1^n)>>>0,this};G.prototype.zzDecode=function(){var n=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^n)>>>0,this.hi=(this.hi>>>1^n)>>>0,this};G.prototype.length=function(){var n=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?n<16384?n<128?1:2:n<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var Lt=m(oo=>{"use strict";var _=oo;_.asPromise=bu();_.base64=gu();_.EventEmitter=Nu();_.float=Cu();_.inquire=Uu();_.utf8=Du();_.pool=ku();_.LongBits=Gu();_.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);_.global=_.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||oo;_.emptyArray=Object.freeze?Object.freeze([]):[];_.emptyObject=Object.freeze?Object.freeze({}):{};_.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};_.isString=function(n){return typeof n=="string"||n instanceof String};_.isObject=function(n){return n&&typeof n=="object"};_.isset=_.isSet=function(n,o){var c=n[o];return c!=null&&n.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};_.Buffer=function(){try{var u=_.inquire("buffer").Buffer;return u.prototype.utf8Write?u:null}catch{return null}}();_._Buffer_from=null;_._Buffer_allocUnsafe=null;_.newBuffer=function(n){return typeof n=="number"?_.Buffer?_._Buffer_allocUnsafe(n):new _.Array(n):_.Buffer?_._Buffer_from(n):typeof Uint8Array>"u"?n:new Uint8Array(n)};_.Array=typeof Uint8Array<"u"?Uint8Array:Array;_.Long=_.global.dcodeIO&&_.global.dcodeIO.Long||_.global.Long||_.inquire("long");_.key2Re=/^true|false|0|1$/;_.key32Re=/^-?(?:0|[1-9][0-9]*)$/;_.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;_.longToHash=function(n){return n?_.LongBits.from(n).toHash():_.LongBits.zeroHash};_.longFromHash=function(n,o){var c=_.LongBits.fromHash(n);return _.Long?_.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Hu(u,n,o){for(var c=Object.keys(n),l=0;l<c.length;++l)(u[c[l]]===void 0||!o)&&(u[c[l]]=n[c[l]]);return u}_.merge=Hu;_.lcFirst=function(n){return n.charAt(0).toLowerCase()+n.substring(1)};function ju(u){function n(o,c){if(!(this instanceof n))return new n(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&Hu(this,c)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return u},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}_.newError=ju;_.ProtocolError=ju("ProtocolError");_.oneOfGetter=function(n){for(var o={},c=0;c<n.length;++c)o[n[c]]=1;return function(){for(var l=Object.keys(this),i=l.length-1;i>-1;--i)if(o[l[i]]===1&&this[l[i]]!==void 0&&this[l[i]]!==null)return l[i]}};_.oneOfSetter=function(n){return function(o){for(var c=0;c<n.length;++c)n[c]!==o&&delete this[n[c]]}};_.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};_._configure=function(){var u=_.Buffer;if(!u){_._Buffer_from=_._Buffer_allocUnsafe=null;return}_._Buffer_from=u.from!==Uint8Array.from&&u.from||function(o,c){return new u(o,c)},_._Buffer_allocUnsafe=u.allocUnsafe||function(o){return new u(o)}}});var fo=m((iv,Xu)=>{"use strict";Xu.exports=N;var Z=Lt(),io,kr=Z.LongBits,Fu=Z.base64,qu=Z.utf8;function Ne(u,n,o){this.fn=u,this.len=n,this.next=void 0,this.val=o}function uo(){}function hp(u){this.head=u.head,this.tail=u.tail,this.len=u.len,this.next=u.states}function N(){this.len=0,this.head=new Ne(uo,0,0),this.tail=this.head,this.states=null}var Ku=function(){return Z.Buffer?function(){return(N.create=function(){return new io})()}:function(){return new N}};N.create=Ku();N.alloc=function(n){return new Z.Array(n)};Z.Array!==Array&&(N.alloc=Z.pool(N.alloc,Z.Array.prototype.subarray));N.prototype._push=function(n,o,c){return this.tail=this.tail.next=new Ne(n,o,c),this.len+=o,this};function lo(u,n,o){n[o]=u&255}function mp(u,n,o){for(;u>127;)n[o++]=u&127|128,u>>>=7;n[o]=u}function co(u,n){this.len=u,this.next=void 0,this.val=n}co.prototype=Object.create(Ne.prototype);co.prototype.fn=mp;N.prototype.uint32=function(n){return this.len+=(this.tail=this.tail.next=new co((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};N.prototype.int32=function(n){return n<0?this._push(so,10,kr.fromNumber(n)):this.uint32(n)};N.prototype.sint32=function(n){return this.uint32((n<<1^n>>31)>>>0)};function so(u,n,o){for(;u.hi;)n[o++]=u.lo&127|128,u.lo=(u.lo>>>7|u.hi<<25)>>>0,u.hi>>>=7;for(;u.lo>127;)n[o++]=u.lo&127|128,u.lo=u.lo>>>7;n[o++]=u.lo}N.prototype.uint64=function(n){var o=kr.from(n);return this._push(so,o.length(),o)};N.prototype.int64=N.prototype.uint64;N.prototype.sint64=function(n){var o=kr.from(n).zzEncode();return this._push(so,o.length(),o)};N.prototype.bool=function(n){return this._push(lo,1,n?1:0)};function ao(u,n,o){n[o]=u&255,n[o+1]=u>>>8&255,n[o+2]=u>>>16&255,n[o+3]=u>>>24}N.prototype.fixed32=function(n){return this._push(ao,4,n>>>0)};N.prototype.sfixed32=N.prototype.fixed32;N.prototype.fixed64=function(n){var o=kr.from(n);return this._push(ao,4,o.lo)._push(ao,4,o.hi)};N.prototype.sfixed64=N.prototype.fixed64;N.prototype.float=function(n){return this._push(Z.float.writeFloatLE,4,n)};N.prototype.double=function(n){return this._push(Z.float.writeDoubleLE,8,n)};var vp=Z.Array.prototype.set?function(n,o,c){o.set(n,c)}:function(n,o,c){for(var l=0;l<n.length;++l)o[c+l]=n[l]};N.prototype.bytes=function(n){var o=n.length>>>0;if(!o)return this._push(lo,1,0);if(Z.isString(n)){var c=N.alloc(o=Fu.length(n));Fu.decode(n,c,0),n=c}return this.uint32(o)._push(vp,o,n)};N.prototype.string=function(n){var o=qu.length(n);return o?this.uint32(o)._push(qu.write,o,n):this._push(lo,1,0)};N.prototype.fork=function(){return this.states=new hp(this),this.head=this.tail=new Ne(uo,0,0),this.len=0,this};N.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 Ne(uo,0,0),this.len=0),this};N.prototype.ldelim=function(){var n=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=n.next,this.tail=o,this.len+=c),this};N.prototype.finish=function(){for(var n=this.head.next,o=this.constructor.alloc(this.len),c=0;n;)n.fn(n.val,o,c),c+=n.len,n=n.next;return o};N._configure=function(u){io=u,N.create=Ku(),io._configure()}});var zu=m((av,Ju)=>{"use strict";Ju.exports=st;var Yu=fo();(st.prototype=Object.create(Yu.prototype)).constructor=st;var It=Lt();function st(){Yu.call(this)}st._configure=function(){st.alloc=It._Buffer_allocUnsafe,st.writeBytesBuffer=It.Buffer&&It.Buffer.prototype instanceof Uint8Array&&It.Buffer.prototype.set.name==="set"?function(n,o,c){o.set(n,c)}:function(n,o,c){if(n.copy)n.copy(o,c,0,n.length);else for(var l=0;l<n.length;)o[c++]=n[l++]}};st.prototype.bytes=function(n){It.isString(n)&&(n=It._Buffer_from(n,"base64"));var o=n.length>>>0;return this.uint32(o),o&&this._push(st.writeBytesBuffer,o,n),this};function _p(u,n,o){u.length<40?It.utf8.write(u,n,o):n.utf8Write?n.utf8Write(u,o):n.write(u,o)}st.prototype.string=function(n){var o=It.Buffer.byteLength(n);return this.uint32(o),o&&this._push(_p,o,n),this};st._configure()});var ho=m((uv,tl)=>{"use strict";tl.exports=k;var at=Lt(),yo,Qu=at.LongBits,Ep=at.utf8;function ut(u,n){return RangeError("index out of range: "+u.pos+" + "+(n||1)+" > "+u.len)}function k(u){this.buf=u,this.pos=0,this.len=u.length}var Wu=typeof Uint8Array<"u"?function(n){if(n instanceof Uint8Array||Array.isArray(n))return new k(n);throw Error("illegal buffer")}:function(n){if(Array.isArray(n))return new k(n);throw Error("illegal buffer")},Zu=function(){return at.Buffer?function(o){return(k.create=function(l){return at.Buffer.isBuffer(l)?new yo(l):Wu(l)})(o)}:Wu};k.create=Zu();k.prototype._slice=at.Array.prototype.subarray||at.Array.prototype.slice;k.prototype.uint32=function(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,ut(this,10);return n}}();k.prototype.int32=function(){return this.uint32()|0};k.prototype.sint32=function(){var n=this.uint32();return n>>>1^-(n&1)|0};function po(){var u=new Qu(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return u;if(u.lo=(u.lo|(this.buf[this.pos]&127)<<28)>>>0,u.hi=(u.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return u;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw ut(this);if(u.lo=(u.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,u}if(this.len-this.pos>4){for(;n<5;++n)if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}else for(;n<5;++n){if(this.pos>=this.len)throw ut(this);if(u.hi=(u.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}k.prototype.bool=function(){return this.uint32()!==0};function Vr(u,n){return(u[n-4]|u[n-3]<<8|u[n-2]<<16|u[n-1]<<24)>>>0}k.prototype.fixed32=function(){if(this.pos+4>this.len)throw ut(this,4);return Vr(this.buf,this.pos+=4)};k.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ut(this,4);return Vr(this.buf,this.pos+=4)|0};function $u(){if(this.pos+8>this.len)throw ut(this,8);return new Qu(Vr(this.buf,this.pos+=4),Vr(this.buf,this.pos+=4))}k.prototype.float=function(){if(this.pos+4>this.len)throw ut(this,4);var n=at.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};k.prototype.double=function(){if(this.pos+8>this.len)throw ut(this,4);var n=at.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};k.prototype.bytes=function(){var n=this.uint32(),o=this.pos,c=this.pos+n;if(c>this.len)throw ut(this,n);if(this.pos+=n,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var l=at.Buffer;return l?l.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};k.prototype.string=function(){var n=this.bytes();return Ep.read(n,0,n.length)};k.prototype.skip=function(n){if(typeof n=="number"){if(this.pos+n>this.len)throw ut(this,n);this.pos+=n}else do if(this.pos>=this.len)throw ut(this);while(this.buf[this.pos++]&128);return this};k.prototype.skipType=function(u){switch(u){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(u=this.uint32()&7)!==4;)this.skipType(u);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+u+" at offset "+this.pos)}return this};k._configure=function(u){yo=u,k.create=Zu(),yo._configure();var n=at.Long?"toLong":"toNumber";at.merge(k.prototype,{int64:function(){return po.call(this)[n](!1)},uint64:function(){return po.call(this)[n](!0)},sint64:function(){return po.call(this).zzDecode()[n](!1)},fixed64:function(){return $u.call(this)[n](!0)},sfixed64:function(){return $u.call(this)[n](!1)}})}});var ol=m((lv,nl)=>{"use strict";nl.exports=Ht;var rl=ho();(Ht.prototype=Object.create(rl.prototype)).constructor=Ht;var el=Lt();function Ht(u){rl.call(this,u)}Ht._configure=function(){el.Buffer&&(Ht.prototype._slice=el.Buffer.prototype.slice)};Ht.prototype.string=function(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};Ht._configure()});var al=m((cv,il)=>{"use strict";il.exports=Pe;var mo=Lt();(Pe.prototype=Object.create(mo.EventEmitter.prototype)).constructor=Pe;function Pe(u,n,o){if(typeof u!="function")throw TypeError("rpcImpl must be a function");mo.EventEmitter.call(this),this.rpcImpl=u,this.requestDelimited=!!n,this.responseDelimited=!!o}Pe.prototype.rpcCall=function u(n,o,c,l,i){if(!l)throw TypeError("request must be specified");var e=this;if(!i)return mo.asPromise(u,e,n,o,c,l);if(!e.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return e.rpcImpl(n,o[e.requestDelimited?"encodeDelimited":"encode"](l).finish(),function(r,a){if(r)return e.emit("error",r,n),i(r);if(a===null){e.end(!0);return}if(!(a instanceof c))try{a=c[e.responseDelimited?"decodeDelimited":"decode"](a)}catch(s){return e.emit("error",s,n),i(s)}return e.emit("data",a,n),i(null,a)})}catch(t){e.emit("error",t,n),setTimeout(function(){i(t)},0);return}};Pe.prototype.end=function(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var ll=m(ul=>{"use strict";var bp=ul;bp.Service=al()});var sl=m((fv,cl)=>{"use strict";cl.exports={}});var dl=m(pl=>{"use strict";var Y=pl;Y.build="minimal";Y.Writer=fo();Y.BufferWriter=zu();Y.Reader=ho();Y.BufferReader=ol();Y.util=Lt();Y.rpc=ll();Y.roots=sl();Y.configure=fl;function fl(){Y.util._configure(),Y.Writer._configure(Y.BufferWriter),Y.Reader._configure(Y.BufferReader)}fl()});var hl=m((dv,yl)=>{"use strict";yl.exports=dl()});var vl=m((yv,ml)=>{"use strict";var E=hl(),h=E.Reader,T=E.Writer,p=E.util,f=E.roots.default||(E.roots.default={});f.opentelemetry=function(){var u={};return u.proto=function(){var n={};return n.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.stringValue=null,l.prototype.boolValue=null,l.prototype.intValue=null,l.prototype.doubleValue=null,l.prototype.arrayValue=null,l.prototype.kvlistValue=null,l.prototype.bytesValue=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.stringValue!=null&&Object.hasOwnProperty.call(t,"stringValue")&&r.uint32(10).string(t.stringValue),t.boolValue!=null&&Object.hasOwnProperty.call(t,"boolValue")&&r.uint32(16).bool(t.boolValue),t.intValue!=null&&Object.hasOwnProperty.call(t,"intValue")&&r.uint32(24).int64(t.intValue),t.doubleValue!=null&&Object.hasOwnProperty.call(t,"doubleValue")&&r.uint32(33).double(t.doubleValue),t.arrayValue!=null&&Object.hasOwnProperty.call(t,"arrayValue")&&f.opentelemetry.proto.common.v1.ArrayValue.encode(t.arrayValue,r.uint32(42).fork()).ldelim(),t.kvlistValue!=null&&Object.hasOwnProperty.call(t,"kvlistValue")&&f.opentelemetry.proto.common.v1.KeyValueList.encode(t.kvlistValue,r.uint32(50).fork()).ldelim(),t.bytesValue!=null&&Object.hasOwnProperty.call(t,"bytesValue")&&r.uint32(58).bytes(t.bytesValue),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.common.v1.AnyValue;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.stringValue=t.string();break}case 2:{s.boolValue=t.bool();break}case 3:{s.intValue=t.int64();break}case 4:{s.doubleValue=t.double();break}case 5:{s.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.decode(t,t.uint32());break}case 6:{s.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.decode(t,t.uint32());break}case 7:{s.bytesValue=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(r.value=1,!p.isString(t.stringValue)))return"stringValue: string expected";if(t.boolValue!=null&&t.hasOwnProperty("boolValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.boolValue!="boolean")return"boolValue: boolean expected"}if(t.intValue!=null&&t.hasOwnProperty("intValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.intValue)&&!(t.intValue&&p.isInteger(t.intValue.low)&&p.isInteger(t.intValue.high)))return"intValue: integer|Long expected"}if(t.doubleValue!=null&&t.hasOwnProperty("doubleValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof t.doubleValue!="number")return"doubleValue: number expected"}if(t.arrayValue!=null&&t.hasOwnProperty("arrayValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.ArrayValue.verify(t.arrayValue);if(a)return"arrayValue."+a}}if(t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=f.opentelemetry.proto.common.v1.KeyValueList.verify(t.kvlistValue);if(a)return"kvlistValue."+a}}if(t.bytesValue!=null&&t.hasOwnProperty("bytesValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!(t.bytesValue&&typeof t.bytesValue.length=="number"||p.isString(t.bytesValue)))return"bytesValue: buffer expected"}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.common.v1.AnyValue)return t;var r=new f.opentelemetry.proto.common.v1.AnyValue;if(t.stringValue!=null&&(r.stringValue=String(t.stringValue)),t.boolValue!=null&&(r.boolValue=!!t.boolValue),t.intValue!=null&&(p.Long?(r.intValue=p.Long.fromValue(t.intValue)).unsigned=!1:typeof t.intValue=="string"?r.intValue=parseInt(t.intValue,10):typeof t.intValue=="number"?r.intValue=t.intValue:typeof t.intValue=="object"&&(r.intValue=new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber())),t.doubleValue!=null&&(r.doubleValue=Number(t.doubleValue)),t.arrayValue!=null){if(typeof t.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");r.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.fromObject(t.arrayValue)}if(t.kvlistValue!=null){if(typeof t.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");r.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.fromObject(t.kvlistValue)}return t.bytesValue!=null&&(typeof t.bytesValue=="string"?p.base64.decode(t.bytesValue,r.bytesValue=p.newBuffer(p.base64.length(t.bytesValue)),0):t.bytesValue.length>=0&&(r.bytesValue=t.bytesValue)),r},l.toObject=function(t,r){r||(r={});var a={};return t.stringValue!=null&&t.hasOwnProperty("stringValue")&&(a.stringValue=t.stringValue,r.oneofs&&(a.value="stringValue")),t.boolValue!=null&&t.hasOwnProperty("boolValue")&&(a.boolValue=t.boolValue,r.oneofs&&(a.value="boolValue")),t.intValue!=null&&t.hasOwnProperty("intValue")&&(typeof t.intValue=="number"?a.intValue=r.longs===String?String(t.intValue):t.intValue:a.intValue=r.longs===String?p.Long.prototype.toString.call(t.intValue):r.longs===Number?new p.LongBits(t.intValue.low>>>0,t.intValue.high>>>0).toNumber():t.intValue,r.oneofs&&(a.value="intValue")),t.doubleValue!=null&&t.hasOwnProperty("doubleValue")&&(a.doubleValue=r.json&&!isFinite(t.doubleValue)?String(t.doubleValue):t.doubleValue,r.oneofs&&(a.value="doubleValue")),t.arrayValue!=null&&t.hasOwnProperty("arrayValue")&&(a.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.toObject(t.arrayValue,r),r.oneofs&&(a.value="arrayValue")),t.kvlistValue!=null&&t.hasOwnProperty("kvlistValue")&&(a.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.toObject(t.kvlistValue,r),r.oneofs&&(a.value="kvlistValue")),t.bytesValue!=null&&t.hasOwnProperty("bytesValue")&&(a.bytesValue=r.bytes===String?p.base64.encode(t.bytesValue,0,t.bytesValue.length):r.bytes===Array?Array.prototype.slice.call(t.bytesValue):t.bytesValue,r.oneofs&&(a.value="bytesValue")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.AnyValue"},l}(),c.ArrayValue=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.AnyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.ArrayValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.AnyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.ArrayValue)return e;var t=new f.opentelemetry.proto.common.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.ArrayValue"},l}(),c.KeyValueList=function(){function l(i){if(this.values=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.values=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.values!=null&&e.values.length)for(var r=0;r<e.values.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValueList;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.values&&a.values.length||(a.values=[]),a.values.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.values!=null&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.values[t]);if(r)return"values."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValueList)return e;var t=new f.opentelemetry.proto.common.v1.KeyValueList;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");t.values=[];for(var r=0;r<e.values.length;++r){if(typeof e.values[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");t.values[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.values[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.values=[]),e.values&&e.values.length){r.values=[];for(var a=0;a<e.values.length;++a)r.values[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.values[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValueList"},l}(),c.KeyValue=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.key=null,l.prototype.value=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.value,t.uint32(18).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.KeyValue;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.key=e.string();break}case 2:{a.value=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.key!=null&&e.hasOwnProperty("key")&&!p.isString(e.key))return"key: string expected";if(e.value!=null&&e.hasOwnProperty("value")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.value);if(t)return"value."+t}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.KeyValue)return e;var t=new f.opentelemetry.proto.common.v1.KeyValue;if(e.key!=null&&(t.key=String(e.key)),e.value!=null){if(typeof e.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");t.value=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.value)}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.key="",r.value=null),e.key!=null&&e.hasOwnProperty("key")&&(r.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(r.value=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.value,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValue"},l}(),c.InstrumentationScope=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.name=null,l.prototype.version=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(18).string(e.version),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(32).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.common.v1.InstrumentationScope;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.name=e.string();break}case 2:{a.version=e.string();break}case 3:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.version!=null&&e.hasOwnProperty("version")&&!p.isString(e.version))return"version: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.common.v1.InstrumentationScope)return e;var t=new f.opentelemetry.proto.common.v1.InstrumentationScope;if(e.name!=null&&(t.name=String(e.name)),e.version!=null&&(t.version=String(e.version)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.name="",r.version="",r.droppedAttributesCount=0),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.version!=null&&e.hasOwnProperty("version")&&(r.version=e.version),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.InstrumentationScope"},l}(),c}(),o}(),n.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(16).uint32(e.droppedAttributesCount),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.resource.v1.Resource;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.droppedAttributesCount=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.resource.v1.Resource)return e;var t=new f.opentelemetry.proto.resource.v1.Resource;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults&&(r.droppedAttributesCount=0),e.attributes&&e.attributes.length){r.attributes=[];for(var a=0;a<e.attributes.length;++a)r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.resource.v1.Resource"},l}(),c}(),o}(),n.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function l(i){if(this.resourceSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceSpans=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var r=0;r<e.resourceSpans.length;++r)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.TracesData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceSpans&&a.resourceSpans.length||(a.resourceSpans=[]),a.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var t=0;t<e.resourceSpans.length;++t){var r=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[t]);if(r)return"resourceSpans."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.TracesData)return e;var t=new f.opentelemetry.proto.trace.v1.TracesData;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");t.resourceSpans=[];for(var r=0;r<e.resourceSpans.length;++r){if(typeof e.resourceSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");t.resourceSpans[r]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){r.resourceSpans=[];for(var a=0;a<e.resourceSpans.length;++a)r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.TracesData"},l}(),c.ResourceSpans=function(){function l(i){if(this.scopeSpans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeSpans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(var r=0;r<e.scopeSpans.length;++r)f.opentelemetry.proto.trace.v1.ScopeSpans.encode(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ResourceSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeSpans&&a.scopeSpans.length||(a.scopeSpans=[]),a.scopeSpans.push(f.opentelemetry.proto.trace.v1.ScopeSpans.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeSpans!=null&&e.hasOwnProperty("scopeSpans")){if(!Array.isArray(e.scopeSpans))return"scopeSpans: array expected";for(var r=0;r<e.scopeSpans.length;++r){var t=f.opentelemetry.proto.trace.v1.ScopeSpans.verify(e.scopeSpans[r]);if(t)return"scopeSpans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ResourceSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ResourceSpans;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeSpans){if(!Array.isArray(e.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");t.scopeSpans=[];for(var r=0;r<e.scopeSpans.length;++r){if(typeof e.scopeSpans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");t.scopeSpans[r]=f.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(e.scopeSpans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeSpans=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeSpans&&e.scopeSpans.length){r.scopeSpans=[];for(var a=0;a<e.scopeSpans.length;++a)r.scopeSpans[a]=f.opentelemetry.proto.trace.v1.ScopeSpans.toObject(e.scopeSpans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ResourceSpans"},l}(),c.ScopeSpans=function(){function l(i){if(this.spans=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.spans=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(var r=0;r<e.spans.length;++r)f.opentelemetry.proto.trace.v1.Span.encode(e.spans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.ScopeSpans;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.spans&&a.spans.length||(a.spans=[]),a.spans.push(f.opentelemetry.proto.trace.v1.Span.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.spans!=null&&e.hasOwnProperty("spans")){if(!Array.isArray(e.spans))return"spans: array expected";for(var r=0;r<e.spans.length;++r){var t=f.opentelemetry.proto.trace.v1.Span.verify(e.spans[r]);if(t)return"spans."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.ScopeSpans)return e;var t=new f.opentelemetry.proto.trace.v1.ScopeSpans;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.spans){if(!Array.isArray(e.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");t.spans=[];for(var r=0;r<e.spans.length;++r){if(typeof e.spans[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");t.spans[r]=f.opentelemetry.proto.trace.v1.Span.fromObject(e.spans[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.spans=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.spans&&e.spans.length){r.spans=[];for(var a=0;a<e.spans.length;++a)r.spans[a]=f.opentelemetry.proto.trace.v1.Span.toObject(e.spans[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ScopeSpans"},l}(),c.Span=function(){function l(i){if(this.attributes=[],this.events=[],this.links=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.traceId=null,l.prototype.spanId=null,l.prototype.traceState=null,l.prototype.parentSpanId=null,l.prototype.name=null,l.prototype.kind=null,l.prototype.startTimeUnixNano=null,l.prototype.endTimeUnixNano=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.events=p.emptyArray,l.prototype.droppedEventsCount=null,l.prototype.links=p.emptyArray,l.prototype.droppedLinksCount=null,l.prototype.status=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&t.uint32(26).string(e.traceState),e.parentSpanId!=null&&Object.hasOwnProperty.call(e,"parentSpanId")&&t.uint32(34).bytes(e.parentSpanId),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(42).string(e.name),e.kind!=null&&Object.hasOwnProperty.call(e,"kind")&&t.uint32(48).int32(e.kind),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(57).fixed64(e.startTimeUnixNano),e.endTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"endTimeUnixNano")&&t.uint32(65).fixed64(e.endTimeUnixNano),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(74).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(80).uint32(e.droppedAttributesCount),e.events!=null&&e.events.length)for(var r=0;r<e.events.length;++r)f.opentelemetry.proto.trace.v1.Span.Event.encode(e.events[r],t.uint32(90).fork()).ldelim();if(e.droppedEventsCount!=null&&Object.hasOwnProperty.call(e,"droppedEventsCount")&&t.uint32(96).uint32(e.droppedEventsCount),e.links!=null&&e.links.length)for(var r=0;r<e.links.length;++r)f.opentelemetry.proto.trace.v1.Span.Link.encode(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&Object.hasOwnProperty.call(e,"droppedLinksCount")&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&Object.hasOwnProperty.call(e,"status")&&f.opentelemetry.proto.trace.v1.Status.encode(e.status,t.uint32(122).fork()).ldelim(),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Span;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.traceId=e.bytes();break}case 2:{a.spanId=e.bytes();break}case 3:{a.traceState=e.string();break}case 4:{a.parentSpanId=e.bytes();break}case 5:{a.name=e.string();break}case 6:{a.kind=e.int32();break}case 7:{a.startTimeUnixNano=e.fixed64();break}case 8:{a.endTimeUnixNano=e.fixed64();break}case 9:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 10:{a.droppedAttributesCount=e.uint32();break}case 11:{a.events&&a.events.length||(a.events=[]),a.events.push(f.opentelemetry.proto.trace.v1.Span.Event.decode(e,e.uint32()));break}case 12:{a.droppedEventsCount=e.uint32();break}case 13:{a.links&&a.links.length||(a.links=[]),a.links.push(f.opentelemetry.proto.trace.v1.Span.Link.decode(e,e.uint32()));break}case 14:{a.droppedLinksCount=e.uint32();break}case 15:{a.status=f.opentelemetry.proto.trace.v1.Status.decode(e,e.uint32());break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||p.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!p.isString(e.traceState))return"traceState: string expected";if(e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&!(e.parentSpanId&&typeof e.parentSpanId.length=="number"||p.isString(e.parentSpanId)))return"parentSpanId: buffer expected";if(e.name!=null&&e.hasOwnProperty("name")&&!p.isString(e.name))return"name: string expected";if(e.kind!=null&&e.hasOwnProperty("kind"))switch(e.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&!p.isInteger(e.endTimeUnixNano)&&!(e.endTimeUnixNano&&p.isInteger(e.endTimeUnixNano.low)&&p.isInteger(e.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(e.events!=null&&e.hasOwnProperty("events")){if(!Array.isArray(e.events))return"events: array expected";for(var t=0;t<e.events.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Event.verify(e.events[t]);if(r)return"events."+r}}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&!p.isInteger(e.droppedEventsCount))return"droppedEventsCount: integer expected";if(e.links!=null&&e.hasOwnProperty("links")){if(!Array.isArray(e.links))return"links: array expected";for(var t=0;t<e.links.length;++t){var r=f.opentelemetry.proto.trace.v1.Span.Link.verify(e.links[t]);if(r)return"links."+r}}if(e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&!p.isInteger(e.droppedLinksCount))return"droppedLinksCount: integer expected";if(e.status!=null&&e.hasOwnProperty("status")){var r=f.opentelemetry.proto.trace.v1.Status.verify(e.status);if(r)return"status."+r}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Span)return e;var t=new f.opentelemetry.proto.trace.v1.Span;switch(e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),e.traceState!=null&&(t.traceState=String(e.traceState)),e.parentSpanId!=null&&(typeof e.parentSpanId=="string"?p.base64.decode(e.parentSpanId,t.parentSpanId=p.newBuffer(p.base64.length(e.parentSpanId)),0):e.parentSpanId.length>=0&&(t.parentSpanId=e.parentSpanId)),e.name!=null&&(t.name=String(e.name)),e.kind){default:if(typeof e.kind=="number"){t.kind=e.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:t.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:t.kind=1;break;case"SPAN_KIND_SERVER":case 2:t.kind=2;break;case"SPAN_KIND_CLIENT":case 3:t.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:t.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:t.kind=5;break}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.endTimeUnixNano!=null&&(p.Long?(t.endTimeUnixNano=p.Long.fromValue(e.endTimeUnixNano)).unsigned=!1:typeof e.endTimeUnixNano=="string"?t.endTimeUnixNano=parseInt(e.endTimeUnixNano,10):typeof e.endTimeUnixNano=="number"?t.endTimeUnixNano=e.endTimeUnixNano:typeof e.endTimeUnixNano=="object"&&(t.endTimeUnixNano=new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber())),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.events){if(!Array.isArray(e.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");t.events=[];for(var r=0;r<e.events.length;++r){if(typeof e.events[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");t.events[r]=f.opentelemetry.proto.trace.v1.Span.Event.fromObject(e.events[r])}}if(e.droppedEventsCount!=null&&(t.droppedEventsCount=e.droppedEventsCount>>>0),e.links){if(!Array.isArray(e.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");t.links=[];for(var r=0;r<e.links.length;++r){if(typeof e.links[r]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");t.links[r]=f.opentelemetry.proto.trace.v1.Span.Link.fromObject(e.links[r])}}if(e.droppedLinksCount!=null&&(t.droppedLinksCount=e.droppedLinksCount>>>0),e.status!=null){if(typeof e.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");t.status=f.opentelemetry.proto.trace.v1.Status.fromObject(e.status)}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[],r.events=[],r.links=[]),t.defaults){if(t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),r.traceState="",t.bytes===String?r.parentSpanId="":(r.parentSpanId=[],t.bytes!==Array&&(r.parentSpanId=p.newBuffer(r.parentSpanId))),r.name="",r.kind=t.enums===String?"SPAN_KIND_UNSPECIFIED":0,p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.endTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.endTimeUnixNano=t.longs===String?"0":0;r.droppedAttributesCount=0,r.droppedEventsCount=0,r.droppedLinksCount=0,r.status=null}if(e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(r.traceState=e.traceState),e.parentSpanId!=null&&e.hasOwnProperty("parentSpanId")&&(r.parentSpanId=t.bytes===String?p.base64.encode(e.parentSpanId,0,e.parentSpanId.length):t.bytes===Array?Array.prototype.slice.call(e.parentSpanId):e.parentSpanId),e.name!=null&&e.hasOwnProperty("name")&&(r.name=e.name),e.kind!=null&&e.hasOwnProperty("kind")&&(r.kind=t.enums===String?f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]===void 0?e.kind:f.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]:e.kind),e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.endTimeUnixNano!=null&&e.hasOwnProperty("endTimeUnixNano")&&(typeof e.endTimeUnixNano=="number"?r.endTimeUnixNano=t.longs===String?String(e.endTimeUnixNano):e.endTimeUnixNano:r.endTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.endTimeUnixNano):t.longs===Number?new p.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber():e.endTimeUnixNano),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.events&&e.events.length){r.events=[];for(var s=0;s<e.events.length;++s)r.events[s]=f.opentelemetry.proto.trace.v1.Span.Event.toObject(e.events[s],t)}if(e.droppedEventsCount!=null&&e.hasOwnProperty("droppedEventsCount")&&(r.droppedEventsCount=e.droppedEventsCount),e.links&&e.links.length){r.links=[];for(var s=0;s<e.links.length;++s)r.links[s]=f.opentelemetry.proto.trace.v1.Span.Link.toObject(e.links[s],t)}return e.droppedLinksCount!=null&&e.hasOwnProperty("droppedLinksCount")&&(r.droppedLinksCount=e.droppedLinksCount),e.status!=null&&e.hasOwnProperty("status")&&(r.status=f.opentelemetry.proto.trace.v1.Status.toObject(e.status,t)),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span"},l.SpanKind=function(){var i={},e=Object.create(i);return e[i[0]="SPAN_KIND_UNSPECIFIED"]=0,e[i[1]="SPAN_KIND_INTERNAL"]=1,e[i[2]="SPAN_KIND_SERVER"]=2,e[i[3]="SPAN_KIND_CLIENT"]=3,e[i[4]="SPAN_KIND_PRODUCER"]=4,e[i[5]="SPAN_KIND_CONSUMER"]=5,e}(),l.Event=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.timeUnixNano=null,i.prototype.name=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(9).fixed64(t.timeUnixNano),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(18).string(t.name),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(32).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Event;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.timeUnixNano=t.fixed64();break}case 2:{s.name=t.string();break}case 3:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Event)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Event;if(t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.name!=null&&(r.name=String(t.name)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.name="",a.droppedAttributesCount=0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Event"},i}(),l.Link=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.attributes=p.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&r.uint32(26).string(t.traceState),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(34).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&r.uint32(40).uint32(t.droppedAttributesCount),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.trace.v1.Span.Link;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.traceId=t.bytes();break}case 2:{s.spanId=t.bytes();break}case 3:{s.traceState=t.string();break}case 4:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 5:{s.droppedAttributesCount=t.uint32();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||p.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!p.isString(t.traceState))return"traceState: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var a=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(a)return"attributes."+a}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.trace.v1.Span.Link)return t;var r=new f.opentelemetry.proto.trace.v1.Span.Link;if(t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceState!=null&&(r.traceState=String(t.traceState)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}return t.droppedAttributesCount!=null&&(r.droppedAttributesCount=t.droppedAttributesCount>>>0),r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[]),r.defaults&&(r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId))),r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),a.traceState="",a.droppedAttributesCount=0),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(a.traceState=t.traceState),t.attributes&&t.attributes.length){a.attributes=[];for(var s=0;s<t.attributes.length;++s)a.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[s],r)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(a.droppedAttributesCount=t.droppedAttributesCount),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span.Link"},i}(),l}(),c.Status=function(){function l(i){if(i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.message=null,l.prototype.code=null,l.create=function(e){return new l(e)},l.encode=function(e,t){return t||(t=T.create()),e.message!=null&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&t.uint32(24).int32(e.code),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.trace.v1.Status;e.pos<r;){var s=e.uint32();switch(s>>>3){case 2:{a.message=e.string();break}case 3:{a.code=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.message!=null&&e.hasOwnProperty("message")&&!p.isString(e.message))return"message: string expected";if(e.code!=null&&e.hasOwnProperty("code"))switch(e.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.trace.v1.Status)return e;var t=new f.opentelemetry.proto.trace.v1.Status;switch(e.message!=null&&(t.message=String(e.message)),e.code){default:if(typeof e.code=="number"){t.code=e.code;break}break;case"STATUS_CODE_UNSET":case 0:t.code=0;break;case"STATUS_CODE_OK":case 1:t.code=1;break;case"STATUS_CODE_ERROR":case 2:t.code=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.message="",r.code=t.enums===String?"STATUS_CODE_UNSET":0),e.message!=null&&e.hasOwnProperty("message")&&(r.message=e.message),e.code!=null&&e.hasOwnProperty("code")&&(r.code=t.enums===String?f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]===void 0?e.code:f.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]:e.code),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Status"},l.StatusCode=function(){var i={},e=Object.create(i);return e[i[0]="STATUS_CODE_UNSET"]=0,e[i[1]="STATUS_CODE_OK"]=1,e[i[2]="STATUS_CODE_ERROR"]=2,e}(),l}(),c}(),o}(),n.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var l={};return l.TraceService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportTraceServiceRequest=function(){function i(e){if(this.resourceSpans=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceSpans=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var a=0;a<t.resourceSpans.length;++a)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceSpans&&s.resourceSpans.length||(s.resourceSpans=[]),s.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var r=0;r<t.resourceSpans.length;++r){var a=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[r]);if(a)return"resourceSpans."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");r.resourceSpans=[];for(var a=0;a<t.resourceSpans.length;++a){if(typeof t.resourceSpans[a]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");r.resourceSpans[a]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){a.resourceSpans=[];for(var s=0;s<t.resourceSpans.length;++s)a.resourceSpans[s]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},i}(),l.ExportTraceServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},i}(),l.ExportTracePartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedSpans=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedSpans!=null&&Object.hasOwnProperty.call(t,"rejectedSpans")&&r.uint32(8).int64(t.rejectedSpans),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedSpans=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&!p.isInteger(t.rejectedSpans)&&!(t.rejectedSpans&&p.isInteger(t.rejectedSpans.low)&&p.isInteger(t.rejectedSpans.high))?"rejectedSpans: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return t;var r=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return t.rejectedSpans!=null&&(p.Long?(r.rejectedSpans=p.Long.fromValue(t.rejectedSpans)).unsigned=!1:typeof t.rejectedSpans=="string"?r.rejectedSpans=parseInt(t.rejectedSpans,10):typeof t.rejectedSpans=="number"?r.rejectedSpans=t.rejectedSpans:typeof t.rejectedSpans=="object"&&(r.rejectedSpans=new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedSpans=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedSpans=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedSpans!=null&&t.hasOwnProperty("rejectedSpans")&&(typeof t.rejectedSpans=="number"?a.rejectedSpans=r.longs===String?String(t.rejectedSpans):t.rejectedSpans:a.rejectedSpans=r.longs===String?p.Long.prototype.toString.call(t.rejectedSpans):r.longs===Number?new p.LongBits(t.rejectedSpans.low>>>0,t.rejectedSpans.high>>>0).toNumber():t.rejectedSpans),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},i}(),l}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var l={};return l.MetricsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportMetricsServiceRequest=function(){function i(e){if(this.resourceMetrics=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceMetrics=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var a=0;a<t.resourceMetrics.length;++a)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceMetrics&&s.resourceMetrics.length||(s.resourceMetrics=[]),s.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var r=0;r<t.resourceMetrics.length;++r){var a=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[r]);if(a)return"resourceMetrics."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");r.resourceMetrics=[];for(var a=0;a<t.resourceMetrics.length;++a){if(typeof t.resourceMetrics[a]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){a.resourceMetrics=[];for(var s=0;s<t.resourceMetrics.length;++s)a.resourceMetrics[s]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},i}(),l.ExportMetricsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},i}(),l.ExportMetricsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedDataPoints=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedDataPoints!=null&&Object.hasOwnProperty.call(t,"rejectedDataPoints")&&r.uint32(8).int64(t.rejectedDataPoints),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedDataPoints=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&!p.isInteger(t.rejectedDataPoints)&&!(t.rejectedDataPoints&&p.isInteger(t.rejectedDataPoints.low)&&p.isInteger(t.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return t.rejectedDataPoints!=null&&(p.Long?(r.rejectedDataPoints=p.Long.fromValue(t.rejectedDataPoints)).unsigned=!1:typeof t.rejectedDataPoints=="string"?r.rejectedDataPoints=parseInt(t.rejectedDataPoints,10):typeof t.rejectedDataPoints=="number"?r.rejectedDataPoints=t.rejectedDataPoints:typeof t.rejectedDataPoints=="object"&&(r.rejectedDataPoints=new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedDataPoints=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedDataPoints=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedDataPoints!=null&&t.hasOwnProperty("rejectedDataPoints")&&(typeof t.rejectedDataPoints=="number"?a.rejectedDataPoints=r.longs===String?String(t.rejectedDataPoints):t.rejectedDataPoints:a.rejectedDataPoints=r.longs===String?p.Long.prototype.toString.call(t.rejectedDataPoints):r.longs===Number?new p.LongBits(t.rejectedDataPoints.low>>>0,t.rejectedDataPoints.high>>>0).toNumber():t.rejectedDataPoints),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},i}(),l}(),c}(),o.logs=function(){var c={};return c.v1=function(){var l={};return l.LogsService=function(){function i(e,t,r){E.rpc.Service.call(this,e,t,r)}return(i.prototype=Object.create(E.rpc.Service.prototype)).constructor=i,i.create=function(t,r,a){return new this(t,r,a)},Object.defineProperty(i.prototype.export=function e(t,r){return this.rpcCall(e,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,t,r)},"name",{value:"Export"}),i}(),l.ExportLogsServiceRequest=function(){function i(e){if(this.resourceLogs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.resourceLogs=p.emptyArray,i.create=function(t){return new i(t)},i.encode=function(t,r){if(r||(r=T.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var a=0;a<t.resourceLogs.length;++a)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[a],r.uint32(10).fork()).ldelim();return r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.resourceLogs&&s.resourceLogs.length||(s.resourceLogs=[]),s.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var r=0;r<t.resourceLogs.length;++r){var a=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[r]);if(a)return"resourceLogs."+a}}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");r.resourceLogs=[];for(var a=0;a<t.resourceLogs.length;++a){if(typeof t.resourceLogs[a]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[a])}}return r},i.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){a.resourceLogs=[];for(var s=0;s<t.resourceLogs.length;++s)a.resourceLogs[s]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[s],r)}return a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},i}(),l.ExportLogsServiceResponse=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.partialSuccess=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.partialSuccess!=null&&Object.hasOwnProperty.call(t,"partialSuccess")&&f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(t.partialSuccess,r.uint32(10).fork()).ldelim(),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")){var r=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(t.partialSuccess);if(r)return"partialSuccess."+r}return null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(t.partialSuccess!=null){if(typeof t.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");r.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(t.partialSuccess)}return r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.partialSuccess=null),t.partialSuccess!=null&&t.hasOwnProperty("partialSuccess")&&(a.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(t.partialSuccess,r)),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},i}(),l.ExportLogsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.rejectedLogRecords=null,i.prototype.errorMessage=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.rejectedLogRecords!=null&&Object.hasOwnProperty.call(t,"rejectedLogRecords")&&r.uint32(8).int64(t.rejectedLogRecords),t.errorMessage!=null&&Object.hasOwnProperty.call(t,"errorMessage")&&r.uint32(18).string(t.errorMessage),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.rejectedLogRecords=t.int64();break}case 2:{s.errorMessage=t.string();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&!p.isInteger(t.rejectedLogRecords)&&!(t.rejectedLogRecords&&p.isInteger(t.rejectedLogRecords.low)&&p.isInteger(t.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&!p.isString(t.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return t;var r=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return t.rejectedLogRecords!=null&&(p.Long?(r.rejectedLogRecords=p.Long.fromValue(t.rejectedLogRecords)).unsigned=!1:typeof t.rejectedLogRecords=="string"?r.rejectedLogRecords=parseInt(t.rejectedLogRecords,10):typeof t.rejectedLogRecords=="number"?r.rejectedLogRecords=t.rejectedLogRecords:typeof t.rejectedLogRecords=="object"&&(r.rejectedLogRecords=new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber())),t.errorMessage!=null&&(r.errorMessage=String(t.errorMessage)),r},i.toObject=function(t,r){r||(r={});var a={};if(r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.rejectedLogRecords=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.rejectedLogRecords=r.longs===String?"0":0;a.errorMessage=""}return t.rejectedLogRecords!=null&&t.hasOwnProperty("rejectedLogRecords")&&(typeof t.rejectedLogRecords=="number"?a.rejectedLogRecords=r.longs===String?String(t.rejectedLogRecords):t.rejectedLogRecords:a.rejectedLogRecords=r.longs===String?p.Long.prototype.toString.call(t.rejectedLogRecords):r.longs===Number?new p.LongBits(t.rejectedLogRecords.low>>>0,t.rejectedLogRecords.high>>>0).toNumber():t.rejectedLogRecords),t.errorMessage!=null&&t.hasOwnProperty("errorMessage")&&(a.errorMessage=t.errorMessage),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},i}(),l}(),c}(),o}(),n.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function l(i){if(this.resourceMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceMetrics=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var r=0;r<e.resourceMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.MetricsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceMetrics&&a.resourceMetrics.length||(a.resourceMetrics=[]),a.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var t=0;t<e.resourceMetrics.length;++t){var r=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[t]);if(r)return"resourceMetrics."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.MetricsData)return e;var t=new f.opentelemetry.proto.metrics.v1.MetricsData;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");t.resourceMetrics=[];for(var r=0;r<e.resourceMetrics.length;++r){if(typeof e.resourceMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");t.resourceMetrics[r]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){r.resourceMetrics=[];for(var a=0;a<e.resourceMetrics.length;++a)r.resourceMetrics[a]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.MetricsData"},l}(),c.ResourceMetrics=function(){function l(i){if(this.scopeMetrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeMetrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeMetrics!=null&&e.scopeMetrics.length)for(var r=0;r<e.scopeMetrics.length;++r)f.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(e.scopeMetrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeMetrics&&a.scopeMetrics.length||(a.scopeMetrics=[]),a.scopeMetrics.push(f.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeMetrics!=null&&e.hasOwnProperty("scopeMetrics")){if(!Array.isArray(e.scopeMetrics))return"scopeMetrics: array expected";for(var r=0;r<e.scopeMetrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(e.scopeMetrics[r]);if(t)return"scopeMetrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ResourceMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeMetrics){if(!Array.isArray(e.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");t.scopeMetrics=[];for(var r=0;r<e.scopeMetrics.length;++r){if(typeof e.scopeMetrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");t.scopeMetrics[r]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(e.scopeMetrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeMetrics=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeMetrics&&e.scopeMetrics.length){r.scopeMetrics=[];for(var a=0;a<e.scopeMetrics.length;++a)r.scopeMetrics[a]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(e.scopeMetrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},l}(),c.ScopeMetrics=function(){function l(i){if(this.metrics=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.metrics=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.metrics!=null&&e.metrics.length)for(var r=0;r<e.metrics.length;++r)f.opentelemetry.proto.metrics.v1.Metric.encode(e.metrics[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.metrics&&a.metrics.length||(a.metrics=[]),a.metrics.push(f.opentelemetry.proto.metrics.v1.Metric.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.metrics!=null&&e.hasOwnProperty("metrics")){if(!Array.isArray(e.metrics))return"metrics: array expected";for(var r=0;r<e.metrics.length;++r){var t=f.opentelemetry.proto.metrics.v1.Metric.verify(e.metrics[r]);if(t)return"metrics."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ScopeMetrics)return e;var t=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.metrics){if(!Array.isArray(e.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");t.metrics=[];for(var r=0;r<e.metrics.length;++r){if(typeof e.metrics[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");t.metrics[r]=f.opentelemetry.proto.metrics.v1.Metric.fromObject(e.metrics[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.metrics=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.metrics&&e.metrics.length){r.metrics=[];for(var a=0;a<e.metrics.length;++a)r.metrics[a]=f.opentelemetry.proto.metrics.v1.Metric.toObject(e.metrics[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},l}(),c.Metric=function(){function l(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.name=null,l.prototype.description=null,l.prototype.unit=null,l.prototype.gauge=null,l.prototype.sum=null,l.prototype.histogram=null,l.prototype.exponentialHistogram=null,l.prototype.summary=null;var i;return Object.defineProperty(l.prototype,"data",{get:p.oneOfGetter(i=["gauge","sum","histogram","exponentialHistogram","summary"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){return r||(r=T.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&r.uint32(10).string(t.name),t.description!=null&&Object.hasOwnProperty.call(t,"description")&&r.uint32(18).string(t.description),t.unit!=null&&Object.hasOwnProperty.call(t,"unit")&&r.uint32(26).string(t.unit),t.gauge!=null&&Object.hasOwnProperty.call(t,"gauge")&&f.opentelemetry.proto.metrics.v1.Gauge.encode(t.gauge,r.uint32(42).fork()).ldelim(),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&f.opentelemetry.proto.metrics.v1.Sum.encode(t.sum,r.uint32(58).fork()).ldelim(),t.histogram!=null&&Object.hasOwnProperty.call(t,"histogram")&&f.opentelemetry.proto.metrics.v1.Histogram.encode(t.histogram,r.uint32(74).fork()).ldelim(),t.exponentialHistogram!=null&&Object.hasOwnProperty.call(t,"exponentialHistogram")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(t.exponentialHistogram,r.uint32(82).fork()).ldelim(),t.summary!=null&&Object.hasOwnProperty.call(t,"summary")&&f.opentelemetry.proto.metrics.v1.Summary.encode(t.summary,r.uint32(90).fork()).ldelim(),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Metric;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.name=t.string();break}case 2:{s.description=t.string();break}case 3:{s.unit=t.string();break}case 5:{s.gauge=f.opentelemetry.proto.metrics.v1.Gauge.decode(t,t.uint32());break}case 7:{s.sum=f.opentelemetry.proto.metrics.v1.Sum.decode(t,t.uint32());break}case 9:{s.histogram=f.opentelemetry.proto.metrics.v1.Histogram.decode(t,t.uint32());break}case 10:{s.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(t,t.uint32());break}case 11:{s.summary=f.opentelemetry.proto.metrics.v1.Summary.decode(t,t.uint32());break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.name!=null&&t.hasOwnProperty("name")&&!p.isString(t.name))return"name: string expected";if(t.description!=null&&t.hasOwnProperty("description")&&!p.isString(t.description))return"description: string expected";if(t.unit!=null&&t.hasOwnProperty("unit")&&!p.isString(t.unit))return"unit: string expected";if(t.gauge!=null&&t.hasOwnProperty("gauge")){r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Gauge.verify(t.gauge);if(a)return"gauge."+a}}if(t.sum!=null&&t.hasOwnProperty("sum")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Sum.verify(t.sum);if(a)return"sum."+a}}if(t.histogram!=null&&t.hasOwnProperty("histogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Histogram.verify(t.histogram);if(a)return"histogram."+a}}if(t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(t.exponentialHistogram);if(a)return"exponentialHistogram."+a}}if(t.summary!=null&&t.hasOwnProperty("summary")){if(r.data===1)return"data: multiple values";r.data=1;{var a=f.opentelemetry.proto.metrics.v1.Summary.verify(t.summary);if(a)return"summary."+a}}return null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Metric)return t;var r=new f.opentelemetry.proto.metrics.v1.Metric;if(t.name!=null&&(r.name=String(t.name)),t.description!=null&&(r.description=String(t.description)),t.unit!=null&&(r.unit=String(t.unit)),t.gauge!=null){if(typeof t.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");r.gauge=f.opentelemetry.proto.metrics.v1.Gauge.fromObject(t.gauge)}if(t.sum!=null){if(typeof t.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");r.sum=f.opentelemetry.proto.metrics.v1.Sum.fromObject(t.sum)}if(t.histogram!=null){if(typeof t.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");r.histogram=f.opentelemetry.proto.metrics.v1.Histogram.fromObject(t.histogram)}if(t.exponentialHistogram!=null){if(typeof t.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");r.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(t.exponentialHistogram)}if(t.summary!=null){if(typeof t.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");r.summary=f.opentelemetry.proto.metrics.v1.Summary.fromObject(t.summary)}return r},l.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.name="",a.description="",a.unit=""),t.name!=null&&t.hasOwnProperty("name")&&(a.name=t.name),t.description!=null&&t.hasOwnProperty("description")&&(a.description=t.description),t.unit!=null&&t.hasOwnProperty("unit")&&(a.unit=t.unit),t.gauge!=null&&t.hasOwnProperty("gauge")&&(a.gauge=f.opentelemetry.proto.metrics.v1.Gauge.toObject(t.gauge,r),r.oneofs&&(a.data="gauge")),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=f.opentelemetry.proto.metrics.v1.Sum.toObject(t.sum,r),r.oneofs&&(a.data="sum")),t.histogram!=null&&t.hasOwnProperty("histogram")&&(a.histogram=f.opentelemetry.proto.metrics.v1.Histogram.toObject(t.histogram,r),r.oneofs&&(a.data="histogram")),t.exponentialHistogram!=null&&t.hasOwnProperty("exponentialHistogram")&&(a.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(t.exponentialHistogram,r),r.oneofs&&(a.data="exponentialHistogram")),t.summary!=null&&t.hasOwnProperty("summary")&&(a.summary=f.opentelemetry.proto.metrics.v1.Summary.toObject(t.summary,r),r.oneofs&&(a.data="summary")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Metric"},l}(),c.Gauge=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Gauge;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Gauge)return e;var t=new f.opentelemetry.proto.metrics.v1.Gauge;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Gauge"},l}(),c.Sum=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.prototype.isMonotonic=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),e.isMonotonic!=null&&Object.hasOwnProperty.call(e,"isMonotonic")&&t.uint32(24).bool(e.isMonotonic),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Sum;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}case 3:{a.isMonotonic=e.bool();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&typeof e.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Sum)return e;var t=new f.opentelemetry.proto.metrics.v1.Sum;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return e.isMonotonic!=null&&(t.isMonotonic=!!e.isMonotonic),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,r.isMonotonic=!1),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),e.isMonotonic!=null&&e.hasOwnProperty("isMonotonic")&&(r.isMonotonic=e.isMonotonic),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Sum"},l}(),c.Histogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Histogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Histogram)return e;var t=new f.opentelemetry.proto.metrics.v1.Histogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Histogram"},l}(),c.ExponentialHistogram=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.prototype.aggregationTemporality=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return e.aggregationTemporality!=null&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(e,e.uint32()));break}case 2:{a.aggregationTemporality=e.int32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}if(e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogram)return e;var t=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(e.dataPoints[r])}}switch(e.aggregationTemporality){default:if(typeof e.aggregationTemporality=="number"){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2;break}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),t.defaults&&(r.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(e.dataPoints[a],t)}return e.aggregationTemporality!=null&&e.hasOwnProperty("aggregationTemporality")&&(r.aggregationTemporality=t.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]===void 0?e.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},l}(),c.Summary=function(){function l(i){if(this.dataPoints=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.dataPoints=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.dataPoints!=null&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.Summary;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.dataPoints&&a.dataPoints.length||(a.dataPoints=[]),a.dataPoints.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dataPoints!=null&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(e.dataPoints[t]);if(r)return"dataPoints."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.Summary)return e;var t=new f.opentelemetry.proto.metrics.v1.Summary;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");t.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r){if(typeof e.dataPoints[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");t.dataPoints[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(e.dataPoints[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.dataPoints=[]),e.dataPoints&&e.dataPoints.length){r.dataPoints=[];for(var a=0;a<e.dataPoints.length;++a)r.dataPoints[a]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(e.dataPoints[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Summary"},l}(),c.AggregationTemporality=function(){var l={},i=Object.create(l);return i[l[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,i[l[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,i[l[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,i}(),c.DataPointFlags=function(){var l={},i=Object.create(l);return i[l[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,i[l[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,i}(),c.NumberDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(33).double(t.asDouble),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(42).fork()).ldelim();if(t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(64).uint32(t.flags),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 5:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 8:{s.flags=t.uint32();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.NumberDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},l}(),c.HistogramDataPoint=function(){function l(e){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.bucketCounts=p.emptyArray,l.prototype.explicitBounds=p.emptyArray,l.prototype.exemplars=p.emptyArray,l.prototype.flags=null,l.prototype.min=null,l.prototype.max=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.bucketCounts!=null&&t.bucketCounts.length){r.uint32(50).fork();for(var a=0;a<t.bucketCounts.length;++a)r.fixed64(t.bucketCounts[a]);r.ldelim()}if(t.explicitBounds!=null&&t.explicitBounds.length){r.uint32(58).fork();for(var a=0;a<t.explicitBounds.length;++a)r.double(t.explicitBounds[a]);r.ldelim()}if(t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(66).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(74).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(89).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(97).double(t.max),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 9:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{if(s.bucketCounts&&s.bucketCounts.length||(s.bucketCounts=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.bucketCounts.push(t.fixed64());else s.bucketCounts.push(t.fixed64());break}case 7:{if(s.explicitBounds&&s.explicitBounds.length||(s.explicitBounds=[]),(d&7)===2)for(var v=t.uint32()+t.pos;t.pos<v;)s.explicitBounds.push(t.double());else s.explicitBounds.push(t.double());break}case 8:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 10:{s.flags=t.uint32();break}case 11:{s.min=t.double();break}case 12:{s.max=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.bucketCounts!=null&&t.hasOwnProperty("bucketCounts")){if(!Array.isArray(t.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<t.bucketCounts.length;++a)if(!p.isInteger(t.bucketCounts[a])&&!(t.bucketCounts[a]&&p.isInteger(t.bucketCounts[a].low)&&p.isInteger(t.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}if(t.explicitBounds!=null&&t.hasOwnProperty("explicitBounds")){if(!Array.isArray(t.explicitBounds))return"explicitBounds: array expected";for(var a=0;a<t.explicitBounds.length;++a)if(typeof t.explicitBounds[a]!="number")return"explicitBounds: number[] expected"}if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags)?"flags: integer expected":t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.HistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.bucketCounts){if(!Array.isArray(t.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");r.bucketCounts=[];for(var a=0;a<t.bucketCounts.length;++a)p.Long?(r.bucketCounts[a]=p.Long.fromValue(t.bucketCounts[a])).unsigned=!1:typeof t.bucketCounts[a]=="string"?r.bucketCounts[a]=parseInt(t.bucketCounts[a],10):typeof t.bucketCounts[a]=="number"?r.bucketCounts[a]=t.bucketCounts[a]:typeof t.bucketCounts[a]=="object"&&(r.bucketCounts[a]=new p.LongBits(t.bucketCounts[a].low>>>0,t.bucketCounts[a].high>>>0).toNumber())}if(t.explicitBounds){if(!Array.isArray(t.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");r.explicitBounds=[];for(var a=0;a<t.explicitBounds.length;++a)r.explicitBounds[a]=Number(t.explicitBounds[a])}if(t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.flags!=null&&(r.flags=t.flags>>>0),t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.bucketCounts=[],a.explicitBounds=[],a.exemplars=[],a.attributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;a.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.bucketCounts&&t.bucketCounts.length){a.bucketCounts=[];for(var d=0;d<t.bucketCounts.length;++d)typeof t.bucketCounts[d]=="number"?a.bucketCounts[d]=r.longs===String?String(t.bucketCounts[d]):t.bucketCounts[d]:a.bucketCounts[d]=r.longs===String?p.Long.prototype.toString.call(t.bucketCounts[d]):r.longs===Number?new p.LongBits(t.bucketCounts[d].low>>>0,t.bucketCounts[d].high>>>0).toNumber():t.bucketCounts[d]}if(t.explicitBounds&&t.explicitBounds.length){a.explicitBounds=[];for(var d=0;d<t.explicitBounds.length;++d)a.explicitBounds[d]=r.json&&!isFinite(t.explicitBounds[d])?String(t.explicitBounds[d]):t.explicitBounds[d]}if(t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}return t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},l}(),c.ExponentialHistogramDataPoint=function(){function l(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.scale=null,l.prototype.zeroCount=null,l.prototype.positive=null,l.prototype.negative=null,l.prototype.flags=null,l.prototype.exemplars=p.emptyArray,l.prototype.min=null,l.prototype.max=null,l.prototype.zeroThreshold=null;var i;return Object.defineProperty(l.prototype,"_sum",{get:p.oneOfGetter(i=["sum"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_min",{get:p.oneOfGetter(i=["min"]),set:p.oneOfSetter(i)}),Object.defineProperty(l.prototype,"_max",{get:p.oneOfGetter(i=["max"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.attributes!=null&&t.attributes.length)for(var a=0;a<t.attributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[a],r.uint32(10).fork()).ldelim();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&r.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&r.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&r.uint32(41).double(t.sum),t.scale!=null&&Object.hasOwnProperty.call(t,"scale")&&r.uint32(48).sint32(t.scale),t.zeroCount!=null&&Object.hasOwnProperty.call(t,"zeroCount")&&r.uint32(57).fixed64(t.zeroCount),t.positive!=null&&Object.hasOwnProperty.call(t,"positive")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.positive,r.uint32(66).fork()).ldelim(),t.negative!=null&&Object.hasOwnProperty.call(t,"negative")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(t.negative,r.uint32(74).fork()).ldelim(),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&r.uint32(80).uint32(t.flags),t.exemplars!=null&&t.exemplars.length)for(var a=0;a<t.exemplars.length;++a)f.opentelemetry.proto.metrics.v1.Exemplar.encode(t.exemplars[a],r.uint32(90).fork()).ldelim();return t.min!=null&&Object.hasOwnProperty.call(t,"min")&&r.uint32(97).double(t.min),t.max!=null&&Object.hasOwnProperty.call(t,"max")&&r.uint32(105).double(t.max),t.zeroThreshold!=null&&Object.hasOwnProperty.call(t,"zeroThreshold")&&r.uint32(113).double(t.zeroThreshold),r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.attributes&&s.attributes.length||(s.attributes=[]),s.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.startTimeUnixNano=t.fixed64();break}case 3:{s.timeUnixNano=t.fixed64();break}case 4:{s.count=t.fixed64();break}case 5:{s.sum=t.double();break}case 6:{s.scale=t.sint32();break}case 7:{s.zeroCount=t.fixed64();break}case 8:{s.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 9:{s.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(t,t.uint32());break}case 10:{s.flags=t.uint32();break}case 11:{s.exemplars&&s.exemplars.length||(s.exemplars=[]),s.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(t,t.uint32()));break}case 12:{s.min=t.double();break}case 13:{s.max=t.double();break}case 14:{s.zeroThreshold=t.double();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var a=0;a<t.attributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[a]);if(s)return"attributes."+s}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&p.isInteger(t.startTimeUnixNano.low)&&p.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!p.isInteger(t.count)&&!(t.count&&p.isInteger(t.count.low)&&p.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&(r._sum=1,typeof t.sum!="number"))return"sum: number expected";if(t.scale!=null&&t.hasOwnProperty("scale")&&!p.isInteger(t.scale))return"scale: integer expected";if(t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&!p.isInteger(t.zeroCount)&&!(t.zeroCount&&p.isInteger(t.zeroCount.low)&&p.isInteger(t.zeroCount.high)))return"zeroCount: integer|Long expected";if(t.positive!=null&&t.hasOwnProperty("positive")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.positive);if(s)return"positive."+s}if(t.negative!=null&&t.hasOwnProperty("negative")){var s=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(t.negative);if(s)return"negative."+s}if(t.flags!=null&&t.hasOwnProperty("flags")&&!p.isInteger(t.flags))return"flags: integer expected";if(t.exemplars!=null&&t.hasOwnProperty("exemplars")){if(!Array.isArray(t.exemplars))return"exemplars: array expected";for(var a=0;a<t.exemplars.length;++a){var s=f.opentelemetry.proto.metrics.v1.Exemplar.verify(t.exemplars[a]);if(s)return"exemplars."+s}}return t.min!=null&&t.hasOwnProperty("min")&&(r._min=1,typeof t.min!="number")?"min: number expected":t.max!=null&&t.hasOwnProperty("max")&&(r._max=1,typeof t.max!="number")?"max: number expected":t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&typeof t.zeroThreshold!="number"?"zeroThreshold: number expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return t;var r=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<t.attributes.length;++a){if(typeof t.attributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");r.attributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[a])}}if(t.startTimeUnixNano!=null&&(p.Long?(r.startTimeUnixNano=p.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?r.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(p.Long?(r.count=p.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?r.count=parseInt(t.count,10):typeof t.count=="number"?r.count=t.count:typeof t.count=="object"&&(r.count=new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(r.sum=Number(t.sum)),t.scale!=null&&(r.scale=t.scale|0),t.zeroCount!=null&&(p.Long?(r.zeroCount=p.Long.fromValue(t.zeroCount)).unsigned=!1:typeof t.zeroCount=="string"?r.zeroCount=parseInt(t.zeroCount,10):typeof t.zeroCount=="number"?r.zeroCount=t.zeroCount:typeof t.zeroCount=="object"&&(r.zeroCount=new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber())),t.positive!=null){if(typeof t.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");r.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.positive)}if(t.negative!=null){if(typeof t.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");r.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(t.negative)}if(t.flags!=null&&(r.flags=t.flags>>>0),t.exemplars){if(!Array.isArray(t.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<t.exemplars.length;++a){if(typeof t.exemplars[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");r.exemplars[a]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(t.exemplars[a])}}return t.min!=null&&(r.min=Number(t.min)),t.max!=null&&(r.max=Number(t.max)),t.zeroThreshold!=null&&(r.zeroThreshold=Number(t.zeroThreshold)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.attributes=[],a.exemplars=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.startTimeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;if(p.Long){var s=new p.Long(0,0,!1);a.count=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.count=r.longs===String?"0":0;if(a.scale=0,p.Long){var s=new p.Long(0,0,!1);a.zeroCount=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.zeroCount=r.longs===String?"0":0;a.positive=null,a.negative=null,a.flags=0,a.zeroThreshold=0}if(t.attributes&&t.attributes.length){a.attributes=[];for(var d=0;d<t.attributes.length;++d)a.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[d],r)}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?a.startTimeUnixNano=r.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:a.startTimeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.startTimeUnixNano):r.longs===Number?new p.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?a.count=r.longs===String?String(t.count):t.count:a.count=r.longs===String?p.Long.prototype.toString.call(t.count):r.longs===Number?new p.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(a.sum=r.json&&!isFinite(t.sum)?String(t.sum):t.sum,r.oneofs&&(a._sum="sum")),t.scale!=null&&t.hasOwnProperty("scale")&&(a.scale=t.scale),t.zeroCount!=null&&t.hasOwnProperty("zeroCount")&&(typeof t.zeroCount=="number"?a.zeroCount=r.longs===String?String(t.zeroCount):t.zeroCount:a.zeroCount=r.longs===String?p.Long.prototype.toString.call(t.zeroCount):r.longs===Number?new p.LongBits(t.zeroCount.low>>>0,t.zeroCount.high>>>0).toNumber():t.zeroCount),t.positive!=null&&t.hasOwnProperty("positive")&&(a.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.positive,r)),t.negative!=null&&t.hasOwnProperty("negative")&&(a.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(t.negative,r)),t.flags!=null&&t.hasOwnProperty("flags")&&(a.flags=t.flags),t.exemplars&&t.exemplars.length){a.exemplars=[];for(var d=0;d<t.exemplars.length;++d)a.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(t.exemplars[d],r)}return t.min!=null&&t.hasOwnProperty("min")&&(a.min=r.json&&!isFinite(t.min)?String(t.min):t.min,r.oneofs&&(a._min="min")),t.max!=null&&t.hasOwnProperty("max")&&(a.max=r.json&&!isFinite(t.max)?String(t.max):t.max,r.oneofs&&(a._max="max")),t.zeroThreshold!=null&&t.hasOwnProperty("zeroThreshold")&&(a.zeroThreshold=r.json&&!isFinite(t.zeroThreshold)?String(t.zeroThreshold):t.zeroThreshold),a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},l.Buckets=function(){function e(t){if(this.bucketCounts=[],t)for(var r=Object.keys(t),a=0;a<r.length;++a)t[r[a]]!=null&&(this[r[a]]=t[r[a]])}return e.prototype.offset=null,e.prototype.bucketCounts=p.emptyArray,e.create=function(r){return new e(r)},e.encode=function(r,a){if(a||(a=T.create()),r.offset!=null&&Object.hasOwnProperty.call(r,"offset")&&a.uint32(8).sint32(r.offset),r.bucketCounts!=null&&r.bucketCounts.length){a.uint32(18).fork();for(var s=0;s<r.bucketCounts.length;++s)a.uint64(r.bucketCounts[s]);a.ldelim()}return a},e.encodeDelimited=function(r,a){return this.encode(r,a).ldelim()},e.decode=function(r,a){r instanceof h||(r=h.create(r));for(var s=a===void 0?r.len:r.pos+a,d=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;r.pos<s;){var v=r.uint32();switch(v>>>3){case 1:{d.offset=r.sint32();break}case 2:{if(d.bucketCounts&&d.bucketCounts.length||(d.bucketCounts=[]),(v&7)===2)for(var S=r.uint32()+r.pos;r.pos<S;)d.bucketCounts.push(r.uint64());else d.bucketCounts.push(r.uint64());break}default:r.skipType(v&7);break}}return d},e.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},e.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.offset!=null&&r.hasOwnProperty("offset")&&!p.isInteger(r.offset))return"offset: integer expected";if(r.bucketCounts!=null&&r.hasOwnProperty("bucketCounts")){if(!Array.isArray(r.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<r.bucketCounts.length;++a)if(!p.isInteger(r.bucketCounts[a])&&!(r.bucketCounts[a]&&p.isInteger(r.bucketCounts[a].low)&&p.isInteger(r.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}return null},e.fromObject=function(r){if(r instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return r;var a=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(r.offset!=null&&(a.offset=r.offset|0),r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");a.bucketCounts=[];for(var s=0;s<r.bucketCounts.length;++s)p.Long?(a.bucketCounts[s]=p.Long.fromValue(r.bucketCounts[s])).unsigned=!0:typeof r.bucketCounts[s]=="string"?a.bucketCounts[s]=parseInt(r.bucketCounts[s],10):typeof r.bucketCounts[s]=="number"?a.bucketCounts[s]=r.bucketCounts[s]:typeof r.bucketCounts[s]=="object"&&(a.bucketCounts[s]=new p.LongBits(r.bucketCounts[s].low>>>0,r.bucketCounts[s].high>>>0).toNumber(!0))}return a},e.toObject=function(r,a){a||(a={});var s={};if((a.arrays||a.defaults)&&(s.bucketCounts=[]),a.defaults&&(s.offset=0),r.offset!=null&&r.hasOwnProperty("offset")&&(s.offset=r.offset),r.bucketCounts&&r.bucketCounts.length){s.bucketCounts=[];for(var d=0;d<r.bucketCounts.length;++d)typeof r.bucketCounts[d]=="number"?s.bucketCounts[d]=a.longs===String?String(r.bucketCounts[d]):r.bucketCounts[d]:s.bucketCounts[d]=a.longs===String?p.Long.prototype.toString.call(r.bucketCounts[d]):a.longs===Number?new p.LongBits(r.bucketCounts[d].low>>>0,r.bucketCounts[d].high>>>0).toNumber(!0):r.bucketCounts[d]}return s},e.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},e.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},e}(),l}(),c.SummaryDataPoint=function(){function l(i){if(this.attributes=[],this.quantileValues=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.attributes=p.emptyArray,l.prototype.startTimeUnixNano=null,l.prototype.timeUnixNano=null,l.prototype.count=null,l.prototype.sum=null,l.prototype.quantileValues=p.emptyArray,l.prototype.flags=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),e.quantileValues!=null&&e.quantileValues.length)for(var r=0;r<e.quantileValues.length;++r)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(e.quantileValues[r],t.uint32(50).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(64).uint32(e.flags),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;e.pos<r;){var s=e.uint32();switch(s>>>3){case 7:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{a.startTimeUnixNano=e.fixed64();break}case 3:{a.timeUnixNano=e.fixed64();break}case 4:{a.count=e.fixed64();break}case 5:{a.sum=e.double();break}case 6:{a.quantileValues&&a.quantileValues.length||(a.quantileValues=[]),a.quantileValues.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(e,e.uint32()));break}case 8:{a.flags=e.uint32();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var r=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(r)return"attributes."+r}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!p.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&p.isInteger(e.startTimeUnixNano.low)&&p.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!p.isInteger(e.count)&&!(e.count&&p.isInteger(e.count.low)&&p.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&typeof e.sum!="number")return"sum: number expected";if(e.quantileValues!=null&&e.hasOwnProperty("quantileValues")){if(!Array.isArray(e.quantileValues))return"quantileValues: array expected";for(var t=0;t<e.quantileValues.length;++t){var r=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(e.quantileValues[t]);if(r)return"quantileValues."+r}}return e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint)return e;var t=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}if(e.startTimeUnixNano!=null&&(p.Long?(t.startTimeUnixNano=p.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?t.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(t.startTimeUnixNano=new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(p.Long?(t.count=p.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?t.count=parseInt(e.count,10):typeof e.count=="number"?t.count=e.count:typeof e.count=="object"&&(t.count=new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(t.sum=Number(e.sum)),e.quantileValues){if(!Array.isArray(e.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");t.quantileValues=[];for(var r=0;r<e.quantileValues.length;++r){if(typeof e.quantileValues[r]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");t.quantileValues[r]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(e.quantileValues[r])}}return e.flags!=null&&(t.flags=e.flags>>>0),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.quantileValues=[],r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.startTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.startTimeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(p.Long){var a=new p.Long(0,0,!1);r.count=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.count=t.longs===String?"0":0;r.sum=0,r.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?r.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:r.startTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new p.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?r.count=t.longs===String?String(e.count):e.count:r.count=t.longs===String?p.Long.prototype.toString.call(e.count):t.longs===Number?new p.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(r.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum),e.quantileValues&&e.quantileValues.length){r.quantileValues=[];for(var s=0;s<e.quantileValues.length;++s)r.quantileValues[s]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(e.quantileValues[s],t)}if(e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},l.ValueAtQuantile=function(){function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}return i.prototype.quantile=null,i.prototype.value=null,i.create=function(t){return new i(t)},i.encode=function(t,r){return r||(r=T.create()),t.quantile!=null&&Object.hasOwnProperty.call(t,"quantile")&&r.uint32(9).double(t.quantile),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&r.uint32(17).double(t.value),r},i.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},i.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;t.pos<a;){var d=t.uint32();switch(d>>>3){case 1:{s.quantile=t.double();break}case 2:{s.value=t.double();break}default:t.skipType(d&7);break}}return s},i.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},i.verify=function(t){return typeof t!="object"||t===null?"object expected":t.quantile!=null&&t.hasOwnProperty("quantile")&&typeof t.quantile!="number"?"quantile: number expected":t.value!=null&&t.hasOwnProperty("value")&&typeof t.value!="number"?"value: number expected":null},i.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return t;var r=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return t.quantile!=null&&(r.quantile=Number(t.quantile)),t.value!=null&&(r.value=Number(t.value)),r},i.toObject=function(t,r){r||(r={});var a={};return r.defaults&&(a.quantile=0,a.value=0),t.quantile!=null&&t.hasOwnProperty("quantile")&&(a.quantile=r.json&&!isFinite(t.quantile)?String(t.quantile):t.quantile),t.value!=null&&t.hasOwnProperty("value")&&(a.value=r.json&&!isFinite(t.value)?String(t.value):t.value),a},i.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},i}(),l}(),c.Exemplar=function(){function l(e){if(this.filteredAttributes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)e[t[r]]!=null&&(this[t[r]]=e[t[r]])}l.prototype.filteredAttributes=p.emptyArray,l.prototype.timeUnixNano=null,l.prototype.asDouble=null,l.prototype.asInt=null,l.prototype.spanId=null,l.prototype.traceId=null;var i;return Object.defineProperty(l.prototype,"value",{get:p.oneOfGetter(i=["asDouble","asInt"]),set:p.oneOfSetter(i)}),l.create=function(t){return new l(t)},l.encode=function(t,r){if(r||(r=T.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&r.uint32(17).fixed64(t.timeUnixNano),t.asDouble!=null&&Object.hasOwnProperty.call(t,"asDouble")&&r.uint32(25).double(t.asDouble),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&r.uint32(34).bytes(t.spanId),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&r.uint32(42).bytes(t.traceId),t.asInt!=null&&Object.hasOwnProperty.call(t,"asInt")&&r.uint32(49).sfixed64(t.asInt),t.filteredAttributes!=null&&t.filteredAttributes.length)for(var a=0;a<t.filteredAttributes.length;++a)f.opentelemetry.proto.common.v1.KeyValue.encode(t.filteredAttributes[a],r.uint32(58).fork()).ldelim();return r},l.encodeDelimited=function(t,r){return this.encode(t,r).ldelim()},l.decode=function(t,r){t instanceof h||(t=h.create(t));for(var a=r===void 0?t.len:t.pos+r,s=new f.opentelemetry.proto.metrics.v1.Exemplar;t.pos<a;){var d=t.uint32();switch(d>>>3){case 7:{s.filteredAttributes&&s.filteredAttributes.length||(s.filteredAttributes=[]),s.filteredAttributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{s.timeUnixNano=t.fixed64();break}case 3:{s.asDouble=t.double();break}case 6:{s.asInt=t.sfixed64();break}case 4:{s.spanId=t.bytes();break}case 5:{s.traceId=t.bytes();break}default:t.skipType(d&7);break}}return s},l.decodeDelimited=function(t){return t instanceof h||(t=new h(t)),this.decode(t,t.uint32())},l.verify=function(t){if(typeof t!="object"||t===null)return"object expected";var r={};if(t.filteredAttributes!=null&&t.hasOwnProperty("filteredAttributes")){if(!Array.isArray(t.filteredAttributes))return"filteredAttributes: array expected";for(var a=0;a<t.filteredAttributes.length;++a){var s=f.opentelemetry.proto.common.v1.KeyValue.verify(t.filteredAttributes[a]);if(s)return"filteredAttributes."+s}}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!p.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&p.isInteger(t.timeUnixNano.low)&&p.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(r.value=1,typeof t.asDouble!="number"))return"asDouble: number expected";if(t.asInt!=null&&t.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!p.isInteger(t.asInt)&&!(t.asInt&&p.isInteger(t.asInt.low)&&p.isInteger(t.asInt.high)))return"asInt: integer|Long expected"}return t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||p.isString(t.spanId))?"spanId: buffer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||p.isString(t.traceId))?"traceId: buffer expected":null},l.fromObject=function(t){if(t instanceof f.opentelemetry.proto.metrics.v1.Exemplar)return t;var r=new f.opentelemetry.proto.metrics.v1.Exemplar;if(t.filteredAttributes){if(!Array.isArray(t.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");r.filteredAttributes=[];for(var a=0;a<t.filteredAttributes.length;++a){if(typeof t.filteredAttributes[a]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");r.filteredAttributes[a]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(t.filteredAttributes[a])}}return t.timeUnixNano!=null&&(p.Long?(r.timeUnixNano=p.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?r.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?r.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(r.timeUnixNano=new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.asDouble!=null&&(r.asDouble=Number(t.asDouble)),t.asInt!=null&&(p.Long?(r.asInt=p.Long.fromValue(t.asInt)).unsigned=!1:typeof t.asInt=="string"?r.asInt=parseInt(t.asInt,10):typeof t.asInt=="number"?r.asInt=t.asInt:typeof t.asInt=="object"&&(r.asInt=new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber())),t.spanId!=null&&(typeof t.spanId=="string"?p.base64.decode(t.spanId,r.spanId=p.newBuffer(p.base64.length(t.spanId)),0):t.spanId.length>=0&&(r.spanId=t.spanId)),t.traceId!=null&&(typeof t.traceId=="string"?p.base64.decode(t.traceId,r.traceId=p.newBuffer(p.base64.length(t.traceId)),0):t.traceId.length>=0&&(r.traceId=t.traceId)),r},l.toObject=function(t,r){r||(r={});var a={};if((r.arrays||r.defaults)&&(a.filteredAttributes=[]),r.defaults){if(p.Long){var s=new p.Long(0,0,!1);a.timeUnixNano=r.longs===String?s.toString():r.longs===Number?s.toNumber():s}else a.timeUnixNano=r.longs===String?"0":0;r.bytes===String?a.spanId="":(a.spanId=[],r.bytes!==Array&&(a.spanId=p.newBuffer(a.spanId))),r.bytes===String?a.traceId="":(a.traceId=[],r.bytes!==Array&&(a.traceId=p.newBuffer(a.traceId)))}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?a.timeUnixNano=r.longs===String?String(t.timeUnixNano):t.timeUnixNano:a.timeUnixNano=r.longs===String?p.Long.prototype.toString.call(t.timeUnixNano):r.longs===Number?new p.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.asDouble!=null&&t.hasOwnProperty("asDouble")&&(a.asDouble=r.json&&!isFinite(t.asDouble)?String(t.asDouble):t.asDouble,r.oneofs&&(a.value="asDouble")),t.spanId!=null&&t.hasOwnProperty("spanId")&&(a.spanId=r.bytes===String?p.base64.encode(t.spanId,0,t.spanId.length):r.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceId!=null&&t.hasOwnProperty("traceId")&&(a.traceId=r.bytes===String?p.base64.encode(t.traceId,0,t.traceId.length):r.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.asInt!=null&&t.hasOwnProperty("asInt")&&(typeof t.asInt=="number"?a.asInt=r.longs===String?String(t.asInt):t.asInt:a.asInt=r.longs===String?p.Long.prototype.toString.call(t.asInt):r.longs===Number?new p.LongBits(t.asInt.low>>>0,t.asInt.high>>>0).toNumber():t.asInt,r.oneofs&&(a.value="asInt")),t.filteredAttributes&&t.filteredAttributes.length){a.filteredAttributes=[];for(var d=0;d<t.filteredAttributes.length;++d)a.filteredAttributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(t.filteredAttributes[d],r)}return a},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Exemplar"},l}(),c}(),o}(),n.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function l(i){if(this.resourceLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resourceLogs=p.emptyArray,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var r=0;r<e.resourceLogs.length;++r)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[r],t.uint32(10).fork()).ldelim();return t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogsData;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resourceLogs&&a.resourceLogs.length||(a.resourceLogs=[]),a.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var t=0;t<e.resourceLogs.length;++t){var r=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[t]);if(r)return"resourceLogs."+r}}return null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogsData)return e;var t=new f.opentelemetry.proto.logs.v1.LogsData;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");t.resourceLogs=[];for(var r=0;r<e.resourceLogs.length;++r){if(typeof e.resourceLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");t.resourceLogs[r]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[r])}}return t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){r.resourceLogs=[];for(var a=0;a<e.resourceLogs.length;++a)r.resourceLogs[a]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[a],t)}return r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogsData"},l}(),c.ResourceLogs=function(){function l(i){if(this.scopeLogs=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.resource=null,l.prototype.scopeLogs=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.resource!=null&&Object.hasOwnProperty.call(e,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),e.scopeLogs!=null&&e.scopeLogs.length)for(var r=0;r<e.scopeLogs.length;++r)f.opentelemetry.proto.logs.v1.ScopeLogs.encode(e.scopeLogs[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ResourceLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.resource=f.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break}case 2:{a.scopeLogs&&a.scopeLogs.length||(a.scopeLogs=[]),a.scopeLogs.push(f.opentelemetry.proto.logs.v1.ScopeLogs.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.resource!=null&&e.hasOwnProperty("resource")){var t=f.opentelemetry.proto.resource.v1.Resource.verify(e.resource);if(t)return"resource."+t}if(e.scopeLogs!=null&&e.hasOwnProperty("scopeLogs")){if(!Array.isArray(e.scopeLogs))return"scopeLogs: array expected";for(var r=0;r<e.scopeLogs.length;++r){var t=f.opentelemetry.proto.logs.v1.ScopeLogs.verify(e.scopeLogs[r]);if(t)return"scopeLogs."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ResourceLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ResourceLogs;if(e.resource!=null){if(typeof e.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");t.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeLogs){if(!Array.isArray(e.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");t.scopeLogs=[];for(var r=0;r<e.scopeLogs.length;++r){if(typeof e.scopeLogs[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");t.scopeLogs[r]=f.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(e.scopeLogs[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.scopeLogs=[]),t.defaults&&(r.resource=null,r.schemaUrl=""),e.resource!=null&&e.hasOwnProperty("resource")&&(r.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeLogs&&e.scopeLogs.length){r.scopeLogs=[];for(var a=0;a<e.scopeLogs.length;++a)r.scopeLogs[a]=f.opentelemetry.proto.logs.v1.ScopeLogs.toObject(e.scopeLogs[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ResourceLogs"},l}(),c.ScopeLogs=function(){function l(i){if(this.logRecords=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.scope=null,l.prototype.logRecords=p.emptyArray,l.prototype.schemaUrl=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.scope!=null&&Object.hasOwnProperty.call(e,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),e.logRecords!=null&&e.logRecords.length)for(var r=0;r<e.logRecords.length;++r)f.opentelemetry.proto.logs.v1.LogRecord.encode(e.logRecords[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.ScopeLogs;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break}case 2:{a.logRecords&&a.logRecords.length||(a.logRecords=[]),a.logRecords.push(f.opentelemetry.proto.logs.v1.LogRecord.decode(e,e.uint32()));break}case 3:{a.schemaUrl=e.string();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.scope!=null&&e.hasOwnProperty("scope")){var t=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope);if(t)return"scope."+t}if(e.logRecords!=null&&e.hasOwnProperty("logRecords")){if(!Array.isArray(e.logRecords))return"logRecords: array expected";for(var r=0;r<e.logRecords.length;++r){var t=f.opentelemetry.proto.logs.v1.LogRecord.verify(e.logRecords[r]);if(t)return"logRecords."+t}}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&!p.isString(e.schemaUrl)?"schemaUrl: string expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.ScopeLogs)return e;var t=new f.opentelemetry.proto.logs.v1.ScopeLogs;if(e.scope!=null){if(typeof e.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");t.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.logRecords){if(!Array.isArray(e.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");t.logRecords=[];for(var r=0;r<e.logRecords.length;++r){if(typeof e.logRecords[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");t.logRecords[r]=f.opentelemetry.proto.logs.v1.LogRecord.fromObject(e.logRecords[r])}}return e.schemaUrl!=null&&(t.schemaUrl=String(e.schemaUrl)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.logRecords=[]),t.defaults&&(r.scope=null,r.schemaUrl=""),e.scope!=null&&e.hasOwnProperty("scope")&&(r.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.logRecords&&e.logRecords.length){r.logRecords=[];for(var a=0;a<e.logRecords.length;++a)r.logRecords[a]=f.opentelemetry.proto.logs.v1.LogRecord.toObject(e.logRecords[a],t)}return e.schemaUrl!=null&&e.hasOwnProperty("schemaUrl")&&(r.schemaUrl=e.schemaUrl),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ScopeLogs"},l}(),c.SeverityNumber=function(){var l={},i=Object.create(l);return i[l[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,i[l[1]="SEVERITY_NUMBER_TRACE"]=1,i[l[2]="SEVERITY_NUMBER_TRACE2"]=2,i[l[3]="SEVERITY_NUMBER_TRACE3"]=3,i[l[4]="SEVERITY_NUMBER_TRACE4"]=4,i[l[5]="SEVERITY_NUMBER_DEBUG"]=5,i[l[6]="SEVERITY_NUMBER_DEBUG2"]=6,i[l[7]="SEVERITY_NUMBER_DEBUG3"]=7,i[l[8]="SEVERITY_NUMBER_DEBUG4"]=8,i[l[9]="SEVERITY_NUMBER_INFO"]=9,i[l[10]="SEVERITY_NUMBER_INFO2"]=10,i[l[11]="SEVERITY_NUMBER_INFO3"]=11,i[l[12]="SEVERITY_NUMBER_INFO4"]=12,i[l[13]="SEVERITY_NUMBER_WARN"]=13,i[l[14]="SEVERITY_NUMBER_WARN2"]=14,i[l[15]="SEVERITY_NUMBER_WARN3"]=15,i[l[16]="SEVERITY_NUMBER_WARN4"]=16,i[l[17]="SEVERITY_NUMBER_ERROR"]=17,i[l[18]="SEVERITY_NUMBER_ERROR2"]=18,i[l[19]="SEVERITY_NUMBER_ERROR3"]=19,i[l[20]="SEVERITY_NUMBER_ERROR4"]=20,i[l[21]="SEVERITY_NUMBER_FATAL"]=21,i[l[22]="SEVERITY_NUMBER_FATAL2"]=22,i[l[23]="SEVERITY_NUMBER_FATAL3"]=23,i[l[24]="SEVERITY_NUMBER_FATAL4"]=24,i}(),c.LogRecordFlags=function(){var l={},i=Object.create(l);return i[l[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,i[l[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,i}(),c.LogRecord=function(){function l(i){if(this.attributes=[],i)for(var e=Object.keys(i),t=0;t<e.length;++t)i[e[t]]!=null&&(this[e[t]]=i[e[t]])}return l.prototype.timeUnixNano=null,l.prototype.observedTimeUnixNano=null,l.prototype.severityNumber=null,l.prototype.severityText=null,l.prototype.body=null,l.prototype.attributes=p.emptyArray,l.prototype.droppedAttributesCount=null,l.prototype.flags=null,l.prototype.traceId=null,l.prototype.spanId=null,l.create=function(e){return new l(e)},l.encode=function(e,t){if(t||(t=T.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(9).fixed64(e.timeUnixNano),e.severityNumber!=null&&Object.hasOwnProperty.call(e,"severityNumber")&&t.uint32(16).int32(e.severityNumber),e.severityText!=null&&Object.hasOwnProperty.call(e,"severityText")&&t.uint32(26).string(e.severityText),e.body!=null&&Object.hasOwnProperty.call(e,"body")&&f.opentelemetry.proto.common.v1.AnyValue.encode(e.body,t.uint32(42).fork()).ldelim(),e.attributes!=null&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)f.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(50).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(56).uint32(e.droppedAttributesCount),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(69).fixed32(e.flags),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(74).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(82).bytes(e.spanId),e.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"observedTimeUnixNano")&&t.uint32(89).fixed64(e.observedTimeUnixNano),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof h||(e=h.create(e));for(var r=t===void 0?e.len:e.pos+t,a=new f.opentelemetry.proto.logs.v1.LogRecord;e.pos<r;){var s=e.uint32();switch(s>>>3){case 1:{a.timeUnixNano=e.fixed64();break}case 11:{a.observedTimeUnixNano=e.fixed64();break}case 2:{a.severityNumber=e.int32();break}case 3:{a.severityText=e.string();break}case 5:{a.body=f.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break}case 6:{a.attributes&&a.attributes.length||(a.attributes=[]),a.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 7:{a.droppedAttributesCount=e.uint32();break}case 8:{a.flags=e.fixed32();break}case 9:{a.traceId=e.bytes();break}case 10:{a.spanId=e.bytes();break}default:e.skipType(s&7);break}}return a},l.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},l.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!p.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&p.isInteger(e.timeUnixNano.low)&&p.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&!p.isInteger(e.observedTimeUnixNano)&&!(e.observedTimeUnixNano&&p.isInteger(e.observedTimeUnixNano.low)&&p.isInteger(e.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(e.severityNumber!=null&&e.hasOwnProperty("severityNumber"))switch(e.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(e.severityText!=null&&e.hasOwnProperty("severityText")&&!p.isString(e.severityText))return"severityText: string expected";if(e.body!=null&&e.hasOwnProperty("body")){var t=f.opentelemetry.proto.common.v1.AnyValue.verify(e.body);if(t)return"body."+t}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var t=f.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(t)return"attributes."+t}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!p.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":e.flags!=null&&e.hasOwnProperty("flags")&&!p.isInteger(e.flags)?"flags: integer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||p.isString(e.traceId))?"traceId: buffer expected":e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||p.isString(e.spanId))?"spanId: buffer expected":null},l.fromObject=function(e){if(e instanceof f.opentelemetry.proto.logs.v1.LogRecord)return e;var t=new f.opentelemetry.proto.logs.v1.LogRecord;switch(e.timeUnixNano!=null&&(p.Long?(t.timeUnixNano=p.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?t.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?t.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(t.timeUnixNano=new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.observedTimeUnixNano!=null&&(p.Long?(t.observedTimeUnixNano=p.Long.fromValue(e.observedTimeUnixNano)).unsigned=!1:typeof e.observedTimeUnixNano=="string"?t.observedTimeUnixNano=parseInt(e.observedTimeUnixNano,10):typeof e.observedTimeUnixNano=="number"?t.observedTimeUnixNano=e.observedTimeUnixNano:typeof e.observedTimeUnixNano=="object"&&(t.observedTimeUnixNano=new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber())),e.severityNumber){default:if(typeof e.severityNumber=="number"){t.severityNumber=e.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:t.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:t.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:t.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:t.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:t.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:t.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:t.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:t.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:t.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:t.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:t.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:t.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:t.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:t.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:t.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:t.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:t.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:t.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:t.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:t.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:t.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:t.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:t.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:t.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:t.severityNumber=24;break}if(e.severityText!=null&&(t.severityText=String(e.severityText)),e.body!=null){if(typeof e.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");t.body=f.opentelemetry.proto.common.v1.AnyValue.fromObject(e.body)}if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");t.attributes=[];for(var r=0;r<e.attributes.length;++r){if(typeof e.attributes[r]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");t.attributes[r]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[r])}}return e.droppedAttributesCount!=null&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.flags!=null&&(t.flags=e.flags>>>0),e.traceId!=null&&(typeof e.traceId=="string"?p.base64.decode(e.traceId,t.traceId=p.newBuffer(p.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?p.base64.decode(e.spanId,t.spanId=p.newBuffer(p.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),t},l.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.attributes=[]),t.defaults){if(p.Long){var a=new p.Long(0,0,!1);r.timeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.timeUnixNano=t.longs===String?"0":0;if(r.severityNumber=t.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,r.severityText="",r.body=null,r.droppedAttributesCount=0,r.flags=0,t.bytes===String?r.traceId="":(r.traceId=[],t.bytes!==Array&&(r.traceId=p.newBuffer(r.traceId))),t.bytes===String?r.spanId="":(r.spanId=[],t.bytes!==Array&&(r.spanId=p.newBuffer(r.spanId))),p.Long){var a=new p.Long(0,0,!1);r.observedTimeUnixNano=t.longs===String?a.toString():t.longs===Number?a.toNumber():a}else r.observedTimeUnixNano=t.longs===String?"0":0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?r.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:r.timeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new p.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.severityNumber!=null&&e.hasOwnProperty("severityNumber")&&(r.severityNumber=t.enums===String?f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]===void 0?e.severityNumber:f.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]:e.severityNumber),e.severityText!=null&&e.hasOwnProperty("severityText")&&(r.severityText=e.severityText),e.body!=null&&e.hasOwnProperty("body")&&(r.body=f.opentelemetry.proto.common.v1.AnyValue.toObject(e.body,t)),e.attributes&&e.attributes.length){r.attributes=[];for(var s=0;s<e.attributes.length;++s)r.attributes[s]=f.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[s],t)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(r.droppedAttributesCount=e.droppedAttributesCount),e.flags!=null&&e.hasOwnProperty("flags")&&(r.flags=e.flags),e.traceId!=null&&e.hasOwnProperty("traceId")&&(r.traceId=t.bytes===String?p.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(r.spanId=t.bytes===String?p.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.observedTimeUnixNano!=null&&e.hasOwnProperty("observedTimeUnixNano")&&(typeof e.observedTimeUnixNano=="number"?r.observedTimeUnixNano=t.longs===String?String(e.observedTimeUnixNano):e.observedTimeUnixNano:r.observedTimeUnixNano=t.longs===String?p.Long.prototype.toString.call(e.observedTimeUnixNano):t.longs===Number?new p.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber():e.observedTimeUnixNano),r},l.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},l.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogRecord"},l}(),c}(),o}(),n}(),u}();ml.exports=f});var vo=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.ServiceClientType=void 0;var Sp;(function(u){u[u.SPANS=0]="SPANS",u[u.METRICS=1]="METRICS",u[u.LOGS=2]="LOGS"})(Sp=xe.ServiceClientType||(xe.ServiceClientType={}))});var Eo=m(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.getExportRequestProto=void 0;var _o=vl(),_l=vo();function Tp(u){return u===_l.ServiceClientType.SPANS?_o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:u===_l.ServiceClientType.LOGS?_o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:_o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}Gr.getExportRequestProto=Tp});var El=m(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.OTLPProtoExporterBrowserBase=void 0;var Op=(b(),M(y)),bo=_u(),gp=Eo(),So=class extends bo.OTLPExporterBrowserBase{constructor(n={}){super(n)}send(n,o,c){if(this._shutdownOnce.isCalled){Op.diag.debug("Shutdown already started. Cannot send objects");return}let l=this.convert(n),i=(0,gp.getExportRequestProto)(this.getServiceClientType()),e=i.create(l);if(e){let t=i.encode(e).finish();t&&(0,bo.sendWithXhr)(new Blob([t],{type:"application/x-protobuf"}),this.url,Object.assign(Object.assign({},this._headers),{"Content-Type":"application/x-protobuf",Accept:"application/x-protobuf"}),this.timeoutMillis,o,c)}else c(new bo.OTLPExporterError("No proto"))}};Hr.OTLPProtoExporterBrowserBase=So});var bl=m(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.ServiceClientType=ae.OTLPProtoExporterBrowserBase=void 0;var Ap=El();Object.defineProperty(ae,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return Ap.OTLPProtoExporterBrowserBase}});var Np=vo();Object.defineProperty(ae,"ServiceClientType",{enumerable:!0,get:function(){return Np.ServiceClientType}})});b();var Wt=P(D());b();var w=P(D()),Tt=P(St());var Ii="exception";var ws=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Cs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},wi=function(){function u(n,o,c,l,i,e,t,r,a,s){t===void 0&&(t=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:y.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=l,this.parentSpanId=e,this.kind=i,this.links=t;var d=Date.now();this._performanceStartTime=w.otperformance.now(),this._performanceOffset=d-(this._performanceStartTime+(0,w.getTimeOrigin)()),this._startTimeProvided=r!=null,this.startTime=this._getTime(r??d),this.resource=n.resource,this.instrumentationLibrary=n.instrumentationLibrary,this._spanLimits=n.getSpanLimits(),s!=null&&this.setAttributes(s),this._spanProcessor=n.getActiveSpanProcessor(),this._spanProcessor.onStart(this,o),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return u.prototype.spanContext=function(){return this._spanContext},u.prototype.setAttribute=function(n,o){return o==null||this._isSpanEnded()?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):(0,w.isAttributeValue)(o)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?(this._droppedAttributesCount++,this):(this.attributes[n]=this._truncateToSize(o),this):(y.diag.warn("Invalid attribute value set for key: "+n),this)},u.prototype.setAttributes=function(n){var o,c;try{for(var l=ws(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Cs(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.addEvent=function(n,o,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return y.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(y.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,w.isTimeInput)(o)&&((0,w.isTimeInput)(c)||(c=o),o=void 0);var l=(0,w.sanitizeAttributes)(o);return this.events.push({name:n,attributes:l,time:this._getTime(c),droppedAttributesCount:0}),this},u.prototype.setStatus=function(n){return this._isSpanEnded()?this:(this.status=n,this)},u.prototype.updateName=function(n){return this._isSpanEnded()?this:(this.name=n,this)},u.prototype.end=function(n){if(this._isSpanEnded()){y.diag.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(n),this._duration=(0,w.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(y.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this)},u.prototype._getTime=function(n){if(typeof n=="number"&&n<w.otperformance.now())return(0,w.hrTime)(n+this._performanceOffset);if(typeof n=="number")return(0,w.millisToHrTime)(n);if(n instanceof Date)return(0,w.millisToHrTime)(n.getTime());if((0,w.isTimeInputHrTime)(n))return n;if(this._startTimeProvided)return(0,w.millisToHrTime)(Date.now());var o=w.otperformance.now()-this._performanceStartTime;return(0,w.addHrTimes)(this.startTime,(0,w.millisToHrTime)(o))},u.prototype.isRecording=function(){return this._ended===!1},u.prototype.recordException=function(n,o){var c={};typeof n=="string"?c[Tt.SemanticAttributes.EXCEPTION_MESSAGE]=n:n&&(n.code?c[Tt.SemanticAttributes.EXCEPTION_TYPE]=n.code.toString():n.name&&(c[Tt.SemanticAttributes.EXCEPTION_TYPE]=n.name),n.message&&(c[Tt.SemanticAttributes.EXCEPTION_MESSAGE]=n.message),n.stack&&(c[Tt.SemanticAttributes.EXCEPTION_STACKTRACE]=n.stack)),c[Tt.SemanticAttributes.EXCEPTION_TYPE]||c[Tt.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(Ii,c,o):y.diag.warn("Failed to record an exception "+n)},Object.defineProperty(u.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),u.prototype._isSpanEnded=function(){return this._ended&&y.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substr(0,o)},u.prototype._truncateToSize=function(n){var o=this,c=this._attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u}();b();var V=P(D());var ft;(function(u){u[u.NOT_RECORD=0]="NOT_RECORD",u[u.RECORD=1]="RECORD",u[u.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}));var pt=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},u.prototype.toString=function(){return"AlwaysOffSampler"},u}();var $=function(){function u(){}return u.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},u.prototype.toString=function(){return"AlwaysOnSampler"},u}();b();var Ci=P(D());var Ot=function(){function u(n){var o,c,l,i;this._root=n.root,this._root||((0,Ci.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new $),this._remoteParentSampled=(o=n.remoteParentSampled)!==null&&o!==void 0?o:new $,this._remoteParentNotSampled=(c=n.remoteParentNotSampled)!==null&&c!==void 0?c:new pt,this._localParentSampled=(l=n.localParentSampled)!==null&&l!==void 0?l:new $,this._localParentNotSampled=(i=n.localParentNotSampled)!==null&&i!==void 0?i:new pt}return u.prototype.shouldSample=function(n,o,c,l,i,e){var t=y.trace.getSpanContext(n);return!t||!(0,y.isSpanContextValid)(t)?this._root.shouldSample(n,o,c,l,i,e):t.isRemote?t.traceFlags&y.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(n,o,c,l,i,e):this._remoteParentNotSampled.shouldSample(n,o,c,l,i,e):t.traceFlags&y.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(n,o,c,l,i,e):this._localParentNotSampled.shouldSample(n,o,c,l,i,e)},u.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},u}();b();var Yt=function(){function u(n){n===void 0&&(n=0),this._ratio=n,this._ratio=this._normalize(n),this._upperBound=Math.floor(this._ratio*4294967295)}return u.prototype.shouldSample=function(n,o){return{decision:(0,y.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},u.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},u.prototype._normalize=function(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n},u.prototype._accumulate=function(n){for(var o=0,c=0;c<n.length/8;c++){var l=c*8,i=parseInt(n.slice(l,l+8),16);o=(o^i)>>>0}return o},u}();var Us=(0,V.getEnv)(),Ms=V.TracesSamplerValues.AlwaysOn,Jt=1;function cr(){return{sampler:Nn(Us),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,V.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,V.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,V.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,V.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,V.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,V.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,V.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,V.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Nn(u){switch(u===void 0&&(u=(0,V.getEnv)()),u.OTEL_TRACES_SAMPLER){case V.TracesSamplerValues.AlwaysOn:return new $;case V.TracesSamplerValues.AlwaysOff:return new pt;case V.TracesSamplerValues.ParentBasedAlwaysOn:return new Ot({root:new $});case V.TracesSamplerValues.ParentBasedAlwaysOff:return new Ot({root:new pt});case V.TracesSamplerValues.TraceIdRatio:return new Yt(Ui(u));case V.TracesSamplerValues.ParentBasedTraceIdRatio:return new Ot({root:new Yt(Ui(u))});default:return y.diag.error('OTEL_TRACES_SAMPLER value "'+u.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Ms+'".'),new $}}function Ui(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Jt+"."),Jt;var n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Jt+"."),Jt):n<0||n>1?(y.diag.error("OTEL_TRACES_SAMPLER_ARG="+u.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Jt+"."),Jt):n}var zt=P(D());function Mi(u){var n={sampler:Nn()},o=cr(),c=Object.assign({},o,n,u);return c.generalLimits=Object.assign({},o.generalLimits,u.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,u.spanLimits||{}),c}function Di(u){var n,o,c,l,i,e,t,r,a,s,d,v,S=Object.assign({},u.spanLimits),g=(0,zt.getEnvWithoutDefaults)();return S.attributeCountLimit=(e=(i=(l=(o=(n=u.spanLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:(c=u.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&l!==void 0?l:g.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:g.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&e!==void 0?e:zt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,S.attributeValueLengthLimit=(v=(d=(s=(r=(t=u.spanLimits)===null||t===void 0?void 0:t.attributeValueLengthLimit)!==null&&r!==void 0?r:(a=u.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&s!==void 0?s:g.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:g.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&v!==void 0?v:zt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},u,{spanLimits:S})}b();var W=P(D()),Bi=function(){function u(n,o){this._exporter=n,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var c=(0,W.getEnv)();this._maxExportBatchSize=typeof o?.maxExportBatchSize=="number"?o.maxExportBatchSize:c.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof o?.maxQueueSize=="number"?o.maxQueueSize:c.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof o?.scheduledDelayMillis=="number"?o.scheduledDelayMillis:c.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof o?.exportTimeoutMillis=="number"?o.exportTimeoutMillis:c.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new W.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(y.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){this._shutdownOnce.isCalled||n.spanContext().traceFlags&y.TraceFlags.SAMPLED&&this._addToBuffer(n)},u.prototype.shutdown=function(){return this._shutdownOnce.call()},u.prototype._shutdown=function(){var n=this;return Promise.resolve().then(function(){return n.onShutdown()}).then(function(){return n._flushAll()}).then(function(){return n._exporter.shutdown()})},u.prototype._addToBuffer=function(n){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&y.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(y.diag.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(n),this._maybeStartTimer()},u.prototype._flushAll=function(){var n=this;return new Promise(function(o,c){for(var l=[],i=Math.ceil(n._finishedSpans.length/n._maxExportBatchSize),e=0,t=i;e<t;e++)l.push(n._flushOneBatch());Promise.all(l).then(function(){o()}).catch(c)})},u.prototype._flushOneBatch=function(){var n=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(o,c){var l=setTimeout(function(){c(new Error("Timeout"))},n._exportTimeoutMillis);y.context.with((0,W.suppressTracing)(y.context.active()),function(){var i=n._finishedSpans.splice(0,n._maxExportBatchSize),e=function(){return n._exporter.export(i,function(r){var a;clearTimeout(l),r.code===W.ExportResultCode.SUCCESS?o():c((a=r.error)!==null&&a!==void 0?a:new Error("BatchSpanProcessor: span export failed"))})},t=i.map(function(r){return r.resource}).filter(function(r){return r.asyncAttributesPending});t.length===0?e():Promise.all(t.map(function(r){var a;return(a=r.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(r)})).then(e,function(r){(0,W.globalErrorHandler)(r),c(r)})})})},u.prototype._maybeStartTimer=function(){var n=this;if(!this._isExporting){var o=function(){n._isExporting=!0,n._flushOneBatch().then(function(){n._isExporting=!1,n._finishedSpans.length>0&&(n._clearTimer(),n._maybeStartTimer())}).catch(function(c){n._isExporting=!1,(0,W.globalErrorHandler)(c)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return o();this._timer===void 0&&(this._timer=setTimeout(function(){return o()},this._scheduledDelayMillis),(0,W.unrefTimer)(this._timer))}},u.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},u}();var Ds=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),me=function(u){Ds(n,u);function n(o,c){var l=u.call(this,o,c)||this;return l.onInit(c),l}return n.prototype.onInit=function(o){var c=this;o?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&c.forceFlush()},this._pageHideListener=function(){c.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},n.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},n}(Bi);var Bs=8,ks=16,fr=function(){function u(){this.generateTraceId=ki(ks),this.generateSpanId=ki(Bs)}return u}();var sr=Array(32);function ki(u){return function(){for(var o=0;o<u*2;o++)sr[o]=Math.floor(Math.random()*16)+48,sr[o]>=58&&(sr[o]+=39);return String.fromCharCode.apply(null,sr.slice(0,u*2))}}var Vi=function(){function u(n,o,c){this._tracerProvider=c;var l=Mi(o);this._sampler=l.sampler,this._generalLimits=l.generalLimits,this._spanLimits=l.spanLimits,this._idGenerator=o.idGenerator||new fr,this.resource=c.resource,this.instrumentationLibrary=n}return u.prototype.startSpan=function(n,o,c){var l,i,e;o===void 0&&(o={}),c===void 0&&(c=y.context.active()),o.root&&(c=y.trace.deleteSpan(c));var t=y.trace.getSpan(c);if((0,Wt.isTracingSuppressed)(c)){y.diag.debug("Instrumentation suppressed, returning Noop Span");var r=y.trace.wrapSpanContext(y.INVALID_SPAN_CONTEXT);return r}var a=t?.spanContext(),s=this._idGenerator.generateSpanId(),d,v,S;!a||!y.trace.isSpanContextValid(a)?d=this._idGenerator.generateTraceId():(d=a.traceId,v=a.traceState,S=a.spanId);var g=(l=o.kind)!==null&&l!==void 0?l:y.SpanKind.INTERNAL,L=((i=o.links)!==null&&i!==void 0?i:[]).map(function(To){return{context:To.context,attributes:(0,Wt.sanitizeAttributes)(To.attributes)}}),A=(0,Wt.sanitizeAttributes)(o.attributes),K=this._sampler.shouldSample(c,d,n,g,A,L);v=(e=K.traceState)!==null&&e!==void 0?e:v;var X=K.decision===y.SamplingDecision.RECORD_AND_SAMPLED?y.TraceFlags.SAMPLED:y.TraceFlags.NONE,Re={traceId:d,spanId:s,traceFlags:X,traceState:v};if(K.decision===y.SamplingDecision.NOT_RECORD){y.diag.debug("Recording is off, propagating context in a non-recording span");var r=y.trace.wrapSpanContext(Re);return r}var tt=(0,Wt.sanitizeAttributes)(Object.assign(A,K.attributes)),J=new wi(this,c,n,Re,g,S,L,o.startTime,void 0,tt);return J},u.prototype.startActiveSpan=function(n,o,c,l){var i,e,t;if(!(arguments.length<2)){arguments.length===2?t=o:arguments.length===3?(i=o,t=c):(i=o,e=c,t=l);var r=e??y.context.active(),a=this.startSpan(n,i,r),s=y.trace.setSpan(r,a);return y.context.with(s,t,void 0,a)}},u.prototype.getGeneralLimits=function(){return this._generalLimits},u.prototype.getSpanLimits=function(){return this._spanLimits},u.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},u}();b();var nt=P(D());b();var gt=P(St()),pr=P(D());function Gi(){return"unknown_service"}var At=function(){return At=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},At.apply(this,arguments)},Vs=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Gs=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Hs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},q=function(){function u(n,o){var c=this,l;this._attributes=n,this.asyncAttributesPending=o!=null,this._syncAttributes=(l=this._attributes)!==null&&l!==void 0?l:{},this._asyncAttributesPromise=o?.then(function(i){return c._attributes=Object.assign({},c._attributes,i),c.asyncAttributesPending=!1,i},function(i){return y.diag.debug("a resource's async attributes promise rejected: %s",i),c.asyncAttributesPending=!1,{}})}return u.empty=function(){return u.EMPTY},u.default=function(){var n;return new u((n={},n[gt.SemanticResourceAttributes.SERVICE_NAME]=Gi(),n[gt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=pr.SDK_INFO[gt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],n[gt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=pr.SDK_INFO[gt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],n[gt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=pr.SDK_INFO[gt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],n))},Object.defineProperty(u.prototype,"attributes",{get:function(){var n;return this.asyncAttributesPending&&y.diag.error("Accessing resource attributes before async attributes settled"),(n=this._attributes)!==null&&n!==void 0?n:{}},enumerable:!1,configurable:!0}),u.prototype.waitForAsyncAttributes=function(){return Vs(this,void 0,void 0,function(){return Gs(this,function(n){switch(n.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},u.prototype.merge=function(n){var o=this,c;if(!n)return this;var l=At(At({},this._syncAttributes),(c=n._syncAttributes)!==null&&c!==void 0?c:n.attributes);if(!this._asyncAttributesPromise&&!n._asyncAttributesPromise)return new u(l);var i=Promise.all([this._asyncAttributesPromise,n._asyncAttributesPromise]).then(function(e){var t,r=Hs(e,2),a=r[0],s=r[1];return At(At(At(At({},o._syncAttributes),a),(t=n._syncAttributes)!==null&&t!==void 0?t:n.attributes),s)});return new u(l,i)},u.EMPTY=new u({}),u}();b();var Hi=P(D()),ji=P(St());var js=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Fs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},qs=function(){function u(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return u.prototype.detect=function(n){var o={},c=(0,Hi.getEnv)(),l=c.OTEL_RESOURCE_ATTRIBUTES,i=c.OTEL_SERVICE_NAME;if(l)try{var e=this._parseResourceAttributes(l);Object.assign(o,e)}catch(t){y.diag.debug("EnvDetector failed: "+t.message)}return i&&(o[ji.SemanticResourceAttributes.SERVICE_NAME]=i),new q(o)},u.prototype._parseResourceAttributes=function(n){var o,c;if(!n)return{};var l={},i=n.split(this._COMMA_SEPARATOR,-1);try{for(var e=js(i),t=e.next();!t.done;t=e.next()){var r=t.value,a=r.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length===2){var s=Fs(a,2),d=s[0],v=s[1];if(d=d.trim(),v=v.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(d))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(v))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);l[d]=decodeURIComponent(v)}}}catch(S){o={error:S}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.prototype._isValid=function(n){return n.length<=this._MAX_LENGTH&&this._isBaggageOctetString(n)},u.prototype._isBaggageOctetString=function(n){for(var o=0;o<n.length;o++){var c=n.charCodeAt(o);if(c<33||c===44||c===59||c===92||c>126)return!1}return!0},u.prototype._isValidAndNotEmpty=function(n){return n.length>0&&this._isValid(n)},u}(),Fi=new qs;b();var qi=function(u){return u!==null&&typeof u=="object"&&typeof u.then=="function"};var Ks=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Xs=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var Ki=function(u){var n;u===void 0&&(u={});var o=((n=u.detectors)!==null&&n!==void 0?n:[]).map(function(l){try{var i=l.detect(u),e;if(qi(i)){var t=function(){return Ks(void 0,void 0,void 0,function(){var r;return Xs(this,function(a){switch(a.label){case 0:return[4,i];case 1:return r=a.sent(),[2,r.attributes]}})})};e=new q({},t())}else e=i;return e.waitForAsyncAttributes?e.waitForAsyncAttributes().then(function(){return y.diag.debug(l.constructor.name+" found resource.",e)}):y.diag.debug(l.constructor.name+" found resource.",e),e}catch(r){return y.diag.error(l.constructor.name+" failed: "+r.message),q.empty()}}),c=o.reduce(function(l,i){return l.merge(i)},q.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(function(){Ys(o)}),c},Ys=function(u){u.forEach(function(n){if(Object.keys(n.attributes).length>0){var o=JSON.stringify(n.attributes,null,4);y.diag.verbose(o)}})};var Xi=P(D()),dr=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Yi=function(){function u(n){this._spanProcessors=n}return u.prototype.forceFlush=function(){var n,o,c=[];try{for(var l=dr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.forceFlush())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t){Promise.all(c).then(function(){t()}).catch(function(r){(0,Xi.globalErrorHandler)(r||new Error("MultiSpanProcessor: forceFlush failed")),t()})})},u.prototype.onStart=function(n,o){var c,l;try{for(var i=dr(this._spanProcessors),e=i.next();!e.done;e=i.next()){var t=e.value;t.onStart(n,o)}}catch(r){c={error:r}}finally{try{e&&!e.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}}},u.prototype.onEnd=function(n){var o,c;try{for(var l=dr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;e.onEnd(n)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}},u.prototype.shutdown=function(){var n,o,c=[];try{for(var l=dr(this._spanProcessors),i=l.next();!i.done;i=l.next()){var e=i.value;c.push(e.shutdown())}}catch(t){n={error:t}}finally{try{i&&!i.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return new Promise(function(t,r){Promise.all(c).then(function(){t()},r)})},u}();var Ji=function(){function u(){}return u.prototype.onStart=function(n,o){},u.prototype.onEnd=function(n){},u.prototype.shutdown=function(){return Promise.resolve()},u.prototype.forceFlush=function(){return Promise.resolve()},u}();var Vt;(function(u){u[u.resolved=0]="resolved",u[u.timeout=1]="timeout",u[u.error=2]="error",u[u.unresolved=3]="unresolved"})(Vt||(Vt={}));var zi=function(){function u(n){n===void 0&&(n={});var o;this._registeredSpanProcessors=[],this._tracers=new Map;var c=(0,nt.merge)({},cr(),Di(n));this.resource=(o=c.resource)!==null&&o!==void 0?o:q.empty(),this.resource=q.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});var l=this._buildExporterFromEnv();if(l!==void 0){var i=new me(l);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Ji}return u.prototype.getTracer=function(n,o,c){var l=n+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._tracers.has(l)||this._tracers.set(l,new Vi({name:n,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(l)},u.prototype.addSpanProcessor=function(n){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current span processor",o)}),this._registeredSpanProcessors.push(n),this.activeSpanProcessor=new Yi(this._registeredSpanProcessors)},u.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},u.prototype.register=function(n){n===void 0&&(n={}),y.trace.setGlobalTracerProvider(this),n.propagator===void 0&&(n.propagator=this._buildPropagatorFromEnv()),n.contextManager&&y.context.setGlobalContextManager(n.contextManager),n.propagator&&y.propagation.setGlobalPropagator(n.propagator)},u.prototype.forceFlush=function(){var n=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(function(c){return new Promise(function(l){var i,e=setTimeout(function(){l(new Error("Span processor did not completed within timeout period of "+n+" ms")),i=Vt.timeout},n);c.forceFlush().then(function(){clearTimeout(e),i!==Vt.timeout&&(i=Vt.resolved,l(i))}).catch(function(t){clearTimeout(e),i=Vt.error,l(t)})})});return new Promise(function(c,l){Promise.all(o).then(function(i){var e=i.filter(function(t){return t!==Vt.resolved});e.length>0?l(e):c()}).catch(function(i){return l([i])})})},u.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},u.prototype._getPropagator=function(n){var o;return(o=this.constructor._registeredPropagators.get(n))===null||o===void 0?void 0:o()},u.prototype._getSpanExporter=function(n){var o;return(o=this.constructor._registeredExporters.get(n))===null||o===void 0?void 0:o()},u.prototype._buildPropagatorFromEnv=function(){var n=this,o=Array.from(new Set((0,nt.getEnv)().OTEL_PROPAGATORS)),c=o.map(function(i){var e=n._getPropagator(i);return e||y.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),e}),l=c.reduce(function(i,e){return e&&i.push(e),i},[]);if(l.length!==0)return o.length===1?l[0]:new nt.CompositePropagator({propagators:l})},u.prototype._buildExporterFromEnv=function(){var n=(0,nt.getEnv)().OTEL_TRACES_EXPORTER;if(!(n==="none"||n==="")){var o=this._getSpanExporter(n);return o||y.diag.error('Exporter "'+n+'" requested through environment variable is unavailable.'),o}},u._registeredPropagators=new Map([["tracecontext",function(){return new nt.W3CTraceContextPropagator}],["baggage",function(){return new nt.W3CBaggagePropagator}]]),u._registeredExporters=new Map,u}();b();var dt={};et(dt,Uy);import*as Uy from"@opentelemetry/api-logs";var Pl=P(Zi(),1);b();var hr=P(D());b();b();b();var $t=P(D()),$s=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Qs=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},ta=function(){function u(n,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var l=c.timestamp,i=c.observedTimestamp,e=c.severityNumber,t=c.severityText,r=c.body,a=c.attributes,s=a===void 0?{}:a,d=c.context,v=Date.now();if(this.hrTime=(0,$t.timeInputToHrTime)(l??v),this.hrTimeObserved=(0,$t.timeInputToHrTime)(i??v),d){var S=y.trace.getSpanContext(d);S&&y.isSpanContextValid(S)&&(this.spanContext=S)}this.severityNumber=e,this.severityText=t,this.body=r,this.resource=n.resource,this.instrumentationScope=o,this._logRecordLimits=n.logRecordLimits,this.setAttributes(s)}return Object.defineProperty(u.prototype,"severityText",{get:function(){return this._severityText},set:function(n){this._isLogRecordReadonly()||(this._severityText=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(n){this._isLogRecordReadonly()||(this._severityNumber=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"body",{get:function(){return this._body},set:function(n){this._isLogRecordReadonly()||(this._body=n)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),u.prototype.setAttribute=function(n,o){return this._isLogRecordReadonly()?this:o===null?this:n.length===0?(y.diag.warn("Invalid attribute key: "+n),this):!(0,$t.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(y.diag.warn("Invalid attribute value set for key: "+n),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,n)?this:((0,$t.isAttributeValue)(o)?this.attributes[n]=this._truncateToSize(o):this.attributes[n]=o,this))},u.prototype.setAttributes=function(n){var o,c;try{for(var l=$s(Object.entries(n)),i=l.next();!i.done;i=l.next()){var e=Qs(i.value,2),t=e[0],r=e[1];this.setAttribute(t,r)}}catch(a){o={error:a}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return this},u.prototype.setBody=function(n){return this.body=n,this},u.prototype.setSeverityNumber=function(n){return this.severityNumber=n,this},u.prototype.setSeverityText=function(n){return this.severityText=n,this},u.prototype._makeReadonly=function(){this._isReadonly=!0},u.prototype._truncateToSize=function(n){var o=this,c=this._logRecordLimits.attributeValueLengthLimit;return c<=0?(y.diag.warn("Attribute value limit must be positive, got "+c),n):typeof n=="string"?this._truncateToLimitUtil(n,c):Array.isArray(n)?n.map(function(l){return typeof l=="string"?o._truncateToLimitUtil(l,c):l}):n},u.prototype._truncateToLimitUtil=function(n,o){return n.length<=o?n:n.substring(0,o)},u.prototype._isLogRecordReadonly=function(){return this._isReadonly&&y.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly},u}();var xn=function(){return xn=Object.assign||function(u){for(var n,o=1,c=arguments.length;o<c;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(u[l]=n[l])}return u},xn.apply(this,arguments)},ea=function(){function u(n,o){this.instrumentationScope=n,this._sharedState=o}return u.prototype.emit=function(n){var o=n.context||y.context.active(),c=new ta(this._sharedState,this.instrumentationScope,xn({context:o},n));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()},u}();var yt=P(D());function ra(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,yt.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,yt.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function na(u){var n,o,c,l,i,e,t=(0,yt.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(n=u.attributeCountLimit)!==null&&n!==void 0?n:t.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:t.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:yt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(e=(i=(l=u.attributeValueLengthLimit)!==null&&l!==void 0?l:t.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&i!==void 0?i:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&e!==void 0?e:yt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var aa=P(D()),oa=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},ia=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ua=function(){function u(n,o){this.processors=n,this.forceFlushTimeoutMillis=o}return u.prototype.forceFlush=function(){return oa(this,void 0,void 0,function(){var n;return ia(this,function(o){switch(o.label){case 0:return n=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(c){return(0,aa.callWithTimeout)(c.forceFlush(),n)}))];case 1:return o.sent(),[2]}})})},u.prototype.onEmit=function(n,o){this.processors.forEach(function(c){return c.onEmit(n,o)})},u.prototype.shutdown=function(){return oa(this,void 0,void 0,function(){return ia(this,function(n){switch(n.label){case 0:return[4,Promise.all(this.processors.map(function(o){return o.shutdown()}))];case 1:return n.sent(),[2]}})})},u}();var la=function(){function u(){}return u.prototype.forceFlush=function(){return Promise.resolve()},u.prototype.onEmit=function(n,o){},u.prototype.shutdown=function(){return Promise.resolve()},u}();var ca=function(){function u(n,o,c){this.resource=n,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new la}return u}();var Zs="unknown",Rn=function(){function u(n){n===void 0&&(n={});var o=(0,hr.merge)({},ra(),n),c=o.resource,l=c===void 0?q.default():c,i=o.logRecordLimits,e=o.forceFlushTimeoutMillis;this._sharedState=new ca(l,e,na(i)),this._shutdownOnce=new hr.BindOnceFuture(this._shutdown,this)}return u.prototype.getLogger=function(n,o,c){if(this._shutdownOnce.isCalled)return y.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),dt.NOOP_LOGGER;n||y.diag.warn("Logger requested without instrumentation scope name.");var l=n||Zs,i=l+"@"+(o||"")+":"+(c?.schemaUrl||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new ea({name:l,version:o,schemaUrl:c?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)},u.prototype.addLogRecordProcessor=function(n){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(o){return y.diag.error("Error while trying to shutdown current log record processor",o)}),this._sharedState.registeredLogRecordProcessors.push(n),this._sharedState.activeProcessor=new ua(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},u.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(y.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},u.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(y.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},u.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},u}();var mr;(function(u){u[u.DELTA=0]="DELTA",u[u.CUMULATIVE=1]="CUMULATIVE"})(mr||(mr={}));var tf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),sa=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},fa=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var ef=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};function pa(u){return u!=null}function da(u){var n=Object.keys(u);return n.length===0?"":(n=n.sort(),JSON.stringify(n.map(function(o){return[o,u[o]]})))}function ya(u){var n,o;return u.name+":"+((n=u.version)!==null&&n!==void 0?n:"")+":"+((o=u.schemaUrl)!==null&&o!==void 0?o:"")}var rf=function(u){tf(n,u);function n(o){var c=u.call(this,o)||this;return Object.setPrototypeOf(c,n.prototype),c}return n}(Error);function Ln(u,n){var o,c=new Promise(function(i,e){o=setTimeout(function(){e(new rf("Operation timed out."))},n)});return Promise.race([u,c]).then(function(l){return clearTimeout(o),l},function(l){throw clearTimeout(o),l})}function ha(u){return sa(this,void 0,void 0,function(){var n=this;return fa(this,function(o){return[2,Promise.all(u.map(function(c){return sa(n,void 0,void 0,function(){var l,i;return fa(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,c];case 1:return l=e.sent(),[2,{status:"fulfilled",value:l}];case 2:return i=e.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function ma(u){return u.status==="rejected"}function va(u,n){var o,c;if(u.size!==n.size)return!1;try{for(var l=ef(u),i=l.next();!i.done;i=l.next()){var e=i.value;if(!n.has(e))return!1}}catch(t){o={error:t}}finally{try{i&&!i.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}return!0}function _a(u,n){return u.toLowerCase()===n.toLowerCase()}b();var ht;(function(u){u.COUNTER="COUNTER",u.HISTOGRAM="HISTOGRAM",u.UP_DOWN_COUNTER="UP_DOWN_COUNTER",u.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",u.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",u.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(ht||(ht={}));function mt(u,n,o){var c,l,i,e;return of(u)||y.diag.warn('Invalid metric name: "'+u+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:u,type:n,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(l=o?.unit)!==null&&l!==void 0?l:"",valueType:(i=o?.valueType)!==null&&i!==void 0?i:y.ValueType.DOUBLE,advice:(e=o?.advice)!==null&&e!==void 0?e:{}}}function Ea(u,n){var o,c;return{name:(o=u.name)!==null&&o!==void 0?o:n.name,description:(c=u.description)!==null&&c!==void 0?c:n.description,type:n.type,unit:n.unit,valueType:n.valueType,advice:n.advice}}function ba(u,n){return _a(u.name,n.name)&&u.unit===n.unit&&u.type===n.type&&u.valueType===n.valueType}var nf=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function of(u){return u.match(nf)!=null}b();var Sa=function(){function u(){this._registeredViews=[]}return u.prototype.addView=function(n){this._registeredViews.push(n)},u.prototype.findViews=function(n,o){var c=this,l=this._registeredViews.filter(function(i){return c._matchInstrument(i.instrumentSelector,n)&&c._matchMeter(i.meterSelector,o)});return l},u.prototype._matchInstrument=function(n,o){return(n.getType()===void 0||o.type===n.getType())&&n.getNameFilter().match(o.name)&&n.getUnitFilter().match(o.unit)},u.prototype._matchMeter=function(n,o){return n.getNameFilter().match(o.name)&&(o.version===void 0||n.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||n.getSchemaUrlFilter().match(o.schemaUrl))},u}();b();var Ta=P(D()),Qt=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),In=function(){function u(n,o){this._writableMetricStorage=n,this._descriptor=o}return u.prototype._record=function(n,o,c){if(o===void 0&&(o={}),c===void 0&&(c=y.context.active()),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._descriptor.name+": "+n);return}this._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._writableMetricStorage.record(n,o,c,(0,Ta.millisToHrTime)(Date.now()))},u}();var Oa=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){this._record(o,c,l)},n}(In);var ga=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.add=function(o,c,l){if(o<0){y.diag.warn("negative value provided to counter "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(In);var Aa=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.record=function(o,c,l){if(o<0){y.diag.warn("negative value provided to histogram "+this._descriptor.name+": "+o);return}this._record(o,c,l)},n}(In);var vr=function(){function u(n,o,c){this._observableRegistry=c,this._descriptor=n,this._metricStorages=o}return u.prototype.addCallback=function(n){this._observableRegistry.addCallback(n,this)},u.prototype.removeCallback=function(n){this._observableRegistry.removeCallback(n,this)},u}();var Na=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(vr);var Pa=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(vr);var xa=function(u){Qt(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n}(vr);function ve(u){return u instanceof vr}var Ra=function(){function u(n){this._meterSharedState=n}return u.prototype.createHistogram=function(n,o){var c=mt(n,ht.HISTOGRAM,o),l=this._meterSharedState.registerMetricStorage(c);return new Aa(l,c)},u.prototype.createCounter=function(n,o){var c=mt(n,ht.COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new ga(l,c)},u.prototype.createUpDownCounter=function(n,o){var c=mt(n,ht.UP_DOWN_COUNTER,o),l=this._meterSharedState.registerMetricStorage(c);return new Oa(l,c)},u.prototype.createObservableGauge=function(n,o){var c=mt(n,ht.OBSERVABLE_GAUGE,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Pa(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableCounter=function(n,o){var c=mt(n,ht.OBSERVABLE_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new Na(c,l,this._meterSharedState.observableRegistry)},u.prototype.createObservableUpDownCounter=function(n,o){var c=mt(n,ht.OBSERVABLE_UP_DOWN_COUNTER,o),l=this._meterSharedState.registerAsyncMetricStorage(c);return new xa(c,l,this._meterSharedState.observableRegistry)},u.prototype.addBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.addBatchCallback(n,o)},u.prototype.removeBatchObservableCallback=function(n,o){this._meterSharedState.observableRegistry.removeBatchCallback(n,o)},u}();var _r=function(){function u(n){this._instrumentDescriptor=n}return u.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},u.prototype.updateDescription=function(n){this._instrumentDescriptor=mt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:n,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},u}();var af=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),La=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},uf=function(){function u(n){this._hash=n,this._valueMap=new Map,this._keyMap=new Map}return u.prototype.get=function(n,o){return o??(o=this._hash(n)),this._valueMap.get(o)},u.prototype.getOrDefault=function(n,o){var c=this._hash(n);if(this._valueMap.has(c))return this._valueMap.get(c);var l=o();return this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,l),l},u.prototype.set=function(n,o,c){c??(c=this._hash(n)),this._keyMap.has(c)||this._keyMap.set(c,n),this._valueMap.set(c,o)},u.prototype.has=function(n,o){return o??(o=this._hash(n)),this._valueMap.has(o)},u.prototype.keys=function(){var n,o;return La(this,function(c){switch(c.label){case 0:n=this._keyMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},u.prototype.entries=function(){var n,o;return La(this,function(c){switch(c.label){case 0:n=this._valueMap.entries(),o=n.next(),c.label=1;case 1:return o.done===!0?[3,3]:[4,[this._keyMap.get(o.value[0]),o.value[1],o.value[0]]];case 2:return c.sent(),o=n.next(),[3,1];case 3:return[2]}})},Object.defineProperty(u.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),u}();var ot=function(u){af(n,u);function n(){return u.call(this,da)||this}return n}(uf);var lf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Er=function(){function u(n){this._aggregator=n,this._activeCollectionStorage=new ot,this._cumulativeMemoStorage=new ot}return u.prototype.record=function(n,o,c,l){var i=this,e=this._activeCollectionStorage.getOrDefault(o,function(){return i._aggregator.createAccumulation(l)});e?.record(n)},u.prototype.batchCumulate=function(n,o){var c=this;Array.from(n.entries()).forEach(function(l){var i=lf(l,3),e=i[0],t=i[1],r=i[2],a=c._aggregator.createAccumulation(o);a?.record(t);var s=a;if(c._cumulativeMemoStorage.has(e,r)){var d=c._cumulativeMemoStorage.get(e,r);s=c._aggregator.diff(d,a)}if(c._activeCollectionStorage.has(e,r)){var v=c._activeCollectionStorage.get(e,r);s=c._aggregator.merge(v,s)}c._cumulativeMemoStorage.set(e,a,r),c._activeCollectionStorage.set(e,s,r)})},u.prototype.collect=function(){var n=this._activeCollectionStorage;return this._activeCollectionStorage=new ot,n},u}();var wn=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Ia=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},br=function(){function u(n,o){var c=this;this._aggregator=n,this._unreportedAccumulations=new Map,this._reportHistory=new Map,o.forEach(function(l){c._unreportedAccumulations.set(l,[])})}return u.prototype.buildMetrics=function(n,o,c,l){this._stashAccumulations(c);var i=this._getMergedUnreportedAccumulations(n),e=i,t;if(this._reportHistory.has(n)){var r=this._reportHistory.get(n),a=r.collectionTime;t=r.aggregationTemporality,t===mr.CUMULATIVE?e=u.merge(r.accumulations,i,this._aggregator):e=u.calibrateStartTime(r.accumulations,i,a)}else t=n.selectAggregationTemporality(o.type);this._reportHistory.set(n,{accumulations:e,collectionTime:l,aggregationTemporality:t});var s=cf(e);if(s.length!==0)return this._aggregator.toMetricData(o,t,s,l)},u.prototype._stashAccumulations=function(n){var o,c,l=this._unreportedAccumulations.keys();try{for(var i=wn(l),e=i.next();!e.done;e=i.next()){var t=e.value,r=this._unreportedAccumulations.get(t);r===void 0&&(r=[],this._unreportedAccumulations.set(t,r)),r.push(n)}}catch(a){o={error:a}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}},u.prototype._getMergedUnreportedAccumulations=function(n){var o,c,l=new ot,i=this._unreportedAccumulations.get(n);if(this._unreportedAccumulations.set(n,[]),i===void 0)return l;try{for(var e=wn(i),t=e.next();!t.done;t=e.next()){var r=t.value;l=u.merge(l,r,this._aggregator)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}return l},u.merge=function(n,o,c){for(var l=n,i=o.entries(),e=i.next();e.done!==!0;){var t=Ia(e.value,3),r=t[0],a=t[1],s=t[2];if(n.has(r,s)){var d=n.get(r,s),v=c.merge(d,a);l.set(r,v,s)}else l.set(r,a,s);e=i.next()}return l},u.calibrateStartTime=function(n,o,c){var l,i;try{for(var e=wn(n.keys()),t=e.next();!t.done;t=e.next()){var r=Ia(t.value,2),a=r[0],s=r[1],d=o.get(a,s);d?.setStartTime(c)}}catch(v){l={error:v}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(l)throw l.error}}return o},u}();function cf(u){return Array.from(u.entries())}var sf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),ff=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},wa=function(u){sf(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new Er(c),e._temporalMetricStorage=new br(c,i),e}return n.prototype.record=function(o,c){var l=this,i=new ot;Array.from(o.entries()).forEach(function(e){var t=ff(e,2),r=t[0],a=t[1];i.set(l._attributesProcessor.process(r),a)}),this._deltaMetricStorage.batchCumulate(i,c)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(_r);b();function Cn(u,n){var o="";return u.unit!==n.unit&&(o+=" - Unit '"+u.unit+"' does not match '"+n.unit+`'
5
5
  `),u.type!==n.type&&(o+=" - Type '"+u.type+"' does not match '"+n.type+`'
6
6
  `),u.valueType!==n.valueType&&(o+=" - Value Type '"+u.valueType+"' does not match '"+n.valueType+`'
7
7
  `),u.description!==n.description&&(o+=" - Description '"+u.description+"' does not match '"+n.description+`'
8
8
  `),o}function pf(u,n){return" - use valueType '"+u.valueType+"' on instrument creation or use an instrument name other than '"+n.name+"'"}function df(u,n){return" - use unit '"+u.unit+"' on instrument creation or use an instrument name other than '"+n.name+"'"}function yf(u,n){var o={name:n.name,type:n.type,unit:n.unit},c=JSON.stringify(o);return" - create a new view with a name other than '"+u.name+"' and InstrumentSelector '"+c+"'"}function hf(u,n){var o={name:n.name,type:n.type,unit:n.unit},c=JSON.stringify(o);return" - create a new view with a name other than '"+u.name+"' and InstrumentSelector '"+c+`'
9
9
  - OR - create a new view with the name `+u.name+" and description '"+u.description+"' and InstrumentSelector "+c+`
10
- - OR - create a new view with the name `+n.name+" and description '"+u.description+"' and InstrumentSelector "+c}function Cn(u,n){return u.valueType!==n.valueType?pf(u,n):u.unit!==n.unit?df(u,n):u.type!==n.type?yf(u,n):u.description!==n.description?hf(u,n):""}var Un=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},wa=function(){function u(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return u.create=function(){return new u},u.prototype.getStorages=function(n){var o,c,l,i,e=[];try{for(var t=Un(this._sharedRegistry.values()),r=t.next();!r.done;r=t.next()){var a=r.value;e=e.concat(a)}}catch(S){o={error:S}}finally{try{r&&!r.done&&(c=t.return)&&c.call(t)}finally{if(o)throw o.error}}var s=this._perCollectorRegistry.get(n);if(s!=null)try{for(var d=Un(s.values()),v=d.next();!v.done;v=d.next()){var a=v.value;e=e.concat(a)}}catch(S){l={error:S}}finally{try{v&&!v.done&&(i=d.return)&&i.call(d)}finally{if(l)throw l.error}}return e},u.prototype.register=function(n){this._registerStorage(n,this._sharedRegistry)},u.prototype.registerForCollector=function(n,o){var c=this._perCollectorRegistry.get(n);c==null&&(c=new Map,this._perCollectorRegistry.set(n,c)),this._registerStorage(o,c)},u.prototype.findOrUpdateCompatibleStorage=function(n){var o=this._sharedRegistry.get(n.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(n,o)},u.prototype.findOrUpdateCompatibleCollectorStorage=function(n,o){var c=this._perCollectorRegistry.get(n);if(c===void 0)return null;var l=c.get(o.name);return l===void 0?null:this._findOrUpdateCompatibleStorage(o,l)},u.prototype._registerStorage=function(n,o){var c=n.getInstrumentDescriptor(),l=o.get(c.name);if(l===void 0){o.set(c.name,[n]);return}l.push(n)},u.prototype._findOrUpdateCompatibleStorage=function(n,o){var c,l,i=null;try{for(var e=Un(o),t=e.next();!t.done;t=e.next()){var r=t.value,a=r.getInstrumentDescriptor();Ea(a,n)?(a.description!==n.description&&(n.description.length>a.description.length&&r.updateDescription(n.description),y.diag.warn("A view or instrument with the name ",n.name,` has already been registered, but has a different description and is incompatible with another registered view.
10
+ - OR - create a new view with the name `+n.name+" and description '"+u.description+"' and InstrumentSelector "+c}function Un(u,n){return u.valueType!==n.valueType?pf(u,n):u.unit!==n.unit?df(u,n):u.type!==n.type?yf(u,n):u.description!==n.description?hf(u,n):""}var Mn=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Ca=function(){function u(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return u.create=function(){return new u},u.prototype.getStorages=function(n){var o,c,l,i,e=[];try{for(var t=Mn(this._sharedRegistry.values()),r=t.next();!r.done;r=t.next()){var a=r.value;e=e.concat(a)}}catch(S){o={error:S}}finally{try{r&&!r.done&&(c=t.return)&&c.call(t)}finally{if(o)throw o.error}}var s=this._perCollectorRegistry.get(n);if(s!=null)try{for(var d=Mn(s.values()),v=d.next();!v.done;v=d.next()){var a=v.value;e=e.concat(a)}}catch(S){l={error:S}}finally{try{v&&!v.done&&(i=d.return)&&i.call(d)}finally{if(l)throw l.error}}return e},u.prototype.register=function(n){this._registerStorage(n,this._sharedRegistry)},u.prototype.registerForCollector=function(n,o){var c=this._perCollectorRegistry.get(n);c==null&&(c=new Map,this._perCollectorRegistry.set(n,c)),this._registerStorage(o,c)},u.prototype.findOrUpdateCompatibleStorage=function(n){var o=this._sharedRegistry.get(n.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(n,o)},u.prototype.findOrUpdateCompatibleCollectorStorage=function(n,o){var c=this._perCollectorRegistry.get(n);if(c===void 0)return null;var l=c.get(o.name);return l===void 0?null:this._findOrUpdateCompatibleStorage(o,l)},u.prototype._registerStorage=function(n,o){var c=n.getInstrumentDescriptor(),l=o.get(c.name);if(l===void 0){o.set(c.name,[n]);return}l.push(n)},u.prototype._findOrUpdateCompatibleStorage=function(n,o){var c,l,i=null;try{for(var e=Mn(o),t=e.next();!t.done;t=e.next()){var r=t.value,a=r.getInstrumentDescriptor();ba(a,n)?(a.description!==n.description&&(n.description.length>a.description.length&&r.updateDescription(n.description),y.diag.warn("A view or instrument with the name ",n.name,` has already been registered, but has a different description and is incompatible with another registered view.
11
11
  `,`Details:
12
- `,wn(a,n),`The longer description will be used.
13
- To resolve the conflict:`,Cn(a,n))),i=r):y.diag.warn("A view or instrument with the name ",n.name,` has already been registered and is incompatible with another registered view.
12
+ `,Cn(a,n),`The longer description will be used.
13
+ To resolve the conflict:`,Un(a,n))),i=r):y.diag.warn("A view or instrument with the name ",n.name,` has already been registered and is incompatible with another registered view.
14
14
  `,`Details:
15
- `,wn(a,n),`To resolve the conflict:
16
- `,Cn(a,n))}}catch(s){c={error:s}}finally{try{t&&!t.done&&(l=e.return)&&l.call(e)}finally{if(c)throw c.error}}return i},u}();var Ca=function(){function u(n){this._backingStorages=n}return u.prototype.record=function(n,o,c,l){this._backingStorages.forEach(function(i){i.record(n,o,c,l)})},u}();b();b();var Ua=function(){function u(n,o){this._instrumentName=n,this._valueType=o,this._buffer=new ot}return u.prototype.observe=function(n,o){if(o===void 0&&(o={}),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._instrumentName+": "+n);return}this._valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._buffer.set(o,n)},u}();var Ma=function(){function u(){this._buffer=new Map}return u.prototype.observe=function(n,o,c){if(c===void 0&&(c={}),!!ve(n)){var l=this._buffer.get(n);if(l==null&&(l=new ot,this._buffer.set(n,l)),typeof o!="number"){y.diag.warn("non-number value provided to metric "+n._descriptor.name+": "+o);return}n._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(o)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+n._descriptor.name+", ignoring the fractional digits."),o=Math.trunc(o),!Number.isInteger(o))||l.set(c,o)}},u}();var Mn=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Dn=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Da=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ba=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},ka=function(){function u(){this._callbacks=[],this._batchCallbacks=[]}return u.prototype.addCallback=function(n,o){var c=this._findCallback(n,o);c>=0||this._callbacks.push({callback:n,instrument:o})},u.prototype.removeCallback=function(n,o){var c=this._findCallback(n,o);c<0||this._callbacks.splice(c,1)},u.prototype.addBatchCallback=function(n,o){var c=new Set(o.filter(ve));if(c.size===0){y.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}var l=this._findBatchCallback(n,c);l>=0||this._batchCallbacks.push({callback:n,instruments:c})},u.prototype.removeBatchCallback=function(n,o){var c=new Set(o.filter(ve)),l=this._findBatchCallback(n,c);l<0||this._batchCallbacks.splice(l,1)},u.prototype.observe=function(n,o){return Mn(this,void 0,void 0,function(){var c,l,i,e;return Dn(this,function(t){switch(t.label){case 0:return c=this._observeCallbacks(n,o),l=this._observeBatchCallbacks(n,o),[4,ya(Ba(Ba([],Da(c),!1),Da(l),!1))];case 1:return i=t.sent(),e=i.filter(ha).map(function(r){return r.reason}),[2,e]}})})},u.prototype._observeCallbacks=function(n,o){var c=this;return this._callbacks.map(function(l){var i=l.callback,e=l.instrument;return Mn(c,void 0,void 0,function(){var t,r;return Dn(this,function(a){switch(a.label){case 0:return t=new Ua(e._descriptor.name,e._descriptor.valueType),r=Promise.resolve(i(t)),o!=null&&(r=Rn(r,o)),[4,r];case 1:return a.sent(),e._metricStorages.forEach(function(s){s.record(t._buffer,n)}),[2]}})})})},u.prototype._observeBatchCallbacks=function(n,o){var c=this;return this._batchCallbacks.map(function(l){var i=l.callback,e=l.instruments;return Mn(c,void 0,void 0,function(){var t,r;return Dn(this,function(a){switch(a.label){case 0:return t=new Ma,r=Promise.resolve(i(t)),o!=null&&(r=Rn(r,o)),[4,r];case 1:return a.sent(),e.forEach(function(s){var d=t._buffer.get(s);d!=null&&s._metricStorages.forEach(function(v){v.record(d,n)})}),[2]}})})})},u.prototype._findCallback=function(n,o){return this._callbacks.findIndex(function(c){return c.callback===n&&c.instrument===o})},u.prototype._findBatchCallback=function(n,o){return this._batchCallbacks.findIndex(function(c){return c.callback===n&&ma(c.instruments,o)})},u}();var mf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Va=function(u){mf(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new _r(c),e._temporalMetricStorage=new Er(c,i),e}return n.prototype.record=function(o,c,l,i){c=this._attributesProcessor.process(c,l),this._deltaMetricStorage.record(o,c,l,i)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(vr);var Ga=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),br=function(){function u(){}return u.Noop=function(){return _f},u}();var vf=function(u){Ga(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.process=function(o,c){return o},n}(br);var Xh=function(u){Ga(n,u);function n(o){var c=u.call(this)||this;return c._allowedAttributeNames=o,c}return n.prototype.process=function(o,c){var l=this,i={};return Object.keys(o).filter(function(e){return l._allowedAttributeNames.includes(e)}).forEach(function(e){return i[e]=o[e]}),i},n}(br);var _f=new vf;var Ef=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},bf=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Sf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},Ha=function(){function u(n,o){this._meterProviderSharedState=n,this._instrumentationScope=o,this.metricStorageRegistry=new wa,this.observableRegistry=new ka,this.meter=new xa(this)}return u.prototype.registerMetricStorage=function(n){var o=this._registerMetricStorage(n,Va);return o.length===1?o[0]:new Ca(o)},u.prototype.registerAsyncMetricStorage=function(n){var o=this._registerMetricStorage(n,Ia);return o},u.prototype.collect=function(n,o,c){return Ef(this,void 0,void 0,function(){var l,i,e;return bf(this,function(t){switch(t.label){case 0:return[4,this.observableRegistry.observe(o,c?.timeoutMillis)];case 1:return l=t.sent(),i=this.metricStorageRegistry.getStorages(n),i.length===0?[2,null]:(e=i.map(function(r){return r.collect(n,o)}).filter(fa),e.length===0?[2,{errors:l}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:e},errors:l}])}})})},u.prototype._registerMetricStorage=function(n,o){var c=this,l=this._meterProviderSharedState.viewRegistry.findViews(n,this._instrumentationScope),i=l.map(function(r){var a=_a(r,n),s=c.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(s!=null)return s;var d=r.aggregation.createAggregator(a),v=new o(a,d,r.attributesProcessor,c._meterProviderSharedState.metricCollectors);return c.metricStorageRegistry.register(v),v});if(i.length===0){var e=this._meterProviderSharedState.selectAggregations(n.type),t=e.map(function(r){var a=Sf(r,2),s=a[0],d=a[1],v=c.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(s,n);if(v!=null)return v;var S=d.createAggregator(n),O=new o(n,S,br.Noop(),[s]);return c.metricStorageRegistry.registerForCollector(s,O),O});i=i.concat(t)}return i},u}();var Tf=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},ja=function(){function u(n){this.resource=n,this.viewRegistry=new ba,this.metricCollectors=[],this.meterSharedStates=new Map}return u.prototype.getMeterSharedState=function(n){var o=da(n),c=this.meterSharedStates.get(o);return c==null&&(c=new Ha(this,n),this.meterSharedStates.set(o,c)),c},u.prototype.selectAggregations=function(n){var o,c,l=[];try{for(var i=Tf(this.metricCollectors),e=i.next();!e.done;e=i.next()){var t=e.value;l.push([t,t.selectAggregation(n)])}}catch(r){o={error:r}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}return l},u}();var Fa=P(M()),Sr=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Tr=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Of=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},gf=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},qa=function(){function u(n,o){this._sharedState=n,this._metricReader=o}return u.prototype.collect=function(n){return Sr(this,void 0,void 0,function(){var o,c,l,i,e=this;return Tr(this,function(t){switch(t.label){case 0:return o=(0,Fa.millisToHrTime)(Date.now()),c=[],l=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(r){return Sr(e,void 0,void 0,function(){var a;return Tr(this,function(s){switch(s.label){case 0:return[4,r.collect(this,o,n)];case 1:return a=s.sent(),a?.scopeMetrics!=null&&c.push(a.scopeMetrics),a?.errors!=null&&l.push.apply(l,gf([],Of(a.errors),!1)),[2]}})})}),[4,Promise.all(i)];case 1:return t.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:l}]}})})},u.prototype.forceFlush=function(n){return Sr(this,void 0,void 0,function(){return Tr(this,function(o){switch(o.label){case 0:return[4,this._metricReader.forceFlush(n)];case 1:return o.sent(),[2]}})})},u.prototype.shutdown=function(n){return Sr(this,void 0,void 0,function(){return Tr(this,function(o){switch(o.label){case 0:return[4,this._metricReader.shutdown(n)];case 1:return o.sent(),[2]}})})},u.prototype.selectAggregationTemporality=function(n){return this._metricReader.selectAggregationTemporality(n)},u.prototype.selectAggregation=function(n){return this._metricReader.selectAggregation(n)},u}();var Ka=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Xa=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Af=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Bn=function(){function u(n){var o,c,l;this._shutdown=!1;var i=F.default().merge((l=n?.resource)!==null&&l!==void 0?l:F.empty());if(this._sharedState=new ja(i),n?.views!=null&&n.views.length>0)try{for(var e=Af(n.views),t=e.next();!t.done;t=e.next()){var r=t.value;this._sharedState.viewRegistry.addView(r)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}}return u.prototype.getMeter=function(n,o,c){return o===void 0&&(o=""),c===void 0&&(c={}),this._shutdown?(y.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,y.createNoopMeter)()):this._sharedState.getMeterSharedState({name:n,version:o,schemaUrl:c.schemaUrl}).meter},u.prototype.addMetricReader=function(n){var o=new qa(this._sharedState,n);n.setMetricProducer(o),this._sharedState.metricCollectors.push(o)},u.prototype.shutdown=function(n){return Ka(this,void 0,void 0,function(){return Xa(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.shutdown(n)}))]);case 1:return o.sent(),[2]}})})},u.prototype.forceFlush=function(n){return Ka(this,void 0,void 0,function(){return Xa(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.forceFlush(n)}))];case 1:return o.sent(),[2]}})})},u}();var Pl=P(St(),1),ce=P(Me(),1),xl=P(Wa(),1),lt=P(M(),1);b();var If=Symbol.for("@vercel/request-context");function Zt(){return globalThis[If]?.get()}var Gn=P(St(),1);function Ar(u){return Object.fromEntries(Object.entries(u).filter(([n,o])=>o!==void 0))}function $a(u){return u?u.split("::").at(-1):void 0}function Qa(u=Zt()){if(u)return Ar({[Gn.SemanticAttributes.HTTP_HOST]:u.headers.host,[Gn.SemanticAttributes.HTTP_USER_AGENT]:u.headers["user-agent"],"http.referer":u.headers.referer,"vercel.request_id":$a(u.headers["x-vercel-id"]),"vercel.matched_path":u.headers["x-matched-path"],"vercel.edge_region":u.headers["x-vercel-edge-region"]})}b();function be(u){return(u&y.TraceFlags.SAMPLED)!==0}var Nr=class{constructor(n){this.processors=n;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(n=>n.forceFlush().catch(o=>{y.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(n=>n.shutdown().catch(()=>{}))).then(()=>{})}onStart(n,o){let{traceId:c,spanId:l,traceFlags:i}=n.spanContext(),e=!n.parentSpanId||!this.rootSpanIds.has(c);if(e&&this.rootSpanIds.set(c,l),e&&be(i)){let t=Qa();t&&n.setAttributes(t);let r=Zt();r&&r.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let a=new Promise(d=>{this.waitSpanEnd.set(c,d)}),s;await Promise.race([a,new Promise(d=>{s=setTimeout(()=>{this.waitSpanEnd.delete(c),d(void 0)},50)})]),s&&clearTimeout(s)}return this.forceFlush()})}for(let t of this.processors)t.onStart(n,o)}onEnd(n){let{traceId:o,spanId:c,traceFlags:l}=n.spanContext(),i=be(l),e=this.rootSpanIds.get(o)===c;if(i){let t=wf(n);t&&Object.assign(n.attributes,t)}for(let t of this.processors)t.onEnd(n);if(e){this.rootSpanIds.delete(o);let t=this.waitSpanEnd.get(o);t&&(this.waitSpanEnd.delete(o),t())}}},Za={[y.SpanKind.INTERNAL]:"internal",[y.SpanKind.SERVER]:"server",[y.SpanKind.CLIENT]:"client",[y.SpanKind.PRODUCER]:"producer",[y.SpanKind.CONSUMER]:"consumer"};function wf(u){let{kind:n,attributes:o}=u,{"operation.name":c,"resouce.name":l,"span.type":i,"next.span_type":e,"next.route":t,"http.method":r,"http.route":a}=o;if(c)return;let s=u.instrumentationLibrary.name,d=e??i;if(d&&typeof d=="string"){let v=Hn(s,d);return t?{"operation.name":v,"resource.name":l??t}:{"operation.name":v}}return r&&a&&typeof r=="string"&&typeof a=="string"?{"operation.name":Hn(s,`http.${Za[n]||"internal"}.${r}`),"resource.name":l??a}:{"operation.name":Hn(s,n===y.SpanKind.INTERNAL?"":Za[n])}}function Hn(u,n){if(!u)return n;let o=u.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),n?`${o}.${n}`:o}var pu=P(Jn(),1);var fu=P(Lr(),1);b();var te=class extends fu.OTLPExporterBase{constructor(n={}){super(n),n.headers&&(this._headers=n.headers)}onShutdown(){y.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){y.diag.debug("@vercel/otel/otlp: onInit")}send(n,o,c){if(this._shutdownOnce.isCalled){y.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let l=this.convert(n),i,e,t;try{({body:i,contentType:e,headers:t}=this.toMessage(l))}catch(a){y.diag.warn("@vercel/otel/otlp: no proto",a);return}let r=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...t,"Content-Type":e,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(a=>{y.diag.debug("@vercel/otel/otlp: onSuccess",a.status,a.statusText),o(),a.arrayBuffer().catch(()=>{})}).catch(a=>{y.diag.error("@vercel/otel/otlp: onError",a),c(a)}).finally(()=>{let a=this._sendingPromises.indexOf(r);this._sendingPromises.splice(a,1)});this._sendingPromises.push(r)}getDefaultUrl(n){throw new Error("Method not implemented.")}};var Zf="v1/traces",tp=`http://localhost:4318/${Zf}`;function Ir(u){return typeof u.url=="string"?u.url:tp}var ee=class extends te{convert(n){return(0,pu.createExportTraceServiceRequest)(n,{useHex:!0,useLongBits:!1})}toMessage(n){return{body:JSON.stringify(n),contentType:"application/json"}}getDefaultUrl(n){return Ir(n)}};var bl=P(Jn(),1),Sl=P(El(),1),Tl=P(_o(),1);var jt=class extends te{convert(n){return(0,bl.createExportTraceServiceRequest)(n,void 0)}toMessage(n){let o=Sl.ServiceClientType.SPANS,c=(0,Tl.getExportRequestProto)(o),l=c.create(n);return{body:c.encode(l).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(n){return Ir(n)}};b();var wt=P(St(),1);function Ol(u,n){return u.replace(/\{(?<temp1>[^{}]+)\}/g,(o,c)=>{let l=n[c];return l!==void 0?String(l):o})}var ue=class{constructor(n={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=n}getConfig(){return this.config}setConfig(){}setTracerProvider(n){this.tracerProvider=n}setMeterProvider(){}enable(){this.disable();let{tracerProvider:n}=this;if(!n)return;let o=n.getTracer(this.instrumentationName,this.instrumentationVersion),c=this.config.ignoreUrls??[],l=S=>{if(c.length===0)return!1;let O=S.toString();return c.some(A=>typeof A=="string"?A==="*"?!0:O.startsWith(A):A.test(O))},i=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,e=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,t=this.config.propagateContextUrls??[],r=this.config.dontPropagateContextUrls??[],a=this.config.resourceNameTemplate,s=S=>{let O=S.toString();return r.length>0&&r.some(A=>typeof A=="string"?A==="*"?!0:O.startsWith(A):A.test(O))?!1:i&&S.protocol==="https:"&&(S.host===i||S.host===e||S.host===Zt()?.headers.host)||!i&&S.protocol==="http:"&&S.hostname==="localhost"?!0:t.some(A=>typeof A=="string"?A==="*"?!0:O.startsWith(A):A.test(O))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let d=globalThis.fetch;this.originalFetch=d;let v=(S,O)=>{if(O?.next?.internal)return d(S,O);let A=new Request(S,O),q=new URL(A.url);if(l(q))return d(S,O);let tt={[wt.SemanticAttributes.HTTP_METHOD]:A.method,[wt.SemanticAttributes.HTTP_URL]:A.url,[wt.SemanticAttributes.HTTP_HOST]:q.host,[wt.SemanticAttributes.HTTP_SCHEME]:q.protocol.replace(":",""),[wt.SemanticAttributes.NET_PEER_NAME]:q.hostname,[wt.SemanticAttributes.NET_PEER_PORT]:q.port},X=a?Ol(a,tt):xp(A.url);return o.startActiveSpan(`fetch ${A.method} ${A.url}`,{kind:y.SpanKind.CLIENT,attributes:{...tt,"operation.name":`fetch.${A.method}`,"resource.name":X}},async W=>{W.isRecording()&&be(W.spanContext().traceFlags)&&s(q)&&y.propagation.inject(y.context.active(),A.headers,Pp);try{let Y=await d(S,{...O,headers:A.headers});return W.setAttribute(wt.SemanticAttributes.HTTP_STATUS_CODE,Y.status),Y.status>=500&&W.setStatus({code:y.SpanStatusCode.ERROR,message:`Status: ${Y.status} (${Y.statusText})`}),W.end(),Y}catch(Y){throw Y instanceof Error?(W.recordException(Y),W.setStatus({code:y.SpanStatusCode.ERROR,message:Y.message})):W.setStatus({code:y.SpanStatusCode.ERROR,message:String(Y)}),W.end(),Y}})};globalThis.fetch=v}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Pp={set(u,n,o){u.set(n,o)}};function xp(u){let n=u.indexOf("?");return n===-1?u:u.substring(0,n)}var Hr=class{constructor(n={}){this.configuration=n}start(){let n=Rp(),o=(0,ce.getEnvWithoutDefaults)(),c=this.configuration,l=process.env.NEXT_RUNTIME||"nodejs",i=!!n.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&y.diag.setLogger(new y.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),i)return;let e=c.idGenerator??new sr,t=c.contextManager??new xl.AsyncLocalStorageContextManager;t.enable(),this.contextManager=t;let r=n.OTEL_SERVICE_NAME||c.serviceName||"app",a=new F(Ar({[Pl.SemanticResourceAttributes.SERVICE_NAME]:r,"node.ci":process.env.CI?!0:void 0,"node.env":"production","vercel.env":process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":l,"vercel.sha":process.env.VERCEL_GIT_COMMIT_SHA||process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,"vercel.host":process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||void 0,"vercel.branch_host":process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||void 0,...c.attributes})),s=c.resourceDetectors??[ji];if(c.autoDetectResources??!0){let X={detectors:s};a=a.merge(qi(X))}let v=Ip(c.propagators,n),S=wp(c.traceSampler,n),O=Cp(c.spanProcessors,c,n);O.length===0&&y.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let A=c.spanLimits,q=new Ji({resource:a,idGenerator:e,sampler:S,spanLimits:A});if(q.addSpanProcessor(new Nr(O)),q.register({contextManager:t,propagator:new lt.CompositePropagator({propagators:v})}),this.tracerProvider=q,c.logRecordProcessor){let X=new xn({resource:a});this.loggerProvider=X,X.addLogRecordProcessor(c.logRecordProcessor),dt.logs.setGlobalLoggerProvider(X)}if(c.metricReader||c.views){let X=new Bn({resource:a,views:c.views??[]});c.metricReader&&X.addMetricReader(c.metricReader),y.metrics.setGlobalMeterProvider(X),this.meterProvider=X}let tt=Lp(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,Nl.registerInstrumentations)({instrumentations:tt}),y.diag.info("@vercel/otel: started",r,l)}async shutdown(){let n=[];this.tracerProvider&&n.push(this.tracerProvider.shutdown()),this.loggerProvider&&n.push(this.loggerProvider.shutdown()),this.meterProvider&&n.push(this.meterProvider.shutdown()),y.diag.info("@vercel/otel: shutting down",n.length,process.env.NEXT_RUNTIME),await Promise.all(n),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function Rp(){let u=(0,ce.parseEnvironment)(process.env);return{...ce.DEFAULT_ENVIRONMENT,...u}}function Lp(u,n){return(u??["auto"]).map(o=>o==="auto"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),[new ue(n?.fetch)]):o==="fetch"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),new ue(n?.fetch)):o).flat()}function Ip(u,n){let o=n.OTEL_PROPAGATORS&&n.OTEL_PROPAGATORS.length>0?n.OTEL_PROPAGATORS:void 0;return(u??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return y.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new lt.W3CTraceContextPropagator,new lt.W3CBaggagePropagator];if(c==="tracecontext")return y.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new lt.W3CTraceContextPropagator;if(c==="baggage")return y.diag.debug("@vercel/otel: Configure propagator: baggage"),new lt.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var gl="always_on",le=1;function wp(u,n){if(u&&typeof u!="string")return u;let o=u&&u!=="auto"?u:n.OTEL_TRACES_SAMPLER||gl;switch(y.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new $;case"always_off":return new pt;case"parentbased_always_on":return new Ot({root:new $});case"parentbased_always_off":return new Ot({root:new pt});case"traceidratio":return new Yt(Al(n));case"parentbased_traceidratio":return new Ot({root:new Yt(Al(n))});default:return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(n.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${gl}".`),new $}}function Al(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${le}.`),le;y.diag.debug("@vercel/otel: Configure sampler probability: ",u.OTEL_TRACES_SAMPLER_ARG);let n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${le}.`),le):n<0||n>1?(y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${le}.`),le):n}function Cp(u,n,o){return(u??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let l=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",i=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";y.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",l,i);let e={url:`http://localhost:${l}/v1/traces`,headers:{}},t=i==="http/protobuf"?new jt(e):new ee(e);return new me(t)}return n.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new me(Up(n.traceExporter,o)):void 0}return c}).filter(Bp)}function Up(u,n){if(u&&u!=="auto")return u;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=Dp(n),l={...lt.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_HEADERS),...lt.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(y.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(l).join(",")||"<none>"}`),o){case"http/json":return new ee({url:c,headers:l});case"http/protobuf":return new jt({url:c,headers:l});default:return y.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new jt}}var Rl="v1/traces",Mp=`http://localhost:4318/${Rl}`;function Dp(u){let n=u.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(n&&typeof n=="string")return n;let o=u.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${Rl}`:Mp}function Bp(u){return u!=null}function Hv(u){let n;u?typeof u=="string"?n={serviceName:u}:n=u:n={},new Hr(n).start()}export{ue as FetchInstrumentation,ee as OTLPHttpJsonTraceExporter,jt as OTLPHttpProtoTraceExporter,Hv as registerOTel};
15
+ `,Cn(a,n),`To resolve the conflict:
16
+ `,Un(a,n))}}catch(s){c={error:s}}finally{try{t&&!t.done&&(l=e.return)&&l.call(e)}finally{if(c)throw c.error}}return i},u}();var Ua=function(){function u(n){this._backingStorages=n}return u.prototype.record=function(n,o,c,l){this._backingStorages.forEach(function(i){i.record(n,o,c,l)})},u}();b();b();var Ma=function(){function u(n,o){this._instrumentName=n,this._valueType=o,this._buffer=new ot}return u.prototype.observe=function(n,o){if(o===void 0&&(o={}),typeof n!="number"){y.diag.warn("non-number value provided to metric "+this._instrumentName+": "+n);return}this._valueType===y.ValueType.INT&&!Number.isInteger(n)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||this._buffer.set(o,n)},u}();var Da=function(){function u(){this._buffer=new Map}return u.prototype.observe=function(n,o,c){if(c===void 0&&(c={}),!!ve(n)){var l=this._buffer.get(n);if(l==null&&(l=new ot,this._buffer.set(n,l)),typeof o!="number"){y.diag.warn("non-number value provided to metric "+n._descriptor.name+": "+o);return}n._descriptor.valueType===y.ValueType.INT&&!Number.isInteger(o)&&(y.diag.warn("INT value type cannot accept a floating-point value for "+n._descriptor.name+", ignoring the fractional digits."),o=Math.trunc(o),!Number.isInteger(o))||l.set(c,o)}},u}();var Dn=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Bn=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ba=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},ka=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},Va=function(){function u(){this._callbacks=[],this._batchCallbacks=[]}return u.prototype.addCallback=function(n,o){var c=this._findCallback(n,o);c>=0||this._callbacks.push({callback:n,instrument:o})},u.prototype.removeCallback=function(n,o){var c=this._findCallback(n,o);c<0||this._callbacks.splice(c,1)},u.prototype.addBatchCallback=function(n,o){var c=new Set(o.filter(ve));if(c.size===0){y.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}var l=this._findBatchCallback(n,c);l>=0||this._batchCallbacks.push({callback:n,instruments:c})},u.prototype.removeBatchCallback=function(n,o){var c=new Set(o.filter(ve)),l=this._findBatchCallback(n,c);l<0||this._batchCallbacks.splice(l,1)},u.prototype.observe=function(n,o){return Dn(this,void 0,void 0,function(){var c,l,i,e;return Bn(this,function(t){switch(t.label){case 0:return c=this._observeCallbacks(n,o),l=this._observeBatchCallbacks(n,o),[4,ha(ka(ka([],Ba(c),!1),Ba(l),!1))];case 1:return i=t.sent(),e=i.filter(ma).map(function(r){return r.reason}),[2,e]}})})},u.prototype._observeCallbacks=function(n,o){var c=this;return this._callbacks.map(function(l){var i=l.callback,e=l.instrument;return Dn(c,void 0,void 0,function(){var t,r;return Bn(this,function(a){switch(a.label){case 0:return t=new Ma(e._descriptor.name,e._descriptor.valueType),r=Promise.resolve(i(t)),o!=null&&(r=Ln(r,o)),[4,r];case 1:return a.sent(),e._metricStorages.forEach(function(s){s.record(t._buffer,n)}),[2]}})})})},u.prototype._observeBatchCallbacks=function(n,o){var c=this;return this._batchCallbacks.map(function(l){var i=l.callback,e=l.instruments;return Dn(c,void 0,void 0,function(){var t,r;return Bn(this,function(a){switch(a.label){case 0:return t=new Da,r=Promise.resolve(i(t)),o!=null&&(r=Ln(r,o)),[4,r];case 1:return a.sent(),e.forEach(function(s){var d=t._buffer.get(s);d!=null&&s._metricStorages.forEach(function(v){v.record(d,n)})}),[2]}})})})},u.prototype._findCallback=function(n,o){return this._callbacks.findIndex(function(c){return c.callback===n&&c.instrument===o})},u.prototype._findBatchCallback=function(n,o){return this._batchCallbacks.findIndex(function(c){return c.callback===n&&va(c.instruments,o)})},u}();var mf=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Ga=function(u){mf(n,u);function n(o,c,l,i){var e=u.call(this,o)||this;return e._attributesProcessor=l,e._deltaMetricStorage=new Er(c),e._temporalMetricStorage=new br(c,i),e}return n.prototype.record=function(o,c,l,i){c=this._attributesProcessor.process(c,l),this._deltaMetricStorage.record(o,c,l,i)},n.prototype.collect=function(o,c){var l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(o,this._instrumentDescriptor,l,c)},n}(_r);var Ha=function(){var u=function(n,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(c[i]=l[i])},u(n,o)};return function(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(n,o);function c(){this.constructor=n}n.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}}(),Sr=function(){function u(){}return u.Noop=function(){return _f},u}();var vf=function(u){Ha(n,u);function n(){return u!==null&&u.apply(this,arguments)||this}return n.prototype.process=function(o,c){return o},n}(Sr);var Xh=function(u){Ha(n,u);function n(o){var c=u.call(this)||this;return c._allowedAttributeNames=o,c}return n.prototype.process=function(o,c){var l=this,i={};return Object.keys(o).filter(function(e){return l._allowedAttributeNames.includes(e)}).forEach(function(e){return i[e]=o[e]}),i},n}(Sr);var _f=new vf;var Ef=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},bf=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Sf=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},ja=function(){function u(n,o){this._meterProviderSharedState=n,this._instrumentationScope=o,this.metricStorageRegistry=new Ca,this.observableRegistry=new Va,this.meter=new Ra(this)}return u.prototype.registerMetricStorage=function(n){var o=this._registerMetricStorage(n,Ga);return o.length===1?o[0]:new Ua(o)},u.prototype.registerAsyncMetricStorage=function(n){var o=this._registerMetricStorage(n,wa);return o},u.prototype.collect=function(n,o,c){return Ef(this,void 0,void 0,function(){var l,i,e;return bf(this,function(t){switch(t.label){case 0:return[4,this.observableRegistry.observe(o,c?.timeoutMillis)];case 1:return l=t.sent(),i=this.metricStorageRegistry.getStorages(n),i.length===0?[2,null]:(e=i.map(function(r){return r.collect(n,o)}).filter(pa),e.length===0?[2,{errors:l}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:e},errors:l}])}})})},u.prototype._registerMetricStorage=function(n,o){var c=this,l=this._meterProviderSharedState.viewRegistry.findViews(n,this._instrumentationScope),i=l.map(function(r){var a=Ea(r,n),s=c.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(s!=null)return s;var d=r.aggregation.createAggregator(a),v=new o(a,d,r.attributesProcessor,c._meterProviderSharedState.metricCollectors);return c.metricStorageRegistry.register(v),v});if(i.length===0){var e=this._meterProviderSharedState.selectAggregations(n.type),t=e.map(function(r){var a=Sf(r,2),s=a[0],d=a[1],v=c.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(s,n);if(v!=null)return v;var S=d.createAggregator(n),g=new o(n,S,Sr.Noop(),[s]);return c.metricStorageRegistry.registerForCollector(s,g),g});i=i.concat(t)}return i},u}();var Tf=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Fa=function(){function u(n){this.resource=n,this.viewRegistry=new Sa,this.metricCollectors=[],this.meterSharedStates=new Map}return u.prototype.getMeterSharedState=function(n){var o=ya(n),c=this.meterSharedStates.get(o);return c==null&&(c=new ja(this,n),this.meterSharedStates.set(o,c)),c},u.prototype.selectAggregations=function(n){var o,c,l=[];try{for(var i=Tf(this.metricCollectors),e=i.next();!e.done;e=i.next()){var t=e.value;l.push([t,t.selectAggregation(n)])}}catch(r){o={error:r}}finally{try{e&&!e.done&&(c=i.return)&&c.call(i)}finally{if(o)throw o.error}}return l},u}();var qa=P(D()),Tr=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Or=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Of=function(u,n){var o=typeof Symbol=="function"&&u[Symbol.iterator];if(!o)return u;var c=o.call(u),l,i=[],e;try{for(;(n===void 0||n-- >0)&&!(l=c.next()).done;)i.push(l.value)}catch(t){e={error:t}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(e)throw e.error}}return i},gf=function(u,n,o){if(o||arguments.length===2)for(var c=0,l=n.length,i;c<l;c++)(i||!(c in n))&&(i||(i=Array.prototype.slice.call(n,0,c)),i[c]=n[c]);return u.concat(i||Array.prototype.slice.call(n))},Ka=function(){function u(n,o){this._sharedState=n,this._metricReader=o}return u.prototype.collect=function(n){return Tr(this,void 0,void 0,function(){var o,c,l,i,e=this;return Or(this,function(t){switch(t.label){case 0:return o=(0,qa.millisToHrTime)(Date.now()),c=[],l=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(r){return Tr(e,void 0,void 0,function(){var a;return Or(this,function(s){switch(s.label){case 0:return[4,r.collect(this,o,n)];case 1:return a=s.sent(),a?.scopeMetrics!=null&&c.push(a.scopeMetrics),a?.errors!=null&&l.push.apply(l,gf([],Of(a.errors),!1)),[2]}})})}),[4,Promise.all(i)];case 1:return t.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:l}]}})})},u.prototype.forceFlush=function(n){return Tr(this,void 0,void 0,function(){return Or(this,function(o){switch(o.label){case 0:return[4,this._metricReader.forceFlush(n)];case 1:return o.sent(),[2]}})})},u.prototype.shutdown=function(n){return Tr(this,void 0,void 0,function(){return Or(this,function(o){switch(o.label){case 0:return[4,this._metricReader.shutdown(n)];case 1:return o.sent(),[2]}})})},u.prototype.selectAggregationTemporality=function(n){return this._metricReader.selectAggregationTemporality(n)},u.prototype.selectAggregation=function(n){return this._metricReader.selectAggregation(n)},u}();var Xa=function(u,n,o,c){function l(i){return i instanceof o?i:new o(function(e){e(i)})}return new(o||(o=Promise))(function(i,e){function t(s){try{a(c.next(s))}catch(d){e(d)}}function r(s){try{a(c.throw(s))}catch(d){e(d)}}function a(s){s.done?i(s.value):l(s.value).then(t,r)}a((c=c.apply(u,n||[])).next())})},Ya=function(u,n){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,l,i,e;return e={next:t(0),throw:t(1),return:t(2)},typeof Symbol=="function"&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(s){return r([a,s])}}function r(a){if(c)throw new TypeError("Generator is already executing.");for(;o;)try{if(c=1,l&&(i=a[0]&2?l.return:a[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,a[1])).done)return i;switch(l=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,l=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=n.call(u,o)}catch(s){a=[6,s],l=0}finally{c=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Af=function(u){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&u[n],c=0;if(o)return o.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&c>=u.length&&(u=void 0),{value:u&&u[c++],done:!u}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},kn=function(){function u(n){var o,c,l;this._shutdown=!1;var i=q.default().merge((l=n?.resource)!==null&&l!==void 0?l:q.empty());if(this._sharedState=new Fa(i),n?.views!=null&&n.views.length>0)try{for(var e=Af(n.views),t=e.next();!t.done;t=e.next()){var r=t.value;this._sharedState.viewRegistry.addView(r)}}catch(a){o={error:a}}finally{try{t&&!t.done&&(c=e.return)&&c.call(e)}finally{if(o)throw o.error}}}return u.prototype.getMeter=function(n,o,c){return o===void 0&&(o=""),c===void 0&&(c={}),this._shutdown?(y.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,y.createNoopMeter)()):this._sharedState.getMeterSharedState({name:n,version:o,schemaUrl:c.schemaUrl}).meter},u.prototype.addMetricReader=function(n){var o=new Ka(this._sharedState,n);n.setMetricProducer(o),this._sharedState.metricCollectors.push(o)},u.prototype.shutdown=function(n){return Xa(this,void 0,void 0,function(){return Ya(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.shutdown(n)}))]);case 1:return o.sent(),[2]}})})},u.prototype.forceFlush=function(n){return Xa(this,void 0,void 0,function(){return Ya(this,function(o){switch(o.label){case 0:return this._shutdown?(y.diag.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(c){return c.forceFlush(n)}))];case 1:return o.sent(),[2]}})})},u}();var xl=P(St(),1),ce=P(De(),1),Rl=P($a(),1),lt=P(D(),1);b();var If=Symbol.for("@vercel/request-context");function Zt(){return globalThis[If]?.get()}var Hn=P(St(),1);function Nr(u){return Object.fromEntries(Object.entries(u).filter(([n,o])=>o!==void 0))}function Qa(u){return u?u.split("::").at(-1):void 0}function Za(u=Zt()){if(u)return Nr({[Hn.SemanticAttributes.HTTP_HOST]:u.headers.host,[Hn.SemanticAttributes.HTTP_USER_AGENT]:u.headers["user-agent"],"http.referer":u.headers.referer,"vercel.request_id":Qa(u.headers["x-vercel-id"]),"vercel.matched_path":u.headers["x-matched-path"],"vercel.edge_region":u.headers["x-vercel-edge-region"]})}b();function be(u){return(u&y.TraceFlags.SAMPLED)!==0}var Pr=class{constructor(n){this.processors=n;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(n=>n.forceFlush().catch(o=>{y.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(n=>n.shutdown().catch(()=>{}))).then(()=>{})}onStart(n,o){let{traceId:c,spanId:l,traceFlags:i}=n.spanContext(),e=!n.parentSpanId||!this.rootSpanIds.has(c);if(e&&this.rootSpanIds.set(c,l),e&&be(i)){let t=Za();t&&n.setAttributes(t);let r=Zt();r&&r.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let a=new Promise(d=>{this.waitSpanEnd.set(c,d)}),s;await Promise.race([a,new Promise(d=>{s=setTimeout(()=>{this.waitSpanEnd.delete(c),d(void 0)},50)})]),s&&clearTimeout(s)}return this.forceFlush()})}for(let t of this.processors)t.onStart(n,o)}onEnd(n){let{traceId:o,spanId:c,traceFlags:l}=n.spanContext(),i=be(l),e=this.rootSpanIds.get(o)===c;if(i){let t=wf(n);t&&Object.assign(n.attributes,t)}for(let t of this.processors)t.onEnd(n);if(e){this.rootSpanIds.delete(o);let t=this.waitSpanEnd.get(o);t&&(this.waitSpanEnd.delete(o),t())}}},tu={[y.SpanKind.INTERNAL]:"internal",[y.SpanKind.SERVER]:"server",[y.SpanKind.CLIENT]:"client",[y.SpanKind.PRODUCER]:"producer",[y.SpanKind.CONSUMER]:"consumer"};function wf(u){let{kind:n,attributes:o}=u,{"operation.name":c,"resouce.name":l,"span.type":i,"next.span_type":e,"next.route":t,"http.method":r,"http.route":a}=o;if(c)return;let s=u.instrumentationLibrary.name,d=e??i;if(d&&typeof d=="string"){let v=jn(s,d);return t?{"operation.name":v,"resource.name":l??t}:{"operation.name":v}}return r&&a&&typeof r=="string"&&typeof a=="string"?{"operation.name":jn(s,`http.${tu[n]||"internal"}.${r}`),"resource.name":l??a}:{"operation.name":jn(s,n===y.SpanKind.INTERNAL?"":tu[n])}}function jn(u,n){if(!u)return n;let o=u.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),n?`${o}.${n}`:o}var du=P(zn(),1);var pu=P(Ir(),1);b();var te=class extends pu.OTLPExporterBase{constructor(n={}){super(n),n.headers&&(this._headers=n.headers)}onShutdown(){y.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){y.diag.debug("@vercel/otel/otlp: onInit")}send(n,o,c){if(this._shutdownOnce.isCalled){y.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let l=this.convert(n),i,e,t;try{({body:i,contentType:e,headers:t}=this.toMessage(l))}catch(a){y.diag.warn("@vercel/otel/otlp: no proto",a);return}let r=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...t,"Content-Type":e,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(a=>{y.diag.debug("@vercel/otel/otlp: onSuccess",a.status,a.statusText),o(),a.arrayBuffer().catch(()=>{})}).catch(a=>{y.diag.error("@vercel/otel/otlp: onError",a),c(a)}).finally(()=>{let a=this._sendingPromises.indexOf(r);this._sendingPromises.splice(a,1)});this._sendingPromises.push(r)}getDefaultUrl(n){throw new Error("Method not implemented.")}};var Zf="v1/traces",tp=`http://localhost:4318/${Zf}`;function wr(u){return typeof u.url=="string"?u.url:tp}var ee=class extends te{convert(n){return(0,du.createExportTraceServiceRequest)(n,{useHex:!0,useLongBits:!1})}toMessage(n){return{body:JSON.stringify(n),contentType:"application/json"}}getDefaultUrl(n){return wr(n)}};var Sl=P(zn(),1),Tl=P(bl(),1),Ol=P(Eo(),1);var jt=class extends te{convert(n){return(0,Sl.createExportTraceServiceRequest)(n,void 0)}toMessage(n){let o=Tl.ServiceClientType.SPANS,c=(0,Ol.getExportRequestProto)(o),l=c.create(n);return{body:c.encode(l).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(n){return wr(n)}};b();var wt=P(St(),1);function gl(u,n){return u.replace(/\{(?<temp1>[^{}]+)\}/g,(o,c)=>{let l=n[c];return l!==void 0?String(l):o})}var ue=class{constructor(n={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=n}getConfig(){return this.config}setConfig(){}setTracerProvider(n){this.tracerProvider=n}setMeterProvider(){}enable(){this.disable();let{tracerProvider:n}=this;if(!n)return;let o=n.getTracer(this.instrumentationName,this.instrumentationVersion),c=this.config.ignoreUrls??[],l=(S,g)=>{if(g?.opentelemetry?.ignore!==void 0)return g.opentelemetry.ignore;if(c.length===0)return!1;let L=S.toString();return c.some(A=>typeof A=="string"?A==="*"?!0:L.startsWith(A):A.test(L))},i=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,e=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,t=this.config.propagateContextUrls??[],r=this.config.dontPropagateContextUrls??[],a=this.config.resourceNameTemplate,s=(S,g)=>{if(g?.opentelemetry?.propagateContext)return g.opentelemetry.propagateContext;let L=S.toString();return r.length>0&&r.some(A=>typeof A=="string"?A==="*"?!0:L.startsWith(A):A.test(L))?!1:i&&S.protocol==="https:"&&(S.host===i||S.host===e||S.host===Zt()?.headers.host)||!i&&S.protocol==="http:"&&S.hostname==="localhost"?!0:t.some(A=>typeof A=="string"?A==="*"?!0:L.startsWith(A):A.test(L))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let d=globalThis.fetch;this.originalFetch=d;let v=(S,g)=>{let L=g;if(L?.next?.internal)return d(S,L);let A=new Request(S,L),K=new URL(A.url);if(l(K,L))return d(S,L);let X={[wt.SemanticAttributes.HTTP_METHOD]:A.method,[wt.SemanticAttributes.HTTP_URL]:A.url,[wt.SemanticAttributes.HTTP_HOST]:K.host,[wt.SemanticAttributes.HTTP_SCHEME]:K.protocol.replace(":",""),[wt.SemanticAttributes.NET_PEER_NAME]:K.hostname,[wt.SemanticAttributes.NET_PEER_PORT]:K.port},Re=a?gl(a,X):xp(A.url);return o.startActiveSpan(L?.opentelemetry?.spanName??`fetch ${A.method} ${A.url}`,{kind:y.SpanKind.CLIENT,attributes:{...X,"operation.name":`fetch.${A.method}`,"resource.name":Re,...L?.opentelemetry?.attributes}},async tt=>{tt.isRecording()&&be(tt.spanContext().traceFlags)&&s(K,L)&&y.propagation.inject(y.context.active(),A.headers,Pp);try{let J=await d(S,{...L,headers:A.headers});return tt.setAttribute(wt.SemanticAttributes.HTTP_STATUS_CODE,J.status),J.status>=500&&tt.setStatus({code:y.SpanStatusCode.ERROR,message:`Status: ${J.status} (${J.statusText})`}),tt.end(),J}catch(J){throw J instanceof Error?(tt.recordException(J),tt.setStatus({code:y.SpanStatusCode.ERROR,message:J.message})):tt.setStatus({code:y.SpanStatusCode.ERROR,message:String(J)}),tt.end(),J}})};globalThis.fetch=v}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Pp={set(u,n,o){u.set(n,o)}};function xp(u){let n=u.indexOf("?");return n===-1?u:u.substring(0,n)}var jr=class{constructor(n={}){this.configuration=n}start(){let n=Rp(),o=(0,ce.getEnvWithoutDefaults)(),c=this.configuration,l=process.env.NEXT_RUNTIME||"nodejs",i=!!n.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&y.diag.setLogger(new y.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),i)return;let e=c.idGenerator??new fr,t=c.contextManager??new Rl.AsyncLocalStorageContextManager;t.enable(),this.contextManager=t;let r=n.OTEL_SERVICE_NAME||c.serviceName||"app",a=new q(Nr({[xl.SemanticResourceAttributes.SERVICE_NAME]:r,"node.ci":process.env.CI?!0:void 0,"node.env":"production","vercel.env":process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":l,"vercel.sha":process.env.VERCEL_GIT_COMMIT_SHA||process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,"vercel.host":process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||void 0,"vercel.branch_host":process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||void 0,...c.attributes})),s=c.resourceDetectors??[Fi];if(c.autoDetectResources??!0){let X={detectors:s};a=a.merge(Ki(X))}let v=Ip(c.propagators,n),S=wp(c.traceSampler,n),g=Cp(c.spanProcessors,c,n);g.length===0&&y.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let L=c.spanLimits,A=new zi({resource:a,idGenerator:e,sampler:S,spanLimits:L});if(A.addSpanProcessor(new Pr(g)),A.register({contextManager:t,propagator:new lt.CompositePropagator({propagators:v})}),this.tracerProvider=A,c.logRecordProcessor){let X=new Rn({resource:a});this.loggerProvider=X,X.addLogRecordProcessor(c.logRecordProcessor),dt.logs.setGlobalLoggerProvider(X)}if(c.metricReader||c.views){let X=new kn({resource:a,views:c.views??[]});c.metricReader&&X.addMetricReader(c.metricReader),y.metrics.setGlobalMeterProvider(X),this.meterProvider=X}let K=Lp(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,Pl.registerInstrumentations)({instrumentations:K}),y.diag.info("@vercel/otel: started",r,l)}async shutdown(){let n=[];this.tracerProvider&&n.push(this.tracerProvider.shutdown()),this.loggerProvider&&n.push(this.loggerProvider.shutdown()),this.meterProvider&&n.push(this.meterProvider.shutdown()),y.diag.info("@vercel/otel: shutting down",n.length,process.env.NEXT_RUNTIME),await Promise.all(n),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function Rp(){let u=(0,ce.parseEnvironment)(process.env);return{...ce.DEFAULT_ENVIRONMENT,...u}}function Lp(u,n){return(u??["auto"]).map(o=>o==="auto"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),[new ue(n?.fetch)]):o==="fetch"?(y.diag.debug("@vercel/otel: Configure instrumentations: fetch",n?.fetch),new ue(n?.fetch)):o).flat()}function Ip(u,n){let o=n.OTEL_PROPAGATORS&&n.OTEL_PROPAGATORS.length>0?n.OTEL_PROPAGATORS:void 0;return(u??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return y.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new lt.W3CTraceContextPropagator,new lt.W3CBaggagePropagator];if(c==="tracecontext")return y.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new lt.W3CTraceContextPropagator;if(c==="baggage")return y.diag.debug("@vercel/otel: Configure propagator: baggage"),new lt.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var Al="always_on",le=1;function wp(u,n){if(u&&typeof u!="string")return u;let o=u&&u!=="auto"?u:n.OTEL_TRACES_SAMPLER||Al;switch(y.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new $;case"always_off":return new pt;case"parentbased_always_on":return new Ot({root:new $});case"parentbased_always_off":return new Ot({root:new pt});case"traceidratio":return new Yt(Nl(n));case"parentbased_traceidratio":return new Ot({root:new Yt(Nl(n))});default:return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(n.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Al}".`),new $}}function Nl(u){if(u.OTEL_TRACES_SAMPLER_ARG===void 0||u.OTEL_TRACES_SAMPLER_ARG==="")return y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${le}.`),le;y.diag.debug("@vercel/otel: Configure sampler probability: ",u.OTEL_TRACES_SAMPLER_ARG);let n=Number(u.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${le}.`),le):n<0||n>1?(y.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${u.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${le}.`),le):n}function Cp(u,n,o){return(u??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let l=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",i=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";y.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",l,i);let e={url:`http://localhost:${l}/v1/traces`,headers:{}},t=i==="http/protobuf"?new jt(e):new ee(e);return new me(t)}return n.traceExporter||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new me(Up(n.traceExporter,o)):void 0}return c}).filter(Bp)}function Up(u,n){if(u&&u!=="auto")return u;let o=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",c=Dp(n),l={...lt.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_HEADERS),...lt.baggageUtils.parseKeyPairsIntoRecord(n.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(y.diag.debug("@vercel/otel: Configure trace exporter: ",o,c,`headers: ${Object.keys(l).join(",")||"<none>"}`),o){case"http/json":return new ee({url:c,headers:l});case"http/protobuf":return new jt({url:c,headers:l});default:return y.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new jt}}var Ll="v1/traces",Mp=`http://localhost:4318/${Ll}`;function Dp(u){let n=u.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(n&&typeof n=="string")return n;let o=u.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${Ll}`:Mp}function Bp(u){return u!=null}function Hv(u){let n;u?typeof u=="string"?n={serviceName:u}:n=u:n={},new jr(n).start()}export{ue as FetchInstrumentation,ee as OTLPHttpJsonTraceExporter,jt as OTLPHttpProtoTraceExporter,Hv as registerOTel};