@vercel/otel 1.8.1 → 1.8.2

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.
@@ -4,17 +4,17 @@ import _nPath from 'path'
4
4
  const require = topLevelCreateRequire(import.meta.url);
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = _nPath.dirname(__filename);
7
- var Gm=Object.create;var ls=Object.defineProperty;var Hm=Object.getOwnPropertyDescriptor;var Fm=Object.getOwnPropertyNames;var Km=Object.getPrototypeOf,Xm=Object.prototype.hasOwnProperty;var z=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(r,o)=>(typeof require<"u"?require:r)[o]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var Fc=(i,r)=>()=>(i&&(r=i(i=0)),r);var d=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var cn=(i,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of Fm(r))!Xm.call(i,s)&&s!==o&&ls(i,s,{get:()=>r[s],enumerable:!(c=Hm(r,s))||c.enumerable});return i},Ot=(i,r,o)=>(cn(i,r,"default"),o&&cn(o,r,"default")),Q=(i,r,o)=>(o=i!=null?Gm(Km(i)):{},cn(r||!i||!i.__esModule?ls(o,"default",{value:i,enumerable:!0}):o,i)),E=i=>cn(ls({},"__esModule",{value:!0}),i);var _={};import*as Pb from"@opentelemetry/api";var y=Fc(()=>{Ot(_,Pb)});var Or=d(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.isTracingSuppressed=De.unsuppressTracing=De.suppressTracing=void 0;var zm=(y(),E(_)),ps=(0,zm.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function $m(i){return i.setValue(ps,!0)}De.suppressTracing=$m;function Ym(i){return i.deleteValue(ps)}De.unsuppressTracing=Ym;function Wm(i){return i.getValue(ps)===!0}De.isTracingSuppressed=Wm});var fs=d(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.BAGGAGE_MAX_TOTAL_LENGTH=Z.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Z.BAGGAGE_MAX_NAME_VALUE_PAIRS=Z.BAGGAGE_HEADER=Z.BAGGAGE_ITEMS_SEPARATOR=Z.BAGGAGE_PROPERTIES_SEPARATOR=Z.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Z.BAGGAGE_KEY_PAIR_SEPARATOR="=";Z.BAGGAGE_PROPERTIES_SEPARATOR=";";Z.BAGGAGE_ITEMS_SEPARATOR=",";Z.BAGGAGE_HEADER="baggage";Z.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Z.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Z.BAGGAGE_MAX_TOTAL_LENGTH=8192});var ds=d(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseKeyPairsIntoRecord=Oe.parsePairKeyValue=Oe.getKeyPairs=Oe.serializeKeyPairs=void 0;var Jm=(y(),E(_)),Je=fs();function Qm(i){return i.reduce((r,o)=>{let c=`${r}${r!==""?Je.BAGGAGE_ITEMS_SEPARATOR:""}${o}`;return c.length>Je.BAGGAGE_MAX_TOTAL_LENGTH?r:c},"")}Oe.serializeKeyPairs=Qm;function Zm(i){return i.getAllEntries().map(([r,o])=>{let c=`${encodeURIComponent(r)}=${encodeURIComponent(o.value)}`;return o.metadata!==void 0&&(c+=Je.BAGGAGE_PROPERTIES_SEPARATOR+o.metadata.toString()),c})}Oe.getKeyPairs=Zm;function Kc(i){let r=i.split(Je.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let o=r.shift();if(!o)return;let c=o.indexOf(Je.BAGGAGE_KEY_PAIR_SEPARATOR);if(c<=0)return;let s=decodeURIComponent(o.substring(0,c).trim()),a=decodeURIComponent(o.substring(c+1).trim()),t;return r.length>0&&(t=(0,Jm.baggageEntryMetadataFromString)(r.join(Je.BAGGAGE_PROPERTIES_SEPARATOR))),{key:s,value:a,metadata:t}}Oe.parsePairKeyValue=Kc;function e_(i){return typeof i!="string"||i.length===0?{}:i.split(Je.BAGGAGE_ITEMS_SEPARATOR).map(r=>Kc(r)).filter(r=>r!==void 0&&r.value.length>0).reduce((r,o)=>(r[o.key]=o.value,r),{})}Oe.parseKeyPairsIntoRecord=e_});var Xc=d(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.W3CBaggagePropagator=void 0;var hs=(y(),E(_)),t_=Or(),Qe=fs(),ms=ds(),_s=class{inject(r,o,c){let s=hs.propagation.getBaggage(r);if(!s||(0,t_.isTracingSuppressed)(r))return;let a=(0,ms.getKeyPairs)(s).filter(e=>e.length<=Qe.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Qe.BAGGAGE_MAX_NAME_VALUE_PAIRS),t=(0,ms.serializeKeyPairs)(a);t.length>0&&c.set(o,Qe.BAGGAGE_HEADER,t)}extract(r,o,c){let s=c.get(o,Qe.BAGGAGE_HEADER),a=Array.isArray(s)?s.join(Qe.BAGGAGE_ITEMS_SEPARATOR):s;if(!a)return r;let t={};return a.length===0||(a.split(Qe.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let u=(0,ms.parsePairKeyValue)(n);if(u){let l={value:u.value};u.metadata&&(l.metadata=u.metadata),t[u.key]=l}}),Object.entries(t).length===0)?r:hs.propagation.setBaggage(r,hs.propagation.createBaggage(t))}fields(){return[Qe.BAGGAGE_HEADER]}};ln.W3CBaggagePropagator=_s});var zc=d(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.AnchoredClock=void 0;var ys=class{constructor(r,o){this._monotonicClock=o,this._epochMillis=r.now(),this._performanceMillis=o.now()}now(){let r=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+r}};pn.AnchoredClock=ys});var Qc=d(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.isAttributeValue=Be.isAttributeKey=Be.sanitizeAttributes=void 0;var $c=(y(),E(_));function r_(i){let r={};if(typeof i!="object"||i==null)return r;for(let[o,c]of Object.entries(i)){if(!Yc(o)){$c.diag.warn(`Invalid attribute key: ${o}`);continue}if(!Wc(c)){$c.diag.warn(`Invalid attribute value set for key: ${o}`);continue}Array.isArray(c)?r[o]=c.slice():r[o]=c}return r}Be.sanitizeAttributes=r_;function Yc(i){return typeof i=="string"&&i.length>0}Be.isAttributeKey=Yc;function Wc(i){return i==null?!0:Array.isArray(i)?n_(i):Jc(i)}Be.isAttributeValue=Wc;function n_(i){let r;for(let o of i)if(o!=null){if(!r){if(Jc(o)){r=typeof o;continue}return!1}if(typeof o!==r)return!1}return!0}function Jc(i){switch(typeof i){case"number":case"boolean":case"string":return!0}return!1}});var Es=d(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.loggingErrorHandler=void 0;var o_=(y(),E(_));function i_(){return i=>{o_.diag.error(s_(i))}}fn.loggingErrorHandler=i_;function s_(i){return typeof i=="string"?i:JSON.stringify(u_(i))}function u_(i){let r={},o=i;for(;o!==null;)Object.getOwnPropertyNames(o).forEach(c=>{if(r[c])return;let s=o[c];s&&(r[c]=String(s))}),o=Object.getPrototypeOf(o);return r}});var gs=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.globalErrorHandler=At.setGlobalErrorHandler=void 0;var a_=Es(),Zc=(0,a_.loggingErrorHandler)();function c_(i){Zc=i}At.setGlobalErrorHandler=c_;function l_(i){try{Zc(i)}catch{}}At.globalErrorHandler=l_});var vs=d(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.TracesSamplerValues=void 0;var p_;(function(i){i.AlwaysOff="always_off",i.AlwaysOn="always_on",i.ParentBasedAlwaysOff="parentbased_always_off",i.ParentBasedAlwaysOn="parentbased_always_on",i.ParentBasedTraceIdRatio="parentbased_traceidratio",i.TraceIdRatio="traceidratio"})(p_=Ar.TracesSamplerValues||(Ar.TracesSamplerValues={}))});var el=d(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn._globalThis=void 0;dn._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var hn=d(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 Ve=(y(),E(_)),f_=vs(),d_=el(),h_=",",m_=["OTEL_SDK_DISABLED"];function __(i){return m_.indexOf(i)>-1}var y_=["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 E_(i){return y_.indexOf(i)>-1}var g_=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function v_(i){return g_.indexOf(i)>-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:Ve.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:f_.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 T_(i,r,o){if(typeof o[i]>"u")return;let c=String(o[i]);r[i]=c.toLowerCase()==="true"}function S_(i,r,o,c=-1/0,s=1/0){if(typeof o[i]<"u"){let a=Number(o[i]);isNaN(a)||(a<c?r[i]=c:a>s?r[i]=s:r[i]=a)}}function b_(i,r,o,c=h_){let s=o[i];typeof s=="string"&&(r[i]=s.split(c).map(a=>a.trim()))}var O_={ALL:Ve.DiagLogLevel.ALL,VERBOSE:Ve.DiagLogLevel.VERBOSE,DEBUG:Ve.DiagLogLevel.DEBUG,INFO:Ve.DiagLogLevel.INFO,WARN:Ve.DiagLogLevel.WARN,ERROR:Ve.DiagLogLevel.ERROR,NONE:Ve.DiagLogLevel.NONE};function A_(i,r,o){let c=o[i];if(typeof c=="string"){let s=O_[c.toUpperCase()];s!=null&&(r[i]=s)}}function Ts(i){let r={};for(let o in C.DEFAULT_ENVIRONMENT){let c=o;switch(c){case"OTEL_LOG_LEVEL":A_(c,r,i);break;default:if(__(c))T_(c,r,i);else if(E_(c))S_(c,r,i);else if(v_(c))b_(c,r,i);else{let s=i[c];typeof s<"u"&&s!==null&&(r[c]=String(s))}}}return r}C.parseEnvironment=Ts;function P_(){return typeof process<"u"&&process&&process.env?Ts(process.env):Ts(d_._globalThis)}C.getEnvWithoutDefaults=P_});var rl=d(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getEnv=void 0;var N_=z("os"),tl=hn();function R_(){let i=(0,tl.parseEnvironment)(process.env);return Object.assign({HOSTNAME:N_.hostname()},tl.DEFAULT_ENVIRONMENT,i)}mn.getEnv=R_});var nl=d(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n._globalThis=void 0;_n._globalThis=typeof globalThis=="object"?globalThis:global});var il=d(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.hexToBase64=void 0;function ol(i){return i>=48&&i<=57?i-48:i>=97&&i<=102?i-87:i-55}var x_=Buffer.alloc(8),I_=Buffer.alloc(16);function L_(i){let r;i.length===16?r=x_:i.length===32?r=I_:r=Buffer.alloc(i.length/2);let o=0;for(let c=0;c<i.length;c+=2){let s=ol(i.charCodeAt(c)),a=ol(i.charCodeAt(c+1));r.writeUInt8(s<<4|a,o++)}return r.toString("base64")}yn.hexToBase64=L_});var al=d(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.RandomIdGenerator=void 0;var w_=8,ul=16,Ss=class{constructor(){this.generateTraceId=sl(ul),this.generateSpanId=sl(w_)}};gn.RandomIdGenerator=Ss;var En=Buffer.allocUnsafe(ul);function sl(i){return function(){for(let o=0;o<i/4;o++)En.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(En[o]>0);o++)o===i-1&&(En[i-1]=1);return En.toString("hex",0,i)}}});var cl=d(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.otperformance=void 0;var M_=z("perf_hooks");vn.otperformance=M_.performance});var bs=d(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.VERSION=void 0;Tn.VERSION="1.19.0"});var ll=d(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.MessageTypeValues=I.RpcGrpcStatusCodeValues=I.MessagingOperationValues=I.MessagingDestinationKindValues=I.HttpFlavorValues=I.NetHostConnectionSubtypeValues=I.NetHostConnectionTypeValues=I.NetTransportValues=I.FaasInvokedProviderValues=I.FaasDocumentOperationValues=I.FaasTriggerValues=I.DbCassandraConsistencyLevelValues=I.DbSystemValues=I.SemanticAttributes=void 0;I.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"};I.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"};I.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"};I.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};I.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};I.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};I.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};I.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};I.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"};I.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};I.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};I.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};I.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};I.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var pl=d(Ze=>{"use strict";var C_=Ze&&Ze.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),U_=Ze&&Ze.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&C_(r,i,o)};Object.defineProperty(Ze,"__esModule",{value:!0});U_(ll(),Ze)});var fl=d(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.TelemetrySdkLanguageValues=ee.OsTypeValues=ee.HostArchValues=ee.AwsEcsLaunchtypeValues=ee.CloudPlatformValues=ee.CloudProviderValues=ee.SemanticResourceAttributes=void 0;ee.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"};ee.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};ee.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"};ee.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};ee.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};ee.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"};ee.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var dl=d(et=>{"use strict";var D_=et&&et.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),B_=et&&et.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&D_(r,i,o)};Object.defineProperty(et,"__esModule",{value:!0});B_(fl(),et)});var fe=d(ke=>{"use strict";var V_=ke&&ke.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),hl=ke&&ke.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&V_(r,i,o)};Object.defineProperty(ke,"__esModule",{value:!0});hl(pl(),ke);hl(dl(),ke)});var ml=d(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.SDK_INFO=void 0;var k_=bs(),Pr=fe();Sn.SDK_INFO={[Pr.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[Pr.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[Pr.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Pr.TelemetrySdkLanguageValues.NODEJS,[Pr.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:k_.VERSION}});var _l=d(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.unrefTimer=void 0;function q_(i){i.unref()}bn.unrefTimer=q_});var yl=d(ae=>{"use strict";var j_=ae&&ae.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),tt=ae&&ae.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&j_(r,i,o)};Object.defineProperty(ae,"__esModule",{value:!0});tt(rl(),ae);tt(nl(),ae);tt(il(),ae);tt(al(),ae);tt(cl(),ae);tt(ml(),ae);tt(_l(),ae)});var Os=d(rt=>{"use strict";var G_=rt&&rt.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),H_=rt&&rt.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&G_(r,i,o)};Object.defineProperty(rt,"__esModule",{value:!0});H_(yl(),rt)});var Tl=d(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.addHrTimes=M.isTimeInput=M.isTimeInputHrTime=M.hrTimeToMicroseconds=M.hrTimeToMilliseconds=M.hrTimeToNanoseconds=M.hrTimeToTimeStamp=M.hrTimeDuration=M.timeInputToHrTime=M.hrTime=M.getTimeOrigin=M.millisToHrTime=void 0;var As=Os(),El=9,F_=6,K_=Math.pow(10,F_),On=Math.pow(10,El);function Nr(i){let r=i/1e3,o=Math.trunc(r),c=Math.round(i%1e3*K_);return[o,c]}M.millisToHrTime=Nr;function Ps(){let i=As.otperformance.timeOrigin;if(typeof i!="number"){let r=As.otperformance;i=r.timing&&r.timing.fetchStart}return i}M.getTimeOrigin=Ps;function gl(i){let r=Nr(Ps()),o=Nr(typeof i=="number"?i:As.otperformance.now());return vl(r,o)}M.hrTime=gl;function X_(i){if(Ns(i))return i;if(typeof i=="number")return i<Ps()?gl(i):Nr(i);if(i instanceof Date)return Nr(i.getTime());throw TypeError("Invalid input type")}M.timeInputToHrTime=X_;function z_(i,r){let o=r[0]-i[0],c=r[1]-i[1];return c<0&&(o-=1,c+=On),[o,c]}M.hrTimeDuration=z_;function $_(i){let r=El,o=`${"0".repeat(r)}${i[1]}Z`,c=o.substr(o.length-r-1);return new Date(i[0]*1e3).toISOString().replace("000Z",c)}M.hrTimeToTimeStamp=$_;function Y_(i){return i[0]*On+i[1]}M.hrTimeToNanoseconds=Y_;function W_(i){return i[0]*1e3+i[1]/1e6}M.hrTimeToMilliseconds=W_;function J_(i){return i[0]*1e6+i[1]/1e3}M.hrTimeToMicroseconds=J_;function Ns(i){return Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"}M.isTimeInputHrTime=Ns;function Q_(i){return Ns(i)||typeof i=="number"||i instanceof Date}M.isTimeInput=Q_;function vl(i,r){let o=[i[0]+r[0],i[1]+r[1]];return o[1]>=On&&(o[1]-=On,o[0]+=1),o}M.addHrTimes=vl});var bl=d(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0})});var Ol=d(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ExportResultCode=void 0;var Z_;(function(i){i[i.SUCCESS=0]="SUCCESS",i[i.FAILED=1]="FAILED"})(Z_=Rr.ExportResultCode||(Rr.ExportResultCode={}))});var Pl=d(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.CompositePropagator=void 0;var Al=(y(),E(_)),Rs=class{constructor(r={}){var o;this._propagators=(o=r.propagators)!==null&&o!==void 0?o:[],this._fields=Array.from(new Set(this._propagators.map(c=>typeof c.fields=="function"?c.fields():[]).reduce((c,s)=>c.concat(s),[])))}inject(r,o,c){for(let s of this._propagators)try{s.inject(r,o,c)}catch(a){Al.diag.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(r,o,c){return this._propagators.reduce((s,a)=>{try{return a.extract(s,o,c)}catch(t){Al.diag.warn(`Failed to inject with ${a.constructor.name}. Err: ${t.message}`)}return s},r)}fields(){return this._fields.slice()}};An.CompositePropagator=Rs});var Nl=d(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.validateValue=Pt.validateKey=void 0;var xs="[_0-9a-z-*/]",ey=`[a-z]${xs}{0,255}`,ty=`[a-z0-9]${xs}{0,240}@[a-z]${xs}{0,13}`,ry=new RegExp(`^(?:${ey}|${ty})$`),ny=/^[ -~]{0,255}[!-~]$/,oy=/,|=/;function iy(i){return ry.test(i)}Pt.validateKey=iy;function sy(i){return ny.test(i)&&!oy.test(i)}Pt.validateValue=sy});var Ls=d(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.TraceState=void 0;var Rl=Nl(),xl=32,uy=512,Il=",",Ll="=",Is=class i{constructor(r){this._internalState=new Map,r&&this._parse(r)}set(r,o){let c=this._clone();return c._internalState.has(r)&&c._internalState.delete(r),c._internalState.set(r,o),c}unset(r){let o=this._clone();return o._internalState.delete(r),o}get(r){return this._internalState.get(r)}serialize(){return this._keys().reduce((r,o)=>(r.push(o+Ll+this.get(o)),r),[]).join(Il)}_parse(r){r.length>uy||(this._internalState=r.split(Il).reverse().reduce((o,c)=>{let s=c.trim(),a=s.indexOf(Ll);if(a!==-1){let t=s.slice(0,a),e=s.slice(a+1,c.length);(0,Rl.validateKey)(t)&&(0,Rl.validateValue)(e)&&o.set(t,e)}return o},new Map),this._internalState.size>xl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,xl))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let r=new i;return r._internalState=new Map(this._internalState),r}};Pn.TraceState=Is});var Ml=d(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.W3CTraceContextPropagator=te.parseTraceParent=te.TRACE_STATE_HEADER=te.TRACE_PARENT_HEADER=void 0;var Nn=(y(),E(_)),ay=Or(),cy=Ls();te.TRACE_PARENT_HEADER="traceparent";te.TRACE_STATE_HEADER="tracestate";var ly="00",py="(?!ff)[\\da-f]{2}",fy="(?![0]{32})[\\da-f]{32}",dy="(?![0]{16})[\\da-f]{16}",hy="[\\da-f]{2}",my=new RegExp(`^\\s?(${py})-(${fy})-(${dy})-(${hy})(-.*)?\\s?$`);function wl(i){let r=my.exec(i);return!r||r[1]==="00"&&r[5]?null:{traceId:r[2],spanId:r[3],traceFlags:parseInt(r[4],16)}}te.parseTraceParent=wl;var ws=class{inject(r,o,c){let s=Nn.trace.getSpanContext(r);if(!s||(0,ay.isTracingSuppressed)(r)||!(0,Nn.isSpanContextValid)(s))return;let a=`${ly}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||Nn.TraceFlags.NONE).toString(16)}`;c.set(o,te.TRACE_PARENT_HEADER,a),s.traceState&&c.set(o,te.TRACE_STATE_HEADER,s.traceState.serialize())}extract(r,o,c){let s=c.get(o,te.TRACE_PARENT_HEADER);if(!s)return r;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return r;let t=wl(a);if(!t)return r;t.isRemote=!0;let e=c.get(o,te.TRACE_STATE_HEADER);if(e){let n=Array.isArray(e)?e.join(","):e;t.traceState=new cy.TraceState(typeof n=="string"?n:void 0)}return Nn.trace.setSpanContext(r,t)}fields(){return[te.TRACE_PARENT_HEADER,te.TRACE_STATE_HEADER]}};te.W3CTraceContextPropagator=ws});var Ul=d(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0})});var Dl=d(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getRPCMetadata=Ee.deleteRPCMetadata=Ee.setRPCMetadata=Ee.RPCType=void 0;var _y=(y(),E(_)),Ms=(0,_y.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),yy;(function(i){i.HTTP="http"})(yy=Ee.RPCType||(Ee.RPCType={}));function Ey(i,r){return i.setValue(Ms,r)}Ee.setRPCMetadata=Ey;function gy(i){return i.deleteValue(Ms)}Ee.deleteRPCMetadata=gy;function vy(i){return i.getValue(Ms)}Ee.getRPCMetadata=vy});var Us=d(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.AlwaysOffSampler=void 0;var Ty=(y(),E(_)),Cs=class{shouldSample(){return{decision:Ty.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Rn.AlwaysOffSampler=Cs});var Bs=d(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.AlwaysOnSampler=void 0;var Sy=(y(),E(_)),Ds=class{shouldSample(){return{decision:Sy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};xn.AlwaysOnSampler=Ds});var Vl=d(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.ParentBasedSampler=void 0;var In=(y(),E(_)),by=gs(),Bl=Us(),Vs=Bs(),ks=class{constructor(r){var o,c,s,a;this._root=r.root,this._root||((0,by.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Vs.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Vs.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new Bl.AlwaysOffSampler,this._localParentSampled=(s=r.localParentSampled)!==null&&s!==void 0?s:new Vs.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new Bl.AlwaysOffSampler}shouldSample(r,o,c,s,a,t){let e=In.trace.getSpanContext(r);return!e||!(0,In.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,s,a,t):e.isRemote?e.traceFlags&In.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,s,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,s,a,t):e.traceFlags&In.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,s,a,t):this._localParentNotSampled.shouldSample(r,o,c,s,a,t)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Ln.ParentBasedSampler=ks});var kl=d(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.TraceIdRatioBasedSampler=void 0;var qs=(y(),E(_)),js=class{constructor(r=0){this._ratio=r,this._ratio=this._normalize(r),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(r,o){return{decision:(0,qs.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?qs.SamplingDecision.RECORD_AND_SAMPLED:qs.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let s=c*8,a=parseInt(r.slice(s,s+8),16);o=(o^a)>>>0}return o}};wn.TraceIdRatioBasedSampler=js});var Fl=d(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.isPlainObject=void 0;var Oy="[object Object]",Ay="[object Null]",Py="[object Undefined]",Ny=Function.prototype,ql=Ny.toString,Ry=ql.call(Object),xy=Iy(Object.getPrototypeOf,Object),jl=Object.prototype,Gl=jl.hasOwnProperty,nt=Symbol?Symbol.toStringTag:void 0,Hl=jl.toString;function Iy(i,r){return function(o){return i(r(o))}}function Ly(i){if(!wy(i)||My(i)!==Oy)return!1;let r=xy(i);if(r===null)return!0;let o=Gl.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&ql.call(o)===Ry}Mn.isPlainObject=Ly;function wy(i){return i!=null&&typeof i=="object"}function My(i){return i==null?i===void 0?Py:Ay:nt&&nt in Object(i)?Cy(i):Uy(i)}function Cy(i){let r=Gl.call(i,nt),o=i[nt],c=!1;try{i[nt]=void 0,c=!0}catch{}let s=Hl.call(i);return c&&(r?i[nt]=o:delete i[nt]),s}function Uy(i){return Hl.call(i)}});var Yl=d(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.merge=void 0;var Kl=Fl(),Dy=20;function By(...i){let r=i.shift(),o=new WeakMap;for(;i.length>0;)r=zl(r,i.shift(),0,o);return r}Dn.merge=By;function Gs(i){return Un(i)?i.slice():i}function zl(i,r,o=0,c){let s;if(!(o>Dy)){if(o++,Cn(i)||Cn(r)||$l(r))s=Gs(r);else if(Un(i)){if(s=i.slice(),Un(r))for(let a=0,t=r.length;a<t;a++)s.push(Gs(r[a]));else if(xr(r)){let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t];s[n]=Gs(r[n])}}}else if(xr(i))if(xr(r)){if(!Vy(i,r))return r;s=Object.assign({},i);let a=Object.keys(r);for(let t=0,e=a.length;t<e;t++){let n=a[t],u=r[n];if(Cn(u))typeof u>"u"?delete s[n]:s[n]=u;else{let l=s[n],h=u;if(Xl(i,n,c)||Xl(r,n,c))delete s[n];else{if(xr(l)&&xr(h)){let T=c.get(l)||[],D=c.get(h)||[];T.push({obj:i,key:n}),D.push({obj:r,key:n}),c.set(l,T),c.set(h,D)}s[n]=zl(s[n],u,o,c)}}}}else s=r;return s}}function Xl(i,r,o){let c=o.get(i[r])||[];for(let s=0,a=c.length;s<a;s++){let t=c[s];if(t.key===r&&t.obj===i)return!0}return!1}function Un(i){return Array.isArray(i)}function $l(i){return typeof i=="function"}function xr(i){return!Cn(i)&&!Un(i)&&!$l(i)&&typeof i=="object"}function Cn(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"||typeof i>"u"||i instanceof Date||i instanceof RegExp||i===null}function Vy(i,r){return!(!(0,Kl.isPlainObject)(i)||!(0,Kl.isPlainObject)(r))}});var Wl=d(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.callWithTimeout=Nt.TimeoutError=void 0;var Bn=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};Nt.TimeoutError=Bn;function ky(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new Bn("Operation timed out."))},r)});return Promise.race([i,c]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}Nt.callWithTimeout=ky});var Ql=d(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.isUrlIgnored=Rt.urlMatches=void 0;function Jl(i,r){return typeof r=="string"?i===r:!!i.match(r)}Rt.urlMatches=Jl;function qy(i,r){if(!r)return!1;for(let o of r)if(Jl(i,o))return!0;return!1}Rt.isUrlIgnored=qy});var Zl=d(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.isWrapped=void 0;function jy(i){return typeof i=="function"&&typeof i.__original=="function"&&typeof i.__unwrap=="function"&&i.__wrapped===!0}Vn.isWrapped=jy});var ep=d(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.Deferred=void 0;var Hs=class{constructor(){this._promise=new Promise((r,o)=>{this._resolve=r,this._reject=o})}get promise(){return this._promise}resolve(r){this._resolve(r)}reject(r){this._reject(r)}};kn.Deferred=Hs});var tp=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.BindOnceFuture=void 0;var Gy=ep(),Fs=class{constructor(r,o){this._callback=r,this._that=o,this._isCalled=!1,this._deferred=new Gy.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...r){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...r)).then(o=>this._deferred.resolve(o),o=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}};qn.BindOnceFuture=Fs});var np=d(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn._export=void 0;var rp=(y(),E(_)),Hy=Or();function Fy(i,r){return new Promise(o=>{rp.context.with((0,Hy.suppressTracing)(rp.context.active()),()=>{i.export(r,c=>{o(c)})})})}jn._export=Fy});var N=d(P=>{"use strict";var Ky=P&&P.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),w=P&&P.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Ky(r,i,o)};Object.defineProperty(P,"__esModule",{value:!0});P.internal=P.baggageUtils=void 0;w(Xc(),P);w(zc(),P);w(Qc(),P);w(gs(),P);w(Es(),P);w(Tl(),P);w(bl(),P);w(Ol(),P);P.baggageUtils=ds();w(Os(),P);w(Pl(),P);w(Ml(),P);w(Ul(),P);w(Dl(),P);w(Us(),P);w(Bs(),P);w(Vl(),P);w(kl(),P);w(Or(),P);w(Ls(),P);w(hn(),P);w(Yl(),P);w(vs(),P);w(Wl(),P);w(Ql(),P);w(Zl(),P);w(tp(),P);w(bs(),P);var Xy=np();P.internal={_export:Xy._export}});var op=d(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ExceptionEventName=void 0;Gn.ExceptionEventName="exception"});var Xs=d(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Span=void 0;var Ae=(y(),E(_)),re=N(),ot=fe(),zy=op(),Ks=class{constructor(r,o,c,s,a,t,e=[],n,u,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Ae.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=c,this._spanContext=s,this.parentSpanId=t,this.kind=a,this.links=e;let h=Date.now();this._performanceStartTime=re.otperformance.now(),this._performanceOffset=h-(this._performanceStartTime+(0,re.getTimeOrigin)()),this._startTimeProvided=n!=null,this.startTime=this._getTime(n??h),this.resource=r.resource,this.instrumentationLibrary=r.instrumentationLibrary,this._spanLimits=r.getSpanLimits(),l!=null&&this.setAttributes(l),this._spanProcessor=r.getActiveSpanProcessor(),this._spanProcessor.onStart(this,o),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}spanContext(){return this._spanContext}setAttribute(r,o){return o==null||this._isSpanEnded()?this:r.length===0?(Ae.diag.warn(`Invalid attribute key: ${r}`),this):(0,re.isAttributeValue)(o)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,r)?(this._droppedAttributesCount++,this):(this.attributes[r]=this._truncateToSize(o),this):(Ae.diag.warn(`Invalid attribute value set for key: ${r}`),this)}setAttributes(r){for(let[o,c]of Object.entries(r))this.setAttribute(o,c);return this}addEvent(r,o,c){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Ae.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Ae.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,re.isTimeInput)(o)&&((0,re.isTimeInput)(c)||(c=o),o=void 0);let s=(0,re.sanitizeAttributes)(o);return this.events.push({name:r,attributes:s,time:this._getTime(c),droppedAttributesCount:0}),this}setStatus(r){return this._isSpanEnded()?this:(this.status=r,this)}updateName(r){return this._isSpanEnded()?this:(this.name=r,this)}end(r){if(this._isSpanEnded()){Ae.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(r),this._duration=(0,re.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Ae.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)}_getTime(r){if(typeof r=="number"&&r<re.otperformance.now())return(0,re.hrTime)(r+this._performanceOffset);if(typeof r=="number")return(0,re.millisToHrTime)(r);if(r instanceof Date)return(0,re.millisToHrTime)(r.getTime());if((0,re.isTimeInputHrTime)(r))return r;if(this._startTimeProvided)return(0,re.millisToHrTime)(Date.now());let o=re.otperformance.now()-this._performanceStartTime;return(0,re.addHrTimes)(this.startTime,(0,re.millisToHrTime)(o))}isRecording(){return this._ended===!1}recordException(r,o){let c={};typeof r=="string"?c[ot.SemanticAttributes.EXCEPTION_MESSAGE]=r:r&&(r.code?c[ot.SemanticAttributes.EXCEPTION_TYPE]=r.code.toString():r.name&&(c[ot.SemanticAttributes.EXCEPTION_TYPE]=r.name),r.message&&(c[ot.SemanticAttributes.EXCEPTION_MESSAGE]=r.message),r.stack&&(c[ot.SemanticAttributes.EXCEPTION_STACKTRACE]=r.stack)),c[ot.SemanticAttributes.EXCEPTION_TYPE]||c[ot.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(zy.ExceptionEventName,c,o):Ae.diag.warn(`Failed to record an exception ${r}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&Ae.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(r,o){return r.length<=o?r:r.substr(0,o)}_truncateToSize(r){let o=this._attributeValueLengthLimit;return o<=0?(Ae.diag.warn(`Attribute value limit must be positive, got ${o}`),r):typeof r=="string"?this._truncateToLimitUtil(r,o):Array.isArray(r)?r.map(c=>typeof c=="string"?this._truncateToLimitUtil(c,o):c):r}};Hn.Span=Ks});var Lr=d(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.SamplingDecision=void 0;var $y;(function(i){i[i.NOT_RECORD=0]="NOT_RECORD",i[i.RECORD=1]="RECORD",i[i.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($y=Ir.SamplingDecision||(Ir.SamplingDecision={}))});var Kn=d(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AlwaysOffSampler=void 0;var Yy=Lr(),zs=class{shouldSample(){return{decision:Yy.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Fn.AlwaysOffSampler=zs});var zn=d(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.AlwaysOnSampler=void 0;var Wy=Lr(),$s=class{shouldSample(){return{decision:Wy.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Xn.AlwaysOnSampler=$s});var Js=d(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.ParentBasedSampler=void 0;var $n=(y(),E(_)),Jy=N(),ip=Kn(),Ys=zn(),Ws=class{constructor(r){var o,c,s,a;this._root=r.root,this._root||((0,Jy.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ys.AlwaysOnSampler),this._remoteParentSampled=(o=r.remoteParentSampled)!==null&&o!==void 0?o:new Ys.AlwaysOnSampler,this._remoteParentNotSampled=(c=r.remoteParentNotSampled)!==null&&c!==void 0?c:new ip.AlwaysOffSampler,this._localParentSampled=(s=r.localParentSampled)!==null&&s!==void 0?s:new Ys.AlwaysOnSampler,this._localParentNotSampled=(a=r.localParentNotSampled)!==null&&a!==void 0?a:new ip.AlwaysOffSampler}shouldSample(r,o,c,s,a,t){let e=$n.trace.getSpanContext(r);return!e||!(0,$n.isSpanContextValid)(e)?this._root.shouldSample(r,o,c,s,a,t):e.isRemote?e.traceFlags&$n.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(r,o,c,s,a,t):this._remoteParentNotSampled.shouldSample(r,o,c,s,a,t):e.traceFlags&$n.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(r,o,c,s,a,t):this._localParentNotSampled.shouldSample(r,o,c,s,a,t)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Yn.ParentBasedSampler=Ws});var Zs=d(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.TraceIdRatioBasedSampler=void 0;var Qy=(y(),E(_)),sp=Lr(),Qs=class{constructor(r=0){this._ratio=r,this._ratio=this._normalize(r),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(r,o){return{decision:(0,Qy.isValidTraceId)(o)&&this._accumulate(o)<this._upperBound?sp.SamplingDecision.RECORD_AND_SAMPLED:sp.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(r){return typeof r!="number"||isNaN(r)?0:r>=1?1:r<=0?0:r}_accumulate(r){let o=0;for(let c=0;c<r.length/8;c++){let s=c*8,a=parseInt(r.slice(s,s+8),16);o=(o^a)>>>0}return o}};Wn.TraceIdRatioBasedSampler=Qs});var ru=d(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.buildSamplerFromEnv=It.loadDefaultConfig=void 0;var Jn=(y(),E(_)),W=N(),up=Kn(),eu=zn(),tu=Js(),ap=Zs(),Zy=(0,W.getEnv)(),eE=W.TracesSamplerValues.AlwaysOn,xt=1;function tE(){return{sampler:lp(Zy),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,W.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,W.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,W.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,W.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,W.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}It.loadDefaultConfig=tE;function lp(i=(0,W.getEnv)()){switch(i.OTEL_TRACES_SAMPLER){case W.TracesSamplerValues.AlwaysOn:return new eu.AlwaysOnSampler;case W.TracesSamplerValues.AlwaysOff:return new up.AlwaysOffSampler;case W.TracesSamplerValues.ParentBasedAlwaysOn:return new tu.ParentBasedSampler({root:new eu.AlwaysOnSampler});case W.TracesSamplerValues.ParentBasedAlwaysOff:return new tu.ParentBasedSampler({root:new up.AlwaysOffSampler});case W.TracesSamplerValues.TraceIdRatio:return new ap.TraceIdRatioBasedSampler(cp(i));case W.TracesSamplerValues.ParentBasedTraceIdRatio:return new tu.ParentBasedSampler({root:new ap.TraceIdRatioBasedSampler(cp(i))});default:return Jn.diag.error(`OTEL_TRACES_SAMPLER value "${i.OTEL_TRACES_SAMPLER} invalid, defaulting to ${eE}".`),new eu.AlwaysOnSampler}}It.buildSamplerFromEnv=lp;function cp(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${xt}.`),xt;let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${xt}.`),xt):r<0||r>1?(Jn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${xt}.`),xt):r}});var ou=d(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.reconfigureLimits=Lt.mergeConfig=void 0;var pp=ru(),nu=N();function rE(i){let r={sampler:(0,pp.buildSamplerFromEnv)()},o=(0,pp.loadDefaultConfig)(),c=Object.assign({},o,r,i);return c.generalLimits=Object.assign({},o.generalLimits,i.generalLimits||{}),c.spanLimits=Object.assign({},o.spanLimits,i.spanLimits||{}),c}Lt.mergeConfig=rE;function nE(i){var r,o,c,s,a,t,e,n,u,l,h,T;let D=Object.assign({},i.spanLimits),L=(0,nu.getEnvWithoutDefaults)();return D.attributeCountLimit=(t=(a=(s=(o=(r=i.spanLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&o!==void 0?o:(c=i.generalLimits)===null||c===void 0?void 0:c.attributeCountLimit)!==null&&s!==void 0?s:L.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:L.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:nu.DEFAULT_ATTRIBUTE_COUNT_LIMIT,D.attributeValueLengthLimit=(T=(h=(l=(n=(e=i.spanLimits)===null||e===void 0?void 0:e.attributeValueLengthLimit)!==null&&n!==void 0?n:(u=i.generalLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&l!==void 0?l:L.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&h!==void 0?h:L.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&T!==void 0?T:nu.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},i,{spanLimits:D})}Lt.reconfigureLimits=nE});var fp=d(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.BatchSpanProcessorBase=void 0;var wt=(y(),E(_)),it=N(),iu=class{constructor(r,o){this._exporter=r,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let c=(0,it.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 it.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(wt.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(r,o){}onEnd(r){this._shutdownOnce.isCalled||r.spanContext().traceFlags&wt.TraceFlags.SAMPLED&&this._addToBuffer(r)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(r){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&wt.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(wt.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(r),this._maybeStartTimer()}_flushAll(){return new Promise((r,o)=>{let c=[],s=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,t=s;a<t;a++)c.push(this._flushOneBatch());Promise.all(c).then(()=>{r()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((r,o)=>{let c=setTimeout(()=>{o(new Error("Timeout"))},this._exportTimeoutMillis);wt.context.with((0,it.suppressTracing)(wt.context.active()),()=>{let s=this._finishedSpans.splice(0,this._maxExportBatchSize),a=()=>this._exporter.export(s,e=>{var n;clearTimeout(c),e.code===it.ExportResultCode.SUCCESS?r():o((n=e.error)!==null&&n!==void 0?n:new Error("BatchSpanProcessor: span export failed"))}),t=s.map(e=>e.resource).filter(e=>e.asyncAttributesPending);t.length===0?a():Promise.all(t.map(e=>{var n;return(n=e.waitForAsyncAttributes)===null||n===void 0?void 0:n.call(e)})).then(a,e=>{(0,it.globalErrorHandler)(e),o(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let r=()=>{this._isExporting=!0,this._flushOneBatch().then(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(o=>{this._isExporting=!1,(0,it.globalErrorHandler)(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(()=>r(),this._scheduledDelayMillis),(0,it.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};Qn.BatchSpanProcessorBase=iu});var dp=d(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.BatchSpanProcessor=void 0;var oE=fp(),su=class extends oE.BatchSpanProcessorBase{onShutdown(){}};Zn.BatchSpanProcessor=su});var _p=d(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.RandomIdGenerator=void 0;var iE=8,mp=16,uu=class{constructor(){this.generateTraceId=hp(mp),this.generateSpanId=hp(iE)}};to.RandomIdGenerator=uu;var eo=Buffer.allocUnsafe(mp);function hp(i){return function(){for(let o=0;o<i/4;o++)eo.writeUInt32BE(Math.random()*2**32>>>0,o*4);for(let o=0;o<i&&!(eo[o]>0);o++)o===i-1&&(eo[i-1]=1);return eo.toString("hex",0,i)}}});var Ep=d(qe=>{"use strict";var sE=qe&&qe.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),yp=qe&&qe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&sE(r,i,o)};Object.defineProperty(qe,"__esModule",{value:!0});yp(dp(),qe);yp(_p(),qe)});var ro=d(st=>{"use strict";var uE=st&&st.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),aE=st&&st.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&uE(r,i,o)};Object.defineProperty(st,"__esModule",{value:!0});aE(Ep(),st)});var gp=d(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.Tracer=void 0;var J=(y(),E(_)),no=N(),cE=Xs(),lE=ou(),pE=ro(),au=class{constructor(r,o,c){this._tracerProvider=c;let s=(0,lE.mergeConfig)(o);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=o.idGenerator||new pE.RandomIdGenerator,this.resource=c.resource,this.instrumentationLibrary=r}startSpan(r,o={},c=J.context.active()){var s,a,t;o.root&&(c=J.trace.deleteSpan(c));let e=J.trace.getSpan(c);if((0,no.isTracingSuppressed)(c))return J.diag.debug("Instrumentation suppressed, returning Noop Span"),J.trace.wrapSpanContext(J.INVALID_SPAN_CONTEXT);let n=e?.spanContext(),u=this._idGenerator.generateSpanId(),l,h,T;!n||!J.trace.isSpanContextValid(n)?l=this._idGenerator.generateTraceId():(l=n.traceId,h=n.traceState,T=n.spanId);let D=(s=o.kind)!==null&&s!==void 0?s:J.SpanKind.INTERNAL,L=((a=o.links)!==null&&a!==void 0?a:[]).map(St=>({context:St.context,attributes:(0,no.sanitizeAttributes)(St.attributes)})),x=(0,no.sanitizeAttributes)(o.attributes),B=this._sampler.shouldSample(c,l,r,D,x,L);h=(t=B.traceState)!==null&&t!==void 0?t:h;let b=B.decision===J.SamplingDecision.RECORD_AND_SAMPLED?J.TraceFlags.SAMPLED:J.TraceFlags.NONE,S={traceId:l,spanId:u,traceFlags:b,traceState:h};if(B.decision===J.SamplingDecision.NOT_RECORD)return J.diag.debug("Recording is off, propagating context in a non-recording span"),J.trace.wrapSpanContext(S);let K=(0,no.sanitizeAttributes)(Object.assign(x,B.attributes));return new cE.Span(this,c,r,S,D,T,L,o.startTime,void 0,K)}startActiveSpan(r,o,c,s){let a,t,e;if(arguments.length<2)return;arguments.length===2?e=o:arguments.length===3?(a=o,e=c):(a=o,t=c,e=s);let n=t??J.context.active(),u=this.startSpan(r,a,n),l=J.trace.setSpan(n,u);return J.context.with(l,e,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};oo.Tracer=au});var vp=d(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.defaultServiceName=void 0;function fE(){return`unknown_service:${process.argv0}`}io.defaultServiceName=fE});var cu=d(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.normalizeType=Mt.normalizeArch=void 0;var dE=i=>{switch(i){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return i}};Mt.normalizeArch=dE;var hE=i=>{switch(i){case"sunos":return"solaris";case"win32":return"windows";default:return i}};Mt.normalizeType=hE});var uo=d(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.execAsync=void 0;var mE=z("child_process"),_E=z("util");so.execAsync=_E.promisify(mE.exec)});var Tp=d(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.getMachineId=void 0;var yE=uo(),EE=(y(),E(_));async function gE(){try{let r=(await(0,yE.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
8
- `).find(c=>c.includes("IOPlatformUUID"));if(!r)return"";let o=r.split('" = "');if(o.length===2)return o[1].slice(0,-1)}catch(i){EE.diag.debug(`error reading machine id: ${i}`)}return""}ao.getMachineId=gE});var Sp=d(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.getMachineId=void 0;var vE=z("fs"),TE=(y(),E(_));async function SE(){let i=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let r of i)try{return(await vE.promises.readFile(r,{encoding:"utf8"})).trim()}catch(o){TE.diag.debug(`error reading machine id: ${o}`)}return""}co.getMachineId=SE});var Op=d(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.getMachineId=void 0;var bE=z("fs"),OE=uo(),bp=(y(),E(_));async function AE(){try{return(await bE.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(i){bp.diag.debug(`error reading machine id: ${i}`)}try{return(await(0,OE.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(i){bp.diag.debug(`error reading machine id: ${i}`)}return""}lo.getMachineId=AE});var Pp=d(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.getMachineId=void 0;var Ap=z("process"),PE=uo(),NE=(y(),E(_));async function RE(){let i="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",r="%windir%\\System32\\REG.exe";Ap.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Ap.env&&(r="%windir%\\sysnative\\cmd.exe /c "+r);try{let c=(await(0,PE.execAsync)(`${r} ${i}`)).stdout.split("REG_SZ");if(c.length===2)return c[1].trim()}catch(o){NE.diag.debug(`error reading machine id: ${o}`)}return""}po.getMachineId=RE});var Np=d(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.getMachineId=void 0;var xE=(y(),E(_));async function IE(){return xE.diag.debug("could not read machine-id: unsupported platform"),""}fo.getMachineId=IE});var Rp=d(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getMachineId=void 0;var LE=z("process"),Ct;Ie.getMachineId=Ct;switch(LE.platform){case"darwin":Ie.getMachineId=Ct=Tp().getMachineId;break;case"linux":Ie.getMachineId=Ct=Sp().getMachineId;break;case"freebsd":Ie.getMachineId=Ct=Op().getMachineId;break;case"win32":Ie.getMachineId=Ct=Pp().getMachineId;break;default:Ie.getMachineId=Ct=Np().getMachineId}});var fu=d(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.hostDetectorSync=void 0;var lu=fe(),wE=ut(),xp=z("os"),ME=cu(),CE=Rp(),pu=class{detect(r){let o={[lu.SemanticResourceAttributes.HOST_NAME]:(0,xp.hostname)(),[lu.SemanticResourceAttributes.HOST_ARCH]:(0,ME.normalizeArch)((0,xp.arch)())};return new wE.Resource(o,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,CE.getMachineId)().then(r=>{let o={};return r&&(o[lu.SemanticResourceAttributes.HOST_ID]=r),o})}};ho.hostDetectorSync=new pu});var Ip=d(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.hostDetector=void 0;var UE=fu(),du=class{detect(r){return Promise.resolve(UE.hostDetectorSync.detect(r))}};mo.hostDetector=new du});var mu=d(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.osDetectorSync=void 0;var Lp=fe(),DE=ut(),wp=z("os"),BE=cu(),hu=class{detect(r){let o={[Lp.SemanticResourceAttributes.OS_TYPE]:(0,BE.normalizeType)((0,wp.platform)()),[Lp.SemanticResourceAttributes.OS_VERSION]:(0,wp.release)()};return new DE.Resource(o)}};_o.osDetectorSync=new hu});var Mp=d(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.osDetector=void 0;var VE=mu(),_u=class{detect(r){return Promise.resolve(VE.osDetectorSync.detect(r))}};yo.osDetector=new _u});var Eu=d(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.processDetectorSync=void 0;var kE=(y(),E(_)),Le=fe(),qE=ut(),jE=z("os"),yu=class{detect(r){let o={[Le.SemanticResourceAttributes.PROCESS_PID]:process.pid,[Le.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title,[Le.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]:process.execPath,[Le.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Le.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:process.versions.node,[Le.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"nodejs",[Le.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(o[Le.SemanticResourceAttributes.PROCESS_COMMAND]=process.argv[1]);try{let c=jE.userInfo();o[Le.SemanticResourceAttributes.PROCESS_OWNER]=c.username}catch(c){kE.diag.debug(`error obtaining process owner: ${c}`)}return new qE.Resource(o)}};Eo.processDetectorSync=new yu});var Cp=d(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.processDetector=void 0;var GE=Eu(),gu=class{detect(r){return Promise.resolve(GE.processDetectorSync.detect(r))}};go.processDetector=new gu});var Up=d(ce=>{"use strict";var HE=ce&&ce.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),at=ce&&ce.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&HE(r,i,o)};Object.defineProperty(ce,"__esModule",{value:!0});at(vp(),ce);at(Ip(),ce);at(Mp(),ce);at(fu(),ce);at(mu(),ce);at(Cp(),ce);at(Eu(),ce)});var vu=d(ct=>{"use strict";var FE=ct&&ct.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),KE=ct&&ct.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&FE(r,i,o)};Object.defineProperty(ct,"__esModule",{value:!0});KE(Up(),ct)});var ut=d(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.Resource=void 0;var Dp=(y(),E(_)),lt=fe(),Tu=N(),XE=vu(),wr=class i{constructor(r,o){var c;this._attributes=r,this.asyncAttributesPending=o!=null,this._syncAttributes=(c=this._attributes)!==null&&c!==void 0?c:{},this._asyncAttributesPromise=o?.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(Dp.diag.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return i.EMPTY}static default(){return new i({[lt.SemanticResourceAttributes.SERVICE_NAME]:(0,XE.defaultServiceName)(),[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Tu.SDK_INFO[lt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var r;return this.asyncAttributesPending&&Dp.diag.error("Accessing resource attributes before async attributes settled"),(r=this._attributes)!==null&&r!==void 0?r:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(r){var o;if(!r)return this;let c=Object.assign(Object.assign({},this._syncAttributes),(o=r._syncAttributes)!==null&&o!==void 0?o:r.attributes);if(!this._asyncAttributesPromise&&!r._asyncAttributesPromise)return new i(c);let s=Promise.all([this._asyncAttributesPromise,r._asyncAttributesPromise]).then(([a,t])=>{var e;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(e=r._syncAttributes)!==null&&e!==void 0?e:r.attributes),t)});return new i(c,s)}};vo.Resource=wr;wr.EMPTY=new wr({})});var Vp=d(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0})});var qp=d(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0})});var Gp=d(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0})});var Hp=d(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.browserDetector=void 0;var zE=pt(),Su=class{detect(r){return Promise.resolve(zE.browserDetectorSync.detect(r))}};To.browserDetector=new Su});var Ou=d(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.envDetectorSync=void 0;var $E=(y(),E(_)),YE=N(),WE=fe(),JE=ut(),bu=class{constructor(){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."}detect(r){let o={},c=(0,YE.getEnv)(),s=c.OTEL_RESOURCE_ATTRIBUTES,a=c.OTEL_SERVICE_NAME;if(s)try{let t=this._parseResourceAttributes(s);Object.assign(o,t)}catch(t){$E.diag.debug(`EnvDetector failed: ${t.message}`)}return a&&(o[WE.SemanticResourceAttributes.SERVICE_NAME]=a),new JE.Resource(o)}_parseResourceAttributes(r){if(!r)return{};let o={},c=r.split(this._COMMA_SEPARATOR,-1);for(let s of c){let a=s.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length!==2)continue;let[t,e]=a;if(t=t.trim(),e=e.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(t))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(e))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);o[t]=decodeURIComponent(e)}return o}_isValid(r){return r.length<=this._MAX_LENGTH&&this._isBaggageOctetString(r)}_isBaggageOctetString(r){for(let o=0;o<r.length;o++){let c=r.charCodeAt(o);if(c<33||c===44||c===59||c===92||c>126)return!1}return!0}_isValidAndNotEmpty(r){return r.length>0&&this._isValid(r)}};So.envDetectorSync=new bu});var Fp=d(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.envDetector=void 0;var QE=Ou(),Au=class{detect(r){return Promise.resolve(QE.envDetectorSync.detect(r))}};bo.envDetector=new Au});var Kp=d(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.browserDetectorSync=void 0;var Oo=fe(),Pu=pt(),ZE=(y(),E(_)),Nu=class{detect(r){if(!(typeof navigator<"u"))return Pu.Resource.empty();let c={[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(c,r)}_getResourceAttributes(r,o){return r[Oo.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(ZE.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),Pu.Resource.empty()):new Pu.Resource(Object.assign({},r))}};Ao.browserDetectorSync=new Nu});var Xp=d(Pe=>{"use strict";var eg=Pe&&Pe.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),Po=Pe&&Pe.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&eg(r,i,o)};Object.defineProperty(Pe,"__esModule",{value:!0});Po(Hp(),Pe);Po(Fp(),Pe);Po(Kp(),Pe);Po(Ou(),Pe)});var zp=d(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.isPromiseLike=void 0;var tg=i=>i!==null&&typeof i=="object"&&typeof i.then=="function";No.isPromiseLike=tg});var Yp=d(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.detectResourcesSync=Dt.detectResources=void 0;var Mr=ut(),Ut=(y(),E(_)),rg=zp(),ng=async(i={})=>{let r=await Promise.all((i.detectors||[]).map(async o=>{try{let c=await o.detect(i);return Ut.diag.debug(`${o.constructor.name} found resource.`,c),c}catch(c){return Ut.diag.debug(`${o.constructor.name} failed: ${c.message}`),Mr.Resource.empty()}}));return $p(r),r.reduce((o,c)=>o.merge(c),Mr.Resource.empty())};Dt.detectResources=ng;var og=(i={})=>{var r;let o=((r=i.detectors)!==null&&r!==void 0?r:[]).map(s=>{try{let a=s.detect(i),t;if((0,rg.isPromiseLike)(a)){let e=async()=>(await a).attributes;t=new Mr.Resource({},e())}else t=a;return t.waitForAsyncAttributes?t.waitForAsyncAttributes().then(()=>Ut.diag.debug(`${s.constructor.name} found resource.`,t)):Ut.diag.debug(`${s.constructor.name} found resource.`,t),t}catch(a){return Ut.diag.error(`${s.constructor.name} failed: ${a.message}`),Mr.Resource.empty()}}),c=o.reduce((s,a)=>s.merge(a),Mr.Resource.empty());return c.waitForAsyncAttributes&&c.waitForAsyncAttributes().then(()=>{$p(o)}),c};Dt.detectResourcesSync=og;var $p=i=>{i.forEach(r=>{if(Object.keys(r.attributes).length>0){let o=JSON.stringify(r.attributes,null,4);Ut.diag.verbose(o)}})}});var pt=d(le=>{"use strict";var ig=le&&le.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),ft=le&&le.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&ig(r,i,o)};Object.defineProperty(le,"__esModule",{value:!0});ft(ut(),le);ft(Vp(),le);ft(vu(),le);ft(qp(),le);ft(Gp(),le);ft(Xp(),le);ft(Yp(),le)});var Wp=d(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.MultiSpanProcessor=void 0;var sg=N(),Ru=class{constructor(r){this._spanProcessors=r}forceFlush(){let r=[];for(let o of this._spanProcessors)r.push(o.forceFlush());return new Promise(o=>{Promise.all(r).then(()=>{o()}).catch(c=>{(0,sg.globalErrorHandler)(c||new Error("MultiSpanProcessor: forceFlush failed")),o()})})}onStart(r,o){for(let c of this._spanProcessors)c.onStart(r,o)}onEnd(r){for(let o of this._spanProcessors)o.onEnd(r)}shutdown(){let r=[];for(let o of this._spanProcessors)r.push(o.shutdown());return new Promise((o,c)=>{Promise.all(r).then(()=>{o()},c)})}};Ro.MultiSpanProcessor=Ru});var Iu=d(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.NoopSpanProcessor=void 0;var xu=class{onStart(r,o){}onEnd(r){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};xo.NoopSpanProcessor=xu});var Qp=d(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.BasicTracerProvider=dt.ForceFlushState=void 0;var Bt=(y(),E(_)),kt=N(),Jp=pt(),ug=Lu(),ag=ru(),cg=Wp(),lg=Iu(),pg=ro(),fg=ou(),Vt;(function(i){i[i.resolved=0]="resolved",i[i.timeout=1]="timeout",i[i.error=2]="error",i[i.unresolved=3]="unresolved"})(Vt=dt.ForceFlushState||(dt.ForceFlushState={}));var Cr=class{constructor(r={}){var o;this._registeredSpanProcessors=[],this._tracers=new Map;let c=(0,kt.merge)({},(0,ag.loadDefaultConfig)(),(0,fg.reconfigureLimits)(r));this.resource=(o=c.resource)!==null&&o!==void 0?o:Jp.Resource.empty(),this.resource=Jp.Resource.default().merge(this.resource),this._config=Object.assign({},c,{resource:this.resource});let s=this._buildExporterFromEnv();if(s!==void 0){let a=new pg.BatchSpanProcessor(s);this.activeSpanProcessor=a}else this.activeSpanProcessor=new lg.NoopSpanProcessor}getTracer(r,o,c){let s=`${r}@${o||""}:${c?.schemaUrl||""}`;return this._tracers.has(s)||this._tracers.set(s,new ug.Tracer({name:r,version:o,schemaUrl:c?.schemaUrl},this._config,this)),this._tracers.get(s)}addSpanProcessor(r){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(o=>Bt.diag.error("Error while trying to shutdown current span processor",o)),this._registeredSpanProcessors.push(r),this.activeSpanProcessor=new cg.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(r={}){Bt.trace.setGlobalTracerProvider(this),r.propagator===void 0&&(r.propagator=this._buildPropagatorFromEnv()),r.contextManager&&Bt.context.setGlobalContextManager(r.contextManager),r.propagator&&Bt.propagation.setGlobalPropagator(r.propagator)}forceFlush(){let r=this._config.forceFlushTimeoutMillis,o=this._registeredSpanProcessors.map(c=>new Promise(s=>{let a,t=setTimeout(()=>{s(new Error(`Span processor did not completed within timeout period of ${r} ms`)),a=Vt.timeout},r);c.forceFlush().then(()=>{clearTimeout(t),a!==Vt.timeout&&(a=Vt.resolved,s(a))}).catch(e=>{clearTimeout(t),a=Vt.error,s(e)})}));return new Promise((c,s)=>{Promise.all(o).then(a=>{let t=a.filter(e=>e!==Vt.resolved);t.length>0?s(t):c()}).catch(a=>s([a]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(r){var o;return(o=this.constructor._registeredPropagators.get(r))===null||o===void 0?void 0:o()}_getSpanExporter(r){var o;return(o=this.constructor._registeredExporters.get(r))===null||o===void 0?void 0:o()}_buildPropagatorFromEnv(){let r=Array.from(new Set((0,kt.getEnv)().OTEL_PROPAGATORS)),c=r.map(s=>{let a=this._getPropagator(s);return a||Bt.diag.warn(`Propagator "${s}" requested through environment variable is unavailable.`),a}).reduce((s,a)=>(a&&s.push(a),s),[]);if(c.length!==0)return r.length===1?c[0]:new kt.CompositePropagator({propagators:c})}_buildExporterFromEnv(){let r=(0,kt.getEnv)().OTEL_TRACES_EXPORTER;if(r==="none"||r==="")return;let o=this._getSpanExporter(r);return o||Bt.diag.error(`Exporter "${r}" requested through environment variable is unavailable.`),o}};dt.BasicTracerProvider=Cr;Cr._registeredPropagators=new Map([["tracecontext",()=>new kt.W3CTraceContextPropagator],["baggage",()=>new kt.W3CBaggagePropagator]]);Cr._registeredExporters=new Map});var Zp=d(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.ConsoleSpanExporter=void 0;var wu=N(),Mu=class{export(r,o){return this._sendSpans(r,o)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(r){var o;return{traceId:r.spanContext().traceId,parentId:r.parentSpanId,traceState:(o=r.spanContext().traceState)===null||o===void 0?void 0:o.serialize(),name:r.name,id:r.spanContext().spanId,kind:r.kind,timestamp:(0,wu.hrTimeToMicroseconds)(r.startTime),duration:(0,wu.hrTimeToMicroseconds)(r.duration),attributes:r.attributes,status:r.status,events:r.events,links:r.links}}_sendSpans(r,o){for(let c of r)console.dir(this._exportInfo(c),{depth:3});if(o)return o({code:wu.ExportResultCode.SUCCESS})}};Io.ConsoleSpanExporter=Mu});var tf=d(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.InMemorySpanExporter=void 0;var ef=N(),Cu=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:ef.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...r),setTimeout(()=>o({code:ef.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};Lo.InMemorySpanExporter=Cu});var nf=d(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0})});var of=d(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.SimpleSpanProcessor=void 0;var dg=(y(),E(_)),qt=N(),Uu=class{constructor(r){this._exporter=r,this._shutdownOnce=new qt.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(r,o){}onEnd(r){var o,c;if(this._shutdownOnce.isCalled||!(r.spanContext().traceFlags&dg.TraceFlags.SAMPLED))return;let s=()=>qt.internal._export(this._exporter,[r]).then(a=>{var t;a.code!==qt.ExportResultCode.SUCCESS&&(0,qt.globalErrorHandler)((t=a.error)!==null&&t!==void 0?t:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{(0,qt.globalErrorHandler)(a)});if(r.resource.asyncAttributesPending){let a=(c=(o=r.resource).waitForAsyncAttributes)===null||c===void 0?void 0:c.call(o).then(()=>(a!=null&&this._unresolvedExports.delete(a),s()),t=>(0,qt.globalErrorHandler)(t));a!=null&&this._unresolvedExports.add(a)}else s()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};wo.SimpleSpanProcessor=Uu});var uf=d(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0})});var cf=d(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0})});var pf=d(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0})});var df=d(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0})});var mf=d(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0})});var Lu=d(U=>{"use strict";var hg=U&&U.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),F=U&&U.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&hg(r,i,o)};Object.defineProperty(U,"__esModule",{value:!0});F(gp(),U);F(Qp(),U);F(ro(),U);F(Zp(),U);F(tf(),U);F(nf(),U);F(of(),U);F(uf(),U);F(Iu(),U);F(Kn(),U);F(zn(),U);F(Js(),U);F(Zs(),U);F(Lr(),U);F(Xs(),U);F(cf(),U);F(pf(),U);F(df(),U);F(mf(),U)});var ht={};import*as OA from"@opentelemetry/api-logs";var Du=Fc(()=>{Ot(ht,OA)});var yf=d(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.disableInstrumentations=je.enableInstrumentations=je.parseInstrumentationOptions=void 0;function _f(i=[]){let r=[];for(let o=0,c=i.length;o<c;o++){let s=i[o];if(Array.isArray(s)){let a=_f(s);r=r.concat(a.instrumentations)}else typeof s=="function"?r.push(new s):s.instrumentationName&&r.push(s)}return{instrumentations:r}}je.parseInstrumentationOptions=_f;function mg(i,r,o){for(let c=0,s=i.length;c<s;c++){let a=i[c];r&&a.setTracerProvider(r),o&&a.setMeterProvider(o),a.getConfig().enabled||a.enable()}}je.enableInstrumentations=mg;function _g(i){i.forEach(r=>r.disable())}je.disableInstrumentations=_g});var gf=d(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.registerInstrumentations=void 0;var Ef=(y(),E(_)),Bu=yf();function yg(i){let{instrumentations:r}=(0,Bu.parseInstrumentationOptions)(i.instrumentations),o=i.tracerProvider||Ef.trace.getTracerProvider(),c=i.meterProvider||Ef.metrics.getMeterProvider();return(0,Bu.enableInstrumentations)(r,o,c),()=>{(0,Bu.disableInstrumentations)(r)}}Mo.registerInstrumentations=yg});var ku=d(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.LogRecord=void 0;var Eg=(y(),E(_)),Ur=(y(),E(_)),Co=N(),Vu=class{constructor(r,o,c){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:s,observedTimestamp:a,severityNumber:t,severityText:e,body:n,attributes:u={},context:l}=c,h=Date.now();if(this.hrTime=(0,Co.timeInputToHrTime)(s??h),this.hrTimeObserved=(0,Co.timeInputToHrTime)(a??h),l){let T=Ur.trace.getSpanContext(l);T&&Ur.isSpanContextValid(T)&&(this.spanContext=T)}this.severityNumber=t,this.severityText=e,this.body=n,this.resource=r.resource,this.instrumentationScope=o,this._logRecordLimits=r.logRecordLimits,this.setAttributes(u)}set severityText(r){this._isLogRecordReadonly()||(this._severityText=r)}get severityText(){return this._severityText}set severityNumber(r){this._isLogRecordReadonly()||(this._severityNumber=r)}get severityNumber(){return this._severityNumber}set body(r){this._isLogRecordReadonly()||(this._body=r)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}setAttribute(r,o){return this._isLogRecordReadonly()?this:o===null?this:r.length===0?(Ur.diag.warn(`Invalid attribute key: ${r}`),this):!(0,Co.isAttributeValue)(o)&&!(typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length>0)?(Ur.diag.warn(`Invalid attribute value set for key: ${r}`),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,r)?this:((0,Co.isAttributeValue)(o)?this.attributes[r]=this._truncateToSize(o):this.attributes[r]=o,this))}setAttributes(r){for(let[o,c]of Object.entries(r))this.setAttribute(o,c);return this}setBody(r){return this.body=r,this}setSeverityNumber(r){return this.severityNumber=r,this}setSeverityText(r){return this.severityText=r,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(r){let o=this._logRecordLimits.attributeValueLengthLimit;return o<=0?(Ur.diag.warn(`Attribute value limit must be positive, got ${o}`),r):typeof r=="string"?this._truncateToLimitUtil(r,o):Array.isArray(r)?r.map(c=>typeof c=="string"?this._truncateToLimitUtil(c,o):c):r}_truncateToLimitUtil(r,o){return r.length<=o?r:r.substring(0,o)}_isLogRecordReadonly(){return this._isReadonly&&Eg.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};Uo.LogRecord=Vu});var vf=d(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.Logger=void 0;var gg=(y(),E(_)),vg=ku(),qu=class{constructor(r,o){this.instrumentationScope=r,this._sharedState=o}emit(r){let o=r.context||gg.context.active(),c=new vg.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:o},r));this._sharedState.activeProcessor.onEmit(c,o),c._makeReadonly()}};Do.Logger=qu});var Tf=d(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.reconfigureLimits=jt.loadDefaultConfig=void 0;var Dr=N();function Tg(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Dr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Dr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}jt.loadDefaultConfig=Tg;function Sg(i){var r,o,c,s,a,t;let e=(0,Dr.getEnvWithoutDefaults)();return{attributeCountLimit:(c=(o=(r=i.attributeCountLimit)!==null&&r!==void 0?r:e.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:e.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&c!==void 0?c:Dr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(t=(a=(s=i.attributeValueLengthLimit)!==null&&s!==void 0?s:e.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&t!==void 0?t:Dr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}jt.reconfigureLimits=Sg});var Sf=d(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.MultiLogRecordProcessor=void 0;var bg=N(),ju=class{constructor(r,o){this.processors=r,this.forceFlushTimeoutMillis=o}async forceFlush(){let r=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(o=>(0,bg.callWithTimeout)(o.forceFlush(),r)))}onEmit(r,o){this.processors.forEach(c=>c.onEmit(r,o))}async shutdown(){await Promise.all(this.processors.map(r=>r.shutdown()))}};Bo.MultiLogRecordProcessor=ju});var Hu=d(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.NoopLogRecordProcessor=void 0;var Gu=class{forceFlush(){return Promise.resolve()}onEmit(r,o){}shutdown(){return Promise.resolve()}};Vo.NoopLogRecordProcessor=Gu});var bf=d(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.LoggerProviderSharedState=void 0;var Og=Hu(),Fu=class{constructor(r,o,c){this.resource=r,this.forceFlushTimeoutMillis=o,this.logRecordLimits=c,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Og.NoopLogRecordProcessor}};ko.LoggerProviderSharedState=Fu});var Pf=d(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.LoggerProvider=mt.DEFAULT_LOGGER_NAME=void 0;var Br=(y(),E(_)),Ag=(Du(),E(ht)),Pg=pt(),Of=N(),Ng=vf(),Af=Tf(),Rg=Sf(),xg=bf();mt.DEFAULT_LOGGER_NAME="unknown";var Ku=class{constructor(r={}){let{resource:o=Pg.Resource.default(),logRecordLimits:c,forceFlushTimeoutMillis:s}=(0,Of.merge)({},(0,Af.loadDefaultConfig)(),r);this._sharedState=new xg.LoggerProviderSharedState(o,s,(0,Af.reconfigureLimits)(c)),this._shutdownOnce=new Of.BindOnceFuture(this._shutdown,this)}getLogger(r,o,c){if(this._shutdownOnce.isCalled)return Br.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),Ag.NOOP_LOGGER;r||Br.diag.warn("Logger requested without instrumentation scope name.");let s=r||mt.DEFAULT_LOGGER_NAME,a=`${s}@${o||""}:${c?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Ng.Logger({name:s,version:o,schemaUrl:c?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(a)}addLogRecordProcessor(r){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(o=>Br.diag.error("Error while trying to shutdown current log record processor",o)),this._sharedState.registeredLogRecordProcessors.push(r),this._sharedState.activeProcessor=new Rg.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(Br.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(Br.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};mt.LoggerProvider=Ku});var Nf=d(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.ConsoleLogRecordExporter=void 0;var Ig=N(),Lg=N(),Xu=class{export(r,o){this._sendLogRecords(r,o)}shutdown(){return Promise.resolve()}_exportInfo(r){var o,c,s;return{timestamp:(0,Ig.hrTimeToMicroseconds)(r.hrTime),traceId:(o=r.spanContext)===null||o===void 0?void 0:o.traceId,spanId:(c=r.spanContext)===null||c===void 0?void 0:c.spanId,traceFlags:(s=r.spanContext)===null||s===void 0?void 0:s.traceFlags,severityText:r.severityText,severityNumber:r.severityNumber,body:r.body,attributes:r.attributes}}_sendLogRecords(r,o){for(let c of r)console.dir(this._exportInfo(c),{depth:3});o?.({code:Lg.ExportResultCode.SUCCESS})}};qo.ConsoleLogRecordExporter=Xu});var Rf=d(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.SimpleLogRecordProcessor=void 0;var zu=N(),$u=class{constructor(r){this._exporter=r,this._shutdownOnce=new zu.BindOnceFuture(this._shutdown,this)}onEmit(r){this._shutdownOnce.isCalled||this._exporter.export([r],o=>{var c;if(o.code!==zu.ExportResultCode.SUCCESS){(0,zu.globalErrorHandler)((c=o.error)!==null&&c!==void 0?c:new Error(`SimpleLogRecordProcessor: log record export failed (status ${o})`));return}})}forceFlush(){return Promise.resolve()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};jo.SimpleLogRecordProcessor=$u});var If=d(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.InMemoryLogRecordExporter=void 0;var xf=N(),Yu=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(r,o){if(this._stopped)return o({code:xf.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...r),o({code:xf.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};Go.InMemoryLogRecordExporter=Yu});var Lf=d(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.BatchLogRecordProcessorBase=void 0;var wg=(y(),E(_)),Gt=N(),Wu=class{constructor(r,o){var c,s,a,t;this._exporter=r,this._finishedLogRecords=[];let e=(0,Gt.getEnv)();this._maxExportBatchSize=(c=o?.maxExportBatchSize)!==null&&c!==void 0?c:e.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(s=o?.maxQueueSize)!==null&&s!==void 0?s:e.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(a=o?.scheduledDelayMillis)!==null&&a!==void 0?a:e.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(t=o?.exportTimeoutMillis)!==null&&t!==void 0?t:e.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new Gt.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(wg.diag.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}onEmit(r){this._shutdownOnce.isCalled||this._addToBuffer(r)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(r){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(r),this._maybeStartTimer())}_flushAll(){return new Promise((r,o)=>{let c=[],s=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<s;a++)c.push(this._flushOneBatch());Promise.all(c).then(()=>{r()}).catch(o)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((r,o)=>{(0,Gt.callWithTimeout)(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>r()).catch(o)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{(0,Gt.globalErrorHandler)(r)})},this._scheduledDelayMillis),(0,Gt.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(r){return new Promise((o,c)=>{this._exporter.export(r,s=>{var a;if(s.code!==Gt.ExportResultCode.SUCCESS){c((a=s.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${s})`));return}o(s)})})}};Ho.BatchLogRecordProcessorBase=Wu});var wf=d(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BatchLogRecordProcessor=void 0;var Mg=Lf(),Ju=class extends Mg.BatchLogRecordProcessorBase{onShutdown(){}};Fo.BatchLogRecordProcessor=Ju});var Mf=d(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.BatchLogRecordProcessor=void 0;var Cg=wf();Object.defineProperty(Ko,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Cg.BatchLogRecordProcessor}})});var Cf=d(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.BatchLogRecordProcessor=void 0;var Ug=Mf();Object.defineProperty(Xo,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Ug.BatchLogRecordProcessor}})});var Uf=d(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.BatchLogRecordProcessor=ne.InMemoryLogRecordExporter=ne.SimpleLogRecordProcessor=ne.ConsoleLogRecordExporter=ne.NoopLogRecordProcessor=ne.LogRecord=ne.LoggerProvider=void 0;var Dg=Pf();Object.defineProperty(ne,"LoggerProvider",{enumerable:!0,get:function(){return Dg.LoggerProvider}});var Bg=ku();Object.defineProperty(ne,"LogRecord",{enumerable:!0,get:function(){return Bg.LogRecord}});var Vg=Hu();Object.defineProperty(ne,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Vg.NoopLogRecordProcessor}});var kg=Nf();Object.defineProperty(ne,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return kg.ConsoleLogRecordExporter}});var qg=Rf();Object.defineProperty(ne,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return qg.SimpleLogRecordProcessor}});var jg=If();Object.defineProperty(ne,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return jg.InMemoryLogRecordExporter}});var Gg=Cf();Object.defineProperty(ne,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Gg.BatchLogRecordProcessor}})});var zo=d(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AggregationTemporality=void 0;var Hg;(function(i){i[i.DELTA=0]="DELTA",i[i.CUMULATIVE=1]="CUMULATIVE"})(Hg=Vr.AggregationTemporality||(Vr.AggregationTemporality={}))});var Ht=d(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.DataPointType=void 0;var Fg;(function(i){i[i.HISTOGRAM=0]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",i[i.GAUGE=2]="GAUGE",i[i.SUM=3]="SUM"})(Fg=kr.DataPointType||(kr.DataPointType={}))});var Ne=d(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.equalsCaseInsensitive=V.binarySearchLB=V.setEquals=V.FlatMap=V.isPromiseAllSettledRejectionResult=V.PromiseAllSettled=V.callWithTimeout=V.TimeoutError=V.instrumentationScopeId=V.hashAttributes=V.isNotNullish=void 0;function Kg(i){return i!=null}V.isNotNullish=Kg;function Xg(i){let r=Object.keys(i);return r.length===0?"":(r=r.sort(),JSON.stringify(r.map(o=>[o,i[o]])))}V.hashAttributes=Xg;function zg(i){var r,o;return`${i.name}:${(r=i.version)!==null&&r!==void 0?r:""}:${(o=i.schemaUrl)!==null&&o!==void 0?o:""}`}V.instrumentationScopeId=zg;var $o=class i extends Error{constructor(r){super(r),Object.setPrototypeOf(this,i.prototype)}};V.TimeoutError=$o;function $g(i,r){let o,c=new Promise(function(a,t){o=setTimeout(function(){t(new $o("Operation timed out."))},r)});return Promise.race([i,c]).then(s=>(clearTimeout(o),s),s=>{throw clearTimeout(o),s})}V.callWithTimeout=$g;async function Yg(i){return Promise.all(i.map(async r=>{try{return{status:"fulfilled",value:await r}}catch(o){return{status:"rejected",reason:o}}}))}V.PromiseAllSettled=Yg;function Wg(i){return i.status==="rejected"}V.isPromiseAllSettledRejectionResult=Wg;function Jg(i,r){let o=[];return i.forEach(c=>{o.push(...r(c))}),o}V.FlatMap=Jg;function Qg(i,r){if(i.size!==r.size)return!1;for(let o of i)if(!r.has(o))return!1;return!0}V.setEquals=Qg;function Zg(i,r){let o=0,c=i.length-1;for(;c-o>1;){let s=Math.trunc((c+o)/2);i[s]<=r?o=s:c=s-1}return i[c]<=r?c:i[o]<=r?o:-1}V.binarySearchLB=Zg;function ev(i,r){return i.toLowerCase()===r.toLowerCase()}V.equalsCaseInsensitive=ev});var Ft=d(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.AggregatorKind=void 0;var tv;(function(i){i[i.DROP=0]="DROP",i[i.SUM=1]="SUM",i[i.LAST_VALUE=2]="LAST_VALUE",i[i.HISTOGRAM=3]="HISTOGRAM",i[i.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(tv=qr.AggregatorKind||(qr.AggregatorKind={}))});var Df=d(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DropAggregator=void 0;var rv=Ft(),Qu=class{constructor(){this.kind=rv.AggregatorKind.DROP}createAccumulation(){}merge(r,o){}diff(r,o){}toMetricData(r,o,c,s){}};Yo.DropAggregator=Qu});var we=d(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.isValidName=pe.isDescriptorCompatibleWith=pe.createInstrumentDescriptorWithView=pe.createInstrumentDescriptor=pe.InstrumentType=void 0;var Bf=(y(),E(_)),nv=Ne(),ov;(function(i){i.COUNTER="COUNTER",i.HISTOGRAM="HISTOGRAM",i.UP_DOWN_COUNTER="UP_DOWN_COUNTER",i.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",i.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",i.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(ov=pe.InstrumentType||(pe.InstrumentType={}));function iv(i,r,o){var c,s,a,t;return Vf(i)||Bf.diag.warn(`Invalid metric name: "${i}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:i,type:r,description:(c=o?.description)!==null&&c!==void 0?c:"",unit:(s=o?.unit)!==null&&s!==void 0?s:"",valueType:(a=o?.valueType)!==null&&a!==void 0?a:Bf.ValueType.DOUBLE,advice:(t=o?.advice)!==null&&t!==void 0?t:{}}}pe.createInstrumentDescriptor=iv;function sv(i,r){var o,c;return{name:(o=i.name)!==null&&o!==void 0?o:r.name,description:(c=i.description)!==null&&c!==void 0?c:r.description,type:r.type,unit:r.unit,valueType:r.valueType,advice:r.advice}}pe.createInstrumentDescriptorWithView=sv;function uv(i,r){return(0,nv.equalsCaseInsensitive)(i.name,r.name)&&i.unit===r.unit&&i.type===r.type&&i.valueType===r.valueType}pe.isDescriptorCompatibleWith=uv;var av=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Vf(i){return i.match(av)!=null}pe.isValidName=Vf});var kf=d(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.HistogramAggregator=Xt.HistogramAccumulation=void 0;var cv=Ft(),lv=Ht(),Zu=we(),pv=Ne();function fv(i){let r=i.map(()=>0);return r.push(0),{buckets:{boundaries:i,counts:r},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Kt=class{constructor(r,o,c=!0,s=fv(o)){this.startTime=r,this._boundaries=o,this._recordMinMax=c,this._current=s}record(r){this._current.count+=1,this._current.sum+=r,this._recordMinMax&&(this._current.min=Math.min(r,this._current.min),this._current.max=Math.max(r,this._current.max),this._current.hasMinMax=!0);let o=(0,pv.binarySearchLB)(this._boundaries,r);this._current.buckets.counts[o+1]+=1}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Xt.HistogramAccumulation=Kt;var ea=class{constructor(r,o){this._boundaries=r,this._recordMinMax=o,this.kind=cv.AggregatorKind.HISTOGRAM}createAccumulation(r){return new Kt(r,this._boundaries,this._recordMinMax)}merge(r,o){let c=r.toPointValue(),s=o.toPointValue(),a=c.buckets.counts,t=s.buckets.counts,e=new Array(a.length);for(let l=0;l<a.length;l++)e[l]=a[l]+t[l];let n=1/0,u=-1/0;return this._recordMinMax&&(c.hasMinMax&&s.hasMinMax?(n=Math.min(c.min,s.min),u=Math.max(c.max,s.max)):c.hasMinMax?(n=c.min,u=c.max):s.hasMinMax&&(n=s.min,u=s.max)),new Kt(r.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:c.count+s.count,sum:c.sum+s.sum,hasMinMax:this._recordMinMax&&(c.hasMinMax||s.hasMinMax),min:n,max:u})}diff(r,o){let c=r.toPointValue(),s=o.toPointValue(),a=c.buckets.counts,t=s.buckets.counts,e=new Array(a.length);for(let n=0;n<a.length;n++)e[n]=t[n]-a[n];return new Kt(o.startTime,c.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:c.buckets.boundaries,counts:e},count:s.count-c.count,sum:s.sum-c.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:lv.DataPointType.HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===Zu.InstrumentType.UP_DOWN_COUNTER||r.type===Zu.InstrumentType.OBSERVABLE_GAUGE||r.type===Zu.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:s,value:{min:e.hasMinMax?e.min:void 0,max:e.hasMinMax?e.max:void 0,sum:n?void 0:e.sum,buckets:e.buckets,count:e.count}}})}}};Xt.HistogramAggregator=ea});var qf=d(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.Buckets=void 0;var ta=class i{constructor(r=new ra,o=0,c=0,s=0){this.backing=r,this.indexBase=o,this.indexStart=c,this.indexEnd=s}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(r,o)=>this.at(o))}at(r){let o=this.indexBase-this.indexStart;return r<o&&(r+=this.backing.length),r-=o,this.backing.countAt(r)}incrementBucket(r,o){this.backing.increment(r,o)}decrementBucket(r,o){this.backing.decrement(r,o)}trim(){for(let r=0;r<this.length;r++)if(this.at(r)!==0){this.indexStart+=r;break}else if(r===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let r=this.length-1;r>=0;r--)if(this.at(r)!==0){this.indexEnd-=this.length-r-1;break}this._rotate()}downscale(r){this._rotate();let o=1+this.indexEnd-this.indexStart,c=1<<r,s=0,a=0;for(let t=this.indexStart;t<=this.indexEnd;){let e=t%c;e<0&&(e+=c);for(let n=e;n<c&&s<o;n++)this._relocateBucket(a,s),s++,t++;a++}this.indexStart>>=r,this.indexEnd>>=r,this.indexBase=this.indexStart}clone(){return new i(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let r=this.indexBase-this.indexStart;r!==0&&(r>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,r),this.backing.reverse(r,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+r)),this.indexBase=this.indexStart)}_relocateBucket(r,o){r!==o&&this.incrementBucket(r,this.backing.emptyBucket(o))}};Wo.Buckets=ta;var ra=class i{constructor(r=[0]){this._counts=r}get length(){return this._counts.length}countAt(r){return this._counts[r]}growTo(r,o,c){let s=new Array(r).fill(0);s.splice(c,this._counts.length-o,...this._counts.slice(o)),s.splice(0,o,...this._counts.slice(0,o)),this._counts=s}reverse(r,o){let c=Math.floor((r+o)/2)-r;for(let s=0;s<c;s++){let a=this._counts[r+s];this._counts[r+s]=this._counts[o-s-1],this._counts[o-s-1]=a}}emptyBucket(r){let o=this._counts[r];return this._counts[r]=0,o}increment(r,o){this._counts[r]+=o}decrement(r,o){this._counts[r]>=o?this._counts[r]-=o:this._counts[r]=0}clone(){return new i([...this._counts])}}});var oa=d(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.getSignificand=ie.getNormalBase2=ie.MIN_VALUE=ie.MAX_NORMAL_EXPONENT=ie.MIN_NORMAL_EXPONENT=ie.SIGNIFICAND_WIDTH=void 0;ie.SIGNIFICAND_WIDTH=52;var dv=2146435072,hv=1048575,na=1023;ie.MIN_NORMAL_EXPONENT=-na+1;ie.MAX_NORMAL_EXPONENT=na;ie.MIN_VALUE=Math.pow(2,-1022);function mv(i){let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,i),((r.getUint32(0)&dv)>>20)-na}ie.getNormalBase2=mv;function _v(i){let r=new DataView(new ArrayBuffer(8));r.setFloat64(0,i);let o=r.getUint32(0),c=r.getUint32(4);return(o&hv)*Math.pow(2,32)+c}ie.getSignificand=_v});var Jo=d(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.nextGreaterSquare=zt.ldexp=void 0;function yv(i,r){return i===0||i===Number.POSITIVE_INFINITY||i===Number.NEGATIVE_INFINITY||Number.isNaN(i)?i:i*Math.pow(2,r)}zt.ldexp=yv;function Ev(i){return i--,i|=i>>1,i|=i>>2,i|=i>>4,i|=i>>8,i|=i>>16,i++,i}zt.nextGreaterSquare=Ev});var Zo=d(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.MappingError=void 0;var ia=class extends Error{};Qo.MappingError=ia});var Gf=d(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.ExponentMapping=void 0;var $t=oa(),gv=Jo(),jf=Zo(),sa=class{constructor(r){this._shift=-r}mapToIndex(r){if(r<$t.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=$t.getNormalBase2(r),c=this._rightShift($t.getSignificand(r)-1,$t.SIGNIFICAND_WIDTH);return o+c>>this._shift}lowerBoundary(r){let o=this._minNormalLowerBoundaryIndex();if(r<o)throw new jf.MappingError(`underflow: ${r} is < minimum lower boundary: ${o}`);let c=this._maxNormalLowerBoundaryIndex();if(r>c)throw new jf.MappingError(`overflow: ${r} is > maximum lower boundary: ${c}`);return gv.ldexp(1,r<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let r=$t.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&r--,r}_maxNormalLowerBoundaryIndex(){return $t.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(r,o){return Math.floor(r*Math.pow(2,-o))}};ei.ExponentMapping=sa});var Kf=d(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.LogarithmMapping=void 0;var Yt=oa(),Hf=Jo(),Ff=Zo(),ua=class{constructor(r){this._scale=r,this._scaleFactor=Hf.ldexp(Math.LOG2E,r),this._inverseFactor=Hf.ldexp(Math.LN2,-r)}mapToIndex(r){if(r<=Yt.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(Yt.getSignificand(r)===0)return(Yt.getNormalBase2(r)<<this._scale)-1;let o=Math.floor(Math.log(r)*this._scaleFactor),c=this._maxNormalLowerBoundaryIndex();return o>=c?c:o}lowerBoundary(r){let o=this._maxNormalLowerBoundaryIndex();if(r>=o){if(r===o)return 2*Math.exp((r-(1<<this._scale))/this._scaleFactor);throw new Ff.MappingError(`overflow: ${r} is > maximum lower boundary: ${o}`)}let c=this._minNormalLowerBoundaryIndex();if(r<=c){if(r===c)return Yt.MIN_VALUE;if(r===c-1)return Math.exp((r+(1<<this._scale))/this._scaleFactor)/2;throw new Ff.MappingError(`overflow: ${r} is < minimum lower boundary: ${c}`)}return Math.exp(r*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return Yt.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(Yt.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};ti.LogarithmMapping=ua});var $f=d(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.getMapping=void 0;var vv=Gf(),Tv=Kf(),Sv=Zo(),Xf=-10,zf=20,bv=Array.from({length:31},(i,r)=>r>10?new Tv.LogarithmMapping(r-10):new vv.ExponentMapping(r-10));function Ov(i){if(i>zf||i<Xf)throw new Sv.MappingError(`expected scale >= ${Xf} && <= ${zf}, got: ${i}`);return bv[i+10]}ri.getMapping=Ov});var Jf=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.ExponentialHistogramAggregator=Jt.ExponentialHistogramAccumulation=void 0;var Av=Ft(),Pv=Ht(),Nv=(y(),E(_)),aa=we(),Yf=qf(),Wf=$f(),Rv=Jo(),Wt=class i{constructor(r,o){this.low=r,this.high=o}static combine(r,o){return new i(Math.min(r.low,o.low),Math.max(r.high,o.high))}},xv=20,Iv=160,ca=2,ni=class i{constructor(r=r,o=Iv,c=!0,s=0,a=0,t=0,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,u=new Yf.Buckets,l=new Yf.Buckets,h=(0,Wf.getMapping)(xv)){this.startTime=r,this._maxSize=o,this._recordMinMax=c,this._sum=s,this._count=a,this._zeroCount=t,this._min=e,this._max=n,this._positive=u,this._negative=l,this._mapping=h,this._maxSize<ca&&(Nv.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${ca}`),this._maxSize=ca)}record(r){this.updateByIncrement(r,1)}setStartTime(r){this.startTime=r}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(r,o){if(r>this._max&&(this._max=r),r<this._min&&(this._min=r),this._count+=o,r===0){this._zeroCount+=o;return}this._sum+=r*o,r>0?this._updateBuckets(this._positive,r,o):this._updateBuckets(this._negative,-r,o)}merge(r){this._count===0?(this._min=r.min,this._max=r.max):r.count!==0&&(r.min<this.min&&(this._min=r.min),r.max>this.max&&(this._max=r.max)),this.startTime=r.startTime,this._sum+=r.sum,this._count+=r.count,this._zeroCount+=r.zeroCount;let o=this._minScale(r);this._downscale(this.scale-o),this._mergeBuckets(this.positive,r,r.positive,o),this._mergeBuckets(this.negative,r,r.negative,o)}diff(r){this._min=1/0,this._max=-1/0,this._sum-=r.sum,this._count-=r.count,this._zeroCount-=r.zeroCount;let o=this._minScale(r);this._downscale(this.scale-o),this._diffBuckets(this.positive,r,r.positive,o),this._diffBuckets(this.negative,r,r.negative,o)}clone(){return new i(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(r,o,c){let s=this._mapping.mapToIndex(o),a=!1,t=0,e=0;if(r.length===0?(r.indexStart=s,r.indexEnd=r.indexStart,r.indexBase=r.indexStart):s<r.indexStart&&r.indexEnd-s>=this._maxSize?(a=!0,e=s,t=r.indexEnd):s>r.indexEnd&&s-r.indexStart>=this._maxSize&&(a=!0,e=r.indexStart,t=s),a){let n=this._changeScale(t,e);this._downscale(n),s=this._mapping.mapToIndex(o)}this._incrementIndexBy(r,s,c)}_incrementIndexBy(r,o,c){if(c===0)return;if(o<r.indexStart){let a=r.indexEnd-o;a>=r.backing.length&&this._grow(r,a+1),r.indexStart=o}else if(o>r.indexEnd){let a=o-r.indexStart;a>=r.backing.length&&this._grow(r,a+1),r.indexEnd=o}let s=o-r.indexBase;s<0&&(s+=r.backing.length),r.incrementBucket(s,c)}_grow(r,o){let c=r.backing.length,s=r.indexBase-r.indexStart,a=c-s,t=(0,Rv.nextGreaterSquare)(o);t>this._maxSize&&(t=this._maxSize);let e=t-s;r.backing.growTo(t,a,e)}_changeScale(r,o){let c=0;for(;r-o>=this._maxSize;)r>>=1,o>>=1,c++;return c}_downscale(r){if(r===0)return;if(r<0)throw new Error(`impossible change of scale: ${this.scale}`);let o=this._mapping.scale-r;this._positive.downscale(r),this._negative.downscale(r),this._mapping=(0,Wf.getMapping)(o)}_minScale(r){let o=Math.min(this.scale,r.scale),c=Wt.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(r.positive,r.scale,o)),s=Wt.combine(this._highLowAtScale(this.negative,this.scale,o),this._highLowAtScale(r.negative,r.scale,o));return Math.min(o-this._changeScale(c.high,c.low),o-this._changeScale(s.high,s.low))}_highLowAtScale(r,o,c){if(r.length===0)return new Wt(0,-1);let s=o-c;return new Wt(r.indexStart>>s,r.indexEnd>>s)}_mergeBuckets(r,o,c,s){let a=c.offset,t=o.scale-s;for(let e=0;e<c.length;e++)this._incrementIndexBy(r,a+e>>t,c.at(e))}_diffBuckets(r,o,c,s){let a=c.offset,t=o.scale-s;for(let e=0;e<c.length;e++){let u=(a+e>>t)-r.indexBase;u<0&&(u+=r.backing.length),r.decrementBucket(u,c.at(e))}r.trim()}};Jt.ExponentialHistogramAccumulation=ni;var la=class{constructor(r,o){this._maxSize=r,this._recordMinMax=o,this.kind=Av.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(r){return new ni(r,this._maxSize,this._recordMinMax)}merge(r,o){let c=o.clone();return c.merge(r),c}diff(r,o){let c=o.clone();return c.diff(r),c}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:Pv.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:c.map(([a,t])=>{let e=t.toPointValue(),n=r.type===aa.InstrumentType.UP_DOWN_COUNTER||r.type===aa.InstrumentType.OBSERVABLE_GAUGE||r.type===aa.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:t.startTime,endTime:s,value:{min:e.hasMinMax?e.min:void 0,max:e.hasMinMax?e.max:void 0,sum:n?void 0:e.sum,positive:{offset:e.positive.offset,bucketCounts:e.positive.bucketCounts},negative:{offset:e.negative.offset,bucketCounts:e.negative.bucketCounts},count:e.count,scale:e.scale,zeroCount:e.zeroCount}}})}}};Jt.ExponentialHistogramAggregator=la});var Qf=d(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.LastValueAggregator=Zt.LastValueAccumulation=void 0;var Lv=Ft(),jr=N(),wv=Ht(),Qt=class{constructor(r,o=0,c=[0,0]){this.startTime=r,this._current=o,this.sampleTime=c}record(r){this._current=r,this.sampleTime=(0,jr.millisToHrTime)(Date.now())}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};Zt.LastValueAccumulation=Qt;var pa=class{constructor(){this.kind=Lv.AggregatorKind.LAST_VALUE}createAccumulation(r){return new Qt(r)}merge(r,o){let c=(0,jr.hrTimeToMicroseconds)(o.sampleTime)>=(0,jr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Qt(r.startTime,c.toPointValue(),c.sampleTime)}diff(r,o){let c=(0,jr.hrTimeToMicroseconds)(o.sampleTime)>=(0,jr.hrTimeToMicroseconds)(r.sampleTime)?o:r;return new Qt(o.startTime,c.toPointValue(),c.sampleTime)}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:wv.DataPointType.GAUGE,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:s,value:t.toPointValue()}))}}};Zt.LastValueAggregator=pa});var Zf=d(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.SumAggregator=er.SumAccumulation=void 0;var Mv=Ft(),Cv=Ht(),Ge=class{constructor(r,o,c=0,s=!1){this.startTime=r,this.monotonic=o,this._current=c,this.reset=s}record(r){this.monotonic&&r<0||(this._current+=r)}setStartTime(r){this.startTime=r}toPointValue(){return this._current}};er.SumAccumulation=Ge;var fa=class{constructor(r){this.monotonic=r,this.kind=Mv.AggregatorKind.SUM}createAccumulation(r){return new Ge(r,this.monotonic)}merge(r,o){let c=r.toPointValue(),s=o.toPointValue();return o.reset?new Ge(o.startTime,this.monotonic,s,o.reset):new Ge(r.startTime,this.monotonic,c+s)}diff(r,o){let c=r.toPointValue(),s=o.toPointValue();return this.monotonic&&c>s?new Ge(o.startTime,this.monotonic,s,!0):new Ge(o.startTime,this.monotonic,s-c)}toMetricData(r,o,c,s){return{descriptor:r,aggregationTemporality:o,dataPointType:Cv.DataPointType.SUM,dataPoints:c.map(([a,t])=>({attributes:a,startTime:t.startTime,endTime:s,value:t.toPointValue()})),isMonotonic:this.monotonic}}};er.SumAggregator=fa});var ed=d(ge=>{"use strict";var Uv=ge&&ge.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),Gr=ge&&ge.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&Uv(r,i,o)};Object.defineProperty(ge,"__esModule",{value:!0});Gr(Df(),ge);Gr(kf(),ge);Gr(Jf(),ge);Gr(Qf(),ge);Gr(Zf(),ge)});var ui=d($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.DefaultAggregation=$.ExponentialHistogramAggregation=$.ExplicitBucketHistogramAggregation=$.HistogramAggregation=$.LastValueAggregation=$.SumAggregation=$.DropAggregation=$.Aggregation=void 0;var Dv=(y(),E(_)),_t=ed(),Me=we(),Re=class{static Drop(){return td}static Sum(){return rd}static LastValue(){return nd}static Histogram(){return od}static ExponentialHistogram(){return Bv}static Default(){return Vv}};$.Aggregation=Re;var Hr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};$.DropAggregation=Hr;Hr.DEFAULT_INSTANCE=new _t.DropAggregator;var tr=class i extends Re{createAggregator(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.HISTOGRAM:return i.MONOTONIC_INSTANCE;default:return i.NON_MONOTONIC_INSTANCE}}};$.SumAggregation=tr;tr.MONOTONIC_INSTANCE=new _t.SumAggregator(!0);tr.NON_MONOTONIC_INSTANCE=new _t.SumAggregator(!1);var Fr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};$.LastValueAggregation=Fr;Fr.DEFAULT_INSTANCE=new _t.LastValueAggregator;var Kr=class i extends Re{createAggregator(r){return i.DEFAULT_INSTANCE}};$.HistogramAggregation=Kr;Kr.DEFAULT_INSTANCE=new _t.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var oi=class extends Re{constructor(r,o=!0){if(super(),this._recordMinMax=o,r===void 0||r.length===0)throw new Error("HistogramAggregator should be created with boundaries.");r=r.concat(),r=r.sort((a,t)=>a-t);let c=r.lastIndexOf(-1/0),s=r.indexOf(1/0);s===-1&&(s=void 0),this._boundaries=r.slice(c+1,s)}createAggregator(r){return new _t.HistogramAggregator(this._boundaries,this._recordMinMax)}};$.ExplicitBucketHistogramAggregation=oi;var ii=class extends Re{constructor(r=160,o=!0){super(),this._maxSize=r,this._recordMinMax=o}createAggregator(r){return new _t.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};$.ExponentialHistogramAggregation=ii;var si=class extends Re{_resolve(r){switch(r.type){case Me.InstrumentType.COUNTER:case Me.InstrumentType.UP_DOWN_COUNTER:case Me.InstrumentType.OBSERVABLE_COUNTER:case Me.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return rd;case Me.InstrumentType.OBSERVABLE_GAUGE:return nd;case Me.InstrumentType.HISTOGRAM:return r.advice.explicitBucketBoundaries?new oi(r.advice.explicitBucketBoundaries):od}return Dv.diag.warn(`Unable to recognize instrument type: ${r.type}`),td}createAggregator(r){return this._resolve(r).createAggregator(r)}};$.DefaultAggregation=si;var td=new Hr,rd=new tr,nd=new Fr,od=new Kr,Bv=new ii,Vv=new si});var da=d(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=rr.DEFAULT_AGGREGATION_SELECTOR=void 0;var kv=ui(),qv=zo(),jv=i=>kv.Aggregation.Default();rr.DEFAULT_AGGREGATION_SELECTOR=jv;var Gv=i=>qv.AggregationTemporality.CUMULATIVE;rr.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Gv});var ma=d(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.MetricReader=void 0;var id=(y(),E(_)),ai=Ne(),sd=da(),ha=class{constructor(r){var o,c,s;this._shutdown=!1,this._aggregationSelector=(o=r?.aggregationSelector)!==null&&o!==void 0?o:sd.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(c=r?.aggregationTemporalitySelector)!==null&&c!==void 0?c:sd.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(s=r?.metricProducers)!==null&&s!==void 0?s:[]}setMetricProducer(r){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=r,this.onInitialized()}selectAggregation(r){return this._aggregationSelector(r)}selectAggregationTemporality(r){return this._aggregationTemporalitySelector(r)}onInitialized(){}async collect(r){if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let[o,...c]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:r?.timeoutMillis}),...this._metricProducers.map(e=>e.collect({timeoutMillis:r?.timeoutMillis}))]),s=o.errors.concat((0,ai.FlatMap)(c,e=>e.errors)),a=o.resourceMetrics.resource,t=o.resourceMetrics.scopeMetrics.concat((0,ai.FlatMap)(c,e=>e.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:t},errors:s}}async shutdown(r){if(this._shutdown){id.diag.error("Cannot call shutdown twice.");return}r?.timeoutMillis==null?await this.onShutdown():await(0,ai.callWithTimeout)(this.onShutdown(),r.timeoutMillis),this._shutdown=!0}async forceFlush(r){if(this._shutdown){id.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(r?.timeoutMillis==null){await this.onForceFlush();return}await(0,ai.callWithTimeout)(this.onForceFlush(),r.timeoutMillis)}};ci.MetricReader=ha});var cd=d(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.PeriodicExportingMetricReader=void 0;var ud=(y(),E(_)),li=N(),Hv=ma(),ad=Ne(),Fv=(y(),E(_)),_a=class extends Hv.MetricReader{constructor(r){var o,c,s,a;if(super({aggregationSelector:(o=r.exporter.selectAggregation)===null||o===void 0?void 0:o.bind(r.exporter),aggregationTemporalitySelector:(c=r.exporter.selectAggregationTemporality)===null||c===void 0?void 0:c.bind(r.exporter),metricProducers:r.metricProducers}),r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(r.exportTimeoutMillis!==void 0&&r.exportIntervalMillis!==void 0&&r.exportIntervalMillis<r.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");this._exportInterval=(s=r.exportIntervalMillis)!==null&&s!==void 0?s:6e4,this._exportTimeout=(a=r.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,this._exporter=r.exporter}async _runOnce(){try{await(0,ad.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(r){if(r instanceof ad.TimeoutError){ud.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,li.globalErrorHandler)(r)}}async _doRun(){var r,o;let{resourceMetrics:c,errors:s}=await this.collect({timeoutMillis:this._exportTimeout});s.length>0&&ud.diag.error("PeriodicExportingMetricReader: metrics collection errors",...s);let a=async()=>{let t=await li.internal._export(this._exporter,c);if(t.code!==li.ExportResultCode.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${t.error})`)};c.resource.asyncAttributesPending?(o=(r=c.resource).waitForAsyncAttributes)===null||o===void 0||o.call(r).then(a,t=>Fv.diag.debug("Error while resolving async portion of resource: ",t)):await a()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,li.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};pi.PeriodicExportingMetricReader=_a});var pd=d(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.InMemoryMetricExporter=void 0;var ld=N(),ya=class{constructor(r){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=r}export(r,o){if(this._shutdown){setTimeout(()=>o({code:ld.ExportResultCode.FAILED}),0);return}this._metrics.push(r),setTimeout(()=>o({code:ld.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(r){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}};fi.InMemoryMetricExporter=ya});var dd=d(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.ConsoleMetricExporter=void 0;var fd=N(),Kv=da(),Ea=class i{constructor(r){var o;this._shutdown=!1,this._temporalitySelector=(o=r?.temporalitySelector)!==null&&o!==void 0?o:Kv.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(r,o){if(this._shutdown){setImmediate(o,{code:fd.ExportResultCode.FAILED});return}return i._sendMetrics(r,o)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(r){return this._temporalitySelector(r)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(r,o){for(let c of r.scopeMetrics)for(let s of c.metrics)console.dir({descriptor:s.descriptor,dataPointType:s.dataPointType,dataPoints:s.dataPoints});o({code:fd.ExportResultCode.SUCCESS})}};di.ConsoleMetricExporter=Ea});var hd=d(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.ViewRegistry=void 0;var ga=class{constructor(){this._registeredViews=[]}addView(r){this._registeredViews.push(r)}findViews(r,o){return this._registeredViews.filter(s=>this._matchInstrument(s.instrumentSelector,r)&&this._matchMeter(s.meterSelector,o))}_matchInstrument(r,o){return(r.getType()===void 0||o.type===r.getType())&&r.getNameFilter().match(o.name)&&r.getUnitFilter().match(o.unit)}_matchMeter(r,o){return r.getNameFilter().match(o.name)&&(o.version===void 0||r.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||r.getSchemaUrlFilter().match(o.schemaUrl))}};hi.ViewRegistry=ga});var mi=d(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.isObservableInstrument=H.ObservableUpDownCounterInstrument=H.ObservableGaugeInstrument=H.ObservableCounterInstrument=H.ObservableInstrument=H.HistogramInstrument=H.CounterInstrument=H.UpDownCounterInstrument=H.SyncInstrument=void 0;var nr=(y(),E(_)),Xv=N(),or=class{constructor(r,o){this._writableMetricStorage=r,this._descriptor=o}_record(r,o={},c=nr.context.active()){if(typeof r!="number"){nr.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${r}`);return}this._descriptor.valueType===nr.ValueType.INT&&!Number.isInteger(r)&&(nr.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._writableMetricStorage.record(r,o,c,(0,Xv.millisToHrTime)(Date.now()))}};H.SyncInstrument=or;var va=class extends or{add(r,o,c){this._record(r,o,c)}};H.UpDownCounterInstrument=va;var Ta=class extends or{add(r,o,c){if(r<0){nr.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.CounterInstrument=Ta;var Sa=class extends or{record(r,o,c){if(r<0){nr.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${r}`);return}this._record(r,o,c)}};H.HistogramInstrument=Sa;var yt=class{constructor(r,o,c){this._observableRegistry=c,this._descriptor=r,this._metricStorages=o}addCallback(r){this._observableRegistry.addCallback(r,this)}removeCallback(r){this._observableRegistry.removeCallback(r,this)}};H.ObservableInstrument=yt;var ba=class extends yt{};H.ObservableCounterInstrument=ba;var Oa=class extends yt{};H.ObservableGaugeInstrument=Oa;var Aa=class extends yt{};H.ObservableUpDownCounterInstrument=Aa;function zv(i){return i instanceof yt}H.isObservableInstrument=zv});var md=d(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.Meter=void 0;var de=we(),ir=mi(),Pa=class{constructor(r){this._meterSharedState=r}createHistogram(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.HISTOGRAM,o),s=this._meterSharedState.registerMetricStorage(c);return new ir.HistogramInstrument(s,c)}createCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.COUNTER,o),s=this._meterSharedState.registerMetricStorage(c);return new ir.CounterInstrument(s,c)}createUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.UP_DOWN_COUNTER,o),s=this._meterSharedState.registerMetricStorage(c);return new ir.UpDownCounterInstrument(s,c)}createObservableGauge(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_GAUGE,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new ir.ObservableGaugeInstrument(c,s,this._meterSharedState.observableRegistry)}createObservableCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new ir.ObservableCounterInstrument(c,s,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(r,o){let c=(0,de.createInstrumentDescriptor)(r,de.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),s=this._meterSharedState.registerAsyncMetricStorage(c);return new ir.ObservableUpDownCounterInstrument(c,s,this._meterSharedState.observableRegistry)}addBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.addBatchCallback(r,o)}removeBatchObservableCallback(r,o){this._meterSharedState.observableRegistry.removeBatchCallback(r,o)}};_i.Meter=Pa});var Ra=d(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.MetricStorage=void 0;var $v=we(),Na=class{constructor(r){this._instrumentDescriptor=r}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(r){this._instrumentDescriptor=(0,$v.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:r,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};yi.MetricStorage=Na});var Xr=d(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.AttributeHashMap=sr.HashMap=void 0;var Yv=Ne(),Ei=class{constructor(r){this._hash=r,this._valueMap=new Map,this._keyMap=new Map}get(r,o){return o??(o=this._hash(r)),this._valueMap.get(o)}getOrDefault(r,o){let c=this._hash(r);if(this._valueMap.has(c))return this._valueMap.get(c);let s=o();return this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,s),s}set(r,o,c){c??(c=this._hash(r)),this._keyMap.has(c)||this._keyMap.set(c,r),this._valueMap.set(c,o)}has(r,o){return o??(o=this._hash(r)),this._valueMap.has(o)}*keys(){let r=this._keyMap.entries(),o=r.next();for(;o.done!==!0;)yield[o.value[1],o.value[0]],o=r.next()}*entries(){let r=this._valueMap.entries(),o=r.next();for(;o.done!==!0;)yield[this._keyMap.get(o.value[0]),o.value[1],o.value[0]],o=r.next()}get size(){return this._valueMap.size}};sr.HashMap=Ei;var xa=class extends Ei{constructor(){super(Yv.hashAttributes)}};sr.AttributeHashMap=xa});var wa=d(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.DeltaMetricProcessor=void 0;var Ia=Xr(),La=class{constructor(r){this._aggregator=r,this._activeCollectionStorage=new Ia.AttributeHashMap,this._cumulativeMemoStorage=new Ia.AttributeHashMap}record(r,o,c,s){let a=this._activeCollectionStorage.getOrDefault(o,()=>this._aggregator.createAccumulation(s));a?.record(r)}batchCumulate(r,o){Array.from(r.entries()).forEach(([c,s,a])=>{let t=this._aggregator.createAccumulation(o);t?.record(s);let e=t;if(this._cumulativeMemoStorage.has(c,a)){let n=this._cumulativeMemoStorage.get(c,a);e=this._aggregator.diff(n,t)}if(this._activeCollectionStorage.has(c,a)){let n=this._activeCollectionStorage.get(c,a);e=this._aggregator.merge(n,e)}this._cumulativeMemoStorage.set(c,t,a),this._activeCollectionStorage.set(c,e,a)})}collect(){let r=this._activeCollectionStorage;return this._activeCollectionStorage=new Ia.AttributeHashMap,r}};gi.DeltaMetricProcessor=La});var Ca=d(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.TemporalMetricProcessor=void 0;var Wv=zo(),Jv=Xr(),Ma=class i{constructor(r,o){this._aggregator=r,this._unreportedAccumulations=new Map,this._reportHistory=new Map,o.forEach(c=>{this._unreportedAccumulations.set(c,[])})}buildMetrics(r,o,c,s){this._stashAccumulations(c);let a=this._getMergedUnreportedAccumulations(r),t=a,e;if(this._reportHistory.has(r)){let u=this._reportHistory.get(r),l=u.collectionTime;e=u.aggregationTemporality,e===Wv.AggregationTemporality.CUMULATIVE?t=i.merge(u.accumulations,a,this._aggregator):t=i.calibrateStartTime(u.accumulations,a,l)}else e=r.selectAggregationTemporality(o.type);this._reportHistory.set(r,{accumulations:t,collectionTime:s,aggregationTemporality:e});let n=Qv(t);if(n.length!==0)return this._aggregator.toMetricData(o,e,n,s)}_stashAccumulations(r){let o=this._unreportedAccumulations.keys();for(let c of o){let s=this._unreportedAccumulations.get(c);s===void 0&&(s=[],this._unreportedAccumulations.set(c,s)),s.push(r)}}_getMergedUnreportedAccumulations(r){let o=new Jv.AttributeHashMap,c=this._unreportedAccumulations.get(r);if(this._unreportedAccumulations.set(r,[]),c===void 0)return o;for(let s of c)o=i.merge(o,s,this._aggregator);return o}static merge(r,o,c){let s=r,a=o.entries(),t=a.next();for(;t.done!==!0;){let[e,n,u]=t.value;if(r.has(e,u)){let l=r.get(e,u),h=c.merge(l,n);s.set(e,h,u)}else s.set(e,n,u);t=a.next()}return s}static calibrateStartTime(r,o,c){for(let[s,a]of r.keys()){let t=o.get(s,a);t?.setStartTime(c)}return o}};vi.TemporalMetricProcessor=Ma;function Qv(i){return Array.from(i.entries())}});var _d=d(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.AsyncMetricStorage=void 0;var Zv=Ra(),eT=wa(),tT=Ca(),rT=Xr(),Ua=class extends Zv.MetricStorage{constructor(r,o,c,s){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new eT.DeltaMetricProcessor(o),this._temporalMetricStorage=new tT.TemporalMetricProcessor(o,s)}record(r,o){let c=new rT.AttributeHashMap;Array.from(r.entries()).forEach(([s,a])=>{c.set(this._attributesProcessor.process(s),a)}),this._deltaMetricStorage.batchCumulate(c,o)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Ti.AsyncMetricStorage=Ua});var Td=d(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.getConflictResolutionRecipe=se.getDescriptionResolutionRecipe=se.getTypeConflictResolutionRecipe=se.getUnitConflictResolutionRecipe=se.getValueTypeConflictResolutionRecipe=se.getIncompatibilityDetails=void 0;function nT(i,r){let o="";return i.unit!==r.unit&&(o+=` - Unit '${i.unit}' does not match '${r.unit}'
9
- `),i.type!==r.type&&(o+=` - Type '${i.type}' does not match '${r.type}'
10
- `),i.valueType!==r.valueType&&(o+=` - Value Type '${i.valueType}' does not match '${r.valueType}'
11
- `),i.description!==r.description&&(o+=` - Description '${i.description}' does not match '${r.description}'
12
- `),o}se.getIncompatibilityDetails=nT;function yd(i,r){return` - use valueType '${i.valueType}' on instrument creation or use an instrument name other than '${r.name}'`}se.getValueTypeConflictResolutionRecipe=yd;function Ed(i,r){return` - use unit '${i.unit}' on instrument creation or use an instrument name other than '${r.name}'`}se.getUnitConflictResolutionRecipe=Ed;function gd(i,r){let o={name:r.name,type:r.type,unit:r.unit},c=JSON.stringify(o);return` - create a new view with a name other than '${i.name}' and InstrumentSelector '${c}'`}se.getTypeConflictResolutionRecipe=gd;function vd(i,r){let o={name:r.name,type:r.type,unit:r.unit},c=JSON.stringify(o);return` - create a new view with a name other than '${i.name}' and InstrumentSelector '${c}'
13
- - OR - create a new view with the name ${i.name} and description '${i.description}' and InstrumentSelector ${c}
14
- - OR - create a new view with the name ${r.name} and description '${i.description}' and InstrumentSelector ${c}`}se.getDescriptionResolutionRecipe=vd;function oT(i,r){return i.valueType!==r.valueType?yd(i,r):i.unit!==r.unit?Ed(i,r):i.type!==r.type?gd(i,r):i.description!==r.description?vd(i,r):""}se.getConflictResolutionRecipe=oT});var bd=d(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.MetricStorageRegistry=void 0;var iT=we(),Sd=(y(),E(_)),Si=Td(),Da=class i{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new i}getStorages(r){let o=[];for(let s of this._sharedRegistry.values())o=o.concat(s);let c=this._perCollectorRegistry.get(r);if(c!=null)for(let s of c.values())o=o.concat(s);return o}register(r){this._registerStorage(r,this._sharedRegistry)}registerForCollector(r,o){let c=this._perCollectorRegistry.get(r);c==null&&(c=new Map,this._perCollectorRegistry.set(r,c)),this._registerStorage(o,c)}findOrUpdateCompatibleStorage(r){let o=this._sharedRegistry.get(r.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(r,o)}findOrUpdateCompatibleCollectorStorage(r,o){let c=this._perCollectorRegistry.get(r);if(c===void 0)return null;let s=c.get(o.name);return s===void 0?null:this._findOrUpdateCompatibleStorage(o,s)}_registerStorage(r,o){let c=r.getInstrumentDescriptor(),s=o.get(c.name);if(s===void 0){o.set(c.name,[r]);return}s.push(r)}_findOrUpdateCompatibleStorage(r,o){let c=null;for(let s of o){let a=s.getInstrumentDescriptor();(0,iT.isDescriptorCompatibleWith)(a,r)?(a.description!==r.description&&(r.description.length>a.description.length&&s.updateDescription(r.description),Sd.diag.warn("A view or instrument with the name ",r.name,` has already been registered, but has a different description and is incompatible with another registered view.
7
+ var bp=Object.create;var vs=Object.defineProperty;var Pp=Object.getOwnPropertyDescriptor;var yp=Object.getOwnPropertyNames;var vp=Object.getPrototypeOf,Ip=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var Ku=(r,e)=>()=>(r&&(e=r(r=0)),e);var c=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var qr=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yp(e))!Ip.call(r,i)&&i!==t&&vs(r,i,{get:()=>e[i],enumerable:!(n=Pp(e,i))||n.enumerable});return r},ht=(r,e,t)=>(qr(r,e,"default"),t&&qr(t,e,"default")),K=(r,e,t)=>(t=r!=null?bp(vp(r)):{},qr(e||!r||!r.__esModule?vs(t,"default",{value:r,enumerable:!0}):t,r)),f=r=>qr(vs({},"__esModule",{value:!0}),r);var d={};import*as UA from"@opentelemetry/api";var h=Ku(()=>{ht(d,UA)});var ur=c(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.isTracingSuppressed=ve.unsuppressTracing=ve.suppressTracing=void 0;var Lp=(h(),f(d)),Is=(0,Lp.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Mp(r){return r.setValue(Is,!0)}ve.suppressTracing=Mp;function Cp(r){return r.deleteValue(Is)}ve.unsuppressTracing=Cp;function Np(r){return r.getValue(Is)===!0}ve.isTracingSuppressed=Np});var Ls=c(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 Ms=c(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.parseKeyPairsIntoRecord=pe.parsePairKeyValue=pe.getKeyPairs=pe.serializeKeyPairs=void 0;var wp=(h(),f(d)),je=Ls();function xp(r){return r.reduce((e,t)=>{let n=`${e}${e!==""?je.BAGGAGE_ITEMS_SEPARATOR:""}${t}`;return n.length>je.BAGGAGE_MAX_TOTAL_LENGTH?e:n},"")}pe.serializeKeyPairs=xp;function Dp(r){return r.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=je.BAGGAGE_PROPERTIES_SEPARATOR+t.metadata.toString()),n})}pe.getKeyPairs=Dp;function zu(r){let e=r.split(je.BAGGAGE_PROPERTIES_SEPARATOR);if(e.length<=0)return;let t=e.shift();if(!t)return;let n=t.indexOf(je.BAGGAGE_KEY_PAIR_SEPARATOR);if(n<=0)return;let i=decodeURIComponent(t.substring(0,n).trim()),s=decodeURIComponent(t.substring(n+1).trim()),o;return e.length>0&&(o=(0,wp.baggageEntryMetadataFromString)(e.join(je.BAGGAGE_PROPERTIES_SEPARATOR))),{key:i,value:s,metadata:o}}pe.parsePairKeyValue=zu;function Bp(r){return typeof r!="string"||r.length===0?{}:r.split(je.BAGGAGE_ITEMS_SEPARATOR).map(e=>zu(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}pe.parseKeyPairsIntoRecord=Bp});var Yu=c(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.W3CBaggagePropagator=void 0;var Cs=(h(),f(d)),Up=ur(),Fe=Ls(),Ns=Ms(),ws=class{inject(e,t,n){let i=Cs.propagation.getBaggage(e);if(!i||(0,Up.isTracingSuppressed)(e))return;let s=(0,Ns.getKeyPairs)(i).filter(a=>a.length<=Fe.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Fe.BAGGAGE_MAX_NAME_VALUE_PAIRS),o=(0,Ns.serializeKeyPairs)(s);o.length>0&&n.set(t,Fe.BAGGAGE_HEADER,o)}extract(e,t,n){let i=n.get(t,Fe.BAGGAGE_HEADER),s=Array.isArray(i)?i.join(Fe.BAGGAGE_ITEMS_SEPARATOR):i;if(!s)return e;let o={};return s.length===0||(s.split(Fe.BAGGAGE_ITEMS_SEPARATOR).forEach(u=>{let l=(0,Ns.parsePairKeyValue)(u);if(l){let _={value:l.value};l.metadata&&(_.metadata=l.metadata),o[l.key]=_}}),Object.entries(o).length===0)?e:Cs.propagation.setBaggage(e,Cs.propagation.createBaggage(o))}fields(){return[Fe.BAGGAGE_HEADER]}};Gr.W3CBaggagePropagator=ws});var Qu=c(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AnchoredClock=void 0;var xs=class{constructor(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}};Vr.AnchoredClock=xs});var rc=c(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.isAttributeValue=Ie.isAttributeKey=Ie.sanitizeAttributes=void 0;var Zu=(h(),f(d));function qp(r){let e={};if(typeof r!="object"||r==null)return e;for(let[t,n]of Object.entries(r)){if(!Ju(t)){Zu.diag.warn(`Invalid attribute key: ${t}`);continue}if(!ec(n)){Zu.diag.warn(`Invalid attribute value set for key: ${t}`);continue}Array.isArray(n)?e[t]=n.slice():e[t]=n}return e}Ie.sanitizeAttributes=qp;function Ju(r){return typeof r=="string"&&r.length>0}Ie.isAttributeKey=Ju;function ec(r){return r==null?!0:Array.isArray(r)?Gp(r):tc(r)}Ie.isAttributeValue=ec;function Gp(r){let e;for(let t of r)if(t!=null){if(!e){if(tc(t)){e=typeof t;continue}return!1}if(typeof t!==e)return!1}return!0}function tc(r){switch(typeof r){case"number":case"boolean":case"string":return!0}return!1}});var Ds=c(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.loggingErrorHandler=void 0;var Vp=(h(),f(d));function jp(){return r=>{Vp.diag.error(Fp(r))}}jr.loggingErrorHandler=jp;function Fp(r){return typeof r=="string"?r:JSON.stringify(Hp(r))}function Hp(r){let e={},t=r;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(n=>{if(e[n])return;let i=t[n];i&&(e[n]=String(i))}),t=Object.getPrototypeOf(t);return e}});var Bs=c(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.globalErrorHandler=pt.setGlobalErrorHandler=void 0;var kp=Ds(),nc=(0,kp.loggingErrorHandler)();function Xp(r){nc=r}pt.setGlobalErrorHandler=Xp;function $p(r){try{nc(r)}catch{}}pt.globalErrorHandler=$p});var Us=c(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.TracesSamplerValues=void 0;var Wp;(function(r){r.AlwaysOff="always_off",r.AlwaysOn="always_on",r.ParentBasedAlwaysOff="parentbased_always_off",r.ParentBasedAlwaysOn="parentbased_always_on",r.ParentBasedTraceIdRatio="parentbased_traceidratio",r.TraceIdRatio="traceidratio"})(Wp=cr.TracesSamplerValues||(cr.TracesSamplerValues={}))});var ic=c(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr._globalThis=void 0;Fr._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var Hr=c(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.getEnvWithoutDefaults=y.parseEnvironment=y.DEFAULT_ENVIRONMENT=y.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=y.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=y.DEFAULT_ATTRIBUTE_COUNT_LIMIT=y.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var Le=(h(),f(d)),Kp=Us(),zp=ic(),Yp=",",Qp=["OTEL_SDK_DISABLED"];function Zp(r){return Qp.indexOf(r)>-1}var Jp=["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 ef(r){return Jp.indexOf(r)>-1}var tf=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function rf(r){return tf.indexOf(r)>-1}y.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;y.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;y.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;y.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;y.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:Le.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:y.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:y.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:y.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:y.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:y.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:y.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:y.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:y.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Kp.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 nf(r,e,t){if(typeof t[r]>"u")return;let n=String(t[r]);e[r]=n.toLowerCase()==="true"}function sf(r,e,t,n=-1/0,i=1/0){if(typeof t[r]<"u"){let s=Number(t[r]);isNaN(s)||(s<n?e[r]=n:s>i?e[r]=i:e[r]=s)}}function of(r,e,t,n=Yp){let i=t[r];typeof i=="string"&&(e[r]=i.split(n).map(s=>s.trim()))}var af={ALL:Le.DiagLogLevel.ALL,VERBOSE:Le.DiagLogLevel.VERBOSE,DEBUG:Le.DiagLogLevel.DEBUG,INFO:Le.DiagLogLevel.INFO,WARN:Le.DiagLogLevel.WARN,ERROR:Le.DiagLogLevel.ERROR,NONE:Le.DiagLogLevel.NONE};function uf(r,e,t){let n=t[r];if(typeof n=="string"){let i=af[n.toUpperCase()];i!=null&&(e[r]=i)}}function qs(r){let e={};for(let t in y.DEFAULT_ENVIRONMENT){let n=t;switch(n){case"OTEL_LOG_LEVEL":uf(n,e,r);break;default:if(Zp(n))nf(n,e,r);else if(ef(n))sf(n,e,r);else if(rf(n))of(n,e,r);else{let i=r[n];typeof i<"u"&&i!==null&&(e[n]=String(i))}}}return e}y.parseEnvironment=qs;function cf(){return typeof process<"u"&&process&&process.env?qs(process.env):qs(zp._globalThis)}y.getEnvWithoutDefaults=cf});var oc=c(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.getEnv=void 0;var lf=J("os"),sc=Hr();function df(){let r=(0,sc.parseEnvironment)(process.env);return Object.assign({HOSTNAME:lf.hostname()},sc.DEFAULT_ENVIRONMENT,r)}kr.getEnv=df});var ac=c(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr._globalThis=void 0;Xr._globalThis=typeof globalThis=="object"?globalThis:global});var cc=c($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.hexToBase64=void 0;function uc(r){return r>=48&&r<=57?r-48:r>=97&&r<=102?r-87:r-55}var _f=Buffer.alloc(8),hf=Buffer.alloc(16);function pf(r){let e;r.length===16?e=_f:r.length===32?e=hf:e=Buffer.alloc(r.length/2);let t=0;for(let n=0;n<r.length;n+=2){let i=uc(r.charCodeAt(n)),s=uc(r.charCodeAt(n+1));e.writeUInt8(i<<4|s,t++)}return e.toString("base64")}$r.hexToBase64=pf});var _c=c(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.RandomIdGenerator=void 0;var ff=8,dc=16,Gs=class{constructor(){this.generateTraceId=lc(dc),this.generateSpanId=lc(ff)}};Kr.RandomIdGenerator=Gs;var Wr=Buffer.allocUnsafe(dc);function lc(r){return function(){for(let t=0;t<r/4;t++)Wr.writeUInt32BE(Math.random()*2**32>>>0,t*4);for(let t=0;t<r&&!(Wr[t]>0);t++)t===r-1&&(Wr[r-1]=1);return Wr.toString("hex",0,r)}}});var hc=c(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.otperformance=void 0;var Ef=J("perf_hooks");zr.otperformance=Ef.performance});var Vs=c(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.VERSION=void 0;Yr.VERSION="1.19.0"});var pc=c(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.MessageTypeValues=R.RpcGrpcStatusCodeValues=R.MessagingOperationValues=R.MessagingDestinationKindValues=R.HttpFlavorValues=R.NetHostConnectionSubtypeValues=R.NetHostConnectionTypeValues=R.NetTransportValues=R.FaasInvokedProviderValues=R.FaasDocumentOperationValues=R.FaasTriggerValues=R.DbCassandraConsistencyLevelValues=R.DbSystemValues=R.SemanticAttributes=void 0;R.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"};R.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"};R.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"};R.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};R.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};R.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};R.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};R.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};R.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"};R.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};R.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};R.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};R.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};R.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var fc=c(He=>{"use strict";var mf=He&&He.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gf=He&&He.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&mf(e,r,t)};Object.defineProperty(He,"__esModule",{value:!0});gf(pc(),He)});var Ec=c(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.TelemetrySdkLanguageValues=k.OsTypeValues=k.HostArchValues=k.AwsEcsLaunchtypeValues=k.CloudPlatformValues=k.CloudProviderValues=k.SemanticResourceAttributes=void 0;k.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"};k.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};k.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"};k.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};k.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};k.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"};k.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var mc=c(ke=>{"use strict";var Tf=ke&&ke.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Sf=ke&&ke.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Tf(e,r,t)};Object.defineProperty(ke,"__esModule",{value:!0});Sf(Ec(),ke)});var ie=c(Me=>{"use strict";var Af=Me&&Me.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gc=Me&&Me.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Af(e,r,t)};Object.defineProperty(Me,"__esModule",{value:!0});gc(fc(),Me);gc(mc(),Me)});var Tc=c(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.SDK_INFO=void 0;var Of=Vs(),lr=ie();Qr.SDK_INFO={[lr.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[lr.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[lr.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:lr.TelemetrySdkLanguageValues.NODEJS,[lr.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Of.VERSION}});var Sc=c(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.unrefTimer=void 0;function Rf(r){r.unref()}Zr.unrefTimer=Rf});var Ac=c(ee=>{"use strict";var bf=ee&&ee.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Xe=ee&&ee.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&bf(e,r,t)};Object.defineProperty(ee,"__esModule",{value:!0});Xe(oc(),ee);Xe(ac(),ee);Xe(cc(),ee);Xe(_c(),ee);Xe(hc(),ee);Xe(Tc(),ee);Xe(Sc(),ee)});var js=c($e=>{"use strict";var Pf=$e&&$e.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),yf=$e&&$e.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Pf(e,r,t)};Object.defineProperty($e,"__esModule",{value:!0});yf(Ac(),$e)});var Pc=c(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.addHrTimes=P.isTimeInput=P.isTimeInputHrTime=P.hrTimeToMicroseconds=P.hrTimeToMilliseconds=P.hrTimeToNanoseconds=P.hrTimeToTimeStamp=P.hrTimeDuration=P.timeInputToHrTime=P.hrTime=P.getTimeOrigin=P.millisToHrTime=void 0;var Fs=js(),Oc=9,vf=6,If=Math.pow(10,vf),Jr=Math.pow(10,Oc);function dr(r){let e=r/1e3,t=Math.trunc(e),n=Math.round(r%1e3*If);return[t,n]}P.millisToHrTime=dr;function Hs(){let r=Fs.otperformance.timeOrigin;if(typeof r!="number"){let e=Fs.otperformance;r=e.timing&&e.timing.fetchStart}return r}P.getTimeOrigin=Hs;function Rc(r){let e=dr(Hs()),t=dr(typeof r=="number"?r:Fs.otperformance.now());return bc(e,t)}P.hrTime=Rc;function Lf(r){if(ks(r))return r;if(typeof r=="number")return r<Hs()?Rc(r):dr(r);if(r instanceof Date)return dr(r.getTime());throw TypeError("Invalid input type")}P.timeInputToHrTime=Lf;function Mf(r,e){let t=e[0]-r[0],n=e[1]-r[1];return n<0&&(t-=1,n+=Jr),[t,n]}P.hrTimeDuration=Mf;function Cf(r){let e=Oc,t=`${"0".repeat(e)}${r[1]}Z`,n=t.substr(t.length-e-1);return new Date(r[0]*1e3).toISOString().replace("000Z",n)}P.hrTimeToTimeStamp=Cf;function Nf(r){return r[0]*Jr+r[1]}P.hrTimeToNanoseconds=Nf;function wf(r){return r[0]*1e3+r[1]/1e6}P.hrTimeToMilliseconds=wf;function xf(r){return r[0]*1e6+r[1]/1e3}P.hrTimeToMicroseconds=xf;function ks(r){return Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}P.isTimeInputHrTime=ks;function Df(r){return ks(r)||typeof r=="number"||r instanceof Date}P.isTimeInput=Df;function bc(r,e){let t=[r[0]+e[0],r[1]+e[1]];return t[1]>=Jr&&(t[1]-=Jr,t[0]+=1),t}P.addHrTimes=bc});var vc=c(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0})});var Ic=c(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.ExportResultCode=void 0;var Bf;(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(Bf=_r.ExportResultCode||(_r.ExportResultCode={}))});var Mc=c(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.CompositePropagator=void 0;var Lc=(h(),f(d)),Xs=class{constructor(e={}){var t;this._propagators=(t=e.propagators)!==null&&t!==void 0?t:[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,i)=>n.concat(i),[])))}inject(e,t,n){for(let i of this._propagators)try{i.inject(e,t,n)}catch(s){Lc.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${s.message}`)}}extract(e,t,n){return this._propagators.reduce((i,s)=>{try{return s.extract(i,t,n)}catch(o){Lc.diag.warn(`Failed to inject with ${s.constructor.name}. Err: ${o.message}`)}return i},e)}fields(){return this._fields.slice()}};en.CompositePropagator=Xs});var Cc=c(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.validateValue=ft.validateKey=void 0;var $s="[_0-9a-z-*/]",Uf=`[a-z]${$s}{0,255}`,qf=`[a-z0-9]${$s}{0,240}@[a-z]${$s}{0,13}`,Gf=new RegExp(`^(?:${Uf}|${qf})$`),Vf=/^[ -~]{0,255}[!-~]$/,jf=/,|=/;function Ff(r){return Gf.test(r)}ft.validateKey=Ff;function Hf(r){return Vf.test(r)&&!jf.test(r)}ft.validateValue=Hf});var Ks=c(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.TraceState=void 0;var Nc=Cc(),wc=32,kf=512,xc=",",Dc="=",Ws=class r{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+Dc+this.get(t)),e),[]).join(xc)}_parse(e){e.length>kf||(this._internalState=e.split(xc).reverse().reduce((t,n)=>{let i=n.trim(),s=i.indexOf(Dc);if(s!==-1){let o=i.slice(0,s),a=i.slice(s+1,n.length);(0,Nc.validateKey)(o)&&(0,Nc.validateValue)(a)&&t.set(o,a)}return t},new Map),this._internalState.size>wc&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,wc))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new r;return e._internalState=new Map(this._internalState),e}};tn.TraceState=Ws});var Uc=c(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.W3CTraceContextPropagator=X.parseTraceParent=X.TRACE_STATE_HEADER=X.TRACE_PARENT_HEADER=void 0;var rn=(h(),f(d)),Xf=ur(),$f=Ks();X.TRACE_PARENT_HEADER="traceparent";X.TRACE_STATE_HEADER="tracestate";var Wf="00",Kf="(?!ff)[\\da-f]{2}",zf="(?![0]{32})[\\da-f]{32}",Yf="(?![0]{16})[\\da-f]{16}",Qf="[\\da-f]{2}",Zf=new RegExp(`^\\s?(${Kf})-(${zf})-(${Yf})-(${Qf})(-.*)?\\s?$`);function Bc(r){let e=Zf.exec(r);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}X.parseTraceParent=Bc;var zs=class{inject(e,t,n){let i=rn.trace.getSpanContext(e);if(!i||(0,Xf.isTracingSuppressed)(e)||!(0,rn.isSpanContextValid)(i))return;let s=`${Wf}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||rn.TraceFlags.NONE).toString(16)}`;n.set(t,X.TRACE_PARENT_HEADER,s),i.traceState&&n.set(t,X.TRACE_STATE_HEADER,i.traceState.serialize())}extract(e,t,n){let i=n.get(t,X.TRACE_PARENT_HEADER);if(!i)return e;let s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return e;let o=Bc(s);if(!o)return e;o.isRemote=!0;let a=n.get(t,X.TRACE_STATE_HEADER);if(a){let u=Array.isArray(a)?a.join(","):a;o.traceState=new $f.TraceState(typeof u=="string"?u:void 0)}return rn.trace.setSpanContext(e,o)}fields(){return[X.TRACE_PARENT_HEADER,X.TRACE_STATE_HEADER]}};X.W3CTraceContextPropagator=zs});var Gc=c(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0})});var Vc=c(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.getRPCMetadata=ue.deleteRPCMetadata=ue.setRPCMetadata=ue.RPCType=void 0;var Jf=(h(),f(d)),Ys=(0,Jf.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),eE;(function(r){r.HTTP="http"})(eE=ue.RPCType||(ue.RPCType={}));function tE(r,e){return r.setValue(Ys,e)}ue.setRPCMetadata=tE;function rE(r){return r.deleteValue(Ys)}ue.deleteRPCMetadata=rE;function nE(r){return r.getValue(Ys)}ue.getRPCMetadata=nE});var Zs=c(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.AlwaysOffSampler=void 0;var iE=(h(),f(d)),Qs=class{shouldSample(){return{decision:iE.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};nn.AlwaysOffSampler=Qs});var eo=c(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.AlwaysOnSampler=void 0;var sE=(h(),f(d)),Js=class{shouldSample(){return{decision:sE.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};sn.AlwaysOnSampler=Js});var Fc=c(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.ParentBasedSampler=void 0;var on=(h(),f(d)),oE=Bs(),jc=Zs(),to=eo(),ro=class{constructor(e){var t,n,i,s;this._root=e.root,this._root||((0,oE.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new to.AlwaysOnSampler),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new to.AlwaysOnSampler,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new jc.AlwaysOffSampler,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new to.AlwaysOnSampler,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new jc.AlwaysOffSampler}shouldSample(e,t,n,i,s,o){let a=on.trace.getSpanContext(e);return!a||!(0,on.isSpanContextValid)(a)?this._root.shouldSample(e,t,n,i,s,o):a.isRemote?a.traceFlags&on.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,i,s,o):this._remoteParentNotSampled.shouldSample(e,t,n,i,s,o):a.traceFlags&on.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,t,n,i,s,o):this._localParentNotSampled.shouldSample(e,t,n,i,s,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};an.ParentBasedSampler=ro});var Hc=c(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.TraceIdRatioBasedSampler=void 0;var no=(h(),f(d)),io=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:(0,no.isValidTraceId)(t)&&this._accumulate(t)<this._upperBound?no.SamplingDecision.RECORD_AND_SAMPLED:no.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){let i=n*8,s=parseInt(e.slice(i,i+8),16);t=(t^s)>>>0}return t}};un.TraceIdRatioBasedSampler=io});var Kc=c(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.isPlainObject=void 0;var aE="[object Object]",uE="[object Null]",cE="[object Undefined]",lE=Function.prototype,kc=lE.toString,dE=kc.call(Object),_E=hE(Object.getPrototypeOf,Object),Xc=Object.prototype,$c=Xc.hasOwnProperty,We=Symbol?Symbol.toStringTag:void 0,Wc=Xc.toString;function hE(r,e){return function(t){return r(e(t))}}function pE(r){if(!fE(r)||EE(r)!==aE)return!1;let e=_E(r);if(e===null)return!0;let t=$c.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&kc.call(t)===dE}cn.isPlainObject=pE;function fE(r){return r!=null&&typeof r=="object"}function EE(r){return r==null?r===void 0?cE:uE:We&&We in Object(r)?mE(r):gE(r)}function mE(r){let e=$c.call(r,We),t=r[We],n=!1;try{r[We]=void 0,n=!0}catch{}let i=Wc.call(r);return n&&(e?r[We]=t:delete r[We]),i}function gE(r){return Wc.call(r)}});var Jc=c(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.merge=void 0;var zc=Kc(),TE=20;function SE(...r){let e=r.shift(),t=new WeakMap;for(;r.length>0;)e=Qc(e,r.shift(),0,t);return e}_n.merge=SE;function so(r){return dn(r)?r.slice():r}function Qc(r,e,t=0,n){let i;if(!(t>TE)){if(t++,ln(r)||ln(e)||Zc(e))i=so(e);else if(dn(r)){if(i=r.slice(),dn(e))for(let s=0,o=e.length;s<o;s++)i.push(so(e[s]));else if(hr(e)){let s=Object.keys(e);for(let o=0,a=s.length;o<a;o++){let u=s[o];i[u]=so(e[u])}}}else if(hr(r))if(hr(e)){if(!AE(r,e))return e;i=Object.assign({},r);let s=Object.keys(e);for(let o=0,a=s.length;o<a;o++){let u=s[o],l=e[u];if(ln(l))typeof l>"u"?delete i[u]:i[u]=l;else{let _=i[u],E=l;if(Yc(r,u,n)||Yc(e,u,n))delete i[u];else{if(hr(_)&&hr(E)){let O=n.get(_)||[],D=n.get(E)||[];O.push({obj:r,key:u}),D.push({obj:e,key:u}),n.set(_,O),n.set(E,D)}i[u]=Qc(i[u],l,t,n)}}}}else i=e;return i}}function Yc(r,e,t){let n=t.get(r[e])||[];for(let i=0,s=n.length;i<s;i++){let o=n[i];if(o.key===e&&o.obj===r)return!0}return!1}function dn(r){return Array.isArray(r)}function Zc(r){return typeof r=="function"}function hr(r){return!ln(r)&&!dn(r)&&!Zc(r)&&typeof r=="object"}function ln(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r>"u"||r instanceof Date||r instanceof RegExp||r===null}function AE(r,e){return!(!(0,zc.isPlainObject)(r)||!(0,zc.isPlainObject)(e))}});var el=c(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.callWithTimeout=Et.TimeoutError=void 0;var hn=class r extends Error{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype)}};Et.TimeoutError=hn;function OE(r,e){let t,n=new Promise(function(s,o){t=setTimeout(function(){o(new hn("Operation timed out."))},e)});return Promise.race([r,n]).then(i=>(clearTimeout(t),i),i=>{throw clearTimeout(t),i})}Et.callWithTimeout=OE});var rl=c(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.isUrlIgnored=mt.urlMatches=void 0;function tl(r,e){return typeof e=="string"?r===e:!!r.match(e)}mt.urlMatches=tl;function RE(r,e){if(!e)return!1;for(let t of e)if(tl(r,t))return!0;return!1}mt.isUrlIgnored=RE});var nl=c(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.isWrapped=void 0;function bE(r){return typeof r=="function"&&typeof r.__original=="function"&&typeof r.__unwrap=="function"&&r.__wrapped===!0}pn.isWrapped=bE});var il=c(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.Deferred=void 0;var oo=class{constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};fn.Deferred=oo});var sl=c(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.BindOnceFuture=void 0;var PE=il(),ao=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new PE.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(t=>this._deferred.resolve(t),t=>this._deferred.reject(t))}catch(t){this._deferred.reject(t)}}return this._deferred.promise}};En.BindOnceFuture=ao});var al=c(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn._export=void 0;var ol=(h(),f(d)),yE=ur();function vE(r,e){return new Promise(t=>{ol.context.with((0,yE.suppressTracing)(ol.context.active()),()=>{r.export(e,n=>{t(n)})})})}mn._export=vE});var S=c(T=>{"use strict";var IE=T&&T.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),b=T&&T.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&IE(e,r,t)};Object.defineProperty(T,"__esModule",{value:!0});T.internal=T.baggageUtils=void 0;b(Yu(),T);b(Qu(),T);b(rc(),T);b(Bs(),T);b(Ds(),T);b(Pc(),T);b(vc(),T);b(Ic(),T);T.baggageUtils=Ms();b(js(),T);b(Mc(),T);b(Uc(),T);b(Gc(),T);b(Vc(),T);b(Zs(),T);b(eo(),T);b(Fc(),T);b(Hc(),T);b(ur(),T);b(Ks(),T);b(Hr(),T);b(Jc(),T);b(Us(),T);b(el(),T);b(rl(),T);b(nl(),T);b(sl(),T);b(Vs(),T);var LE=al();T.internal={_export:LE._export}});var ul=c(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.ExceptionEventName=void 0;gn.ExceptionEventName="exception"});var co=c(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.Span=void 0;var fe=(h(),f(d)),$=S(),Ke=ie(),ME=ul(),uo=class{constructor(e,t,n,i,s,o,a=[],u,l,_){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:fe.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=o,this.kind=s,this.links=a;let E=Date.now();this._performanceStartTime=$.otperformance.now(),this._performanceOffset=E-(this._performanceStartTime+(0,$.getTimeOrigin)()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??E),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),_!=null&&this.setAttributes(_),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}spanContext(){return this._spanContext}setAttribute(e,t){return t==null||this._isSpanEnded()?this:e.length===0?(fe.diag.warn(`Invalid attribute key: ${e}`),this):(0,$.isAttributeValue)(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(fe.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}addEvent(e,t,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return fe.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(fe.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,$.isTimeInput)(t)&&((0,$.isTimeInput)(n)||(n=t),t=void 0);let i=(0,$.sanitizeAttributes)(t);return this.events.push({name:e,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this}setStatus(e){return this._isSpanEnded()?this:(this.status=e,this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){fe.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(e),this._duration=(0,$.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(fe.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)}_getTime(e){if(typeof e=="number"&&e<$.otperformance.now())return(0,$.hrTime)(e+this._performanceOffset);if(typeof e=="number")return(0,$.millisToHrTime)(e);if(e instanceof Date)return(0,$.millisToHrTime)(e.getTime());if((0,$.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,$.millisToHrTime)(Date.now());let t=$.otperformance.now()-this._performanceStartTime;return(0,$.addHrTimes)(this.startTime,(0,$.millisToHrTime)(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e=="string"?n[Ke.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?n[Ke.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[Ke.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(n[Ke.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[Ke.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),n[Ke.SemanticAttributes.EXCEPTION_TYPE]||n[Ke.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(ME.ExceptionEventName,n,t):fe.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&fe.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substr(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(fe.diag.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,t):n):e}};Tn.Span=uo});var fr=c(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.SamplingDecision=void 0;var CE;(function(r){r[r.NOT_RECORD=0]="NOT_RECORD",r[r.RECORD=1]="RECORD",r[r.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(CE=pr.SamplingDecision||(pr.SamplingDecision={}))});var An=c(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.AlwaysOffSampler=void 0;var NE=fr(),lo=class{shouldSample(){return{decision:NE.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Sn.AlwaysOffSampler=lo});var Rn=c(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.AlwaysOnSampler=void 0;var wE=fr(),_o=class{shouldSample(){return{decision:wE.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};On.AlwaysOnSampler=_o});var fo=c(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ParentBasedSampler=void 0;var bn=(h(),f(d)),xE=S(),cl=An(),ho=Rn(),po=class{constructor(e){var t,n,i,s;this._root=e.root,this._root||((0,xE.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ho.AlwaysOnSampler),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new ho.AlwaysOnSampler,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new cl.AlwaysOffSampler,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new ho.AlwaysOnSampler,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new cl.AlwaysOffSampler}shouldSample(e,t,n,i,s,o){let a=bn.trace.getSpanContext(e);return!a||!(0,bn.isSpanContextValid)(a)?this._root.shouldSample(e,t,n,i,s,o):a.isRemote?a.traceFlags&bn.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,i,s,o):this._remoteParentNotSampled.shouldSample(e,t,n,i,s,o):a.traceFlags&bn.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,t,n,i,s,o):this._localParentNotSampled.shouldSample(e,t,n,i,s,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Pn.ParentBasedSampler=po});var mo=c(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.TraceIdRatioBasedSampler=void 0;var DE=(h(),f(d)),ll=fr(),Eo=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:(0,DE.isValidTraceId)(t)&&this._accumulate(t)<this._upperBound?ll.SamplingDecision.RECORD_AND_SAMPLED:ll.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){let i=n*8,s=parseInt(e.slice(i,i+8),16);t=(t^s)>>>0}return t}};yn.TraceIdRatioBasedSampler=Eo});var So=c(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.buildSamplerFromEnv=Tt.loadDefaultConfig=void 0;var vn=(h(),f(d)),j=S(),dl=An(),go=Rn(),To=fo(),_l=mo(),BE=(0,j.getEnv)(),UE=j.TracesSamplerValues.AlwaysOn,gt=1;function qE(){return{sampler:pl(BE),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,j.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,j.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,j.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,j.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,j.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,j.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,j.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,j.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}Tt.loadDefaultConfig=qE;function pl(r=(0,j.getEnv)()){switch(r.OTEL_TRACES_SAMPLER){case j.TracesSamplerValues.AlwaysOn:return new go.AlwaysOnSampler;case j.TracesSamplerValues.AlwaysOff:return new dl.AlwaysOffSampler;case j.TracesSamplerValues.ParentBasedAlwaysOn:return new To.ParentBasedSampler({root:new go.AlwaysOnSampler});case j.TracesSamplerValues.ParentBasedAlwaysOff:return new To.ParentBasedSampler({root:new dl.AlwaysOffSampler});case j.TracesSamplerValues.TraceIdRatio:return new _l.TraceIdRatioBasedSampler(hl(r));case j.TracesSamplerValues.ParentBasedTraceIdRatio:return new To.ParentBasedSampler({root:new _l.TraceIdRatioBasedSampler(hl(r))});default:return vn.diag.error(`OTEL_TRACES_SAMPLER value "${r.OTEL_TRACES_SAMPLER} invalid, defaulting to ${UE}".`),new go.AlwaysOnSampler}}Tt.buildSamplerFromEnv=pl;function hl(r){if(r.OTEL_TRACES_SAMPLER_ARG===void 0||r.OTEL_TRACES_SAMPLER_ARG==="")return vn.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${gt}.`),gt;let e=Number(r.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(vn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${r.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${gt}.`),gt):e<0||e>1?(vn.diag.error(`OTEL_TRACES_SAMPLER_ARG=${r.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${gt}.`),gt):e}});var Oo=c(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.reconfigureLimits=St.mergeConfig=void 0;var fl=So(),Ao=S();function GE(r){let e={sampler:(0,fl.buildSamplerFromEnv)()},t=(0,fl.loadDefaultConfig)(),n=Object.assign({},t,e,r);return n.generalLimits=Object.assign({},t.generalLimits,r.generalLimits||{}),n.spanLimits=Object.assign({},t.spanLimits,r.spanLimits||{}),n}St.mergeConfig=GE;function VE(r){var e,t,n,i,s,o,a,u,l,_,E,O;let D=Object.assign({},r.spanLimits),z=(0,Ao.getEnvWithoutDefaults)();return D.attributeCountLimit=(o=(s=(i=(t=(e=r.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&t!==void 0?t:(n=r.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:z.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:z.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Ao.DEFAULT_ATTRIBUTE_COUNT_LIMIT,D.attributeValueLengthLimit=(O=(E=(_=(u=(a=r.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&u!==void 0?u:(l=r.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&_!==void 0?_:z.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&E!==void 0?E:z.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&O!==void 0?O:Ao.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},r,{spanLimits:D})}St.reconfigureLimits=VE});var El=c(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.BatchSpanProcessorBase=void 0;var At=(h(),f(d)),ze=S(),Ro=class{constructor(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let n=(0,ze.getEnv)();this._maxExportBatchSize=typeof t?.maxExportBatchSize=="number"?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof t?.maxQueueSize=="number"?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof t?.scheduledDelayMillis=="number"?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof t?.exportTimeoutMillis=="number"?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new ze.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(At.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&At.TraceFlags.SAMPLED&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&At.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(At.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],i=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let s=0,o=i;s<o;s++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(new Error("Timeout"))},this._exportTimeoutMillis);At.context.with((0,ze.suppressTracing)(At.context.active()),()=>{let i=this._finishedSpans.splice(0,this._maxExportBatchSize),s=()=>this._exporter.export(i,a=>{var u;clearTimeout(n),a.code===ze.ExportResultCode.SUCCESS?e():t((u=a.error)!==null&&u!==void 0?u:new Error("BatchSpanProcessor: span export failed"))}),o=i.map(a=>a.resource).filter(a=>a.asyncAttributesPending);o.length===0?s():Promise.all(o.map(a=>{var u;return(u=a.waitForAsyncAttributes)===null||u===void 0?void 0:u.call(a)})).then(s,a=>{(0,ze.globalErrorHandler)(a),t(a)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().then(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(t=>{this._isExporting=!1,(0,ze.globalErrorHandler)(t)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),(0,ze.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};In.BatchSpanProcessorBase=Ro});var ml=c(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.BatchSpanProcessor=void 0;var jE=El(),bo=class extends jE.BatchSpanProcessorBase{onShutdown(){}};Ln.BatchSpanProcessor=bo});var Sl=c(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.RandomIdGenerator=void 0;var FE=8,Tl=16,Po=class{constructor(){this.generateTraceId=gl(Tl),this.generateSpanId=gl(FE)}};Cn.RandomIdGenerator=Po;var Mn=Buffer.allocUnsafe(Tl);function gl(r){return function(){for(let t=0;t<r/4;t++)Mn.writeUInt32BE(Math.random()*2**32>>>0,t*4);for(let t=0;t<r&&!(Mn[t]>0);t++)t===r-1&&(Mn[r-1]=1);return Mn.toString("hex",0,r)}}});var Ol=c(Ce=>{"use strict";var HE=Ce&&Ce.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Al=Ce&&Ce.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&HE(e,r,t)};Object.defineProperty(Ce,"__esModule",{value:!0});Al(ml(),Ce);Al(Sl(),Ce)});var Nn=c(Ye=>{"use strict";var kE=Ye&&Ye.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),XE=Ye&&Ye.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&kE(e,r,t)};Object.defineProperty(Ye,"__esModule",{value:!0});XE(Ol(),Ye)});var Rl=c(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.Tracer=void 0;var F=(h(),f(d)),wn=S(),$E=co(),WE=Oo(),KE=Nn(),yo=class{constructor(e,t,n){this._tracerProvider=n;let i=(0,WE.mergeConfig)(t);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=t.idGenerator||new KE.RandomIdGenerator,this.resource=n.resource,this.instrumentationLibrary=e}startSpan(e,t={},n=F.context.active()){var i,s,o;t.root&&(n=F.trace.deleteSpan(n));let a=F.trace.getSpan(n);if((0,wn.isTracingSuppressed)(n))return F.diag.debug("Instrumentation suppressed, returning Noop Span"),F.trace.wrapSpanContext(F.INVALID_SPAN_CONTEXT);let u=a?.spanContext(),l=this._idGenerator.generateSpanId(),_,E,O;!u||!F.trace.isSpanContextValid(u)?_=this._idGenerator.generateTraceId():(_=u.traceId,E=u.traceState,O=u.spanId);let D=(i=t.kind)!==null&&i!==void 0?i:F.SpanKind.INTERNAL,z=((s=t.links)!==null&&s!==void 0?s:[]).map(dt=>({context:dt.context,attributes:(0,wn.sanitizeAttributes)(dt.attributes)})),I=(0,wn.sanitizeAttributes)(t.attributes),U=this._sampler.shouldSample(n,_,e,D,I,z);E=(o=U.traceState)!==null&&o!==void 0?o:E;let L=U.decision===F.SamplingDecision.RECORD_AND_SAMPLED?F.TraceFlags.SAMPLED:F.TraceFlags.NONE,m={traceId:_,spanId:l,traceFlags:L,traceState:E};if(U.decision===F.SamplingDecision.NOT_RECORD)return F.diag.debug("Recording is off, propagating context in a non-recording span"),F.trace.wrapSpanContext(m);let Pe=(0,wn.sanitizeAttributes)(Object.assign(I,U.attributes));return new $E.Span(this,n,e,m,D,O,z,t.startTime,void 0,Pe)}startActiveSpan(e,t,n,i){let s,o,a;if(arguments.length<2)return;arguments.length===2?a=t:arguments.length===3?(s=t,a=n):(s=t,o=n,a=i);let u=o??F.context.active(),l=this.startSpan(e,s,u),_=F.trace.setSpan(u,l);return F.context.with(_,a,void 0,l)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};xn.Tracer=yo});var bl=c(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.defaultServiceName=void 0;function zE(){return`unknown_service:${process.argv0}`}Dn.defaultServiceName=zE});var vo=c(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.normalizeType=Ot.normalizeArch=void 0;var YE=r=>{switch(r){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return r}};Ot.normalizeArch=YE;var QE=r=>{switch(r){case"sunos":return"solaris";case"win32":return"windows";default:return r}};Ot.normalizeType=QE});var Un=c(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.execAsync=void 0;var ZE=J("child_process"),JE=J("util");Bn.execAsync=JE.promisify(ZE.exec)});var Pl=c(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.getMachineId=void 0;var em=Un(),tm=(h(),f(d));async function rm(){try{let e=(await(0,em.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
8
+ `).find(n=>n.includes("IOPlatformUUID"));if(!e)return"";let t=e.split('" = "');if(t.length===2)return t[1].slice(0,-1)}catch(r){tm.diag.debug(`error reading machine id: ${r}`)}return""}qn.getMachineId=rm});var yl=c(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.getMachineId=void 0;var nm=J("fs"),im=(h(),f(d));async function sm(){let r=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of r)try{return(await nm.promises.readFile(e,{encoding:"utf8"})).trim()}catch(t){im.diag.debug(`error reading machine id: ${t}`)}return""}Gn.getMachineId=sm});var Il=c(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.getMachineId=void 0;var om=J("fs"),am=Un(),vl=(h(),f(d));async function um(){try{return(await om.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(r){vl.diag.debug(`error reading machine id: ${r}`)}try{return(await(0,am.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(r){vl.diag.debug(`error reading machine id: ${r}`)}return""}Vn.getMachineId=um});var Ml=c(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.getMachineId=void 0;var Ll=J("process"),cm=Un(),lm=(h(),f(d));async function dm(){let r="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";Ll.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Ll.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let n=(await(0,cm.execAsync)(`${e} ${r}`)).stdout.split("REG_SZ");if(n.length===2)return n[1].trim()}catch(t){lm.diag.debug(`error reading machine id: ${t}`)}return""}jn.getMachineId=dm});var Cl=c(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.getMachineId=void 0;var _m=(h(),f(d));async function hm(){return _m.diag.debug("could not read machine-id: unsupported platform"),""}Fn.getMachineId=hm});var Nl=c(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.getMachineId=void 0;var pm=J("process"),Rt;Se.getMachineId=Rt;switch(pm.platform){case"darwin":Se.getMachineId=Rt=Pl().getMachineId;break;case"linux":Se.getMachineId=Rt=yl().getMachineId;break;case"freebsd":Se.getMachineId=Rt=Il().getMachineId;break;case"win32":Se.getMachineId=Rt=Ml().getMachineId;break;default:Se.getMachineId=Rt=Cl().getMachineId}});var Mo=c(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.hostDetectorSync=void 0;var Io=ie(),fm=Qe(),wl=J("os"),Em=vo(),mm=Nl(),Lo=class{detect(e){let t={[Io.SemanticResourceAttributes.HOST_NAME]:(0,wl.hostname)(),[Io.SemanticResourceAttributes.HOST_ARCH]:(0,Em.normalizeArch)((0,wl.arch)())};return new fm.Resource(t,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,mm.getMachineId)().then(e=>{let t={};return e&&(t[Io.SemanticResourceAttributes.HOST_ID]=e),t})}};Hn.hostDetectorSync=new Lo});var xl=c(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.hostDetector=void 0;var gm=Mo(),Co=class{detect(e){return Promise.resolve(gm.hostDetectorSync.detect(e))}};kn.hostDetector=new Co});var wo=c(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.osDetectorSync=void 0;var Dl=ie(),Tm=Qe(),Bl=J("os"),Sm=vo(),No=class{detect(e){let t={[Dl.SemanticResourceAttributes.OS_TYPE]:(0,Sm.normalizeType)((0,Bl.platform)()),[Dl.SemanticResourceAttributes.OS_VERSION]:(0,Bl.release)()};return new Tm.Resource(t)}};Xn.osDetectorSync=new No});var Ul=c($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.osDetector=void 0;var Am=wo(),xo=class{detect(e){return Promise.resolve(Am.osDetectorSync.detect(e))}};$n.osDetector=new xo});var Bo=c(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.processDetectorSync=void 0;var Om=(h(),f(d)),Ae=ie(),Rm=Qe(),bm=J("os"),Do=class{detect(e){let t={[Ae.SemanticResourceAttributes.PROCESS_PID]:process.pid,[Ae.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title,[Ae.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]:process.execPath,[Ae.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Ae.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:process.versions.node,[Ae.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"nodejs",[Ae.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(t[Ae.SemanticResourceAttributes.PROCESS_COMMAND]=process.argv[1]);try{let n=bm.userInfo();t[Ae.SemanticResourceAttributes.PROCESS_OWNER]=n.username}catch(n){Om.diag.debug(`error obtaining process owner: ${n}`)}return new Rm.Resource(t)}};Wn.processDetectorSync=new Do});var ql=c(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.processDetector=void 0;var Pm=Bo(),Uo=class{detect(e){return Promise.resolve(Pm.processDetectorSync.detect(e))}};Kn.processDetector=new Uo});var Gl=c(te=>{"use strict";var ym=te&&te.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ze=te&&te.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ym(e,r,t)};Object.defineProperty(te,"__esModule",{value:!0});Ze(bl(),te);Ze(xl(),te);Ze(Ul(),te);Ze(Mo(),te);Ze(wo(),te);Ze(ql(),te);Ze(Bo(),te)});var qo=c(Je=>{"use strict";var vm=Je&&Je.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Im=Je&&Je.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&vm(e,r,t)};Object.defineProperty(Je,"__esModule",{value:!0});Im(Gl(),Je)});var Qe=c(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.Resource=void 0;var Vl=(h(),f(d)),et=ie(),Go=S(),Lm=qo(),Er=class r{constructor(e,t){var n;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(n=this._attributes)!==null&&n!==void 0?n:{},this._asyncAttributesPromise=t?.then(i=>(this._attributes=Object.assign({},this._attributes,i),this.asyncAttributesPending=!1,i),i=>(Vl.diag.debug("a resource's async attributes promise rejected: %s",i),this.asyncAttributesPending=!1,{}))}static empty(){return r.EMPTY}static default(){return new r({[et.SemanticResourceAttributes.SERVICE_NAME]:(0,Lm.defaultServiceName)(),[et.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:Go.SDK_INFO[et.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],[et.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:Go.SDK_INFO[et.SemanticResourceAttributes.TELEMETRY_SDK_NAME],[et.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Go.SDK_INFO[et.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]})}get attributes(){var e;return this.asyncAttributesPending&&Vl.diag.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(e){var t;if(!e)return this;let n=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new r(n);let i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([s,o])=>{var a;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),s),(a=e._syncAttributes)!==null&&a!==void 0?a:e.attributes),o)});return new r(n,i)}};zn.Resource=Er;Er.EMPTY=new Er({})});var Fl=c(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0})});var kl=c(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0})});var $l=c(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0})});var Wl=c(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.browserDetector=void 0;var Mm=tt(),Vo=class{detect(e){return Promise.resolve(Mm.browserDetectorSync.detect(e))}};Yn.browserDetector=new Vo});var Fo=c(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.envDetectorSync=void 0;var Cm=(h(),f(d)),Nm=S(),wm=ie(),xm=Qe(),jo=class{constructor(){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."}detect(e){let t={},n=(0,Nm.getEnv)(),i=n.OTEL_RESOURCE_ATTRIBUTES,s=n.OTEL_SERVICE_NAME;if(i)try{let o=this._parseResourceAttributes(i);Object.assign(t,o)}catch(o){Cm.diag.debug(`EnvDetector failed: ${o.message}`)}return s&&(t[wm.SemanticResourceAttributes.SERVICE_NAME]=s),new xm.Resource(t)}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR,-1);for(let i of n){let s=i.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(s.length!==2)continue;let[o,a]=s;if(o=o.trim(),a=a.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(o))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(a))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[o]=decodeURIComponent(a)}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<33||n===44||n===59||n===92||n>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}};Qn.envDetectorSync=new jo});var Kl=c(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.envDetector=void 0;var Dm=Fo(),Ho=class{detect(e){return Promise.resolve(Dm.envDetectorSync.detect(e))}};Zn.envDetector=new Ho});var zl=c(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.browserDetectorSync=void 0;var Jn=ie(),ko=tt(),Bm=(h(),f(d)),Xo=class{detect(e){if(!(typeof navigator<"u"))return ko.Resource.empty();let n={[Jn.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[Jn.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[Jn.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(n,e)}_getResourceAttributes(e,t){return e[Jn.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]===""?(Bm.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),ko.Resource.empty()):new ko.Resource(Object.assign({},e))}};ei.browserDetectorSync=new Xo});var Yl=c(Ee=>{"use strict";var Um=Ee&&Ee.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),ti=Ee&&Ee.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Um(e,r,t)};Object.defineProperty(Ee,"__esModule",{value:!0});ti(Wl(),Ee);ti(Kl(),Ee);ti(zl(),Ee);ti(Fo(),Ee)});var Ql=c(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.isPromiseLike=void 0;var qm=r=>r!==null&&typeof r=="object"&&typeof r.then=="function";ri.isPromiseLike=qm});var Jl=c(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.detectResourcesSync=Pt.detectResources=void 0;var mr=Qe(),bt=(h(),f(d)),Gm=Ql(),Vm=async(r={})=>{let e=await Promise.all((r.detectors||[]).map(async t=>{try{let n=await t.detect(r);return bt.diag.debug(`${t.constructor.name} found resource.`,n),n}catch(n){return bt.diag.debug(`${t.constructor.name} failed: ${n.message}`),mr.Resource.empty()}}));return Zl(e),e.reduce((t,n)=>t.merge(n),mr.Resource.empty())};Pt.detectResources=Vm;var jm=(r={})=>{var e;let t=((e=r.detectors)!==null&&e!==void 0?e:[]).map(i=>{try{let s=i.detect(r),o;if((0,Gm.isPromiseLike)(s)){let a=async()=>(await s).attributes;o=new mr.Resource({},a())}else o=s;return o.waitForAsyncAttributes?o.waitForAsyncAttributes().then(()=>bt.diag.debug(`${i.constructor.name} found resource.`,o)):bt.diag.debug(`${i.constructor.name} found resource.`,o),o}catch(s){return bt.diag.error(`${i.constructor.name} failed: ${s.message}`),mr.Resource.empty()}}),n=t.reduce((i,s)=>i.merge(s),mr.Resource.empty());return n.waitForAsyncAttributes&&n.waitForAsyncAttributes().then(()=>{Zl(t)}),n};Pt.detectResourcesSync=jm;var Zl=r=>{r.forEach(e=>{if(Object.keys(e.attributes).length>0){let t=JSON.stringify(e.attributes,null,4);bt.diag.verbose(t)}})}});var tt=c(re=>{"use strict";var Fm=re&&re.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),rt=re&&re.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Fm(e,r,t)};Object.defineProperty(re,"__esModule",{value:!0});rt(Qe(),re);rt(Fl(),re);rt(qo(),re);rt(kl(),re);rt($l(),re);rt(Yl(),re);rt(Jl(),re)});var ed=c(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.MultiSpanProcessor=void 0;var Hm=S(),$o=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(n=>{(0,Hm.globalErrorHandler)(n||new Error("MultiSpanProcessor: forceFlush failed")),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}};ni.MultiSpanProcessor=$o});var Ko=c(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.NoopSpanProcessor=void 0;var Wo=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};ii.NoopSpanProcessor=Wo});var rd=c(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.BasicTracerProvider=nt.ForceFlushState=void 0;var yt=(h(),f(d)),It=S(),td=tt(),km=zo(),Xm=So(),$m=ed(),Wm=Ko(),Km=Nn(),zm=Oo(),vt;(function(r){r[r.resolved=0]="resolved",r[r.timeout=1]="timeout",r[r.error=2]="error",r[r.unresolved=3]="unresolved"})(vt=nt.ForceFlushState||(nt.ForceFlushState={}));var gr=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let n=(0,It.merge)({},(0,Xm.loadDefaultConfig)(),(0,zm.reconfigureLimits)(e));this.resource=(t=n.resource)!==null&&t!==void 0?t:td.Resource.empty(),this.resource=td.Resource.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});let i=this._buildExporterFromEnv();if(i!==void 0){let s=new Km.BatchSpanProcessor(i);this.activeSpanProcessor=s}else this.activeSpanProcessor=new Wm.NoopSpanProcessor}getTracer(e,t,n){let i=`${e}@${t||""}:${n?.schemaUrl||""}`;return this._tracers.has(i)||this._tracers.set(i,new km.Tracer({name:e,version:t,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(i)}addSpanProcessor(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(t=>yt.diag.error("Error while trying to shutdown current span processor",t)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new $m.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){yt.trace.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&yt.context.setGlobalContextManager(e.contextManager),e.propagator&&yt.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map(n=>new Promise(i=>{let s,o=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${e} ms`)),s=vt.timeout},e);n.forceFlush().then(()=>{clearTimeout(o),s!==vt.timeout&&(s=vt.resolved,i(s))}).catch(a=>{clearTimeout(o),s=vt.error,i(a)})}));return new Promise((n,i)=>{Promise.all(t).then(s=>{let o=s.filter(a=>a!==vt.resolved);o.length>0?i(o):n()}).catch(s=>i([s]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return(t=this.constructor._registeredPropagators.get(e))===null||t===void 0?void 0:t()}_getSpanExporter(e){var t;return(t=this.constructor._registeredExporters.get(e))===null||t===void 0?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set((0,It.getEnv)().OTEL_PROPAGATORS)),n=e.map(i=>{let s=this._getPropagator(i);return s||yt.diag.warn(`Propagator "${i}" requested through environment variable is unavailable.`),s}).reduce((i,s)=>(s&&i.push(s),i),[]);if(n.length!==0)return e.length===1?n[0]:new It.CompositePropagator({propagators:n})}_buildExporterFromEnv(){let e=(0,It.getEnv)().OTEL_TRACES_EXPORTER;if(e==="none"||e==="")return;let t=this._getSpanExporter(e);return t||yt.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};nt.BasicTracerProvider=gr;gr._registeredPropagators=new Map([["tracecontext",()=>new It.W3CTraceContextPropagator],["baggage",()=>new It.W3CBaggagePropagator]]);gr._registeredExporters=new Map});var nd=c(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.ConsoleSpanExporter=void 0;var Yo=S(),Qo=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){var t;return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(t=e.spanContext().traceState)===null||t===void 0?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,Yo.hrTimeToMicroseconds)(e.startTime),duration:(0,Yo.hrTimeToMicroseconds)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,t){for(let n of e)console.dir(this._exportInfo(n),{depth:3});if(t)return t({code:Yo.ExportResultCode.SUCCESS})}};si.ConsoleSpanExporter=Qo});var sd=c(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.InMemorySpanExporter=void 0;var id=S(),Zo=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:id.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>t({code:id.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};oi.InMemorySpanExporter=Zo});var ad=c(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0})});var ud=c(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.SimpleSpanProcessor=void 0;var Ym=(h(),f(d)),Lt=S(),Jo=class{constructor(e){this._exporter=e,this._shutdownOnce=new Lt.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,t){}onEnd(e){var t,n;if(this._shutdownOnce.isCalled||!(e.spanContext().traceFlags&Ym.TraceFlags.SAMPLED))return;let i=()=>Lt.internal._export(this._exporter,[e]).then(s=>{var o;s.code!==Lt.ExportResultCode.SUCCESS&&(0,Lt.globalErrorHandler)((o=s.error)!==null&&o!==void 0?o:new Error(`SimpleSpanProcessor: span export failed (status ${s})`))}).catch(s=>{(0,Lt.globalErrorHandler)(s)});if(e.resource.asyncAttributesPending){let s=(n=(t=e.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(t).then(()=>(s!=null&&this._unresolvedExports.delete(s),i()),o=>(0,Lt.globalErrorHandler)(o));s!=null&&this._unresolvedExports.add(s)}else i()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};ai.SimpleSpanProcessor=Jo});var ld=c(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0})});var _d=c(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0})});var pd=c(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0})});var Ed=c(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0})});var gd=c(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0})});var zo=c(v=>{"use strict";var Qm=v&&v.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),B=v&&v.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Qm(e,r,t)};Object.defineProperty(v,"__esModule",{value:!0});B(Rl(),v);B(rd(),v);B(Nn(),v);B(nd(),v);B(sd(),v);B(ad(),v);B(ud(),v);B(ld(),v);B(Ko(),v);B(An(),v);B(Rn(),v);B(fo(),v);B(mo(),v);B(fr(),v);B(co(),v);B(_d(),v);B(pd(),v);B(Ed(),v);B(gd(),v)});var it={};import*as DR from"@opentelemetry/api-logs";var ea=Ku(()=>{ht(it,DR)});var Sd=c(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.disableInstrumentations=Ne.enableInstrumentations=Ne.parseInstrumentationOptions=void 0;function Td(r=[]){let e=[];for(let t=0,n=r.length;t<n;t++){let i=r[t];if(Array.isArray(i)){let s=Td(i);e=e.concat(s.instrumentations)}else typeof i=="function"?e.push(new i):i.instrumentationName&&e.push(i)}return{instrumentations:e}}Ne.parseInstrumentationOptions=Td;function Zm(r,e,t){for(let n=0,i=r.length;n<i;n++){let s=r[n];e&&s.setTracerProvider(e),t&&s.setMeterProvider(t),s.getConfig().enabled||s.enable()}}Ne.enableInstrumentations=Zm;function Jm(r){r.forEach(e=>e.disable())}Ne.disableInstrumentations=Jm});var Od=c(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.registerInstrumentations=void 0;var Ad=(h(),f(d)),ta=Sd();function eg(r){let{instrumentations:e}=(0,ta.parseInstrumentationOptions)(r.instrumentations),t=r.tracerProvider||Ad.trace.getTracerProvider(),n=r.meterProvider||Ad.metrics.getMeterProvider();return(0,ta.enableInstrumentations)(e,t,n),()=>{(0,ta.disableInstrumentations)(e)}}ui.registerInstrumentations=eg});var na=c(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.LogRecord=void 0;var tg=(h(),f(d)),Tr=(h(),f(d)),ci=S(),ra=class{constructor(e,t,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:i,observedTimestamp:s,severityNumber:o,severityText:a,body:u,attributes:l={},context:_}=n,E=Date.now();if(this.hrTime=(0,ci.timeInputToHrTime)(i??E),this.hrTimeObserved=(0,ci.timeInputToHrTime)(s??E),_){let O=Tr.trace.getSpanContext(_);O&&Tr.isSpanContextValid(O)&&(this.spanContext=O)}this.severityNumber=o,this.severityText=a,this.body=u,this.resource=e.resource,this.instrumentationScope=t,this._logRecordLimits=e.logRecordLimits,this.setAttributes(l)}set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}setAttribute(e,t){return this._isLogRecordReadonly()?this:t===null?this:e.length===0?(Tr.diag.warn(`Invalid attribute key: ${e}`),this):!(0,ci.isAttributeValue)(t)&&!(typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0)?(Tr.diag.warn(`Invalid attribute value set for key: ${e}`),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?this:((0,ci.isAttributeValue)(t)?this.attributes[e]=this._truncateToSize(t):this.attributes[e]=t,this))}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}setBody(e){return this.body=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){let t=this._logRecordLimits.attributeValueLengthLimit;return t<=0?(Tr.diag.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,t):n):e}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_isLogRecordReadonly(){return this._isReadonly&&tg.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};li.LogRecord=ra});var Rd=c(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.Logger=void 0;var rg=(h(),f(d)),ng=na(),ia=class{constructor(e,t){this.instrumentationScope=e,this._sharedState=t}emit(e){let t=e.context||rg.context.active(),n=new ng.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:t},e));this._sharedState.activeProcessor.onEmit(n,t),n._makeReadonly()}};di.Logger=ia});var bd=c(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.reconfigureLimits=Mt.loadDefaultConfig=void 0;var Sr=S();function ig(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Sr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,Sr.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}Mt.loadDefaultConfig=ig;function sg(r){var e,t,n,i,s,o;let a=(0,Sr.getEnvWithoutDefaults)();return{attributeCountLimit:(n=(t=(e=r.attributeCountLimit)!==null&&e!==void 0?e:a.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:a.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:Sr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(o=(s=(i=r.attributeValueLengthLimit)!==null&&i!==void 0?i:a.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&s!==void 0?s:a.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&o!==void 0?o:Sr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}Mt.reconfigureLimits=sg});var Pd=c(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.MultiLogRecordProcessor=void 0;var og=S(),sa=class{constructor(e,t){this.processors=e,this.forceFlushTimeoutMillis=t}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(t=>(0,og.callWithTimeout)(t.forceFlush(),e)))}onEmit(e,t){this.processors.forEach(n=>n.onEmit(e,t))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}};_i.MultiLogRecordProcessor=sa});var aa=c(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.NoopLogRecordProcessor=void 0;var oa=class{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}};hi.NoopLogRecordProcessor=oa});var yd=c(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.LoggerProviderSharedState=void 0;var ag=aa(),ua=class{constructor(e,t,n){this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new ag.NoopLogRecordProcessor}};pi.LoggerProviderSharedState=ua});var Ld=c(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.LoggerProvider=st.DEFAULT_LOGGER_NAME=void 0;var Ar=(h(),f(d)),ug=(ea(),f(it)),cg=tt(),vd=S(),lg=Rd(),Id=bd(),dg=Pd(),_g=yd();st.DEFAULT_LOGGER_NAME="unknown";var ca=class{constructor(e={}){let{resource:t=cg.Resource.default(),logRecordLimits:n,forceFlushTimeoutMillis:i}=(0,vd.merge)({},(0,Id.loadDefaultConfig)(),e);this._sharedState=new _g.LoggerProviderSharedState(t,i,(0,Id.reconfigureLimits)(n)),this._shutdownOnce=new vd.BindOnceFuture(this._shutdown,this)}getLogger(e,t,n){if(this._shutdownOnce.isCalled)return Ar.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),ug.NOOP_LOGGER;e||Ar.diag.warn("Logger requested without instrumentation scope name.");let i=e||st.DEFAULT_LOGGER_NAME,s=`${i}@${t||""}:${n?.schemaUrl||""}`;return this._sharedState.loggers.has(s)||this._sharedState.loggers.set(s,new lg.Logger({name:i,version:t,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(s)}addLogRecordProcessor(e){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(t=>Ar.diag.error("Error while trying to shutdown current log record processor",t)),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new dg.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(Ar.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(Ar.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};st.LoggerProvider=ca});var Md=c(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.ConsoleLogRecordExporter=void 0;var hg=S(),pg=S(),la=class{export(e,t){this._sendLogRecords(e,t)}shutdown(){return Promise.resolve()}_exportInfo(e){var t,n,i;return{timestamp:(0,hg.hrTimeToMicroseconds)(e.hrTime),traceId:(t=e.spanContext)===null||t===void 0?void 0:t.traceId,spanId:(n=e.spanContext)===null||n===void 0?void 0:n.spanId,traceFlags:(i=e.spanContext)===null||i===void 0?void 0:i.traceFlags,severityText:e.severityText,severityNumber:e.severityNumber,body:e.body,attributes:e.attributes}}_sendLogRecords(e,t){for(let n of e)console.dir(this._exportInfo(n),{depth:3});t?.({code:pg.ExportResultCode.SUCCESS})}};fi.ConsoleLogRecordExporter=la});var Cd=c(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.SimpleLogRecordProcessor=void 0;var da=S(),_a=class{constructor(e){this._exporter=e,this._shutdownOnce=new da.BindOnceFuture(this._shutdown,this)}onEmit(e){this._shutdownOnce.isCalled||this._exporter.export([e],t=>{var n;if(t.code!==da.ExportResultCode.SUCCESS){(0,da.globalErrorHandler)((n=t.error)!==null&&n!==void 0?n:new Error(`SimpleLogRecordProcessor: log record export failed (status ${t})`));return}})}forceFlush(){return Promise.resolve()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};Ei.SimpleLogRecordProcessor=_a});var wd=c(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.InMemoryLogRecordExporter=void 0;var Nd=S(),ha=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:Nd.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...e),t({code:Nd.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};mi.InMemoryLogRecordExporter=ha});var xd=c(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.BatchLogRecordProcessorBase=void 0;var fg=(h(),f(d)),Ct=S(),pa=class{constructor(e,t){var n,i,s,o;this._exporter=e,this._finishedLogRecords=[];let a=(0,Ct.getEnv)();this._maxExportBatchSize=(n=t?.maxExportBatchSize)!==null&&n!==void 0?n:a.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(i=t?.maxQueueSize)!==null&&i!==void 0?i:a.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(s=t?.scheduledDelayMillis)!==null&&s!==void 0?s:a.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(o=t?.exportTimeoutMillis)!==null&&o!==void 0?o:a.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new Ct.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(fg.diag.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}onEmit(e){this._shutdownOnce.isCalled||this._addToBuffer(e)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())}_flushAll(){return new Promise((e,t)=>{let n=[],i=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let s=0;s<i;s++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((e,t)=>{(0,Ct.callWithTimeout)(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>e()).catch(t)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{(0,Ct.globalErrorHandler)(e)})},this._scheduledDelayMillis),(0,Ct.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(e){return new Promise((t,n)=>{this._exporter.export(e,i=>{var s;if(i.code!==Ct.ExportResultCode.SUCCESS){n((s=i.error)!==null&&s!==void 0?s:new Error(`BatchLogRecordProcessorBase: log record export failed (status ${i})`));return}t(i)})})}};gi.BatchLogRecordProcessorBase=pa});var Dd=c(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.BatchLogRecordProcessor=void 0;var Eg=xd(),fa=class extends Eg.BatchLogRecordProcessorBase{onShutdown(){}};Ti.BatchLogRecordProcessor=fa});var Bd=c(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.BatchLogRecordProcessor=void 0;var mg=Dd();Object.defineProperty(Si,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return mg.BatchLogRecordProcessor}})});var Ud=c(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.BatchLogRecordProcessor=void 0;var gg=Bd();Object.defineProperty(Ai,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return gg.BatchLogRecordProcessor}})});var qd=c(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.BatchLogRecordProcessor=W.InMemoryLogRecordExporter=W.SimpleLogRecordProcessor=W.ConsoleLogRecordExporter=W.NoopLogRecordProcessor=W.LogRecord=W.LoggerProvider=void 0;var Tg=Ld();Object.defineProperty(W,"LoggerProvider",{enumerable:!0,get:function(){return Tg.LoggerProvider}});var Sg=na();Object.defineProperty(W,"LogRecord",{enumerable:!0,get:function(){return Sg.LogRecord}});var Ag=aa();Object.defineProperty(W,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return Ag.NoopLogRecordProcessor}});var Og=Md();Object.defineProperty(W,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return Og.ConsoleLogRecordExporter}});var Rg=Cd();Object.defineProperty(W,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Rg.SimpleLogRecordProcessor}});var bg=wd();Object.defineProperty(W,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return bg.InMemoryLogRecordExporter}});var Pg=Ud();Object.defineProperty(W,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Pg.BatchLogRecordProcessor}})});var Oi=c(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.AggregationTemporality=void 0;var yg;(function(r){r[r.DELTA=0]="DELTA",r[r.CUMULATIVE=1]="CUMULATIVE"})(yg=Or.AggregationTemporality||(Or.AggregationTemporality={}))});var Nt=c(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.DataPointType=void 0;var vg;(function(r){r[r.HISTOGRAM=0]="HISTOGRAM",r[r.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",r[r.GAUGE=2]="GAUGE",r[r.SUM=3]="SUM"})(vg=Rr.DataPointType||(Rr.DataPointType={}))});var me=c(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.equalsCaseInsensitive=M.binarySearchLB=M.setEquals=M.FlatMap=M.isPromiseAllSettledRejectionResult=M.PromiseAllSettled=M.callWithTimeout=M.TimeoutError=M.instrumentationScopeId=M.hashAttributes=M.isNotNullish=void 0;function Ig(r){return r!=null}M.isNotNullish=Ig;function Lg(r){let e=Object.keys(r);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(t=>[t,r[t]])))}M.hashAttributes=Lg;function Mg(r){var e,t;return`${r.name}:${(e=r.version)!==null&&e!==void 0?e:""}:${(t=r.schemaUrl)!==null&&t!==void 0?t:""}`}M.instrumentationScopeId=Mg;var Ri=class r extends Error{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype)}};M.TimeoutError=Ri;function Cg(r,e){let t,n=new Promise(function(s,o){t=setTimeout(function(){o(new Ri("Operation timed out."))},e)});return Promise.race([r,n]).then(i=>(clearTimeout(t),i),i=>{throw clearTimeout(t),i})}M.callWithTimeout=Cg;async function Ng(r){return Promise.all(r.map(async e=>{try{return{status:"fulfilled",value:await e}}catch(t){return{status:"rejected",reason:t}}}))}M.PromiseAllSettled=Ng;function wg(r){return r.status==="rejected"}M.isPromiseAllSettledRejectionResult=wg;function xg(r,e){let t=[];return r.forEach(n=>{t.push(...e(n))}),t}M.FlatMap=xg;function Dg(r,e){if(r.size!==e.size)return!1;for(let t of r)if(!e.has(t))return!1;return!0}M.setEquals=Dg;function Bg(r,e){let t=0,n=r.length-1;for(;n-t>1;){let i=Math.trunc((n+t)/2);r[i]<=e?t=i:n=i-1}return r[n]<=e?n:r[t]<=e?t:-1}M.binarySearchLB=Bg;function Ug(r,e){return r.toLowerCase()===e.toLowerCase()}M.equalsCaseInsensitive=Ug});var wt=c(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.AggregatorKind=void 0;var qg;(function(r){r[r.DROP=0]="DROP",r[r.SUM=1]="SUM",r[r.LAST_VALUE=2]="LAST_VALUE",r[r.HISTOGRAM=3]="HISTOGRAM",r[r.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(qg=br.AggregatorKind||(br.AggregatorKind={}))});var Gd=c(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.DropAggregator=void 0;var Gg=wt(),Ea=class{constructor(){this.kind=Gg.AggregatorKind.DROP}createAccumulation(){}merge(e,t){}diff(e,t){}toMetricData(e,t,n,i){}};bi.DropAggregator=Ea});var Oe=c(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.isValidName=ne.isDescriptorCompatibleWith=ne.createInstrumentDescriptorWithView=ne.createInstrumentDescriptor=ne.InstrumentType=void 0;var Vd=(h(),f(d)),Vg=me(),jg;(function(r){r.COUNTER="COUNTER",r.HISTOGRAM="HISTOGRAM",r.UP_DOWN_COUNTER="UP_DOWN_COUNTER",r.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",r.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",r.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(jg=ne.InstrumentType||(ne.InstrumentType={}));function Fg(r,e,t){var n,i,s,o;return jd(r)||Vd.diag.warn(`Invalid metric name: "${r}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:r,type:e,description:(n=t?.description)!==null&&n!==void 0?n:"",unit:(i=t?.unit)!==null&&i!==void 0?i:"",valueType:(s=t?.valueType)!==null&&s!==void 0?s:Vd.ValueType.DOUBLE,advice:(o=t?.advice)!==null&&o!==void 0?o:{}}}ne.createInstrumentDescriptor=Fg;function Hg(r,e){var t,n;return{name:(t=r.name)!==null&&t!==void 0?t:e.name,description:(n=r.description)!==null&&n!==void 0?n:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}ne.createInstrumentDescriptorWithView=Hg;function kg(r,e){return(0,Vg.equalsCaseInsensitive)(r.name,e.name)&&r.unit===e.unit&&r.type===e.type&&r.valueType===e.valueType}ne.isDescriptorCompatibleWith=kg;var Xg=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function jd(r){return r.match(Xg)!=null}ne.isValidName=jd});var Fd=c(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.HistogramAggregator=Dt.HistogramAccumulation=void 0;var $g=wt(),Wg=Nt(),ma=Oe(),Kg=me();function zg(r){let e=r.map(()=>0);return e.push(0),{buckets:{boundaries:r,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var xt=class{constructor(e,t,n=!0,i=zg(t)){this.startTime=e,this._boundaries=t,this._recordMinMax=n,this._current=i}record(e){this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);let t=(0,Kg.binarySearchLB)(this._boundaries,e);this._current.buckets.counts[t+1]+=1}setStartTime(e){this.startTime=e}toPointValue(){return this._current}};Dt.HistogramAccumulation=xt;var ga=class{constructor(e,t){this._boundaries=e,this._recordMinMax=t,this.kind=$g.AggregatorKind.HISTOGRAM}createAccumulation(e){return new xt(e,this._boundaries,this._recordMinMax)}merge(e,t){let n=e.toPointValue(),i=t.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,a=new Array(s.length);for(let _=0;_<s.length;_++)a[_]=s[_]+o[_];let u=1/0,l=-1/0;return this._recordMinMax&&(n.hasMinMax&&i.hasMinMax?(u=Math.min(n.min,i.min),l=Math.max(n.max,i.max)):n.hasMinMax?(u=n.min,l=n.max):i.hasMinMax&&(u=i.min,l=i.max)),new xt(e.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:n.count+i.count,sum:n.sum+i.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||i.hasMinMax),min:u,max:l})}diff(e,t){let n=e.toPointValue(),i=t.toPointValue(),s=n.buckets.counts,o=i.buckets.counts,a=new Array(s.length);for(let u=0;u<s.length;u++)a[u]=o[u]-s[u];return new xt(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:i.count-n.count,sum:i.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(e,t,n,i){return{descriptor:e,aggregationTemporality:t,dataPointType:Wg.DataPointType.HISTOGRAM,dataPoints:n.map(([s,o])=>{let a=o.toPointValue(),u=e.type===ma.InstrumentType.UP_DOWN_COUNTER||e.type===ma.InstrumentType.OBSERVABLE_GAUGE||e.type===ma.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:s,startTime:o.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:u?void 0:a.sum,buckets:a.buckets,count:a.count}}})}}};Dt.HistogramAggregator=ga});var Hd=c(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.Buckets=void 0;var Ta=class r{constructor(e=new Sa,t=0,n=0,i=0){this.backing=e,this.indexBase=t,this.indexStart=n,this.indexEnd=i}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(e,t)=>this.at(t))}at(e){let t=this.indexBase-this.indexStart;return e<t&&(e+=this.backing.length),e-=t,this.backing.countAt(e)}incrementBucket(e,t){this.backing.increment(e,t)}decrementBucket(e,t){this.backing.decrement(e,t)}trim(){for(let e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()}downscale(e){this._rotate();let t=1+this.indexEnd-this.indexStart,n=1<<e,i=0,s=0;for(let o=this.indexStart;o<=this.indexEnd;){let a=o%n;a<0&&(a+=n);for(let u=a;u<n&&i<t;u++)this._relocateBucket(s,i),i++,o++;s++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}clone(){return new r(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)}_relocateBucket(e,t){e!==t&&this.incrementBucket(e,this.backing.emptyBucket(t))}};Pi.Buckets=Ta;var Sa=class r{constructor(e=[0]){this._counts=e}get length(){return this._counts.length}countAt(e){return this._counts[e]}growTo(e,t,n){let i=new Array(e).fill(0);i.splice(n,this._counts.length-t,...this._counts.slice(t)),i.splice(0,t,...this._counts.slice(0,t)),this._counts=i}reverse(e,t){let n=Math.floor((e+t)/2)-e;for(let i=0;i<n;i++){let s=this._counts[e+i];this._counts[e+i]=this._counts[t-i-1],this._counts[t-i-1]=s}}emptyBucket(e){let t=this._counts[e];return this._counts[e]=0,t}increment(e,t){this._counts[e]+=t}decrement(e,t){this._counts[e]>=t?this._counts[e]-=t:this._counts[e]=0}clone(){return new r([...this._counts])}}});var Oa=c(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.getSignificand=Y.getNormalBase2=Y.MIN_VALUE=Y.MAX_NORMAL_EXPONENT=Y.MIN_NORMAL_EXPONENT=Y.SIGNIFICAND_WIDTH=void 0;Y.SIGNIFICAND_WIDTH=52;var Yg=2146435072,Qg=1048575,Aa=1023;Y.MIN_NORMAL_EXPONENT=-Aa+1;Y.MAX_NORMAL_EXPONENT=Aa;Y.MIN_VALUE=Math.pow(2,-1022);function Zg(r){let e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,r),((e.getUint32(0)&Yg)>>20)-Aa}Y.getNormalBase2=Zg;function Jg(r){let e=new DataView(new ArrayBuffer(8));e.setFloat64(0,r);let t=e.getUint32(0),n=e.getUint32(4);return(t&Qg)*Math.pow(2,32)+n}Y.getSignificand=Jg});var yi=c(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.nextGreaterSquare=Bt.ldexp=void 0;function eT(r,e){return r===0||r===Number.POSITIVE_INFINITY||r===Number.NEGATIVE_INFINITY||Number.isNaN(r)?r:r*Math.pow(2,e)}Bt.ldexp=eT;function tT(r){return r--,r|=r>>1,r|=r>>2,r|=r>>4,r|=r>>8,r|=r>>16,r++,r}Bt.nextGreaterSquare=tT});var Ii=c(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.MappingError=void 0;var Ra=class extends Error{};vi.MappingError=Ra});var Xd=c(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.ExponentMapping=void 0;var Ut=Oa(),rT=yi(),kd=Ii(),ba=class{constructor(e){this._shift=-e}mapToIndex(e){if(e<Ut.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let t=Ut.getNormalBase2(e),n=this._rightShift(Ut.getSignificand(e)-1,Ut.SIGNIFICAND_WIDTH);return t+n>>this._shift}lowerBoundary(e){let t=this._minNormalLowerBoundaryIndex();if(e<t)throw new kd.MappingError(`underflow: ${e} is < minimum lower boundary: ${t}`);let n=this._maxNormalLowerBoundaryIndex();if(e>n)throw new kd.MappingError(`overflow: ${e} is > maximum lower boundary: ${n}`);return rT.ldexp(1,e<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let e=Ut.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&e--,e}_maxNormalLowerBoundaryIndex(){return Ut.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(e,t){return Math.floor(e*Math.pow(2,-t))}};Li.ExponentMapping=ba});var Kd=c(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.LogarithmMapping=void 0;var qt=Oa(),$d=yi(),Wd=Ii(),Pa=class{constructor(e){this._scale=e,this._scaleFactor=$d.ldexp(Math.LOG2E,e),this._inverseFactor=$d.ldexp(Math.LN2,-e)}mapToIndex(e){if(e<=qt.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(qt.getSignificand(e)===0)return(qt.getNormalBase2(e)<<this._scale)-1;let t=Math.floor(Math.log(e)*this._scaleFactor),n=this._maxNormalLowerBoundaryIndex();return t>=n?n:t}lowerBoundary(e){let t=this._maxNormalLowerBoundaryIndex();if(e>=t){if(e===t)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new Wd.MappingError(`overflow: ${e} is > maximum lower boundary: ${t}`)}let n=this._minNormalLowerBoundaryIndex();if(e<=n){if(e===n)return qt.MIN_VALUE;if(e===n-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new Wd.MappingError(`overflow: ${e} is < minimum lower boundary: ${n}`)}return Math.exp(e*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return qt.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(qt.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};Mi.LogarithmMapping=Pa});var Qd=c(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.getMapping=void 0;var nT=Xd(),iT=Kd(),sT=Ii(),zd=-10,Yd=20,oT=Array.from({length:31},(r,e)=>e>10?new iT.LogarithmMapping(e-10):new nT.ExponentMapping(e-10));function aT(r){if(r>Yd||r<zd)throw new sT.MappingError(`expected scale >= ${zd} && <= ${Yd}, got: ${r}`);return oT[r+10]}Ci.getMapping=aT});var e_=c(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.ExponentialHistogramAggregator=Vt.ExponentialHistogramAccumulation=void 0;var uT=wt(),cT=Nt(),lT=(h(),f(d)),ya=Oe(),Zd=Hd(),Jd=Qd(),dT=yi(),Gt=class r{constructor(e,t){this.low=e,this.high=t}static combine(e,t){return new r(Math.min(e.low,t.low),Math.max(e.high,t.high))}},_T=20,hT=160,va=2,Ni=class r{constructor(e=e,t=hT,n=!0,i=0,s=0,o=0,a=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,l=new Zd.Buckets,_=new Zd.Buckets,E=(0,Jd.getMapping)(_T)){this.startTime=e,this._maxSize=t,this._recordMinMax=n,this._sum=i,this._count=s,this._zeroCount=o,this._min=a,this._max=u,this._positive=l,this._negative=_,this._mapping=E,this._maxSize<va&&(lT.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${va}`),this._maxSize=va)}record(e){this.updateByIncrement(e,1)}setStartTime(e){this.startTime=e}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(e,t){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=t,e===0){this._zeroCount+=t;return}this._sum+=e*t,e>0?this._updateBuckets(this._positive,e,t):this._updateBuckets(this._negative,-e,t)}merge(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;let t=this._minScale(e);this._downscale(this.scale-t),this._mergeBuckets(this.positive,e,e.positive,t),this._mergeBuckets(this.negative,e,e.negative,t)}diff(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;let t=this._minScale(e);this._downscale(this.scale-t),this._diffBuckets(this.positive,e,e.positive,t),this._diffBuckets(this.negative,e,e.negative,t)}clone(){return new r(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(e,t,n){let i=this._mapping.mapToIndex(t),s=!1,o=0,a=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this._maxSize?(s=!0,a=i,o=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this._maxSize&&(s=!0,a=e.indexStart,o=i),s){let u=this._changeScale(o,a);this._downscale(u),i=this._mapping.mapToIndex(t)}this._incrementIndexBy(e,i,n)}_incrementIndexBy(e,t,n){if(n===0)return;if(t<e.indexStart){let s=e.indexEnd-t;s>=e.backing.length&&this._grow(e,s+1),e.indexStart=t}else if(t>e.indexEnd){let s=t-e.indexStart;s>=e.backing.length&&this._grow(e,s+1),e.indexEnd=t}let i=t-e.indexBase;i<0&&(i+=e.backing.length),e.incrementBucket(i,n)}_grow(e,t){let n=e.backing.length,i=e.indexBase-e.indexStart,s=n-i,o=(0,dT.nextGreaterSquare)(t);o>this._maxSize&&(o=this._maxSize);let a=o-i;e.backing.growTo(o,s,a)}_changeScale(e,t){let n=0;for(;e-t>=this._maxSize;)e>>=1,t>>=1,n++;return n}_downscale(e){if(e===0)return;if(e<0)throw new Error(`impossible change of scale: ${this.scale}`);let t=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=(0,Jd.getMapping)(t)}_minScale(e){let t=Math.min(this.scale,e.scale),n=Gt.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(e.positive,e.scale,t)),i=Gt.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(e.negative,e.scale,t));return Math.min(t-this._changeScale(n.high,n.low),t-this._changeScale(i.high,i.low))}_highLowAtScale(e,t,n){if(e.length===0)return new Gt(0,-1);let i=t-n;return new Gt(e.indexStart>>i,e.indexEnd>>i)}_mergeBuckets(e,t,n,i){let s=n.offset,o=t.scale-i;for(let a=0;a<n.length;a++)this._incrementIndexBy(e,s+a>>o,n.at(a))}_diffBuckets(e,t,n,i){let s=n.offset,o=t.scale-i;for(let a=0;a<n.length;a++){let l=(s+a>>o)-e.indexBase;l<0&&(l+=e.backing.length),e.decrementBucket(l,n.at(a))}e.trim()}};Vt.ExponentialHistogramAccumulation=Ni;var Ia=class{constructor(e,t){this._maxSize=e,this._recordMinMax=t,this.kind=uT.AggregatorKind.EXPONENTIAL_HISTOGRAM}createAccumulation(e){return new Ni(e,this._maxSize,this._recordMinMax)}merge(e,t){let n=t.clone();return n.merge(e),n}diff(e,t){let n=t.clone();return n.diff(e),n}toMetricData(e,t,n,i){return{descriptor:e,aggregationTemporality:t,dataPointType:cT.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:n.map(([s,o])=>{let a=o.toPointValue(),u=e.type===ya.InstrumentType.UP_DOWN_COUNTER||e.type===ya.InstrumentType.OBSERVABLE_GAUGE||e.type===ya.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:s,startTime:o.startTime,endTime:i,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:u?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}})}}};Vt.ExponentialHistogramAggregator=Ia});var t_=c(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.LastValueAggregator=Ft.LastValueAccumulation=void 0;var pT=wt(),Pr=S(),fT=Nt(),jt=class{constructor(e,t=0,n=[0,0]){this.startTime=e,this._current=t,this.sampleTime=n}record(e){this._current=e,this.sampleTime=(0,Pr.millisToHrTime)(Date.now())}setStartTime(e){this.startTime=e}toPointValue(){return this._current}};Ft.LastValueAccumulation=jt;var La=class{constructor(){this.kind=pT.AggregatorKind.LAST_VALUE}createAccumulation(e){return new jt(e)}merge(e,t){let n=(0,Pr.hrTimeToMicroseconds)(t.sampleTime)>=(0,Pr.hrTimeToMicroseconds)(e.sampleTime)?t:e;return new jt(e.startTime,n.toPointValue(),n.sampleTime)}diff(e,t){let n=(0,Pr.hrTimeToMicroseconds)(t.sampleTime)>=(0,Pr.hrTimeToMicroseconds)(e.sampleTime)?t:e;return new jt(t.startTime,n.toPointValue(),n.sampleTime)}toMetricData(e,t,n,i){return{descriptor:e,aggregationTemporality:t,dataPointType:fT.DataPointType.GAUGE,dataPoints:n.map(([s,o])=>({attributes:s,startTime:o.startTime,endTime:i,value:o.toPointValue()}))}}};Ft.LastValueAggregator=La});var r_=c(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.SumAggregator=Ht.SumAccumulation=void 0;var ET=wt(),mT=Nt(),we=class{constructor(e,t,n=0,i=!1){this.startTime=e,this.monotonic=t,this._current=n,this.reset=i}record(e){this.monotonic&&e<0||(this._current+=e)}setStartTime(e){this.startTime=e}toPointValue(){return this._current}};Ht.SumAccumulation=we;var Ma=class{constructor(e){this.monotonic=e,this.kind=ET.AggregatorKind.SUM}createAccumulation(e){return new we(e,this.monotonic)}merge(e,t){let n=e.toPointValue(),i=t.toPointValue();return t.reset?new we(t.startTime,this.monotonic,i,t.reset):new we(e.startTime,this.monotonic,n+i)}diff(e,t){let n=e.toPointValue(),i=t.toPointValue();return this.monotonic&&n>i?new we(t.startTime,this.monotonic,i,!0):new we(t.startTime,this.monotonic,i-n)}toMetricData(e,t,n,i){return{descriptor:e,aggregationTemporality:t,dataPointType:mT.DataPointType.SUM,dataPoints:n.map(([s,o])=>({attributes:s,startTime:o.startTime,endTime:i,value:o.toPointValue()})),isMonotonic:this.monotonic}}};Ht.SumAggregator=Ma});var n_=c(ce=>{"use strict";var gT=ce&&ce.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),yr=ce&&ce.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&gT(e,r,t)};Object.defineProperty(ce,"__esModule",{value:!0});yr(Gd(),ce);yr(Fd(),ce);yr(e_(),ce);yr(t_(),ce);yr(r_(),ce)});var Bi=c(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.DefaultAggregation=G.ExponentialHistogramAggregation=G.ExplicitBucketHistogramAggregation=G.HistogramAggregation=G.LastValueAggregation=G.SumAggregation=G.DropAggregation=G.Aggregation=void 0;var TT=(h(),f(d)),ot=n_(),Re=Oe(),ge=class{static Drop(){return i_}static Sum(){return s_}static LastValue(){return o_}static Histogram(){return a_}static ExponentialHistogram(){return ST}static Default(){return AT}};G.Aggregation=ge;var vr=class r extends ge{createAggregator(e){return r.DEFAULT_INSTANCE}};G.DropAggregation=vr;vr.DEFAULT_INSTANCE=new ot.DropAggregator;var kt=class r extends ge{createAggregator(e){switch(e.type){case Re.InstrumentType.COUNTER:case Re.InstrumentType.OBSERVABLE_COUNTER:case Re.InstrumentType.HISTOGRAM:return r.MONOTONIC_INSTANCE;default:return r.NON_MONOTONIC_INSTANCE}}};G.SumAggregation=kt;kt.MONOTONIC_INSTANCE=new ot.SumAggregator(!0);kt.NON_MONOTONIC_INSTANCE=new ot.SumAggregator(!1);var Ir=class r extends ge{createAggregator(e){return r.DEFAULT_INSTANCE}};G.LastValueAggregation=Ir;Ir.DEFAULT_INSTANCE=new ot.LastValueAggregator;var Lr=class r extends ge{createAggregator(e){return r.DEFAULT_INSTANCE}};G.HistogramAggregation=Lr;Lr.DEFAULT_INSTANCE=new ot.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);var wi=class extends ge{constructor(e,t=!0){if(super(),this._recordMinMax=t,e===void 0||e.length===0)throw new Error("HistogramAggregator should be created with boundaries.");e=e.concat(),e=e.sort((s,o)=>s-o);let n=e.lastIndexOf(-1/0),i=e.indexOf(1/0);i===-1&&(i=void 0),this._boundaries=e.slice(n+1,i)}createAggregator(e){return new ot.HistogramAggregator(this._boundaries,this._recordMinMax)}};G.ExplicitBucketHistogramAggregation=wi;var xi=class extends ge{constructor(e=160,t=!0){super(),this._maxSize=e,this._recordMinMax=t}createAggregator(e){return new ot.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};G.ExponentialHistogramAggregation=xi;var Di=class extends ge{_resolve(e){switch(e.type){case Re.InstrumentType.COUNTER:case Re.InstrumentType.UP_DOWN_COUNTER:case Re.InstrumentType.OBSERVABLE_COUNTER:case Re.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return s_;case Re.InstrumentType.OBSERVABLE_GAUGE:return o_;case Re.InstrumentType.HISTOGRAM:return e.advice.explicitBucketBoundaries?new wi(e.advice.explicitBucketBoundaries):a_}return TT.diag.warn(`Unable to recognize instrument type: ${e.type}`),i_}createAggregator(e){return this._resolve(e).createAggregator(e)}};G.DefaultAggregation=Di;var i_=new vr,s_=new kt,o_=new Ir,a_=new Lr,ST=new xi,AT=new Di});var Ca=c(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Xt.DEFAULT_AGGREGATION_SELECTOR=void 0;var OT=Bi(),RT=Oi(),bT=r=>OT.Aggregation.Default();Xt.DEFAULT_AGGREGATION_SELECTOR=bT;var PT=r=>RT.AggregationTemporality.CUMULATIVE;Xt.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=PT});var wa=c(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.MetricReader=void 0;var u_=(h(),f(d)),Ui=me(),c_=Ca(),Na=class{constructor(e){var t,n,i;this._shutdown=!1,this._aggregationSelector=(t=e?.aggregationSelector)!==null&&t!==void 0?t:c_.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=(n=e?.aggregationTemporalitySelector)!==null&&n!==void 0?n:c_.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=(i=e?.metricProducers)!==null&&i!==void 0?i:[]}setMetricProducer(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()}selectAggregation(e){return this._aggregationSelector(e)}selectAggregationTemporality(e){return this._aggregationTemporalitySelector(e)}onInitialized(){}async collect(e){if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let[t,...n]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:e?.timeoutMillis}),...this._metricProducers.map(a=>a.collect({timeoutMillis:e?.timeoutMillis}))]),i=t.errors.concat((0,Ui.FlatMap)(n,a=>a.errors)),s=t.resourceMetrics.resource,o=t.resourceMetrics.scopeMetrics.concat((0,Ui.FlatMap)(n,a=>a.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:s,scopeMetrics:o},errors:i}}async shutdown(e){if(this._shutdown){u_.diag.error("Cannot call shutdown twice.");return}e?.timeoutMillis==null?await this.onShutdown():await(0,Ui.callWithTimeout)(this.onShutdown(),e.timeoutMillis),this._shutdown=!0}async forceFlush(e){if(this._shutdown){u_.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(e?.timeoutMillis==null){await this.onForceFlush();return}await(0,Ui.callWithTimeout)(this.onForceFlush(),e.timeoutMillis)}};qi.MetricReader=Na});var __=c(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.PeriodicExportingMetricReader=void 0;var l_=(h(),f(d)),Gi=S(),yT=wa(),d_=me(),vT=(h(),f(d)),xa=class extends yT.MetricReader{constructor(e){var t,n,i,s;if(super({aggregationSelector:(t=e.exporter.selectAggregation)===null||t===void 0?void 0:t.bind(e.exporter),aggregationTemporalitySelector:(n=e.exporter.selectAggregationTemporality)===null||n===void 0?void 0:n.bind(e.exporter),metricProducers:e.metricProducers}),e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<e.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");this._exportInterval=(i=e.exportIntervalMillis)!==null&&i!==void 0?i:6e4,this._exportTimeout=(s=e.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,this._exporter=e.exporter}async _runOnce(){try{await(0,d_.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(e){if(e instanceof d_.TimeoutError){l_.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,Gi.globalErrorHandler)(e)}}async _doRun(){var e,t;let{resourceMetrics:n,errors:i}=await this.collect({timeoutMillis:this._exportTimeout});i.length>0&&l_.diag.error("PeriodicExportingMetricReader: metrics collection errors",...i);let s=async()=>{let o=await Gi.internal._export(this._exporter,n);if(o.code!==Gi.ExportResultCode.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${o.error})`)};n.resource.asyncAttributesPending?(t=(e=n.resource).waitForAsyncAttributes)===null||t===void 0||t.call(e).then(s,o=>vT.diag.debug("Error while resolving async portion of resource: ",o)):await s()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,Gi.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}};Vi.PeriodicExportingMetricReader=xa});var p_=c(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.InMemoryMetricExporter=void 0;var h_=S(),Da=class{constructor(e){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=e}export(e,t){if(this._shutdown){setTimeout(()=>t({code:h_.ExportResultCode.FAILED}),0);return}this._metrics.push(e),setTimeout(()=>t({code:h_.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(e){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}};ji.InMemoryMetricExporter=Da});var E_=c(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.ConsoleMetricExporter=void 0;var f_=S(),IT=Ca(),Ba=class r{constructor(e){var t;this._shutdown=!1,this._temporalitySelector=(t=e?.temporalitySelector)!==null&&t!==void 0?t:IT.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(e,t){if(this._shutdown){setImmediate(t,{code:f_.ExportResultCode.FAILED});return}return r._sendMetrics(e,t)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(e){return this._temporalitySelector(e)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(e,t){for(let n of e.scopeMetrics)for(let i of n.metrics)console.dir({descriptor:i.descriptor,dataPointType:i.dataPointType,dataPoints:i.dataPoints});t({code:f_.ExportResultCode.SUCCESS})}};Fi.ConsoleMetricExporter=Ba});var m_=c(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.ViewRegistry=void 0;var Ua=class{constructor(){this._registeredViews=[]}addView(e){this._registeredViews.push(e)}findViews(e,t){return this._registeredViews.filter(i=>this._matchInstrument(i.instrumentSelector,e)&&this._matchMeter(i.meterSelector,t))}_matchInstrument(e,t){return(e.getType()===void 0||t.type===e.getType())&&e.getNameFilter().match(t.name)&&e.getUnitFilter().match(t.unit)}_matchMeter(e,t){return e.getNameFilter().match(t.name)&&(t.version===void 0||e.getVersionFilter().match(t.version))&&(t.schemaUrl===void 0||e.getSchemaUrlFilter().match(t.schemaUrl))}};Hi.ViewRegistry=Ua});var ki=c(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.isObservableInstrument=x.ObservableUpDownCounterInstrument=x.ObservableGaugeInstrument=x.ObservableCounterInstrument=x.ObservableInstrument=x.HistogramInstrument=x.CounterInstrument=x.UpDownCounterInstrument=x.SyncInstrument=void 0;var $t=(h(),f(d)),LT=S(),Wt=class{constructor(e,t){this._writableMetricStorage=e,this._descriptor=t}_record(e,t={},n=$t.context.active()){if(typeof e!="number"){$t.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${e}`);return}this._descriptor.valueType===$t.ValueType.INT&&!Number.isInteger(e)&&($t.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,t,n,(0,LT.millisToHrTime)(Date.now()))}};x.SyncInstrument=Wt;var qa=class extends Wt{add(e,t,n){this._record(e,t,n)}};x.UpDownCounterInstrument=qa;var Ga=class extends Wt{add(e,t,n){if(e<0){$t.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${e}`);return}this._record(e,t,n)}};x.CounterInstrument=Ga;var Va=class extends Wt{record(e,t,n){if(e<0){$t.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${e}`);return}this._record(e,t,n)}};x.HistogramInstrument=Va;var at=class{constructor(e,t,n){this._observableRegistry=n,this._descriptor=e,this._metricStorages=t}addCallback(e){this._observableRegistry.addCallback(e,this)}removeCallback(e){this._observableRegistry.removeCallback(e,this)}};x.ObservableInstrument=at;var ja=class extends at{};x.ObservableCounterInstrument=ja;var Fa=class extends at{};x.ObservableGaugeInstrument=Fa;var Ha=class extends at{};x.ObservableUpDownCounterInstrument=Ha;function MT(r){return r instanceof at}x.isObservableInstrument=MT});var g_=c(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.Meter=void 0;var se=Oe(),Kt=ki(),ka=class{constructor(e){this._meterSharedState=e}createHistogram(e,t){let n=(0,se.createInstrumentDescriptor)(e,se.InstrumentType.HISTOGRAM,t),i=this._meterSharedState.registerMetricStorage(n);return new Kt.HistogramInstrument(i,n)}createCounter(e,t){let n=(0,se.createInstrumentDescriptor)(e,se.InstrumentType.COUNTER,t),i=this._meterSharedState.registerMetricStorage(n);return new Kt.CounterInstrument(i,n)}createUpDownCounter(e,t){let n=(0,se.createInstrumentDescriptor)(e,se.InstrumentType.UP_DOWN_COUNTER,t),i=this._meterSharedState.registerMetricStorage(n);return new Kt.UpDownCounterInstrument(i,n)}createObservableGauge(e,t){let n=(0,se.createInstrumentDescriptor)(e,se.InstrumentType.OBSERVABLE_GAUGE,t),i=this._meterSharedState.registerAsyncMetricStorage(n);return new Kt.ObservableGaugeInstrument(n,i,this._meterSharedState.observableRegistry)}createObservableCounter(e,t){let n=(0,se.createInstrumentDescriptor)(e,se.InstrumentType.OBSERVABLE_COUNTER,t),i=this._meterSharedState.registerAsyncMetricStorage(n);return new Kt.ObservableCounterInstrument(n,i,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(e,t){let n=(0,se.createInstrumentDescriptor)(e,se.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,t),i=this._meterSharedState.registerAsyncMetricStorage(n);return new Kt.ObservableUpDownCounterInstrument(n,i,this._meterSharedState.observableRegistry)}addBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.addBatchCallback(e,t)}removeBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.removeBatchCallback(e,t)}};Xi.Meter=ka});var $a=c($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.MetricStorage=void 0;var CT=Oe(),Xa=class{constructor(e){this._instrumentDescriptor=e}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(e){this._instrumentDescriptor=(0,CT.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};$i.MetricStorage=Xa});var Mr=c(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.AttributeHashMap=zt.HashMap=void 0;var NT=me(),Wi=class{constructor(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}get(e,t){return t??(t=this._hash(e)),this._valueMap.get(t)}getOrDefault(e,t){let n=this._hash(e);if(this._valueMap.has(n))return this._valueMap.get(n);let i=t();return this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,i),i}set(e,t,n){n??(n=this._hash(e)),this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,t)}has(e,t){return t??(t=this._hash(e)),this._valueMap.has(t)}*keys(){let e=this._keyMap.entries(),t=e.next();for(;t.done!==!0;)yield[t.value[1],t.value[0]],t=e.next()}*entries(){let e=this._valueMap.entries(),t=e.next();for(;t.done!==!0;)yield[this._keyMap.get(t.value[0]),t.value[1],t.value[0]],t=e.next()}get size(){return this._valueMap.size}};zt.HashMap=Wi;var Wa=class extends Wi{constructor(){super(NT.hashAttributes)}};zt.AttributeHashMap=Wa});var Ya=c(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.DeltaMetricProcessor=void 0;var Ka=Mr(),za=class{constructor(e){this._aggregator=e,this._activeCollectionStorage=new Ka.AttributeHashMap,this._cumulativeMemoStorage=new Ka.AttributeHashMap}record(e,t,n,i){let s=this._activeCollectionStorage.getOrDefault(t,()=>this._aggregator.createAccumulation(i));s?.record(e)}batchCumulate(e,t){Array.from(e.entries()).forEach(([n,i,s])=>{let o=this._aggregator.createAccumulation(t);o?.record(i);let a=o;if(this._cumulativeMemoStorage.has(n,s)){let u=this._cumulativeMemoStorage.get(n,s);a=this._aggregator.diff(u,o)}if(this._activeCollectionStorage.has(n,s)){let u=this._activeCollectionStorage.get(n,s);a=this._aggregator.merge(u,a)}this._cumulativeMemoStorage.set(n,o,s),this._activeCollectionStorage.set(n,a,s)})}collect(){let e=this._activeCollectionStorage;return this._activeCollectionStorage=new Ka.AttributeHashMap,e}};Ki.DeltaMetricProcessor=za});var Za=c(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.TemporalMetricProcessor=void 0;var wT=Oi(),xT=Mr(),Qa=class r{constructor(e,t){this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,t.forEach(n=>{this._unreportedAccumulations.set(n,[])})}buildMetrics(e,t,n,i){this._stashAccumulations(n);let s=this._getMergedUnreportedAccumulations(e),o=s,a;if(this._reportHistory.has(e)){let l=this._reportHistory.get(e),_=l.collectionTime;a=l.aggregationTemporality,a===wT.AggregationTemporality.CUMULATIVE?o=r.merge(l.accumulations,s,this._aggregator):o=r.calibrateStartTime(l.accumulations,s,_)}else a=e.selectAggregationTemporality(t.type);this._reportHistory.set(e,{accumulations:o,collectionTime:i,aggregationTemporality:a});let u=DT(o);if(u.length!==0)return this._aggregator.toMetricData(t,a,u,i)}_stashAccumulations(e){let t=this._unreportedAccumulations.keys();for(let n of t){let i=this._unreportedAccumulations.get(n);i===void 0&&(i=[],this._unreportedAccumulations.set(n,i)),i.push(e)}}_getMergedUnreportedAccumulations(e){let t=new xT.AttributeHashMap,n=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),n===void 0)return t;for(let i of n)t=r.merge(t,i,this._aggregator);return t}static merge(e,t,n){let i=e,s=t.entries(),o=s.next();for(;o.done!==!0;){let[a,u,l]=o.value;if(e.has(a,l)){let _=e.get(a,l),E=n.merge(_,u);i.set(a,E,l)}else i.set(a,u,l);o=s.next()}return i}static calibrateStartTime(e,t,n){for(let[i,s]of e.keys()){let o=t.get(i,s);o?.setStartTime(n)}return t}};zi.TemporalMetricProcessor=Qa;function DT(r){return Array.from(r.entries())}});var T_=c(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.AsyncMetricStorage=void 0;var BT=$a(),UT=Ya(),qT=Za(),GT=Mr(),Ja=class extends BT.MetricStorage{constructor(e,t,n,i){super(e),this._attributesProcessor=n,this._deltaMetricStorage=new UT.DeltaMetricProcessor(t),this._temporalMetricStorage=new qT.TemporalMetricProcessor(t,i)}record(e,t){let n=new GT.AttributeHashMap;Array.from(e.entries()).forEach(([i,s])=>{n.set(this._attributesProcessor.process(i),s)}),this._deltaMetricStorage.batchCumulate(n,t)}collect(e,t){let n=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,n,t)}};Yi.AsyncMetricStorage=Ja});var b_=c(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.getConflictResolutionRecipe=Q.getDescriptionResolutionRecipe=Q.getTypeConflictResolutionRecipe=Q.getUnitConflictResolutionRecipe=Q.getValueTypeConflictResolutionRecipe=Q.getIncompatibilityDetails=void 0;function VT(r,e){let t="";return r.unit!==e.unit&&(t+=` - Unit '${r.unit}' does not match '${e.unit}'
9
+ `),r.type!==e.type&&(t+=` - Type '${r.type}' does not match '${e.type}'
10
+ `),r.valueType!==e.valueType&&(t+=` - Value Type '${r.valueType}' does not match '${e.valueType}'
11
+ `),r.description!==e.description&&(t+=` - Description '${r.description}' does not match '${e.description}'
12
+ `),t}Q.getIncompatibilityDetails=VT;function S_(r,e){return` - use valueType '${r.valueType}' on instrument creation or use an instrument name other than '${e.name}'`}Q.getValueTypeConflictResolutionRecipe=S_;function A_(r,e){return` - use unit '${r.unit}' on instrument creation or use an instrument name other than '${e.name}'`}Q.getUnitConflictResolutionRecipe=A_;function O_(r,e){let t={name:e.name,type:e.type,unit:e.unit},n=JSON.stringify(t);return` - create a new view with a name other than '${r.name}' and InstrumentSelector '${n}'`}Q.getTypeConflictResolutionRecipe=O_;function R_(r,e){let t={name:e.name,type:e.type,unit:e.unit},n=JSON.stringify(t);return` - create a new view with a name other than '${r.name}' and InstrumentSelector '${n}'
13
+ - OR - create a new view with the name ${r.name} and description '${r.description}' and InstrumentSelector ${n}
14
+ - OR - create a new view with the name ${e.name} and description '${r.description}' and InstrumentSelector ${n}`}Q.getDescriptionResolutionRecipe=R_;function jT(r,e){return r.valueType!==e.valueType?S_(r,e):r.unit!==e.unit?A_(r,e):r.type!==e.type?O_(r,e):r.description!==e.description?R_(r,e):""}Q.getConflictResolutionRecipe=jT});var y_=c(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.MetricStorageRegistry=void 0;var FT=Oe(),P_=(h(),f(d)),Qi=b_(),eu=class r{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new r}getStorages(e){let t=[];for(let i of this._sharedRegistry.values())t=t.concat(i);let n=this._perCollectorRegistry.get(e);if(n!=null)for(let i of n.values())t=t.concat(i);return t}register(e){this._registerStorage(e,this._sharedRegistry)}registerForCollector(e,t){let n=this._perCollectorRegistry.get(e);n==null&&(n=new Map,this._perCollectorRegistry.set(e,n)),this._registerStorage(t,n)}findOrUpdateCompatibleStorage(e){let t=this._sharedRegistry.get(e.name);return t===void 0?null:this._findOrUpdateCompatibleStorage(e,t)}findOrUpdateCompatibleCollectorStorage(e,t){let n=this._perCollectorRegistry.get(e);if(n===void 0)return null;let i=n.get(t.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(t,i)}_registerStorage(e,t){let n=e.getInstrumentDescriptor(),i=t.get(n.name);if(i===void 0){t.set(n.name,[e]);return}i.push(e)}_findOrUpdateCompatibleStorage(e,t){let n=null;for(let i of t){let s=i.getInstrumentDescriptor();(0,FT.isDescriptorCompatibleWith)(s,e)?(s.description!==e.description&&(e.description.length>s.description.length&&i.updateDescription(e.description),P_.diag.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
15
15
  `,`Details:
16
- `,(0,Si.getIncompatibilityDetails)(a,r),`The longer description will be used.
17
- To resolve the conflict:`,(0,Si.getConflictResolutionRecipe)(a,r))),c=s):Sd.diag.warn("A view or instrument with the name ",r.name,` has already been registered and is incompatible with another registered view.
16
+ `,(0,Qi.getIncompatibilityDetails)(s,e),`The longer description will be used.
17
+ To resolve the conflict:`,(0,Qi.getConflictResolutionRecipe)(s,e))),n=i):P_.diag.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
18
18
  `,`Details:
19
- `,(0,Si.getIncompatibilityDetails)(a,r),`To resolve the conflict:
20
- `,(0,Si.getConflictResolutionRecipe)(a,r))}return c}};bi.MetricStorageRegistry=Da});var Od=d(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.MultiMetricStorage=void 0;var Ba=class{constructor(r){this._backingStorages=r}record(r,o,c,s){this._backingStorages.forEach(a=>{a.record(r,o,c,s)})}};Oi.MultiMetricStorage=Ba});var Pd=d(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.BatchObservableResultImpl=ar.ObservableResultImpl=void 0;var ur=(y(),E(_)),Ad=Xr(),sT=mi(),Va=class{constructor(r,o){this._instrumentName=r,this._valueType=o,this._buffer=new Ad.AttributeHashMap}observe(r,o={}){if(typeof r!="number"){ur.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${r}`);return}this._valueType===ur.ValueType.INT&&!Number.isInteger(r)&&(ur.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||this._buffer.set(o,r)}};ar.ObservableResultImpl=Va;var ka=class{constructor(){this._buffer=new Map}observe(r,o,c={}){if(!(0,sT.isObservableInstrument)(r))return;let s=this._buffer.get(r);if(s==null&&(s=new Ad.AttributeHashMap,this._buffer.set(r,s)),typeof o!="number"){ur.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`);return}r._descriptor.valueType===ur.ValueType.INT&&!Number.isInteger(o)&&(ur.diag.warn(`INT value type cannot accept a floating-point value for ${r._descriptor.name}, ignoring the fractional digits.`),o=Math.trunc(o),!Number.isInteger(o))||s.set(c,o)}};ar.BatchObservableResultImpl=ka});var xd=d(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.ObservableRegistry=void 0;var uT=(y(),E(_)),Nd=mi(),Rd=Pd(),zr=Ne(),qa=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(r,o){this._findCallback(r,o)>=0||this._callbacks.push({callback:r,instrument:o})}removeCallback(r,o){let c=this._findCallback(r,o);c<0||this._callbacks.splice(c,1)}addBatchCallback(r,o){let c=new Set(o.filter(Nd.isObservableInstrument));if(c.size===0){uT.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}this._findBatchCallback(r,c)>=0||this._batchCallbacks.push({callback:r,instruments:c})}removeBatchCallback(r,o){let c=new Set(o.filter(Nd.isObservableInstrument)),s=this._findBatchCallback(r,c);s<0||this._batchCallbacks.splice(s,1)}async observe(r,o){let c=this._observeCallbacks(r,o),s=this._observeBatchCallbacks(r,o);return(await(0,zr.PromiseAllSettled)([...c,...s])).filter(zr.isPromiseAllSettledRejectionResult).map(e=>e.reason)}_observeCallbacks(r,o){return this._callbacks.map(async({callback:c,instrument:s})=>{let a=new Rd.ObservableResultImpl(s._descriptor.name,s._descriptor.valueType),t=Promise.resolve(c(a));o!=null&&(t=(0,zr.callWithTimeout)(t,o)),await t,s._metricStorages.forEach(e=>{e.record(a._buffer,r)})})}_observeBatchCallbacks(r,o){return this._batchCallbacks.map(async({callback:c,instruments:s})=>{let a=new Rd.BatchObservableResultImpl,t=Promise.resolve(c(a));o!=null&&(t=(0,zr.callWithTimeout)(t,o)),await t,s.forEach(e=>{let n=a._buffer.get(e);n!=null&&e._metricStorages.forEach(u=>{u.record(n,r)})})})}_findCallback(r,o){return this._callbacks.findIndex(c=>c.callback===r&&c.instrument===o)}_findBatchCallback(r,o){return this._batchCallbacks.findIndex(c=>c.callback===r&&(0,zr.setEquals)(c.instruments,o))}};Ai.ObservableRegistry=qa});var Id=d(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.SyncMetricStorage=void 0;var aT=Ra(),cT=wa(),lT=Ca(),ja=class extends aT.MetricStorage{constructor(r,o,c,s){super(r),this._attributesProcessor=c,this._deltaMetricStorage=new cT.DeltaMetricProcessor(o),this._temporalMetricStorage=new lT.TemporalMetricProcessor(o,s)}record(r,o,c,s){o=this._attributesProcessor.process(o,c),this._deltaMetricStorage.record(r,o,c,s)}collect(r,o){let c=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,c,o)}};Pi.SyncMetricStorage=ja});var Ha=d(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.FilteringAttributesProcessor=He.NoopAttributesProcessor=He.AttributesProcessor=void 0;var $r=class{static Noop(){return pT}};He.AttributesProcessor=$r;var Ni=class extends $r{process(r,o){return r}};He.NoopAttributesProcessor=Ni;var Ga=class extends $r{constructor(r){super(),this._allowedAttributeNames=r}process(r,o){let c={};return Object.keys(r).filter(s=>this._allowedAttributeNames.includes(s)).forEach(s=>c[s]=r[s]),c}};He.FilteringAttributesProcessor=Ga;var pT=new Ni});var Ld=d(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.MeterSharedState=void 0;var fT=we(),dT=md(),hT=Ne(),mT=_d(),_T=bd(),yT=Od(),ET=xd(),gT=Id(),vT=Ha(),Fa=class{constructor(r,o){this._meterProviderSharedState=r,this._instrumentationScope=o,this.metricStorageRegistry=new _T.MetricStorageRegistry,this.observableRegistry=new ET.ObservableRegistry,this.meter=new dT.Meter(this)}registerMetricStorage(r){let o=this._registerMetricStorage(r,gT.SyncMetricStorage);return o.length===1?o[0]:new yT.MultiMetricStorage(o)}registerAsyncMetricStorage(r){return this._registerMetricStorage(r,mT.AsyncMetricStorage)}async collect(r,o,c){let s=await this.observableRegistry.observe(o,c?.timeoutMillis),a=this.metricStorageRegistry.getStorages(r);if(a.length===0)return null;let t=a.map(e=>e.collect(r,o)).filter(hT.isNotNullish);return t.length===0?{errors:s}:{scopeMetrics:{scope:this._instrumentationScope,metrics:t},errors:s}}_registerMetricStorage(r,o){let s=this._meterProviderSharedState.viewRegistry.findViews(r,this._instrumentationScope).map(a=>{let t=(0,fT.createInstrumentDescriptorWithView)(a,r),e=this.metricStorageRegistry.findOrUpdateCompatibleStorage(t);if(e!=null)return e;let n=a.aggregation.createAggregator(t),u=new o(t,n,a.attributesProcessor,this._meterProviderSharedState.metricCollectors);return this.metricStorageRegistry.register(u),u});if(s.length===0){let t=this._meterProviderSharedState.selectAggregations(r.type).map(([e,n])=>{let u=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,r);if(u!=null)return u;let l=n.createAggregator(r),h=new o(r,l,vT.AttributesProcessor.Noop(),[e]);return this.metricStorageRegistry.registerForCollector(e,h),h});s=s.concat(t)}return s}};Ri.MeterSharedState=Fa});var wd=d(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.MeterProviderSharedState=void 0;var TT=Ne(),ST=hd(),bT=Ld(),Ka=class{constructor(r){this.resource=r,this.viewRegistry=new ST.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(r){let o=(0,TT.instrumentationScopeId)(r),c=this.meterSharedStates.get(o);return c==null&&(c=new bT.MeterSharedState(this,r),this.meterSharedStates.set(o,c)),c}selectAggregations(r){let o=[];for(let c of this.metricCollectors)o.push([c,c.selectAggregation(r)]);return o}};xi.MeterProviderSharedState=Ka});var Md=d(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.MetricCollector=void 0;var OT=N(),Xa=class{constructor(r,o){this._sharedState=r,this._metricReader=o}async collect(r){let o=(0,OT.millisToHrTime)(Date.now()),c=[],s=[],a=Array.from(this._sharedState.meterSharedStates.values()).map(async t=>{let e=await t.collect(this,o,r);e?.scopeMetrics!=null&&c.push(e.scopeMetrics),e?.errors!=null&&s.push(...e.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:c},errors:s}}async forceFlush(r){await this._metricReader.forceFlush(r)}async shutdown(r){await this._metricReader.shutdown(r)}selectAggregationTemporality(r){return this._metricReader.selectAggregationTemporality(r)}selectAggregation(r){return this._metricReader.selectAggregation(r)}};Ii.MetricCollector=Xa});var Ud=d(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.MeterProvider=void 0;var Li=(y(),E(_)),Cd=pt(),AT=wd(),PT=Md(),za=class{constructor(r){var o;this._shutdown=!1;let c=Cd.Resource.default().merge((o=r?.resource)!==null&&o!==void 0?o:Cd.Resource.empty());if(this._sharedState=new AT.MeterProviderSharedState(c),r?.views!=null&&r.views.length>0)for(let s of r.views)this._sharedState.viewRegistry.addView(s)}getMeter(r,o="",c={}){return this._shutdown?(Li.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Li.createNoopMeter)()):this._sharedState.getMeterSharedState({name:r,version:o,schemaUrl:c.schemaUrl}).meter}addMetricReader(r){let o=new PT.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}async shutdown(r){if(this._shutdown){Li.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(o=>o.shutdown(r)))}async forceFlush(r){if(this._shutdown){Li.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(o=>o.forceFlush(r)))}};wi.MeterProvider=za});var Mi=d(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.ExactPredicate=cr.PatternPredicate=void 0;var NT=/[\^$\\.+?()[\]{}|]/g,$a=class i{constructor(r){r==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(i.escapePattern(r)))}match(r){return this._matchAll?!0:this._regexp.test(r)}static escapePattern(r){return`^${r.replace(NT,"\\$&").replace("*",".*")}$`}static hasWildcard(r){return r.includes("*")}};cr.PatternPredicate=$a;var Ya=class{constructor(r){this._matchAll=r===void 0,this._pattern=r}match(r){return!!(this._matchAll||r===this._pattern)}};cr.ExactPredicate=Ya});var Bd=d(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.InstrumentSelector=void 0;var Dd=Mi(),Wa=class{constructor(r){var o;this._nameFilter=new Dd.PatternPredicate((o=r?.name)!==null&&o!==void 0?o:"*"),this._type=r?.type,this._unitFilter=new Dd.ExactPredicate(r?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};Ci.InstrumentSelector=Wa});var Vd=d(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.MeterSelector=void 0;var Ja=Mi(),Qa=class{constructor(r){this._nameFilter=new Ja.ExactPredicate(r?.name),this._versionFilter=new Ja.ExactPredicate(r?.version),this._schemaUrlFilter=new Ja.ExactPredicate(r?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ui.MeterSelector=Qa});var qd=d(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.View=void 0;var RT=Mi(),kd=Ha(),xT=Bd(),IT=Vd(),LT=ui();function wT(i){return i.instrumentName==null&&i.instrumentType==null&&i.instrumentUnit==null&&i.meterName==null&&i.meterVersion==null&&i.meterSchemaUrl==null}var Za=class{constructor(r){var o;if(wT(r))throw new Error("Cannot create view with no selector arguments supplied");if(r.name!=null&&(r?.instrumentName==null||RT.PatternPredicate.hasWildcard(r.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");r.attributeKeys!=null?this.attributesProcessor=new kd.FilteringAttributesProcessor(r.attributeKeys):this.attributesProcessor=kd.AttributesProcessor.Noop(),this.name=r.name,this.description=r.description,this.aggregation=(o=r.aggregation)!==null&&o!==void 0?o:LT.Aggregation.Default(),this.instrumentSelector=new xT.InstrumentSelector({name:r.instrumentName,type:r.instrumentType,unit:r.instrumentUnit}),this.meterSelector=new IT.MeterSelector({name:r.meterName,version:r.meterVersion,schemaUrl:r.meterSchemaUrl})}};Di.View=Za});var jd=d(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.TimeoutError=A.View=A.Aggregation=A.SumAggregation=A.LastValueAggregation=A.HistogramAggregation=A.DropAggregation=A.ExponentialHistogramAggregation=A.ExplicitBucketHistogramAggregation=A.DefaultAggregation=A.MeterProvider=A.InstrumentType=A.ConsoleMetricExporter=A.InMemoryMetricExporter=A.PeriodicExportingMetricReader=A.MetricReader=A.DataPointType=A.AggregationTemporality=void 0;var MT=zo();Object.defineProperty(A,"AggregationTemporality",{enumerable:!0,get:function(){return MT.AggregationTemporality}});var CT=Ht();Object.defineProperty(A,"DataPointType",{enumerable:!0,get:function(){return CT.DataPointType}});var UT=ma();Object.defineProperty(A,"MetricReader",{enumerable:!0,get:function(){return UT.MetricReader}});var DT=cd();Object.defineProperty(A,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return DT.PeriodicExportingMetricReader}});var BT=pd();Object.defineProperty(A,"InMemoryMetricExporter",{enumerable:!0,get:function(){return BT.InMemoryMetricExporter}});var VT=dd();Object.defineProperty(A,"ConsoleMetricExporter",{enumerable:!0,get:function(){return VT.ConsoleMetricExporter}});var kT=we();Object.defineProperty(A,"InstrumentType",{enumerable:!0,get:function(){return kT.InstrumentType}});var qT=Ud();Object.defineProperty(A,"MeterProvider",{enumerable:!0,get:function(){return qT.MeterProvider}});var Fe=ui();Object.defineProperty(A,"DefaultAggregation",{enumerable:!0,get:function(){return Fe.DefaultAggregation}});Object.defineProperty(A,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return Fe.ExplicitBucketHistogramAggregation}});Object.defineProperty(A,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return Fe.ExponentialHistogramAggregation}});Object.defineProperty(A,"DropAggregation",{enumerable:!0,get:function(){return Fe.DropAggregation}});Object.defineProperty(A,"HistogramAggregation",{enumerable:!0,get:function(){return Fe.HistogramAggregation}});Object.defineProperty(A,"LastValueAggregation",{enumerable:!0,get:function(){return Fe.LastValueAggregation}});Object.defineProperty(A,"SumAggregation",{enumerable:!0,get:function(){return Fe.SumAggregation}});Object.defineProperty(A,"Aggregation",{enumerable:!0,get:function(){return Fe.Aggregation}});var jT=qd();Object.defineProperty(A,"View",{enumerable:!0,get:function(){return jT.View}});var GT=Ne();Object.defineProperty(A,"TimeoutError",{enumerable:!0,get:function(){return GT.TimeoutError}})});var Gd=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.AbstractAsyncHooksContextManager=void 0;var HT=z("events"),FT=["addListener","on","once","prependListener","prependOnceListener"],ec=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(r,o){return o instanceof HT.EventEmitter?this._bindEventEmitter(r,o):typeof o=="function"?this._bindFunction(r,o):o}_bindFunction(r,o){let c=this,s=function(...a){return c.with(r,()=>o.apply(this,a))};return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:o.length}),s}_bindEventEmitter(r,o){return this._getPatchMap(o)!==void 0||(this._createPatchMap(o),FT.forEach(s=>{o[s]!==void 0&&(o[s]=this._patchAddListener(o,o[s],r))}),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(r,o){let c=this;return function(s,a){var t;let e=(t=c._getPatchMap(r))===null||t===void 0?void 0:t[s];if(e===void 0)return o.call(this,s,a);let n=e.get(a);return o.call(this,s,n||a)}}_patchRemoveAllListeners(r,o){let c=this;return function(s){let a=c._getPatchMap(r);return a!==void 0&&(arguments.length===0?c._createPatchMap(r):a[s]!==void 0&&delete a[s]),o.apply(this,arguments)}}_patchAddListener(r,o,c){let s=this;return function(a,t){if(s._wrapped)return o.call(this,a,t);let e=s._getPatchMap(r);e===void 0&&(e=s._createPatchMap(r));let n=e[a];n===void 0&&(n=new WeakMap,e[a]=n);let u=s.bind(c,t);n.set(t,u),s._wrapped=!0;try{return o.call(this,a,u)}finally{s._wrapped=!1}}}_createPatchMap(r){let o=Object.create(null);return r[this._kOtListeners]=o,o}_getPatchMap(r){return r[this._kOtListeners]}};Bi.AbstractAsyncHooksContextManager=ec});var Hd=d(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.AsyncLocalStorageContextManager=void 0;var KT=(y(),E(_)),XT=z("async_hooks"),zT=Gd(),tc=class extends zT.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new XT.AsyncLocalStorage}active(){var r;return(r=this._asyncLocalStorage.getStore())!==null&&r!==void 0?r:KT.ROOT_CONTEXT}with(r,o,c,...s){let a=c==null?o:o.bind(c);return this._asyncLocalStorage.run(r,a,...s)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Vi.AsyncLocalStorageContextManager=tc});var ic=d(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.toAnyValue=Ke.toKeyValue=Ke.toAttributes=void 0;function ZT(i){return Object.keys(i).map(r=>nc(r,i[r]))}Ke.toAttributes=ZT;function nc(i,r){return{key:i,value:oc(r)}}Ke.toKeyValue=nc;function oc(i){let r=typeof i;return r==="string"?{stringValue:i}:r==="number"?Number.isInteger(i)?{intValue:i}:{doubleValue:i}:r==="boolean"?{boolValue:i}:i instanceof Uint8Array?{bytesValue:i}:Array.isArray(i)?{arrayValue:{values:i.map(oc)}}:r==="object"&&i!=null?{kvlistValue:{values:Object.entries(i).map(([o,c])=>nc(o,c))}}:{}}Ke.toAnyValue=oc});var Yd=d(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.toOtlpSpanEvent=Xe.toOtlpLink=Xe.sdkSpanToOtlpSpan=void 0;var sc=ic();function eS(i,r){var o;let c=i.spanContext(),s=i.status;return{traceId:r.encodeSpanContext(c.traceId),spanId:r.encodeSpanContext(c.spanId),parentSpanId:r.encodeOptionalSpanContext(i.parentSpanId),traceState:(o=c.traceState)===null||o===void 0?void 0:o.serialize(),name:i.name,kind:i.kind==null?0:i.kind+1,startTimeUnixNano:r.encodeHrTime(i.startTime),endTimeUnixNano:r.encodeHrTime(i.endTime),attributes:(0,sc.toAttributes)(i.attributes),droppedAttributesCount:i.droppedAttributesCount,events:i.events.map(a=>$d(a,r)),droppedEventsCount:i.droppedEventsCount,status:{code:s.code,message:s.message},links:i.links.map(a=>zd(a,r)),droppedLinksCount:i.droppedLinksCount}}Xe.sdkSpanToOtlpSpan=eS;function zd(i,r){var o;return{attributes:i.attributes?(0,sc.toAttributes)(i.attributes):[],spanId:r.encodeSpanContext(i.context.spanId),traceId:r.encodeSpanContext(i.context.traceId),traceState:(o=i.context.traceState)===null||o===void 0?void 0:o.serialize(),droppedAttributesCount:i.droppedAttributesCount||0}}Xe.toOtlpLink=zd;function $d(i,r){return{attributes:i.attributes?(0,sc.toAttributes)(i.attributes):[],name:i.name,timeUnixNano:r.encodeHrTime(i.time),droppedAttributesCount:i.droppedAttributesCount||0}}Xe.toOtlpSpanEvent=$d});var eh=d(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getOtlpEncoder=he.encodeAsString=he.encodeAsLongBits=he.toLongBits=he.hrTimeToNanos=void 0;var ji=N(),tS=BigInt(1e9);function uc(i){return BigInt(i[0])*tS+BigInt(i[1])}he.hrTimeToNanos=uc;function Jd(i){let r=Number(BigInt.asUintN(32,i)),o=Number(BigInt.asUintN(32,i>>BigInt(32)));return{low:r,high:o}}he.toLongBits=Jd;function ac(i){let r=uc(i);return Jd(r)}he.encodeAsLongBits=ac;function Qd(i){return uc(i).toString()}he.encodeAsString=Qd;var rS=typeof BigInt<"u"?Qd:ji.hrTimeToNanoseconds;function Wd(i){return i}function Zd(i){if(i!==void 0)return(0,ji.hexToBase64)(i)}var nS={encodeHrTime:ac,encodeSpanContext:ji.hexToBase64,encodeOptionalSpanContext:Zd};function oS(i){var r,o;if(i===void 0)return nS;let c=(r=i.useLongBits)!==null&&r!==void 0?r:!0,s=(o=i.useHex)!==null&&o!==void 0?o:!1;return{encodeHrTime:c?ac:rS,encodeSpanContext:s?Wd:ji.hexToBase64,encodeOptionalSpanContext:s?Wd:Zd}}he.getOtlpEncoder=oS});var cc=d(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.createExportTraceServiceRequest=void 0;var iS=ic(),sS=Yd(),uS=eh();function aS(i,r){let o=(0,uS.getOtlpEncoder)(r);return{resourceSpans:lS(i,o)}}Gi.createExportTraceServiceRequest=aS;function cS(i){let r=new Map;for(let o of i){let c=r.get(o.resource);c||(c=new Map,r.set(o.resource,c));let s=`${o.instrumentationLibrary.name}@${o.instrumentationLibrary.version||""}:${o.instrumentationLibrary.schemaUrl||""}`,a=c.get(s);a||(a=[],c.set(s,a)),a.push(o)}return r}function lS(i,r){let o=cS(i),c=[],s=o.entries(),a=s.next();for(;!a.done;){let[t,e]=a.value,n=[],u=e.values(),l=u.next();for(;!l.done;){let T=l.value;if(T.length>0){let{name:D,version:L,schemaUrl:x}=T[0].instrumentationLibrary,B=T.map(b=>(0,sS.sdkSpanToOtlpSpan)(b,r));n.push({scope:{name:D,version:L},spans:B,schemaUrl:x})}l=u.next()}let h={resource:{attributes:(0,iS.toAttributes)(t.attributes),droppedAttributesCount:0},scopeSpans:n,schemaUrl:void 0};c.push(h),a=s.next()}return c}});var Et=d(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.parseRetryAfterToMills=k.isExportRetryable=k.invalidTimeout=k.configureExporterTimeout=k.appendRootPathToUrlIfNeeded=k.appendResourcePathToUrl=k.parseHeaders=k.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=k.DEFAULT_EXPORT_MAX_BACKOFF=k.DEFAULT_EXPORT_INITIAL_BACKOFF=k.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var lc=(y(),E(_)),th=N(),rh=1e4;k.DEFAULT_EXPORT_MAX_ATTEMPTS=5;k.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;k.DEFAULT_EXPORT_MAX_BACKOFF=5e3;k.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function pS(i={}){let r={};return Object.entries(i).forEach(([o,c])=>{typeof c<"u"?r[o]=String(c):lc.diag.warn(`Header "${o}" has wrong value and will be ignored`)}),r}k.parseHeaders=pS;function fS(i,r){return i.endsWith("/")||(i=i+"/"),i+r}k.appendResourcePathToUrl=fS;function dS(i){try{let r=new URL(i);return r.pathname===""&&(r.pathname=r.pathname+"/"),r.toString()}catch{return lc.diag.warn(`Could not parse export URL: '${i}'`),i}}k.appendRootPathToUrlIfNeeded=dS;function hS(i){return typeof i=="number"?i<=0?pc(i,rh):i:mS()}k.configureExporterTimeout=hS;function mS(){var i;let r=Number((i=(0,th.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&i!==void 0?i:(0,th.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return r<=0?pc(r,rh):r}function pc(i,r){return lc.diag.warn("Timeout must be greater than 0",i),r}k.invalidTimeout=pc;function _S(i){return[429,502,503,504].includes(i)}k.isExportRetryable=_S;function yS(i){if(i==null)return-1;let r=Number.parseInt(i,10);if(Number.isInteger(r))return r>0?r*1e3:-1;let o=new Date(i).getTime()-Date.now();return o>=0?o:0}k.parseRetryAfterToMills=yS});var Jr=d(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.OTLPExporterBase=void 0;var nh=(y(),E(_)),Wr=N(),ES=Et(),fc=class{constructor(r={}){this._sendingPromises=[],this.url=this.getDefaultUrl(r),typeof r.hostname=="string"&&(this.hostname=r.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new Wr.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof r.concurrencyLimit=="number"?r.concurrencyLimit:30,this.timeoutMillis=(0,ES.configureExporterTimeout)(r.timeoutMillis),this.onInit(r)}export(r,o){if(this._shutdownOnce.isCalled){o({code:Wr.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){o({code:Wr.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(r).then(()=>{o({code:Wr.ExportResultCode.SUCCESS})}).catch(c=>{o({code:Wr.ExportResultCode.FAILED,error:c})})}_export(r){return new Promise((o,c)=>{try{nh.diag.debug("items to be sent",r),this.send(r,o,c)}catch(s){c(s)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return nh.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};Hi.OTLPExporterBase=fc});var hc=d(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.CompressionAlgorithm=void 0;var TS;(function(i){i.NONE="none",i.GZIP="gzip"})(TS=Qr.CompressionAlgorithm||(Qr.CompressionAlgorithm={}))});var Xi=d(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.OTLPExporterError=void 0;var mc=class extends Error{constructor(r,o,c){super(r),this.name="OTLPExporterError",this.data=c,this.code=o}};Ki.OTLPExporterError=mc});var yc=d(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.configureCompression=ze.createHttpAgent=ze.sendWithHttp=void 0;var uh=z("url"),ah=z("http"),ch=z("https"),SS=z("zlib"),bS=z("stream"),_c=(y(),E(_)),zi=hc(),sh=N(),Zr=Xi(),dr=Et();function OS(i,r,o,c,s){let a=i.timeoutMillis,t=new uh.URL(i.url),e=Number(process.versions.node.split(".")[0]),n,u,l=!1,h=setTimeout(()=>{if(clearTimeout(n),l=!0,u.destroyed){let x=new Zr.OTLPExporterError("Request Timeout");s(x)}else e>=14?u.destroy():u.abort()},a),T={hostname:t.hostname,port:t.port,path:t.pathname,method:"POST",headers:Object.assign({"Content-Type":o},i.headers),agent:i.agent},D=t.protocol==="http:"?ah.request:ch.request,L=(x=dr.DEFAULT_EXPORT_MAX_ATTEMPTS,B=dr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{switch(u=D(T,b=>{let S="";b.on("data",K=>S+=K),b.on("aborted",()=>{if(l){let K=new Zr.OTLPExporterError("Request Timeout");s(K)}}),b.on("end",()=>{if(l===!1)if(b.statusCode&&b.statusCode<299)_c.diag.debug(`statusCode: ${b.statusCode}`,S),c(),clearTimeout(h),clearTimeout(n);else if(b.statusCode&&(0,dr.isExportRetryable)(b.statusCode)&&x>0){let K;B=dr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*B,b.headers["retry-after"]?K=(0,dr.parseRetryAfterToMills)(b.headers["retry-after"]):K=Math.round(Math.random()*(dr.DEFAULT_EXPORT_MAX_BACKOFF-B)+B),n=setTimeout(()=>{L(x-1,B)},K)}else{let K=new Zr.OTLPExporterError(b.statusMessage,b.statusCode,S);s(K),clearTimeout(h),clearTimeout(n)}})}),u.on("error",b=>{if(l){let S=new Zr.OTLPExporterError("Request Timeout",b.code);s(S)}else s(b);clearTimeout(h),clearTimeout(n)}),u.on("abort",()=>{if(l){let b=new Zr.OTLPExporterError("Request Timeout");s(b)}clearTimeout(h),clearTimeout(n)}),i.compression){case zi.CompressionAlgorithm.GZIP:{u.setHeader("Content-Encoding","gzip"),AS(r).on("error",s).pipe(SS.createGzip()).on("error",s).pipe(u);break}default:u.end(r);break}};L()}ze.sendWithHttp=OS;function AS(i){let r=new bS.Readable;return r.push(i),r.push(null),r}function PS(i){if(i.httpAgentOptions&&i.keepAlive===!1){_c.diag.warn("httpAgentOptions is used only when keepAlive is true");return}if(!(i.keepAlive===!1||!i.url))try{let o=new uh.URL(i.url).protocol==="http:"?ah.Agent:ch.Agent;return new o(Object.assign({keepAlive:!0},i.httpAgentOptions))}catch(r){_c.diag.error(`collector exporter failed to create http agent. err: ${r.message}`);return}}ze.createHttpAgent=PS;function NS(i){return i||(((0,sh.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,sh.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION)===zi.CompressionAlgorithm.GZIP?zi.CompressionAlgorithm.GZIP:zi.CompressionAlgorithm.NONE)}ze.configureCompression=NS});var fh=d($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.OTLPExporterNodeBase=void 0;var RS=Jr(),xS=Et(),Ec=yc(),lh=(y(),E(_)),ph=N(),gc=class extends RS.OTLPExporterBase{constructor(r={}){super(r),this.DEFAULT_HEADERS={},r.metadata&&lh.diag.warn("Metadata cannot be set when using http"),this.headers=Object.assign(this.DEFAULT_HEADERS,(0,xS.parseHeaders)(r.headers),ph.baggageUtils.parseKeyPairsIntoRecord((0,ph.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)),this.agent=(0,Ec.createHttpAgent)(r),this.compression=(0,Ec.configureCompression)(r.compression)}onInit(r){}send(r,o,c){if(this._shutdownOnce.isCalled){lh.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=new Promise((e,n)=>{(0,Ec.sendWithHttp)(this,JSON.stringify(s),"application/json",e,n)}).then(o,c);this._sendingPromises.push(a);let t=()=>{let e=this._sendingPromises.indexOf(a);this._sendingPromises.splice(e,1)};a.then(t,t)}onShutdown(){}};$i.OTLPExporterNodeBase=gc});var dh=d(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.CompressionAlgorithm=me.configureCompression=me.createHttpAgent=me.sendWithHttp=me.OTLPExporterNodeBase=void 0;var IS=fh();Object.defineProperty(me,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return IS.OTLPExporterNodeBase}});var vc=yc();Object.defineProperty(me,"sendWithHttp",{enumerable:!0,get:function(){return vc.sendWithHttp}});Object.defineProperty(me,"createHttpAgent",{enumerable:!0,get:function(){return vc.createHttpAgent}});Object.defineProperty(me,"configureCompression",{enumerable:!0,get:function(){return vc.configureCompression}});var LS=hc();Object.defineProperty(me,"CompressionAlgorithm",{enumerable:!0,get:function(){return LS.CompressionAlgorithm}})});var Tc=d(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.sendWithXhr=mr.sendWithBeacon=void 0;var hh=(y(),E(_)),en=Xi(),hr=Et();function wS(i,r,o,c,s){if(navigator.sendBeacon(r,new Blob([i],o)))hh.diag.debug("sendBeacon - can send",i),c();else{let a=new en.OTLPExporterError(`sendBeacon - cannot send ${i}`);s(a)}}mr.sendWithBeacon=wS;function MS(i,r,o,c,s,a){let t,e,n=!1,u=setTimeout(()=>{if(clearTimeout(t),n=!0,e.readyState===XMLHttpRequest.DONE){let h=new en.OTLPExporterError("Request Timeout");a(h)}else e.abort()},c),l=(h=hr.DEFAULT_EXPORT_MAX_ATTEMPTS,T=hr.DEFAULT_EXPORT_INITIAL_BACKOFF)=>{e=new XMLHttpRequest,e.open("POST",r),Object.entries(Object.assign(Object.assign({},{Accept:"application/json","Content-Type":"application/json"}),o)).forEach(([L,x])=>{e.setRequestHeader(L,x)}),e.send(i),e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE&&n===!1)if(e.status>=200&&e.status<=299)hh.diag.debug("xhr success",i),s(),clearTimeout(u),clearTimeout(t);else if(e.status&&(0,hr.isExportRetryable)(e.status)&&h>0){let L;T=hr.DEFAULT_EXPORT_BACKOFF_MULTIPLIER*T,e.getResponseHeader("Retry-After")?L=(0,hr.parseRetryAfterToMills)(e.getResponseHeader("Retry-After")):L=Math.round(Math.random()*(hr.DEFAULT_EXPORT_MAX_BACKOFF-T)+T),t=setTimeout(()=>{l(h-1,T)},L)}else{let L=new en.OTLPExporterError(`Failed to export with XHR (status: ${e.status})`,e.status);a(L),clearTimeout(u),clearTimeout(t)}},e.onabort=()=>{if(n){let L=new en.OTLPExporterError("Request Timeout");a(L)}clearTimeout(u),clearTimeout(t)},e.onerror=()=>{if(n){let L=new en.OTLPExporterError("Request Timeout");a(L)}clearTimeout(u),clearTimeout(t)}};l()}mr.sendWithXhr=MS});var _h=d(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.OTLPExporterBrowserBase=void 0;var CS=Jr(),US=Et(),mh=Tc(),DS=(y(),E(_)),Yi=N(),Sc=class extends CS.OTLPExporterBase{constructor(r={}){super(r),this._useXHR=!1,this._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",this._useXHR?this._headers=Object.assign({},(0,US.parseHeaders)(r.headers),Yi.baggageUtils.parseKeyPairsIntoRecord((0,Yi.getEnv)().OTEL_EXPORTER_OTLP_HEADERS)):this._headers={}}onInit(){Yi._globalThis.addEventListener("unload",this.shutdown)}onShutdown(){Yi._globalThis.removeEventListener("unload",this.shutdown)}send(r,o,c){if(this._shutdownOnce.isCalled){DS.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=JSON.stringify(s),t=new Promise((n,u)=>{this._useXHR?(0,mh.sendWithXhr)(a,this.url,this._headers,this.timeoutMillis,n,u):(0,mh.sendWithBeacon)(a,this.url,{type:"application/json"},n,u)}).then(o,c);this._sendingPromises.push(t);let e=()=>{let n=this._sendingPromises.indexOf(t);this._sendingPromises.splice(n,1)};t.then(e,e)}};Wi.OTLPExporterBrowserBase=Sc});var yh=d(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.sendWithXhr=_r.OTLPExporterBrowserBase=void 0;var BS=_h();Object.defineProperty(_r,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return BS.OTLPExporterBrowserBase}});var VS=Tc();Object.defineProperty(_r,"sendWithXhr",{enumerable:!0,get:function(){return VS.sendWithXhr}})});var gh=d(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.sendWithXhr=oe.OTLPExporterBrowserBase=oe.CompressionAlgorithm=oe.configureCompression=oe.createHttpAgent=oe.sendWithHttp=oe.OTLPExporterNodeBase=void 0;var tn=dh();Object.defineProperty(oe,"OTLPExporterNodeBase",{enumerable:!0,get:function(){return tn.OTLPExporterNodeBase}});Object.defineProperty(oe,"sendWithHttp",{enumerable:!0,get:function(){return tn.sendWithHttp}});Object.defineProperty(oe,"createHttpAgent",{enumerable:!0,get:function(){return tn.createHttpAgent}});Object.defineProperty(oe,"configureCompression",{enumerable:!0,get:function(){return tn.configureCompression}});Object.defineProperty(oe,"CompressionAlgorithm",{enumerable:!0,get:function(){return tn.CompressionAlgorithm}});var Eh=yh();Object.defineProperty(oe,"OTLPExporterBrowserBase",{enumerable:!0,get:function(){return Eh.OTLPExporterBrowserBase}});Object.defineProperty(oe,"sendWithXhr",{enumerable:!0,get:function(){return Eh.sendWithXhr}})});var Ji=d(j=>{"use strict";var kS=j&&j.__createBinding||(Object.create?function(i,r,o,c){c===void 0&&(c=o),Object.defineProperty(i,c,{enumerable:!0,get:function(){return r[o]}})}:function(i,r,o,c){c===void 0&&(c=o),i[c]=r[o]}),qS=j&&j.__exportStar||function(i,r){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&kS(r,i,o)};Object.defineProperty(j,"__esModule",{value:!0});j.invalidTimeout=j.configureExporterTimeout=j.appendRootPathToUrlIfNeeded=j.appendResourcePathToUrl=j.parseHeaders=j.OTLPExporterError=j.OTLPExporterBase=void 0;qS(gh(),j);var jS=Jr();Object.defineProperty(j,"OTLPExporterBase",{enumerable:!0,get:function(){return jS.OTLPExporterBase}});var GS=Xi();Object.defineProperty(j,"OTLPExporterError",{enumerable:!0,get:function(){return GS.OTLPExporterError}});var rn=Et();Object.defineProperty(j,"parseHeaders",{enumerable:!0,get:function(){return rn.parseHeaders}});Object.defineProperty(j,"appendResourcePathToUrl",{enumerable:!0,get:function(){return rn.appendResourcePathToUrl}});Object.defineProperty(j,"appendRootPathToUrlIfNeeded",{enumerable:!0,get:function(){return rn.appendRootPathToUrlIfNeeded}});Object.defineProperty(j,"configureExporterTimeout",{enumerable:!0,get:function(){return rn.configureExporterTimeout}});Object.defineProperty(j,"invalidTimeout",{enumerable:!0,get:function(){return rn.invalidTimeout}})});var Th=d((vN,vh)=>{"use strict";vh.exports=HS;function HS(i,r){for(var o=new Array(arguments.length-1),c=0,s=2,a=!0;s<arguments.length;)o[c++]=arguments[s++];return new Promise(function(e,n){o[c]=function(l){if(a)if(a=!1,l)n(l);else{for(var h=new Array(arguments.length-1),T=0;T<h.length;)h[T++]=arguments[T];e.apply(null,h)}};try{i.apply(r||null,o)}catch(u){a&&(a=!1,n(u))}})}});var Ah=d(Oh=>{"use strict";var Qi=Oh;Qi.length=function(r){var o=r.length;if(!o)return 0;for(var c=0;--o%4>1&&r.charAt(o)==="=";)++c;return Math.ceil(r.length*3)/4-c};var yr=new Array(64),bh=new Array(123);for(ve=0;ve<64;)bh[yr[ve]=ve<26?ve+65:ve<52?ve+71:ve<62?ve-4:ve-59|43]=ve++;var ve;Qi.encode=function(r,o,c){for(var s=null,a=[],t=0,e=0,n;o<c;){var u=r[o++];switch(e){case 0:a[t++]=yr[u>>2],n=(u&3)<<4,e=1;break;case 1:a[t++]=yr[n|u>>4],n=(u&15)<<2,e=2;break;case 2:a[t++]=yr[n|u>>6],a[t++]=yr[u&63],e=0;break}t>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,a)),t=0)}return e&&(a[t++]=yr[n],a[t++]=61,e===1&&(a[t++]=61)),s?(t&&s.push(String.fromCharCode.apply(String,a.slice(0,t))),s.join("")):String.fromCharCode.apply(String,a.slice(0,t))};var Sh="invalid encoding";Qi.decode=function(r,o,c){for(var s=c,a=0,t,e=0;e<r.length;){var n=r.charCodeAt(e++);if(n===61&&a>1)break;if((n=bh[n])===void 0)throw Error(Sh);switch(a){case 0:t=n,a=1;break;case 1:o[c++]=t<<2|(n&48)>>4,t=n,a=2;break;case 2:o[c++]=(t&15)<<4|(n&60)>>2,t=n,a=3;break;case 3:o[c++]=(t&3)<<6|n,a=0;break}}if(a===1)throw Error(Sh);return c-s};Qi.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}});var Nh=d((SN,Ph)=>{"use strict";Ph.exports=Zi;function Zi(){this._listeners={}}Zi.prototype.on=function(r,o,c){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:o,ctx:c||this}),this};Zi.prototype.off=function(r,o){if(r===void 0)this._listeners={};else if(o===void 0)this._listeners[r]=[];else for(var c=this._listeners[r],s=0;s<c.length;)c[s].fn===o?c.splice(s,1):++s;return this};Zi.prototype.emit=function(r){var o=this._listeners[r];if(o){for(var c=[],s=1;s<arguments.length;)c.push(arguments[s++]);for(s=0;s<o.length;)o[s].fn.apply(o[s++].ctx,c)}return this}});var Ch=d((bN,Mh)=>{"use strict";Mh.exports=Rh(Rh);function Rh(i){return typeof Float32Array<"u"?function(){var r=new Float32Array([-0]),o=new Uint8Array(r.buffer),c=o[3]===128;function s(n,u,l){r[0]=n,u[l]=o[0],u[l+1]=o[1],u[l+2]=o[2],u[l+3]=o[3]}function a(n,u,l){r[0]=n,u[l]=o[3],u[l+1]=o[2],u[l+2]=o[1],u[l+3]=o[0]}i.writeFloatLE=c?s:a,i.writeFloatBE=c?a:s;function t(n,u){return o[0]=n[u],o[1]=n[u+1],o[2]=n[u+2],o[3]=n[u+3],r[0]}function e(n,u){return o[3]=n[u],o[2]=n[u+1],o[1]=n[u+2],o[0]=n[u+3],r[0]}i.readFloatLE=c?t:e,i.readFloatBE=c?e:t}():function(){function r(c,s,a,t){var e=s<0?1:0;if(e&&(s=-s),s===0)c(1/s>0?0:2147483648,a,t);else if(isNaN(s))c(2143289344,a,t);else if(s>34028234663852886e22)c((e<<31|2139095040)>>>0,a,t);else if(s<11754943508222875e-54)c((e<<31|Math.round(s/1401298464324817e-60))>>>0,a,t);else{var n=Math.floor(Math.log(s)/Math.LN2),u=Math.round(s*Math.pow(2,-n)*8388608)&8388607;c((e<<31|n+127<<23|u)>>>0,a,t)}}i.writeFloatLE=r.bind(null,xh),i.writeFloatBE=r.bind(null,Ih);function o(c,s,a){var t=c(s,a),e=(t>>31)*2+1,n=t>>>23&255,u=t&8388607;return n===255?u?NaN:e*(1/0):n===0?e*1401298464324817e-60*u:e*Math.pow(2,n-150)*(u+8388608)}i.readFloatLE=o.bind(null,Lh),i.readFloatBE=o.bind(null,wh)}(),typeof Float64Array<"u"?function(){var r=new Float64Array([-0]),o=new Uint8Array(r.buffer),c=o[7]===128;function s(n,u,l){r[0]=n,u[l]=o[0],u[l+1]=o[1],u[l+2]=o[2],u[l+3]=o[3],u[l+4]=o[4],u[l+5]=o[5],u[l+6]=o[6],u[l+7]=o[7]}function a(n,u,l){r[0]=n,u[l]=o[7],u[l+1]=o[6],u[l+2]=o[5],u[l+3]=o[4],u[l+4]=o[3],u[l+5]=o[2],u[l+6]=o[1],u[l+7]=o[0]}i.writeDoubleLE=c?s:a,i.writeDoubleBE=c?a:s;function t(n,u){return o[0]=n[u],o[1]=n[u+1],o[2]=n[u+2],o[3]=n[u+3],o[4]=n[u+4],o[5]=n[u+5],o[6]=n[u+6],o[7]=n[u+7],r[0]}function e(n,u){return o[7]=n[u],o[6]=n[u+1],o[5]=n[u+2],o[4]=n[u+3],o[3]=n[u+4],o[2]=n[u+5],o[1]=n[u+6],o[0]=n[u+7],r[0]}i.readDoubleLE=c?t:e,i.readDoubleBE=c?e:t}():function(){function r(c,s,a,t,e,n){var u=t<0?1:0;if(u&&(t=-t),t===0)c(0,e,n+s),c(1/t>0?0:2147483648,e,n+a);else if(isNaN(t))c(0,e,n+s),c(2146959360,e,n+a);else if(t>17976931348623157e292)c(0,e,n+s),c((u<<31|2146435072)>>>0,e,n+a);else{var l;if(t<22250738585072014e-324)l=t/5e-324,c(l>>>0,e,n+s),c((u<<31|l/4294967296)>>>0,e,n+a);else{var h=Math.floor(Math.log(t)/Math.LN2);h===1024&&(h=1023),l=t*Math.pow(2,-h),c(l*4503599627370496>>>0,e,n+s),c((u<<31|h+1023<<20|l*1048576&1048575)>>>0,e,n+a)}}}i.writeDoubleLE=r.bind(null,xh,0,4),i.writeDoubleBE=r.bind(null,Ih,4,0);function o(c,s,a,t,e){var n=c(t,e+s),u=c(t,e+a),l=(u>>31)*2+1,h=u>>>20&2047,T=4294967296*(u&1048575)+n;return h===2047?T?NaN:l*(1/0):h===0?l*5e-324*T:l*Math.pow(2,h-1075)*(T+4503599627370496)}i.readDoubleLE=o.bind(null,Lh,0,4),i.readDoubleBE=o.bind(null,wh,4,0)}(),i}function xh(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}function Ih(i,r,o){r[o]=i>>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255}function Lh(i,r){return(i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24)>>>0}function wh(i,r){return(i[r]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3])>>>0}});var Uh=d((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(i){}return null}});var Bh=d(Dh=>{"use strict";var bc=Dh;bc.length=function(r){for(var o=0,c=0,s=0;s<r.length;++s)c=r.charCodeAt(s),c<128?o+=1:c<2048?o+=2:(c&64512)===55296&&(r.charCodeAt(s+1)&64512)===56320?(++s,o+=4):o+=3;return o};bc.read=function(r,o,c){var s=c-o;if(s<1)return"";for(var a=null,t=[],e=0,n;o<c;)n=r[o++],n<128?t[e++]=n:n>191&&n<224?t[e++]=(n&31)<<6|r[o++]&63:n>239&&n<365?(n=((n&7)<<18|(r[o++]&63)<<12|(r[o++]&63)<<6|r[o++]&63)-65536,t[e++]=55296+(n>>10),t[e++]=56320+(n&1023)):t[e++]=(n&15)<<12|(r[o++]&63)<<6|r[o++]&63,e>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,t)),e=0);return a?(e&&a.push(String.fromCharCode.apply(String,t.slice(0,e))),a.join("")):String.fromCharCode.apply(String,t.slice(0,e))};bc.write=function(r,o,c){for(var s=c,a,t,e=0;e<r.length;++e)a=r.charCodeAt(e),a<128?o[c++]=a:a<2048?(o[c++]=a>>6|192,o[c++]=a&63|128):(a&64512)===55296&&((t=r.charCodeAt(e+1))&64512)===56320?(a=65536+((a&1023)<<10)+(t&1023),++e,o[c++]=a>>18|240,o[c++]=a>>12&63|128,o[c++]=a>>6&63|128,o[c++]=a&63|128):(o[c++]=a>>12|224,o[c++]=a>>6&63|128,o[c++]=a&63|128);return c-s}});var kh=d((AN,Vh)=>{"use strict";Vh.exports=FS;function FS(i,r,o){var c=o||8192,s=c>>>1,a=null,t=c;return function(n){if(n<1||n>s)return i(n);t+n>c&&(a=i(c),t=0);var u=r.call(a,t,t+=n);return t&7&&(t=(t|7)+1),u}}});var jh=d((PN,qh)=>{"use strict";qh.exports=Y;var nn=Ye();function Y(i,r){this.lo=i>>>0,this.hi=r>>>0}var gt=Y.zero=new Y(0,0);gt.toNumber=function(){return 0};gt.zzEncode=gt.zzDecode=function(){return this};gt.length=function(){return 1};var KS=Y.zeroHash="\0\0\0\0\0\0\0\0";Y.fromNumber=function(r){if(r===0)return gt;var o=r<0;o&&(r=-r);var c=r>>>0,s=(r-c)/4294967296>>>0;return o&&(s=~s>>>0,c=~c>>>0,++c>4294967295&&(c=0,++s>4294967295&&(s=0))),new Y(c,s)};Y.from=function(r){if(typeof r=="number")return Y.fromNumber(r);if(nn.isString(r))if(nn.Long)r=nn.Long.fromString(r);else return Y.fromNumber(parseInt(r,10));return r.low||r.high?new Y(r.low>>>0,r.high>>>0):gt};Y.prototype.toNumber=function(r){if(!r&&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};Y.prototype.toLong=function(r){return nn.Long?new nn.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}};var $e=String.prototype.charCodeAt;Y.fromHash=function(r){return r===KS?gt:new Y(($e.call(r,0)|$e.call(r,1)<<8|$e.call(r,2)<<16|$e.call(r,3)<<24)>>>0,($e.call(r,4)|$e.call(r,5)<<8|$e.call(r,6)<<16|$e.call(r,7)<<24)>>>0)};Y.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)};Y.prototype.zzEncode=function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this};Y.prototype.zzDecode=function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this};Y.prototype.length=function(){var r=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,c=this.hi>>>24;return c===0?o===0?r<16384?r<128?1:2:r<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:c<128?9:10}});var Ye=d(Oc=>{"use strict";var g=Oc;g.asPromise=Th();g.base64=Ah();g.EventEmitter=Nh();g.float=Ch();g.inquire=Uh();g.utf8=Bh();g.pool=kh();g.LongBits=jh();g.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);g.global=g.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Oc;g.emptyArray=Object.freeze?Object.freeze([]):[];g.emptyObject=Object.freeze?Object.freeze({}):{};g.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};g.isString=function(r){return typeof r=="string"||r instanceof String};g.isObject=function(r){return r&&typeof r=="object"};g.isset=g.isSet=function(r,o){var c=r[o];return c!=null&&r.hasOwnProperty(o)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1};g.Buffer=function(){try{var i=g.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}();g._Buffer_from=null;g._Buffer_allocUnsafe=null;g.newBuffer=function(r){return typeof r=="number"?g.Buffer?g._Buffer_allocUnsafe(r):new g.Array(r):g.Buffer?g._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)};g.Array=typeof Uint8Array<"u"?Uint8Array:Array;g.Long=g.global.dcodeIO&&g.global.dcodeIO.Long||g.global.Long||g.inquire("long");g.key2Re=/^true|false|0|1$/;g.key32Re=/^-?(?:0|[1-9][0-9]*)$/;g.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;g.longToHash=function(r){return r?g.LongBits.from(r).toHash():g.LongBits.zeroHash};g.longFromHash=function(r,o){var c=g.LongBits.fromHash(r);return g.Long?g.Long.fromBits(c.lo,c.hi,o):c.toNumber(!!o)};function Gh(i,r,o){for(var c=Object.keys(r),s=0;s<c.length;++s)(i[c[s]]===void 0||!o)&&(i[c[s]]=r[c[s]]);return i}g.merge=Gh;g.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function Hh(i){function r(o,c){if(!(this instanceof r))return new r(o,c);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&Gh(this,c)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}g.newError=Hh;g.ProtocolError=Hh("ProtocolError");g.oneOfGetter=function(r){for(var o={},c=0;c<r.length;++c)o[r[c]]=1;return function(){for(var s=Object.keys(this),a=s.length-1;a>-1;--a)if(o[s[a]]===1&&this[s[a]]!==void 0&&this[s[a]]!==null)return s[a]}};g.oneOfSetter=function(r){return function(o){for(var c=0;c<r.length;++c)r[c]!==o&&delete this[r[c]]}};g.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};g._configure=function(){var i=g.Buffer;if(!i){g._Buffer_from=g._Buffer_allocUnsafe=null;return}g._Buffer_from=i.from!==Uint8Array.from&&i.from||function(o,c){return new i(o,c)},g._Buffer_allocUnsafe=i.allocUnsafe||function(o){return new i(o)}}});var Lc=d((RN,zh)=>{"use strict";zh.exports=R;var _e=Ye(),Ac,es=_e.LongBits,Fh=_e.base64,Kh=_e.utf8;function on(i,r,o){this.fn=i,this.len=r,this.next=void 0,this.val=o}function Nc(){}function XS(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function R(){this.len=0,this.head=new on(Nc,0,0),this.tail=this.head,this.states=null}var Xh=function(){return _e.Buffer?function(){return(R.create=function(){return new Ac})()}:function(){return new R}};R.create=Xh();R.alloc=function(r){return new _e.Array(r)};_e.Array!==Array&&(R.alloc=_e.pool(R.alloc,_e.Array.prototype.subarray));R.prototype._push=function(r,o,c){return this.tail=this.tail.next=new on(r,o,c),this.len+=o,this};function Rc(i,r,o){r[o]=i&255}function zS(i,r,o){for(;i>127;)r[o++]=i&127|128,i>>>=7;r[o]=i}function xc(i,r){this.len=i,this.next=void 0,this.val=r}xc.prototype=Object.create(on.prototype);xc.prototype.fn=zS;R.prototype.uint32=function(r){return this.len+=(this.tail=this.tail.next=new xc((r=r>>>0)<128?1:r<16384?2:r<2097152?3:r<268435456?4:5,r)).len,this};R.prototype.int32=function(r){return r<0?this._push(Ic,10,es.fromNumber(r)):this.uint32(r)};R.prototype.sint32=function(r){return this.uint32((r<<1^r>>31)>>>0)};function Ic(i,r,o){for(;i.hi;)r[o++]=i.lo&127|128,i.lo=(i.lo>>>7|i.hi<<25)>>>0,i.hi>>>=7;for(;i.lo>127;)r[o++]=i.lo&127|128,i.lo=i.lo>>>7;r[o++]=i.lo}R.prototype.uint64=function(r){var o=es.from(r);return this._push(Ic,o.length(),o)};R.prototype.int64=R.prototype.uint64;R.prototype.sint64=function(r){var o=es.from(r).zzEncode();return this._push(Ic,o.length(),o)};R.prototype.bool=function(r){return this._push(Rc,1,r?1:0)};function Pc(i,r,o){r[o]=i&255,r[o+1]=i>>>8&255,r[o+2]=i>>>16&255,r[o+3]=i>>>24}R.prototype.fixed32=function(r){return this._push(Pc,4,r>>>0)};R.prototype.sfixed32=R.prototype.fixed32;R.prototype.fixed64=function(r){var o=es.from(r);return this._push(Pc,4,o.lo)._push(Pc,4,o.hi)};R.prototype.sfixed64=R.prototype.fixed64;R.prototype.float=function(r){return this._push(_e.float.writeFloatLE,4,r)};R.prototype.double=function(r){return this._push(_e.float.writeDoubleLE,8,r)};var $S=_e.Array.prototype.set?function(r,o,c){o.set(r,c)}:function(r,o,c){for(var s=0;s<r.length;++s)o[c+s]=r[s]};R.prototype.bytes=function(r){var o=r.length>>>0;if(!o)return this._push(Rc,1,0);if(_e.isString(r)){var c=R.alloc(o=Fh.length(r));Fh.decode(r,c,0),r=c}return this.uint32(o)._push($S,o,r)};R.prototype.string=function(r){var o=Kh.length(r);return o?this.uint32(o)._push(Kh.write,o,r):this._push(Rc,1,0)};R.prototype.fork=function(){return this.states=new XS(this),this.head=this.tail=new on(Nc,0,0),this.len=0,this};R.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 on(Nc,0,0),this.len=0),this};R.prototype.ldelim=function(){var r=this.head,o=this.tail,c=this.len;return this.reset().uint32(c),c&&(this.tail.next=r.next,this.tail=o,this.len+=c),this};R.prototype.finish=function(){for(var r=this.head.next,o=this.constructor.alloc(this.len),c=0;r;)r.fn(r.val,o,c),c+=r.len,r=r.next;return o};R._configure=function(i){Ac=i,R.create=Xh(),Ac._configure()}});var Wh=d((xN,Yh)=>{"use strict";Yh.exports=xe;var $h=Lc();(xe.prototype=Object.create($h.prototype)).constructor=xe;var We=Ye();function xe(){$h.call(this)}xe._configure=function(){xe.alloc=We._Buffer_allocUnsafe,xe.writeBytesBuffer=We.Buffer&&We.Buffer.prototype instanceof Uint8Array&&We.Buffer.prototype.set.name==="set"?function(r,o,c){o.set(r,c)}:function(r,o,c){if(r.copy)r.copy(o,c,0,r.length);else for(var s=0;s<r.length;)o[c++]=r[s++]}};xe.prototype.bytes=function(r){We.isString(r)&&(r=We._Buffer_from(r,"base64"));var o=r.length>>>0;return this.uint32(o),o&&this._push(xe.writeBytesBuffer,o,r),this};function YS(i,r,o){i.length<40?We.utf8.write(i,r,o):r.utf8Write?r.utf8Write(i,o):r.write(i,o)}xe.prototype.string=function(r){var o=We.Buffer.byteLength(r);return this.uint32(o),o&&this._push(YS,o,r),this};xe._configure()});var Cc=d((IN,tm)=>{"use strict";tm.exports=G;var Te=Ye(),Mc,Zh=Te.LongBits,WS=Te.utf8;function Se(i,r){return RangeError("index out of range: "+i.pos+" + "+(r||1)+" > "+i.len)}function G(i){this.buf=i,this.pos=0,this.len=i.length}var Jh=typeof Uint8Array<"u"?function(r){if(r instanceof Uint8Array||Array.isArray(r))return new G(r);throw Error("illegal buffer")}:function(r){if(Array.isArray(r))return new G(r);throw Error("illegal buffer")},em=function(){return Te.Buffer?function(o){return(G.create=function(s){return Te.Buffer.isBuffer(s)?new Mc(s):Jh(s)})(o)}:Jh};G.create=em();G.prototype._slice=Te.Array.prototype.subarray||Te.Array.prototype.slice;G.prototype.uint32=function(){var r=4294967295;return function(){if(r=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(r=(r|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(r=(r|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return r;if((this.pos+=5)>this.len)throw this.pos=this.len,Se(this,10);return r}}();G.prototype.int32=function(){return this.uint32()|0};G.prototype.sint32=function(){var r=this.uint32();return r>>>1^-(r&1)|0};function wc(){var i=new Zh(0,0),r=0;if(this.len-this.pos>4){for(;r<4;++r)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;r=0}else{for(;r<3;++r){if(this.pos>=this.len)throw Se(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<r*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<r*7)>>>0,i}if(this.len-this.pos>4){for(;r<5;++r)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;r<5;++r){if(this.pos>=this.len)throw Se(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<r*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}G.prototype.bool=function(){return this.uint32()!==0};function ts(i,r){return(i[r-4]|i[r-3]<<8|i[r-2]<<16|i[r-1]<<24)>>>0}G.prototype.fixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return ts(this.buf,this.pos+=4)};G.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Se(this,4);return ts(this.buf,this.pos+=4)|0};function Qh(){if(this.pos+8>this.len)throw Se(this,8);return new Zh(ts(this.buf,this.pos+=4),ts(this.buf,this.pos+=4))}G.prototype.float=function(){if(this.pos+4>this.len)throw Se(this,4);var r=Te.float.readFloatLE(this.buf,this.pos);return this.pos+=4,r};G.prototype.double=function(){if(this.pos+8>this.len)throw Se(this,4);var r=Te.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,r};G.prototype.bytes=function(){var r=this.uint32(),o=this.pos,c=this.pos+r;if(c>this.len)throw Se(this,r);if(this.pos+=r,Array.isArray(this.buf))return this.buf.slice(o,c);if(o===c){var s=Te.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,c)};G.prototype.string=function(){var r=this.bytes();return WS.read(r,0,r.length)};G.prototype.skip=function(r){if(typeof r=="number"){if(this.pos+r>this.len)throw Se(this,r);this.pos+=r}else do if(this.pos>=this.len)throw Se(this);while(this.buf[this.pos++]&128);return this};G.prototype.skipType=function(i){switch(i){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(i=this.uint32()&7)!==4;)this.skipType(i);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+i+" at offset "+this.pos)}return this};G._configure=function(i){Mc=i,G.create=em(),Mc._configure();var r=Te.Long?"toLong":"toNumber";Te.merge(G.prototype,{int64:function(){return wc.call(this)[r](!1)},uint64:function(){return wc.call(this)[r](!0)},sint64:function(){return wc.call(this).zzDecode()[r](!1)},fixed64:function(){return Qh.call(this)[r](!0)},sfixed64:function(){return Qh.call(this)[r](!1)}})}});var im=d((LN,om)=>{"use strict";om.exports=vt;var nm=Cc();(vt.prototype=Object.create(nm.prototype)).constructor=vt;var rm=Ye();function vt(i){nm.call(this,i)}vt._configure=function(){rm.Buffer&&(vt.prototype._slice=rm.Buffer.prototype.slice)};vt.prototype.string=function(){var r=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+r,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+r,this.len))};vt._configure()});var um=d((wN,sm)=>{"use strict";sm.exports=sn;var Uc=Ye();(sn.prototype=Object.create(Uc.EventEmitter.prototype)).constructor=sn;function sn(i,r,o){if(typeof i!="function")throw TypeError("rpcImpl must be a function");Uc.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!r,this.responseDelimited=!!o}sn.prototype.rpcCall=function i(r,o,c,s,a){if(!s)throw TypeError("request must be specified");var t=this;if(!a)return Uc.asPromise(i,t,r,o,c,s);if(!t.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return t.rpcImpl(r,o[t.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(n,u){if(n)return t.emit("error",n,r),a(n);if(u===null){t.end(!0);return}if(!(u instanceof c))try{u=c[t.responseDelimited?"decodeDelimited":"decode"](u)}catch(l){return t.emit("error",l,r),a(l)}return t.emit("data",u,r),a(null,u)})}catch(e){t.emit("error",e,r),setTimeout(function(){a(e)},0);return}};sn.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var cm=d(am=>{"use strict";var JS=am;JS.Service=um()});var pm=d((CN,lm)=>{"use strict";lm.exports={}});var hm=d(dm=>{"use strict";var ue=dm;ue.build="minimal";ue.Writer=Lc();ue.BufferWriter=Wh();ue.Reader=Cc();ue.BufferReader=im();ue.util=Ye();ue.rpc=cm();ue.roots=pm();ue.configure=fm;function fm(){ue.util._configure(),ue.Writer._configure(ue.BufferWriter),ue.Reader._configure(ue.BufferReader)}fm()});var _m=d((DN,mm)=>{"use strict";mm.exports=hm()});var Em=d((BN,ym)=>{"use strict";var v=_m(),m=v.Reader,O=v.Writer,f=v.util,p=v.roots.default||(v.roots.default={});p.opentelemetry=function(){var i={};return i.proto=function(){var r={};return r.common=function(){var o={};return o.v1=function(){var c={};return c.AnyValue=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.stringValue=null,s.prototype.boolValue=null,s.prototype.intValue=null,s.prototype.doubleValue=null,s.prototype.arrayValue=null,s.prototype.kvlistValue=null,s.prototype.bytesValue=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){return n||(n=O.create()),e.stringValue!=null&&Object.hasOwnProperty.call(e,"stringValue")&&n.uint32(10).string(e.stringValue),e.boolValue!=null&&Object.hasOwnProperty.call(e,"boolValue")&&n.uint32(16).bool(e.boolValue),e.intValue!=null&&Object.hasOwnProperty.call(e,"intValue")&&n.uint32(24).int64(e.intValue),e.doubleValue!=null&&Object.hasOwnProperty.call(e,"doubleValue")&&n.uint32(33).double(e.doubleValue),e.arrayValue!=null&&Object.hasOwnProperty.call(e,"arrayValue")&&p.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,n.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&Object.hasOwnProperty.call(e,"kvlistValue")&&p.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,n.uint32(50).fork()).ldelim(),e.bytesValue!=null&&Object.hasOwnProperty.call(e,"bytesValue")&&n.uint32(58).bytes(e.bytesValue),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.common.v1.AnyValue;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.stringValue=e.string();break}case 2:{l.boolValue=e.bool();break}case 3:{l.intValue=e.int64();break}case 4:{l.doubleValue=e.double();break}case 5:{l.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{l.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{l.bytesValue=e.bytes();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(n.value=1,!f.isString(e.stringValue)))return"stringValue: string expected";if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.boolValue!="boolean")return"boolValue: boolean expected"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.intValue)&&!(e.intValue&&f.isInteger(e.intValue.low)&&f.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(n.value===1)return"value: multiple values";if(n.value=1,typeof e.doubleValue!="number")return"doubleValue: number expected"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(n.value===1)return"value: multiple values";n.value=1;{var u=p.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(u)return"arrayValue."+u}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(n.value===1)return"value: multiple values";n.value=1;{var u=p.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(u)return"kvlistValue."+u}}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(n.value===1)return"value: multiple values";if(n.value=1,!(e.bytesValue&&typeof e.bytesValue.length=="number"||f.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.common.v1.AnyValue)return e;var n=new p.opentelemetry.proto.common.v1.AnyValue;if(e.stringValue!=null&&(n.stringValue=String(e.stringValue)),e.boolValue!=null&&(n.boolValue=!!e.boolValue),e.intValue!=null&&(f.Long?(n.intValue=f.Long.fromValue(e.intValue)).unsigned=!1:typeof e.intValue=="string"?n.intValue=parseInt(e.intValue,10):typeof e.intValue=="number"?n.intValue=e.intValue:typeof e.intValue=="object"&&(n.intValue=new f.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber())),e.doubleValue!=null&&(n.doubleValue=Number(e.doubleValue)),e.arrayValue!=null){if(typeof e.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");n.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(e.kvlistValue!=null){if(typeof e.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");n.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}return e.bytesValue!=null&&(typeof e.bytesValue=="string"?f.base64.decode(e.bytesValue,n.bytesValue=f.newBuffer(f.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(n.bytesValue=e.bytesValue)),n},s.toObject=function(e,n){n||(n={});var u={};return e.stringValue!=null&&e.hasOwnProperty("stringValue")&&(u.stringValue=e.stringValue,n.oneofs&&(u.value="stringValue")),e.boolValue!=null&&e.hasOwnProperty("boolValue")&&(u.boolValue=e.boolValue,n.oneofs&&(u.value="boolValue")),e.intValue!=null&&e.hasOwnProperty("intValue")&&(typeof e.intValue=="number"?u.intValue=n.longs===String?String(e.intValue):e.intValue:u.intValue=n.longs===String?f.Long.prototype.toString.call(e.intValue):n.longs===Number?new f.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue,n.oneofs&&(u.value="intValue")),e.doubleValue!=null&&e.hasOwnProperty("doubleValue")&&(u.doubleValue=n.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,n.oneofs&&(u.value="doubleValue")),e.arrayValue!=null&&e.hasOwnProperty("arrayValue")&&(u.arrayValue=p.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,n),n.oneofs&&(u.value="arrayValue")),e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")&&(u.kvlistValue=p.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,n),n.oneofs&&(u.value="kvlistValue")),e.bytesValue!=null&&e.hasOwnProperty("bytesValue")&&(u.bytesValue=n.bytes===String?f.base64.encode(e.bytesValue,0,e.bytesValue.length):n.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,n.oneofs&&(u.value="bytesValue")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},s}(),c.ArrayValue=function(){function s(a){if(this.values=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.values=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.AnyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.ArrayValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.values&&u.values.length||(u.values=[]),u.values.push(p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.AnyValue.verify(t.values[e]);if(n)return"values."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.ArrayValue)return t;var e=new p.opentelemetry.proto.common.v1.ArrayValue;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.values[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var u=0;u<t.values.length;++u)n.values[u]=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.ArrayValue"},s}(),c.KeyValueList=function(){function s(a){if(this.values=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.values=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.values!=null&&t.values.length)for(var n=0;n<t.values.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.values[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.KeyValueList;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.values&&u.values.length||(u.values=[]),u.values.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.values[e]);if(n)return"values."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValueList)return t;var e=new p.opentelemetry.proto.common.v1.KeyValueList;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");e.values=[];for(var n=0;n<t.values.length;++n){if(typeof t.values[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");e.values[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.values[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.values=[]),t.values&&t.values.length){n.values=[];for(var u=0;u<t.values.length;++u)n.values[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValueList"},s}(),c.KeyValue=function(){function s(a){if(a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.key=null,s.prototype.value=null,s.create=function(t){return new s(t)},s.encode=function(t,e){return e||(e=O.create()),t.key!=null&&Object.hasOwnProperty.call(t,"key")&&e.uint32(10).string(t.key),t.value!=null&&Object.hasOwnProperty.call(t,"value")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.value,e.uint32(18).fork()).ldelim(),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.KeyValue;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.key=t.string();break}case 2:{u.value=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.key!=null&&t.hasOwnProperty("key")&&!f.isString(t.key))return"key: string expected";if(t.value!=null&&t.hasOwnProperty("value")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.value);if(e)return"value."+e}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.KeyValue)return t;var e=new p.opentelemetry.proto.common.v1.KeyValue;if(t.key!=null&&(e.key=String(t.key)),t.value!=null){if(typeof t.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");e.value=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.value)}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.key="",n.value=null),t.key!=null&&t.hasOwnProperty("key")&&(n.key=t.key),t.value!=null&&t.hasOwnProperty("value")&&(n.value=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.value,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.KeyValue"},s}(),c.InstrumentationScope=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.name=null,s.prototype.version=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(10).string(t.name),t.version!=null&&Object.hasOwnProperty.call(t,"version")&&e.uint32(18).string(t.version),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(32).uint32(t.droppedAttributesCount),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.common.v1.InstrumentationScope;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.name=t.string();break}case 2:{u.version=t.string();break}case 3:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{u.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";if(t.version!=null&&t.hasOwnProperty("version")&&!f.isString(t.version))return"version: string expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.common.v1.InstrumentationScope)return t;var e=new p.opentelemetry.proto.common.v1.InstrumentationScope;if(t.name!=null&&(e.name=String(t.name)),t.version!=null&&(e.version=String(t.version)),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.name="",n.version="",n.droppedAttributesCount=0),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.version!=null&&t.hasOwnProperty("version")&&(n.version=t.version),t.attributes&&t.attributes.length){n.attributes=[];for(var u=0;u<t.attributes.length;++u)n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[u],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.common.v1.InstrumentationScope"},s}(),c}(),o}(),r.resource=function(){var o={};return o.v1=function(){var c={};return c.Resource=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(10).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(16).uint32(t.droppedAttributesCount),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.resource.v1.Resource;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{u.droppedAttributesCount=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.resource.v1.Resource)return t;var e=new p.opentelemetry.proto.resource.v1.Resource;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults&&(n.droppedAttributesCount=0),t.attributes&&t.attributes.length){n.attributes=[];for(var u=0;u<t.attributes.length;++u)n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[u],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.resource.v1.Resource"},s}(),c}(),o}(),r.trace=function(){var o={};return o.v1=function(){var c={};return c.TracesData=function(){function s(a){if(this.resourceSpans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceSpans=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceSpans!=null&&t.resourceSpans.length)for(var n=0;n<t.resourceSpans.length;++n)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.TracesData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceSpans&&u.resourceSpans.length||(u.resourceSpans=[]),u.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.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 e=0;e<t.resourceSpans.length;++e){var n=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[e]);if(n)return"resourceSpans."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.TracesData)return t;var e=new p.opentelemetry.proto.trace.v1.TracesData;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");e.resourceSpans=[];for(var n=0;n<t.resourceSpans.length;++n){if(typeof t.resourceSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");e.resourceSpans[n]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceSpans=[]),t.resourceSpans&&t.resourceSpans.length){n.resourceSpans=[];for(var u=0;u<t.resourceSpans.length;++u)n.resourceSpans[u]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.TracesData"},s}(),c.ResourceSpans=function(){function s(a){if(this.scopeSpans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeSpans=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeSpans!=null&&t.scopeSpans.length)for(var n=0;n<t.scopeSpans.length;++n)p.opentelemetry.proto.trace.v1.ScopeSpans.encode(t.scopeSpans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.ResourceSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeSpans&&u.scopeSpans.length||(u.scopeSpans=[]),u.scopeSpans.push(p.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeSpans!=null&&t.hasOwnProperty("scopeSpans")){if(!Array.isArray(t.scopeSpans))return"scopeSpans: array expected";for(var n=0;n<t.scopeSpans.length;++n){var e=p.opentelemetry.proto.trace.v1.ScopeSpans.verify(t.scopeSpans[n]);if(e)return"scopeSpans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ResourceSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ResourceSpans;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeSpans){if(!Array.isArray(t.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");e.scopeSpans=[];for(var n=0;n<t.scopeSpans.length;++n){if(typeof t.scopeSpans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");e.scopeSpans[n]=p.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(t.scopeSpans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeSpans=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeSpans&&t.scopeSpans.length){n.scopeSpans=[];for(var u=0;u<t.scopeSpans.length;++u)n.scopeSpans[u]=p.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ResourceSpans"},s}(),c.ScopeSpans=function(){function s(a){if(this.spans=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.spans=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.spans!=null&&t.spans.length)for(var n=0;n<t.spans.length;++n)p.opentelemetry.proto.trace.v1.Span.encode(t.spans[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.ScopeSpans;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.spans&&u.spans.length||(u.spans=[]),u.spans.push(p.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.spans!=null&&t.hasOwnProperty("spans")){if(!Array.isArray(t.spans))return"spans: array expected";for(var n=0;n<t.spans.length;++n){var e=p.opentelemetry.proto.trace.v1.Span.verify(t.spans[n]);if(e)return"spans."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.ScopeSpans)return t;var e=new p.opentelemetry.proto.trace.v1.ScopeSpans;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.spans){if(!Array.isArray(t.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");e.spans=[];for(var n=0;n<t.spans.length;++n){if(typeof t.spans[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");e.spans[n]=p.opentelemetry.proto.trace.v1.Span.fromObject(t.spans[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.spans=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.spans&&t.spans.length){n.spans=[];for(var u=0;u<t.spans.length;++u)n.spans[u]=p.opentelemetry.proto.trace.v1.Span.toObject(t.spans[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.ScopeSpans"},s}(),c.Span=function(){function s(a){if(this.attributes=[],this.events=[],this.links=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.parentSpanId=null,s.prototype.name=null,s.prototype.kind=null,s.prototype.startTimeUnixNano=null,s.prototype.endTimeUnixNano=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.events=f.emptyArray,s.prototype.droppedEventsCount=null,s.prototype.links=f.emptyArray,s.prototype.droppedLinksCount=null,s.prototype.status=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(10).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(18).bytes(t.spanId),t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState")&&e.uint32(26).string(t.traceState),t.parentSpanId!=null&&Object.hasOwnProperty.call(t,"parentSpanId")&&e.uint32(34).bytes(t.parentSpanId),t.name!=null&&Object.hasOwnProperty.call(t,"name")&&e.uint32(42).string(t.name),t.kind!=null&&Object.hasOwnProperty.call(t,"kind")&&e.uint32(48).int32(t.kind),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(57).fixed64(t.startTimeUnixNano),t.endTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"endTimeUnixNano")&&e.uint32(65).fixed64(t.endTimeUnixNano),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(80).uint32(t.droppedAttributesCount),t.events!=null&&t.events.length)for(var n=0;n<t.events.length;++n)p.opentelemetry.proto.trace.v1.Span.Event.encode(t.events[n],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&Object.hasOwnProperty.call(t,"droppedEventsCount")&&e.uint32(96).uint32(t.droppedEventsCount),t.links!=null&&t.links.length)for(var n=0;n<t.links.length;++n)p.opentelemetry.proto.trace.v1.Span.Link.encode(t.links[n],e.uint32(106).fork()).ldelim();return t.droppedLinksCount!=null&&Object.hasOwnProperty.call(t,"droppedLinksCount")&&e.uint32(112).uint32(t.droppedLinksCount),t.status!=null&&Object.hasOwnProperty.call(t,"status")&&p.opentelemetry.proto.trace.v1.Status.encode(t.status,e.uint32(122).fork()).ldelim(),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.Span;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.traceId=t.bytes();break}case 2:{u.spanId=t.bytes();break}case 3:{u.traceState=t.string();break}case 4:{u.parentSpanId=t.bytes();break}case 5:{u.name=t.string();break}case 6:{u.kind=t.int32();break}case 7:{u.startTimeUnixNano=t.fixed64();break}case 8:{u.endTimeUnixNano=t.fixed64();break}case 9:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{u.droppedAttributesCount=t.uint32();break}case 11:{u.events&&u.events.length||(u.events=[]),u.events.push(p.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{u.droppedEventsCount=t.uint32();break}case 13:{u.links&&u.links.length||(u.links=[]),u.links.push(p.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{u.droppedLinksCount=t.uint32();break}case 15:{u.status=p.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.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"||f.isString(t.traceId)))return"traceId: buffer expected";if(t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId)))return"spanId: buffer expected";if(t.traceState!=null&&t.hasOwnProperty("traceState")&&!f.isString(t.traceState))return"traceState: string expected";if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&!(t.parentSpanId&&typeof t.parentSpanId.length=="number"||f.isString(t.parentSpanId)))return"parentSpanId: buffer expected";if(t.name!=null&&t.hasOwnProperty("name")&&!f.isString(t.name))return"name: string expected";if(t.kind!=null&&t.hasOwnProperty("kind"))switch(t.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&!f.isInteger(t.endTimeUnixNano)&&!(t.endTimeUnixNano&&f.isInteger(t.endTimeUnixNano.low)&&f.isInteger(t.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(t.events!=null&&t.hasOwnProperty("events")){if(!Array.isArray(t.events))return"events: array expected";for(var e=0;e<t.events.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Event.verify(t.events[e]);if(n)return"events."+n}}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&!f.isInteger(t.droppedEventsCount))return"droppedEventsCount: integer expected";if(t.links!=null&&t.hasOwnProperty("links")){if(!Array.isArray(t.links))return"links: array expected";for(var e=0;e<t.links.length;++e){var n=p.opentelemetry.proto.trace.v1.Span.Link.verify(t.links[e]);if(n)return"links."+n}}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&!f.isInteger(t.droppedLinksCount))return"droppedLinksCount: integer expected";if(t.status!=null&&t.hasOwnProperty("status")){var n=p.opentelemetry.proto.trace.v1.Status.verify(t.status);if(n)return"status."+n}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Span)return t;var e=new p.opentelemetry.proto.trace.v1.Span;switch(t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,e.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,e.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),t.traceState!=null&&(e.traceState=String(t.traceState)),t.parentSpanId!=null&&(typeof t.parentSpanId=="string"?f.base64.decode(t.parentSpanId,e.parentSpanId=f.newBuffer(f.base64.length(t.parentSpanId)),0):t.parentSpanId.length>=0&&(e.parentSpanId=t.parentSpanId)),t.name!=null&&(e.name=String(t.name)),t.kind){default:if(typeof t.kind=="number"){e.kind=t.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:e.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:e.kind=1;break;case"SPAN_KIND_SERVER":case 2:e.kind=2;break;case"SPAN_KIND_CLIENT":case 3:e.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:e.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:e.kind=5;break}if(t.startTimeUnixNano!=null&&(f.Long?(e.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.endTimeUnixNano!=null&&(f.Long?(e.endTimeUnixNano=f.Long.fromValue(t.endTimeUnixNano)).unsigned=!1:typeof t.endTimeUnixNano=="string"?e.endTimeUnixNano=parseInt(t.endTimeUnixNano,10):typeof t.endTimeUnixNano=="number"?e.endTimeUnixNano=t.endTimeUnixNano:typeof t.endTimeUnixNano=="object"&&(e.endTimeUnixNano=new f.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber())),t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.events){if(!Array.isArray(t.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");e.events=[];for(var n=0;n<t.events.length;++n){if(typeof t.events[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");e.events[n]=p.opentelemetry.proto.trace.v1.Span.Event.fromObject(t.events[n])}}if(t.droppedEventsCount!=null&&(e.droppedEventsCount=t.droppedEventsCount>>>0),t.links){if(!Array.isArray(t.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");e.links=[];for(var n=0;n<t.links.length;++n){if(typeof t.links[n]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");e.links[n]=p.opentelemetry.proto.trace.v1.Span.Link.fromObject(t.links[n])}}if(t.droppedLinksCount!=null&&(e.droppedLinksCount=t.droppedLinksCount>>>0),t.status!=null){if(typeof t.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");e.status=p.opentelemetry.proto.trace.v1.Status.fromObject(t.status)}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[],n.events=[],n.links=[]),e.defaults){if(e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=f.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=f.newBuffer(n.spanId))),n.traceState="",e.bytes===String?n.parentSpanId="":(n.parentSpanId=[],e.bytes!==Array&&(n.parentSpanId=f.newBuffer(n.parentSpanId))),n.name="",n.kind=e.enums===String?"SPAN_KIND_UNSPECIFIED":0,f.Long){var u=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.endTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.endTimeUnixNano=e.longs===String?"0":0;n.droppedAttributesCount=0,n.droppedEventsCount=0,n.droppedLinksCount=0,n.status=null}if(t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.traceState!=null&&t.hasOwnProperty("traceState")&&(n.traceState=t.traceState),t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")&&(n.parentSpanId=e.bytes===String?f.base64.encode(t.parentSpanId,0,t.parentSpanId.length):e.bytes===Array?Array.prototype.slice.call(t.parentSpanId):t.parentSpanId),t.name!=null&&t.hasOwnProperty("name")&&(n.name=t.name),t.kind!=null&&t.hasOwnProperty("kind")&&(n.kind=e.enums===String?p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]===void 0?t.kind:p.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]:t.kind),t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")&&(typeof t.endTimeUnixNano=="number"?n.endTimeUnixNano=e.longs===String?String(t.endTimeUnixNano):t.endTimeUnixNano:n.endTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.endTimeUnixNano):e.longs===Number?new f.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber():t.endTimeUnixNano),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.events&&t.events.length){n.events=[];for(var l=0;l<t.events.length;++l)n.events[l]=p.opentelemetry.proto.trace.v1.Span.Event.toObject(t.events[l],e)}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")&&(n.droppedEventsCount=t.droppedEventsCount),t.links&&t.links.length){n.links=[];for(var l=0;l<t.links.length;++l)n.links[l]=p.opentelemetry.proto.trace.v1.Span.Link.toObject(t.links[l],e)}return t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")&&(n.droppedLinksCount=t.droppedLinksCount),t.status!=null&&t.hasOwnProperty("status")&&(n.status=p.opentelemetry.proto.trace.v1.Status.toObject(t.status,e)),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Span"},s.SpanKind=function(){var a={},t=Object.create(a);return t[a[0]="SPAN_KIND_UNSPECIFIED"]=0,t[a[1]="SPAN_KIND_INTERNAL"]=1,t[a[2]="SPAN_KIND_SERVER"]=2,t[a[3]="SPAN_KIND_CLIENT"]=3,t[a[4]="SPAN_KIND_PRODUCER"]=4,t[a[5]="SPAN_KIND_CONSUMER"]=5,t}(),s.Event=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.timeUnixNano=null,a.prototype.name=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(32).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Event;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.timeUnixNano=e.fixed64();break}case 2:{l.name=e.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var u=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(u)return"attributes."+u}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Event)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.name!=null&&(n.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;u.name="",u.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.name!=null&&e.hasOwnProperty("name")&&(u.name=e.name),e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=e.droppedAttributesCount),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},a}(),s.Link=function(){function a(t){if(this.attributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.attributes=f.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(10).bytes(e.traceId),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(18).bytes(e.spanId),e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState")&&n.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&n.uint32(40).uint32(e.droppedAttributesCount),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.trace.v1.Span.Link;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.traceId=e.bytes();break}case 2:{l.spanId=e.bytes();break}case 3:{l.traceState=e.string();break}case 4:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{l.droppedAttributesCount=e.uint32();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.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"||f.isString(e.traceId)))return"traceId: buffer expected";if(e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId)))return"spanId: buffer expected";if(e.traceState!=null&&e.hasOwnProperty("traceState")&&!f.isString(e.traceState))return"traceState: string expected";if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n){var u=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]);if(u)return"attributes."+u}}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.trace.v1.Span.Link)return e;var n=new p.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceState!=null&&(n.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}return e.droppedAttributesCount!=null&&(n.droppedAttributesCount=e.droppedAttributesCount>>>0),n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[]),n.defaults&&(n.bytes===String?u.traceId="":(u.traceId=[],n.bytes!==Array&&(u.traceId=f.newBuffer(u.traceId))),n.bytes===String?u.spanId="":(u.spanId=[],n.bytes!==Array&&(u.spanId=f.newBuffer(u.spanId))),u.traceState="",u.droppedAttributesCount=0),e.traceId!=null&&e.hasOwnProperty("traceId")&&(u.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.spanId!=null&&e.hasOwnProperty("spanId")&&(u.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceState!=null&&e.hasOwnProperty("traceState")&&(u.traceState=e.traceState),e.attributes&&e.attributes.length){u.attributes=[];for(var l=0;l<e.attributes.length;++l)u.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[l],n)}return e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=e.droppedAttributesCount),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},a}(),s}(),c.Status=function(){function s(a){if(a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.message=null,s.prototype.code=null,s.create=function(t){return new s(t)},s.encode=function(t,e){return e||(e=O.create()),t.message!=null&&Object.hasOwnProperty.call(t,"message")&&e.uint32(18).string(t.message),t.code!=null&&Object.hasOwnProperty.call(t,"code")&&e.uint32(24).int32(t.code),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.trace.v1.Status;t.pos<n;){var l=t.uint32();switch(l>>>3){case 2:{u.message=t.string();break}case 3:{u.code=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.message!=null&&t.hasOwnProperty("message")&&!f.isString(t.message))return"message: string expected";if(t.code!=null&&t.hasOwnProperty("code"))switch(t.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.trace.v1.Status)return t;var e=new p.opentelemetry.proto.trace.v1.Status;switch(t.message!=null&&(e.message=String(t.message)),t.code){default:if(typeof t.code=="number"){e.code=t.code;break}break;case"STATUS_CODE_UNSET":case 0:e.code=0;break;case"STATUS_CODE_OK":case 1:e.code=1;break;case"STATUS_CODE_ERROR":case 2:e.code=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};return e.defaults&&(n.message="",n.code=e.enums===String?"STATUS_CODE_UNSET":0),t.message!=null&&t.hasOwnProperty("message")&&(n.message=t.message),t.code!=null&&t.hasOwnProperty("code")&&(n.code=e.enums===String?p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]===void 0?t.code:p.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]:t.code),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.trace.v1.Status"},s.StatusCode=function(){var a={},t=Object.create(a);return t[a[0]="STATUS_CODE_UNSET"]=0,t[a[1]="STATUS_CODE_OK"]=1,t[a[2]="STATUS_CODE_ERROR"]=2,t}(),s}(),c}(),o}(),r.collector=function(){var o={};return o.trace=function(){var c={};return c.v1=function(){var s={};return s.TraceService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportTraceServiceRequest=function(){function a(t){if(this.resourceSpans=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceSpans=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceSpans!=null&&e.resourceSpans.length)for(var u=0;u<e.resourceSpans.length;++u)p.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(p.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.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 n=0;n<e.resourceSpans.length;++n){var u=p.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[n]);if(u)return"resourceSpans."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");n.resourceSpans=[];for(var u=0;u<e.resourceSpans.length;++u){if(typeof e.resourceSpans[u]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");n.resourceSpans[u]=p.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){u.resourceSpans=[];for(var l=0;l<e.resourceSpans.length;++l)u.resourceSpans[l]=p.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a}(),s.ExportTraceServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a}(),s.ExportTracePartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedSpans=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans")&&n.uint32(8).int64(e.rejectedSpans),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedSpans=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&!f.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&f.isInteger(e.rejectedSpans.low)&&f.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var n=new p.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return e.rejectedSpans!=null&&(f.Long?(n.rejectedSpans=f.Long.fromValue(e.rejectedSpans)).unsigned=!1:typeof e.rejectedSpans=="string"?n.rejectedSpans=parseInt(e.rejectedSpans,10):typeof e.rejectedSpans=="number"?n.rejectedSpans=e.rejectedSpans:typeof e.rejectedSpans=="object"&&(n.rejectedSpans=new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedSpans=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedSpans=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")&&(typeof e.rejectedSpans=="number"?u.rejectedSpans=n.longs===String?String(e.rejectedSpans):e.rejectedSpans:u.rejectedSpans=n.longs===String?f.Long.prototype.toString.call(e.rejectedSpans):n.longs===Number?new f.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a}(),s}(),c}(),o.metrics=function(){var c={};return c.v1=function(){var s={};return s.MetricsService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportMetricsServiceRequest=function(){function a(t){if(this.resourceMetrics=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceMetrics=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceMetrics!=null&&e.resourceMetrics.length)for(var u=0;u<e.resourceMetrics.length;++u)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.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 n=0;n<e.resourceMetrics.length;++n){var u=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[n]);if(u)return"resourceMetrics."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");n.resourceMetrics=[];for(var u=0;u<e.resourceMetrics.length;++u){if(typeof e.resourceMetrics[u]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");n.resourceMetrics[u]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){u.resourceMetrics=[];for(var l=0;l<e.resourceMetrics.length;++l)u.resourceMetrics[l]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a}(),s.ExportMetricsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a}(),s.ExportMetricsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedDataPoints=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&n.uint32(8).int64(e.rejectedDataPoints),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedDataPoints=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&!f.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&f.isInteger(e.rejectedDataPoints.low)&&f.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return e.rejectedDataPoints!=null&&(f.Long?(n.rejectedDataPoints=f.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:typeof e.rejectedDataPoints=="string"?n.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):typeof e.rejectedDataPoints=="number"?n.rejectedDataPoints=e.rejectedDataPoints:typeof e.rejectedDataPoints=="object"&&(n.rejectedDataPoints=new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedDataPoints=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedDataPoints=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")&&(typeof e.rejectedDataPoints=="number"?u.rejectedDataPoints=n.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:u.rejectedDataPoints=n.longs===String?f.Long.prototype.toString.call(e.rejectedDataPoints):n.longs===Number?new f.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a}(),s}(),c}(),o.logs=function(){var c={};return c.v1=function(){var s={};return s.LogsService=function(){function a(t,e,n){v.rpc.Service.call(this,t,e,n)}return(a.prototype=Object.create(v.rpc.Service.prototype)).constructor=a,a.create=function(e,n,u){return new this(e,n,u)},Object.defineProperty(a.prototype.export=function t(e,n){return this.rpcCall(t,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,e,n)},"name",{value:"Export"}),a}(),s.ExportLogsServiceRequest=function(){function a(t){if(this.resourceLogs=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.resourceLogs=f.emptyArray,a.create=function(e){return new a(e)},a.encode=function(e,n){if(n||(n=O.create()),e.resourceLogs!=null&&e.resourceLogs.length)for(var u=0;u<e.resourceLogs.length;++u)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[u],n.uint32(10).fork()).ldelim();return n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.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 n=0;n<e.resourceLogs.length;++n){var u=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[n]);if(u)return"resourceLogs."+u}}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");n.resourceLogs=[];for(var u=0;u<e.resourceLogs.length;++u){if(typeof e.resourceLogs[u]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");n.resourceLogs[u]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[u])}}return n},a.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){u.resourceLogs=[];for(var l=0;l<e.resourceLogs.length;++l)u.resourceLogs[l]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[l],n)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a}(),s.ExportLogsServiceResponse=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.partialSuccess=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess")&&p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,n.uint32(10).fork()).ldelim(),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var n=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(n)return"partialSuccess."+n}return null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");n.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.partialSuccess=null),e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")&&(u.partialSuccess=p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,n)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a}(),s.ExportLogsPartialSuccess=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.rejectedLogRecords=null,a.prototype.errorMessage=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&n.uint32(8).int64(e.rejectedLogRecords),e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage")&&n.uint32(18).string(e.errorMessage),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.rejectedLogRecords=e.int64();break}case 2:{l.errorMessage=e.string();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&!f.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&f.isInteger(e.rejectedLogRecords.low)&&f.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&!f.isString(e.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var n=new p.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return e.rejectedLogRecords!=null&&(f.Long?(n.rejectedLogRecords=f.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:typeof e.rejectedLogRecords=="string"?n.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):typeof e.rejectedLogRecords=="number"?n.rejectedLogRecords=e.rejectedLogRecords:typeof e.rejectedLogRecords=="object"&&(n.rejectedLogRecords=new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),e.errorMessage!=null&&(n.errorMessage=String(e.errorMessage)),n},a.toObject=function(e,n){n||(n={});var u={};if(n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.rejectedLogRecords=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.rejectedLogRecords=n.longs===String?"0":0;u.errorMessage=""}return e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")&&(typeof e.rejectedLogRecords=="number"?u.rejectedLogRecords=n.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:u.rejectedLogRecords=n.longs===String?f.Long.prototype.toString.call(e.rejectedLogRecords):n.longs===Number?new f.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),e.errorMessage!=null&&e.hasOwnProperty("errorMessage")&&(u.errorMessage=e.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a}(),s}(),c}(),o}(),r.metrics=function(){var o={};return o.v1=function(){var c={};return c.MetricsData=function(){function s(a){if(this.resourceMetrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceMetrics=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceMetrics!=null&&t.resourceMetrics.length)for(var n=0;n<t.resourceMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.MetricsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceMetrics&&u.resourceMetrics.length||(u.resourceMetrics=[]),u.resourceMetrics.push(p.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.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 e=0;e<t.resourceMetrics.length;++e){var n=p.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[e]);if(n)return"resourceMetrics."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.MetricsData)return t;var e=new p.opentelemetry.proto.metrics.v1.MetricsData;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");e.resourceMetrics=[];for(var n=0;n<t.resourceMetrics.length;++n){if(typeof t.resourceMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");e.resourceMetrics[n]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceMetrics=[]),t.resourceMetrics&&t.resourceMetrics.length){n.resourceMetrics=[];for(var u=0;u<t.resourceMetrics.length;++u)n.resourceMetrics[u]=p.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.MetricsData"},s}(),c.ResourceMetrics=function(){function s(a){if(this.scopeMetrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeMetrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeMetrics!=null&&t.scopeMetrics.length)for(var n=0;n<t.scopeMetrics.length;++n)p.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(t.scopeMetrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeMetrics&&u.scopeMetrics.length||(u.scopeMetrics=[]),u.scopeMetrics.push(p.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeMetrics!=null&&t.hasOwnProperty("scopeMetrics")){if(!Array.isArray(t.scopeMetrics))return"scopeMetrics: array expected";for(var n=0;n<t.scopeMetrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(t.scopeMetrics[n]);if(e)return"scopeMetrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ResourceMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ResourceMetrics;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeMetrics){if(!Array.isArray(t.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");e.scopeMetrics=[];for(var n=0;n<t.scopeMetrics.length;++n){if(typeof t.scopeMetrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");e.scopeMetrics[n]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(t.scopeMetrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeMetrics=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeMetrics&&t.scopeMetrics.length){n.scopeMetrics=[];for(var u=0;u<t.scopeMetrics.length;++u)n.scopeMetrics[u]=p.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},s}(),c.ScopeMetrics=function(){function s(a){if(this.metrics=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.metrics=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.metrics!=null&&t.metrics.length)for(var n=0;n<t.metrics.length;++n)p.opentelemetry.proto.metrics.v1.Metric.encode(t.metrics[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.metrics&&u.metrics.length||(u.metrics=[]),u.metrics.push(p.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.metrics!=null&&t.hasOwnProperty("metrics")){if(!Array.isArray(t.metrics))return"metrics: array expected";for(var n=0;n<t.metrics.length;++n){var e=p.opentelemetry.proto.metrics.v1.Metric.verify(t.metrics[n]);if(e)return"metrics."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ScopeMetrics)return t;var e=new p.opentelemetry.proto.metrics.v1.ScopeMetrics;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.metrics){if(!Array.isArray(t.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");e.metrics=[];for(var n=0;n<t.metrics.length;++n){if(typeof t.metrics[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");e.metrics[n]=p.opentelemetry.proto.metrics.v1.Metric.fromObject(t.metrics[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.metrics=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.metrics&&t.metrics.length){n.metrics=[];for(var u=0;u<t.metrics.length;++u)n.metrics[u]=p.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},s}(),c.Metric=function(){function s(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.name=null,s.prototype.description=null,s.prototype.unit=null,s.prototype.gauge=null,s.prototype.sum=null,s.prototype.histogram=null,s.prototype.exponentialHistogram=null,s.prototype.summary=null;var a;return Object.defineProperty(s.prototype,"data",{get:f.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){return n||(n=O.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&n.uint32(10).string(e.name),e.description!=null&&Object.hasOwnProperty.call(e,"description")&&n.uint32(18).string(e.description),e.unit!=null&&Object.hasOwnProperty.call(e,"unit")&&n.uint32(26).string(e.unit),e.gauge!=null&&Object.hasOwnProperty.call(e,"gauge")&&p.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,n.uint32(42).fork()).ldelim(),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&p.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,n.uint32(58).fork()).ldelim(),e.histogram!=null&&Object.hasOwnProperty.call(e,"histogram")&&p.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,n.uint32(74).fork()).ldelim(),e.exponentialHistogram!=null&&Object.hasOwnProperty.call(e,"exponentialHistogram")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,n.uint32(82).fork()).ldelim(),e.summary!=null&&Object.hasOwnProperty.call(e,"summary")&&p.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,n.uint32(90).fork()).ldelim(),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Metric;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.name=e.string();break}case 2:{l.description=e.string();break}case 3:{l.unit=e.string();break}case 5:{l.gauge=p.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{l.sum=p.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{l.histogram=p.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{l.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{l.summary=p.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.description!=null&&e.hasOwnProperty("description")&&!f.isString(e.description))return"description: string expected";if(e.unit!=null&&e.hasOwnProperty("unit")&&!f.isString(e.unit))return"unit: string expected";if(e.gauge!=null&&e.hasOwnProperty("gauge")){n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(u)return"gauge."+u}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(u)return"sum."+u}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(u)return"histogram."+u}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(u)return"exponentialHistogram."+u}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(n.data===1)return"data: multiple values";n.data=1;{var u=p.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(u)return"summary."+u}}return null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Metric)return e;var n=new p.opentelemetry.proto.metrics.v1.Metric;if(e.name!=null&&(n.name=String(e.name)),e.description!=null&&(n.description=String(e.description)),e.unit!=null&&(n.unit=String(e.unit)),e.gauge!=null){if(typeof e.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");n.gauge=p.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(e.sum!=null){if(typeof e.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");n.sum=p.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(e.histogram!=null){if(typeof e.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");n.histogram=p.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(e.exponentialHistogram!=null){if(typeof e.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");n.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(e.summary!=null){if(typeof e.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");n.summary=p.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}return n},s.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.name="",u.description="",u.unit=""),e.name!=null&&e.hasOwnProperty("name")&&(u.name=e.name),e.description!=null&&e.hasOwnProperty("description")&&(u.description=e.description),e.unit!=null&&e.hasOwnProperty("unit")&&(u.unit=e.unit),e.gauge!=null&&e.hasOwnProperty("gauge")&&(u.gauge=p.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,n),n.oneofs&&(u.data="gauge")),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=p.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,n),n.oneofs&&(u.data="sum")),e.histogram!=null&&e.hasOwnProperty("histogram")&&(u.histogram=p.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,n),n.oneofs&&(u.data="histogram")),e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")&&(u.exponentialHistogram=p.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,n),n.oneofs&&(u.data="exponentialHistogram")),e.summary!=null&&e.hasOwnProperty("summary")&&(u.summary=p.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,n),n.oneofs&&(u.data="summary")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},s}(),c.Gauge=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Gauge;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Gauge)return t;var e=new p.opentelemetry.proto.metrics.v1.Gauge;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Gauge"},s}(),c.Sum=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.prototype.isMonotonic=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),t.isMonotonic!=null&&Object.hasOwnProperty.call(t,"isMonotonic")&&e.uint32(24).bool(t.isMonotonic),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Sum;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}case 3:{u.isMonotonic=t.bool();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&typeof t.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Sum)return t;var e=new p.opentelemetry.proto.metrics.v1.Sum;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return t.isMonotonic!=null&&(e.isMonotonic=!!t.isMonotonic),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,n.isMonotonic=!1),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")&&(n.isMonotonic=t.isMonotonic),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Sum"},s}(),c.Histogram=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Histogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Histogram)return t;var e=new p.opentelemetry.proto.metrics.v1.Histogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Histogram"},s}(),c.ExponentialHistogram=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality")&&e.uint32(16).int32(t.aggregationTemporality),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{u.aggregationTemporality=t.int32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogram)return t;var e=new p.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(t.dataPoints[n])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality=="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),e.defaults&&(n.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[u],e)}return t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=e.enums===String?p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:p.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},s}(),c.Summary=function(){function s(a){if(this.dataPoints=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.dataPoints=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.dataPoints!=null&&t.dataPoints.length)for(var n=0;n<t.dataPoints.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(t.dataPoints[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.Summary;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.dataPoints&&u.dataPoints.length||(u.dataPoints=[]),u.dataPoints.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(t.dataPoints[e]);if(n)return"dataPoints."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.Summary)return t;var e=new p.opentelemetry.proto.metrics.v1.Summary;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");e.dataPoints=[];for(var n=0;n<t.dataPoints.length;++n){if(typeof t.dataPoints[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");e.dataPoints[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(t.dataPoints[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.dataPoints=[]),t.dataPoints&&t.dataPoints.length){n.dataPoints=[];for(var u=0;u<t.dataPoints.length;++u)n.dataPoints[u]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.Summary"},s}(),c.AggregationTemporality=function(){var s={},a=Object.create(s);return a[s[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[s[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[s[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a}(),c.DataPointFlags=function(){var s={},a=Object.create(s);return a[s[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[s[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a}(),c.NumberDataPoint=function(){function s(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(33).double(e.asDouble),e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(42).fork()).ldelim();if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(58).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(64).uint32(e.flags),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 5:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{l.flags=e.uint32();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.asInt)&&!(e.asInt&&f.isInteger(e.asInt.low)&&f.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(f.Long?(n.asInt=f.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.flags!=null&&(n.flags=e.flags>>>0),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.exemplars=[],u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;u.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(u.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(u.value="asDouble")),e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?u.asInt=n.longs===String?String(e.asInt):e.asInt:u.asInt=n.longs===String?f.Long.prototype.toString.call(e.asInt):n.longs===Number?new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(u.value="asInt")),e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},s}(),c.HistogramDataPoint=function(){function s(t){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.bucketCounts=f.emptyArray,s.prototype.explicitBounds=f.emptyArray,s.prototype.exemplars=f.emptyArray,s.prototype.flags=null,s.prototype.min=null,s.prototype.max=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.bucketCounts!=null&&e.bucketCounts.length){n.uint32(50).fork();for(var u=0;u<e.bucketCounts.length;++u)n.fixed64(e.bucketCounts[u]);n.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){n.uint32(58).fork();for(var u=0;u<e.explicitBounds.length;++u)n.double(e.explicitBounds[u]);n.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(74).fork()).ldelim();return e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(89).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(97).double(e.max),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{if(l.bucketCounts&&l.bucketCounts.length||(l.bucketCounts=[]),(h&7)===2)for(var T=e.uint32()+e.pos;e.pos<T;)l.bucketCounts.push(e.fixed64());else l.bucketCounts.push(e.fixed64());break}case 7:{if(l.explicitBounds&&l.explicitBounds.length||(l.explicitBounds=[]),(h&7)===2)for(var T=e.uint32()+e.pos;e.pos<T;)l.explicitBounds.push(e.double());else l.explicitBounds.push(e.double());break}case 8:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 10:{l.flags=e.uint32();break}case 11:{l.min=e.double();break}case 12:{l.max=e.double();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!f.isInteger(e.count)&&!(e.count&&f.isInteger(e.count.low)&&f.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.bucketCounts!=null&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<e.bucketCounts.length;++u)if(!f.isInteger(e.bucketCounts[u])&&!(e.bucketCounts[u]&&f.isInteger(e.bucketCounts[u].low)&&f.isInteger(e.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var u=0;u<e.explicitBounds.length;++u)if(typeof e.explicitBounds[u]!="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags)?"flags: integer expected":e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(f.Long?(n.count=f.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");n.bucketCounts=[];for(var u=0;u<e.bucketCounts.length;++u)f.Long?(n.bucketCounts[u]=f.Long.fromValue(e.bucketCounts[u])).unsigned=!1:typeof e.bucketCounts[u]=="string"?n.bucketCounts[u]=parseInt(e.bucketCounts[u],10):typeof e.bucketCounts[u]=="number"?n.bucketCounts[u]=e.bucketCounts[u]:typeof e.bucketCounts[u]=="object"&&(n.bucketCounts[u]=new f.LongBits(e.bucketCounts[u].low>>>0,e.bucketCounts[u].high>>>0).toNumber())}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");n.explicitBounds=[];for(var u=0;u<e.explicitBounds.length;++u)n.explicitBounds[u]=Number(e.explicitBounds[u])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.flags!=null&&(n.flags=e.flags>>>0),e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.bucketCounts=[],u.explicitBounds=[],u.exemplars=[],u.attributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.count=n.longs===String?"0":0;u.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?u.count=n.longs===String?String(e.count):e.count:u.count=n.longs===String?f.Long.prototype.toString.call(e.count):n.longs===Number?new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(u._sum="sum")),e.bucketCounts&&e.bucketCounts.length){u.bucketCounts=[];for(var h=0;h<e.bucketCounts.length;++h)typeof e.bucketCounts[h]=="number"?u.bucketCounts[h]=n.longs===String?String(e.bucketCounts[h]):e.bucketCounts[h]:u.bucketCounts[h]=n.longs===String?f.Long.prototype.toString.call(e.bucketCounts[h]):n.longs===Number?new f.LongBits(e.bucketCounts[h].low>>>0,e.bucketCounts[h].high>>>0).toNumber():e.bucketCounts[h]}if(e.explicitBounds&&e.explicitBounds.length){u.explicitBounds=[];for(var h=0;h<e.explicitBounds.length;++h)u.explicitBounds[h]=n.json&&!isFinite(e.explicitBounds[h])?String(e.explicitBounds[h]):e.explicitBounds[h]}if(e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}if(e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}return e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),e.min!=null&&e.hasOwnProperty("min")&&(u.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(u._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(u.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(u._max="max")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},s}(),c.ExponentialHistogramDataPoint=function(){function s(t){if(this.attributes=[],this.exemplars=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.scale=null,s.prototype.zeroCount=null,s.prototype.positive=null,s.prototype.negative=null,s.prototype.flags=null,s.prototype.exemplars=f.emptyArray,s.prototype.min=null,s.prototype.max=null,s.prototype.zeroThreshold=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:f.oneOfGetter(a=["sum"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:f.oneOfGetter(a=["min"]),set:f.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:f.oneOfGetter(a=["max"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.attributes!=null&&e.attributes.length)for(var u=0;u<e.attributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[u],n.uint32(10).fork()).ldelim();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&n.uint32(17).fixed64(e.startTimeUnixNano),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(25).fixed64(e.timeUnixNano),e.count!=null&&Object.hasOwnProperty.call(e,"count")&&n.uint32(33).fixed64(e.count),e.sum!=null&&Object.hasOwnProperty.call(e,"sum")&&n.uint32(41).double(e.sum),e.scale!=null&&Object.hasOwnProperty.call(e,"scale")&&n.uint32(48).sint32(e.scale),e.zeroCount!=null&&Object.hasOwnProperty.call(e,"zeroCount")&&n.uint32(57).fixed64(e.zeroCount),e.positive!=null&&Object.hasOwnProperty.call(e,"positive")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,n.uint32(66).fork()).ldelim(),e.negative!=null&&Object.hasOwnProperty.call(e,"negative")&&p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,n.uint32(74).fork()).ldelim(),e.flags!=null&&Object.hasOwnProperty.call(e,"flags")&&n.uint32(80).uint32(e.flags),e.exemplars!=null&&e.exemplars.length)for(var u=0;u<e.exemplars.length;++u)p.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[u],n.uint32(90).fork()).ldelim();return e.min!=null&&Object.hasOwnProperty.call(e,"min")&&n.uint32(97).double(e.min),e.max!=null&&Object.hasOwnProperty.call(e,"max")&&n.uint32(105).double(e.max),e.zeroThreshold!=null&&Object.hasOwnProperty.call(e,"zeroThreshold")&&n.uint32(113).double(e.zeroThreshold),n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.startTimeUnixNano=e.fixed64();break}case 3:{l.timeUnixNano=e.fixed64();break}case 4:{l.count=e.fixed64();break}case 5:{l.sum=e.double();break}case 6:{l.scale=e.sint32();break}case 7:{l.zeroCount=e.fixed64();break}case 8:{l.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{l.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{l.flags=e.uint32();break}case 11:{l.exemplars&&l.exemplars.length||(l.exemplars=[]),l.exemplars.push(p.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{l.min=e.double();break}case 13:{l.max=e.double();break}case 14:{l.zeroThreshold=e.double();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var u=0;u<e.attributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[u]);if(l)return"attributes."+l}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&f.isInteger(e.startTimeUnixNano.low)&&f.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.count!=null&&e.hasOwnProperty("count")&&!f.isInteger(e.count)&&!(e.count&&f.isInteger(e.count.low)&&f.isInteger(e.count.high)))return"count: integer|Long expected";if(e.sum!=null&&e.hasOwnProperty("sum")&&(n._sum=1,typeof e.sum!="number"))return"sum: number expected";if(e.scale!=null&&e.hasOwnProperty("scale")&&!f.isInteger(e.scale))return"scale: integer expected";if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&!f.isInteger(e.zeroCount)&&!(e.zeroCount&&f.isInteger(e.zeroCount.low)&&f.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected";if(e.positive!=null&&e.hasOwnProperty("positive")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive);if(l)return"positive."+l}if(e.negative!=null&&e.hasOwnProperty("negative")){var l=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative);if(l)return"negative."+l}if(e.flags!=null&&e.hasOwnProperty("flags")&&!f.isInteger(e.flags))return"flags: integer expected";if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var u=0;u<e.exemplars.length;++u){var l=p.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[u]);if(l)return"exemplars."+l}}return e.min!=null&&e.hasOwnProperty("min")&&(n._min=1,typeof e.min!="number")?"min: number expected":e.max!=null&&e.hasOwnProperty("max")&&(n._max=1,typeof e.max!="number")?"max: number expected":e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&typeof e.zeroThreshold!="number"?"zeroThreshold: number expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var n=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");n.attributes=[];for(var u=0;u<e.attributes.length;++u){if(typeof e.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");n.attributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[u])}}if(e.startTimeUnixNano!=null&&(f.Long?(n.startTimeUnixNano=f.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:typeof e.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):typeof e.startTimeUnixNano=="number"?n.startTimeUnixNano=e.startTimeUnixNano:typeof e.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.count!=null&&(f.Long?(n.count=f.Long.fromValue(e.count)).unsigned=!1:typeof e.count=="string"?n.count=parseInt(e.count,10):typeof e.count=="number"?n.count=e.count:typeof e.count=="object"&&(n.count=new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),e.sum!=null&&(n.sum=Number(e.sum)),e.scale!=null&&(n.scale=e.scale|0),e.zeroCount!=null&&(f.Long?(n.zeroCount=f.Long.fromValue(e.zeroCount)).unsigned=!1:typeof e.zeroCount=="string"?n.zeroCount=parseInt(e.zeroCount,10):typeof e.zeroCount=="number"?n.zeroCount=e.zeroCount:typeof e.zeroCount=="object"&&(n.zeroCount=new f.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber())),e.positive!=null){if(typeof e.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");n.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(e.negative!=null){if(typeof e.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");n.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(e.flags!=null&&(n.flags=e.flags>>>0),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");n.exemplars=[];for(var u=0;u<e.exemplars.length;++u){if(typeof e.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");n.exemplars[u]=p.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[u])}}return e.min!=null&&(n.min=Number(e.min)),e.max!=null&&(n.max=Number(e.max)),e.zeroThreshold!=null&&(n.zeroThreshold=Number(e.zeroThreshold)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.attributes=[],u.exemplars=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.startTimeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.startTimeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;if(f.Long){var l=new f.Long(0,0,!1);u.count=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.count=n.longs===String?"0":0;if(u.scale=0,f.Long){var l=new f.Long(0,0,!1);u.zeroCount=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.zeroCount=n.longs===String?"0":0;u.positive=null,u.negative=null,u.flags=0,u.zeroThreshold=0}if(e.attributes&&e.attributes.length){u.attributes=[];for(var h=0;h<e.attributes.length;++h)u.attributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[h],n)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")&&(typeof e.startTimeUnixNano=="number"?u.startTimeUnixNano=n.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:u.startTimeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.startTimeUnixNano):n.longs===Number?new f.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.count!=null&&e.hasOwnProperty("count")&&(typeof e.count=="number"?u.count=n.longs===String?String(e.count):e.count:u.count=n.longs===String?f.Long.prototype.toString.call(e.count):n.longs===Number?new f.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),e.sum!=null&&e.hasOwnProperty("sum")&&(u.sum=n.json&&!isFinite(e.sum)?String(e.sum):e.sum,n.oneofs&&(u._sum="sum")),e.scale!=null&&e.hasOwnProperty("scale")&&(u.scale=e.scale),e.zeroCount!=null&&e.hasOwnProperty("zeroCount")&&(typeof e.zeroCount=="number"?u.zeroCount=n.longs===String?String(e.zeroCount):e.zeroCount:u.zeroCount=n.longs===String?f.Long.prototype.toString.call(e.zeroCount):n.longs===Number?new f.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount),e.positive!=null&&e.hasOwnProperty("positive")&&(u.positive=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,n)),e.negative!=null&&e.hasOwnProperty("negative")&&(u.negative=p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,n)),e.flags!=null&&e.hasOwnProperty("flags")&&(u.flags=e.flags),e.exemplars&&e.exemplars.length){u.exemplars=[];for(var h=0;h<e.exemplars.length;++h)u.exemplars[h]=p.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[h],n)}return e.min!=null&&e.hasOwnProperty("min")&&(u.min=n.json&&!isFinite(e.min)?String(e.min):e.min,n.oneofs&&(u._min="min")),e.max!=null&&e.hasOwnProperty("max")&&(u.max=n.json&&!isFinite(e.max)?String(e.max):e.max,n.oneofs&&(u._max="max")),e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")&&(u.zeroThreshold=n.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},s.Buckets=function(){function t(e){if(this.bucketCounts=[],e)for(var n=Object.keys(e),u=0;u<n.length;++u)e[n[u]]!=null&&(this[n[u]]=e[n[u]])}return t.prototype.offset=null,t.prototype.bucketCounts=f.emptyArray,t.create=function(n){return new t(n)},t.encode=function(n,u){if(u||(u=O.create()),n.offset!=null&&Object.hasOwnProperty.call(n,"offset")&&u.uint32(8).sint32(n.offset),n.bucketCounts!=null&&n.bucketCounts.length){u.uint32(18).fork();for(var l=0;l<n.bucketCounts.length;++l)u.uint64(n.bucketCounts[l]);u.ldelim()}return u},t.encodeDelimited=function(n,u){return this.encode(n,u).ldelim()},t.decode=function(n,u){n instanceof m||(n=m.create(n));for(var l=u===void 0?n.len:n.pos+u,h=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;n.pos<l;){var T=n.uint32();switch(T>>>3){case 1:{h.offset=n.sint32();break}case 2:{if(h.bucketCounts&&h.bucketCounts.length||(h.bucketCounts=[]),(T&7)===2)for(var D=n.uint32()+n.pos;n.pos<D;)h.bucketCounts.push(n.uint64());else h.bucketCounts.push(n.uint64());break}default:n.skipType(T&7);break}}return h},t.decodeDelimited=function(n){return n instanceof m||(n=new m(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.offset!=null&&n.hasOwnProperty("offset")&&!f.isInteger(n.offset))return"offset: integer expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<n.bucketCounts.length;++u)if(!f.isInteger(n.bucketCounts[u])&&!(n.bucketCounts[u]&&f.isInteger(n.bucketCounts[u].low)&&f.isInteger(n.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(n){if(n instanceof p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return n;var u=new p.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(n.offset!=null&&(u.offset=n.offset|0),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");u.bucketCounts=[];for(var l=0;l<n.bucketCounts.length;++l)f.Long?(u.bucketCounts[l]=f.Long.fromValue(n.bucketCounts[l])).unsigned=!0:typeof n.bucketCounts[l]=="string"?u.bucketCounts[l]=parseInt(n.bucketCounts[l],10):typeof n.bucketCounts[l]=="number"?u.bucketCounts[l]=n.bucketCounts[l]:typeof n.bucketCounts[l]=="object"&&(u.bucketCounts[l]=new f.LongBits(n.bucketCounts[l].low>>>0,n.bucketCounts[l].high>>>0).toNumber(!0))}return u},t.toObject=function(n,u){u||(u={});var l={};if((u.arrays||u.defaults)&&(l.bucketCounts=[]),u.defaults&&(l.offset=0),n.offset!=null&&n.hasOwnProperty("offset")&&(l.offset=n.offset),n.bucketCounts&&n.bucketCounts.length){l.bucketCounts=[];for(var h=0;h<n.bucketCounts.length;++h)typeof n.bucketCounts[h]=="number"?l.bucketCounts[h]=u.longs===String?String(n.bucketCounts[h]):n.bucketCounts[h]:l.bucketCounts[h]=u.longs===String?f.Long.prototype.toString.call(n.bucketCounts[h]):u.longs===Number?new f.LongBits(n.bucketCounts[h].low>>>0,n.bucketCounts[h].high>>>0).toNumber(!0):n.bucketCounts[h]}return l},t.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},t.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),s}(),c.SummaryDataPoint=function(){function s(a){if(this.attributes=[],this.quantileValues=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.attributes=f.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.quantileValues=f.emptyArray,s.prototype.flags=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano")&&e.uint32(17).fixed64(t.startTimeUnixNano),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(25).fixed64(t.timeUnixNano),t.count!=null&&Object.hasOwnProperty.call(t,"count")&&e.uint32(33).fixed64(t.count),t.sum!=null&&Object.hasOwnProperty.call(t,"sum")&&e.uint32(41).double(t.sum),t.quantileValues!=null&&t.quantileValues.length)for(var n=0;n<t.quantileValues.length;++n)p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(t.quantileValues[n],e.uint32(50).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(58).fork()).ldelim();return t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(64).uint32(t.flags),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;t.pos<n;){var l=t.uint32();switch(l>>>3){case 7:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{u.startTimeUnixNano=t.fixed64();break}case 3:{u.timeUnixNano=t.fixed64();break}case 4:{u.count=t.fixed64();break}case 5:{u.sum=t.double();break}case 6:{u.quantileValues&&u.quantileValues.length||(u.quantileValues=[]),u.quantileValues.push(p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{u.flags=t.uint32();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var n=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(n)return"attributes."+n}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&!f.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&f.isInteger(t.startTimeUnixNano.low)&&f.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.count!=null&&t.hasOwnProperty("count")&&!f.isInteger(t.count)&&!(t.count&&f.isInteger(t.count.low)&&f.isInteger(t.count.high)))return"count: integer|Long expected";if(t.sum!=null&&t.hasOwnProperty("sum")&&typeof t.sum!="number")return"sum: number expected";if(t.quantileValues!=null&&t.hasOwnProperty("quantileValues")){if(!Array.isArray(t.quantileValues))return"quantileValues: array expected";for(var e=0;e<t.quantileValues.length;++e){var n=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(t.quantileValues[e]);if(n)return"quantileValues."+n}}return t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint)return t;var e=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}if(t.startTimeUnixNano!=null&&(f.Long?(e.startTimeUnixNano=f.Long.fromValue(t.startTimeUnixNano)).unsigned=!1:typeof t.startTimeUnixNano=="string"?e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10):typeof t.startTimeUnixNano=="number"?e.startTimeUnixNano=t.startTimeUnixNano:typeof t.startTimeUnixNano=="object"&&(e.startTimeUnixNano=new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber())),t.timeUnixNano!=null&&(f.Long?(e.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.count!=null&&(f.Long?(e.count=f.Long.fromValue(t.count)).unsigned=!1:typeof t.count=="string"?e.count=parseInt(t.count,10):typeof t.count=="number"?e.count=t.count:typeof t.count=="object"&&(e.count=new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber())),t.sum!=null&&(e.sum=Number(t.sum)),t.quantileValues){if(!Array.isArray(t.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");e.quantileValues=[];for(var n=0;n<t.quantileValues.length;++n){if(typeof t.quantileValues[n]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");e.quantileValues[n]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(t.quantileValues[n])}}return t.flags!=null&&(e.flags=t.flags>>>0),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.quantileValues=[],n.attributes=[]),e.defaults){if(f.Long){var u=new f.Long(0,0,!1);n.startTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.startTimeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.timeUnixNano=e.longs===String?"0":0;if(f.Long){var u=new f.Long(0,0,!1);n.count=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.count=e.longs===String?"0":0;n.sum=0,n.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")&&(typeof t.startTimeUnixNano=="number"?n.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano:n.startTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new f.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano),t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.count!=null&&t.hasOwnProperty("count")&&(typeof t.count=="number"?n.count=e.longs===String?String(t.count):t.count:n.count=e.longs===String?f.Long.prototype.toString.call(t.count):e.longs===Number?new f.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count),t.sum!=null&&t.hasOwnProperty("sum")&&(n.sum=e.json&&!isFinite(t.sum)?String(t.sum):t.sum),t.quantileValues&&t.quantileValues.length){n.quantileValues=[];for(var l=0;l<t.quantileValues.length;++l)n.quantileValues[l]=p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(t.quantileValues[l],e)}if(t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},s.ValueAtQuantile=function(){function a(t){if(t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}return a.prototype.quantile=null,a.prototype.value=null,a.create=function(e){return new a(e)},a.encode=function(e,n){return n||(n=O.create()),e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile")&&n.uint32(9).double(e.quantile),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&n.uint32(17).double(e.value),n},a.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},a.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<u;){var h=e.uint32();switch(h>>>3){case 1:{l.quantile=e.double();break}case 2:{l.value=e.double();break}default:e.skipType(h&7);break}}return l},a.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},a.verify=function(e){return typeof e!="object"||e===null?"object expected":e.quantile!=null&&e.hasOwnProperty("quantile")&&typeof e.quantile!="number"?"quantile: number expected":e.value!=null&&e.hasOwnProperty("value")&&typeof e.value!="number"?"value: number expected":null},a.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var n=new p.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return e.quantile!=null&&(n.quantile=Number(e.quantile)),e.value!=null&&(n.value=Number(e.value)),n},a.toObject=function(e,n){n||(n={});var u={};return n.defaults&&(u.quantile=0,u.value=0),e.quantile!=null&&e.hasOwnProperty("quantile")&&(u.quantile=n.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),e.value!=null&&e.hasOwnProperty("value")&&(u.value=n.json&&!isFinite(e.value)?String(e.value):e.value),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},a.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a}(),s}(),c.Exemplar=function(){function s(t){if(this.filteredAttributes=[],t)for(var e=Object.keys(t),n=0;n<e.length;++n)t[e[n]]!=null&&(this[e[n]]=t[e[n]])}s.prototype.filteredAttributes=f.emptyArray,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.spanId=null,s.prototype.traceId=null;var a;return Object.defineProperty(s.prototype,"value",{get:f.oneOfGetter(a=["asDouble","asInt"]),set:f.oneOfSetter(a)}),s.create=function(e){return new s(e)},s.encode=function(e,n){if(n||(n=O.create()),e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano")&&n.uint32(17).fixed64(e.timeUnixNano),e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble")&&n.uint32(25).double(e.asDouble),e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId")&&n.uint32(34).bytes(e.spanId),e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId")&&n.uint32(42).bytes(e.traceId),e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt")&&n.uint32(49).sfixed64(e.asInt),e.filteredAttributes!=null&&e.filteredAttributes.length)for(var u=0;u<e.filteredAttributes.length;++u)p.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[u],n.uint32(58).fork()).ldelim();return n},s.encodeDelimited=function(e,n){return this.encode(e,n).ldelim()},s.decode=function(e,n){e instanceof m||(e=m.create(e));for(var u=n===void 0?e.len:e.pos+n,l=new p.opentelemetry.proto.metrics.v1.Exemplar;e.pos<u;){var h=e.uint32();switch(h>>>3){case 7:{l.filteredAttributes&&l.filteredAttributes.length||(l.filteredAttributes=[]),l.filteredAttributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{l.timeUnixNano=e.fixed64();break}case 3:{l.asDouble=e.double();break}case 6:{l.asInt=e.sfixed64();break}case 4:{l.spanId=e.bytes();break}case 5:{l.traceId=e.bytes();break}default:e.skipType(h&7);break}}return l},s.decodeDelimited=function(e){return e instanceof m||(e=new m(e)),this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!="object"||e===null)return"object expected";var n={};if(e.filteredAttributes!=null&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var u=0;u<e.filteredAttributes.length;++u){var l=p.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[u]);if(l)return"filteredAttributes."+l}}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&!f.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&f.isInteger(e.timeUnixNano.low)&&f.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(n.value=1,typeof e.asDouble!="number"))return"asDouble: number expected";if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(n.value===1)return"value: multiple values";if(n.value=1,!f.isInteger(e.asInt)&&!(e.asInt&&f.isInteger(e.asInt.low)&&f.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}return e.spanId!=null&&e.hasOwnProperty("spanId")&&!(e.spanId&&typeof e.spanId.length=="number"||f.isString(e.spanId))?"spanId: buffer expected":e.traceId!=null&&e.hasOwnProperty("traceId")&&!(e.traceId&&typeof e.traceId.length=="number"||f.isString(e.traceId))?"traceId: buffer expected":null},s.fromObject=function(e){if(e instanceof p.opentelemetry.proto.metrics.v1.Exemplar)return e;var n=new p.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");n.filteredAttributes=[];for(var u=0;u<e.filteredAttributes.length;++u){if(typeof e.filteredAttributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");n.filteredAttributes[u]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[u])}}return e.timeUnixNano!=null&&(f.Long?(n.timeUnixNano=f.Long.fromValue(e.timeUnixNano)).unsigned=!1:typeof e.timeUnixNano=="string"?n.timeUnixNano=parseInt(e.timeUnixNano,10):typeof e.timeUnixNano=="number"?n.timeUnixNano=e.timeUnixNano:typeof e.timeUnixNano=="object"&&(n.timeUnixNano=new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),e.asDouble!=null&&(n.asDouble=Number(e.asDouble)),e.asInt!=null&&(f.Long?(n.asInt=f.Long.fromValue(e.asInt)).unsigned=!1:typeof e.asInt=="string"?n.asInt=parseInt(e.asInt,10):typeof e.asInt=="number"?n.asInt=e.asInt:typeof e.asInt=="object"&&(n.asInt=new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.spanId!=null&&(typeof e.spanId=="string"?f.base64.decode(e.spanId,n.spanId=f.newBuffer(f.base64.length(e.spanId)),0):e.spanId.length>=0&&(n.spanId=e.spanId)),e.traceId!=null&&(typeof e.traceId=="string"?f.base64.decode(e.traceId,n.traceId=f.newBuffer(f.base64.length(e.traceId)),0):e.traceId.length>=0&&(n.traceId=e.traceId)),n},s.toObject=function(e,n){n||(n={});var u={};if((n.arrays||n.defaults)&&(u.filteredAttributes=[]),n.defaults){if(f.Long){var l=new f.Long(0,0,!1);u.timeUnixNano=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else u.timeUnixNano=n.longs===String?"0":0;n.bytes===String?u.spanId="":(u.spanId=[],n.bytes!==Array&&(u.spanId=f.newBuffer(u.spanId))),n.bytes===String?u.traceId="":(u.traceId=[],n.bytes!==Array&&(u.traceId=f.newBuffer(u.traceId)))}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")&&(typeof e.timeUnixNano=="number"?u.timeUnixNano=n.longs===String?String(e.timeUnixNano):e.timeUnixNano:u.timeUnixNano=n.longs===String?f.Long.prototype.toString.call(e.timeUnixNano):n.longs===Number?new f.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),e.asDouble!=null&&e.hasOwnProperty("asDouble")&&(u.asDouble=n.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,n.oneofs&&(u.value="asDouble")),e.spanId!=null&&e.hasOwnProperty("spanId")&&(u.spanId=n.bytes===String?f.base64.encode(e.spanId,0,e.spanId.length):n.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),e.traceId!=null&&e.hasOwnProperty("traceId")&&(u.traceId=n.bytes===String?f.base64.encode(e.traceId,0,e.traceId.length):n.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),e.asInt!=null&&e.hasOwnProperty("asInt")&&(typeof e.asInt=="number"?u.asInt=n.longs===String?String(e.asInt):e.asInt:u.asInt=n.longs===String?f.Long.prototype.toString.call(e.asInt):n.longs===Number?new f.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,n.oneofs&&(u.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){u.filteredAttributes=[];for(var h=0;h<e.filteredAttributes.length;++h)u.filteredAttributes[h]=p.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[h],n)}return u},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},s}(),c}(),o}(),r.logs=function(){var o={};return o.v1=function(){var c={};return c.LogsData=function(){function s(a){if(this.resourceLogs=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resourceLogs=f.emptyArray,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resourceLogs!=null&&t.resourceLogs.length)for(var n=0;n<t.resourceLogs.length;++n)p.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[n],e.uint32(10).fork()).ldelim();return e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.LogsData;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resourceLogs&&u.resourceLogs.length||(u.resourceLogs=[]),u.resourceLogs.push(p.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.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 e=0;e<t.resourceLogs.length;++e){var n=p.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[e]);if(n)return"resourceLogs."+n}}return null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogsData)return t;var e=new p.opentelemetry.proto.logs.v1.LogsData;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");e.resourceLogs=[];for(var n=0;n<t.resourceLogs.length;++n){if(typeof t.resourceLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");e.resourceLogs[n]=p.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[n])}}return e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.resourceLogs=[]),t.resourceLogs&&t.resourceLogs.length){n.resourceLogs=[];for(var u=0;u<t.resourceLogs.length;++u)n.resourceLogs[u]=p.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[u],e)}return n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogsData"},s}(),c.ResourceLogs=function(){function s(a){if(this.scopeLogs=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.resource=null,s.prototype.scopeLogs=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.resource!=null&&Object.hasOwnProperty.call(t,"resource")&&p.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim(),t.scopeLogs!=null&&t.scopeLogs.length)for(var n=0;n<t.scopeLogs.length;++n)p.opentelemetry.proto.logs.v1.ScopeLogs.encode(t.scopeLogs[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.ResourceLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.resource=p.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{u.scopeLogs&&u.scopeLogs.length||(u.scopeLogs=[]),u.scopeLogs.push(p.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=p.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeLogs!=null&&t.hasOwnProperty("scopeLogs")){if(!Array.isArray(t.scopeLogs))return"scopeLogs: array expected";for(var n=0;n<t.scopeLogs.length;++n){var e=p.opentelemetry.proto.logs.v1.ScopeLogs.verify(t.scopeLogs[n]);if(e)return"scopeLogs."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ResourceLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ResourceLogs;if(t.resource!=null){if(typeof t.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");e.resource=p.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeLogs){if(!Array.isArray(t.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");e.scopeLogs=[];for(var n=0;n<t.scopeLogs.length;++n){if(typeof t.scopeLogs[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");e.scopeLogs[n]=p.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(t.scopeLogs[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.scopeLogs=[]),e.defaults&&(n.resource=null,n.schemaUrl=""),t.resource!=null&&t.hasOwnProperty("resource")&&(n.resource=p.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e)),t.scopeLogs&&t.scopeLogs.length){n.scopeLogs=[];for(var u=0;u<t.scopeLogs.length;++u)n.scopeLogs[u]=p.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ResourceLogs"},s}(),c.ScopeLogs=function(){function s(a){if(this.logRecords=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.scope=null,s.prototype.logRecords=f.emptyArray,s.prototype.schemaUrl=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.scope!=null&&Object.hasOwnProperty.call(t,"scope")&&p.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim(),t.logRecords!=null&&t.logRecords.length)for(var n=0;n<t.logRecords.length;++n)p.opentelemetry.proto.logs.v1.LogRecord.encode(t.logRecords[n],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl")&&e.uint32(26).string(t.schemaUrl),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.ScopeLogs;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{u.logRecords&&u.logRecords.length||(u.logRecords=[]),u.logRecords.push(p.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{u.schemaUrl=t.string();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=p.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.logRecords!=null&&t.hasOwnProperty("logRecords")){if(!Array.isArray(t.logRecords))return"logRecords: array expected";for(var n=0;n<t.logRecords.length;++n){var e=p.opentelemetry.proto.logs.v1.LogRecord.verify(t.logRecords[n]);if(e)return"logRecords."+e}}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&!f.isString(t.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.ScopeLogs)return t;var e=new p.opentelemetry.proto.logs.v1.ScopeLogs;if(t.scope!=null){if(typeof t.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");e.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.logRecords){if(!Array.isArray(t.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");e.logRecords=[];for(var n=0;n<t.logRecords.length;++n){if(typeof t.logRecords[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");e.logRecords[n]=p.opentelemetry.proto.logs.v1.LogRecord.fromObject(t.logRecords[n])}}return t.schemaUrl!=null&&(e.schemaUrl=String(t.schemaUrl)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.logRecords=[]),e.defaults&&(n.scope=null,n.schemaUrl=""),t.scope!=null&&t.hasOwnProperty("scope")&&(n.scope=p.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e)),t.logRecords&&t.logRecords.length){n.logRecords=[];for(var u=0;u<t.logRecords.length;++u)n.logRecords[u]=p.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[u],e)}return t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")&&(n.schemaUrl=t.schemaUrl),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.ScopeLogs"},s}(),c.SeverityNumber=function(){var s={},a=Object.create(s);return a[s[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[s[1]="SEVERITY_NUMBER_TRACE"]=1,a[s[2]="SEVERITY_NUMBER_TRACE2"]=2,a[s[3]="SEVERITY_NUMBER_TRACE3"]=3,a[s[4]="SEVERITY_NUMBER_TRACE4"]=4,a[s[5]="SEVERITY_NUMBER_DEBUG"]=5,a[s[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[s[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[s[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[s[9]="SEVERITY_NUMBER_INFO"]=9,a[s[10]="SEVERITY_NUMBER_INFO2"]=10,a[s[11]="SEVERITY_NUMBER_INFO3"]=11,a[s[12]="SEVERITY_NUMBER_INFO4"]=12,a[s[13]="SEVERITY_NUMBER_WARN"]=13,a[s[14]="SEVERITY_NUMBER_WARN2"]=14,a[s[15]="SEVERITY_NUMBER_WARN3"]=15,a[s[16]="SEVERITY_NUMBER_WARN4"]=16,a[s[17]="SEVERITY_NUMBER_ERROR"]=17,a[s[18]="SEVERITY_NUMBER_ERROR2"]=18,a[s[19]="SEVERITY_NUMBER_ERROR3"]=19,a[s[20]="SEVERITY_NUMBER_ERROR4"]=20,a[s[21]="SEVERITY_NUMBER_FATAL"]=21,a[s[22]="SEVERITY_NUMBER_FATAL2"]=22,a[s[23]="SEVERITY_NUMBER_FATAL3"]=23,a[s[24]="SEVERITY_NUMBER_FATAL4"]=24,a}(),c.LogRecordFlags=function(){var s={},a=Object.create(s);return a[s[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[s[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a}(),c.LogRecord=function(){function s(a){if(this.attributes=[],a)for(var t=Object.keys(a),e=0;e<t.length;++e)a[t[e]]!=null&&(this[t[e]]=a[t[e]])}return s.prototype.timeUnixNano=null,s.prototype.observedTimeUnixNano=null,s.prototype.severityNumber=null,s.prototype.severityText=null,s.prototype.body=null,s.prototype.attributes=f.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.flags=null,s.prototype.traceId=null,s.prototype.spanId=null,s.create=function(t){return new s(t)},s.encode=function(t,e){if(e||(e=O.create()),t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano")&&e.uint32(9).fixed64(t.timeUnixNano),t.severityNumber!=null&&Object.hasOwnProperty.call(t,"severityNumber")&&e.uint32(16).int32(t.severityNumber),t.severityText!=null&&Object.hasOwnProperty.call(t,"severityText")&&e.uint32(26).string(t.severityText),t.body!=null&&Object.hasOwnProperty.call(t,"body")&&p.opentelemetry.proto.common.v1.AnyValue.encode(t.body,e.uint32(42).fork()).ldelim(),t.attributes!=null&&t.attributes.length)for(var n=0;n<t.attributes.length;++n)p.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[n],e.uint32(50).fork()).ldelim();return t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount")&&e.uint32(56).uint32(t.droppedAttributesCount),t.flags!=null&&Object.hasOwnProperty.call(t,"flags")&&e.uint32(69).fixed32(t.flags),t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId")&&e.uint32(74).bytes(t.traceId),t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId")&&e.uint32(82).bytes(t.spanId),t.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"observedTimeUnixNano")&&e.uint32(89).fixed64(t.observedTimeUnixNano),e},s.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},s.decode=function(t,e){t instanceof m||(t=m.create(t));for(var n=e===void 0?t.len:t.pos+e,u=new p.opentelemetry.proto.logs.v1.LogRecord;t.pos<n;){var l=t.uint32();switch(l>>>3){case 1:{u.timeUnixNano=t.fixed64();break}case 11:{u.observedTimeUnixNano=t.fixed64();break}case 2:{u.severityNumber=t.int32();break}case 3:{u.severityText=t.string();break}case 5:{u.body=p.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(p.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{u.droppedAttributesCount=t.uint32();break}case 8:{u.flags=t.fixed32();break}case 9:{u.traceId=t.bytes();break}case 10:{u.spanId=t.bytes();break}default:t.skipType(l&7);break}}return u},s.decodeDelimited=function(t){return t instanceof m||(t=new m(t)),this.decode(t,t.uint32())},s.verify=function(t){if(typeof t!="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&!f.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&f.isInteger(t.timeUnixNano.low)&&f.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&!f.isInteger(t.observedTimeUnixNano)&&!(t.observedTimeUnixNano&&f.isInteger(t.observedTimeUnixNano.low)&&f.isInteger(t.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))switch(t.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(t.severityText!=null&&t.hasOwnProperty("severityText")&&!f.isString(t.severityText))return"severityText: string expected";if(t.body!=null&&t.hasOwnProperty("body")){var e=p.opentelemetry.proto.common.v1.AnyValue.verify(t.body);if(e)return"body."+e}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var n=0;n<t.attributes.length;++n){var e=p.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[n]);if(e)return"attributes."+e}}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&!f.isInteger(t.droppedAttributesCount)?"droppedAttributesCount: integer expected":t.flags!=null&&t.hasOwnProperty("flags")&&!f.isInteger(t.flags)?"flags: integer expected":t.traceId!=null&&t.hasOwnProperty("traceId")&&!(t.traceId&&typeof t.traceId.length=="number"||f.isString(t.traceId))?"traceId: buffer expected":t.spanId!=null&&t.hasOwnProperty("spanId")&&!(t.spanId&&typeof t.spanId.length=="number"||f.isString(t.spanId))?"spanId: buffer expected":null},s.fromObject=function(t){if(t instanceof p.opentelemetry.proto.logs.v1.LogRecord)return t;var e=new p.opentelemetry.proto.logs.v1.LogRecord;switch(t.timeUnixNano!=null&&(f.Long?(e.timeUnixNano=f.Long.fromValue(t.timeUnixNano)).unsigned=!1:typeof t.timeUnixNano=="string"?e.timeUnixNano=parseInt(t.timeUnixNano,10):typeof t.timeUnixNano=="number"?e.timeUnixNano=t.timeUnixNano:typeof t.timeUnixNano=="object"&&(e.timeUnixNano=new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber())),t.observedTimeUnixNano!=null&&(f.Long?(e.observedTimeUnixNano=f.Long.fromValue(t.observedTimeUnixNano)).unsigned=!1:typeof t.observedTimeUnixNano=="string"?e.observedTimeUnixNano=parseInt(t.observedTimeUnixNano,10):typeof t.observedTimeUnixNano=="number"?e.observedTimeUnixNano=t.observedTimeUnixNano:typeof t.observedTimeUnixNano=="object"&&(e.observedTimeUnixNano=new f.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber())),t.severityNumber){default:if(typeof t.severityNumber=="number"){e.severityNumber=t.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:e.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:e.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:e.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:e.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:e.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:e.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:e.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:e.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:e.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:e.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:e.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:e.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:e.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:e.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:e.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:e.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:e.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:e.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:e.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:e.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:e.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:e.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:e.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:e.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:e.severityNumber=24;break}if(t.severityText!=null&&(e.severityText=String(t.severityText)),t.body!=null){if(typeof t.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");e.body=p.opentelemetry.proto.common.v1.AnyValue.fromObject(t.body)}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");e.attributes=[];for(var n=0;n<t.attributes.length;++n){if(typeof t.attributes[n]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");e.attributes[n]=p.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[n])}}return t.droppedAttributesCount!=null&&(e.droppedAttributesCount=t.droppedAttributesCount>>>0),t.flags!=null&&(e.flags=t.flags>>>0),t.traceId!=null&&(typeof t.traceId=="string"?f.base64.decode(t.traceId,e.traceId=f.newBuffer(f.base64.length(t.traceId)),0):t.traceId.length>=0&&(e.traceId=t.traceId)),t.spanId!=null&&(typeof t.spanId=="string"?f.base64.decode(t.spanId,e.spanId=f.newBuffer(f.base64.length(t.spanId)),0):t.spanId.length>=0&&(e.spanId=t.spanId)),e},s.toObject=function(t,e){e||(e={});var n={};if((e.arrays||e.defaults)&&(n.attributes=[]),e.defaults){if(f.Long){var u=new f.Long(0,0,!1);n.timeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.timeUnixNano=e.longs===String?"0":0;if(n.severityNumber=e.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,n.severityText="",n.body=null,n.droppedAttributesCount=0,n.flags=0,e.bytes===String?n.traceId="":(n.traceId=[],e.bytes!==Array&&(n.traceId=f.newBuffer(n.traceId))),e.bytes===String?n.spanId="":(n.spanId=[],e.bytes!==Array&&(n.spanId=f.newBuffer(n.spanId))),f.Long){var u=new f.Long(0,0,!1);n.observedTimeUnixNano=e.longs===String?u.toString():e.longs===Number?u.toNumber():u}else n.observedTimeUnixNano=e.longs===String?"0":0}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")&&(typeof t.timeUnixNano=="number"?n.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano:n.timeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new f.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano),t.severityNumber!=null&&t.hasOwnProperty("severityNumber")&&(n.severityNumber=e.enums===String?p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]===void 0?t.severityNumber:p.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]:t.severityNumber),t.severityText!=null&&t.hasOwnProperty("severityText")&&(n.severityText=t.severityText),t.body!=null&&t.hasOwnProperty("body")&&(n.body=p.opentelemetry.proto.common.v1.AnyValue.toObject(t.body,e)),t.attributes&&t.attributes.length){n.attributes=[];for(var l=0;l<t.attributes.length;++l)n.attributes[l]=p.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[l],e)}return t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=t.droppedAttributesCount),t.flags!=null&&t.hasOwnProperty("flags")&&(n.flags=t.flags),t.traceId!=null&&t.hasOwnProperty("traceId")&&(n.traceId=e.bytes===String?f.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId),t.spanId!=null&&t.hasOwnProperty("spanId")&&(n.spanId=e.bytes===String?f.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId),t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")&&(typeof t.observedTimeUnixNano=="number"?n.observedTimeUnixNano=e.longs===String?String(t.observedTimeUnixNano):t.observedTimeUnixNano:n.observedTimeUnixNano=e.longs===String?f.Long.prototype.toString.call(t.observedTimeUnixNano):e.longs===Number?new f.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber():t.observedTimeUnixNano),n},s.prototype.toJSON=function(){return this.constructor.toObject(this,v.util.toJSONOptions)},s.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/opentelemetry.proto.logs.v1.LogRecord"},s}(),c}(),o}(),r}(),i}();ym.exports=p});var rs=d(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.ServiceClientType=void 0;var QS;(function(i){i[i.SPANS=0]="SPANS",i[i.METRICS=1]="METRICS",i[i.LOGS=2]="LOGS"})(QS=un.ServiceClientType||(un.ServiceClientType={}))});var an=d(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.getExportRequestProto=void 0;var Dc=Em(),gm=rs();function ZS(i){return i===gm.ServiceClientType.SPANS?Dc.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest:i===gm.ServiceClientType.LOGS?Dc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest:Dc.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest}ns.getExportRequestProto=ZS});var Bc=d(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.send=void 0;var vm=Ji(),eb=an();function tb(i,r,o,c,s){let a=i.convert(r),t=(0,eb.getExportRequestProto)(i.getServiceClientType()),e=t.create(a);if(e){let n=t.encode(e).finish();n&&(0,vm.sendWithHttp)(i,Buffer.from(n),"application/x-protobuf",c,s)}else s(new vm.OTLPExporterError("No proto"))}os.send=tb});var Tm=d(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.OTLPProtoExporterNodeBase=void 0;var rb=(y(),E(_)),nb=Ji(),Vc=class extends nb.OTLPExporterNodeBase{constructor(r={}){super(r)}_sendPromise(r,o,c){let s=new Promise((t,e)=>{this._send(this,r,this.compression,t,e)}).then(o,c);this._sendingPromises.push(s);let a=()=>{let t=this._sendingPromises.indexOf(s);this._sendingPromises.splice(t,1)};s.then(a,a)}send(r,o,c){if(this._shutdownOnce.isCalled){rb.diag.debug("Shutdown already started. Cannot send objects");return}this._send?this._sendPromise(r,o,c):setImmediate(()=>{let{send:s}=Bc();this._send=s,this._sendPromise(r,o,c)})}};is.OTLPProtoExporterNodeBase=Vc});var Sm=d(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.send=Er.OTLPProtoExporterNodeBase=void 0;var ob=Tm();Object.defineProperty(Er,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return ob.OTLPProtoExporterNodeBase}});var ib=Bc();Object.defineProperty(Er,"send",{enumerable:!0,get:function(){return ib.send}})});var bm=d(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.OTLPProtoExporterBrowserBase=void 0;var sb=(y(),E(_)),kc=Ji(),ub=an(),qc=class extends kc.OTLPExporterBrowserBase{constructor(r={}){super(r)}send(r,o,c){if(this._shutdownOnce.isCalled){sb.diag.debug("Shutdown already started. Cannot send objects");return}let s=this.convert(r),a=(0,ub.getExportRequestProto)(this.getServiceClientType()),t=a.create(s);if(t){let e=a.encode(t).finish();e&&(0,kc.sendWithXhr)(new Blob([e],{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 kc.OTLPExporterError("No proto"))}};ss.OTLPProtoExporterBrowserBase=qc});var Om=d(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.ServiceClientType=gr.OTLPProtoExporterBrowserBase=void 0;var ab=bm();Object.defineProperty(gr,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return ab.OTLPProtoExporterBrowserBase}});var cb=rs();Object.defineProperty(gr,"ServiceClientType",{enumerable:!0,get:function(){return cb.ServiceClientType}})});var Pm=d(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.getExportRequestProto=ye.ServiceClientType=ye.OTLPProtoExporterBrowserBase=ye.send=ye.OTLPProtoExporterNodeBase=void 0;var Am=Sm();Object.defineProperty(ye,"OTLPProtoExporterNodeBase",{enumerable:!0,get:function(){return Am.OTLPProtoExporterNodeBase}});Object.defineProperty(ye,"send",{enumerable:!0,get:function(){return Am.send}});var lb=Om();Object.defineProperty(ye,"OTLPProtoExporterBrowserBase",{enumerable:!0,get:function(){return lb.OTLPProtoExporterBrowserBase}});var pb=rs();Object.defineProperty(ye,"ServiceClientType",{enumerable:!0,get:function(){return pb.ServiceClientType}});var fb=an();Object.defineProperty(ye,"getExportRequestProto",{enumerable:!0,get:function(){return fb.getExportRequestProto}})});var q=Q(Lu(),1);y();Du();var Cm=Q(gf(),1),Sr=Q(pt(),1),Um=Q(Uf(),1),Dm=Q(jd(),1),Bm=Q(fe(),1),br=Q(hn(),1),Vm=Q(Hd(),1),be=Q(N(),1);y();var $T=Symbol.for("@vercel/request-context");function lr(){return globalThis[$T]?.get()}var rc=Q(fe(),1);function ki(i){return Object.fromEntries(Object.entries(i).filter(([r,o])=>o!==void 0))}function Fd(i){return i?i.split("::").at(-1):void 0}function Kd(i=lr(),r){if(!i)return;let o=r?WT(r,i.headers):void 0;return ki({[rc.SemanticAttributes.HTTP_HOST]:i.headers.host,[rc.SemanticAttributes.HTTP_USER_AGENT]:i.headers["user-agent"],"http.referer":i.headers.referer,"vercel.request_id":Fd(i.headers["x-vercel-id"]),"vercel.matched_path":i.headers["x-matched-path"],"vercel.edge_region":i.headers["x-vercel-edge-region"],...o})}var YT={keys(i){return[]},get(i,r){return i[r.toLocaleLowerCase()]}};function WT(i,r){if(typeof i=="function")return i(r,YT);let o={};for(let[c,s]of Object.entries(i)){let a=r[s.toLocaleLowerCase()];a!==void 0&&(o[c]=a)}return o}y();function Yr(i){return(i&_.TraceFlags.SAMPLED)!==0}var qi=class{constructor(r,o){this.processors=r;this.attributesFromHeaders=o;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(r=>r.forceFlush().catch(o=>{_.diag.error("@vercel/otel: forceFlush failed:",o)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(r=>r.shutdown().catch(()=>{}))).then(()=>{})}onStart(r,o){let{traceId:c,spanId:s,traceFlags:a}=r.spanContext(),t=!r.parentSpanId||!this.rootSpanIds.has(c);if(t?this.rootSpanIds.set(c,{rootSpanId:s,open:[]}):this.rootSpanIds.get(c)?.open.push(r),t&&Yr(a)){let e=lr(),n=Kd(e,this.attributesFromHeaders);n&&r.setAttributes(n),e&&e.waitUntil(async()=>{if(this.rootSpanIds.has(c)){let u=new Promise(h=>{this.waitSpanEnd.set(c,h)}),l;await Promise.race([u,new Promise(h=>{l=setTimeout(()=>{this.waitSpanEnd.delete(c),h(void 0)},50)})]),l&&clearTimeout(l)}return this.forceFlush()})}for(let e of this.processors)e.onStart(r,o)}onEnd(r){let{traceId:o,spanId:c,traceFlags:s}=r.spanContext(),a=Yr(s),t=this.rootSpanIds.get(o),e=t?.rootSpanId===c;if(a){let n=QT(r);n&&Object.assign(r.attributes,n)}if(e){if(this.rootSpanIds.delete(o),t.open.length>0){for(let n of t.open)if(!n.ended&&n.spanContext().spanId!==c)try{n.end()}catch(u){_.diag.error("@vercel/otel: onEnd failed:",u)}}}else if(t)for(let n=0;n<t.open.length;n++)t.open[n]?.spanContext().spanId===c&&t.open.splice(n,1);for(let n of this.processors)n.onEnd(r);if(e){let n=this.waitSpanEnd.get(o);n&&(this.waitSpanEnd.delete(o),n())}}},JT={[_.SpanKind.INTERNAL]:"internal",[_.SpanKind.SERVER]:"server",[_.SpanKind.CLIENT]:"client",[_.SpanKind.PRODUCER]:"producer",[_.SpanKind.CONSUMER]:"consumer"};function QT(i){let{kind:r,attributes:o}=i,{"operation.name":c,"resouce.name":s,"span.type":a,"next.span_type":t,"http.method":e,"http.route":n}=o;if(c)return;let u=s??(e&&typeof e=="string"&&n&&typeof n=="string"?`${e} ${n}`:n);if(i.kind===_.SpanKind.SERVER&&e&&n&&typeof e=="string"&&typeof n=="string")return{"operation.name":"web.request","resource.name":u};let l=i.instrumentationLibrary.name,h=t??a;if(h&&typeof h=="string"){let T=Xd(l,h);return n?{"operation.name":T,"resource.name":u}:{"operation.name":T}}return{"operation.name":Xd(l,r===_.SpanKind.INTERNAL?"":JT[r])}}function Xd(i,r){if(!i)return r;let o=i.replace(/[ @./]/g,"_");return o.startsWith("_")&&(o=o.slice(1)),r?`${o}.${r}`:o}var ih=Q(cc(),1);var oh=Q(Jr(),1);y();var pr=class extends oh.OTLPExporterBase{constructor(r={}){super(r),r.headers&&(this._headers=r.headers)}onShutdown(){_.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){_.diag.debug("@vercel/otel/otlp: onInit")}send(r,o,c){if(this._shutdownOnce.isCalled){_.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let s=this.convert(r),a,t,e;try{({body:a,contentType:t,headers:e}=this.toMessage(s))}catch(u){_.diag.warn("@vercel/otel/otlp: no proto",u);return}let n=fetch(this.url,{method:"POST",body:a,headers:{...this._headers,...e,"Content-Type":t,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(u=>{_.diag.debug("@vercel/otel/otlp: onSuccess",u.status,u.statusText),o(),u.arrayBuffer().catch(()=>{})}).catch(u=>{_.diag.error("@vercel/otel/otlp: onError",u),c(u)}).finally(()=>{let u=this._sendingPromises.indexOf(n);this._sendingPromises.splice(u,1)});this._sendingPromises.push(n)}getDefaultUrl(r){throw new Error("Method not implemented.")}};var gS="v1/traces",vS=`http://localhost:4318/${gS}`;function Fi(i){return typeof i.url=="string"?i.url:vS}var fr=class{constructor(r={}){this.impl=new dc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},dc=class extends pr{convert(r){return(0,ih.createExportTraceServiceRequest)(r,{useHex:!0,useLongBits:!1})}toMessage(r){return{body:JSON.stringify(r),contentType:"application/json"}}getDefaultUrl(r){return Fi(r)}};var Nm=Q(cc(),1),Rm=Q(Pm(),1),xm=Q(an(),1);var Tt=class{constructor(r={}){this.impl=new jc(r)}export(r,o){this.impl.export(r,o)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},jc=class extends pr{convert(r){return(0,Nm.createExportTraceServiceRequest)(r,void 0)}toMessage(r){let o=Rm.ServiceClientType.SPANS,c=(0,xm.getExportRequestProto)(o),s=c.create(r);return{body:c.encode(s).finish(),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(r){return Fi(r)}};y();var Ce=Q(fe(),1);function Im(i,r){return i.replace(/\{(?<temp1>[^{}]+)\}/g,(o,c)=>{let s=r[c];return s!==void 0?String(s):o})}var vr=class{constructor(r={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=r}getConfig(){return this.config}setConfig(){}setTracerProvider(r){this.tracerProvider=r}setMeterProvider(){}enable(){this.disable();let{tracerProvider:r}=this;if(!r)return;let o=r.getTracer(this.instrumentationName,this.instrumentationVersion),c=this.config.ignoreUrls??[],s=(x,B)=>{if(B?.opentelemetry?.ignore!==void 0)return B.opentelemetry.ignore;if(c.length===0)return!1;let b=x.toString();return c.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))},a=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,t=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,e=this.config.propagateContextUrls??[],n=this.config.dontPropagateContextUrls??[],u=this.config.resourceNameTemplate,{attributesFromRequestHeaders:l,attributesFromResponseHeaders:h}=this.config,T=(x,B)=>{if(B?.opentelemetry?.propagateContext)return B.opentelemetry.propagateContext;let b=x.toString();return n.length>0&&n.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))?!1:a&&x.protocol==="https:"&&(x.host===a||x.host===t||x.host===lr()?.headers.host)||!a&&x.protocol==="http:"&&x.hostname==="localhost"?!0:e.some(S=>typeof S=="string"?S==="*"?!0:b.startsWith(S):S.test(b))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let D=globalThis.fetch;this.originalFetch=D;let L=async(x,B)=>{let b=B;if(b?.next?.internal)return D(x,b);let S=new Request(x instanceof Request?x.clone():x,b),K=new URL(S.url);if(s(K,b))return D(x,b);let as={[Ce.SemanticAttributes.HTTP_METHOD]:S.method,[Ce.SemanticAttributes.HTTP_URL]:S.url,[Ce.SemanticAttributes.HTTP_HOST]:K.host,[Ce.SemanticAttributes.HTTP_SCHEME]:K.protocol.replace(":",""),[Ce.SemanticAttributes.NET_PEER_NAME]:K.hostname,[Ce.SemanticAttributes.NET_PEER_PORT]:K.port},St=u?Im(u,as):hb(S.url),qm=b?.opentelemetry?.spanName??`fetch ${S.method} ${S.url}`,Hc=_.context.active(),X=o.startSpan(qm,{kind:_.SpanKind.CLIENT,attributes:{...as,"operation.name":`fetch.${S.method}`,"resource.name":St,...b?.opentelemetry?.attributes}},Hc);if(!X.isRecording()||!Yr(X.spanContext().traceFlags))return X.end(),D(x,b);if(T(K,b)){let bt=_.trace.setSpan(Hc,X);_.propagation.inject(bt,S.headers,db)}l&&Lm(X,l,S.headers);try{let bt=Date.now(),Ue=await D(x,{...b,headers:S.headers}),jm=Date.now()-bt;return X.setAttribute(Ce.SemanticAttributes.HTTP_STATUS_CODE,Ue.status),X.setAttribute("http.response_time",jm),h&&Lm(X,h,Ue.headers),Ue.status>=500&&Gc(X,`Status: ${Ue.status} (${Ue.statusText})`),Ue.body?mb(Ue).then(cs=>{X.isRecording()&&(X.setAttribute(Ce.SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,cs),X.end())},cs=>{X.isRecording()&&(Gc(X,cs),X.end())}):X.end(),Ue}catch(bt){throw Gc(X,bt),X.end(),bt}};globalThis.fetch=L}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},db={set(i,r,o){i.set(r,o)}};function hb(i){let r=i.indexOf("?");return r===-1?i:i.substring(0,r)}function mb(i){let r=0,c=i.clone().body?.getReader();if(!c)return Promise.resolve(0);let s=()=>c.read().then(({done:a,value:t})=>{if(!a)return r+=t.byteLength,s()});return s().then(()=>r)}function Gc(i,r){if(r instanceof Error)i.recordException(r),i.setStatus({code:_.SpanStatusCode.ERROR,message:r.message});else{let o=String(r);i.setStatus({code:_.SpanStatusCode.ERROR,message:o})}}function Lm(i,r,o){for(let[c,s]of Object.entries(r)){let a=o.get(s);a!==null&&i.setAttribute(c,a)}}var us=class{constructor(r={}){this.configuration=r}start(){let r=_b(),o=(0,br.getEnvWithoutDefaults)(),c=this.configuration,s=process.env.NEXT_RUNTIME||"nodejs",a=!!r.OTEL_SDK_DISABLED;if(o.OTEL_LOG_LEVEL&&_.diag.setLogger(new _.DiagConsoleLogger,{logLevel:o.OTEL_LOG_LEVEL}),a)return;let t=c.idGenerator??new q.RandomIdGenerator,e=c.contextManager??new Vm.AsyncLocalStorageContextManager;e.enable(),this.contextManager=e;let n=r.OTEL_SERVICE_NAME||c.serviceName||"app",u=new Sr.Resource(ki({[Bm.SemanticResourceAttributes.SERVICE_NAME]:n,"node.ci":process.env.CI?!0:void 0,"node.env":process.env.NODE_ENV,env:process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":s,"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})),l=c.resourceDetectors??[Sr.envDetectorSync];if(c.autoDetectResources??!0){let S={detectors:l};u=u.merge((0,Sr.detectResourcesSync)(S))}let T=Eb(c.propagators,r),D=gb(c.traceSampler,r),L=vb(c.spanProcessors,c,r);L.length===0&&_.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let x=c.spanLimits,B=new q.BasicTracerProvider({resource:u,idGenerator:t,sampler:D,spanLimits:x});if(B.addSpanProcessor(new qi(L,c.attributesFromHeaders)),B.register({contextManager:e,propagator:new be.CompositePropagator({propagators:T})}),this.tracerProvider=B,c.logRecordProcessor){let S=new Um.LoggerProvider({resource:u});this.loggerProvider=S,S.addLogRecordProcessor(c.logRecordProcessor),ht.logs.setGlobalLoggerProvider(S)}if(c.metricReader||c.views){let S=new Dm.MeterProvider({resource:u,views:c.views??[]});c.metricReader&&S.addMetricReader(c.metricReader),_.metrics.setGlobalMeterProvider(S),this.meterProvider=S}let b=yb(c.instrumentations,c.instrumentationConfig);this.disableInstumentations=(0,Cm.registerInstrumentations)({instrumentations:b}),_.diag.info("@vercel/otel: started",n,s)}async shutdown(){let r=[];this.tracerProvider&&r.push(this.tracerProvider.shutdown()),this.loggerProvider&&r.push(this.loggerProvider.shutdown()),this.meterProvider&&r.push(this.meterProvider.shutdown()),_.diag.info("@vercel/otel: shutting down",r.length,process.env.NEXT_RUNTIME),await Promise.all(r),this.contextManager&&this.contextManager.disable();let{disableInstumentations:o}=this;o&&o()}};function _b(){let i=(0,br.parseEnvironment)(process.env);return{...br.DEFAULT_ENVIRONMENT,...i}}function yb(i,r){return(i??["auto"]).map(o=>o==="auto"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),[new vr(r?.fetch)]):o==="fetch"?(_.diag.debug("@vercel/otel: Configure instrumentations: fetch",r?.fetch),new vr(r?.fetch)):o).flat()}function Eb(i,r){let o=r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(i??o??["auto"]).map(c=>{if(c==="none")return[];if(c==="auto")return _.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new be.W3CTraceContextPropagator,new be.W3CBaggagePropagator];if(c==="tracecontext")return _.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new be.W3CTraceContextPropagator;if(c==="baggage")return _.diag.debug("@vercel/otel: Configure propagator: baggage"),new be.W3CBaggagePropagator;if(typeof c=="string")throw new Error(`Unknown propagator: "${c}"`);return c}).flat()}var wm="always_on",Tr=1;function gb(i,r){if(i&&typeof i!="string")return i;let o=i&&i!=="auto"?i:r.OTEL_TRACES_SAMPLER||wm;switch(_.diag.debug("@vercel/otel: Configure sampler: ",o),o){case"always_on":return new q.AlwaysOnSampler;case"always_off":return new q.AlwaysOffSampler;case"parentbased_always_on":return new q.ParentBasedSampler({root:new q.AlwaysOnSampler});case"parentbased_always_off":return new q.ParentBasedSampler({root:new q.AlwaysOffSampler});case"traceidratio":return new q.TraceIdRatioBasedSampler(Mm(r));case"parentbased_traceidratio":return new q.ParentBasedSampler({root:new q.TraceIdRatioBasedSampler(Mm(r))});default:return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(r.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${wm}".`),new q.AlwaysOnSampler}}function Mm(i){if(i.OTEL_TRACES_SAMPLER_ARG===void 0||i.OTEL_TRACES_SAMPLER_ARG==="")return _.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Tr}.`),Tr;_.diag.debug("@vercel/otel: Configure sampler probability: ",i.OTEL_TRACES_SAMPLER_ARG);let r=Number(i.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Tr}.`),Tr):r<0||r>1?(_.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${i.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${Tr}.`),Tr):r}function vb(i,r,o){return[...(i??["auto"]).map(c=>{if(c==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let s=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";_.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",s,a);let t={url:`http://localhost:${s}/v1/traces`,headers:{}},e=a==="http/protobuf"?new Tt(t):new fr(t);return new q.BatchSpanProcessor(e)}return!r.traceExporter||r.traceExporter==="auto"||o.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||o.OTEL_EXPORTER_OTLP_ENDPOINT?new q.BatchSpanProcessor(Tb(o)):void 0}return c}).filter(Ob),...r.traceExporter&&r.traceExporter!=="auto"?[new q.BatchSpanProcessor(r.traceExporter)]:[]]}function Tb(i){let r=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",o=bb(i),c={...be.baggageUtils.parseKeyPairsIntoRecord(i.OTEL_EXPORTER_OTLP_HEADERS),...be.baggageUtils.parseKeyPairsIntoRecord(i.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(_.diag.debug("@vercel/otel: Configure trace exporter: ",r,o,`headers: ${Object.keys(c).join(",")||"<none>"}`),r){case"http/json":return new fr({url:o,headers:c});case"http/protobuf":return new Tt({url:o,headers:c});default:return _.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${r}. Using http/protobuf.`),new Tt}}var km="v1/traces",Sb=`http://localhost:4318/${km}`;function bb(i){let r=i.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(r&&typeof r=="string")return r;let o=i.OTEL_EXPORTER_OTLP_ENDPOINT;return o&&typeof o=="string"?`${o}/${km}`:Sb}function Ob(i){return i!=null}function lR(i){let r;i?typeof i=="string"?r={serviceName:i}:r=i:r={},new us(r).start()}export{vr as FetchInstrumentation,fr as OTLPHttpJsonTraceExporter,Tt as OTLPHttpProtoTraceExporter,lR as registerOTel};
19
+ `,(0,Qi.getIncompatibilityDetails)(s,e),`To resolve the conflict:
20
+ `,(0,Qi.getConflictResolutionRecipe)(s,e))}return n}};Zi.MetricStorageRegistry=eu});var v_=c(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.MultiMetricStorage=void 0;var tu=class{constructor(e){this._backingStorages=e}record(e,t,n,i){this._backingStorages.forEach(s=>{s.record(e,t,n,i)})}};Ji.MultiMetricStorage=tu});var L_=c(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.BatchObservableResultImpl=Qt.ObservableResultImpl=void 0;var Yt=(h(),f(d)),I_=Mr(),HT=ki(),ru=class{constructor(e,t){this._instrumentName=e,this._valueType=t,this._buffer=new I_.AttributeHashMap}observe(e,t={}){if(typeof e!="number"){Yt.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${e}`);return}this._valueType===Yt.ValueType.INT&&!Number.isInteger(e)&&(Yt.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(t,e)}};Qt.ObservableResultImpl=ru;var nu=class{constructor(){this._buffer=new Map}observe(e,t,n={}){if(!(0,HT.isObservableInstrument)(e))return;let i=this._buffer.get(e);if(i==null&&(i=new I_.AttributeHashMap,this._buffer.set(e,i)),typeof t!="number"){Yt.diag.warn(`non-number value provided to metric ${e._descriptor.name}: ${t}`);return}e._descriptor.valueType===Yt.ValueType.INT&&!Number.isInteger(t)&&(Yt.diag.warn(`INT value type cannot accept a floating-point value for ${e._descriptor.name}, ignoring the fractional digits.`),t=Math.trunc(t),!Number.isInteger(t))||i.set(n,t)}};Qt.BatchObservableResultImpl=nu});var N_=c(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.ObservableRegistry=void 0;var kT=(h(),f(d)),M_=ki(),C_=L_(),Cr=me(),iu=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(e,t){this._findCallback(e,t)>=0||this._callbacks.push({callback:e,instrument:t})}removeCallback(e,t){let n=this._findCallback(e,t);n<0||this._callbacks.splice(n,1)}addBatchCallback(e,t){let n=new Set(t.filter(M_.isObservableInstrument));if(n.size===0){kT.diag.error("BatchObservableCallback is not associated with valid instruments",t);return}this._findBatchCallback(e,n)>=0||this._batchCallbacks.push({callback:e,instruments:n})}removeBatchCallback(e,t){let n=new Set(t.filter(M_.isObservableInstrument)),i=this._findBatchCallback(e,n);i<0||this._batchCallbacks.splice(i,1)}async observe(e,t){let n=this._observeCallbacks(e,t),i=this._observeBatchCallbacks(e,t);return(await(0,Cr.PromiseAllSettled)([...n,...i])).filter(Cr.isPromiseAllSettledRejectionResult).map(a=>a.reason)}_observeCallbacks(e,t){return this._callbacks.map(async({callback:n,instrument:i})=>{let s=new C_.ObservableResultImpl(i._descriptor.name,i._descriptor.valueType),o=Promise.resolve(n(s));t!=null&&(o=(0,Cr.callWithTimeout)(o,t)),await o,i._metricStorages.forEach(a=>{a.record(s._buffer,e)})})}_observeBatchCallbacks(e,t){return this._batchCallbacks.map(async({callback:n,instruments:i})=>{let s=new C_.BatchObservableResultImpl,o=Promise.resolve(n(s));t!=null&&(o=(0,Cr.callWithTimeout)(o,t)),await o,i.forEach(a=>{let u=s._buffer.get(a);u!=null&&a._metricStorages.forEach(l=>{l.record(u,e)})})})}_findCallback(e,t){return this._callbacks.findIndex(n=>n.callback===e&&n.instrument===t)}_findBatchCallback(e,t){return this._batchCallbacks.findIndex(n=>n.callback===e&&(0,Cr.setEquals)(n.instruments,t))}};es.ObservableRegistry=iu});var w_=c(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.SyncMetricStorage=void 0;var XT=$a(),$T=Ya(),WT=Za(),su=class extends XT.MetricStorage{constructor(e,t,n,i){super(e),this._attributesProcessor=n,this._deltaMetricStorage=new $T.DeltaMetricProcessor(t),this._temporalMetricStorage=new WT.TemporalMetricProcessor(t,i)}record(e,t,n,i){t=this._attributesProcessor.process(t,n),this._deltaMetricStorage.record(e,t,n,i)}collect(e,t){let n=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,n,t)}};ts.SyncMetricStorage=su});var au=c(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.FilteringAttributesProcessor=xe.NoopAttributesProcessor=xe.AttributesProcessor=void 0;var Nr=class{static Noop(){return KT}};xe.AttributesProcessor=Nr;var rs=class extends Nr{process(e,t){return e}};xe.NoopAttributesProcessor=rs;var ou=class extends Nr{constructor(e){super(),this._allowedAttributeNames=e}process(e,t){let n={};return Object.keys(e).filter(i=>this._allowedAttributeNames.includes(i)).forEach(i=>n[i]=e[i]),n}};xe.FilteringAttributesProcessor=ou;var KT=new rs});var x_=c(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.MeterSharedState=void 0;var zT=Oe(),YT=g_(),QT=me(),ZT=T_(),JT=y_(),eS=v_(),tS=N_(),rS=w_(),nS=au(),uu=class{constructor(e,t){this._meterProviderSharedState=e,this._instrumentationScope=t,this.metricStorageRegistry=new JT.MetricStorageRegistry,this.observableRegistry=new tS.ObservableRegistry,this.meter=new YT.Meter(this)}registerMetricStorage(e){let t=this._registerMetricStorage(e,rS.SyncMetricStorage);return t.length===1?t[0]:new eS.MultiMetricStorage(t)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,ZT.AsyncMetricStorage)}async collect(e,t,n){let i=await this.observableRegistry.observe(t,n?.timeoutMillis),s=this.metricStorageRegistry.getStorages(e);if(s.length===0)return null;let o=s.map(a=>a.collect(e,t)).filter(QT.isNotNullish);return o.length===0?{errors:i}:{scopeMetrics:{scope:this._instrumentationScope,metrics:o},errors:i}}_registerMetricStorage(e,t){let i=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(s=>{let o=(0,zT.createInstrumentDescriptorWithView)(s,e),a=this.metricStorageRegistry.findOrUpdateCompatibleStorage(o);if(a!=null)return a;let u=s.aggregation.createAggregator(o),l=new t(o,u,s.attributesProcessor,this._meterProviderSharedState.metricCollectors);return this.metricStorageRegistry.register(l),l});if(i.length===0){let o=this._meterProviderSharedState.selectAggregations(e.type).map(([a,u])=>{let l=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(a,e);if(l!=null)return l;let _=u.createAggregator(e),E=new t(e,_,nS.AttributesProcessor.Noop(),[a]);return this.metricStorageRegistry.registerForCollector(a,E),E});i=i.concat(o)}return i}};ns.MeterSharedState=uu});var D_=c(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.MeterProviderSharedState=void 0;var iS=me(),sS=m_(),oS=x_(),cu=class{constructor(e){this.resource=e,this.viewRegistry=new sS.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(e){let t=(0,iS.instrumentationScopeId)(e),n=this.meterSharedStates.get(t);return n==null&&(n=new oS.MeterSharedState(this,e),this.meterSharedStates.set(t,n)),n}selectAggregations(e){let t=[];for(let n of this.metricCollectors)t.push([n,n.selectAggregation(e)]);return t}};is.MeterProviderSharedState=cu});var B_=c(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.MetricCollector=void 0;var aS=S(),lu=class{constructor(e,t){this._sharedState=e,this._metricReader=t}async collect(e){let t=(0,aS.millisToHrTime)(Date.now()),n=[],i=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(async o=>{let a=await o.collect(this,t,e);a?.scopeMetrics!=null&&n.push(a.scopeMetrics),a?.errors!=null&&i.push(...a.errors)});return await Promise.all(s),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:i}}async forceFlush(e){await this._metricReader.forceFlush(e)}async shutdown(e){await this._metricReader.shutdown(e)}selectAggregationTemporality(e){return this._metricReader.selectAggregationTemporality(e)}selectAggregation(e){return this._metricReader.selectAggregation(e)}};ss.MetricCollector=lu});var q_=c(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.MeterProvider=void 0;var os=(h(),f(d)),U_=tt(),uS=D_(),cS=B_(),du=class{constructor(e){var t;this._shutdown=!1;let n=U_.Resource.default().merge((t=e?.resource)!==null&&t!==void 0?t:U_.Resource.empty());if(this._sharedState=new uS.MeterProviderSharedState(n),e?.views!=null&&e.views.length>0)for(let i of e.views)this._sharedState.viewRegistry.addView(i)}getMeter(e,t="",n={}){return this._shutdown?(os.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,os.createNoopMeter)()):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:n.schemaUrl}).meter}addMetricReader(e){let t=new cS.MetricCollector(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)}async shutdown(e){if(this._shutdown){os.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(t=>t.shutdown(e)))}async forceFlush(e){if(this._shutdown){os.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(t=>t.forceFlush(e)))}};as.MeterProvider=du});var us=c(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.ExactPredicate=Zt.PatternPredicate=void 0;var lS=/[\^$\\.+?()[\]{}|]/g,_u=class r{constructor(e){e==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(r.escapePattern(e)))}match(e){return this._matchAll?!0:this._regexp.test(e)}static escapePattern(e){return`^${e.replace(lS,"\\$&").replace("*",".*")}$`}static hasWildcard(e){return e.includes("*")}};Zt.PatternPredicate=_u;var hu=class{constructor(e){this._matchAll=e===void 0,this._pattern=e}match(e){return!!(this._matchAll||e===this._pattern)}};Zt.ExactPredicate=hu});var V_=c(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.InstrumentSelector=void 0;var G_=us(),pu=class{constructor(e){var t;this._nameFilter=new G_.PatternPredicate((t=e?.name)!==null&&t!==void 0?t:"*"),this._type=e?.type,this._unitFilter=new G_.ExactPredicate(e?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};cs.InstrumentSelector=pu});var j_=c(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.MeterSelector=void 0;var fu=us(),Eu=class{constructor(e){this._nameFilter=new fu.ExactPredicate(e?.name),this._versionFilter=new fu.ExactPredicate(e?.version),this._schemaUrlFilter=new fu.ExactPredicate(e?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};ls.MeterSelector=Eu});var H_=c(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});ds.View=void 0;var dS=us(),F_=au(),_S=V_(),hS=j_(),pS=Bi();function fS(r){return r.instrumentName==null&&r.instrumentType==null&&r.instrumentUnit==null&&r.meterName==null&&r.meterVersion==null&&r.meterSchemaUrl==null}var mu=class{constructor(e){var t;if(fS(e))throw new Error("Cannot create view with no selector arguments supplied");if(e.name!=null&&(e?.instrumentName==null||dS.PatternPredicate.hasWildcard(e.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");e.attributeKeys!=null?this.attributesProcessor=new F_.FilteringAttributesProcessor(e.attributeKeys):this.attributesProcessor=F_.AttributesProcessor.Noop(),this.name=e.name,this.description=e.description,this.aggregation=(t=e.aggregation)!==null&&t!==void 0?t:pS.Aggregation.Default(),this.instrumentSelector=new _S.InstrumentSelector({name:e.instrumentName,type:e.instrumentType,unit:e.instrumentUnit}),this.meterSelector=new hS.MeterSelector({name:e.meterName,version:e.meterVersion,schemaUrl:e.meterSchemaUrl})}};ds.View=mu});var k_=c(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.TimeoutError=g.View=g.Aggregation=g.SumAggregation=g.LastValueAggregation=g.HistogramAggregation=g.DropAggregation=g.ExponentialHistogramAggregation=g.ExplicitBucketHistogramAggregation=g.DefaultAggregation=g.MeterProvider=g.InstrumentType=g.ConsoleMetricExporter=g.InMemoryMetricExporter=g.PeriodicExportingMetricReader=g.MetricReader=g.DataPointType=g.AggregationTemporality=void 0;var ES=Oi();Object.defineProperty(g,"AggregationTemporality",{enumerable:!0,get:function(){return ES.AggregationTemporality}});var mS=Nt();Object.defineProperty(g,"DataPointType",{enumerable:!0,get:function(){return mS.DataPointType}});var gS=wa();Object.defineProperty(g,"MetricReader",{enumerable:!0,get:function(){return gS.MetricReader}});var TS=__();Object.defineProperty(g,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return TS.PeriodicExportingMetricReader}});var SS=p_();Object.defineProperty(g,"InMemoryMetricExporter",{enumerable:!0,get:function(){return SS.InMemoryMetricExporter}});var AS=E_();Object.defineProperty(g,"ConsoleMetricExporter",{enumerable:!0,get:function(){return AS.ConsoleMetricExporter}});var OS=Oe();Object.defineProperty(g,"InstrumentType",{enumerable:!0,get:function(){return OS.InstrumentType}});var RS=q_();Object.defineProperty(g,"MeterProvider",{enumerable:!0,get:function(){return RS.MeterProvider}});var De=Bi();Object.defineProperty(g,"DefaultAggregation",{enumerable:!0,get:function(){return De.DefaultAggregation}});Object.defineProperty(g,"ExplicitBucketHistogramAggregation",{enumerable:!0,get:function(){return De.ExplicitBucketHistogramAggregation}});Object.defineProperty(g,"ExponentialHistogramAggregation",{enumerable:!0,get:function(){return De.ExponentialHistogramAggregation}});Object.defineProperty(g,"DropAggregation",{enumerable:!0,get:function(){return De.DropAggregation}});Object.defineProperty(g,"HistogramAggregation",{enumerable:!0,get:function(){return De.HistogramAggregation}});Object.defineProperty(g,"LastValueAggregation",{enumerable:!0,get:function(){return De.LastValueAggregation}});Object.defineProperty(g,"SumAggregation",{enumerable:!0,get:function(){return De.SumAggregation}});Object.defineProperty(g,"Aggregation",{enumerable:!0,get:function(){return De.Aggregation}});var bS=H_();Object.defineProperty(g,"View",{enumerable:!0,get:function(){return bS.View}});var PS=me();Object.defineProperty(g,"TimeoutError",{enumerable:!0,get:function(){return PS.TimeoutError}})});var X_=c(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.AbstractAsyncHooksContextManager=void 0;var yS=J("events"),vS=["addListener","on","once","prependListener","prependOnceListener"],gu=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,t){return t instanceof yS.EventEmitter?this._bindEventEmitter(e,t):typeof t=="function"?this._bindFunction(e,t):t}_bindFunction(e,t){let n=this,i=function(...s){return n.with(e,()=>t.apply(this,s))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),i}_bindEventEmitter(e,t){return this._getPatchMap(t)!==void 0||(this._createPatchMap(t),vS.forEach(i=>{t[i]!==void 0&&(t[i]=this._patchAddListener(t,t[i],e))}),typeof t.removeListener=="function"&&(t.removeListener=this._patchRemoveListener(t,t.removeListener)),typeof t.off=="function"&&(t.off=this._patchRemoveListener(t,t.off)),typeof t.removeAllListeners=="function"&&(t.removeAllListeners=this._patchRemoveAllListeners(t,t.removeAllListeners))),t}_patchRemoveListener(e,t){let n=this;return function(i,s){var o;let a=(o=n._getPatchMap(e))===null||o===void 0?void 0:o[i];if(a===void 0)return t.call(this,i,s);let u=a.get(s);return t.call(this,i,u||s)}}_patchRemoveAllListeners(e,t){let n=this;return function(i){let s=n._getPatchMap(e);return s!==void 0&&(arguments.length===0?n._createPatchMap(e):s[i]!==void 0&&delete s[i]),t.apply(this,arguments)}}_patchAddListener(e,t,n){let i=this;return function(s,o){if(i._wrapped)return t.call(this,s,o);let a=i._getPatchMap(e);a===void 0&&(a=i._createPatchMap(e));let u=a[s];u===void 0&&(u=new WeakMap,a[s]=u);let l=i.bind(n,o);u.set(o,l),i._wrapped=!0;try{return t.call(this,s,l)}finally{i._wrapped=!1}}}_createPatchMap(e){let t=Object.create(null);return e[this._kOtListeners]=t,t}_getPatchMap(e){return e[this._kOtListeners]}};_s.AbstractAsyncHooksContextManager=gu});var $_=c(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.AsyncLocalStorageContextManager=void 0;var IS=(h(),f(d)),LS=J("async_hooks"),MS=X_(),Tu=class extends MS.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new LS.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:IS.ROOT_CONTEXT}with(e,t,n,...i){let s=n==null?t:t.bind(n);return this._asyncLocalStorage.run(e,s,...i)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};hs.AsyncLocalStorageContextManager=Tu});var Ru=c(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.toAnyValue=Be.toKeyValue=Be.toAttributes=void 0;function BS(r){return Object.keys(r).map(e=>Au(e,r[e]))}Be.toAttributes=BS;function Au(r,e){return{key:r,value:Ou(e)}}Be.toKeyValue=Au;function Ou(r){let e=typeof r;return e==="string"?{stringValue:r}:e==="number"?Number.isInteger(r)?{intValue:r}:{doubleValue:r}:e==="boolean"?{boolValue:r}:r instanceof Uint8Array?{bytesValue:r}:Array.isArray(r)?{arrayValue:{values:r.map(Ou)}}:e==="object"&&r!=null?{kvlistValue:{values:Object.entries(r).map(([t,n])=>Au(t,n))}}:{}}Be.toAnyValue=Ou});var Z_=c(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.toOtlpSpanEvent=Ue.toOtlpLink=Ue.sdkSpanToOtlpSpan=void 0;var bu=Ru();function US(r,e){var t;let n=r.spanContext(),i=r.status;return{traceId:e.encodeSpanContext(n.traceId),spanId:e.encodeSpanContext(n.spanId),parentSpanId:e.encodeOptionalSpanContext(r.parentSpanId),traceState:(t=n.traceState)===null||t===void 0?void 0:t.serialize(),name:r.name,kind:r.kind==null?0:r.kind+1,startTimeUnixNano:e.encodeHrTime(r.startTime),endTimeUnixNano:e.encodeHrTime(r.endTime),attributes:(0,bu.toAttributes)(r.attributes),droppedAttributesCount:r.droppedAttributesCount,events:r.events.map(s=>Q_(s,e)),droppedEventsCount:r.droppedEventsCount,status:{code:i.code,message:i.message},links:r.links.map(s=>Y_(s,e)),droppedLinksCount:r.droppedLinksCount}}Ue.sdkSpanToOtlpSpan=US;function Y_(r,e){var t;return{attributes:r.attributes?(0,bu.toAttributes)(r.attributes):[],spanId:e.encodeSpanContext(r.context.spanId),traceId:e.encodeSpanContext(r.context.traceId),traceState:(t=r.context.traceState)===null||t===void 0?void 0:t.serialize(),droppedAttributesCount:r.droppedAttributesCount||0}}Ue.toOtlpLink=Y_;function Q_(r,e){return{attributes:r.attributes?(0,bu.toAttributes)(r.attributes):[],name:r.name,timeUnixNano:e.encodeHrTime(r.time),droppedAttributesCount:r.droppedAttributesCount||0}}Ue.toOtlpSpanEvent=Q_});var nh=c(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.getOtlpEncoder=oe.encodeAsString=oe.encodeAsLongBits=oe.toLongBits=oe.hrTimeToNanos=void 0;var Es=S(),qS=BigInt(1e9);function Pu(r){return BigInt(r[0])*qS+BigInt(r[1])}oe.hrTimeToNanos=Pu;function eh(r){let e=Number(BigInt.asUintN(32,r)),t=Number(BigInt.asUintN(32,r>>BigInt(32)));return{low:e,high:t}}oe.toLongBits=eh;function yu(r){let e=Pu(r);return eh(e)}oe.encodeAsLongBits=yu;function th(r){return Pu(r).toString()}oe.encodeAsString=th;var GS=typeof BigInt<"u"?th:Es.hrTimeToNanoseconds;function J_(r){return r}function rh(r){if(r!==void 0)return(0,Es.hexToBase64)(r)}var VS={encodeHrTime:yu,encodeSpanContext:Es.hexToBase64,encodeOptionalSpanContext:rh};function jS(r){var e,t;if(r===void 0)return VS;let n=(e=r.useLongBits)!==null&&e!==void 0?e:!0,i=(t=r.useHex)!==null&&t!==void 0?t:!1;return{encodeHrTime:n?yu:GS,encodeSpanContext:i?J_:Es.hexToBase64,encodeOptionalSpanContext:i?J_:rh}}oe.getOtlpEncoder=jS});var vu=c(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.createExportTraceServiceRequest=void 0;var FS=Ru(),HS=Z_(),kS=nh();function XS(r,e){let t=(0,kS.getOtlpEncoder)(e);return{resourceSpans:WS(r,t)}}ms.createExportTraceServiceRequest=XS;function $S(r){let e=new Map;for(let t of r){let n=e.get(t.resource);n||(n=new Map,e.set(t.resource,n));let i=`${t.instrumentationLibrary.name}@${t.instrumentationLibrary.version||""}:${t.instrumentationLibrary.schemaUrl||""}`,s=n.get(i);s||(s=[],n.set(i,s)),s.push(t)}return e}function WS(r,e){let t=$S(r),n=[],i=t.entries(),s=i.next();for(;!s.done;){let[o,a]=s.value,u=[],l=a.values(),_=l.next();for(;!_.done;){let O=_.value;if(O.length>0){let{name:D,version:z,schemaUrl:I}=O[0].instrumentationLibrary,U=O.map(L=>(0,HS.sdkSpanToOtlpSpan)(L,e));u.push({scope:{name:D,version:z},spans:U,schemaUrl:I})}_=l.next()}let E={resource:{attributes:(0,FS.toAttributes)(o.attributes),droppedAttributesCount:0},scopeSpans:u,schemaUrl:void 0};n.push(E),s=i.next()}return n}});var oh=c(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 Iu=(h(),f(d)),ih=S(),sh=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 KS(r={}){let e={};return Object.entries(r).forEach(([t,n])=>{typeof n<"u"?e[t]=String(n):Iu.diag.warn(`Header "${t}" has wrong value and will be ignored`)}),e}C.parseHeaders=KS;function zS(r,e){return r.endsWith("/")||(r=r+"/"),r+e}C.appendResourcePathToUrl=zS;function YS(r){try{let e=new URL(r);return e.pathname===""&&(e.pathname=e.pathname+"/"),e.toString()}catch{return Iu.diag.warn(`Could not parse export URL: '${r}'`),r}}C.appendRootPathToUrlIfNeeded=YS;function QS(r){return typeof r=="number"?r<=0?Lu(r,sh):r:ZS()}C.configureExporterTimeout=QS;function ZS(){var r;let e=Number((r=(0,ih.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&r!==void 0?r:(0,ih.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return e<=0?Lu(e,sh):e}function Lu(r,e){return Iu.diag.warn("Timeout must be greater than 0",r),e}C.invalidTimeout=Lu;function JS(r){return[429,502,503,504].includes(r)}C.isExportRetryable=JS;function eA(r){if(r==null)return-1;let e=Number.parseInt(r,10);if(Number.isInteger(e))return e>0?e*1e3:-1;let t=new Date(r).getTime()-Date.now();return t>=0?t:0}C.parseRetryAfterToMills=eA});var uh=c(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.OTLPExporterBase=void 0;var ah=(h(),f(d)),xr=S(),tA=oh(),Mu=class{constructor(e={}){this._sendingPromises=[],this.url=this.getDefaultUrl(e),typeof e.hostname=="string"&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new xr.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof e.concurrencyLimit=="number"?e.concurrencyLimit:30,this.timeoutMillis=(0,tA.configureExporterTimeout)(e.timeoutMillis),this.onInit(e)}export(e,t){if(this._shutdownOnce.isCalled){t({code:xr.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){t({code:xr.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(e).then(()=>{t({code:xr.ExportResultCode.SUCCESS})}).catch(n=>{t({code:xr.ExportResultCode.FAILED,error:n})})}_export(e){return new Promise((t,n)=>{try{ah.diag.debug("items to be sent",e),this.send(e,t,n)}catch(i){n(i)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return ah.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};gs.OTLPExporterBase=Mu});var _h=c((AP,dh)=>{"use strict";dh.exports=iA;function iA(r,e){for(var t=new Array(arguments.length-1),n=0,i=2,s=!0;i<arguments.length;)t[n++]=arguments[i++];return new Promise(function(a,u){t[n]=function(_){if(s)if(s=!1,_)u(_);else{for(var E=new Array(arguments.length-1),O=0;O<E.length;)E[O++]=arguments[O];a.apply(null,E)}};try{r.apply(e||null,t)}catch(l){s&&(s=!1,u(l))}})}});var Eh=c(fh=>{"use strict";var Ss=fh;Ss.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&e.charAt(t)==="=";)++n;return Math.ceil(e.length*3)/4-n};var rr=new Array(64),ph=new Array(123);for(le=0;le<64;)ph[rr[le]=le<26?le+65:le<52?le+71:le<62?le-4:le-59|43]=le++;var le;Ss.encode=function(e,t,n){for(var i=null,s=[],o=0,a=0,u;t<n;){var l=e[t++];switch(a){case 0:s[o++]=rr[l>>2],u=(l&3)<<4,a=1;break;case 1:s[o++]=rr[u|l>>4],u=(l&15)<<2,a=2;break;case 2:s[o++]=rr[u|l>>6],s[o++]=rr[l&63],a=0;break}o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),o=0)}return a&&(s[o++]=rr[u],s[o++]=61,a===1&&(s[o++]=61)),i?(o&&i.push(String.fromCharCode.apply(String,s.slice(0,o))),i.join("")):String.fromCharCode.apply(String,s.slice(0,o))};var hh="invalid encoding";Ss.decode=function(e,t,n){for(var i=n,s=0,o,a=0;a<e.length;){var u=e.charCodeAt(a++);if(u===61&&s>1)break;if((u=ph[u])===void 0)throw Error(hh);switch(s){case 0:o=u,s=1;break;case 1:t[n++]=o<<2|(u&48)>>4,o=u,s=2;break;case 2:t[n++]=(o&15)<<4|(u&60)>>2,o=u,s=3;break;case 3:t[n++]=(o&3)<<6|u,s=0;break}}if(s===1)throw Error(hh);return n-i};Ss.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var gh=c((RP,mh)=>{"use strict";mh.exports=As;function As(){this._listeners={}}As.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this};As.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var n=this._listeners[e],i=0;i<n.length;)n[i].fn===t?n.splice(i,1):++i;return this};As.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],i=1;i<arguments.length;)n.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,n)}return this}});var Ph=c((bP,bh)=>{"use strict";bh.exports=Th(Th);function Th(r){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),n=t[3]===128;function i(u,l,_){e[0]=u,l[_]=t[0],l[_+1]=t[1],l[_+2]=t[2],l[_+3]=t[3]}function s(u,l,_){e[0]=u,l[_]=t[3],l[_+1]=t[2],l[_+2]=t[1],l[_+3]=t[0]}r.writeFloatLE=n?i:s,r.writeFloatBE=n?s:i;function o(u,l){return t[0]=u[l],t[1]=u[l+1],t[2]=u[l+2],t[3]=u[l+3],e[0]}function a(u,l){return t[3]=u[l],t[2]=u[l+1],t[1]=u[l+2],t[0]=u[l+3],e[0]}r.readFloatLE=n?o:a,r.readFloatBE=n?a:o}():function(){function e(n,i,s,o){var a=i<0?1:0;if(a&&(i=-i),i===0)n(1/i>0?0:2147483648,s,o);else if(isNaN(i))n(2143289344,s,o);else if(i>34028234663852886e22)n((a<<31|2139095040)>>>0,s,o);else if(i<11754943508222875e-54)n((a<<31|Math.round(i/1401298464324817e-60))>>>0,s,o);else{var u=Math.floor(Math.log(i)/Math.LN2),l=Math.round(i*Math.pow(2,-u)*8388608)&8388607;n((a<<31|u+127<<23|l)>>>0,s,o)}}r.writeFloatLE=e.bind(null,Sh),r.writeFloatBE=e.bind(null,Ah);function t(n,i,s){var o=n(i,s),a=(o>>31)*2+1,u=o>>>23&255,l=o&8388607;return u===255?l?NaN:a*(1/0):u===0?a*1401298464324817e-60*l:a*Math.pow(2,u-150)*(l+8388608)}r.readFloatLE=t.bind(null,Oh),r.readFloatBE=t.bind(null,Rh)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),n=t[7]===128;function i(u,l,_){e[0]=u,l[_]=t[0],l[_+1]=t[1],l[_+2]=t[2],l[_+3]=t[3],l[_+4]=t[4],l[_+5]=t[5],l[_+6]=t[6],l[_+7]=t[7]}function s(u,l,_){e[0]=u,l[_]=t[7],l[_+1]=t[6],l[_+2]=t[5],l[_+3]=t[4],l[_+4]=t[3],l[_+5]=t[2],l[_+6]=t[1],l[_+7]=t[0]}r.writeDoubleLE=n?i:s,r.writeDoubleBE=n?s:i;function o(u,l){return t[0]=u[l],t[1]=u[l+1],t[2]=u[l+2],t[3]=u[l+3],t[4]=u[l+4],t[5]=u[l+5],t[6]=u[l+6],t[7]=u[l+7],e[0]}function a(u,l){return t[7]=u[l],t[6]=u[l+1],t[5]=u[l+2],t[4]=u[l+3],t[3]=u[l+4],t[2]=u[l+5],t[1]=u[l+6],t[0]=u[l+7],e[0]}r.readDoubleLE=n?o:a,r.readDoubleBE=n?a:o}():function(){function e(n,i,s,o,a,u){var l=o<0?1:0;if(l&&(o=-o),o===0)n(0,a,u+i),n(1/o>0?0:2147483648,a,u+s);else if(isNaN(o))n(0,a,u+i),n(2146959360,a,u+s);else if(o>17976931348623157e292)n(0,a,u+i),n((l<<31|2146435072)>>>0,a,u+s);else{var _;if(o<22250738585072014e-324)_=o/5e-324,n(_>>>0,a,u+i),n((l<<31|_/4294967296)>>>0,a,u+s);else{var E=Math.floor(Math.log(o)/Math.LN2);E===1024&&(E=1023),_=o*Math.pow(2,-E),n(_*4503599627370496>>>0,a,u+i),n((l<<31|E+1023<<20|_*1048576&1048575)>>>0,a,u+s)}}}r.writeDoubleLE=e.bind(null,Sh,0,4),r.writeDoubleBE=e.bind(null,Ah,4,0);function t(n,i,s,o,a){var u=n(o,a+i),l=n(o,a+s),_=(l>>31)*2+1,E=l>>>20&2047,O=4294967296*(l&1048575)+u;return E===2047?O?NaN:_*(1/0):E===0?_*5e-324*O:_*Math.pow(2,E-1075)*(O+4503599627370496)}r.readDoubleLE=t.bind(null,Oh,0,4),r.readDoubleBE=t.bind(null,Rh,4,0)}(),r}function Sh(r,e,t){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24}function Ah(r,e,t){e[t]=r>>>24,e[t+1]=r>>>16&255,e[t+2]=r>>>8&255,e[t+3]=r&255}function Oh(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0}function Rh(r,e){return(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}});var yh=c((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(r){}return null}});var Ih=c(vh=>{"use strict";var Nu=vh;Nu.length=function(e){for(var t=0,n=0,i=0;i<e.length;++i)n=e.charCodeAt(i),n<128?t+=1:n<2048?t+=2:(n&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320?(++i,t+=4):t+=3;return t};Nu.read=function(e,t,n){var i=n-t;if(i<1)return"";for(var s=null,o=[],a=0,u;t<n;)u=e[t++],u<128?o[a++]=u:u>191&&u<224?o[a++]=(u&31)<<6|e[t++]&63:u>239&&u<365?(u=((u&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,o[a++]=55296+(u>>10),o[a++]=56320+(u&1023)):o[a++]=(u&15)<<12|(e[t++]&63)<<6|e[t++]&63,a>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),a=0);return s?(a&&s.push(String.fromCharCode.apply(String,o.slice(0,a))),s.join("")):String.fromCharCode.apply(String,o.slice(0,a))};Nu.write=function(e,t,n){for(var i=n,s,o,a=0;a<e.length;++a)s=e.charCodeAt(a),s<128?t[n++]=s:s<2048?(t[n++]=s>>6|192,t[n++]=s&63|128):(s&64512)===55296&&((o=e.charCodeAt(a+1))&64512)===56320?(s=65536+((s&1023)<<10)+(o&1023),++a,t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128);return n-i}});var Mh=c((yP,Lh)=>{"use strict";Lh.exports=sA;function sA(r,e,t){var n=t||8192,i=n>>>1,s=null,o=n;return function(u){if(u<1||u>i)return r(u);o+u>n&&(s=r(n),o=0);var l=e.call(s,o,o+=u);return o&7&&(o=(o|7)+1),l}}});var Nh=c((vP,Ch)=>{"use strict";Ch.exports=V;var Dr=Ge();function V(r,e){this.lo=r>>>0,this.hi=e>>>0}var ut=V.zero=new V(0,0);ut.toNumber=function(){return 0};ut.zzEncode=ut.zzDecode=function(){return this};ut.length=function(){return 1};var oA=V.zeroHash="\0\0\0\0\0\0\0\0";V.fromNumber=function(e){if(e===0)return ut;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new V(n,i)};V.from=function(e){if(typeof e=="number")return V.fromNumber(e);if(Dr.isString(e))if(Dr.Long)e=Dr.Long.fromString(e);else return V.fromNumber(parseInt(e,10));return e.low||e.high?new V(e.low>>>0,e.high>>>0):ut};V.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+n*4294967296)}return this.lo+this.hi*4294967296};V.prototype.toLong=function(e){return Dr.Long?new Dr.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var qe=String.prototype.charCodeAt;V.fromHash=function(e){return e===oA?ut:new V((qe.call(e,0)|qe.call(e,1)<<8|qe.call(e,2)<<16|qe.call(e,3)<<24)>>>0,(qe.call(e,4)|qe.call(e,5)<<8|qe.call(e,6)<<16|qe.call(e,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 e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};V.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};V.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}});var Ge=c(wu=>{"use strict";var p=wu;p.asPromise=_h();p.base64=Eh();p.EventEmitter=gh();p.float=Ph();p.inquire=yh();p.utf8=Ih();p.pool=Mh();p.LongBits=Nh();p.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);p.global=p.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||wu;p.emptyArray=Object.freeze?Object.freeze([]):[];p.emptyObject=Object.freeze?Object.freeze({}):{};p.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};p.isString=function(e){return typeof e=="string"||e instanceof String};p.isObject=function(e){return e&&typeof e=="object"};p.isset=p.isSet=function(e,t){var n=e[t];return n!=null&&e.hasOwnProperty(t)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};p.Buffer=function(){try{var r=p.inquire("buffer").Buffer;return r.prototype.utf8Write?r:null}catch{return null}}();p._Buffer_from=null;p._Buffer_allocUnsafe=null;p.newBuffer=function(e){return typeof e=="number"?p.Buffer?p._Buffer_allocUnsafe(e):new p.Array(e):p.Buffer?p._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};p.Array=typeof Uint8Array<"u"?Uint8Array:Array;p.Long=p.global.dcodeIO&&p.global.dcodeIO.Long||p.global.Long||p.inquire("long");p.key2Re=/^true|false|0|1$/;p.key32Re=/^-?(?:0|[1-9][0-9]*)$/;p.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;p.longToHash=function(e){return e?p.LongBits.from(e).toHash():p.LongBits.zeroHash};p.longFromHash=function(e,t){var n=p.LongBits.fromHash(e);return p.Long?p.Long.fromBits(n.lo,n.hi,t):n.toNumber(!!t)};function wh(r,e,t){for(var n=Object.keys(e),i=0;i<n.length;++i)(r[n[i]]===void 0||!t)&&(r[n[i]]=e[n[i]]);return r}p.merge=wh;p.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function xh(r){function e(t,n){if(!(this instanceof e))return new e(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&wh(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return r},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}p.newError=xh;p.ProtocolError=xh("ProtocolError");p.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var i=Object.keys(this),s=i.length-1;s>-1;--s)if(t[i[s]]===1&&this[i[s]]!==void 0&&this[i[s]]!==null)return i[s]}};p.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}};p.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};p._configure=function(){var r=p.Buffer;if(!r){p._Buffer_from=p._Buffer_allocUnsafe=null;return}p._Buffer_from=r.from!==Uint8Array.from&&r.from||function(t,n){return new r(t,n)},p._Buffer_allocUnsafe=r.allocUnsafe||function(t){return new r(t)}}});var Vu=c((LP,qh)=>{"use strict";qh.exports=A;var ae=Ge(),xu,Os=ae.LongBits,Dh=ae.base64,Bh=ae.utf8;function Br(r,e,t){this.fn=r,this.len=e,this.next=void 0,this.val=t}function Bu(){}function aA(r){this.head=r.head,this.tail=r.tail,this.len=r.len,this.next=r.states}function A(){this.len=0,this.head=new Br(Bu,0,0),this.tail=this.head,this.states=null}var Uh=function(){return ae.Buffer?function(){return(A.create=function(){return new xu})()}:function(){return new A}};A.create=Uh();A.alloc=function(e){return new ae.Array(e)};ae.Array!==Array&&(A.alloc=ae.pool(A.alloc,ae.Array.prototype.subarray));A.prototype._push=function(e,t,n){return this.tail=this.tail.next=new Br(e,t,n),this.len+=t,this};function Uu(r,e,t){e[t]=r&255}function uA(r,e,t){for(;r>127;)e[t++]=r&127|128,r>>>=7;e[t]=r}function qu(r,e){this.len=r,this.next=void 0,this.val=e}qu.prototype=Object.create(Br.prototype);qu.prototype.fn=uA;A.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new qu((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};A.prototype.int32=function(e){return e<0?this._push(Gu,10,Os.fromNumber(e)):this.uint32(e)};A.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function Gu(r,e,t){for(;r.hi;)e[t++]=r.lo&127|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)e[t++]=r.lo&127|128,r.lo=r.lo>>>7;e[t++]=r.lo}A.prototype.uint64=function(e){var t=Os.from(e);return this._push(Gu,t.length(),t)};A.prototype.int64=A.prototype.uint64;A.prototype.sint64=function(e){var t=Os.from(e).zzEncode();return this._push(Gu,t.length(),t)};A.prototype.bool=function(e){return this._push(Uu,1,e?1:0)};function Du(r,e,t){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24}A.prototype.fixed32=function(e){return this._push(Du,4,e>>>0)};A.prototype.sfixed32=A.prototype.fixed32;A.prototype.fixed64=function(e){var t=Os.from(e);return this._push(Du,4,t.lo)._push(Du,4,t.hi)};A.prototype.sfixed64=A.prototype.fixed64;A.prototype.float=function(e){return this._push(ae.float.writeFloatLE,4,e)};A.prototype.double=function(e){return this._push(ae.float.writeDoubleLE,8,e)};var cA=ae.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var i=0;i<e.length;++i)t[n+i]=e[i]};A.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(Uu,1,0);if(ae.isString(e)){var n=A.alloc(t=Dh.length(e));Dh.decode(e,n,0),e=n}return this.uint32(t)._push(cA,t,e)};A.prototype.string=function(e){var t=Bh.length(e);return t?this.uint32(t)._push(Bh.write,t,e):this._push(Uu,1,0)};A.prototype.fork=function(){return this.states=new aA(this),this.head=this.tail=new Br(Bu,0,0),this.len=0,this};A.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 Br(Bu,0,0),this.len=0),this};A.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this};A.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t};A._configure=function(r){xu=r,A.create=Uh(),xu._configure()}});var jh=c((MP,Vh)=>{"use strict";Vh.exports=Te;var Gh=Vu();(Te.prototype=Object.create(Gh.prototype)).constructor=Te;var Ve=Ge();function Te(){Gh.call(this)}Te._configure=function(){Te.alloc=Ve._Buffer_allocUnsafe,Te.writeBytesBuffer=Ve.Buffer&&Ve.Buffer.prototype instanceof Uint8Array&&Ve.Buffer.prototype.set.name==="set"?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var i=0;i<e.length;)t[n++]=e[i++]}};Te.prototype.bytes=function(e){Ve.isString(e)&&(e=Ve._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(Te.writeBytesBuffer,t,e),this};function lA(r,e,t){r.length<40?Ve.utf8.write(r,e,t):e.utf8Write?e.utf8Write(r,t):e.write(r,t)}Te.prototype.string=function(e){var t=Ve.Buffer.byteLength(e);return this.uint32(t),t&&this._push(lA,t,e),this};Te._configure()});var Hu=c((CP,$h)=>{"use strict";$h.exports=w;var de=Ge(),Fu,kh=de.LongBits,dA=de.utf8;function _e(r,e){return RangeError("index out of range: "+r.pos+" + "+(e||1)+" > "+r.len)}function w(r){this.buf=r,this.pos=0,this.len=r.length}var Fh=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new w(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new w(e);throw Error("illegal buffer")},Xh=function(){return de.Buffer?function(t){return(w.create=function(i){return de.Buffer.isBuffer(i)?new Fu(i):Fh(i)})(t)}:Fh};w.create=Xh();w.prototype._slice=de.Array.prototype.subarray||de.Array.prototype.slice;w.prototype.uint32=function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,_e(this,10);return e}}();w.prototype.int32=function(){return this.uint32()|0};w.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function ju(){var r=new kh(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(r.lo=(r.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return r;if(r.lo=(r.lo|(this.buf[this.pos]&127)<<28)>>>0,r.hi=(r.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return r;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw _e(this);if(r.lo=(r.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return r}return r.lo=(r.lo|(this.buf[this.pos++]&127)<<e*7)>>>0,r}if(this.len-this.pos>4){for(;e<5;++e)if(r.hi=(r.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return r}else for(;e<5;++e){if(this.pos>=this.len)throw _e(this);if(r.hi=(r.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return r}throw Error("invalid varint encoding")}w.prototype.bool=function(){return this.uint32()!==0};function Rs(r,e){return(r[e-4]|r[e-3]<<8|r[e-2]<<16|r[e-1]<<24)>>>0}w.prototype.fixed32=function(){if(this.pos+4>this.len)throw _e(this,4);return Rs(this.buf,this.pos+=4)};w.prototype.sfixed32=function(){if(this.pos+4>this.len)throw _e(this,4);return Rs(this.buf,this.pos+=4)|0};function Hh(){if(this.pos+8>this.len)throw _e(this,8);return new kh(Rs(this.buf,this.pos+=4),Rs(this.buf,this.pos+=4))}w.prototype.float=function(){if(this.pos+4>this.len)throw _e(this,4);var e=de.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};w.prototype.double=function(){if(this.pos+8>this.len)throw _e(this,4);var e=de.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};w.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw _e(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var i=de.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)};w.prototype.string=function(){var e=this.bytes();return dA.read(e,0,e.length)};w.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw _e(this,e);this.pos+=e}else do if(this.pos>=this.len)throw _e(this);while(this.buf[this.pos++]&128);return this};w.prototype.skipType=function(r){switch(r){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(r=this.uint32()&7)!==4;)this.skipType(r);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+r+" at offset "+this.pos)}return this};w._configure=function(r){Fu=r,w.create=Xh(),Fu._configure();var e=de.Long?"toLong":"toNumber";de.merge(w.prototype,{int64:function(){return ju.call(this)[e](!1)},uint64:function(){return ju.call(this)[e](!0)},sint64:function(){return ju.call(this).zzDecode()[e](!1)},fixed64:function(){return Hh.call(this)[e](!0)},sfixed64:function(){return Hh.call(this)[e](!1)}})}});var Yh=c((NP,zh)=>{"use strict";zh.exports=ct;var Kh=Hu();(ct.prototype=Object.create(Kh.prototype)).constructor=ct;var Wh=Ge();function ct(r){Kh.call(this,r)}ct._configure=function(){Wh.Buffer&&(ct.prototype._slice=Wh.Buffer.prototype.slice)};ct.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))};ct._configure()});var Zh=c((wP,Qh)=>{"use strict";Qh.exports=Ur;var ku=Ge();(Ur.prototype=Object.create(ku.EventEmitter.prototype)).constructor=Ur;function Ur(r,e,t){if(typeof r!="function")throw TypeError("rpcImpl must be a function");ku.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=!!e,this.responseDelimited=!!t}Ur.prototype.rpcCall=function r(e,t,n,i,s){if(!i)throw TypeError("request must be specified");var o=this;if(!s)return ku.asPromise(r,o,e,t,n,i);if(!o.rpcImpl){setTimeout(function(){s(Error("already ended"))},0);return}try{return o.rpcImpl(e,t[o.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(u,l){if(u)return o.emit("error",u,e),s(u);if(l===null){o.end(!0);return}if(!(l instanceof n))try{l=n[o.responseDelimited?"decodeDelimited":"decode"](l)}catch(_){return o.emit("error",_,e),s(_)}return o.emit("data",l,e),s(null,l)})}catch(a){o.emit("error",a,e),setTimeout(function(){s(a)},0);return}};Ur.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var ep=c(Jh=>{"use strict";var _A=Jh;_A.Service=Zh()});var rp=c((DP,tp)=>{"use strict";tp.exports={}});var sp=c(ip=>{"use strict";var Z=ip;Z.build="minimal";Z.Writer=Vu();Z.BufferWriter=jh();Z.Reader=Hu();Z.BufferReader=Yh();Z.util=Ge();Z.rpc=ep();Z.roots=rp();Z.configure=np;function np(){Z.util._configure(),Z.Writer._configure(Z.BufferWriter),Z.Reader._configure(Z.BufferReader)}np()});var ap=c((UP,op)=>{"use strict";op.exports=sp()});var N=K(zo(),1);h();ea();var Ep=K(Od(),1),or=K(tt(),1),mp=K(qd(),1),gp=K(k_(),1),Tp=K(ie(),1),ar=K(Hr(),1),Sp=K($_(),1),he=K(S(),1);h();var CS=Symbol.for("@vercel/request-context");function Jt(){return globalThis[CS]?.get()}var Su=K(ie(),1);function ps(r){return Object.fromEntries(Object.entries(r).filter(([e,t])=>t!==void 0))}function W_(r){return r?r.split("::").at(-1):void 0}function K_(r=Jt(),e){if(!r)return;let t=e?wS(e,r.headers):void 0;return ps({[Su.SemanticAttributes.HTTP_HOST]:r.headers.host,[Su.SemanticAttributes.HTTP_USER_AGENT]:r.headers["user-agent"],"http.referer":r.headers.referer,"vercel.request_id":W_(r.headers["x-vercel-id"]),"vercel.matched_path":r.headers["x-matched-path"],"vercel.edge_region":r.headers["x-vercel-edge-region"],...t})}var NS={keys(r){return[]},get(r,e){return r[e.toLocaleLowerCase()]}};function wS(r,e){if(typeof r=="function")return r(e,NS);let t={};for(let[n,i]of Object.entries(r)){let s=e[i.toLocaleLowerCase()];s!==void 0&&(t[n]=s)}return t}h();function wr(r){return(r&d.TraceFlags.SAMPLED)!==0}var fs=class{constructor(e,t){this.processors=e;this.attributesFromHeaders=t;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(e=>e.forceFlush().catch(t=>{d.diag.error("@vercel/otel: forceFlush failed:",t)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(e=>e.shutdown().catch(()=>{}))).then(()=>{})}onStart(e,t){let{traceId:n,spanId:i,traceFlags:s}=e.spanContext(),o=!e.parentSpanId||!this.rootSpanIds.has(n);if(o?this.rootSpanIds.set(n,{rootSpanId:i,open:[]}):this.rootSpanIds.get(n)?.open.push(e),o&&wr(s)){let a=Jt(),u=K_(a,this.attributesFromHeaders);u&&e.setAttributes(u),a&&a.waitUntil(async()=>{if(this.rootSpanIds.has(n)){let l=new Promise(E=>{this.waitSpanEnd.set(n,E)}),_;await Promise.race([l,new Promise(E=>{_=setTimeout(()=>{this.waitSpanEnd.delete(n),E(void 0)},50)})]),_&&clearTimeout(_)}return this.forceFlush()})}for(let a of this.processors)a.onStart(e,t)}onEnd(e){let{traceId:t,spanId:n,traceFlags:i}=e.spanContext(),s=wr(i),o=this.rootSpanIds.get(t),a=o?.rootSpanId===n;if(s){let u=DS(e);u&&Object.assign(e.attributes,u)}if(a){if(this.rootSpanIds.delete(t),o.open.length>0){for(let u of o.open)if(!u.ended&&u.spanContext().spanId!==n)try{u.end()}catch(l){d.diag.error("@vercel/otel: onEnd failed:",l)}}}else if(o)for(let u=0;u<o.open.length;u++)o.open[u]?.spanContext().spanId===n&&o.open.splice(u,1);for(let u of this.processors)u.onEnd(e);if(a){let u=this.waitSpanEnd.get(t);u&&(this.waitSpanEnd.delete(t),u())}}},xS={[d.SpanKind.INTERNAL]:"internal",[d.SpanKind.SERVER]:"server",[d.SpanKind.CLIENT]:"client",[d.SpanKind.PRODUCER]:"producer",[d.SpanKind.CONSUMER]:"consumer"};function DS(r){let{kind:e,attributes:t}=r,{"operation.name":n,"resouce.name":i,"span.type":s,"next.span_type":o,"http.method":a,"http.route":u}=t;if(n)return;let l=i??(a&&typeof a=="string"&&u&&typeof u=="string"?`${a} ${u}`:u);if(r.kind===d.SpanKind.SERVER&&a&&u&&typeof a=="string"&&typeof u=="string")return{"operation.name":"web.request","resource.name":l};let _=r.instrumentationLibrary.name,E=o??s;if(E&&typeof E=="string"){let O=z_(_,E);return u?{"operation.name":O,"resource.name":l}:{"operation.name":O}}return{"operation.name":z_(_,e===d.SpanKind.INTERNAL?"":xS[e])}}function z_(r,e){if(!r)return e;let t=r.replace(/[ @./]/g,"_");return t.startsWith("_")&&(t=t.slice(1)),e?`${t}.${e}`:t}var lh=K(vu(),1);var ch=K(uh(),1);h();var er=class extends ch.OTLPExporterBase{constructor(e={}){super(e),e.headers&&(this._headers=e.headers)}onShutdown(){d.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){d.diag.debug("@vercel/otel/otlp: onInit")}send(e,t,n){if(this._shutdownOnce.isCalled){d.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let i=this.convert(e),s,o,a;try{({body:s,contentType:o,headers:a}=this.toMessage(i))}catch(l){d.diag.warn("@vercel/otel/otlp: no proto",l);return}let u=fetch(this.url,{method:"POST",body:s,headers:{...this._headers,...a,"Content-Type":o,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(l=>{d.diag.debug("@vercel/otel/otlp: onSuccess",l.status,l.statusText),t(),l.arrayBuffer().catch(()=>{})}).catch(l=>{d.diag.error("@vercel/otel/otlp: onError",l),n(l)}).finally(()=>{let l=this._sendingPromises.indexOf(u);this._sendingPromises.splice(l,1)});this._sendingPromises.push(u)}getDefaultUrl(e){throw new Error("Method not implemented.")}};var rA="v1/traces",nA=`http://localhost:4318/${rA}`;function Ts(r){return typeof r.url=="string"?r.url:nA}var tr=class{constructor(e={}){this.impl=new Cu(e)}export(e,t){this.impl.export(e,t)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},Cu=class extends er{convert(e){return(0,lh.createExportTraceServiceRequest)(e,{useHex:!0,useLongBits:!1})}toMessage(e){return{body:JSON.stringify(e),contentType:"application/json"}}getDefaultUrl(e){return Ts(e)}};var dp=K(vu(),1);var up=K(ap(),1);function cp(r){let e=new up.Writer;return hA(r,e),e.finish()}function hA(r,e){if(r.resourceSpans!=null&&r.resourceSpans.length)for(let t=0;t<r.resourceSpans.length;++t)pA(r.resourceSpans[t],e.uint32(10).fork()).ldelim();return e}function pA(r,e){if(r.resource!=null&&fA(r.resource,e.uint32(10).fork()).ldelim(),r.scopeSpans!=null&&r.scopeSpans.length)for(let t=0;t<r.scopeSpans.length;++t)EA(r.scopeSpans[t],e.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&e.uint32(26).string(r.schemaUrl),e}function fA(r,e){if(r.attributes!=null&&r.attributes.length)for(let t=0;t<r.attributes.length;++t)nr(r.attributes[t],e.uint32(10).fork()).ldelim();return r.droppedAttributesCount!=null&&e.uint32(16).uint32(r.droppedAttributesCount),e}function EA(r,e){if(r.scope!=null&&TA(r.scope,e.uint32(10).fork()).ldelim(),r.spans!=null&&r.spans.length)for(let t=0;t<r.spans.length;++t)SA(r.spans[t],e.uint32(18).fork()).ldelim();return r.schemaUrl!=null&&e.uint32(26).string(r.schemaUrl),e}function nr(r,e){return r.key!=null&&e.uint32(10).string(r.key),r.value!=null&&lp(r.value,e.uint32(18).fork()).ldelim(),e}function lp(r,e){return r.stringValue!=null&&e.uint32(10).string(r.stringValue),r.boolValue!=null&&e.uint32(16).bool(r.boolValue),r.intValue!=null&&e.uint32(24).int64(r.intValue),r.doubleValue!=null&&e.uint32(33).double(r.doubleValue),r.arrayValue!=null&&mA(r.arrayValue,e.uint32(42).fork()).ldelim(),r.kvlistValue!=null&&gA(r.kvlistValue,e.uint32(50).fork()).ldelim(),r.bytesValue!=null&&e.uint32(58).bytes(r.bytesValue),e}function mA(r,e){if(r.values!=null&&r.values.length)for(let t=0;t<r.values.length;++t)lp(r.values[t],e.uint32(10).fork()).ldelim();return e}function gA(r,e){if(r.values!=null&&r.values.length)for(let t=0;t<r.values.length;++t)nr(r.values[t],e.uint32(10).fork()).ldelim();return e}function TA(r,e){if(r.name!=null&&e.uint32(10).string(r.name),r.version!=null&&e.uint32(18).string(r.version),r.attributes!=null&&r.attributes.length)for(let t=0;t<r.attributes.length;++t)nr(r.attributes[t],e.uint32(26).fork()).ldelim();return r.droppedAttributesCount!=null&&e.uint32(32).uint32(r.droppedAttributesCount),e}function SA(r,e){if(r.traceId!=null&&e.uint32(10).bytes(r.traceId),r.spanId!=null&&e.uint32(18).bytes(r.spanId),r.traceState!=null&&e.uint32(26).string(r.traceState),r.parentSpanId!=null&&e.uint32(34).bytes(r.parentSpanId),r.name!=null&&e.uint32(42).string(r.name),r.kind!=null&&e.uint32(48).int32(r.kind),r.startTimeUnixNano!=null&&e.uint32(57).fixed64(r.startTimeUnixNano),r.endTimeUnixNano!=null&&e.uint32(65).fixed64(r.endTimeUnixNano),r.attributes!=null&&r.attributes.length)for(let t=0;t<r.attributes.length;++t)nr(r.attributes[t],e.uint32(74).fork()).ldelim();if(r.droppedAttributesCount!=null&&e.uint32(80).uint32(r.droppedAttributesCount),r.events!=null&&r.events.length)for(let t=0;t<r.events.length;++t)OA(r.events[t],e.uint32(90).fork()).ldelim();if(r.droppedEventsCount!=null&&e.uint32(96).uint32(r.droppedEventsCount),r.links!=null&&r.links.length)for(let t=0;t<r.links.length;++t)RA(r.links[t],e.uint32(106).fork()).ldelim();return r.droppedLinksCount!=null&&e.uint32(112).uint32(r.droppedLinksCount),r.status!=null&&AA(r.status,e.uint32(122).fork()).ldelim(),e}function AA(r,e){return r.message!=null&&e.uint32(18).string(r.message),r.code!=null&&e.uint32(24).int32(r.code),e}function OA(r,e){if(r.timeUnixNano!=null&&e.uint32(9).fixed64(r.timeUnixNano),r.name!=null&&e.uint32(18).string(r.name),r.attributes!=null&&r.attributes.length)for(let t=0;t<r.attributes.length;++t)nr(r.attributes[t],e.uint32(26).fork()).ldelim();return r.droppedAttributesCount!=null&&e.uint32(32).uint32(r.droppedAttributesCount),e}function RA(r,e){if(r.traceId!=null&&e.uint32(10).bytes(r.traceId),r.spanId!=null&&e.uint32(18).bytes(r.spanId),r.traceState!=null&&e.uint32(26).string(r.traceState),r.attributes!=null&&r.attributes.length)for(let t=0;t<r.attributes.length;++t)nr(r.attributes[t],e.uint32(34).fork()).ldelim();return r.droppedAttributesCount!=null&&e.uint32(40).uint32(r.droppedAttributesCount),e}var lt=class{constructor(e={}){this.impl=new Xu(e)}export(e,t){this.impl.export(e,t)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},Xu=class extends er{convert(e){return(0,dp.createExportTraceServiceRequest)(e,void 0)}toMessage(e){return{body:cp(e),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(e){return Ts(e)}};h();var be=K(ie(),1);function _p(r,e){return r.replace(/\{(?<temp1>[^{}]+)\}/g,(t,n)=>{let i=e[n];return i!==void 0?String(i):t})}var ir=class{constructor(e={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=e}getConfig(){return this.config}setConfig(){}setTracerProvider(e){this.tracerProvider=e}setMeterProvider(){}enable(){this.disable();let{tracerProvider:e}=this;if(!e)return;let t=e.getTracer(this.instrumentationName,this.instrumentationVersion),n=this.config.ignoreUrls??[],i=(I,U)=>{if(U?.opentelemetry?.ignore!==void 0)return U.opentelemetry.ignore;if(n.length===0)return!1;let L=I.toString();return n.some(m=>typeof m=="string"?m==="*"?!0:L.startsWith(m):m.test(L))},s=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,o=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,a=this.config.propagateContextUrls??[],u=this.config.dontPropagateContextUrls??[],l=this.config.resourceNameTemplate,{attributesFromRequestHeaders:_,attributesFromResponseHeaders:E}=this.config,O=(I,U)=>{if(U?.opentelemetry?.propagateContext)return U.opentelemetry.propagateContext;let L=I.toString();return u.length>0&&u.some(m=>typeof m=="string"?m==="*"?!0:L.startsWith(m):m.test(L))?!1:s&&I.protocol==="https:"&&(I.host===s||I.host===o||I.host===Jt()?.headers.host)||!s&&I.protocol==="http:"&&I.hostname==="localhost"?!0:a.some(m=>typeof m=="string"?m==="*"?!0:L.startsWith(m):m.test(L))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let D=globalThis.fetch;this.originalFetch=D;let z=async(I,U)=>{let L=U;if(L?.next?.internal)return D(I,L);let m=new Request(I instanceof Request?I.clone():I,L),Pe=new URL(m.url);if(i(Pe,L))return D(I,L);let Ps={[be.SemanticAttributes.HTTP_METHOD]:m.method,[be.SemanticAttributes.HTTP_URL]:m.url,[be.SemanticAttributes.HTTP_HOST]:Pe.host,[be.SemanticAttributes.HTTP_SCHEME]:Pe.protocol.replace(":",""),[be.SemanticAttributes.NET_PEER_NAME]:Pe.hostname,[be.SemanticAttributes.NET_PEER_PORT]:Pe.port},dt=l?_p(l,Ps):PA(m.url),Op=L?.opentelemetry?.spanName??`fetch ${m.method} ${m.url}`,Wu=d.context.active(),q=t.startSpan(Op,{kind:d.SpanKind.CLIENT,attributes:{...Ps,"operation.name":`fetch.${m.method}`,"resource.name":dt,...L?.opentelemetry?.attributes}},Wu);if(!q.isRecording()||!wr(q.spanContext().traceFlags))return q.end(),D(I,L);if(O(Pe,L)){let _t=d.trace.setSpan(Wu,q);d.propagation.inject(_t,m.headers,bA)}_&&hp(q,_,m.headers);try{let _t=Date.now(),ye=await D(I,{...L,headers:m.headers}),Rp=Date.now()-_t;return q.setAttribute(be.SemanticAttributes.HTTP_STATUS_CODE,ye.status),q.setAttribute("http.response_time",Rp),E&&hp(q,E,ye.headers),ye.status>=500&&$u(q,`Status: ${ye.status} (${ye.statusText})`),ye.body?yA(ye).then(ys=>{q.isRecording()&&(q.setAttribute(be.SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,ys),q.end())},ys=>{q.isRecording()&&($u(q,ys),q.end())}):q.end(),ye}catch(_t){throw $u(q,_t),q.end(),_t}};globalThis.fetch=z}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},bA={set(r,e,t){r.set(e,t)}};function PA(r){let e=r.indexOf("?");return e===-1?r:r.substring(0,e)}function yA(r){let e=0,n=r.clone().body?.getReader();if(!n)return Promise.resolve(0);let i=()=>n.read().then(({done:s,value:o})=>{if(!s)return e+=o.byteLength,i()});return i().then(()=>e)}function $u(r,e){if(e instanceof Error)r.recordException(e),r.setStatus({code:d.SpanStatusCode.ERROR,message:e.message});else{let t=String(e);r.setStatus({code:d.SpanStatusCode.ERROR,message:t})}}function hp(r,e,t){for(let[n,i]of Object.entries(e)){let s=t.get(i);s!==null&&r.setAttribute(n,s)}}var bs=class{constructor(e={}){this.configuration=e}start(){let e=vA(),t=(0,ar.getEnvWithoutDefaults)(),n=this.configuration,i=process.env.NEXT_RUNTIME||"nodejs",s=!!e.OTEL_SDK_DISABLED;if(t.OTEL_LOG_LEVEL&&d.diag.setLogger(new d.DiagConsoleLogger,{logLevel:t.OTEL_LOG_LEVEL}),s)return;let o=n.idGenerator??new N.RandomIdGenerator,a=n.contextManager??new Sp.AsyncLocalStorageContextManager;a.enable(),this.contextManager=a;let u=e.OTEL_SERVICE_NAME||n.serviceName||"app",l=new or.Resource(ps({[Tp.SemanticResourceAttributes.SERVICE_NAME]:u,"node.ci":process.env.CI?!0:void 0,"node.env":process.env.NODE_ENV,env:process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":i,"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,...n.attributes})),_=n.resourceDetectors??[or.envDetectorSync];if(n.autoDetectResources??!0){let m={detectors:_};l=l.merge((0,or.detectResourcesSync)(m))}let O=LA(n.propagators,e),D=MA(n.traceSampler,e),z=CA(n.spanProcessors,n,e);z.length===0&&d.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let I=n.spanLimits,U=new N.BasicTracerProvider({resource:l,idGenerator:o,sampler:D,spanLimits:I});if(U.addSpanProcessor(new fs(z,n.attributesFromHeaders)),U.register({contextManager:a,propagator:new he.CompositePropagator({propagators:O})}),this.tracerProvider=U,n.logRecordProcessor){let m=new mp.LoggerProvider({resource:l});this.loggerProvider=m,m.addLogRecordProcessor(n.logRecordProcessor),it.logs.setGlobalLoggerProvider(m)}if(n.metricReader||n.views){let m=new gp.MeterProvider({resource:l,views:n.views??[]});n.metricReader&&m.addMetricReader(n.metricReader),d.metrics.setGlobalMeterProvider(m),this.meterProvider=m}let L=IA(n.instrumentations,n.instrumentationConfig);this.disableInstumentations=(0,Ep.registerInstrumentations)({instrumentations:L}),d.diag.info("@vercel/otel: started",u,i)}async shutdown(){let e=[];this.tracerProvider&&e.push(this.tracerProvider.shutdown()),this.loggerProvider&&e.push(this.loggerProvider.shutdown()),this.meterProvider&&e.push(this.meterProvider.shutdown()),d.diag.info("@vercel/otel: shutting down",e.length,process.env.NEXT_RUNTIME),await Promise.all(e),this.contextManager&&this.contextManager.disable();let{disableInstumentations:t}=this;t&&t()}};function vA(){let r=(0,ar.parseEnvironment)(process.env);return{...ar.DEFAULT_ENVIRONMENT,...r}}function IA(r,e){return(r??["auto"]).map(t=>t==="auto"?(d.diag.debug("@vercel/otel: Configure instrumentations: fetch",e?.fetch),[new ir(e?.fetch)]):t==="fetch"?(d.diag.debug("@vercel/otel: Configure instrumentations: fetch",e?.fetch),new ir(e?.fetch)):t).flat()}function LA(r,e){let t=e.OTEL_PROPAGATORS&&e.OTEL_PROPAGATORS.length>0?e.OTEL_PROPAGATORS:void 0;return(r??t??["auto"]).map(n=>{if(n==="none")return[];if(n==="auto")return d.diag.debug("@vercel/otel: Configure propagators: tracecontext, baggage"),[new he.W3CTraceContextPropagator,new he.W3CBaggagePropagator];if(n==="tracecontext")return d.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new he.W3CTraceContextPropagator;if(n==="baggage")return d.diag.debug("@vercel/otel: Configure propagator: baggage"),new he.W3CBaggagePropagator;if(typeof n=="string")throw new Error(`Unknown propagator: "${n}"`);return n}).flat()}var pp="always_on",sr=1;function MA(r,e){if(r&&typeof r!="string")return r;let t=r&&r!=="auto"?r:e.OTEL_TRACES_SAMPLER||pp;switch(d.diag.debug("@vercel/otel: Configure sampler: ",t),t){case"always_on":return new N.AlwaysOnSampler;case"always_off":return new N.AlwaysOffSampler;case"parentbased_always_on":return new N.ParentBasedSampler({root:new N.AlwaysOnSampler});case"parentbased_always_off":return new N.ParentBasedSampler({root:new N.AlwaysOffSampler});case"traceidratio":return new N.TraceIdRatioBasedSampler(fp(e));case"parentbased_traceidratio":return new N.ParentBasedSampler({root:new N.TraceIdRatioBasedSampler(fp(e))});default:return d.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(e.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${pp}".`),new N.AlwaysOnSampler}}function fp(r){if(r.OTEL_TRACES_SAMPLER_ARG===void 0||r.OTEL_TRACES_SAMPLER_ARG==="")return d.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${sr}.`),sr;d.diag.debug("@vercel/otel: Configure sampler probability: ",r.OTEL_TRACES_SAMPLER_ARG);let e=Number(r.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(d.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${r.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${sr}.`),sr):e<0||e>1?(d.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${r.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${sr}.`),sr):e}function CA(r,e,t){return[...(r??["auto"]).map(n=>{if(n==="auto"){if(process.env.VERCEL_OTEL_ENDPOINTS){let i=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",s=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";d.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",i,s);let o={url:`http://localhost:${i}/v1/traces`,headers:{}},a=s==="http/protobuf"?new lt(o):new tr(o);return new N.BatchSpanProcessor(a)}return!e.traceExporter||e.traceExporter==="auto"||t.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||t.OTEL_EXPORTER_OTLP_ENDPOINT?new N.BatchSpanProcessor(NA(t)):void 0}return n}).filter(DA),...e.traceExporter&&e.traceExporter!=="auto"?[new N.BatchSpanProcessor(e.traceExporter)]:[]]}function NA(r){let e=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",t=xA(r),n={...he.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_HEADERS),...he.baggageUtils.parseKeyPairsIntoRecord(r.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(d.diag.debug("@vercel/otel: Configure trace exporter: ",e,t,`headers: ${Object.keys(n).join(",")||"<none>"}`),e){case"http/json":return new tr({url:t,headers:n});case"http/protobuf":return new lt({url:t,headers:n});default:return d.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${e}. Using http/protobuf.`),new lt}}var Ap="v1/traces",wA=`http://localhost:4318/${Ap}`;function xA(r){let e=r.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(e&&typeof e=="string")return e;let t=r.OTEL_EXPORTER_OTLP_ENDPOINT;return t&&typeof t=="string"?`${t}/${Ap}`:wA}function DA(r){return r!=null}function iy(r){let e;r?typeof r=="string"?e={serviceName:r}:e=r:e={},new bs(e).start()}export{ir as FetchInstrumentation,tr as OTLPHttpJsonTraceExporter,lt as OTLPHttpProtoTraceExporter,iy as registerOTel};