MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / Lg4

Function Lg4

package/cli.js:2072–2072  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2070
2071`),{content:J,truncated:M}=rU(H);q.setAttributes({system_reminders:J,system_reminders_count:w.length,...M&&{system_reminders_truncated:!0,system_reminders_original_length:H.length}})}let j=_[_.length-1];if(j)CU1.set(z,Zg4(j))}}}function kg4(q,K){if(!bH()||!K)return;if(K.modelOutput!==void 0){let{content:_,truncated:z}=rU(K.modelOutput);if(q["response.model_output"]=_,z)q["response.model_output_truncated"]=!0,q["response.model_output_original_length"]=K.modelOutput.length}}function Vg4(q,K,_){if(!bH())return;let{content:z,truncated:Y}=rU(`[TOOL INPUT: ${K}]
2072${_}`);q.setAttributes({tool_input:z,...Y&&{tool_input_truncated:!0,tool_input_original_length:_.length}})}function Ng4(q,K,_){if(!bH())return;let{content:z,truncated:Y}=rU(`[TOOL RESULT: ${K}]
2073${_}`);if(q.new_context=z,Y)q.new_context_truncated=!0,q.new_context_original_length=_.length}var Gs6,CU1,wfz=61440,Hfz;var Ts6=y(()=>{v8();o1();kj();m8();l8();nu();Gs6=new Set,CU1=new Map;Hfz=/^<system-reminder>\n?([\s\S]*?)\n?<\/system-reminder>$/});async function Xfz(){let q=DJ();if(q.error)throw Error(`Auth error: ${q.error}`);let K={"Content-Type":"application/json","User-Agent":n$(),...q.headers},_="https://api.anthropic.com/api/claude_code/organizations/metrics_enabled";return(await $1.get(_,{headers:K,timeout:5000})).data}async function Pfz(){if(iA())return{enabled:!1,hasError:!1};try{let q=await Ki(Xfz,{also403Revoked:!0});return N(`Metrics opt-out API response: enabled=${q.metrics_logging_enabled}`),{enabled:q.metrics_logging_enabled,hasError:!1}}catch(q){return N(`Failed to check metrics opt-out status: ${d6(q)}`),H6(q),{enabled:!1,hasError:!0}}}async function yg4(){let q=await Wfz();if(q.hasError)return q;let K=j8().metricsStatusCache;if(K!==void 0&&K.enabled===q.enabled&&Date.now()-K.timestamp<Eg4)return q;return b8((z)=>({...z,metricsStatusCache:{enabled:q.enabled,timestamp:Date.now()}})),q}async function Lg4(){if(d7()&&!BW())return{enabled:!1,hasError:!1};let q=j8().metricsStatusCache;if(q){if(Date.now()-q.timestamp>Eg4)yg4().catch(H6);return{enabled:q.enabled,hasError:!1}}return yg4()}var Mfz=3600000,Eg4=86400000,Wfz;var Rg4=y(()=>{CK();G7();V1();_8();y8();jG();E8();VB();Wfz=qp6(Pfz,Mfz)});class IU1{endpoint;timeout;pendingExports=[];isShutdown=!1;constructor(q={}){this.endpoint="https://api.anthropic.com/api/claude_code/metrics",this.timeout=q.timeout||5000}async export(q,K){if(this.isShutdown){K({code:$26.ExportResultCode.FAILED,error:Error("Exporter has been shutdown")});return}let _=this.doExport(q,K);this.pendingExports.push(_),_.finally(()=>{let z=this.pendingExports.indexOf(_);if(z>-1)this.pendingExports.splice(z,1)})}async doExport(q,K){try{if(!(l$()||i7())){N("BigQuery metrics export: trust not established, skipping"),K({code:$26.ExportResultCode.SUCCESS});return}if(!(await Lg4()).enabled){N("Metrics export disabled by organization setting"),K({code:$26.ExportResultCode.SUCCESS});return}let Y=this.transformMetricsForInternal(q),$=DJ();if($.error){N(`Metrics export failed: ${$.error}`),K({code:$26.ExportResultCode.FAILED,error:Error($.error)});return}let A={"Content-Type":"application/json","User-Agent":n$(),...$.headers},O=await $1.post(this.endpoint,Y,{timeout:this.timeout,headers:A});N("BigQuery metrics exported successfully"),N(`BigQuery API Response: ${g6(O.data,null,2)}`),K({code:$26.ExportResultCode.SUCCESS})}catch(_){N(`BigQuery metrics export failed: ${d6(_)}`),H6(_),K({code:$26.ExportResultCode.FAILED,error:x1(_)})}}transformMetricsForInternal(q){let K=q.resource.attributes,_={"service.name":K["service.name"]||"claude-code","service.version":K["service.version"]||"unknown","os.type":K["os.type"]||"unknown","os.version":K["os.version"]||"unknown","host.arch":K["host.arch"]||"unknown","aggregation.temporality":this.selectAggregationTemporality()===xU1.AggregationTemporality.DELTA?"delta":"cumulative"};if(K["wsl.version"])_["wsl.version"]=K["wsl.version"];if(d7()){_["user.customer_type"]="claude_ai";let Y=yK();if(Y)_["user.subscription_type"]=Y}else _["user.customer_type"]="api";return{resource_attributes:_,metrics:q.scopeMetrics.flatMap((Y)=>Y.metrics.map(($)=>({name:$.descriptor.name,description:$.descriptor.description,unit:$.descriptor.unit,data_points:this.extractDataPoints($)})))}}extractDataPoints(q){return(q.dataPoints||[]).filter((_)=>typeof _.value==="number").map((_)=>({attributes:this.convertAttributes(_.attributes),value:_.value,timestamp:this.hrTimeToISOString(_.endTime||_.startTime||[Date.now()/1000,0])}))}async shutdown(){this.isShutdown=!0,await this.forceFlush(),N("BigQuery metrics exporter shutdown complete")}async forceFlush(){await Promise.all(this.pendingExports),N("BigQuery metrics exporter flush complete")}convertAttributes(q){let K={};if(q){for(let[_,z]of Object.entries(q))if(z!==void 0&&z!==null)K[_]=String(z)}return K}hrTimeToISOString(q){let[K,_]=q;return new Date(K*1000+_/1e6).toISOString()}selectAggregationTemporality(){return xU1.AggregationTemporality.DELTA}}var $26,xU1;var hg4=y(()=>{CK();Rg4();v8();G7();V1();_8();y8();jG();E8();l8();$26=O6(Oz(),1),xU1=O6(z26(),1)});class uU1{error(q,...K){H6(Error(q)),N(`[3P telemetry] OTEL diag error: ${q}`,{level:"error"})}warn(q,...K){H6(Error(q)),N(`[3P telemetry] OTEL diag warn: ${q}`,{level:"warn"})}info(q,...K){return}debug(q,...K){return}verbose(q,...K){return}}var Sg4=y(()=>{_8();E8()});import{AsyncLocalStorage as xg4}from"async_hooks";function DM(q){return q.spanContext().spanId||""}function ffz(){if(bg4)return;bg4=!0;let q=setInterval(()=>{let K=Date.now()-Dfz;for(let[_,z]of BO){let Y=z.deref();if(Y===void 0)BO.delete(_),pN.delete(_);else if(Y.startTime<K){if(!Y.ended)Y.span.end();BO.delete(_),pN.delete(_)}}},60000);if(typeof q.unref==="function")q.unref()}function mU1(){{let q=process.env.CLAUDE_CODE_ENHANCED_TELEMETRY_BETA??process.env.ENABLE_ENHANCED_TELEMETRY_BETA;if(i6(q))return!0;if(k_(q))return!1;return g8("enhanced_telemetry_beta",!1)}return!1}function fm(){return mU1()||bH()}function UG(){return gO.trace.getTracer("com.anthropic.claude_code.tracing","1.0.0")}function Oy6(q,K={}){return{...GV6(),"span.type":q,...K}}function Ig4(q){ffz();let K=Yo()?ub4(q):void 0;if(!fm()){if(K){let j=gO.trace.getActiveSpan()||UG().startSpan("dummy"),H=DM(j),J={span:j,startTime:Date.now(),attributes:{},perfettoSpanId:K};return BO.set(H,new WeakRef(J)),O46.enterWith(J),j}return gO.trace.getActiveSpan()||UG().startSpan("dummy")}let _=UG(),Y=i6(process.env.OTEL_LOG_USER_PROMPTS)?q:"<REDACTED>";Cg4++;let $=Oy6("interaction",{user_prompt:Y,user_prompt_length:q.length,"interaction.sequence":Cg4}),A=_.startSpan("claude_code.interaction",{attributes:$});Tg4(A,q);let O=DM(A),w={span:A,startTime:Date.now(),attributes:$,perfettoSpanId:K};return BO.set(O,new WeakRef(w)),O46.enterWith(w),A}function vs6(){let q=O46.getStore();if(!q)return;if(q.ended)return;if(q.perfettoSpanId)mb4(q.perfettoSpanId);if(!fm()){q.ended=!0,BO.delete(DM(q.span)),O46.enterWith(void 0);return}let K=Date.now()-q.startTime;q.span.setAttributes({"interaction.duration_ms":K}),q.span.end(),q.ended=!0,BO.delete(DM(q.span)),O46.enterWith(void 0)}function ug4(q,K,_,z){let Y=Yo()?hb4({model:q,querySource:K?.querySource,messageId:void 0}):void 0;if(!fm()){if(Y){let M=gO.trace.getActiveSpan()||UG().startSpan("dummy"),X=DM(M),P={span:M,startTime:Date.now(),attributes:{model:q},perfettoSpanId:Y};return BO.set(X,new WeakRef(P)),pN.set(X,P),M}return gO.trace.getActiveSpan()||UG().startSpan("dummy")}let $=UG(),A=O46.getStore(),O=Oy6("llm_request",{model:q,"llm_request.context":A?"interaction":"standalone",speed:z?"fast":"normal"}),w=A?gO.trace.setSpan(gO.context.active(),A.span):gO.context.active(),j=$.startSpan("claude_code.llm_request",{attributes:O},w);if(K?.querySource)j.setAttribute("query_source",K.querySource);vg4(j,K,_);let H=DM(j),J={span:j,startTime:Date.now(),attributes:O,perfettoSpanId:Y};return BO.set(H,new WeakRef(J)),pN.set(H,J),j}function pU1(q,K){let _;if(q){let A=DM(q);_=BO.get(A)?.deref()}else _=Array.from(BO.values()).findLast((A)=>{let O=A.deref();return O?.attributes["span.type"]==="llm_request"||O?.attributes.model})?.deref();if(!_)return;let z=Date.now()-_.startTime;if(_.perfettoSpanId)Sb4(_.perfettoSpanId,{ttftMs:K?.ttftMs,ttltMs:z,promptTokens:K?.inputTokens,outputTokens:K?.outputTokens,cacheReadTokens:K?.cacheReadTokens,cacheCreationTokens:K?.cacheCreationTokens,success:K?.success,error:K?.error,requestSetupMs:K?.requestSetupMs,attemptStartTimes:K?.attemptStartTimes});if(!fm()){let A=DM(_.span);BO.delete(A),pN.delete(A);return}let Y={duration_ms:z};if(K){if(K.inputTokens!==void 0)Y.input_tokens=K.inputTokens;if(K.outputTokens!==void 0)Y.output_tokens=K.outputTokens;if(K.cacheReadTokens!==void 0)Y.cache_read_tokens=K.cacheReadTokens;if(K.cacheCreationTokens!==void 0)Y.cache_creation_tokens=K.cacheCreationTokens;if(K.success!==void 0)Y.success=K.success;if(K.statusCode!==void 0)Y.status_code=K.statusCode;if(K.error!==void 0)Y.error=K.error;if(K.attempt!==void 0)Y.attempt=K.attempt;if(K.hasToolCall!==void 0)Y["response.has_tool_call"]=K.hasToolCall;if(K.ttftMs!==void 0)Y.ttft_ms=K.ttftMs;kg4(Y,K)}_.span.setAttributes(Y),_.span.end();let $=DM(_.span);BO.delete($),pN.delete($)}function mg4(q,K,_){let z=Yo()?Cb4(q,K):void 0;if(!fm()){if(z){let J=gO.trace.getActiveSpan()||UG().startSpan("dummy"),M=DM(J),X={span:J,startTime:Date.now(),attributes:{"span.type":"tool",tool_name:q},perfettoSpanId:z};return BO.set(M,new WeakRef(X)),Xo.enterWith(X),J}return gO.trace.getActiveSpan()||UG().startSpan("dummy")}let Y=UG(),$=O46.getStore(),A=Oy6("tool",{tool_name:q,...K}),O=$?gO.trace.setSpan(gO.context.active(),$.span):gO.context.active(),w=Y.startSpan("claude_code.tool",{attributes:A},O);if(_)Vg4(w,q,_);let j=DM(w),H={span:w,startTime:Date.now(),attributes:A,perfettoSpanId:z};return BO.set(j,new WeakRef(H)),Xo.enterWith(H),w}function pg4(){let q=Yo()?xb4("tool_permission"):void 0;if(!fm()){if(q){let w=gO.trace.getActiveSpan()||UG().startSpan("dummy"),j=DM(w),H={span:w,startTime:Date.now(),attributes:{"span.type":"tool.blocked_on_user"},perfettoSpanId:q};return BO.set(j,new WeakRef(H)),pN.set(j,H),w}return gO.trace.getActiveSpan()||UG().startSpan("dummy")}let K=UG(),_=Xo.getStore(),z=Oy6("tool.blocked_on_user"),Y=_?gO.trace.setSpan(gO.context.active(),_.span):gO.context.active(),$=K.startSpan("claude_code.tool.blocked_on_user",{attributes:z},Y),A=DM($),O={span:$,startTime:Date.now(),attributes:z,perfettoSpanId:q};return BO.set(A,new WeakRef(O)),pN.set(A,O),$}function BU1(q,K){let _=Array.from(BO.values()).findLast((A)=>A.deref()?.attributes["span.type"]==="tool.blocked_on_user")?.deref();if(!_)return;if(_.perfettoSpanId)Ib4(_.perfettoSpanId,{decision:q,source:K});if(!fm()){let A=DM(_.span);BO.delete(A),pN.delete(A);return}let Y={duration_ms:Date.now()-_.startTime};if(q)Y.decision=q;if(K)Y.source=K;_.span.setAttributes(Y),_.span.end();let $=DM(_.span);BO.delete($),pN.delete($)}function Bg4(){if(!fm())return gO.trace.getActiveSpan()||UG().startSpan("dummy");let q=UG(),K=Xo.getStore(),_=Oy6("tool.execution"),z=K?gO.trace.setSpan(gO.context.active(),K.span):gO.context.active(),Y=q.startSpan("claude_code.tool.execution",{attributes:_},z),$=DM(Y),A={span:Y,startTime:Date.now(),attributes:_};return BO.set($,new WeakRef(A)),pN.set($,A),Y}function gU1(q){if(!fm())return;let K=Array.from(BO.values()).findLast(($)=>$.deref()?.attributes["span.type"]==="tool.execution")?.deref();if(!K)return;let z={duration_ms:Date.now()-K.startTime};if(q){if(q.success!==void 0)z.success=q.success;if(q.error!==void 0)z.error=q.error}K.span.setAttributes(z),K.span.end();let Y=DM(K.span);BO.delete(Y),pN.delete(Y)}function kR8(q,K){let _=Xo.getStore();if(!_)return;if(_.perfettoSpanId)bb4(_.perfettoSpanId,{success:!0,resultTokens:K});if(!fm()){let A=DM(_.span);BO.delete(A),Xo.enterWith(void 0);return}let Y={duration_ms:Date.now()-_.startTime};if(q){let A=_.attributes.tool_name||"unknown";Ng4(Y,A,q)}if(K!==void 0)Y.result_tokens=K;_.span.setAttributes(Y),_.span.end();let $=DM(_.span);BO.delete($),Xo.enterWith(void 0)}function Zfz(){return i6(process.env.OTEL_LOG_TOOL_CONTENT)}function gg4(q,K){if(!fm()||!Zfz())return;let _=Xo.getStore();if(!_)return;let z={};for(let[Y,$]of Object.entries(K))if(typeof $==="string"){let{content:A,truncated:O}=rU($);if(z[Y]=A,O)z[`${Y}_truncated`]=!0,z[`${Y}_original_length`]=$.length}else z[Y]=$;_.span.addEvent(q,z)}function Fg4(q,K,_,z){if(!bH())return gO.trace.getActiveSpan()||UG().startSpan("dummy");let Y=UG(),$=Xo.getStore()??O46.getStore(),A=Oy6("hook",{hook_event:q,hook_name:K,num_hooks:_,hook_definitions:z}),O=$?gO.trace.setSpan(gO.context.active(),$.span):gO.context.active(),w=Y.startSpan("claude_code.hook",{attributes:A},O),j=DM(w),H={span:w,startTime:Date.now(),attributes:A};return BO.set(j,new WeakRef(H)),pN.set(j,H),w}function Ug4(q,K){if(!bH())return;let _=DM(q),z=BO.get(_)?.deref();if(!z)return;let $={duration_ms:Date.now()-z.startTime};if(K){if(K.numSuccess!==void 0)$.num_success=K.numSuccess;if(K.numBlocking!==void 0)$.num_blocking=K.numBlocking;if(K.numNonBlockingError!==void 0)$.num_non_blocking_error=K.numNonBlockingError;if(K.numCancelled!==void 0)$.num_cancelled=K.numCancelled}z.span.setAttributes($),z.span.end(),BO.delete(_),pN.delete(_)}var gO,O46,Xo,BO,pN,Cg4=0,bg4=!1,Dfz=1800000;var w46=y(()=>{o1();m8();tV8();Ts6();gN6();gO=O6(nK(),1),O46=new xg4,Xo=new xg4,BO=new Map,pN=new Map});var UU1=m((Qg4)=>{Object.defineProperty(Qg4,"__esModule",{value:!0});Qg4.AggregationTemporalityPreference=void 0;var Gfz;(function(q){q[q.DELTA=0]="DELTA",q[q.CUMULATIVE=1]="CUMULATIVE",q[q.LOWMEMORY=2]="LOWMEMORY"})(Gfz=Qg4.AggregationTemporalityPreference||(Qg4.AggregationTemporalityPreference={}))});var ng4=m((cg4)=>{Object.defineProperty(cg4,"__esModule",{value:!0});cg4.OTLPExporterBase=void 0;class dg4{_delegate;constructor(q){this._delegate=q}export(q,K){this._delegate.export(q,K)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}cg4.OTLPExporterBase=dg4});var VR8=m((rg4)=>{Object.defineProperty(rg4,"__esModule",{value:!0});rg4.OTLPExporterError=void 0;class ig4 extends Error{code;name="OTLPExporterError";data;constructor(q,K,_){super(q);this.data=_,this.code=K}}rg4.OTLPExporterError=ig4});var ks6=m((sg4)=>{Object.defineProperty(sg4,"__esModule",{value:!0});sg4.getSharedConfigurationDefaults=sg4.mergeOtlpSharedConfigurationWithDefaults=sg4.wrapStaticHeadersInFunction=sg4.validateTimeoutMillis=void 0;function ag4(q){if(Number.isFinite(q)&&q>0)return q;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${q}')`)}sg4.validateTimeoutMillis=ag4;function Tfz(q){if(q==null)return;return async()=>q}sg4.wrapStaticHeadersInFunction=Tfz;function vfz(q,K,_){return{timeoutMillis:ag4(q.timeoutMillis??K.timeoutMillis??_.timeoutMillis),concurrencyLimit:q.concurrencyLimit??K.concurrencyLimit??_.concurrencyLimit,compression:q.compression??K.compression??_.compression}}sg4.mergeOtlpSharedConfigurationWithDefaults=vfz;function kfz(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}sg4.getSharedConfigurationDefaults=kfz});var qF4=m((eg4)=>{Object.defineProperty(eg4,"__esModule",{value:!0});eg4.CompressionAlgorithm=void 0;var Efz;(function(q){q.NONE="none",q.GZIP="gzip"})(Efz=eg4.CompressionAlgorithm||(eg4.CompressionAlgorithm={}))});var dU1=m((_F4)=>{Object.defineProperty(_F4,"__esModule",{value:!0});_F4.createBoundedQueueExportPromiseHandler=void 0;class KF4{_concurrencyLimit;_sendingPromises=[];constructor(q){this._concurrencyLimit=q}pushPromise(q){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(q);let K=()=>{let _=this._sendingPromises.indexOf(q);this._sendingPromises.splice(_,1)};q.then(K,K)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function Lfz(q){return new KF4(q.concurrencyLimit)}_F4.createBoundedQueueExportPromiseHandler=Lfz});var AF4=m((YF4)=>{Object.defineProperty(YF4,"__esModule",{value:!0});YF4.createLoggingPartialSuccessResponseHandler=void 0;var Rfz=nK();function hfz(q){return Object.prototype.hasOwnProperty.call(q,"partialSuccess")}function Sfz(){return{handleResponse(q){if(q==null||!hfz(q)||q.partialSuccess==null||Object.keys(q.partialSuccess).length===0)return;Rfz.diag.warn("Received Partial Success response:",JSON.stringify(q.partialSuccess))}}}YF4.createLoggingPartialSuccessResponseHandler=Sfz});var cU1=m((jF4)=>{Object.defineProperty(jF4,"__esModule",{value:!0});jF4.createOtlpExportDelegate=void 0;var A26=Oz(),OF4=VR8(),Cfz=AF4(),bfz=nK();class wF4{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(q,K,_,z,Y){this._transport=q,this._serializer=K,this._responseHandler=_,this._promiseQueue=z,this._timeout=Y,this._diagLogger=bfz.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(q,K){if(this._diagLogger.debug("items to be sent",q),this._promiseQueue.hasReachedLimit()){K({code:A26.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let _=this._serializer.serializeRequest(q);if(_==null){K({code:A26.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(_,this._timeout).then((z)=>{if(z.status==="success"){if(z.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(z.data))}catch(Y){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Y,z.data)}K({code:A26.ExportResultCode.SUCCESS});return}else if(z.status==="failure"&&z.error){K({code:A26.ExportResultCode.FAILED,error:z.error});return}else if(z.status==="retryable")K({code:A26.ExportResultCode.FAILED,error:new OF4.OTLPExporterError("Export failed with retryable status")});else K({code:A26.ExportResultCode.FAILED,error:new OF4.OTLPExporterError("Export failed with unknown error")})},(z)=>K({code:A26.ExportResultCode.FAILED,error:z})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function xfz(q,K){return new wF4(q.transport,q.serializer,(0,Cfz.createLoggingPartialSuccessResponseHandler)(),q.promiseHandler,K.timeout)}jF4.createOtlpExportDelegate=xfz});var XF4=m((JF4)=>{Object.defineProperty(JF4,"__esModule",{value:!0});JF4.createOtlpNetworkExportDelegate=void 0;var Ifz=dU1(),ufz=cU1();function mfz(q,K,_){return(0,ufz.createOtlpExportDelegate)({transport:_,serializer:K,promiseHandler:(0,Ifz.createBoundedQueueExportPromiseHandler)(q)},{timeout:q.timeoutMillis})}JF4.createOtlpNetworkExportDelegate=mfz});var oU=m((j46)=>{Object.defineProperty(j46,"__esModule",{value:!0});j46.createOtlpNetworkExportDelegate=j46.CompressionAlgorithm=j46.getSharedConfigurationDefaults=j46.mergeOtlpSharedConfigurationWithDefaults=j46.OTLPExporterError=j46.OTLPExporterBase=void 0;var pfz=ng4();Object.defineProperty(j46,"OTLPExporterBase",{enumerable:!0,get:function(){return pfz.OTLPExporterBase}});var Bfz=VR8();Object.defineProperty(j46,"OTLPExporterError",{enumerable:!0,get:function(){return Bfz.OTLPExporterError}});var PF4=ks6();Object.defineProperty(j46,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return PF4.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(j46,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return PF4.getSharedConfigurationDefaults}});var gfz=qF4();Object.defineProperty(j46,"CompressionAlgorithm",{enumerable:!0,get:function(){return gfz.CompressionAlgorithm}});var Ffz=XF4();Object.defineProperty(j46,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return Ffz.createOtlpNetworkExportDelegate}})});var iU1=m((fF4)=>{Object.defineProperty(fF4,"__esModule",{value:!0});fF4.OTLPMetricExporterBase=fF4.LowMemoryTemporalitySelector=fF4.DeltaTemporalitySelector=fF4.CumulativeTemporalitySelector=void 0;var Qfz=Oz(),CX=z26(),WF4=UU1(),dfz=oU(),cfz=nK(),lfz=()=>CX.AggregationTemporality.CUMULATIVE;fF4.CumulativeTemporalitySelector=lfz;var nfz=(q)=>{switch(q){case CX.InstrumentType.COUNTER:case CX.InstrumentType.OBSERVABLE_COUNTER:case CX.InstrumentType.GAUGE:case CX.InstrumentType.HISTOGRAM:case CX.InstrumentType.OBSERVABLE_GAUGE:return CX.AggregationTemporality.DELTA;case CX.InstrumentType.UP_DOWN_COUNTER:case CX.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return CX.AggregationTemporality.CUMULATIVE}};fF4.DeltaTemporalitySelector=nfz;var ifz=(q)=>{switch(q){case CX.InstrumentType.COUNTER:case CX.InstrumentType.HISTOGRAM:return CX.AggregationTemporality.DELTA;case CX.InstrumentType.GAUGE:case CX.InstrumentType.UP_DOWN_COUNTER:case CX.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:case CX.InstrumentType.OBSERVABLE_COUNTER:case CX.InstrumentType.OBSERVABLE_GAUGE:return CX.AggregationTemporality.CUMULATIVE}};fF4.LowMemoryTemporalitySelector=ifz;function rfz(){let q=((0,Qfz.getStringFromEnv)("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE")??"cumulative").toLowerCase();if(q==="cumulative")return fF4.CumulativeTemporalitySelector;if(q==="delta")return fF4.DeltaTemporalitySelector;if(q==="lowmemory")return fF4.LowMemoryTemporalitySelector;return cfz.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${q}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`),fF4.CumulativeTemporalitySelector}function ofz(q){if(q!=null){if(q===WF4.AggregationTemporalityPreference.DELTA)return fF4.DeltaTemporalitySelector;else if(q===WF4.AggregationTemporalityPreference.LOWMEMORY)return fF4.LowMemoryTemporalitySelector;return fF4.CumulativeTemporalitySelector}return rfz()}var afz=Object.freeze({type:CX.AggregationType.DEFAULT});function sfz(q){return q?.aggregationPreference??(()=>afz)}class DF4 extends dfz.OTLPExporterBase{_aggregationTemporalitySelector;_aggregationSelector;constructor(q,K){super(q);this._aggregationSelector=sfz(K),this._aggregationTemporalitySelector=ofz(K?.temporalityPreference)}selectAggregation(q){return this._aggregationSelector(q)}selectAggregationTemporality(q){return this._aggregationTemporalitySelector(q)}}fF4.OTLPMetricExporterBase=DF4});var rU1=m((PyO,GF4)=>{GF4.exports=tfz;function tfz(q,K){var _=Array(arguments.length-1),z=0,Y=2,$=!0;while(Y<arguments.length)_[z++]=arguments[Y++];return new Promise(function(O,w){_[z]=function(H){if($)if($=!1,H)w(H);else{var J=Array(arguments.length-1),M=0;while(M<J.length)J[M++]=arguments[M];O.apply(null,J)}};try{q.apply(K||null,_)}catch(j){if($)$=!1,w(j)}})}});var VF4=m((kF4)=>{var yR8=kF4;yR8.length=function(K){var _=K.length;if(!_)return 0;var z=0;while(--_%4>1&&K.charAt(_)==="=")++z;return Math.ceil(K.length*3)/4-z};var wy6=Array(64),vF4=Array(123);for(_b=0;_b<64;)vF4[wy6[_b]=_b<26?_b+65:_b<52?_b+71:_b<62?_b-4:_b-59|43]=_b++;var _b;yR8.encode=function(K,_,z){var Y=null,$=[],A=0,O=0,w;while(_<z){var j=K[_++];switch(O){case 0:$[A++]=wy6[j>>2],w=(j&3)<<4,O=1;break;case 1:$[A++]=wy6[w|j>>4],w=(j&15)<<2,O=2;break;case 2:$[A++]=wy6[w|j>>6],$[A++]=wy6[j&63],O=0;break}if(A>8191)(Y||(Y=[])).push(String.fromCharCode.apply(String,$)),A=0}if(O){if($[A++]=wy6[w],$[A++]=61,O===1)$[A++]=61}if(Y){if(A)Y.push(String.fromCharCode.apply(String,$.slice(0,A)));return Y.join("")}return String.fromCharCode.apply(String,$.slice(0,A))};var TF4="invalid encoding";yR8.decode=function(K,_,z){var Y=z,$=0,A;for(var O=0;O<K.length;){var w=K.charCodeAt(O++);if(w===61&&$>1)break;if((w=vF4[w])===void 0)throw Error(TF4);switch($){case 0:A=w,$=1;break;case 1:_[z++]=A<<2|(w&48)>>4,A=w,$=2;break;case 2:_[z++]=(A&15)<<4|(w&60)>>2,A=w,$=3;break;case 3:_[z++]=(A&3)<<6|w,$=0;break}}if($===1)throw Error(TF4);return z-Y};yR8.test=function(K){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(K)}});var yF4=m((DyO,NF4)=>{NF4.exports=ER8;function ER8(){this._listeners={}}ER8.prototype.on=function(K,_,z){return(this._listeners[K]||(this._listeners[K]=[])).push({fn:_,ctx:z||this}),this};ER8.prototype.off=function(K,_){if(K===void 0)this._listeners={};else if(_===void 0)this._listeners[K]=[];else{var z=this._listeners[K];for(var Y=0;Y<z.length;)if(z[Y].fn===_)z.splice(Y,1);else++Y}return this};ER8.prototype.emit=function(K){var _=this._listeners[K];if(_){var z=[],Y=1;for(;Y<arguments.length;)z.push(arguments[Y++]);for(Y=0;Y<_.length;)_[Y].fn.apply(_[Y++].ctx,z)}return this}});var bF4=m((fyO,CF4)=>{CF4.exports=EF4(EF4);function EF4(q){if(typeof Float32Array<"u")(function(){var K=new Float32Array([-0]),_=new Uint8Array(K.buffer),z=_[3]===128;function Y(w,j,H){K[0]=w,j[H]=_[0],j[H+1]=_[1],j[H+2]=_[2],j[H+3]=_[3]}function $(w,j,H){K[0]=w,j[H]=_[3],j[H+1]=_[2],j[H+2]=_[1],j[H+3]=_[0]}q.writeFloatLE=z?Y:$,q.writeFloatBE=z?$:Y;function A(w,j){return _[0]=w[j],_[1]=w[j+1],_[2]=w[j+2],_[3]=w[j+3],K[0]}function O(w,j){return _[3]=w[j],_[2]=w[j+1],_[1]=w[j+2],_[0]=w[j+3],K[0]}q.readFloatLE=z?A:O,q.readFloatBE=z?O:A})();else(function(){function K(z,Y,$,A){var O=Y<0?1:0;if(O)Y=-Y;if(Y===0)z(1/Y>0?0:2147483648,$,A);else if(isNaN(Y))z(2143289344,$,A);else if(Y>340282346638528860000000000000000000000)z((O<<31|2139095040)>>>0,$,A);else if(Y<0.000000000000000000000000000000000000011754943508222875)z((O<<31|Math.round(Y/0.000000000000000000000000000000000000000000001401298464324817))>>>0,$,A);else{var w=Math.floor(Math.log(Y)/Math.LN2),j=Math.round(Y*Math.pow(2,-w)*8388608)&8388607;z((O<<31|w+127<<23|j)>>>0,$,A)}}q.writeFloatLE=K.bind(null,LF4),q.writeFloatBE=K.bind(null,RF4);function _(z,Y,$){var A=z(Y,$),O=(A>>31)*2+1,w=A>>>23&255,j=A&8388607;return w===255?j?NaN:O*(1/0):w===0?O*0.000000000000000000000000000000000000000000001401298464324817*j:O*Math.pow(2,w-150)*(j+8388608)}q.readFloatLE=_.bind(null,hF4),q.readFloatBE=_.bind(null,SF4)})();if(typeof Float64Array<"u")(function(){var K=new Float64Array([-0]),_=new Uint8Array(K.buffer),z=_[7]===128;function Y(w,j,H){K[0]=w,j[H]=_[0],j[H+1]=_[1],j[H+2]=_[2],j[H+3]=_[3],j[H+4]=_[4],j[H+5]=_[5],j[H+6]=_[6],j[H+7]=_[7]}function $(w,j,H){K[0]=w,j[H]=_[7],j[H+1]=_[6],j[H+2]=_[5],j[H+3]=_[4],j[H+4]=_[3],j[H+5]=_[2],j[H+6]=_[1],j[H+7]=_[0]}q.writeDoubleLE=z?Y:$,q.writeDoubleBE=z?$:Y;function A(w,j){return _[0]=w[j],_[1]=w[j+1],_[2]=w[j+2],_[3]=w[j+3],_[4]=w[j+4],_[5]=w[j+5],_[6]=w[j+6],_[7]=w[j+7],K[0]}function O(w,j){return _[7]=w[j],_[6]=w[j+1],_[5]=w[j+2],_[4]=w[j+3],_[3]=w[j+4],_[2]=w[j+5],_[1]=w[j+6],_[0]=w[j+7],K[0]}q.readDoubleLE=z?A:O,q.readDoubleBE=z?O:A})();else(function(){function K(z,Y,$,A,O,w){var j=A<0?1:0;if(j)A=-A;if(A===0)z(0,O,w+Y),z(1/A>0?0:2147483648,O,w+$);else if(isNaN(A))z(0,O,w+Y),z(2146959360,O,w+$);else if(A>179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)z(0,O,w+Y),z((j<<31|2146435072)>>>0,O,w+$);else{var H;if(A<0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014)H=A/0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005,z(H>>>0,O,w+Y),z((j<<31|H/4294967296)>>>0,O,w+$);else{var J=Math.floor(Math.log(A)/Math.LN2);if(J===1024)J=1023;H=A*Math.pow(2,-J),z(H*4503599627370496>>>0,O,w+Y),z((j<<31|J+1023<<20|H*1048576&1048575)>>>0,O,w+$)}}}q.writeDoubleLE=K.bind(null,LF4,0,4),q.writeDoubleBE=K.bind(null,RF4,4,0);function _(z,Y,$,A,O){var w=z(A,O+Y),j=z(A,O+$),H=(j>>31)*2+1,J=j>>>20&2047,M=4294967296*(j&1048575)+w;return J===2047?M?NaN:H*(1/0):J===0?H*0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005*M:H*Math.pow(2,J-1075)*(M+4503599627370496)}q.readDoubleLE=_.bind(null,hF4,0,4),q.readDoubleBE=_.bind(null,SF4,4,0)})();return q}function LF4(q,K,_){K[_]=q&255,K[_+1]=q>>>8&255,K[_+2]=q>>>16&255,K[_+3]=q>>>24}function RF4(q,K,_){K[_]=q>>>24,K[_+1]=q>>>16&255,K[_+2]=q>>>8&255,K[_+3]=q&255}function hF4(q,K){return(q[K]|q[K+1]<<8|q[K+2]<<16|q[K+3]<<24)>>>0}function SF4(q,K){return(q[K]<<24|q[K+1]<<16|q[K+2]<<8|q[K+3])>>>0}});var xF4=m((Vs6,oU1)=>{(function(q,K){function _(z){return z.default||z}if(typeof define==="function"&&define.amd)define([],function(){var z={};return K(z),_(z)});else if(typeof Vs6==="object"){if(K(Vs6),typeof oU1==="object")oU1.exports=_(Vs6)}else(function(){var z={};K(z),q.Long=_(z)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Vs6,function(q){Object.defineProperty(q,"__esModule",{value:!0}),q.default=void 0;var K=null;try{K=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function _(p,C,g){this.low=p|0,this.high=C|0,this.unsigned=!!g}_.prototype.__isLong__,Object.defineProperty(_.prototype,"__isLong__",{value:!0});function z(p){return(p&&p.__isLong__)===!0}function Y(p){var C=Math.clz32(p&-p);return p?31-C:C}_.isLong=z;var $={},A={};function O(p,C){var g,F,U;if(C){if(p>>>=0,U=0<=p&&p<256){if(F=A[p],F)return F}if(g=j(p,0,!0),U)A[p]=g;return g}else{if(p|=0,U=-128<=p&&p<128){if(F=$[p],F)return F}if(g=j(p,p<0?-1:0,!1),U)$[p]=g;return g}}_.fromInt=O;function w(p,C){if(isNaN(p))return C?T:Z;if(C){if(p<0)return T;if(p>=D)return R}else{if(p<=-f)return x;if(p+1>=f)return S}if(p<0)return w(-p,C).neg();return j(p%W|0,p/W|0,C)}_.fromNumber=w;function j(p,C,g){return new _(p,C,g)}_.fromBits=j;var H=Math.pow;function J(p,C,g){if(p.length===0)throw Error("empty string");if(typeof C==="number")g=C,C=!1;else C=!!C;if(p==="NaN"||p==="Infinity"||p==="+Infinity"||p==="-Infinity")return C?T:Z;if(g=g||10,g<2||36<g)throw RangeError("radix");var F;if((F=p.indexOf("-"))>0)throw Error("interior hyphen");else if(F===0)return J(p.substring(1),C,g).neg();var U=w(H(g,8)),c=Z;for(var K6=0;K6<p.length;K6+=8){var t=Math.min(8,p.length-K6),q6=parseInt(p.substring(K6,K6+t),g);if(t<8){var e=w(H(g,t));c=c.mul(e).add(w(q6))}else c=c.mul(U),c=c.add(w(q6))}return c.unsigned=C,c}_.fromString=J;function M(p,C){if(typeof p==="number")return w(p,C);if(typeof p==="string")return J(p,C);return j(p.low,p.high,typeof C==="boolean"?C:p.unsigned)}_.fromValue=M;var X=65536,P=16777216,W=X*X,D=W*W,f=D/2,G=O(P),Z=O(0);_.ZERO=Z;var T=O(0,!0);_.UZERO=T;var v=O(1);_.ONE=v;var V=O(1,!0);_.UONE=V;var E=O(-1);_.NEG_ONE=E;var S=j(-1,2147483647,!1);_.MAX_VALUE=S;var R=j(-1,-1,!0);_.MAX_UNSIGNED_VALUE=R;var x=j(0,-2147483648,!1);_.MIN_VALUE=x;var I=_.prototype;if(I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){if(this.unsigned)return(this.high>>>0)*W+(this.low>>>0);return this.high*W+(this.low>>>0)},I.toString=function(C){if(C=C||10,C<2||36<C)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(x)){var g=w(C),F=this.div(g),U=F.mul(g).sub(this);return F.toString(C)+U.toInt().toString(C)}else return"-"+this.neg().toString(C);var c=w(H(C,6),this.unsigned),K6=this,t="";while(!0){var q6=K6.div(c),e=K6.sub(q6.mul(c)).toInt()>>>0,i=e.toString(C);if(K6=q6,K6.isZero())return i+t;else{while(i.length<6)i="0"+i;t=""+i+t}}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(x)?64:this.neg().getNumBitsAbs();var C=this.high!=0?this.high:this.low;for(var g=31;g>0;g--)if((C&1<<g)!=0)break;return this.high!=0?g+33:g+1},I.isSafeInteger=function(){var C=this.high>>21;if(!C)return!0;if(this.unsigned)return!1;return C===-1&&!(this.low===0&&this.high===-2097152)},I.isZero=function(){return this.high===0&&this.low===0},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return(this.low&1)===1},I.isEven=function(){return(this.low&1)===0},I.equals=function(C){if(!z(C))C=M(C);if(this.unsigned!==C.unsigned&&this.high>>>31===1&&C.high>>>31===1)return!1;return this.high===C.high&&this.low===C.low},I.eq=I.equals,I.notEquals=function(C){return!this.eq(C)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(C){return this.comp(C)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(C){return this.comp(C)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(C){return this.comp(C)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(C){return this.comp(C)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(C){if(!z(C))C=M(C);if(this.eq(C))return 0;var g=this.isNegative(),F=C.isNegative();if(g&&!F)return-1;if(!g&&F)return 1;if(!this.unsigned)return this.sub(C).isNegative()?-1:1;return C.high>>>0>this.high>>>0||C.high===this.high&&C.low>>>0>this.low>>>0?-1:1},I.comp=I.compare,I.negate=function(){if(!this.unsigned&&this.eq(x))return x;return this.not().add(v)},I.neg=I.negate,I.add=function(C){if(!z(C))C=M(C);var g=this.high>>>16,F=this.high&65535,U=this.low>>>16,c=this.low&65535,K6=C.high>>>16,t=C.high&65535,q6=C.low>>>16,e=C.low&65535,i=0,$6=0,M6=0,j6=0;return j6+=c+e,M6+=j6>>>16,j6&=65535,M6+=U+q6,$6+=M6>>>16,M6&=65535,$6+=F+t,i+=$6>>>16,$6&=65535,i+=g+K6,i&=65535,j(M6<<16|j6,i<<16|$6,this.unsigned)},I.subtract=function(C){if(!z(C))C=M(C);return this.add(C.neg())},I.sub=I.subtract,I.multiply=function(C){if(this.isZero())return this;if(!z(C))C=M(C);if(K){var g=K.mul(this.low,this.high,C.low,C.high);return j(g,K.get_high(),this.unsigned)}if(C.isZero())return this.unsigned?T:Z;if(this.eq(x))return C.isOdd()?x:Z;if(C.eq(x))return this.isOdd()?x:Z;if(this.isNegative())if(C.isNegative())return this.neg().mul(C.neg());else return this.neg().mul(C).neg();else if(C.isNegative())return this.mul(C.neg()).neg();if(this.lt(G)&&C.lt(G))return w(this.toNumber()*C.toNumber(),this.unsigned);var F=this.high>>>16,U=this.high&65535,c=this.low>>>16,K6=this.low&65535,t=C.high>>>16,q6=C.high&65535,e=C.low>>>16,i=C.low&65535,$6=0,M6=0,j6=0,G6=0;return G6+=K6*i,j6+=G6>>>16,G6&=65535,j6+=c*i,M6+=j6>>>16,j6&=65535,j6+=K6*e,M6+=j6>>>16,j6&=65535,M6+=U*i,$6+=M6>>>16,M6&=65535,M6+=c*e,$6+=M6>>>16,M6&=65535,M6+=K6*q6,$6+=M6>>>16,M6&=65535,$6+=F*i+U*e+c*q6+K6*t,$6&=65535,j(j6<<16|G6,$6<<16|M6,this.unsigned)},I.mul=I.multiply,I.divide=function(C){if(!z(C))C=M(C);if(C.isZero())throw Error("division by zero");if(K){if(!this.unsigned&&this.high===-2147483648&&C.low===-1&&C.high===-1)return this;var g=(this.unsigned?K.div_u:K.div_s)(this.low,this.high,C.low,C.high);return j(g,K.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?T:Z;var F,U,c;if(!this.unsigned){if(this.eq(x))if(C.eq(v)||C.eq(E))return x;else if(C.eq(x))return v;else{var K6=this.shr(1);if(F=K6.div(C).shl(1),F.eq(Z))return C.isNegative()?v:E;else return U=this.sub(C.mul(F)),c=F.add(U.div(C)),c}else if(C.eq(x))return this.unsigned?T:Z;if(this.isNegative()){if(C.isNegative())return this.neg().div(C.neg());return this.neg().div(C).neg()}else if(C.isNegative())return this.div(C.neg()).neg();c=Z}else{if(!C.unsigned)C=C.toUnsigned();if(C.gt(this))return T;if(C.gt(this.shru(1)))return V;c=T}U=this;while(U.gte(C)){F=Math.max(1,Math.floor(U.toNumber()/C.toNumber()));var t=Math.ceil(Math.log(F)/Math.LN2),q6=t<=48?1:H(2,t-48),e=w(F),i=e.mul(C);while(i.isNegative()||i.gt(U))F-=q6,e=w(F,this.unsigned),i=e.mul(C);if(e.isZero())e=v;c=c.add(e),U=U.sub(i)}return c},I.div=I.divide,I.modulo=function(C){if(!z(C))C=M(C);if(K){var g=(this.unsigned?K.rem_u:K.rem_s)(this.low,this.high,C.low,C.high);return j(g,K.get_high(),this.unsigned)}return this.sub(this.div(C).mul(C))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return j(~this.low,~this.high,this.unsigned)},I.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},I.clz=I.countLeadingZeros,I.countTrailingZeros=function(){return this.low?Y(this.low):Y(this.high)+32},I.ctz=I.countTrailingZeros,I.and=function(C){if(!z(C))C=M(C);return j(this.low&C.low,this.high&C.high,this.unsigned)},I.or=function(C){if(!z(C))C=M(C);return j(this.low|C.low,this.high|C.high,this.unsigned)},I.xor=function(C){if(!z(C))C=M(C);return j(this.low^C.low,this.high^C.high,this.unsigned)},I.shiftLeft=function(C){if(z(C))C=C.toInt();if((C&=63)===0)return this;else if(C<32)return j(this.low<<C,this.high<<C|this.low>>>32-C,this.unsigned);else return j(0,this.low<<C-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(C){if(z(C))C=C.toInt();if((C&=63)===0)return this;else if(C<32)return j(this.low>>>C|this.high<<32-C,this.high>>C,this.unsigned);else return j(this.high>>C-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(C){if(z(C))C=C.toInt();if((C&=63)===0)return this;if(C<32)return j(this.low>>>C|this.high<<32-C,this.high>>>C,this.unsigned);if(C===32)return j(this.high,0,this.unsigned);return j(this.high>>>C-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.rotateLeft=function(C){var g;if(z(C))C=C.toInt();if((C&=63)===0)return this;if(C===32)return j(this.high,this.low,this.unsigned);if(C<32)return g=32-C,j(this.low<<C|this.high>>>g,this.high<<C|this.low>>>g,this.unsigned);return C-=32,g=32-C,j(this.high<<C|this.low>>>g,this.low<<C|this.high>>>g,this.unsigned)},I.rotl=I.rotateLeft,I.rotateRight=function(C){var g;if(z(C))C=C.toInt();if((C&=63)===0)return this;if(C===32)return j(this.high,this.low,this.unsigned);if(C<32)return g=32-C,j(this.high<<g|this.low>>>C,this.low<<g|this.high>>>C,this.unsigned);return C-=32,g=32-C,j(this.low<<g|this.high>>>C,this.high<<g|this.low>>>C,this.unsigned)},I.rotr=I.rotateRight,I.toSigned=function(){if(!this.unsigned)return this;return j(this.low,this.high,!1)},I.toUnsigned=function(){if(this.unsigned)return this;return j(this.low,this.high,!0)},I.toBytes=function(C){return C?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var C=this.high,g=this.low;return[g&255,g>>>8&255,g>>>16&255,g>>>24,C&255,C>>>8&255,C>>>16&255,C>>>24]},I.toBytesBE=function(){var C=this.high,g=this.low;return[C>>>24,C>>>16&255,C>>>8&255,C&255,g>>>24,g>>>16&255,g>>>8&255,g&255]},_.fromBytes=function(C,g,F){return F?_.fromBytesLE(C,g):_.fromBytesBE(C,g)},_.fromBytesLE=function(C,g){return new _(C[0]|C[1]<<8|C[2]<<16|C[3]<<24,C[4]|C[5]<<8|C[6]<<16|C[7]<<24,g)},_.fromBytesBE=function(C,g){return new _(C[4]<<24|C[5]<<16|C[6]<<8|C[7],C[0]<<24|C[1]<<16|C[2]<<8|C[3],g)},typeof BigInt==="function")_.fromBigInt=function(C,g){var F=Number(BigInt.asIntN(32,C)),U=Number(BigInt.asIntN(32,C>>BigInt(32)));return j(F,U,g)},_.fromValue=function(C,g){if(typeof C==="bigint")return _.fromBigInt(C,g);return M(C,g)},I.toBigInt=function(){var C=BigInt(this.low>>>0),g=BigInt(this.unsigned?this.high>>>0:this.high);return g<<BigInt(32)|C};var B=q.default=_})});var sU1=m((IF4,aU1)=>{aU1.exports=efz;function efz(moduleName){try{var mod=moduleName==="long"?xF4():moduleName==="buffer"?U6("buffer"):moduleName==="fs"?U6("fs"):eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(q){}return null}});var mF4=m((uF4)=>{var tU1=uF4;tU1.length=function(K){var _=0,z=0;for(var Y=0;Y<K.length;++Y)if(z=K.charCodeAt(Y),z<128)_+=1;else if(z<2048)_+=2;else if((z&64512)===55296&&(K.charCodeAt(Y+1)&64512)===56320)++Y,_+=4;else _+=3;return _};tU1.read=function(K,_,z){var Y=z-_;if(Y<1)return"";var $=null,A=[],O=0,w;while(_<z){if(w=K[_++],w<128)A[O++]=w;else if(w>191&&w<224)A[O++]=(w&31)<<6|K[_++]&63;else if(w>239&&w<365)w=((w&7)<<18|(K[_++]&63)<<12|(K[_++]&63)<<6|K[_++]&63)-65536,A[O++]=55296+(w>>10),A[O++]=56320+(w&1023);else A[O++]=(w&15)<<12|(K[_++]&63)<<6|K[_++]&63;if(O>8191)($||($=[])).push(String.fromCharCode.apply(String,A)),O=0}if($){if(O)$.push(String.fromCharCode.apply(String,A.slice(0,O)));return $.join("")}return String.fromCharCode.apply(String,A.slice(0,O))};tU1.write=function(K,_,z){var Y=z,$,A;for(var O=0;O<K.length;++O)if($=K.charCodeAt(O),$<128)_[z++]=$;else if($<2048)_[z++]=$>>6|192,_[z++]=$&63|128;else if(($&64512)===55296&&((A=K.charCodeAt(O+1))&64512)===56320)$=65536+(($&1023)<<10)+(A&1023),++O,_[z++]=$>>18|240,_[z++]=$>>12&63|128,_[z++]=$>>6&63|128,_[z++]=$&63|128;else _[z++]=$>>12|224,_[z++]=$>>6&63|128,_[z++]=$&63|128;return z-Y}});var BF4=m((GyO,pF4)=>{pF4.exports=q0z;function q0z(q,K,_){var z=_||8192,Y=z>>>1,$=null,A=z;return function(w){if(w<1||w>Y)return q(w);if(A+w>z)$=q(z),A=0;var j=K.call($,A,A+=w);if(A&7)A=(A|7)+1;return j}}});var FF4=m((TyO,gF4)=>{gF4.exports=TD;var Ns6=aU();function TD(q,K){this.lo=q>>>0,this.hi=K>>>0}var O26=TD.zero=new TD(0,0);O26.toNumber=function(){return 0};O26.zzEncode=O26.zzDecode=function(){return this};O26.length=function(){return 1};var K0z=TD.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";TD.fromNumber=function(K){if(K===0)return O26;var _=K<0;if(_)K=-K;var z=K>>>0,Y=(K-z)/4294967296>>>0;if(_){if(Y=~Y>>>0,z=~z>>>0,++z>4294967295){if(z=0,++Y>4294967295)Y=0}}return new TD(z,Y)};TD.from=function(K){if(typeof K==="number")return TD.fromNumber(K);if(Ns6.isString(K))if(Ns6.Long)K=Ns6.Long.fromString(K);else return TD.fromNumber(parseInt(K,10));return K.low||K.high?new TD(K.low>>>0,K.high>>>0):O26};TD.prototype.toNumber=function(K){if(!K&&this.hi>>>31){var _=~this.lo+1>>>0,z=~this.hi>>>0;if(!_)z=z+1>>>0;return-(_+z*4294967296)}return this.lo+this.hi*4294967296};TD.prototype.toLong=function(K){return Ns6.Long?new Ns6.Long(this.lo|0,this.hi|0,Boolean(K)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(K)}};var H46=String.prototype.charCodeAt;TD.fromHash=function(K){if(K===K0z)return O26;return new TD((H46.call(K,0)|H46.call(K,1)<<8|H46.call(K,2)<<16|H46.call(K,3)<<24)>>>0,(H46.call(K,4)|H46.call(K,5)<<8|H46.call(K,6)<<16|H46.call(K,7)<<24)>>>0)};TD.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)};TD.prototype.zzEncode=function(){var K=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^K)>>>0,this.lo=(this.lo<<1^K)>>>0,this};TD.prototype.zzDecode=function(){var K=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^K)>>>0,this.hi=(this.hi>>>1^K)>>>0,this};TD.prototype.length=function(){var K=this.lo,_=(this.lo>>>28|this.hi<<4)>>>0,z=this.hi>>>24;return z===0?_===0?K<16384?K<128?1:2:K<2097152?3:4:_<16384?_<128?5:6:_<2097152?7:8:z<128?9:10}});var aU=m((eU1)=>{var oK=eU1;oK.asPromise=rU1();oK.base64=VF4();oK.EventEmitter=yF4();oK.float=bF4();oK.inquire=sU1();oK.utf8=mF4();oK.pool=BF4();oK.LongBits=FF4();oK.isNode=Boolean(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);oK.global=oK.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||eU1;oK.emptyArray=Object.freeze?Object.freeze([]):[];oK.emptyObject=Object.freeze?Object.freeze({}):{};oK.isInteger=Number.isInteger||function(K){return typeof K==="number"&&isFinite(K)&&Math.floor(K)===K};oK.isString=function(K){return typeof K==="string"||K instanceof String};oK.isObject=function(K){return K&&typeof K==="object"};oK.isset=oK.isSet=function(K,_){var z=K[_];if(z!=null&&K.hasOwnProperty(_))return typeof z!=="object"||(Array.isArray(z)?z.length:Object.keys(z).length)>0;return!1};oK.Buffer=function(){try{var q=oK.inquire("buffer").Buffer;return q.prototype.utf8Write?q:null}catch(K){return null}}();oK._Buffer_from=null;oK._Buffer_allocUnsafe=null;oK.newBuffer=function(K){return typeof K==="number"?oK.Buffer?oK._Buffer_allocUnsafe(K):new oK.Array(K):oK.Buffer?oK._Buffer_from(K):typeof Uint8Array>"u"?K:new Uint8Array(K)};oK.Array=typeof Uint8Array<"u"?Uint8Array:Array;oK.Long=oK.global.dcodeIO&&oK.global.dcodeIO.Long||oK.global.Long||oK.inquire("long");oK.key2Re=/^true|false|0|1$/;oK.key32Re=/^-?(?:0|[1-9][0-9]*)$/;oK.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;oK.longToHash=function(K){return K?oK.LongBits.from(K).toHash():oK.LongBits.zeroHash};oK.longFromHash=function(K,_){var z=oK.LongBits.fromHash(K);if(oK.Long)return oK.Long.fromBits(z.lo,z.hi,_);return z.toNumber(Boolean(_))};function UF4(q,K,_){for(var z=Object.keys(K),Y=0;Y<z.length;++Y)if(q[z[Y]]===void 0||!_)q[z[Y]]=K[z[Y]];return q}oK.merge=UF4;oK.lcFirst=function(K){return K.charAt(0).toLowerCase()+K.substring(1)};function QF4(q){function K(_,z){if(!(this instanceof K))return new K(_,z);if(Object.defineProperty(this,"message",{get:function(){return _}}),Error.captureStackTrace)Error.captureStackTrace(this,K);else Object.defineProperty(this,"stack",{value:Error().stack||""});if(z)UF4(this,z)}return K.prototype=Object.create(Error.prototype,{constructor:{value:K,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return q},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),K}oK.newError=QF4;oK.ProtocolError=QF4("ProtocolError");oK.oneOfGetter=function(K){var _={};for(var z=0;z<K.length;++z)_[K[z]]=1;return function(){for(var Y=Object.keys(this),$=Y.length-1;$>-1;--$)if(_[Y[$]]===1&&this[Y[$]]!==void 0&&this[Y[$]]!==null)return Y[$]}};oK.oneOfSetter=function(K){return function(_){for(var z=0;z<K.length;++z)if(K[z]!==_)delete this[K[z]]}};oK.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};oK._configure=function(){var q=oK.Buffer;if(!q){oK._Buffer_from=oK._Buffer_allocUnsafe=null;return}oK._Buffer_from=q.from!==Uint8Array.from&&q.from||function(_,z){return new q(_,z)},oK._Buffer_allocUnsafe=q.allocUnsafe||function(_){return new q(_)}}});var RR8=m((kyO,nF4)=>{nF4.exports=$$;var zb=aU(),qQ1,LR8=zb.LongBits,dF4=zb.base64,cF4=zb.utf8;function ys6(q,K,_){this.fn=q,this.len=K,this.next=void 0,this.val=_}function _Q1(){}function _0z(q){this.head=q.head,this.tail=q.tail,this.len=q.len,this.next=q.states}function $$(){this.len=0,this.head=new ys6(_Q1,0,0),this.tail=this.head,this.states=null}var lF4=function(){return zb.Buffer?function(){return($$.create=function(){return new qQ1})()}:function(){return new $$}};$$.create=lF4();$$.alloc=function(K){return new zb.Array(K)};if(zb.Array!==Array)$$.alloc=zb.pool($$.alloc,zb.Array.prototype.subarray);$$.prototype._push=function(K,_,z){return this.tail=this.tail.next=new ys6(K,_,z),this.len+=_,this};function zQ1(q,K,_){K[_]=q&255}function z0z(q,K,_){while(q>127)K[_++]=q&127|128,q>>>=7;K[_]=q}function YQ1(q,K){this.len=q,this.next=void 0,this.val=K}YQ1.prototype=Object.create(ys6.prototype);YQ1.prototype.fn=z0z;$$.prototype.uint32=function(K){return this.len+=(this.tail=this.tail.next=new YQ1((K=K>>>0)<128?1:K<16384?2:K<2097152?3:K<268435456?4:5,K)).len,this};$$.prototype.int32=function(K){return K<0?this._push($Q1,10,LR8.fromNumber(K)):this.uint32(K)};$$.prototype.sint32=function(K){return this.uint32((K<<1^K>>31)>>>0)};function $Q1(q,K,_){while(q.hi)K[_++]=q.lo&127|128,q.lo=(q.lo>>>7|q.hi<<25)>>>0,q.hi>>>=7;while(q.lo>127)K[_++]=q.lo&127|128,q.lo=q.lo>>>7;K[_++]=q.lo}$$.prototype.uint64=function(K){var _=LR8.from(K);return this._push($Q1,_.length(),_)};$$.prototype.int64=$$.prototype.uint64;$$.prototype.sint64=function(K){var _=LR8.from(K).zzEncode();return this._push($Q1,_.length(),_)};$$.prototype.bool=function(K){return this._push(zQ1,1,K?1:0)};function KQ1(q,K,_){K[_]=q&255,K[_+1]=q>>>8&255,K[_+2]=q>>>16&255,K[_+3]=q>>>24}$$.prototype.fixed32=function(K){return this._push(KQ1,4,K>>>0)};$$.prototype.sfixed32=$$.prototype.fixed32;$$.prototype.fixed64=function(K){var _=LR8.from(K);return this._push(KQ1,4,_.lo)._push(KQ1,4,_.hi)};$$.prototype.sfixed64=$$.prototype.fixed64;$$.prototype.float=function(K){return this._push(zb.float.writeFloatLE,4,K)};$$.prototype.double=function(K){return this._push(zb.float.writeDoubleLE,8,K)};var Y0z=zb.Array.prototype.set?function(K,_,z){_.set(K,z)}:function(K,_,z){for(var Y=0;Y<K.length;++Y)_[z+Y]=K[Y]};$$.prototype.bytes=function(K){var _=K.length>>>0;if(!_)return this._push(zQ1,1,0);if(zb.isString(K)){var z=$$.alloc(_=dF4.length(K));dF4.decode(K,z,0),K=z}return this.uint32(_)._push(Y0z,_,K)};$$.prototype.string=function(K){var _=cF4.length(K);return _?this.uint32(_)._push(cF4.write,_,K):this._push(zQ1,1,0)};$$.prototype.fork=function(){return this.states=new _0z(this),this.head=this.tail=new ys6(_Q1,0,0),this.len=0,this};$$.prototype.reset=function(){if(this.states)this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next;else this.head=this.tail=new ys6(_Q1,0,0),this.len=0;return this};$$.prototype.ldelim=function(){var K=this.head,_=this.tail,z=this.len;if(this.reset().uint32(z),z)this.tail.next=K.next,this.tail=_,this.len+=z;return this};$$.prototype.finish=function(){var K=this.head.next,_=this.constructor.alloc(this.len),z=0;while(K)K.fn(K.val,_,z),z+=K.len,K=K.next;return _};$$._configure=function(q){qQ1=q,$$.create=lF4(),qQ1._configure()}});var oF4=m((VyO,rF4)=>{rF4.exports=sU;var iF4=RR8();(sU.prototype=Object.create(iF4.prototype)).constructor=sU;var J46=aU();function sU(){iF4.call(this)}sU._configure=function(){sU.alloc=J46._Buffer_allocUnsafe,sU.writeBytesBuffer=J46.Buffer&&J46.Buffer.prototype instanceof Uint8Array&&J46.Buffer.prototype.set.name==="set"?function(K,_,z){_.set(K,z)}:function(K,_,z){if(K.copy)K.copy(_,z,0,K.length);else for(var Y=0;Y<K.length;)_[z++]=K[Y++]}};sU.prototype.bytes=function(K){if(J46.isString(K))K=J46._Buffer_from(K,"base64");var _=K.length>>>0;if(this.uint32(_),_)this._push(sU.writeBytesBuffer,_,K);return this};function $0z(q,K,_){if(q.length<40)J46.utf8.write(q,K,_);else if(K.utf8Write)K.utf8Write(q,_);else K.write(q,_)}sU.prototype.string=function(K){var _=J46.Buffer.byteLength(K);if(this.uint32(_),_)this._push($0z,_,K);return this};sU._configure()});var SR8=m((NyO,qU4)=>{qU4.exports=fM;var Zm=aU(),OQ1,tF4=Zm.LongBits,A0z=Zm.utf8;function Gm(q,K){return RangeError("index out of range: "+q.pos+" + "+(K||1)+" > "+q.len)}function fM(q){this.buf=q,this.pos=0,this.len=q.length}var aF4=typeof Uint8Array<"u"?function(K){if(K instanceof Uint8Array||Array.isArray(K))return new fM(K);throw Error("illegal buffer")}:function(K){if(Array.isArray(K))return new fM(K);throw Error("illegal buffer")},eF4=function(){return Zm.Buffer?function(_){return(fM.create=function(Y){return Zm.Buffer.isBuffer(Y)?new OQ1(Y):aF4(Y)})(_)}:aF4};fM.create=eF4();fM.prototype._slice=Zm.Array.prototype.subarray||Zm.Array.prototype.slice;fM.prototype.uint32=function(){var K=4294967295;return function(){if(K=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128)return K;if(K=(K|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)return K;if(K=(K|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)return K;if(K=(K|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)return K;if(K=(K|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128)return K;if((this.pos+=5)>this.len)throw this.pos=this.len,Gm(this,10);return K}}();fM.prototype.int32=function(){return this.uint32()|0};fM.prototype.sint32=function(){var K=this.uint32();return K>>>1^-(K&1)|0};function AQ1(){var q=new tF4(0,0),K=0;if(this.len-this.pos>4){for(;K<4;++K)if(q.lo=(q.lo|(this.buf[this.pos]&127)<<K*7)>>>0,this.buf[this.pos++]<128)return q;if(q.lo=(q.lo|(this.buf[this.pos]&127)<<28)>>>0,q.hi=(q.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return q;K=0}else{for(;K<3;++K){if(this.pos>=this.len)throw Gm(this);if(q.lo=(q.lo|(this.buf[this.pos]&127)<<K*7)>>>0,this.buf[this.pos++]<128)return q}return q.lo=(q.lo|(this.buf[this.pos++]&127)<<K*7)>>>0,q}if(this.len-this.pos>4){for(;K<5;++K)if(q.hi=(q.hi|(this.buf[this.pos]&127)<<K*7+3)>>>0,this.buf[this.pos++]<128)return q}else for(;K<5;++K){if(this.pos>=this.len)throw Gm(this);if(q.hi=(q.hi|(this.buf[this.pos]&127)<<K*7+3)>>>0,this.buf[this.pos++]<128)return q}throw Error("invalid varint encoding")}fM.prototype.bool=function(){return this.uint32()!==0};function hR8(q,K){return(q[K-4]|q[K-3]<<8|q[K-2]<<16|q[K-1]<<24)>>>0}fM.prototype.fixed32=function(){if(this.pos+4>this.len)throw Gm(this,4);return hR8(this.buf,this.pos+=4)};fM.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Gm(this,4);return hR8(this.buf,this.pos+=4)|0};function sF4(){if(this.pos+8>this.len)throw Gm(this,8);return new tF4(hR8(this.buf,this.pos+=4),hR8(this.buf,this.pos+=4))}fM.prototype.float=function(){if(this.pos+4>this.len)throw Gm(this,4);var K=Zm.float.readFloatLE(this.buf,this.pos);return this.pos+=4,K};fM.prototype.double=function(){if(this.pos+8>this.len)throw Gm(this,4);var K=Zm.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,K};fM.prototype.bytes=function(){var K=this.uint32(),_=this.pos,z=this.pos+K;if(z>this.len)throw Gm(this,K);if(this.pos+=K,Array.isArray(this.buf))return this.buf.slice(_,z);if(_===z){var Y=Zm.Buffer;return Y?Y.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,_,z)};fM.prototype.string=function(){var K=this.bytes();return A0z.read(K,0,K.length)};fM.prototype.skip=function(K){if(typeof K==="number"){if(this.pos+K>this.len)throw Gm(this,K);this.pos+=K}else do if(this.pos>=this.len)throw Gm(this);while(this.buf[this.pos++]&128);return this};fM.prototype.skipType=function(q){switch(q){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:while((q=this.uint32()&7)!==4)this.skipType(q);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+q+" at offset "+this.pos)}return this};fM._configure=function(q){OQ1=q,fM.create=eF4(),OQ1._configure();var K=Zm.Long?"toLong":"toNumber";Zm.merge(fM.prototype,{int64:function(){return AQ1.call(this)[K](!1)},uint64:function(){return AQ1.call(this)[K](!0)},sint64:function(){return AQ1.call(this).zzDecode()[K](!1)},fixed64:function(){return sF4.call(this)[K](!0)},sfixed64:function(){return sF4.call(this)[K](!1)}})}});var YU4=m((yyO,zU4)=>{zU4.exports=w26;var _U4=SR8();(w26.prototype=Object.create(_U4.prototype)).constructor=w26;var KU4=aU();function w26(q){_U4.call(this,q)}w26._configure=function(){if(KU4.Buffer)w26.prototype._slice=KU4.Buffer.prototype.slice};w26.prototype.string=function(){var K=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+K,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+K,this.len))};w26._configure()});var AU4=m((EyO,$U4)=>{$U4.exports=Es6;var wQ1=aU();(Es6.prototype=Object.create(wQ1.EventEmitter.prototype)).constructor=Es6;function Es6(q,K,_){if(typeof q!=="function")throw TypeError("rpcImpl must be a function");wQ1.EventEmitter.call(this),this.rpcImpl=q,this.requestDelimited=Boolean(K),this.responseDelimited=Boolean(_)}Es6.prototype.rpcCall=function q(K,_,z,Y,$){if(!Y)throw TypeError("request must be specified");var A=this;if(!$)return wQ1.asPromise(q,A,K,_,z,Y);if(!A.rpcImpl){setTimeout(function(){$(Error("already ended"))},0);return}try{return A.rpcImpl(K,_[A.requestDelimited?"encodeDelimited":"encode"](Y).finish(),function(w,j){if(w)return A.emit("error",w,K),$(w);if(j===null){A.end(!0);return}if(!(j instanceof z))try{j=z[A.responseDelimited?"decodeDelimited":"decode"](j)}catch(H){return A.emit("error",H,K),$(H)}return A.emit("data",j,K),$(null,j)})}catch(O){A.emit("error",O,K),setTimeout(function(){$(O)},0);return}};Es6.prototype.end=function(K){if(this.rpcImpl){if(!K)this.rpcImpl(null,null,null);this.rpcImpl=null,this.emit("end").off()}return this}});var jQ1=m((OU4)=>{var O0z=OU4;O0z.Service=AU4()});var HQ1=m((RyO,wU4)=>{wU4.exports={}});var JQ1=m((HU4)=>{var BN=HU4;BN.build="minimal";BN.Writer=RR8();BN.BufferWriter=oF4();BN.Reader=SR8();BN.BufferReader=YU4();BN.util=aU();BN.rpc=jQ1();BN.roots=HQ1();BN.configure=jU4;function jU4(){BN.util._configure(),BN.Writer._configure(BN.BufferWriter),BN.Reader._configure(BN.BufferReader)}jU4()});var CR8=m((JU4,MU4)=>{Object.defineProperty(JU4,"__esModule",{value:!0});var T5=JQ1(),D1=T5.Reader,m9=T5.Writer,e6=T5.util,a6=T5.roots.default||(T5.roots.default={});a6.opentelemetry=function(){var q={};return q.proto=function(){var K={};return K.common=function(){var _={};return _.v1=function(){var z={};return z.AnyValue=function(){function Y(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}Y.prototype.stringValue=null,Y.prototype.boolValue=null,Y.prototype.intValue=null,Y.prototype.doubleValue=null,Y.prototype.arrayValue=null,Y.prototype.kvlistValue=null,Y.prototype.bytesValue=null;var $;return Object.defineProperty(Y.prototype,"value",{get:e6.oneOfGetter($=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:e6.oneOfSetter($)}),Y.create=function(O){return new Y(O)},Y.encode=function(O,w){if(!w)w=m9.create();if(O.stringValue!=null&&Object.hasOwnProperty.call(O,"stringValue"))w.uint32(10).string(O.stringValue);if(O.boolValue!=null&&Object.hasOwnProperty.call(O,"boolValue"))w.uint32(16).bool(O.boolValue);if(O.intValue!=null&&Object.hasOwnProperty.call(O,"intValue"))w.uint32(24).int64(O.intValue);if(O.doubleValue!=null&&Object.hasOwnProperty.call(O,"doubleValue"))w.uint32(33).double(O.doubleValue);if(O.arrayValue!=null&&Object.hasOwnProperty.call(O,"arrayValue"))a6.opentelemetry.proto.common.v1.ArrayValue.encode(O.arrayValue,w.uint32(42).fork()).ldelim();if(O.kvlistValue!=null&&Object.hasOwnProperty.call(O,"kvlistValue"))a6.opentelemetry.proto.common.v1.KeyValueList.encode(O.kvlistValue,w.uint32(50).fork()).ldelim();if(O.bytesValue!=null&&Object.hasOwnProperty.call(O,"bytesValue"))w.uint32(58).bytes(O.bytesValue);return w},Y.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},Y.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.common.v1.AnyValue;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.stringValue=O.string();break}case 2:{J.boolValue=O.bool();break}case 3:{J.intValue=O.int64();break}case 4:{J.doubleValue=O.double();break}case 5:{J.arrayValue=a6.opentelemetry.proto.common.v1.ArrayValue.decode(O,O.uint32());break}case 6:{J.kvlistValue=a6.opentelemetry.proto.common.v1.KeyValueList.decode(O,O.uint32());break}case 7:{J.bytesValue=O.bytes();break}default:O.skipType(M&7);break}}return J},Y.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},Y.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";var w={};if(O.stringValue!=null&&O.hasOwnProperty("stringValue")){if(w.value=1,!e6.isString(O.stringValue))return"stringValue: string expected"}if(O.boolValue!=null&&O.hasOwnProperty("boolValue")){if(w.value===1)return"value: multiple values";if(w.value=1,typeof O.boolValue!=="boolean")return"boolValue: boolean expected"}if(O.intValue!=null&&O.hasOwnProperty("intValue")){if(w.value===1)return"value: multiple values";if(w.value=1,!e6.isInteger(O.intValue)&&!(O.intValue&&e6.isInteger(O.intValue.low)&&e6.isInteger(O.intValue.high)))return"intValue: integer|Long expected"}if(O.doubleValue!=null&&O.hasOwnProperty("doubleValue")){if(w.value===1)return"value: multiple values";if(w.value=1,typeof O.doubleValue!=="number")return"doubleValue: number expected"}if(O.arrayValue!=null&&O.hasOwnProperty("arrayValue")){if(w.value===1)return"value: multiple values";w.value=1;{var j=a6.opentelemetry.proto.common.v1.ArrayValue.verify(O.arrayValue);if(j)return"arrayValue."+j}}if(O.kvlistValue!=null&&O.hasOwnProperty("kvlistValue")){if(w.value===1)return"value: multiple values";w.value=1;{var j=a6.opentelemetry.proto.common.v1.KeyValueList.verify(O.kvlistValue);if(j)return"kvlistValue."+j}}if(O.bytesValue!=null&&O.hasOwnProperty("bytesValue")){if(w.value===1)return"value: multiple values";if(w.value=1,!(O.bytesValue&&typeof O.bytesValue.length==="number"||e6.isString(O.bytesValue)))return"bytesValue: buffer expected"}return null},Y.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.common.v1.AnyValue)return O;var w=new a6.opentelemetry.proto.common.v1.AnyValue;if(O.stringValue!=null)w.stringValue=String(O.stringValue);if(O.boolValue!=null)w.boolValue=Boolean(O.boolValue);if(O.intValue!=null){if(e6.Long)(w.intValue=e6.Long.fromValue(O.intValue)).unsigned=!1;else if(typeof O.intValue==="string")w.intValue=parseInt(O.intValue,10);else if(typeof O.intValue==="number")w.intValue=O.intValue;else if(typeof O.intValue==="object")w.intValue=new e6.LongBits(O.intValue.low>>>0,O.intValue.high>>>0).toNumber()}if(O.doubleValue!=null)w.doubleValue=Number(O.doubleValue);if(O.arrayValue!=null){if(typeof O.arrayValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");w.arrayValue=a6.opentelemetry.proto.common.v1.ArrayValue.fromObject(O.arrayValue)}if(O.kvlistValue!=null){if(typeof O.kvlistValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");w.kvlistValue=a6.opentelemetry.proto.common.v1.KeyValueList.fromObject(O.kvlistValue)}if(O.bytesValue!=null){if(typeof O.bytesValue==="string")e6.base64.decode(O.bytesValue,w.bytesValue=e6.newBuffer(e6.base64.length(O.bytesValue)),0);else if(O.bytesValue.length>=0)w.bytesValue=O.bytesValue}return w},Y.toObject=function(O,w){if(!w)w={};var j={};if(O.stringValue!=null&&O.hasOwnProperty("stringValue")){if(j.stringValue=O.stringValue,w.oneofs)j.value="stringValue"}if(O.boolValue!=null&&O.hasOwnProperty("boolValue")){if(j.boolValue=O.boolValue,w.oneofs)j.value="boolValue"}if(O.intValue!=null&&O.hasOwnProperty("intValue")){if(typeof O.intValue==="number")j.intValue=w.longs===String?String(O.intValue):O.intValue;else j.intValue=w.longs===String?e6.Long.prototype.toString.call(O.intValue):w.longs===Number?new e6.LongBits(O.intValue.low>>>0,O.intValue.high>>>0).toNumber():O.intValue;if(w.oneofs)j.value="intValue"}if(O.doubleValue!=null&&O.hasOwnProperty("doubleValue")){if(j.doubleValue=w.json&&!isFinite(O.doubleValue)?String(O.doubleValue):O.doubleValue,w.oneofs)j.value="doubleValue"}if(O.arrayValue!=null&&O.hasOwnProperty("arrayValue")){if(j.arrayValue=a6.opentelemetry.proto.common.v1.ArrayValue.toObject(O.arrayValue,w),w.oneofs)j.value="arrayValue"}if(O.kvlistValue!=null&&O.hasOwnProperty("kvlistValue")){if(j.kvlistValue=a6.opentelemetry.proto.common.v1.KeyValueList.toObject(O.kvlistValue,w),w.oneofs)j.value="kvlistValue"}if(O.bytesValue!=null&&O.hasOwnProperty("bytesValue")){if(j.bytesValue=w.bytes===String?e6.base64.encode(O.bytesValue,0,O.bytesValue.length):w.bytes===Array?Array.prototype.slice.call(O.bytesValue):O.bytesValue,w.oneofs)j.value="bytesValue"}return j},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.common.v1.AnyValue"},Y}(),z.ArrayValue=function(){function Y($){if(this.values=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.values=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.values!=null&&A.values.length)for(var w=0;w<A.values.length;++w)a6.opentelemetry.proto.common.v1.AnyValue.encode(A.values[w],O.uint32(10).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.common.v1.ArrayValue;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.values&&H.values.length))H.values=[];H.values.push(a6.opentelemetry.proto.common.v1.AnyValue.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.values!=null&&A.hasOwnProperty("values")){if(!Array.isArray(A.values))return"values: array expected";for(var O=0;O<A.values.length;++O){var w=a6.opentelemetry.proto.common.v1.AnyValue.verify(A.values[O]);if(w)return"values."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.common.v1.ArrayValue)return A;var O=new a6.opentelemetry.proto.common.v1.ArrayValue;if(A.values){if(!Array.isArray(A.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");O.values=[];for(var w=0;w<A.values.length;++w){if(typeof A.values[w]!=="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");O.values[w]=a6.opentelemetry.proto.common.v1.AnyValue.fromObject(A.values[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.values=[];if(A.values&&A.values.length){w.values=[];for(var j=0;j<A.values.length;++j)w.values[j]=a6.opentelemetry.proto.common.v1.AnyValue.toObject(A.values[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.common.v1.ArrayValue"},Y}(),z.KeyValueList=function(){function Y($){if(this.values=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.values=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.values!=null&&A.values.length)for(var w=0;w<A.values.length;++w)a6.opentelemetry.proto.common.v1.KeyValue.encode(A.values[w],O.uint32(10).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.common.v1.KeyValueList;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.values&&H.values.length))H.values=[];H.values.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.values!=null&&A.hasOwnProperty("values")){if(!Array.isArray(A.values))return"values: array expected";for(var O=0;O<A.values.length;++O){var w=a6.opentelemetry.proto.common.v1.KeyValue.verify(A.values[O]);if(w)return"values."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.common.v1.KeyValueList)return A;var O=new a6.opentelemetry.proto.common.v1.KeyValueList;if(A.values){if(!Array.isArray(A.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");O.values=[];for(var w=0;w<A.values.length;++w){if(typeof A.values[w]!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");O.values[w]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(A.values[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.values=[];if(A.values&&A.values.length){w.values=[];for(var j=0;j<A.values.length;++j)w.values[j]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(A.values[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.common.v1.KeyValueList"},Y}(),z.KeyValue=function(){function Y($){if($){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.key=null,Y.prototype.value=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.key!=null&&Object.hasOwnProperty.call(A,"key"))O.uint32(10).string(A.key);if(A.value!=null&&Object.hasOwnProperty.call(A,"value"))a6.opentelemetry.proto.common.v1.AnyValue.encode(A.value,O.uint32(18).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.common.v1.KeyValue;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.key=A.string();break}case 2:{H.value=a6.opentelemetry.proto.common.v1.AnyValue.decode(A,A.uint32());break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.key!=null&&A.hasOwnProperty("key")){if(!e6.isString(A.key))return"key: string expected"}if(A.value!=null&&A.hasOwnProperty("value")){var O=a6.opentelemetry.proto.common.v1.AnyValue.verify(A.value);if(O)return"value."+O}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.common.v1.KeyValue)return A;var O=new a6.opentelemetry.proto.common.v1.KeyValue;if(A.key!=null)O.key=String(A.key);if(A.value!=null){if(typeof A.value!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");O.value=a6.opentelemetry.proto.common.v1.AnyValue.fromObject(A.value)}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.defaults)w.key="",w.value=null;if(A.key!=null&&A.hasOwnProperty("key"))w.key=A.key;if(A.value!=null&&A.hasOwnProperty("value"))w.value=a6.opentelemetry.proto.common.v1.AnyValue.toObject(A.value,O);return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.common.v1.KeyValue"},Y}(),z.InstrumentationScope=function(){function Y($){if(this.attributes=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.name=null,Y.prototype.version=null,Y.prototype.attributes=e6.emptyArray,Y.prototype.droppedAttributesCount=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.name!=null&&Object.hasOwnProperty.call(A,"name"))O.uint32(10).string(A.name);if(A.version!=null&&Object.hasOwnProperty.call(A,"version"))O.uint32(18).string(A.version);if(A.attributes!=null&&A.attributes.length)for(var w=0;w<A.attributes.length;++w)a6.opentelemetry.proto.common.v1.KeyValue.encode(A.attributes[w],O.uint32(26).fork()).ldelim();if(A.droppedAttributesCount!=null&&Object.hasOwnProperty.call(A,"droppedAttributesCount"))O.uint32(32).uint32(A.droppedAttributesCount);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.common.v1.InstrumentationScope;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.name=A.string();break}case 2:{H.version=A.string();break}case 3:{if(!(H.attributes&&H.attributes.length))H.attributes=[];H.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(A,A.uint32()));break}case 4:{H.droppedAttributesCount=A.uint32();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.name!=null&&A.hasOwnProperty("name")){if(!e6.isString(A.name))return"name: string expected"}if(A.version!=null&&A.hasOwnProperty("version")){if(!e6.isString(A.version))return"version: string expected"}if(A.attributes!=null&&A.hasOwnProperty("attributes")){if(!Array.isArray(A.attributes))return"attributes: array expected";for(var O=0;O<A.attributes.length;++O){var w=a6.opentelemetry.proto.common.v1.KeyValue.verify(A.attributes[O]);if(w)return"attributes."+w}}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount")){if(!e6.isInteger(A.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.common.v1.InstrumentationScope)return A;var O=new a6.opentelemetry.proto.common.v1.InstrumentationScope;if(A.name!=null)O.name=String(A.name);if(A.version!=null)O.version=String(A.version);if(A.attributes){if(!Array.isArray(A.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");O.attributes=[];for(var w=0;w<A.attributes.length;++w){if(typeof A.attributes[w]!=="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");O.attributes[w]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(A.attributes[w])}}if(A.droppedAttributesCount!=null)O.droppedAttributesCount=A.droppedAttributesCount>>>0;return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.attributes=[];if(O.defaults)w.name="",w.version="",w.droppedAttributesCount=0;if(A.name!=null&&A.hasOwnProperty("name"))w.name=A.name;if(A.version!=null&&A.hasOwnProperty("version"))w.version=A.version;if(A.attributes&&A.attributes.length){w.attributes=[];for(var j=0;j<A.attributes.length;++j)w.attributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(A.attributes[j],O)}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount"))w.droppedAttributesCount=A.droppedAttributesCount;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.common.v1.InstrumentationScope"},Y}(),z.EntityRef=function(){function Y($){if(this.idKeys=[],this.descriptionKeys=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.schemaUrl=null,Y.prototype.type=null,Y.prototype.idKeys=e6.emptyArray,Y.prototype.descriptionKeys=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.schemaUrl!=null&&Object.hasOwnProperty.call(A,"schemaUrl"))O.uint32(10).string(A.schemaUrl);if(A.type!=null&&Object.hasOwnProperty.call(A,"type"))O.uint32(18).string(A.type);if(A.idKeys!=null&&A.idKeys.length)for(var w=0;w<A.idKeys.length;++w)O.uint32(26).string(A.idKeys[w]);if(A.descriptionKeys!=null&&A.descriptionKeys.length)for(var w=0;w<A.descriptionKeys.length;++w)O.uint32(34).string(A.descriptionKeys[w]);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.common.v1.EntityRef;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.schemaUrl=A.string();break}case 2:{H.type=A.string();break}case 3:{if(!(H.idKeys&&H.idKeys.length))H.idKeys=[];H.idKeys.push(A.string());break}case 4:{if(!(H.descriptionKeys&&H.descriptionKeys.length))H.descriptionKeys=[];H.descriptionKeys.push(A.string());break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl")){if(!e6.isString(A.schemaUrl))return"schemaUrl: string expected"}if(A.type!=null&&A.hasOwnProperty("type")){if(!e6.isString(A.type))return"type: string expected"}if(A.idKeys!=null&&A.hasOwnProperty("idKeys")){if(!Array.isArray(A.idKeys))return"idKeys: array expected";for(var O=0;O<A.idKeys.length;++O)if(!e6.isString(A.idKeys[O]))return"idKeys: string[] expected"}if(A.descriptionKeys!=null&&A.hasOwnProperty("descriptionKeys")){if(!Array.isArray(A.descriptionKeys))return"descriptionKeys: array expected";for(var O=0;O<A.descriptionKeys.length;++O)if(!e6.isString(A.descriptionKeys[O]))return"descriptionKeys: string[] expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.common.v1.EntityRef)return A;var O=new a6.opentelemetry.proto.common.v1.EntityRef;if(A.schemaUrl!=null)O.schemaUrl=String(A.schemaUrl);if(A.type!=null)O.type=String(A.type);if(A.idKeys){if(!Array.isArray(A.idKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.idKeys: array expected");O.idKeys=[];for(var w=0;w<A.idKeys.length;++w)O.idKeys[w]=String(A.idKeys[w])}if(A.descriptionKeys){if(!Array.isArray(A.descriptionKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.descriptionKeys: array expected");O.descriptionKeys=[];for(var w=0;w<A.descriptionKeys.length;++w)O.descriptionKeys[w]=String(A.descriptionKeys[w])}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.idKeys=[],w.descriptionKeys=[];if(O.defaults)w.schemaUrl="",w.type="";if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl"))w.schemaUrl=A.schemaUrl;if(A.type!=null&&A.hasOwnProperty("type"))w.type=A.type;if(A.idKeys&&A.idKeys.length){w.idKeys=[];for(var j=0;j<A.idKeys.length;++j)w.idKeys[j]=A.idKeys[j]}if(A.descriptionKeys&&A.descriptionKeys.length){w.descriptionKeys=[];for(var j=0;j<A.descriptionKeys.length;++j)w.descriptionKeys[j]=A.descriptionKeys[j]}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.common.v1.EntityRef"},Y}(),z}(),_}(),K.resource=function(){var _={};return _.v1=function(){var z={};return z.Resource=function(){function Y($){if(this.attributes=[],this.entityRefs=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.attributes=e6.emptyArray,Y.prototype.droppedAttributesCount=null,Y.prototype.entityRefs=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.attributes!=null&&A.attributes.length)for(var w=0;w<A.attributes.length;++w)a6.opentelemetry.proto.common.v1.KeyValue.encode(A.attributes[w],O.uint32(10).fork()).ldelim();if(A.droppedAttributesCount!=null&&Object.hasOwnProperty.call(A,"droppedAttributesCount"))O.uint32(16).uint32(A.droppedAttributesCount);if(A.entityRefs!=null&&A.entityRefs.length)for(var w=0;w<A.entityRefs.length;++w)a6.opentelemetry.proto.common.v1.EntityRef.encode(A.entityRefs[w],O.uint32(26).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.resource.v1.Resource;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.attributes&&H.attributes.length))H.attributes=[];H.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(A,A.uint32()));break}case 2:{H.droppedAttributesCount=A.uint32();break}case 3:{if(!(H.entityRefs&&H.entityRefs.length))H.entityRefs=[];H.entityRefs.push(a6.opentelemetry.proto.common.v1.EntityRef.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.attributes!=null&&A.hasOwnProperty("attributes")){if(!Array.isArray(A.attributes))return"attributes: array expected";for(var O=0;O<A.attributes.length;++O){var w=a6.opentelemetry.proto.common.v1.KeyValue.verify(A.attributes[O]);if(w)return"attributes."+w}}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount")){if(!e6.isInteger(A.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(A.entityRefs!=null&&A.hasOwnProperty("entityRefs")){if(!Array.isArray(A.entityRefs))return"entityRefs: array expected";for(var O=0;O<A.entityRefs.length;++O){var w=a6.opentelemetry.proto.common.v1.EntityRef.verify(A.entityRefs[O]);if(w)return"entityRefs."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.resource.v1.Resource)return A;var O=new a6.opentelemetry.proto.resource.v1.Resource;if(A.attributes){if(!Array.isArray(A.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");O.attributes=[];for(var w=0;w<A.attributes.length;++w){if(typeof A.attributes[w]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");O.attributes[w]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(A.attributes[w])}}if(A.droppedAttributesCount!=null)O.droppedAttributesCount=A.droppedAttributesCount>>>0;if(A.entityRefs){if(!Array.isArray(A.entityRefs))throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: array expected");O.entityRefs=[];for(var w=0;w<A.entityRefs.length;++w){if(typeof A.entityRefs[w]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: object expected");O.entityRefs[w]=a6.opentelemetry.proto.common.v1.EntityRef.fromObject(A.entityRefs[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.attributes=[],w.entityRefs=[];if(O.defaults)w.droppedAttributesCount=0;if(A.attributes&&A.attributes.length){w.attributes=[];for(var j=0;j<A.attributes.length;++j)w.attributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(A.attributes[j],O)}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount"))w.droppedAttributesCount=A.droppedAttributesCount;if(A.entityRefs&&A.entityRefs.length){w.entityRefs=[];for(var j=0;j<A.entityRefs.length;++j)w.entityRefs[j]=a6.opentelemetry.proto.common.v1.EntityRef.toObject(A.entityRefs[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.resource.v1.Resource"},Y}(),z}(),_}(),K.trace=function(){var _={};return _.v1=function(){var z={};return z.TracesData=function(){function Y($){if(this.resourceSpans=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.resourceSpans=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.resourceSpans!=null&&A.resourceSpans.length)for(var w=0;w<A.resourceSpans.length;++w)a6.opentelemetry.proto.trace.v1.ResourceSpans.encode(A.resourceSpans[w],O.uint32(10).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.trace.v1.TracesData;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.resourceSpans&&H.resourceSpans.length))H.resourceSpans=[];H.resourceSpans.push(a6.opentelemetry.proto.trace.v1.ResourceSpans.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.resourceSpans!=null&&A.hasOwnProperty("resourceSpans")){if(!Array.isArray(A.resourceSpans))return"resourceSpans: array expected";for(var O=0;O<A.resourceSpans.length;++O){var w=a6.opentelemetry.proto.trace.v1.ResourceSpans.verify(A.resourceSpans[O]);if(w)return"resourceSpans."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.trace.v1.TracesData)return A;var O=new a6.opentelemetry.proto.trace.v1.TracesData;if(A.resourceSpans){if(!Array.isArray(A.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");O.resourceSpans=[];for(var w=0;w<A.resourceSpans.length;++w){if(typeof A.resourceSpans[w]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");O.resourceSpans[w]=a6.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(A.resourceSpans[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.resourceSpans=[];if(A.resourceSpans&&A.resourceSpans.length){w.resourceSpans=[];for(var j=0;j<A.resourceSpans.length;++j)w.resourceSpans[j]=a6.opentelemetry.proto.trace.v1.ResourceSpans.toObject(A.resourceSpans[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.trace.v1.TracesData"},Y}(),z.ResourceSpans=function(){function Y($){if(this.scopeSpans=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.resource=null,Y.prototype.scopeSpans=e6.emptyArray,Y.prototype.schemaUrl=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.resource!=null&&Object.hasOwnProperty.call(A,"resource"))a6.opentelemetry.proto.resource.v1.Resource.encode(A.resource,O.uint32(10).fork()).ldelim();if(A.scopeSpans!=null&&A.scopeSpans.length)for(var w=0;w<A.scopeSpans.length;++w)a6.opentelemetry.proto.trace.v1.ScopeSpans.encode(A.scopeSpans[w],O.uint32(18).fork()).ldelim();if(A.schemaUrl!=null&&Object.hasOwnProperty.call(A,"schemaUrl"))O.uint32(26).string(A.schemaUrl);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.trace.v1.ResourceSpans;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.resource=a6.opentelemetry.proto.resource.v1.Resource.decode(A,A.uint32());break}case 2:{if(!(H.scopeSpans&&H.scopeSpans.length))H.scopeSpans=[];H.scopeSpans.push(a6.opentelemetry.proto.trace.v1.ScopeSpans.decode(A,A.uint32()));break}case 3:{H.schemaUrl=A.string();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.resource!=null&&A.hasOwnProperty("resource")){var O=a6.opentelemetry.proto.resource.v1.Resource.verify(A.resource);if(O)return"resource."+O}if(A.scopeSpans!=null&&A.hasOwnProperty("scopeSpans")){if(!Array.isArray(A.scopeSpans))return"scopeSpans: array expected";for(var w=0;w<A.scopeSpans.length;++w){var O=a6.opentelemetry.proto.trace.v1.ScopeSpans.verify(A.scopeSpans[w]);if(O)return"scopeSpans."+O}}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl")){if(!e6.isString(A.schemaUrl))return"schemaUrl: string expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.trace.v1.ResourceSpans)return A;var O=new a6.opentelemetry.proto.trace.v1.ResourceSpans;if(A.resource!=null){if(typeof A.resource!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");O.resource=a6.opentelemetry.proto.resource.v1.Resource.fromObject(A.resource)}if(A.scopeSpans){if(!Array.isArray(A.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");O.scopeSpans=[];for(var w=0;w<A.scopeSpans.length;++w){if(typeof A.scopeSpans[w]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");O.scopeSpans[w]=a6.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(A.scopeSpans[w])}}if(A.schemaUrl!=null)O.schemaUrl=String(A.schemaUrl);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.scopeSpans=[];if(O.defaults)w.resource=null,w.schemaUrl="";if(A.resource!=null&&A.hasOwnProperty("resource"))w.resource=a6.opentelemetry.proto.resource.v1.Resource.toObject(A.resource,O);if(A.scopeSpans&&A.scopeSpans.length){w.scopeSpans=[];for(var j=0;j<A.scopeSpans.length;++j)w.scopeSpans[j]=a6.opentelemetry.proto.trace.v1.ScopeSpans.toObject(A.scopeSpans[j],O)}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl"))w.schemaUrl=A.schemaUrl;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.trace.v1.ResourceSpans"},Y}(),z.ScopeSpans=function(){function Y($){if(this.spans=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.scope=null,Y.prototype.spans=e6.emptyArray,Y.prototype.schemaUrl=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.scope!=null&&Object.hasOwnProperty.call(A,"scope"))a6.opentelemetry.proto.common.v1.InstrumentationScope.encode(A.scope,O.uint32(10).fork()).ldelim();if(A.spans!=null&&A.spans.length)for(var w=0;w<A.spans.length;++w)a6.opentelemetry.proto.trace.v1.Span.encode(A.spans[w],O.uint32(18).fork()).ldelim();if(A.schemaUrl!=null&&Object.hasOwnProperty.call(A,"schemaUrl"))O.uint32(26).string(A.schemaUrl);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.trace.v1.ScopeSpans;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.decode(A,A.uint32());break}case 2:{if(!(H.spans&&H.spans.length))H.spans=[];H.spans.push(a6.opentelemetry.proto.trace.v1.Span.decode(A,A.uint32()));break}case 3:{H.schemaUrl=A.string();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.scope!=null&&A.hasOwnProperty("scope")){var O=a6.opentelemetry.proto.common.v1.InstrumentationScope.verify(A.scope);if(O)return"scope."+O}if(A.spans!=null&&A.hasOwnProperty("spans")){if(!Array.isArray(A.spans))return"spans: array expected";for(var w=0;w<A.spans.length;++w){var O=a6.opentelemetry.proto.trace.v1.Span.verify(A.spans[w]);if(O)return"spans."+O}}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl")){if(!e6.isString(A.schemaUrl))return"schemaUrl: string expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.trace.v1.ScopeSpans)return A;var O=new a6.opentelemetry.proto.trace.v1.ScopeSpans;if(A.scope!=null){if(typeof A.scope!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");O.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(A.scope)}if(A.spans){if(!Array.isArray(A.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");O.spans=[];for(var w=0;w<A.spans.length;++w){if(typeof A.spans[w]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");O.spans[w]=a6.opentelemetry.proto.trace.v1.Span.fromObject(A.spans[w])}}if(A.schemaUrl!=null)O.schemaUrl=String(A.schemaUrl);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.spans=[];if(O.defaults)w.scope=null,w.schemaUrl="";if(A.scope!=null&&A.hasOwnProperty("scope"))w.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.toObject(A.scope,O);if(A.spans&&A.spans.length){w.spans=[];for(var j=0;j<A.spans.length;++j)w.spans[j]=a6.opentelemetry.proto.trace.v1.Span.toObject(A.spans[j],O)}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl"))w.schemaUrl=A.schemaUrl;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.trace.v1.ScopeSpans"},Y}(),z.Span=function(){function Y($){if(this.attributes=[],this.events=[],this.links=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.traceId=null,Y.prototype.spanId=null,Y.prototype.traceState=null,Y.prototype.parentSpanId=null,Y.prototype.flags=null,Y.prototype.name=null,Y.prototype.kind=null,Y.prototype.startTimeUnixNano=null,Y.prototype.endTimeUnixNano=null,Y.prototype.attributes=e6.emptyArray,Y.prototype.droppedAttributesCount=null,Y.prototype.events=e6.emptyArray,Y.prototype.droppedEventsCount=null,Y.prototype.links=e6.emptyArray,Y.prototype.droppedLinksCount=null,Y.prototype.status=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.traceId!=null&&Object.hasOwnProperty.call(A,"traceId"))O.uint32(10).bytes(A.traceId);if(A.spanId!=null&&Object.hasOwnProperty.call(A,"spanId"))O.uint32(18).bytes(A.spanId);if(A.traceState!=null&&Object.hasOwnProperty.call(A,"traceState"))O.uint32(26).string(A.traceState);if(A.parentSpanId!=null&&Object.hasOwnProperty.call(A,"parentSpanId"))O.uint32(34).bytes(A.parentSpanId);if(A.name!=null&&Object.hasOwnProperty.call(A,"name"))O.uint32(42).string(A.name);if(A.kind!=null&&Object.hasOwnProperty.call(A,"kind"))O.uint32(48).int32(A.kind);if(A.startTimeUnixNano!=null&&Object.hasOwnProperty.call(A,"startTimeUnixNano"))O.uint32(57).fixed64(A.startTimeUnixNano);if(A.endTimeUnixNano!=null&&Object.hasOwnProperty.call(A,"endTimeUnixNano"))O.uint32(65).fixed64(A.endTimeUnixNano);if(A.attributes!=null&&A.attributes.length)for(var w=0;w<A.attributes.length;++w)a6.opentelemetry.proto.common.v1.KeyValue.encode(A.attributes[w],O.uint32(74).fork()).ldelim();if(A.droppedAttributesCount!=null&&Object.hasOwnProperty.call(A,"droppedAttributesCount"))O.uint32(80).uint32(A.droppedAttributesCount);if(A.events!=null&&A.events.length)for(var w=0;w<A.events.length;++w)a6.opentelemetry.proto.trace.v1.Span.Event.encode(A.events[w],O.uint32(90).fork()).ldelim();if(A.droppedEventsCount!=null&&Object.hasOwnProperty.call(A,"droppedEventsCount"))O.uint32(96).uint32(A.droppedEventsCount);if(A.links!=null&&A.links.length)for(var w=0;w<A.links.length;++w)a6.opentelemetry.proto.trace.v1.Span.Link.encode(A.links[w],O.uint32(106).fork()).ldelim();if(A.droppedLinksCount!=null&&Object.hasOwnProperty.call(A,"droppedLinksCount"))O.uint32(112).uint32(A.droppedLinksCount);if(A.status!=null&&Object.hasOwnProperty.call(A,"status"))a6.opentelemetry.proto.trace.v1.Status.encode(A.status,O.uint32(122).fork()).ldelim();if(A.flags!=null&&Object.hasOwnProperty.call(A,"flags"))O.uint32(133).fixed32(A.flags);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.trace.v1.Span;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.traceId=A.bytes();break}case 2:{H.spanId=A.bytes();break}case 3:{H.traceState=A.string();break}case 4:{H.parentSpanId=A.bytes();break}case 16:{H.flags=A.fixed32();break}case 5:{H.name=A.string();break}case 6:{H.kind=A.int32();break}case 7:{H.startTimeUnixNano=A.fixed64();break}case 8:{H.endTimeUnixNano=A.fixed64();break}case 9:{if(!(H.attributes&&H.attributes.length))H.attributes=[];H.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(A,A.uint32()));break}case 10:{H.droppedAttributesCount=A.uint32();break}case 11:{if(!(H.events&&H.events.length))H.events=[];H.events.push(a6.opentelemetry.proto.trace.v1.Span.Event.decode(A,A.uint32()));break}case 12:{H.droppedEventsCount=A.uint32();break}case 13:{if(!(H.links&&H.links.length))H.links=[];H.links.push(a6.opentelemetry.proto.trace.v1.Span.Link.decode(A,A.uint32()));break}case 14:{H.droppedLinksCount=A.uint32();break}case 15:{H.status=a6.opentelemetry.proto.trace.v1.Status.decode(A,A.uint32());break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.traceId!=null&&A.hasOwnProperty("traceId")){if(!(A.traceId&&typeof A.traceId.length==="number"||e6.isString(A.traceId)))return"traceId: buffer expected"}if(A.spanId!=null&&A.hasOwnProperty("spanId")){if(!(A.spanId&&typeof A.spanId.length==="number"||e6.isString(A.spanId)))return"spanId: buffer expected"}if(A.traceState!=null&&A.hasOwnProperty("traceState")){if(!e6.isString(A.traceState))return"traceState: string expected"}if(A.parentSpanId!=null&&A.hasOwnProperty("parentSpanId")){if(!(A.parentSpanId&&typeof A.parentSpanId.length==="number"||e6.isString(A.parentSpanId)))return"parentSpanId: buffer expected"}if(A.flags!=null&&A.hasOwnProperty("flags")){if(!e6.isInteger(A.flags))return"flags: integer expected"}if(A.name!=null&&A.hasOwnProperty("name")){if(!e6.isString(A.name))return"name: string expected"}if(A.kind!=null&&A.hasOwnProperty("kind"))switch(A.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(A.startTimeUnixNano!=null&&A.hasOwnProperty("startTimeUnixNano")){if(!e6.isInteger(A.startTimeUnixNano)&&!(A.startTimeUnixNano&&e6.isInteger(A.startTimeUnixNano.low)&&e6.isInteger(A.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(A.endTimeUnixNano!=null&&A.hasOwnProperty("endTimeUnixNano")){if(!e6.isInteger(A.endTimeUnixNano)&&!(A.endTimeUnixNano&&e6.isInteger(A.endTimeUnixNano.low)&&e6.isInteger(A.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected"}if(A.attributes!=null&&A.hasOwnProperty("attributes")){if(!Array.isArray(A.attributes))return"attributes: array expected";for(var O=0;O<A.attributes.length;++O){var w=a6.opentelemetry.proto.common.v1.KeyValue.verify(A.attributes[O]);if(w)return"attributes."+w}}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount")){if(!e6.isInteger(A.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(A.events!=null&&A.hasOwnProperty("events")){if(!Array.isArray(A.events))return"events: array expected";for(var O=0;O<A.events.length;++O){var w=a6.opentelemetry.proto.trace.v1.Span.Event.verify(A.events[O]);if(w)return"events."+w}}if(A.droppedEventsCount!=null&&A.hasOwnProperty("droppedEventsCount")){if(!e6.isInteger(A.droppedEventsCount))return"droppedEventsCount: integer expected"}if(A.links!=null&&A.hasOwnProperty("links")){if(!Array.isArray(A.links))return"links: array expected";for(var O=0;O<A.links.length;++O){var w=a6.opentelemetry.proto.trace.v1.Span.Link.verify(A.links[O]);if(w)return"links."+w}}if(A.droppedLinksCount!=null&&A.hasOwnProperty("droppedLinksCount")){if(!e6.isInteger(A.droppedLinksCount))return"droppedLinksCount: integer expected"}if(A.status!=null&&A.hasOwnProperty("status")){var w=a6.opentelemetry.proto.trace.v1.Status.verify(A.status);if(w)return"status."+w}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.trace.v1.Span)return A;var O=new a6.opentelemetry.proto.trace.v1.Span;if(A.traceId!=null){if(typeof A.traceId==="string")e6.base64.decode(A.traceId,O.traceId=e6.newBuffer(e6.base64.length(A.traceId)),0);else if(A.traceId.length>=0)O.traceId=A.traceId}if(A.spanId!=null){if(typeof A.spanId==="string")e6.base64.decode(A.spanId,O.spanId=e6.newBuffer(e6.base64.length(A.spanId)),0);else if(A.spanId.length>=0)O.spanId=A.spanId}if(A.traceState!=null)O.traceState=String(A.traceState);if(A.parentSpanId!=null){if(typeof A.parentSpanId==="string")e6.base64.decode(A.parentSpanId,O.parentSpanId=e6.newBuffer(e6.base64.length(A.parentSpanId)),0);else if(A.parentSpanId.length>=0)O.parentSpanId=A.parentSpanId}if(A.flags!=null)O.flags=A.flags>>>0;if(A.name!=null)O.name=String(A.name);switch(A.kind){default:if(typeof A.kind==="number"){O.kind=A.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:O.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:O.kind=1;break;case"SPAN_KIND_SERVER":case 2:O.kind=2;break;case"SPAN_KIND_CLIENT":case 3:O.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:O.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:O.kind=5;break}if(A.startTimeUnixNano!=null){if(e6.Long)(O.startTimeUnixNano=e6.Long.fromValue(A.startTimeUnixNano)).unsigned=!1;else if(typeof A.startTimeUnixNano==="string")O.startTimeUnixNano=parseInt(A.startTimeUnixNano,10);else if(typeof A.startTimeUnixNano==="number")O.startTimeUnixNano=A.startTimeUnixNano;else if(typeof A.startTimeUnixNano==="object")O.startTimeUnixNano=new e6.LongBits(A.startTimeUnixNano.low>>>0,A.startTimeUnixNano.high>>>0).toNumber()}if(A.endTimeUnixNano!=null){if(e6.Long)(O.endTimeUnixNano=e6.Long.fromValue(A.endTimeUnixNano)).unsigned=!1;else if(typeof A.endTimeUnixNano==="string")O.endTimeUnixNano=parseInt(A.endTimeUnixNano,10);else if(typeof A.endTimeUnixNano==="number")O.endTimeUnixNano=A.endTimeUnixNano;else if(typeof A.endTimeUnixNano==="object")O.endTimeUnixNano=new e6.LongBits(A.endTimeUnixNano.low>>>0,A.endTimeUnixNano.high>>>0).toNumber()}if(A.attributes){if(!Array.isArray(A.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");O.attributes=[];for(var w=0;w<A.attributes.length;++w){if(typeof A.attributes[w]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");O.attributes[w]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(A.attributes[w])}}if(A.droppedAttributesCount!=null)O.droppedAttributesCount=A.droppedAttributesCount>>>0;if(A.events){if(!Array.isArray(A.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");O.events=[];for(var w=0;w<A.events.length;++w){if(typeof A.events[w]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");O.events[w]=a6.opentelemetry.proto.trace.v1.Span.Event.fromObject(A.events[w])}}if(A.droppedEventsCount!=null)O.droppedEventsCount=A.droppedEventsCount>>>0;if(A.links){if(!Array.isArray(A.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");O.links=[];for(var w=0;w<A.links.length;++w){if(typeof A.links[w]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");O.links[w]=a6.opentelemetry.proto.trace.v1.Span.Link.fromObject(A.links[w])}}if(A.droppedLinksCount!=null)O.droppedLinksCount=A.droppedLinksCount>>>0;if(A.status!=null){if(typeof A.status!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");O.status=a6.opentelemetry.proto.trace.v1.Status.fromObject(A.status)}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.attributes=[],w.events=[],w.links=[];if(O.defaults){if(O.bytes===String)w.traceId="";else if(w.traceId=[],O.bytes!==Array)w.traceId=e6.newBuffer(w.traceId);if(O.bytes===String)w.spanId="";else if(w.spanId=[],O.bytes!==Array)w.spanId=e6.newBuffer(w.spanId);if(w.traceState="",O.bytes===String)w.parentSpanId="";else if(w.parentSpanId=[],O.bytes!==Array)w.parentSpanId=e6.newBuffer(w.parentSpanId);if(w.name="",w.kind=O.enums===String?"SPAN_KIND_UNSPECIFIED":0,e6.Long){var j=new e6.Long(0,0,!1);w.startTimeUnixNano=O.longs===String?j.toString():O.longs===Number?j.toNumber():j}else w.startTimeUnixNano=O.longs===String?"0":0;if(e6.Long){var j=new e6.Long(0,0,!1);w.endTimeUnixNano=O.longs===String?j.toString():O.longs===Number?j.toNumber():j}else w.endTimeUnixNano=O.longs===String?"0":0;w.droppedAttributesCount=0,w.droppedEventsCount=0,w.droppedLinksCount=0,w.status=null,w.flags=0}if(A.traceId!=null&&A.hasOwnProperty("traceId"))w.traceId=O.bytes===String?e6.base64.encode(A.traceId,0,A.traceId.length):O.bytes===Array?Array.prototype.slice.call(A.traceId):A.traceId;if(A.spanId!=null&&A.hasOwnProperty("spanId"))w.spanId=O.bytes===String?e6.base64.encode(A.spanId,0,A.spanId.length):O.bytes===Array?Array.prototype.slice.call(A.spanId):A.spanId;if(A.traceState!=null&&A.hasOwnProperty("traceState"))w.traceState=A.traceState;if(A.parentSpanId!=null&&A.hasOwnProperty("parentSpanId"))w.parentSpanId=O.bytes===String?e6.base64.encode(A.parentSpanId,0,A.parentSpanId.length):O.bytes===Array?Array.prototype.slice.call(A.parentSpanId):A.parentSpanId;if(A.name!=null&&A.hasOwnProperty("name"))w.name=A.name;if(A.kind!=null&&A.hasOwnProperty("kind"))w.kind=O.enums===String?a6.opentelemetry.proto.trace.v1.Span.SpanKind[A.kind]===void 0?A.kind:a6.opentelemetry.proto.trace.v1.Span.SpanKind[A.kind]:A.kind;if(A.startTimeUnixNano!=null&&A.hasOwnProperty("startTimeUnixNano"))if(typeof A.startTimeUnixNano==="number")w.startTimeUnixNano=O.longs===String?String(A.startTimeUnixNano):A.startTimeUnixNano;else w.startTimeUnixNano=O.longs===String?e6.Long.prototype.toString.call(A.startTimeUnixNano):O.longs===Number?new e6.LongBits(A.startTimeUnixNano.low>>>0,A.startTimeUnixNano.high>>>0).toNumber():A.startTimeUnixNano;if(A.endTimeUnixNano!=null&&A.hasOwnProperty("endTimeUnixNano"))if(typeof A.endTimeUnixNano==="number")w.endTimeUnixNano=O.longs===String?String(A.endTimeUnixNano):A.endTimeUnixNano;else w.endTimeUnixNano=O.longs===String?e6.Long.prototype.toString.call(A.endTimeUnixNano):O.longs===Number?new e6.LongBits(A.endTimeUnixNano.low>>>0,A.endTimeUnixNano.high>>>0).toNumber():A.endTimeUnixNano;if(A.attributes&&A.attributes.length){w.attributes=[];for(var H=0;H<A.attributes.length;++H)w.attributes[H]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(A.attributes[H],O)}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount"))w.droppedAttributesCount=A.droppedAttributesCount;if(A.events&&A.events.length){w.events=[];for(var H=0;H<A.events.length;++H)w.events[H]=a6.opentelemetry.proto.trace.v1.Span.Event.toObject(A.events[H],O)}if(A.droppedEventsCount!=null&&A.hasOwnProperty("droppedEventsCount"))w.droppedEventsCount=A.droppedEventsCount;if(A.links&&A.links.length){w.links=[];for(var H=0;H<A.links.length;++H)w.links[H]=a6.opentelemetry.proto.trace.v1.Span.Link.toObject(A.links[H],O)}if(A.droppedLinksCount!=null&&A.hasOwnProperty("droppedLinksCount"))w.droppedLinksCount=A.droppedLinksCount;if(A.status!=null&&A.hasOwnProperty("status"))w.status=a6.opentelemetry.proto.trace.v1.Status.toObject(A.status,O);if(A.flags!=null&&A.hasOwnProperty("flags"))w.flags=A.flags;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.trace.v1.Span"},Y.SpanKind=function(){var $={},A=Object.create($);return A[$[0]="SPAN_KIND_UNSPECIFIED"]=0,A[$[1]="SPAN_KIND_INTERNAL"]=1,A[$[2]="SPAN_KIND_SERVER"]=2,A[$[3]="SPAN_KIND_CLIENT"]=3,A[$[4]="SPAN_KIND_PRODUCER"]=4,A[$[5]="SPAN_KIND_CONSUMER"]=5,A}(),Y.Event=function(){function $(A){if(this.attributes=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.timeUnixNano=null,$.prototype.name=null,$.prototype.attributes=e6.emptyArray,$.prototype.droppedAttributesCount=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.timeUnixNano!=null&&Object.hasOwnProperty.call(O,"timeUnixNano"))w.uint32(9).fixed64(O.timeUnixNano);if(O.name!=null&&Object.hasOwnProperty.call(O,"name"))w.uint32(18).string(O.name);if(O.attributes!=null&&O.attributes.length)for(var j=0;j<O.attributes.length;++j)a6.opentelemetry.proto.common.v1.KeyValue.encode(O.attributes[j],w.uint32(26).fork()).ldelim();if(O.droppedAttributesCount!=null&&Object.hasOwnProperty.call(O,"droppedAttributesCount"))w.uint32(32).uint32(O.droppedAttributesCount);return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.trace.v1.Span.Event;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.timeUnixNano=O.fixed64();break}case 2:{J.name=O.string();break}case 3:{if(!(J.attributes&&J.attributes.length))J.attributes=[];J.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(O,O.uint32()));break}case 4:{J.droppedAttributesCount=O.uint32();break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano")){if(!e6.isInteger(O.timeUnixNano)&&!(O.timeUnixNano&&e6.isInteger(O.timeUnixNano.low)&&e6.isInteger(O.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(O.name!=null&&O.hasOwnProperty("name")){if(!e6.isString(O.name))return"name: string expected"}if(O.attributes!=null&&O.hasOwnProperty("attributes")){if(!Array.isArray(O.attributes))return"attributes: array expected";for(var w=0;w<O.attributes.length;++w){var j=a6.opentelemetry.proto.common.v1.KeyValue.verify(O.attributes[w]);if(j)return"attributes."+j}}if(O.droppedAttributesCount!=null&&O.hasOwnProperty("droppedAttributesCount")){if(!e6.isInteger(O.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.trace.v1.Span.Event)return O;var w=new a6.opentelemetry.proto.trace.v1.Span.Event;if(O.timeUnixNano!=null){if(e6.Long)(w.timeUnixNano=e6.Long.fromValue(O.timeUnixNano)).unsigned=!1;else if(typeof O.timeUnixNano==="string")w.timeUnixNano=parseInt(O.timeUnixNano,10);else if(typeof O.timeUnixNano==="number")w.timeUnixNano=O.timeUnixNano;else if(typeof O.timeUnixNano==="object")w.timeUnixNano=new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber()}if(O.name!=null)w.name=String(O.name);if(O.attributes){if(!Array.isArray(O.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");w.attributes=[];for(var j=0;j<O.attributes.length;++j){if(typeof O.attributes[j]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");w.attributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(O.attributes[j])}}if(O.droppedAttributesCount!=null)w.droppedAttributesCount=O.droppedAttributesCount>>>0;return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.attributes=[];if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.timeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.timeUnixNano=w.longs===String?"0":0;j.name="",j.droppedAttributesCount=0}if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano"))if(typeof O.timeUnixNano==="number")j.timeUnixNano=w.longs===String?String(O.timeUnixNano):O.timeUnixNano;else j.timeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.timeUnixNano):w.longs===Number?new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber():O.timeUnixNano;if(O.name!=null&&O.hasOwnProperty("name"))j.name=O.name;if(O.attributes&&O.attributes.length){j.attributes=[];for(var J=0;J<O.attributes.length;++J)j.attributes[J]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(O.attributes[J],w)}if(O.droppedAttributesCount!=null&&O.hasOwnProperty("droppedAttributesCount"))j.droppedAttributesCount=O.droppedAttributesCount;return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.trace.v1.Span.Event"},$}(),Y.Link=function(){function $(A){if(this.attributes=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.traceId=null,$.prototype.spanId=null,$.prototype.traceState=null,$.prototype.attributes=e6.emptyArray,$.prototype.droppedAttributesCount=null,$.prototype.flags=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.traceId!=null&&Object.hasOwnProperty.call(O,"traceId"))w.uint32(10).bytes(O.traceId);if(O.spanId!=null&&Object.hasOwnProperty.call(O,"spanId"))w.uint32(18).bytes(O.spanId);if(O.traceState!=null&&Object.hasOwnProperty.call(O,"traceState"))w.uint32(26).string(O.traceState);if(O.attributes!=null&&O.attributes.length)for(var j=0;j<O.attributes.length;++j)a6.opentelemetry.proto.common.v1.KeyValue.encode(O.attributes[j],w.uint32(34).fork()).ldelim();if(O.droppedAttributesCount!=null&&Object.hasOwnProperty.call(O,"droppedAttributesCount"))w.uint32(40).uint32(O.droppedAttributesCount);if(O.flags!=null&&Object.hasOwnProperty.call(O,"flags"))w.uint32(53).fixed32(O.flags);return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.trace.v1.Span.Link;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.traceId=O.bytes();break}case 2:{J.spanId=O.bytes();break}case 3:{J.traceState=O.string();break}case 4:{if(!(J.attributes&&J.attributes.length))J.attributes=[];J.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(O,O.uint32()));break}case 5:{J.droppedAttributesCount=O.uint32();break}case 6:{J.flags=O.fixed32();break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.traceId!=null&&O.hasOwnProperty("traceId")){if(!(O.traceId&&typeof O.traceId.length==="number"||e6.isString(O.traceId)))return"traceId: buffer expected"}if(O.spanId!=null&&O.hasOwnProperty("spanId")){if(!(O.spanId&&typeof O.spanId.length==="number"||e6.isString(O.spanId)))return"spanId: buffer expected"}if(O.traceState!=null&&O.hasOwnProperty("traceState")){if(!e6.isString(O.traceState))return"traceState: string expected"}if(O.attributes!=null&&O.hasOwnProperty("attributes")){if(!Array.isArray(O.attributes))return"attributes: array expected";for(var w=0;w<O.attributes.length;++w){var j=a6.opentelemetry.proto.common.v1.KeyValue.verify(O.attributes[w]);if(j)return"attributes."+j}}if(O.droppedAttributesCount!=null&&O.hasOwnProperty("droppedAttributesCount")){if(!e6.isInteger(O.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(O.flags!=null&&O.hasOwnProperty("flags")){if(!e6.isInteger(O.flags))return"flags: integer expected"}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.trace.v1.Span.Link)return O;var w=new a6.opentelemetry.proto.trace.v1.Span.Link;if(O.traceId!=null){if(typeof O.traceId==="string")e6.base64.decode(O.traceId,w.traceId=e6.newBuffer(e6.base64.length(O.traceId)),0);else if(O.traceId.length>=0)w.traceId=O.traceId}if(O.spanId!=null){if(typeof O.spanId==="string")e6.base64.decode(O.spanId,w.spanId=e6.newBuffer(e6.base64.length(O.spanId)),0);else if(O.spanId.length>=0)w.spanId=O.spanId}if(O.traceState!=null)w.traceState=String(O.traceState);if(O.attributes){if(!Array.isArray(O.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");w.attributes=[];for(var j=0;j<O.attributes.length;++j){if(typeof O.attributes[j]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");w.attributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(O.attributes[j])}}if(O.droppedAttributesCount!=null)w.droppedAttributesCount=O.droppedAttributesCount>>>0;if(O.flags!=null)w.flags=O.flags>>>0;return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.attributes=[];if(w.defaults){if(w.bytes===String)j.traceId="";else if(j.traceId=[],w.bytes!==Array)j.traceId=e6.newBuffer(j.traceId);if(w.bytes===String)j.spanId="";else if(j.spanId=[],w.bytes!==Array)j.spanId=e6.newBuffer(j.spanId);j.traceState="",j.droppedAttributesCount=0,j.flags=0}if(O.traceId!=null&&O.hasOwnProperty("traceId"))j.traceId=w.bytes===String?e6.base64.encode(O.traceId,0,O.traceId.length):w.bytes===Array?Array.prototype.slice.call(O.traceId):O.traceId;if(O.spanId!=null&&O.hasOwnProperty("spanId"))j.spanId=w.bytes===String?e6.base64.encode(O.spanId,0,O.spanId.length):w.bytes===Array?Array.prototype.slice.call(O.spanId):O.spanId;if(O.traceState!=null&&O.hasOwnProperty("traceState"))j.traceState=O.traceState;if(O.attributes&&O.attributes.length){j.attributes=[];for(var H=0;H<O.attributes.length;++H)j.attributes[H]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(O.attributes[H],w)}if(O.droppedAttributesCount!=null&&O.hasOwnProperty("droppedAttributesCount"))j.droppedAttributesCount=O.droppedAttributesCount;if(O.flags!=null&&O.hasOwnProperty("flags"))j.flags=O.flags;return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.trace.v1.Span.Link"},$}(),Y}(),z.Status=function(){function Y($){if($){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.message=null,Y.prototype.code=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.message!=null&&Object.hasOwnProperty.call(A,"message"))O.uint32(18).string(A.message);if(A.code!=null&&Object.hasOwnProperty.call(A,"code"))O.uint32(24).int32(A.code);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.trace.v1.Status;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 2:{H.message=A.string();break}case 3:{H.code=A.int32();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.message!=null&&A.hasOwnProperty("message")){if(!e6.isString(A.message))return"message: string expected"}if(A.code!=null&&A.hasOwnProperty("code"))switch(A.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.trace.v1.Status)return A;var O=new a6.opentelemetry.proto.trace.v1.Status;if(A.message!=null)O.message=String(A.message);switch(A.code){default:if(typeof A.code==="number"){O.code=A.code;break}break;case"STATUS_CODE_UNSET":case 0:O.code=0;break;case"STATUS_CODE_OK":case 1:O.code=1;break;case"STATUS_CODE_ERROR":case 2:O.code=2;break}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.defaults)w.message="",w.code=O.enums===String?"STATUS_CODE_UNSET":0;if(A.message!=null&&A.hasOwnProperty("message"))w.message=A.message;if(A.code!=null&&A.hasOwnProperty("code"))w.code=O.enums===String?a6.opentelemetry.proto.trace.v1.Status.StatusCode[A.code]===void 0?A.code:a6.opentelemetry.proto.trace.v1.Status.StatusCode[A.code]:A.code;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.trace.v1.Status"},Y.StatusCode=function(){var $={},A=Object.create($);return A[$[0]="STATUS_CODE_UNSET"]=0,A[$[1]="STATUS_CODE_OK"]=1,A[$[2]="STATUS_CODE_ERROR"]=2,A}(),Y}(),z.SpanFlags=function(){var Y={},$=Object.create(Y);return $[Y[0]="SPAN_FLAGS_DO_NOT_USE"]=0,$[Y[255]="SPAN_FLAGS_TRACE_FLAGS_MASK"]=255,$[Y[256]="SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK"]=256,$[Y[512]="SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK"]=512,$}(),z}(),_}(),K.collector=function(){var _={};return _.trace=function(){var z={};return z.v1=function(){var Y={};return Y.TraceService=function(){function $(A,O,w){T5.rpc.Service.call(this,A,O,w)}return($.prototype=Object.create(T5.rpc.Service.prototype)).constructor=$,$.create=function(O,w,j){return new this(O,w,j)},Object.defineProperty($.prototype.export=function A(O,w){return this.rpcCall(A,a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,O,w)},"name",{value:"Export"}),$}(),Y.ExportTraceServiceRequest=function(){function $(A){if(this.resourceSpans=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.resourceSpans=e6.emptyArray,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.resourceSpans!=null&&O.resourceSpans.length)for(var j=0;j<O.resourceSpans.length;++j)a6.opentelemetry.proto.trace.v1.ResourceSpans.encode(O.resourceSpans[j],w.uint32(10).fork()).ldelim();return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{if(!(J.resourceSpans&&J.resourceSpans.length))J.resourceSpans=[];J.resourceSpans.push(a6.opentelemetry.proto.trace.v1.ResourceSpans.decode(O,O.uint32()));break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.resourceSpans!=null&&O.hasOwnProperty("resourceSpans")){if(!Array.isArray(O.resourceSpans))return"resourceSpans: array expected";for(var w=0;w<O.resourceSpans.length;++w){var j=a6.opentelemetry.proto.trace.v1.ResourceSpans.verify(O.resourceSpans[w]);if(j)return"resourceSpans."+j}}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return O;var w=new a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(O.resourceSpans){if(!Array.isArray(O.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");w.resourceSpans=[];for(var j=0;j<O.resourceSpans.length;++j){if(typeof O.resourceSpans[j]!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");w.resourceSpans[j]=a6.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(O.resourceSpans[j])}}return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.resourceSpans=[];if(O.resourceSpans&&O.resourceSpans.length){j.resourceSpans=[];for(var H=0;H<O.resourceSpans.length;++H)j.resourceSpans[H]=a6.opentelemetry.proto.trace.v1.ResourceSpans.toObject(O.resourceSpans[H],w)}return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},$}(),Y.ExportTraceServiceResponse=function(){function $(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.partialSuccess=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.partialSuccess!=null&&Object.hasOwnProperty.call(O,"partialSuccess"))a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(O.partialSuccess,w.uint32(10).fork()).ldelim();return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.partialSuccess=a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(O,O.uint32());break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.partialSuccess!=null&&O.hasOwnProperty("partialSuccess")){var w=a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(O.partialSuccess);if(w)return"partialSuccess."+w}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return O;var w=new a6.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(O.partialSuccess!=null){if(typeof O.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");w.partialSuccess=a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(O.partialSuccess)}return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.defaults)j.partialSuccess=null;if(O.partialSuccess!=null&&O.hasOwnProperty("partialSuccess"))j.partialSuccess=a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(O.partialSuccess,w);return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},$}(),Y.ExportTracePartialSuccess=function(){function $(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.rejectedSpans=null,$.prototype.errorMessage=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.rejectedSpans!=null&&Object.hasOwnProperty.call(O,"rejectedSpans"))w.uint32(8).int64(O.rejectedSpans);if(O.errorMessage!=null&&Object.hasOwnProperty.call(O,"errorMessage"))w.uint32(18).string(O.errorMessage);return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.rejectedSpans=O.int64();break}case 2:{J.errorMessage=O.string();break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.rejectedSpans!=null&&O.hasOwnProperty("rejectedSpans")){if(!e6.isInteger(O.rejectedSpans)&&!(O.rejectedSpans&&e6.isInteger(O.rejectedSpans.low)&&e6.isInteger(O.rejectedSpans.high)))return"rejectedSpans: integer|Long expected"}if(O.errorMessage!=null&&O.hasOwnProperty("errorMessage")){if(!e6.isString(O.errorMessage))return"errorMessage: string expected"}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return O;var w=new a6.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;if(O.rejectedSpans!=null){if(e6.Long)(w.rejectedSpans=e6.Long.fromValue(O.rejectedSpans)).unsigned=!1;else if(typeof O.rejectedSpans==="string")w.rejectedSpans=parseInt(O.rejectedSpans,10);else if(typeof O.rejectedSpans==="number")w.rejectedSpans=O.rejectedSpans;else if(typeof O.rejectedSpans==="object")w.rejectedSpans=new e6.LongBits(O.rejectedSpans.low>>>0,O.rejectedSpans.high>>>0).toNumber()}if(O.errorMessage!=null)w.errorMessage=String(O.errorMessage);return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.rejectedSpans=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.rejectedSpans=w.longs===String?"0":0;j.errorMessage=""}if(O.rejectedSpans!=null&&O.hasOwnProperty("rejectedSpans"))if(typeof O.rejectedSpans==="number")j.rejectedSpans=w.longs===String?String(O.rejectedSpans):O.rejectedSpans;else j.rejectedSpans=w.longs===String?e6.Long.prototype.toString.call(O.rejectedSpans):w.longs===Number?new e6.LongBits(O.rejectedSpans.low>>>0,O.rejectedSpans.high>>>0).toNumber():O.rejectedSpans;if(O.errorMessage!=null&&O.hasOwnProperty("errorMessage"))j.errorMessage=O.errorMessage;return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},$}(),Y}(),z}(),_.metrics=function(){var z={};return z.v1=function(){var Y={};return Y.MetricsService=function(){function $(A,O,w){T5.rpc.Service.call(this,A,O,w)}return($.prototype=Object.create(T5.rpc.Service.prototype)).constructor=$,$.create=function(O,w,j){return new this(O,w,j)},Object.defineProperty($.prototype.export=function A(O,w){return this.rpcCall(A,a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,O,w)},"name",{value:"Export"}),$}(),Y.ExportMetricsServiceRequest=function(){function $(A){if(this.resourceMetrics=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.resourceMetrics=e6.emptyArray,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.resourceMetrics!=null&&O.resourceMetrics.length)for(var j=0;j<O.resourceMetrics.length;++j)a6.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(O.resourceMetrics[j],w.uint32(10).fork()).ldelim();return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{if(!(J.resourceMetrics&&J.resourceMetrics.length))J.resourceMetrics=[];J.resourceMetrics.push(a6.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(O,O.uint32()));break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.resourceMetrics!=null&&O.hasOwnProperty("resourceMetrics")){if(!Array.isArray(O.resourceMetrics))return"resourceMetrics: array expected";for(var w=0;w<O.resourceMetrics.length;++w){var j=a6.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(O.resourceMetrics[w]);if(j)return"resourceMetrics."+j}}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return O;var w=new a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(O.resourceMetrics){if(!Array.isArray(O.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");w.resourceMetrics=[];for(var j=0;j<O.resourceMetrics.length;++j){if(typeof O.resourceMetrics[j]!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");w.resourceMetrics[j]=a6.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(O.resourceMetrics[j])}}return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.resourceMetrics=[];if(O.resourceMetrics&&O.resourceMetrics.length){j.resourceMetrics=[];for(var H=0;H<O.resourceMetrics.length;++H)j.resourceMetrics[H]=a6.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(O.resourceMetrics[H],w)}return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},$}(),Y.ExportMetricsServiceResponse=function(){function $(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.partialSuccess=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.partialSuccess!=null&&Object.hasOwnProperty.call(O,"partialSuccess"))a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(O.partialSuccess,w.uint32(10).fork()).ldelim();return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.partialSuccess=a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(O,O.uint32());break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.partialSuccess!=null&&O.hasOwnProperty("partialSuccess")){var w=a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(O.partialSuccess);if(w)return"partialSuccess."+w}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return O;var w=new a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(O.partialSuccess!=null){if(typeof O.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");w.partialSuccess=a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(O.partialSuccess)}return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.defaults)j.partialSuccess=null;if(O.partialSuccess!=null&&O.hasOwnProperty("partialSuccess"))j.partialSuccess=a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(O.partialSuccess,w);return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},$}(),Y.ExportMetricsPartialSuccess=function(){function $(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.rejectedDataPoints=null,$.prototype.errorMessage=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.rejectedDataPoints!=null&&Object.hasOwnProperty.call(O,"rejectedDataPoints"))w.uint32(8).int64(O.rejectedDataPoints);if(O.errorMessage!=null&&Object.hasOwnProperty.call(O,"errorMessage"))w.uint32(18).string(O.errorMessage);return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.rejectedDataPoints=O.int64();break}case 2:{J.errorMessage=O.string();break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.rejectedDataPoints!=null&&O.hasOwnProperty("rejectedDataPoints")){if(!e6.isInteger(O.rejectedDataPoints)&&!(O.rejectedDataPoints&&e6.isInteger(O.rejectedDataPoints.low)&&e6.isInteger(O.rejectedDataPoints.high)))return"rejectedDataPoints: integer|Long expected"}if(O.errorMessage!=null&&O.hasOwnProperty("errorMessage")){if(!e6.isString(O.errorMessage))return"errorMessage: string expected"}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return O;var w=new a6.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;if(O.rejectedDataPoints!=null){if(e6.Long)(w.rejectedDataPoints=e6.Long.fromValue(O.rejectedDataPoints)).unsigned=!1;else if(typeof O.rejectedDataPoints==="string")w.rejectedDataPoints=parseInt(O.rejectedDataPoints,10);else if(typeof O.rejectedDataPoints==="number")w.rejectedDataPoints=O.rejectedDataPoints;else if(typeof O.rejectedDataPoints==="object")w.rejectedDataPoints=new e6.LongBits(O.rejectedDataPoints.low>>>0,O.rejectedDataPoints.high>>>0).toNumber()}if(O.errorMessage!=null)w.errorMessage=String(O.errorMessage);return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.rejectedDataPoints=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.rejectedDataPoints=w.longs===String?"0":0;j.errorMessage=""}if(O.rejectedDataPoints!=null&&O.hasOwnProperty("rejectedDataPoints"))if(typeof O.rejectedDataPoints==="number")j.rejectedDataPoints=w.longs===String?String(O.rejectedDataPoints):O.rejectedDataPoints;else j.rejectedDataPoints=w.longs===String?e6.Long.prototype.toString.call(O.rejectedDataPoints):w.longs===Number?new e6.LongBits(O.rejectedDataPoints.low>>>0,O.rejectedDataPoints.high>>>0).toNumber():O.rejectedDataPoints;if(O.errorMessage!=null&&O.hasOwnProperty("errorMessage"))j.errorMessage=O.errorMessage;return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},$}(),Y}(),z}(),_.logs=function(){var z={};return z.v1=function(){var Y={};return Y.LogsService=function(){function $(A,O,w){T5.rpc.Service.call(this,A,O,w)}return($.prototype=Object.create(T5.rpc.Service.prototype)).constructor=$,$.create=function(O,w,j){return new this(O,w,j)},Object.defineProperty($.prototype.export=function A(O,w){return this.rpcCall(A,a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,O,w)},"name",{value:"Export"}),$}(),Y.ExportLogsServiceRequest=function(){function $(A){if(this.resourceLogs=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.resourceLogs=e6.emptyArray,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.resourceLogs!=null&&O.resourceLogs.length)for(var j=0;j<O.resourceLogs.length;++j)a6.opentelemetry.proto.logs.v1.ResourceLogs.encode(O.resourceLogs[j],w.uint32(10).fork()).ldelim();return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{if(!(J.resourceLogs&&J.resourceLogs.length))J.resourceLogs=[];J.resourceLogs.push(a6.opentelemetry.proto.logs.v1.ResourceLogs.decode(O,O.uint32()));break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.resourceLogs!=null&&O.hasOwnProperty("resourceLogs")){if(!Array.isArray(O.resourceLogs))return"resourceLogs: array expected";for(var w=0;w<O.resourceLogs.length;++w){var j=a6.opentelemetry.proto.logs.v1.ResourceLogs.verify(O.resourceLogs[w]);if(j)return"resourceLogs."+j}}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return O;var w=new a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(O.resourceLogs){if(!Array.isArray(O.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");w.resourceLogs=[];for(var j=0;j<O.resourceLogs.length;++j){if(typeof O.resourceLogs[j]!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");w.resourceLogs[j]=a6.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(O.resourceLogs[j])}}return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.resourceLogs=[];if(O.resourceLogs&&O.resourceLogs.length){j.resourceLogs=[];for(var H=0;H<O.resourceLogs.length;++H)j.resourceLogs[H]=a6.opentelemetry.proto.logs.v1.ResourceLogs.toObject(O.resourceLogs[H],w)}return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},$}(),Y.ExportLogsServiceResponse=function(){function $(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.partialSuccess=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.partialSuccess!=null&&Object.hasOwnProperty.call(O,"partialSuccess"))a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(O.partialSuccess,w.uint32(10).fork()).ldelim();return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.partialSuccess=a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(O,O.uint32());break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.partialSuccess!=null&&O.hasOwnProperty("partialSuccess")){var w=a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(O.partialSuccess);if(w)return"partialSuccess."+w}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return O;var w=new a6.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(O.partialSuccess!=null){if(typeof O.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");w.partialSuccess=a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(O.partialSuccess)}return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.defaults)j.partialSuccess=null;if(O.partialSuccess!=null&&O.hasOwnProperty("partialSuccess"))j.partialSuccess=a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(O.partialSuccess,w);return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},$}(),Y.ExportLogsPartialSuccess=function(){function $(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.rejectedLogRecords=null,$.prototype.errorMessage=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.rejectedLogRecords!=null&&Object.hasOwnProperty.call(O,"rejectedLogRecords"))w.uint32(8).int64(O.rejectedLogRecords);if(O.errorMessage!=null&&Object.hasOwnProperty.call(O,"errorMessage"))w.uint32(18).string(O.errorMessage);return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.rejectedLogRecords=O.int64();break}case 2:{J.errorMessage=O.string();break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.rejectedLogRecords!=null&&O.hasOwnProperty("rejectedLogRecords")){if(!e6.isInteger(O.rejectedLogRecords)&&!(O.rejectedLogRecords&&e6.isInteger(O.rejectedLogRecords.low)&&e6.isInteger(O.rejectedLogRecords.high)))return"rejectedLogRecords: integer|Long expected"}if(O.errorMessage!=null&&O.hasOwnProperty("errorMessage")){if(!e6.isString(O.errorMessage))return"errorMessage: string expected"}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return O;var w=new a6.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;if(O.rejectedLogRecords!=null){if(e6.Long)(w.rejectedLogRecords=e6.Long.fromValue(O.rejectedLogRecords)).unsigned=!1;else if(typeof O.rejectedLogRecords==="string")w.rejectedLogRecords=parseInt(O.rejectedLogRecords,10);else if(typeof O.rejectedLogRecords==="number")w.rejectedLogRecords=O.rejectedLogRecords;else if(typeof O.rejectedLogRecords==="object")w.rejectedLogRecords=new e6.LongBits(O.rejectedLogRecords.low>>>0,O.rejectedLogRecords.high>>>0).toNumber()}if(O.errorMessage!=null)w.errorMessage=String(O.errorMessage);return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.rejectedLogRecords=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.rejectedLogRecords=w.longs===String?"0":0;j.errorMessage=""}if(O.rejectedLogRecords!=null&&O.hasOwnProperty("rejectedLogRecords"))if(typeof O.rejectedLogRecords==="number")j.rejectedLogRecords=w.longs===String?String(O.rejectedLogRecords):O.rejectedLogRecords;else j.rejectedLogRecords=w.longs===String?e6.Long.prototype.toString.call(O.rejectedLogRecords):w.longs===Number?new e6.LongBits(O.rejectedLogRecords.low>>>0,O.rejectedLogRecords.high>>>0).toNumber():O.rejectedLogRecords;if(O.errorMessage!=null&&O.hasOwnProperty("errorMessage"))j.errorMessage=O.errorMessage;return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},$}(),Y}(),z}(),_}(),K.metrics=function(){var _={};return _.v1=function(){var z={};return z.MetricsData=function(){function Y($){if(this.resourceMetrics=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.resourceMetrics=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.resourceMetrics!=null&&A.resourceMetrics.length)for(var w=0;w<A.resourceMetrics.length;++w)a6.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(A.resourceMetrics[w],O.uint32(10).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.MetricsData;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.resourceMetrics&&H.resourceMetrics.length))H.resourceMetrics=[];H.resourceMetrics.push(a6.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.resourceMetrics!=null&&A.hasOwnProperty("resourceMetrics")){if(!Array.isArray(A.resourceMetrics))return"resourceMetrics: array expected";for(var O=0;O<A.resourceMetrics.length;++O){var w=a6.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(A.resourceMetrics[O]);if(w)return"resourceMetrics."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.MetricsData)return A;var O=new a6.opentelemetry.proto.metrics.v1.MetricsData;if(A.resourceMetrics){if(!Array.isArray(A.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");O.resourceMetrics=[];for(var w=0;w<A.resourceMetrics.length;++w){if(typeof A.resourceMetrics[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");O.resourceMetrics[w]=a6.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(A.resourceMetrics[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.resourceMetrics=[];if(A.resourceMetrics&&A.resourceMetrics.length){w.resourceMetrics=[];for(var j=0;j<A.resourceMetrics.length;++j)w.resourceMetrics[j]=a6.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(A.resourceMetrics[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.MetricsData"},Y}(),z.ResourceMetrics=function(){function Y($){if(this.scopeMetrics=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.resource=null,Y.prototype.scopeMetrics=e6.emptyArray,Y.prototype.schemaUrl=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.resource!=null&&Object.hasOwnProperty.call(A,"resource"))a6.opentelemetry.proto.resource.v1.Resource.encode(A.resource,O.uint32(10).fork()).ldelim();if(A.scopeMetrics!=null&&A.scopeMetrics.length)for(var w=0;w<A.scopeMetrics.length;++w)a6.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(A.scopeMetrics[w],O.uint32(18).fork()).ldelim();if(A.schemaUrl!=null&&Object.hasOwnProperty.call(A,"schemaUrl"))O.uint32(26).string(A.schemaUrl);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.ResourceMetrics;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.resource=a6.opentelemetry.proto.resource.v1.Resource.decode(A,A.uint32());break}case 2:{if(!(H.scopeMetrics&&H.scopeMetrics.length))H.scopeMetrics=[];H.scopeMetrics.push(a6.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(A,A.uint32()));break}case 3:{H.schemaUrl=A.string();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.resource!=null&&A.hasOwnProperty("resource")){var O=a6.opentelemetry.proto.resource.v1.Resource.verify(A.resource);if(O)return"resource."+O}if(A.scopeMetrics!=null&&A.hasOwnProperty("scopeMetrics")){if(!Array.isArray(A.scopeMetrics))return"scopeMetrics: array expected";for(var w=0;w<A.scopeMetrics.length;++w){var O=a6.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(A.scopeMetrics[w]);if(O)return"scopeMetrics."+O}}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl")){if(!e6.isString(A.schemaUrl))return"schemaUrl: string expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.ResourceMetrics)return A;var O=new a6.opentelemetry.proto.metrics.v1.ResourceMetrics;if(A.resource!=null){if(typeof A.resource!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");O.resource=a6.opentelemetry.proto.resource.v1.Resource.fromObject(A.resource)}if(A.scopeMetrics){if(!Array.isArray(A.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");O.scopeMetrics=[];for(var w=0;w<A.scopeMetrics.length;++w){if(typeof A.scopeMetrics[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");O.scopeMetrics[w]=a6.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(A.scopeMetrics[w])}}if(A.schemaUrl!=null)O.schemaUrl=String(A.schemaUrl);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.scopeMetrics=[];if(O.defaults)w.resource=null,w.schemaUrl="";if(A.resource!=null&&A.hasOwnProperty("resource"))w.resource=a6.opentelemetry.proto.resource.v1.Resource.toObject(A.resource,O);if(A.scopeMetrics&&A.scopeMetrics.length){w.scopeMetrics=[];for(var j=0;j<A.scopeMetrics.length;++j)w.scopeMetrics[j]=a6.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(A.scopeMetrics[j],O)}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl"))w.schemaUrl=A.schemaUrl;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},Y}(),z.ScopeMetrics=function(){function Y($){if(this.metrics=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.scope=null,Y.prototype.metrics=e6.emptyArray,Y.prototype.schemaUrl=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.scope!=null&&Object.hasOwnProperty.call(A,"scope"))a6.opentelemetry.proto.common.v1.InstrumentationScope.encode(A.scope,O.uint32(10).fork()).ldelim();if(A.metrics!=null&&A.metrics.length)for(var w=0;w<A.metrics.length;++w)a6.opentelemetry.proto.metrics.v1.Metric.encode(A.metrics[w],O.uint32(18).fork()).ldelim();if(A.schemaUrl!=null&&Object.hasOwnProperty.call(A,"schemaUrl"))O.uint32(26).string(A.schemaUrl);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.ScopeMetrics;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.decode(A,A.uint32());break}case 2:{if(!(H.metrics&&H.metrics.length))H.metrics=[];H.metrics.push(a6.opentelemetry.proto.metrics.v1.Metric.decode(A,A.uint32()));break}case 3:{H.schemaUrl=A.string();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.scope!=null&&A.hasOwnProperty("scope")){var O=a6.opentelemetry.proto.common.v1.InstrumentationScope.verify(A.scope);if(O)return"scope."+O}if(A.metrics!=null&&A.hasOwnProperty("metrics")){if(!Array.isArray(A.metrics))return"metrics: array expected";for(var w=0;w<A.metrics.length;++w){var O=a6.opentelemetry.proto.metrics.v1.Metric.verify(A.metrics[w]);if(O)return"metrics."+O}}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl")){if(!e6.isString(A.schemaUrl))return"schemaUrl: string expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.ScopeMetrics)return A;var O=new a6.opentelemetry.proto.metrics.v1.ScopeMetrics;if(A.scope!=null){if(typeof A.scope!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");O.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(A.scope)}if(A.metrics){if(!Array.isArray(A.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");O.metrics=[];for(var w=0;w<A.metrics.length;++w){if(typeof A.metrics[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");O.metrics[w]=a6.opentelemetry.proto.metrics.v1.Metric.fromObject(A.metrics[w])}}if(A.schemaUrl!=null)O.schemaUrl=String(A.schemaUrl);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.metrics=[];if(O.defaults)w.scope=null,w.schemaUrl="";if(A.scope!=null&&A.hasOwnProperty("scope"))w.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.toObject(A.scope,O);if(A.metrics&&A.metrics.length){w.metrics=[];for(var j=0;j<A.metrics.length;++j)w.metrics[j]=a6.opentelemetry.proto.metrics.v1.Metric.toObject(A.metrics[j],O)}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl"))w.schemaUrl=A.schemaUrl;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},Y}(),z.Metric=function(){function Y(A){if(this.metadata=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}Y.prototype.name=null,Y.prototype.description=null,Y.prototype.unit=null,Y.prototype.gauge=null,Y.prototype.sum=null,Y.prototype.histogram=null,Y.prototype.exponentialHistogram=null,Y.prototype.summary=null,Y.prototype.metadata=e6.emptyArray;var $;return Object.defineProperty(Y.prototype,"data",{get:e6.oneOfGetter($=["gauge","sum","histogram","exponentialHistogram","summary"]),set:e6.oneOfSetter($)}),Y.create=function(O){return new Y(O)},Y.encode=function(O,w){if(!w)w=m9.create();if(O.name!=null&&Object.hasOwnProperty.call(O,"name"))w.uint32(10).string(O.name);if(O.description!=null&&Object.hasOwnProperty.call(O,"description"))w.uint32(18).string(O.description);if(O.unit!=null&&Object.hasOwnProperty.call(O,"unit"))w.uint32(26).string(O.unit);if(O.gauge!=null&&Object.hasOwnProperty.call(O,"gauge"))a6.opentelemetry.proto.metrics.v1.Gauge.encode(O.gauge,w.uint32(42).fork()).ldelim();if(O.sum!=null&&Object.hasOwnProperty.call(O,"sum"))a6.opentelemetry.proto.metrics.v1.Sum.encode(O.sum,w.uint32(58).fork()).ldelim();if(O.histogram!=null&&Object.hasOwnProperty.call(O,"histogram"))a6.opentelemetry.proto.metrics.v1.Histogram.encode(O.histogram,w.uint32(74).fork()).ldelim();if(O.exponentialHistogram!=null&&Object.hasOwnProperty.call(O,"exponentialHistogram"))a6.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(O.exponentialHistogram,w.uint32(82).fork()).ldelim();if(O.summary!=null&&Object.hasOwnProperty.call(O,"summary"))a6.opentelemetry.proto.metrics.v1.Summary.encode(O.summary,w.uint32(90).fork()).ldelim();if(O.metadata!=null&&O.metadata.length)for(var j=0;j<O.metadata.length;++j)a6.opentelemetry.proto.common.v1.KeyValue.encode(O.metadata[j],w.uint32(98).fork()).ldelim();return w},Y.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},Y.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.metrics.v1.Metric;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.name=O.string();break}case 2:{J.description=O.string();break}case 3:{J.unit=O.string();break}case 5:{J.gauge=a6.opentelemetry.proto.metrics.v1.Gauge.decode(O,O.uint32());break}case 7:{J.sum=a6.opentelemetry.proto.metrics.v1.Sum.decode(O,O.uint32());break}case 9:{J.histogram=a6.opentelemetry.proto.metrics.v1.Histogram.decode(O,O.uint32());break}case 10:{J.exponentialHistogram=a6.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(O,O.uint32());break}case 11:{J.summary=a6.opentelemetry.proto.metrics.v1.Summary.decode(O,O.uint32());break}case 12:{if(!(J.metadata&&J.metadata.length))J.metadata=[];J.metadata.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(O,O.uint32()));break}default:O.skipType(M&7);break}}return J},Y.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},Y.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";var w={};if(O.name!=null&&O.hasOwnProperty("name")){if(!e6.isString(O.name))return"name: string expected"}if(O.description!=null&&O.hasOwnProperty("description")){if(!e6.isString(O.description))return"description: string expected"}if(O.unit!=null&&O.hasOwnProperty("unit")){if(!e6.isString(O.unit))return"unit: string expected"}if(O.gauge!=null&&O.hasOwnProperty("gauge")){w.data=1;{var j=a6.opentelemetry.proto.metrics.v1.Gauge.verify(O.gauge);if(j)return"gauge."+j}}if(O.sum!=null&&O.hasOwnProperty("sum")){if(w.data===1)return"data: multiple values";w.data=1;{var j=a6.opentelemetry.proto.metrics.v1.Sum.verify(O.sum);if(j)return"sum."+j}}if(O.histogram!=null&&O.hasOwnProperty("histogram")){if(w.data===1)return"data: multiple values";w.data=1;{var j=a6.opentelemetry.proto.metrics.v1.Histogram.verify(O.histogram);if(j)return"histogram."+j}}if(O.exponentialHistogram!=null&&O.hasOwnProperty("exponentialHistogram")){if(w.data===1)return"data: multiple values";w.data=1;{var j=a6.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(O.exponentialHistogram);if(j)return"exponentialHistogram."+j}}if(O.summary!=null&&O.hasOwnProperty("summary")){if(w.data===1)return"data: multiple values";w.data=1;{var j=a6.opentelemetry.proto.metrics.v1.Summary.verify(O.summary);if(j)return"summary."+j}}if(O.metadata!=null&&O.hasOwnProperty("metadata")){if(!Array.isArray(O.metadata))return"metadata: array expected";for(var H=0;H<O.metadata.length;++H){var j=a6.opentelemetry.proto.common.v1.KeyValue.verify(O.metadata[H]);if(j)return"metadata."+j}}return null},Y.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.metrics.v1.Metric)return O;var w=new a6.opentelemetry.proto.metrics.v1.Metric;if(O.name!=null)w.name=String(O.name);if(O.description!=null)w.description=String(O.description);if(O.unit!=null)w.unit=String(O.unit);if(O.gauge!=null){if(typeof O.gauge!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");w.gauge=a6.opentelemetry.proto.metrics.v1.Gauge.fromObject(O.gauge)}if(O.sum!=null){if(typeof O.sum!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");w.sum=a6.opentelemetry.proto.metrics.v1.Sum.fromObject(O.sum)}if(O.histogram!=null){if(typeof O.histogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");w.histogram=a6.opentelemetry.proto.metrics.v1.Histogram.fromObject(O.histogram)}if(O.exponentialHistogram!=null){if(typeof O.exponentialHistogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");w.exponentialHistogram=a6.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(O.exponentialHistogram)}if(O.summary!=null){if(typeof O.summary!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");w.summary=a6.opentelemetry.proto.metrics.v1.Summary.fromObject(O.summary)}if(O.metadata){if(!Array.isArray(O.metadata))throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: array expected");w.metadata=[];for(var j=0;j<O.metadata.length;++j){if(typeof O.metadata[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: object expected");w.metadata[j]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(O.metadata[j])}}return w},Y.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.metadata=[];if(w.defaults)j.name="",j.description="",j.unit="";if(O.name!=null&&O.hasOwnProperty("name"))j.name=O.name;if(O.description!=null&&O.hasOwnProperty("description"))j.description=O.description;if(O.unit!=null&&O.hasOwnProperty("unit"))j.unit=O.unit;if(O.gauge!=null&&O.hasOwnProperty("gauge")){if(j.gauge=a6.opentelemetry.proto.metrics.v1.Gauge.toObject(O.gauge,w),w.oneofs)j.data="gauge"}if(O.sum!=null&&O.hasOwnProperty("sum")){if(j.sum=a6.opentelemetry.proto.metrics.v1.Sum.toObject(O.sum,w),w.oneofs)j.data="sum"}if(O.histogram!=null&&O.hasOwnProperty("histogram")){if(j.histogram=a6.opentelemetry.proto.metrics.v1.Histogram.toObject(O.histogram,w),w.oneofs)j.data="histogram"}if(O.exponentialHistogram!=null&&O.hasOwnProperty("exponentialHistogram")){if(j.exponentialHistogram=a6.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(O.exponentialHistogram,w),w.oneofs)j.data="exponentialHistogram"}if(O.summary!=null&&O.hasOwnProperty("summary")){if(j.summary=a6.opentelemetry.proto.metrics.v1.Summary.toObject(O.summary,w),w.oneofs)j.data="summary"}if(O.metadata&&O.metadata.length){j.metadata=[];for(var H=0;H<O.metadata.length;++H)j.metadata[H]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(O.metadata[H],w)}return j},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.metrics.v1.Metric"},Y}(),z.Gauge=function(){function Y($){if(this.dataPoints=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.dataPoints=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.dataPoints!=null&&A.dataPoints.length)for(var w=0;w<A.dataPoints.length;++w)a6.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(A.dataPoints[w],O.uint32(10).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.Gauge;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.dataPoints&&H.dataPoints.length))H.dataPoints=[];H.dataPoints.push(a6.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.dataPoints!=null&&A.hasOwnProperty("dataPoints")){if(!Array.isArray(A.dataPoints))return"dataPoints: array expected";for(var O=0;O<A.dataPoints.length;++O){var w=a6.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(A.dataPoints[O]);if(w)return"dataPoints."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.Gauge)return A;var O=new a6.opentelemetry.proto.metrics.v1.Gauge;if(A.dataPoints){if(!Array.isArray(A.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");O.dataPoints=[];for(var w=0;w<A.dataPoints.length;++w){if(typeof A.dataPoints[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");O.dataPoints[w]=a6.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(A.dataPoints[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.dataPoints=[];if(A.dataPoints&&A.dataPoints.length){w.dataPoints=[];for(var j=0;j<A.dataPoints.length;++j)w.dataPoints[j]=a6.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(A.dataPoints[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.Gauge"},Y}(),z.Sum=function(){function Y($){if(this.dataPoints=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.dataPoints=e6.emptyArray,Y.prototype.aggregationTemporality=null,Y.prototype.isMonotonic=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.dataPoints!=null&&A.dataPoints.length)for(var w=0;w<A.dataPoints.length;++w)a6.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(A.dataPoints[w],O.uint32(10).fork()).ldelim();if(A.aggregationTemporality!=null&&Object.hasOwnProperty.call(A,"aggregationTemporality"))O.uint32(16).int32(A.aggregationTemporality);if(A.isMonotonic!=null&&Object.hasOwnProperty.call(A,"isMonotonic"))O.uint32(24).bool(A.isMonotonic);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.Sum;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.dataPoints&&H.dataPoints.length))H.dataPoints=[];H.dataPoints.push(a6.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(A,A.uint32()));break}case 2:{H.aggregationTemporality=A.int32();break}case 3:{H.isMonotonic=A.bool();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.dataPoints!=null&&A.hasOwnProperty("dataPoints")){if(!Array.isArray(A.dataPoints))return"dataPoints: array expected";for(var O=0;O<A.dataPoints.length;++O){var w=a6.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(A.dataPoints[O]);if(w)return"dataPoints."+w}}if(A.aggregationTemporality!=null&&A.hasOwnProperty("aggregationTemporality"))switch(A.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}if(A.isMonotonic!=null&&A.hasOwnProperty("isMonotonic")){if(typeof A.isMonotonic!=="boolean")return"isMonotonic: boolean expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.Sum)return A;var O=new a6.opentelemetry.proto.metrics.v1.Sum;if(A.dataPoints){if(!Array.isArray(A.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");O.dataPoints=[];for(var w=0;w<A.dataPoints.length;++w){if(typeof A.dataPoints[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");O.dataPoints[w]=a6.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(A.dataPoints[w])}}switch(A.aggregationTemporality){default:if(typeof A.aggregationTemporality==="number"){O.aggregationTemporality=A.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:O.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:O.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:O.aggregationTemporality=2;break}if(A.isMonotonic!=null)O.isMonotonic=Boolean(A.isMonotonic);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.dataPoints=[];if(O.defaults)w.aggregationTemporality=O.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,w.isMonotonic=!1;if(A.dataPoints&&A.dataPoints.length){w.dataPoints=[];for(var j=0;j<A.dataPoints.length;++j)w.dataPoints[j]=a6.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(A.dataPoints[j],O)}if(A.aggregationTemporality!=null&&A.hasOwnProperty("aggregationTemporality"))w.aggregationTemporality=O.enums===String?a6.opentelemetry.proto.metrics.v1.AggregationTemporality[A.aggregationTemporality]===void 0?A.aggregationTemporality:a6.opentelemetry.proto.metrics.v1.AggregationTemporality[A.aggregationTemporality]:A.aggregationTemporality;if(A.isMonotonic!=null&&A.hasOwnProperty("isMonotonic"))w.isMonotonic=A.isMonotonic;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.Sum"},Y}(),z.Histogram=function(){function Y($){if(this.dataPoints=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.dataPoints=e6.emptyArray,Y.prototype.aggregationTemporality=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.dataPoints!=null&&A.dataPoints.length)for(var w=0;w<A.dataPoints.length;++w)a6.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(A.dataPoints[w],O.uint32(10).fork()).ldelim();if(A.aggregationTemporality!=null&&Object.hasOwnProperty.call(A,"aggregationTemporality"))O.uint32(16).int32(A.aggregationTemporality);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.Histogram;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.dataPoints&&H.dataPoints.length))H.dataPoints=[];H.dataPoints.push(a6.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(A,A.uint32()));break}case 2:{H.aggregationTemporality=A.int32();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.dataPoints!=null&&A.hasOwnProperty("dataPoints")){if(!Array.isArray(A.dataPoints))return"dataPoints: array expected";for(var O=0;O<A.dataPoints.length;++O){var w=a6.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(A.dataPoints[O]);if(w)return"dataPoints."+w}}if(A.aggregationTemporality!=null&&A.hasOwnProperty("aggregationTemporality"))switch(A.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.Histogram)return A;var O=new a6.opentelemetry.proto.metrics.v1.Histogram;if(A.dataPoints){if(!Array.isArray(A.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");O.dataPoints=[];for(var w=0;w<A.dataPoints.length;++w){if(typeof A.dataPoints[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");O.dataPoints[w]=a6.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(A.dataPoints[w])}}switch(A.aggregationTemporality){default:if(typeof A.aggregationTemporality==="number"){O.aggregationTemporality=A.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:O.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:O.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:O.aggregationTemporality=2;break}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.dataPoints=[];if(O.defaults)w.aggregationTemporality=O.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(A.dataPoints&&A.dataPoints.length){w.dataPoints=[];for(var j=0;j<A.dataPoints.length;++j)w.dataPoints[j]=a6.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(A.dataPoints[j],O)}if(A.aggregationTemporality!=null&&A.hasOwnProperty("aggregationTemporality"))w.aggregationTemporality=O.enums===String?a6.opentelemetry.proto.metrics.v1.AggregationTemporality[A.aggregationTemporality]===void 0?A.aggregationTemporality:a6.opentelemetry.proto.metrics.v1.AggregationTemporality[A.aggregationTemporality]:A.aggregationTemporality;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.Histogram"},Y}(),z.ExponentialHistogram=function(){function Y($){if(this.dataPoints=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.dataPoints=e6.emptyArray,Y.prototype.aggregationTemporality=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.dataPoints!=null&&A.dataPoints.length)for(var w=0;w<A.dataPoints.length;++w)a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(A.dataPoints[w],O.uint32(10).fork()).ldelim();if(A.aggregationTemporality!=null&&Object.hasOwnProperty.call(A,"aggregationTemporality"))O.uint32(16).int32(A.aggregationTemporality);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.ExponentialHistogram;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.dataPoints&&H.dataPoints.length))H.dataPoints=[];H.dataPoints.push(a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(A,A.uint32()));break}case 2:{H.aggregationTemporality=A.int32();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.dataPoints!=null&&A.hasOwnProperty("dataPoints")){if(!Array.isArray(A.dataPoints))return"dataPoints: array expected";for(var O=0;O<A.dataPoints.length;++O){var w=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(A.dataPoints[O]);if(w)return"dataPoints."+w}}if(A.aggregationTemporality!=null&&A.hasOwnProperty("aggregationTemporality"))switch(A.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.ExponentialHistogram)return A;var O=new a6.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(A.dataPoints){if(!Array.isArray(A.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");O.dataPoints=[];for(var w=0;w<A.dataPoints.length;++w){if(typeof A.dataPoints[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");O.dataPoints[w]=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(A.dataPoints[w])}}switch(A.aggregationTemporality){default:if(typeof A.aggregationTemporality==="number"){O.aggregationTemporality=A.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:O.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:O.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:O.aggregationTemporality=2;break}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.dataPoints=[];if(O.defaults)w.aggregationTemporality=O.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(A.dataPoints&&A.dataPoints.length){w.dataPoints=[];for(var j=0;j<A.dataPoints.length;++j)w.dataPoints[j]=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(A.dataPoints[j],O)}if(A.aggregationTemporality!=null&&A.hasOwnProperty("aggregationTemporality"))w.aggregationTemporality=O.enums===String?a6.opentelemetry.proto.metrics.v1.AggregationTemporality[A.aggregationTemporality]===void 0?A.aggregationTemporality:a6.opentelemetry.proto.metrics.v1.AggregationTemporality[A.aggregationTemporality]:A.aggregationTemporality;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},Y}(),z.Summary=function(){function Y($){if(this.dataPoints=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.dataPoints=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.dataPoints!=null&&A.dataPoints.length)for(var w=0;w<A.dataPoints.length;++w)a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(A.dataPoints[w],O.uint32(10).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.Summary;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.dataPoints&&H.dataPoints.length))H.dataPoints=[];H.dataPoints.push(a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.dataPoints!=null&&A.hasOwnProperty("dataPoints")){if(!Array.isArray(A.dataPoints))return"dataPoints: array expected";for(var O=0;O<A.dataPoints.length;++O){var w=a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(A.dataPoints[O]);if(w)return"dataPoints."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.Summary)return A;var O=new a6.opentelemetry.proto.metrics.v1.Summary;if(A.dataPoints){if(!Array.isArray(A.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");O.dataPoints=[];for(var w=0;w<A.dataPoints.length;++w){if(typeof A.dataPoints[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");O.dataPoints[w]=a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(A.dataPoints[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.dataPoints=[];if(A.dataPoints&&A.dataPoints.length){w.dataPoints=[];for(var j=0;j<A.dataPoints.length;++j)w.dataPoints[j]=a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(A.dataPoints[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.Summary"},Y}(),z.AggregationTemporality=function(){var Y={},$=Object.create(Y);return $[Y[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,$[Y[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,$[Y[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,$}(),z.DataPointFlags=function(){var Y={},$=Object.create(Y);return $[Y[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,$[Y[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,$}(),z.NumberDataPoint=function(){function Y(A){if(this.attributes=[],this.exemplars=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}Y.prototype.attributes=e6.emptyArray,Y.prototype.startTimeUnixNano=null,Y.prototype.timeUnixNano=null,Y.prototype.asDouble=null,Y.prototype.asInt=null,Y.prototype.exemplars=e6.emptyArray,Y.prototype.flags=null;var $;return Object.defineProperty(Y.prototype,"value",{get:e6.oneOfGetter($=["asDouble","asInt"]),set:e6.oneOfSetter($)}),Y.create=function(O){return new Y(O)},Y.encode=function(O,w){if(!w)w=m9.create();if(O.startTimeUnixNano!=null&&Object.hasOwnProperty.call(O,"startTimeUnixNano"))w.uint32(17).fixed64(O.startTimeUnixNano);if(O.timeUnixNano!=null&&Object.hasOwnProperty.call(O,"timeUnixNano"))w.uint32(25).fixed64(O.timeUnixNano);if(O.asDouble!=null&&Object.hasOwnProperty.call(O,"asDouble"))w.uint32(33).double(O.asDouble);if(O.exemplars!=null&&O.exemplars.length)for(var j=0;j<O.exemplars.length;++j)a6.opentelemetry.proto.metrics.v1.Exemplar.encode(O.exemplars[j],w.uint32(42).fork()).ldelim();if(O.asInt!=null&&Object.hasOwnProperty.call(O,"asInt"))w.uint32(49).sfixed64(O.asInt);if(O.attributes!=null&&O.attributes.length)for(var j=0;j<O.attributes.length;++j)a6.opentelemetry.proto.common.v1.KeyValue.encode(O.attributes[j],w.uint32(58).fork()).ldelim();if(O.flags!=null&&Object.hasOwnProperty.call(O,"flags"))w.uint32(64).uint32(O.flags);return w},Y.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},Y.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.metrics.v1.NumberDataPoint;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 7:{if(!(J.attributes&&J.attributes.length))J.attributes=[];J.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(O,O.uint32()));break}case 2:{J.startTimeUnixNano=O.fixed64();break}case 3:{J.timeUnixNano=O.fixed64();break}case 4:{J.asDouble=O.double();break}case 6:{J.asInt=O.sfixed64();break}case 5:{if(!(J.exemplars&&J.exemplars.length))J.exemplars=[];J.exemplars.push(a6.opentelemetry.proto.metrics.v1.Exemplar.decode(O,O.uint32()));break}case 8:{J.flags=O.uint32();break}default:O.skipType(M&7);break}}return J},Y.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},Y.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";var w={};if(O.attributes!=null&&O.hasOwnProperty("attributes")){if(!Array.isArray(O.attributes))return"attributes: array expected";for(var j=0;j<O.attributes.length;++j){var H=a6.opentelemetry.proto.common.v1.KeyValue.verify(O.attributes[j]);if(H)return"attributes."+H}}if(O.startTimeUnixNano!=null&&O.hasOwnProperty("startTimeUnixNano")){if(!e6.isInteger(O.startTimeUnixNano)&&!(O.startTimeUnixNano&&e6.isInteger(O.startTimeUnixNano.low)&&e6.isInteger(O.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano")){if(!e6.isInteger(O.timeUnixNano)&&!(O.timeUnixNano&&e6.isInteger(O.timeUnixNano.low)&&e6.isInteger(O.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(O.asDouble!=null&&O.hasOwnProperty("asDouble")){if(w.value=1,typeof O.asDouble!=="number")return"asDouble: number expected"}if(O.asInt!=null&&O.hasOwnProperty("asInt")){if(w.value===1)return"value: multiple values";if(w.value=1,!e6.isInteger(O.asInt)&&!(O.asInt&&e6.isInteger(O.asInt.low)&&e6.isInteger(O.asInt.high)))return"asInt: integer|Long expected"}if(O.exemplars!=null&&O.hasOwnProperty("exemplars")){if(!Array.isArray(O.exemplars))return"exemplars: array expected";for(var j=0;j<O.exemplars.length;++j){var H=a6.opentelemetry.proto.metrics.v1.Exemplar.verify(O.exemplars[j]);if(H)return"exemplars."+H}}if(O.flags!=null&&O.hasOwnProperty("flags")){if(!e6.isInteger(O.flags))return"flags: integer expected"}return null},Y.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.metrics.v1.NumberDataPoint)return O;var w=new a6.opentelemetry.proto.metrics.v1.NumberDataPoint;if(O.attributes){if(!Array.isArray(O.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");w.attributes=[];for(var j=0;j<O.attributes.length;++j){if(typeof O.attributes[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");w.attributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(O.attributes[j])}}if(O.startTimeUnixNano!=null){if(e6.Long)(w.startTimeUnixNano=e6.Long.fromValue(O.startTimeUnixNano)).unsigned=!1;else if(typeof O.startTimeUnixNano==="string")w.startTimeUnixNano=parseInt(O.startTimeUnixNano,10);else if(typeof O.startTimeUnixNano==="number")w.startTimeUnixNano=O.startTimeUnixNano;else if(typeof O.startTimeUnixNano==="object")w.startTimeUnixNano=new e6.LongBits(O.startTimeUnixNano.low>>>0,O.startTimeUnixNano.high>>>0).toNumber()}if(O.timeUnixNano!=null){if(e6.Long)(w.timeUnixNano=e6.Long.fromValue(O.timeUnixNano)).unsigned=!1;else if(typeof O.timeUnixNano==="string")w.timeUnixNano=parseInt(O.timeUnixNano,10);else if(typeof O.timeUnixNano==="number")w.timeUnixNano=O.timeUnixNano;else if(typeof O.timeUnixNano==="object")w.timeUnixNano=new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber()}if(O.asDouble!=null)w.asDouble=Number(O.asDouble);if(O.asInt!=null){if(e6.Long)(w.asInt=e6.Long.fromValue(O.asInt)).unsigned=!1;else if(typeof O.asInt==="string")w.asInt=parseInt(O.asInt,10);else if(typeof O.asInt==="number")w.asInt=O.asInt;else if(typeof O.asInt==="object")w.asInt=new e6.LongBits(O.asInt.low>>>0,O.asInt.high>>>0).toNumber()}if(O.exemplars){if(!Array.isArray(O.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");w.exemplars=[];for(var j=0;j<O.exemplars.length;++j){if(typeof O.exemplars[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");w.exemplars[j]=a6.opentelemetry.proto.metrics.v1.Exemplar.fromObject(O.exemplars[j])}}if(O.flags!=null)w.flags=O.flags>>>0;return w},Y.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.exemplars=[],j.attributes=[];if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.startTimeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.startTimeUnixNano=w.longs===String?"0":0;if(e6.Long){var H=new e6.Long(0,0,!1);j.timeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.timeUnixNano=w.longs===String?"0":0;j.flags=0}if(O.startTimeUnixNano!=null&&O.hasOwnProperty("startTimeUnixNano"))if(typeof O.startTimeUnixNano==="number")j.startTimeUnixNano=w.longs===String?String(O.startTimeUnixNano):O.startTimeUnixNano;else j.startTimeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.startTimeUnixNano):w.longs===Number?new e6.LongBits(O.startTimeUnixNano.low>>>0,O.startTimeUnixNano.high>>>0).toNumber():O.startTimeUnixNano;if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano"))if(typeof O.timeUnixNano==="number")j.timeUnixNano=w.longs===String?String(O.timeUnixNano):O.timeUnixNano;else j.timeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.timeUnixNano):w.longs===Number?new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber():O.timeUnixNano;if(O.asDouble!=null&&O.hasOwnProperty("asDouble")){if(j.asDouble=w.json&&!isFinite(O.asDouble)?String(O.asDouble):O.asDouble,w.oneofs)j.value="asDouble"}if(O.exemplars&&O.exemplars.length){j.exemplars=[];for(var J=0;J<O.exemplars.length;++J)j.exemplars[J]=a6.opentelemetry.proto.metrics.v1.Exemplar.toObject(O.exemplars[J],w)}if(O.asInt!=null&&O.hasOwnProperty("asInt")){if(typeof O.asInt==="number")j.asInt=w.longs===String?String(O.asInt):O.asInt;else j.asInt=w.longs===String?e6.Long.prototype.toString.call(O.asInt):w.longs===Number?new e6.LongBits(O.asInt.low>>>0,O.asInt.high>>>0).toNumber():O.asInt;if(w.oneofs)j.value="asInt"}if(O.attributes&&O.attributes.length){j.attributes=[];for(var J=0;J<O.attributes.length;++J)j.attributes[J]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(O.attributes[J],w)}if(O.flags!=null&&O.hasOwnProperty("flags"))j.flags=O.flags;return j},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},Y}(),z.HistogramDataPoint=function(){function Y(A){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}Y.prototype.attributes=e6.emptyArray,Y.prototype.startTimeUnixNano=null,Y.prototype.timeUnixNano=null,Y.prototype.count=null,Y.prototype.sum=null,Y.prototype.bucketCounts=e6.emptyArray,Y.prototype.explicitBounds=e6.emptyArray,Y.prototype.exemplars=e6.emptyArray,Y.prototype.flags=null,Y.prototype.min=null,Y.prototype.max=null;var $;return Object.defineProperty(Y.prototype,"_sum",{get:e6.oneOfGetter($=["sum"]),set:e6.oneOfSetter($)}),Object.defineProperty(Y.prototype,"_min",{get:e6.oneOfGetter($=["min"]),set:e6.oneOfSetter($)}),Object.defineProperty(Y.prototype,"_max",{get:e6.oneOfGetter($=["max"]),set:e6.oneOfSetter($)}),Y.create=function(O){return new Y(O)},Y.encode=function(O,w){if(!w)w=m9.create();if(O.startTimeUnixNano!=null&&Object.hasOwnProperty.call(O,"startTimeUnixNano"))w.uint32(17).fixed64(O.startTimeUnixNano);if(O.timeUnixNano!=null&&Object.hasOwnProperty.call(O,"timeUnixNano"))w.uint32(25).fixed64(O.timeUnixNano);if(O.count!=null&&Object.hasOwnProperty.call(O,"count"))w.uint32(33).fixed64(O.count);if(O.sum!=null&&Object.hasOwnProperty.call(O,"sum"))w.uint32(41).double(O.sum);if(O.bucketCounts!=null&&O.bucketCounts.length){w.uint32(50).fork();for(var j=0;j<O.bucketCounts.length;++j)w.fixed64(O.bucketCounts[j]);w.ldelim()}if(O.explicitBounds!=null&&O.explicitBounds.length){w.uint32(58).fork();for(var j=0;j<O.explicitBounds.length;++j)w.double(O.explicitBounds[j]);w.ldelim()}if(O.exemplars!=null&&O.exemplars.length)for(var j=0;j<O.exemplars.length;++j)a6.opentelemetry.proto.metrics.v1.Exemplar.encode(O.exemplars[j],w.uint32(66).fork()).ldelim();if(O.attributes!=null&&O.attributes.length)for(var j=0;j<O.attributes.length;++j)a6.opentelemetry.proto.common.v1.KeyValue.encode(O.attributes[j],w.uint32(74).fork()).ldelim();if(O.flags!=null&&Object.hasOwnProperty.call(O,"flags"))w.uint32(80).uint32(O.flags);if(O.min!=null&&Object.hasOwnProperty.call(O,"min"))w.uint32(89).double(O.min);if(O.max!=null&&Object.hasOwnProperty.call(O,"max"))w.uint32(97).double(O.max);return w},Y.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},Y.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.metrics.v1.HistogramDataPoint;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 9:{if(!(J.attributes&&J.attributes.length))J.attributes=[];J.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(O,O.uint32()));break}case 2:{J.startTimeUnixNano=O.fixed64();break}case 3:{J.timeUnixNano=O.fixed64();break}case 4:{J.count=O.fixed64();break}case 5:{J.sum=O.double();break}case 6:{if(!(J.bucketCounts&&J.bucketCounts.length))J.bucketCounts=[];if((M&7)===2){var X=O.uint32()+O.pos;while(O.pos<X)J.bucketCounts.push(O.fixed64())}else J.bucketCounts.push(O.fixed64());break}case 7:{if(!(J.explicitBounds&&J.explicitBounds.length))J.explicitBounds=[];if((M&7)===2){var X=O.uint32()+O.pos;while(O.pos<X)J.explicitBounds.push(O.double())}else J.explicitBounds.push(O.double());break}case 8:{if(!(J.exemplars&&J.exemplars.length))J.exemplars=[];J.exemplars.push(a6.opentelemetry.proto.metrics.v1.Exemplar.decode(O,O.uint32()));break}case 10:{J.flags=O.uint32();break}case 11:{J.min=O.double();break}case 12:{J.max=O.double();break}default:O.skipType(M&7);break}}return J},Y.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},Y.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";var w={};if(O.attributes!=null&&O.hasOwnProperty("attributes")){if(!Array.isArray(O.attributes))return"attributes: array expected";for(var j=0;j<O.attributes.length;++j){var H=a6.opentelemetry.proto.common.v1.KeyValue.verify(O.attributes[j]);if(H)return"attributes."+H}}if(O.startTimeUnixNano!=null&&O.hasOwnProperty("startTimeUnixNano")){if(!e6.isInteger(O.startTimeUnixNano)&&!(O.startTimeUnixNano&&e6.isInteger(O.startTimeUnixNano.low)&&e6.isInteger(O.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano")){if(!e6.isInteger(O.timeUnixNano)&&!(O.timeUnixNano&&e6.isInteger(O.timeUnixNano.low)&&e6.isInteger(O.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(O.count!=null&&O.hasOwnProperty("count")){if(!e6.isInteger(O.count)&&!(O.count&&e6.isInteger(O.count.low)&&e6.isInteger(O.count.high)))return"count: integer|Long expected"}if(O.sum!=null&&O.hasOwnProperty("sum")){if(w._sum=1,typeof O.sum!=="number")return"sum: number expected"}if(O.bucketCounts!=null&&O.hasOwnProperty("bucketCounts")){if(!Array.isArray(O.bucketCounts))return"bucketCounts: array expected";for(var j=0;j<O.bucketCounts.length;++j)if(!e6.isInteger(O.bucketCounts[j])&&!(O.bucketCounts[j]&&e6.isInteger(O.bucketCounts[j].low)&&e6.isInteger(O.bucketCounts[j].high)))return"bucketCounts: integer|Long[] expected"}if(O.explicitBounds!=null&&O.hasOwnProperty("explicitBounds")){if(!Array.isArray(O.explicitBounds))return"explicitBounds: array expected";for(var j=0;j<O.explicitBounds.length;++j)if(typeof O.explicitBounds[j]!=="number")return"explicitBounds: number[] expected"}if(O.exemplars!=null&&O.hasOwnProperty("exemplars")){if(!Array.isArray(O.exemplars))return"exemplars: array expected";for(var j=0;j<O.exemplars.length;++j){var H=a6.opentelemetry.proto.metrics.v1.Exemplar.verify(O.exemplars[j]);if(H)return"exemplars."+H}}if(O.flags!=null&&O.hasOwnProperty("flags")){if(!e6.isInteger(O.flags))return"flags: integer expected"}if(O.min!=null&&O.hasOwnProperty("min")){if(w._min=1,typeof O.min!=="number")return"min: number expected"}if(O.max!=null&&O.hasOwnProperty("max")){if(w._max=1,typeof O.max!=="number")return"max: number expected"}return null},Y.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.metrics.v1.HistogramDataPoint)return O;var w=new a6.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(O.attributes){if(!Array.isArray(O.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");w.attributes=[];for(var j=0;j<O.attributes.length;++j){if(typeof O.attributes[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");w.attributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(O.attributes[j])}}if(O.startTimeUnixNano!=null){if(e6.Long)(w.startTimeUnixNano=e6.Long.fromValue(O.startTimeUnixNano)).unsigned=!1;else if(typeof O.startTimeUnixNano==="string")w.startTimeUnixNano=parseInt(O.startTimeUnixNano,10);else if(typeof O.startTimeUnixNano==="number")w.startTimeUnixNano=O.startTimeUnixNano;else if(typeof O.startTimeUnixNano==="object")w.startTimeUnixNano=new e6.LongBits(O.startTimeUnixNano.low>>>0,O.startTimeUnixNano.high>>>0).toNumber()}if(O.timeUnixNano!=null){if(e6.Long)(w.timeUnixNano=e6.Long.fromValue(O.timeUnixNano)).unsigned=!1;else if(typeof O.timeUnixNano==="string")w.timeUnixNano=parseInt(O.timeUnixNano,10);else if(typeof O.timeUnixNano==="number")w.timeUnixNano=O.timeUnixNano;else if(typeof O.timeUnixNano==="object")w.timeUnixNano=new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber()}if(O.count!=null){if(e6.Long)(w.count=e6.Long.fromValue(O.count)).unsigned=!1;else if(typeof O.count==="string")w.count=parseInt(O.count,10);else if(typeof O.count==="number")w.count=O.count;else if(typeof O.count==="object")w.count=new e6.LongBits(O.count.low>>>0,O.count.high>>>0).toNumber()}if(O.sum!=null)w.sum=Number(O.sum);if(O.bucketCounts){if(!Array.isArray(O.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");w.bucketCounts=[];for(var j=0;j<O.bucketCounts.length;++j)if(e6.Long)(w.bucketCounts[j]=e6.Long.fromValue(O.bucketCounts[j])).unsigned=!1;else if(typeof O.bucketCounts[j]==="string")w.bucketCounts[j]=parseInt(O.bucketCounts[j],10);else if(typeof O.bucketCounts[j]==="number")w.bucketCounts[j]=O.bucketCounts[j];else if(typeof O.bucketCounts[j]==="object")w.bucketCounts[j]=new e6.LongBits(O.bucketCounts[j].low>>>0,O.bucketCounts[j].high>>>0).toNumber()}if(O.explicitBounds){if(!Array.isArray(O.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");w.explicitBounds=[];for(var j=0;j<O.explicitBounds.length;++j)w.explicitBounds[j]=Number(O.explicitBounds[j])}if(O.exemplars){if(!Array.isArray(O.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");w.exemplars=[];for(var j=0;j<O.exemplars.length;++j){if(typeof O.exemplars[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");w.exemplars[j]=a6.opentelemetry.proto.metrics.v1.Exemplar.fromObject(O.exemplars[j])}}if(O.flags!=null)w.flags=O.flags>>>0;if(O.min!=null)w.min=Number(O.min);if(O.max!=null)w.max=Number(O.max);return w},Y.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.bucketCounts=[],j.explicitBounds=[],j.exemplars=[],j.attributes=[];if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.startTimeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.startTimeUnixNano=w.longs===String?"0":0;if(e6.Long){var H=new e6.Long(0,0,!1);j.timeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.timeUnixNano=w.longs===String?"0":0;if(e6.Long){var H=new e6.Long(0,0,!1);j.count=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.count=w.longs===String?"0":0;j.flags=0}if(O.startTimeUnixNano!=null&&O.hasOwnProperty("startTimeUnixNano"))if(typeof O.startTimeUnixNano==="number")j.startTimeUnixNano=w.longs===String?String(O.startTimeUnixNano):O.startTimeUnixNano;else j.startTimeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.startTimeUnixNano):w.longs===Number?new e6.LongBits(O.startTimeUnixNano.low>>>0,O.startTimeUnixNano.high>>>0).toNumber():O.startTimeUnixNano;if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano"))if(typeof O.timeUnixNano==="number")j.timeUnixNano=w.longs===String?String(O.timeUnixNano):O.timeUnixNano;else j.timeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.timeUnixNano):w.longs===Number?new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber():O.timeUnixNano;if(O.count!=null&&O.hasOwnProperty("count"))if(typeof O.count==="number")j.count=w.longs===String?String(O.count):O.count;else j.count=w.longs===String?e6.Long.prototype.toString.call(O.count):w.longs===Number?new e6.LongBits(O.count.low>>>0,O.count.high>>>0).toNumber():O.count;if(O.sum!=null&&O.hasOwnProperty("sum")){if(j.sum=w.json&&!isFinite(O.sum)?String(O.sum):O.sum,w.oneofs)j._sum="sum"}if(O.bucketCounts&&O.bucketCounts.length){j.bucketCounts=[];for(var J=0;J<O.bucketCounts.length;++J)if(typeof O.bucketCounts[J]==="number")j.bucketCounts[J]=w.longs===String?String(O.bucketCounts[J]):O.bucketCounts[J];else j.bucketCounts[J]=w.longs===String?e6.Long.prototype.toString.call(O.bucketCounts[J]):w.longs===Number?new e6.LongBits(O.bucketCounts[J].low>>>0,O.bucketCounts[J].high>>>0).toNumber():O.bucketCounts[J]}if(O.explicitBounds&&O.explicitBounds.length){j.explicitBounds=[];for(var J=0;J<O.explicitBounds.length;++J)j.explicitBounds[J]=w.json&&!isFinite(O.explicitBounds[J])?String(O.explicitBounds[J]):O.explicitBounds[J]}if(O.exemplars&&O.exemplars.length){j.exemplars=[];for(var J=0;J<O.exemplars.length;++J)j.exemplars[J]=a6.opentelemetry.proto.metrics.v1.Exemplar.toObject(O.exemplars[J],w)}if(O.attributes&&O.attributes.length){j.attributes=[];for(var J=0;J<O.attributes.length;++J)j.attributes[J]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(O.attributes[J],w)}if(O.flags!=null&&O.hasOwnProperty("flags"))j.flags=O.flags;if(O.min!=null&&O.hasOwnProperty("min")){if(j.min=w.json&&!isFinite(O.min)?String(O.min):O.min,w.oneofs)j._min="min"}if(O.max!=null&&O.hasOwnProperty("max")){if(j.max=w.json&&!isFinite(O.max)?String(O.max):O.max,w.oneofs)j._max="max"}return j},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},Y}(),z.ExponentialHistogramDataPoint=function(){function Y(A){if(this.attributes=[],this.exemplars=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}Y.prototype.attributes=e6.emptyArray,Y.prototype.startTimeUnixNano=null,Y.prototype.timeUnixNano=null,Y.prototype.count=null,Y.prototype.sum=null,Y.prototype.scale=null,Y.prototype.zeroCount=null,Y.prototype.positive=null,Y.prototype.negative=null,Y.prototype.flags=null,Y.prototype.exemplars=e6.emptyArray,Y.prototype.min=null,Y.prototype.max=null,Y.prototype.zeroThreshold=null;var $;return Object.defineProperty(Y.prototype,"_sum",{get:e6.oneOfGetter($=["sum"]),set:e6.oneOfSetter($)}),Object.defineProperty(Y.prototype,"_min",{get:e6.oneOfGetter($=["min"]),set:e6.oneOfSetter($)}),Object.defineProperty(Y.prototype,"_max",{get:e6.oneOfGetter($=["max"]),set:e6.oneOfSetter($)}),Y.create=function(O){return new Y(O)},Y.encode=function(O,w){if(!w)w=m9.create();if(O.attributes!=null&&O.attributes.length)for(var j=0;j<O.attributes.length;++j)a6.opentelemetry.proto.common.v1.KeyValue.encode(O.attributes[j],w.uint32(10).fork()).ldelim();if(O.startTimeUnixNano!=null&&Object.hasOwnProperty.call(O,"startTimeUnixNano"))w.uint32(17).fixed64(O.startTimeUnixNano);if(O.timeUnixNano!=null&&Object.hasOwnProperty.call(O,"timeUnixNano"))w.uint32(25).fixed64(O.timeUnixNano);if(O.count!=null&&Object.hasOwnProperty.call(O,"count"))w.uint32(33).fixed64(O.count);if(O.sum!=null&&Object.hasOwnProperty.call(O,"sum"))w.uint32(41).double(O.sum);if(O.scale!=null&&Object.hasOwnProperty.call(O,"scale"))w.uint32(48).sint32(O.scale);if(O.zeroCount!=null&&Object.hasOwnProperty.call(O,"zeroCount"))w.uint32(57).fixed64(O.zeroCount);if(O.positive!=null&&Object.hasOwnProperty.call(O,"positive"))a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(O.positive,w.uint32(66).fork()).ldelim();if(O.negative!=null&&Object.hasOwnProperty.call(O,"negative"))a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(O.negative,w.uint32(74).fork()).ldelim();if(O.flags!=null&&Object.hasOwnProperty.call(O,"flags"))w.uint32(80).uint32(O.flags);if(O.exemplars!=null&&O.exemplars.length)for(var j=0;j<O.exemplars.length;++j)a6.opentelemetry.proto.metrics.v1.Exemplar.encode(O.exemplars[j],w.uint32(90).fork()).ldelim();if(O.min!=null&&Object.hasOwnProperty.call(O,"min"))w.uint32(97).double(O.min);if(O.max!=null&&Object.hasOwnProperty.call(O,"max"))w.uint32(105).double(O.max);if(O.zeroThreshold!=null&&Object.hasOwnProperty.call(O,"zeroThreshold"))w.uint32(113).double(O.zeroThreshold);return w},Y.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},Y.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{if(!(J.attributes&&J.attributes.length))J.attributes=[];J.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(O,O.uint32()));break}case 2:{J.startTimeUnixNano=O.fixed64();break}case 3:{J.timeUnixNano=O.fixed64();break}case 4:{J.count=O.fixed64();break}case 5:{J.sum=O.double();break}case 6:{J.scale=O.sint32();break}case 7:{J.zeroCount=O.fixed64();break}case 8:{J.positive=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(O,O.uint32());break}case 9:{J.negative=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(O,O.uint32());break}case 10:{J.flags=O.uint32();break}case 11:{if(!(J.exemplars&&J.exemplars.length))J.exemplars=[];J.exemplars.push(a6.opentelemetry.proto.metrics.v1.Exemplar.decode(O,O.uint32()));break}case 12:{J.min=O.double();break}case 13:{J.max=O.double();break}case 14:{J.zeroThreshold=O.double();break}default:O.skipType(M&7);break}}return J},Y.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},Y.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";var w={};if(O.attributes!=null&&O.hasOwnProperty("attributes")){if(!Array.isArray(O.attributes))return"attributes: array expected";for(var j=0;j<O.attributes.length;++j){var H=a6.opentelemetry.proto.common.v1.KeyValue.verify(O.attributes[j]);if(H)return"attributes."+H}}if(O.startTimeUnixNano!=null&&O.hasOwnProperty("startTimeUnixNano")){if(!e6.isInteger(O.startTimeUnixNano)&&!(O.startTimeUnixNano&&e6.isInteger(O.startTimeUnixNano.low)&&e6.isInteger(O.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano")){if(!e6.isInteger(O.timeUnixNano)&&!(O.timeUnixNano&&e6.isInteger(O.timeUnixNano.low)&&e6.isInteger(O.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(O.count!=null&&O.hasOwnProperty("count")){if(!e6.isInteger(O.count)&&!(O.count&&e6.isInteger(O.count.low)&&e6.isInteger(O.count.high)))return"count: integer|Long expected"}if(O.sum!=null&&O.hasOwnProperty("sum")){if(w._sum=1,typeof O.sum!=="number")return"sum: number expected"}if(O.scale!=null&&O.hasOwnProperty("scale")){if(!e6.isInteger(O.scale))return"scale: integer expected"}if(O.zeroCount!=null&&O.hasOwnProperty("zeroCount")){if(!e6.isInteger(O.zeroCount)&&!(O.zeroCount&&e6.isInteger(O.zeroCount.low)&&e6.isInteger(O.zeroCount.high)))return"zeroCount: integer|Long expected"}if(O.positive!=null&&O.hasOwnProperty("positive")){var H=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(O.positive);if(H)return"positive."+H}if(O.negative!=null&&O.hasOwnProperty("negative")){var H=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(O.negative);if(H)return"negative."+H}if(O.flags!=null&&O.hasOwnProperty("flags")){if(!e6.isInteger(O.flags))return"flags: integer expected"}if(O.exemplars!=null&&O.hasOwnProperty("exemplars")){if(!Array.isArray(O.exemplars))return"exemplars: array expected";for(var j=0;j<O.exemplars.length;++j){var H=a6.opentelemetry.proto.metrics.v1.Exemplar.verify(O.exemplars[j]);if(H)return"exemplars."+H}}if(O.min!=null&&O.hasOwnProperty("min")){if(w._min=1,typeof O.min!=="number")return"min: number expected"}if(O.max!=null&&O.hasOwnProperty("max")){if(w._max=1,typeof O.max!=="number")return"max: number expected"}if(O.zeroThreshold!=null&&O.hasOwnProperty("zeroThreshold")){if(typeof O.zeroThreshold!=="number")return"zeroThreshold: number expected"}return null},Y.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return O;var w=new a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(O.attributes){if(!Array.isArray(O.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");w.attributes=[];for(var j=0;j<O.attributes.length;++j){if(typeof O.attributes[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");w.attributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(O.attributes[j])}}if(O.startTimeUnixNano!=null){if(e6.Long)(w.startTimeUnixNano=e6.Long.fromValue(O.startTimeUnixNano)).unsigned=!1;else if(typeof O.startTimeUnixNano==="string")w.startTimeUnixNano=parseInt(O.startTimeUnixNano,10);else if(typeof O.startTimeUnixNano==="number")w.startTimeUnixNano=O.startTimeUnixNano;else if(typeof O.startTimeUnixNano==="object")w.startTimeUnixNano=new e6.LongBits(O.startTimeUnixNano.low>>>0,O.startTimeUnixNano.high>>>0).toNumber()}if(O.timeUnixNano!=null){if(e6.Long)(w.timeUnixNano=e6.Long.fromValue(O.timeUnixNano)).unsigned=!1;else if(typeof O.timeUnixNano==="string")w.timeUnixNano=parseInt(O.timeUnixNano,10);else if(typeof O.timeUnixNano==="number")w.timeUnixNano=O.timeUnixNano;else if(typeof O.timeUnixNano==="object")w.timeUnixNano=new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber()}if(O.count!=null){if(e6.Long)(w.count=e6.Long.fromValue(O.count)).unsigned=!1;else if(typeof O.count==="string")w.count=parseInt(O.count,10);else if(typeof O.count==="number")w.count=O.count;else if(typeof O.count==="object")w.count=new e6.LongBits(O.count.low>>>0,O.count.high>>>0).toNumber()}if(O.sum!=null)w.sum=Number(O.sum);if(O.scale!=null)w.scale=O.scale|0;if(O.zeroCount!=null){if(e6.Long)(w.zeroCount=e6.Long.fromValue(O.zeroCount)).unsigned=!1;else if(typeof O.zeroCount==="string")w.zeroCount=parseInt(O.zeroCount,10);else if(typeof O.zeroCount==="number")w.zeroCount=O.zeroCount;else if(typeof O.zeroCount==="object")w.zeroCount=new e6.LongBits(O.zeroCount.low>>>0,O.zeroCount.high>>>0).toNumber()}if(O.positive!=null){if(typeof O.positive!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");w.positive=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(O.positive)}if(O.negative!=null){if(typeof O.negative!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");w.negative=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(O.negative)}if(O.flags!=null)w.flags=O.flags>>>0;if(O.exemplars){if(!Array.isArray(O.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");w.exemplars=[];for(var j=0;j<O.exemplars.length;++j){if(typeof O.exemplars[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");w.exemplars[j]=a6.opentelemetry.proto.metrics.v1.Exemplar.fromObject(O.exemplars[j])}}if(O.min!=null)w.min=Number(O.min);if(O.max!=null)w.max=Number(O.max);if(O.zeroThreshold!=null)w.zeroThreshold=Number(O.zeroThreshold);return w},Y.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.attributes=[],j.exemplars=[];if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.startTimeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.startTimeUnixNano=w.longs===String?"0":0;if(e6.Long){var H=new e6.Long(0,0,!1);j.timeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.timeUnixNano=w.longs===String?"0":0;if(e6.Long){var H=new e6.Long(0,0,!1);j.count=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.count=w.longs===String?"0":0;if(j.scale=0,e6.Long){var H=new e6.Long(0,0,!1);j.zeroCount=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.zeroCount=w.longs===String?"0":0;j.positive=null,j.negative=null,j.flags=0,j.zeroThreshold=0}if(O.attributes&&O.attributes.length){j.attributes=[];for(var J=0;J<O.attributes.length;++J)j.attributes[J]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(O.attributes[J],w)}if(O.startTimeUnixNano!=null&&O.hasOwnProperty("startTimeUnixNano"))if(typeof O.startTimeUnixNano==="number")j.startTimeUnixNano=w.longs===String?String(O.startTimeUnixNano):O.startTimeUnixNano;else j.startTimeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.startTimeUnixNano):w.longs===Number?new e6.LongBits(O.startTimeUnixNano.low>>>0,O.startTimeUnixNano.high>>>0).toNumber():O.startTimeUnixNano;if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano"))if(typeof O.timeUnixNano==="number")j.timeUnixNano=w.longs===String?String(O.timeUnixNano):O.timeUnixNano;else j.timeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.timeUnixNano):w.longs===Number?new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber():O.timeUnixNano;if(O.count!=null&&O.hasOwnProperty("count"))if(typeof O.count==="number")j.count=w.longs===String?String(O.count):O.count;else j.count=w.longs===String?e6.Long.prototype.toString.call(O.count):w.longs===Number?new e6.LongBits(O.count.low>>>0,O.count.high>>>0).toNumber():O.count;if(O.sum!=null&&O.hasOwnProperty("sum")){if(j.sum=w.json&&!isFinite(O.sum)?String(O.sum):O.sum,w.oneofs)j._sum="sum"}if(O.scale!=null&&O.hasOwnProperty("scale"))j.scale=O.scale;if(O.zeroCount!=null&&O.hasOwnProperty("zeroCount"))if(typeof O.zeroCount==="number")j.zeroCount=w.longs===String?String(O.zeroCount):O.zeroCount;else j.zeroCount=w.longs===String?e6.Long.prototype.toString.call(O.zeroCount):w.longs===Number?new e6.LongBits(O.zeroCount.low>>>0,O.zeroCount.high>>>0).toNumber():O.zeroCount;if(O.positive!=null&&O.hasOwnProperty("positive"))j.positive=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(O.positive,w);if(O.negative!=null&&O.hasOwnProperty("negative"))j.negative=a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(O.negative,w);if(O.flags!=null&&O.hasOwnProperty("flags"))j.flags=O.flags;if(O.exemplars&&O.exemplars.length){j.exemplars=[];for(var J=0;J<O.exemplars.length;++J)j.exemplars[J]=a6.opentelemetry.proto.metrics.v1.Exemplar.toObject(O.exemplars[J],w)}if(O.min!=null&&O.hasOwnProperty("min")){if(j.min=w.json&&!isFinite(O.min)?String(O.min):O.min,w.oneofs)j._min="min"}if(O.max!=null&&O.hasOwnProperty("max")){if(j.max=w.json&&!isFinite(O.max)?String(O.max):O.max,w.oneofs)j._max="max"}if(O.zeroThreshold!=null&&O.hasOwnProperty("zeroThreshold"))j.zeroThreshold=w.json&&!isFinite(O.zeroThreshold)?String(O.zeroThreshold):O.zeroThreshold;return j},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},Y.Buckets=function(){function A(O){if(this.bucketCounts=[],O){for(var w=Object.keys(O),j=0;j<w.length;++j)if(O[w[j]]!=null)this[w[j]]=O[w[j]]}}return A.prototype.offset=null,A.prototype.bucketCounts=e6.emptyArray,A.create=function(w){return new A(w)},A.encode=function(w,j){if(!j)j=m9.create();if(w.offset!=null&&Object.hasOwnProperty.call(w,"offset"))j.uint32(8).sint32(w.offset);if(w.bucketCounts!=null&&w.bucketCounts.length){j.uint32(18).fork();for(var H=0;H<w.bucketCounts.length;++H)j.uint64(w.bucketCounts[H]);j.ldelim()}return j},A.encodeDelimited=function(w,j){return this.encode(w,j).ldelim()},A.decode=function(w,j,H){if(!(w instanceof D1))w=D1.create(w);var J=j===void 0?w.len:w.pos+j,M=new a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;while(w.pos<J){var X=w.uint32();if(X===H)break;switch(X>>>3){case 1:{M.offset=w.sint32();break}case 2:{if(!(M.bucketCounts&&M.bucketCounts.length))M.bucketCounts=[];if((X&7)===2){var P=w.uint32()+w.pos;while(w.pos<P)M.bucketCounts.push(w.uint64())}else M.bucketCounts.push(w.uint64());break}default:w.skipType(X&7);break}}return M},A.decodeDelimited=function(w){if(!(w instanceof D1))w=new D1(w);return this.decode(w,w.uint32())},A.verify=function(w){if(typeof w!=="object"||w===null)return"object expected";if(w.offset!=null&&w.hasOwnProperty("offset")){if(!e6.isInteger(w.offset))return"offset: integer expected"}if(w.bucketCounts!=null&&w.hasOwnProperty("bucketCounts")){if(!Array.isArray(w.bucketCounts))return"bucketCounts: array expected";for(var j=0;j<w.bucketCounts.length;++j)if(!e6.isInteger(w.bucketCounts[j])&&!(w.bucketCounts[j]&&e6.isInteger(w.bucketCounts[j].low)&&e6.isInteger(w.bucketCounts[j].high)))return"bucketCounts: integer|Long[] expected"}return null},A.fromObject=function(w){if(w instanceof a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return w;var j=new a6.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(w.offset!=null)j.offset=w.offset|0;if(w.bucketCounts){if(!Array.isArray(w.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");j.bucketCounts=[];for(var H=0;H<w.bucketCounts.length;++H)if(e6.Long)(j.bucketCounts[H]=e6.Long.fromValue(w.bucketCounts[H])).unsigned=!0;else if(typeof w.bucketCounts[H]==="string")j.bucketCounts[H]=parseInt(w.bucketCounts[H],10);else if(typeof w.bucketCounts[H]==="number")j.bucketCounts[H]=w.bucketCounts[H];else if(typeof w.bucketCounts[H]==="object")j.bucketCounts[H]=new e6.LongBits(w.bucketCounts[H].low>>>0,w.bucketCounts[H].high>>>0).toNumber(!0)}return j},A.toObject=function(w,j){if(!j)j={};var H={};if(j.arrays||j.defaults)H.bucketCounts=[];if(j.defaults)H.offset=0;if(w.offset!=null&&w.hasOwnProperty("offset"))H.offset=w.offset;if(w.bucketCounts&&w.bucketCounts.length){H.bucketCounts=[];for(var J=0;J<w.bucketCounts.length;++J)if(typeof w.bucketCounts[J]==="number")H.bucketCounts[J]=j.longs===String?String(w.bucketCounts[J]):w.bucketCounts[J];else H.bucketCounts[J]=j.longs===String?e6.Long.prototype.toString.call(w.bucketCounts[J]):j.longs===Number?new e6.LongBits(w.bucketCounts[J].low>>>0,w.bucketCounts[J].high>>>0).toNumber(!0):w.bucketCounts[J]}return H},A.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},A.getTypeUrl=function(w){if(w===void 0)w="type.googleapis.com";return w+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},A}(),Y}(),z.SummaryDataPoint=function(){function Y($){if(this.attributes=[],this.quantileValues=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.attributes=e6.emptyArray,Y.prototype.startTimeUnixNano=null,Y.prototype.timeUnixNano=null,Y.prototype.count=null,Y.prototype.sum=null,Y.prototype.quantileValues=e6.emptyArray,Y.prototype.flags=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.startTimeUnixNano!=null&&Object.hasOwnProperty.call(A,"startTimeUnixNano"))O.uint32(17).fixed64(A.startTimeUnixNano);if(A.timeUnixNano!=null&&Object.hasOwnProperty.call(A,"timeUnixNano"))O.uint32(25).fixed64(A.timeUnixNano);if(A.count!=null&&Object.hasOwnProperty.call(A,"count"))O.uint32(33).fixed64(A.count);if(A.sum!=null&&Object.hasOwnProperty.call(A,"sum"))O.uint32(41).double(A.sum);if(A.quantileValues!=null&&A.quantileValues.length)for(var w=0;w<A.quantileValues.length;++w)a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(A.quantileValues[w],O.uint32(50).fork()).ldelim();if(A.attributes!=null&&A.attributes.length)for(var w=0;w<A.attributes.length;++w)a6.opentelemetry.proto.common.v1.KeyValue.encode(A.attributes[w],O.uint32(58).fork()).ldelim();if(A.flags!=null&&Object.hasOwnProperty.call(A,"flags"))O.uint32(64).uint32(A.flags);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.metrics.v1.SummaryDataPoint;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 7:{if(!(H.attributes&&H.attributes.length))H.attributes=[];H.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(A,A.uint32()));break}case 2:{H.startTimeUnixNano=A.fixed64();break}case 3:{H.timeUnixNano=A.fixed64();break}case 4:{H.count=A.fixed64();break}case 5:{H.sum=A.double();break}case 6:{if(!(H.quantileValues&&H.quantileValues.length))H.quantileValues=[];H.quantileValues.push(a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(A,A.uint32()));break}case 8:{H.flags=A.uint32();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.attributes!=null&&A.hasOwnProperty("attributes")){if(!Array.isArray(A.attributes))return"attributes: array expected";for(var O=0;O<A.attributes.length;++O){var w=a6.opentelemetry.proto.common.v1.KeyValue.verify(A.attributes[O]);if(w)return"attributes."+w}}if(A.startTimeUnixNano!=null&&A.hasOwnProperty("startTimeUnixNano")){if(!e6.isInteger(A.startTimeUnixNano)&&!(A.startTimeUnixNano&&e6.isInteger(A.startTimeUnixNano.low)&&e6.isInteger(A.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(A.timeUnixNano!=null&&A.hasOwnProperty("timeUnixNano")){if(!e6.isInteger(A.timeUnixNano)&&!(A.timeUnixNano&&e6.isInteger(A.timeUnixNano.low)&&e6.isInteger(A.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(A.count!=null&&A.hasOwnProperty("count")){if(!e6.isInteger(A.count)&&!(A.count&&e6.isInteger(A.count.low)&&e6.isInteger(A.count.high)))return"count: integer|Long expected"}if(A.sum!=null&&A.hasOwnProperty("sum")){if(typeof A.sum!=="number")return"sum: number expected"}if(A.quantileValues!=null&&A.hasOwnProperty("quantileValues")){if(!Array.isArray(A.quantileValues))return"quantileValues: array expected";for(var O=0;O<A.quantileValues.length;++O){var w=a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(A.quantileValues[O]);if(w)return"quantileValues."+w}}if(A.flags!=null&&A.hasOwnProperty("flags")){if(!e6.isInteger(A.flags))return"flags: integer expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.metrics.v1.SummaryDataPoint)return A;var O=new a6.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(A.attributes){if(!Array.isArray(A.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");O.attributes=[];for(var w=0;w<A.attributes.length;++w){if(typeof A.attributes[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");O.attributes[w]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(A.attributes[w])}}if(A.startTimeUnixNano!=null){if(e6.Long)(O.startTimeUnixNano=e6.Long.fromValue(A.startTimeUnixNano)).unsigned=!1;else if(typeof A.startTimeUnixNano==="string")O.startTimeUnixNano=parseInt(A.startTimeUnixNano,10);else if(typeof A.startTimeUnixNano==="number")O.startTimeUnixNano=A.startTimeUnixNano;else if(typeof A.startTimeUnixNano==="object")O.startTimeUnixNano=new e6.LongBits(A.startTimeUnixNano.low>>>0,A.startTimeUnixNano.high>>>0).toNumber()}if(A.timeUnixNano!=null){if(e6.Long)(O.timeUnixNano=e6.Long.fromValue(A.timeUnixNano)).unsigned=!1;else if(typeof A.timeUnixNano==="string")O.timeUnixNano=parseInt(A.timeUnixNano,10);else if(typeof A.timeUnixNano==="number")O.timeUnixNano=A.timeUnixNano;else if(typeof A.timeUnixNano==="object")O.timeUnixNano=new e6.LongBits(A.timeUnixNano.low>>>0,A.timeUnixNano.high>>>0).toNumber()}if(A.count!=null){if(e6.Long)(O.count=e6.Long.fromValue(A.count)).unsigned=!1;else if(typeof A.count==="string")O.count=parseInt(A.count,10);else if(typeof A.count==="number")O.count=A.count;else if(typeof A.count==="object")O.count=new e6.LongBits(A.count.low>>>0,A.count.high>>>0).toNumber()}if(A.sum!=null)O.sum=Number(A.sum);if(A.quantileValues){if(!Array.isArray(A.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");O.quantileValues=[];for(var w=0;w<A.quantileValues.length;++w){if(typeof A.quantileValues[w]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");O.quantileValues[w]=a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(A.quantileValues[w])}}if(A.flags!=null)O.flags=A.flags>>>0;return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.quantileValues=[],w.attributes=[];if(O.defaults){if(e6.Long){var j=new e6.Long(0,0,!1);w.startTimeUnixNano=O.longs===String?j.toString():O.longs===Number?j.toNumber():j}else w.startTimeUnixNano=O.longs===String?"0":0;if(e6.Long){var j=new e6.Long(0,0,!1);w.timeUnixNano=O.longs===String?j.toString():O.longs===Number?j.toNumber():j}else w.timeUnixNano=O.longs===String?"0":0;if(e6.Long){var j=new e6.Long(0,0,!1);w.count=O.longs===String?j.toString():O.longs===Number?j.toNumber():j}else w.count=O.longs===String?"0":0;w.sum=0,w.flags=0}if(A.startTimeUnixNano!=null&&A.hasOwnProperty("startTimeUnixNano"))if(typeof A.startTimeUnixNano==="number")w.startTimeUnixNano=O.longs===String?String(A.startTimeUnixNano):A.startTimeUnixNano;else w.startTimeUnixNano=O.longs===String?e6.Long.prototype.toString.call(A.startTimeUnixNano):O.longs===Number?new e6.LongBits(A.startTimeUnixNano.low>>>0,A.startTimeUnixNano.high>>>0).toNumber():A.startTimeUnixNano;if(A.timeUnixNano!=null&&A.hasOwnProperty("timeUnixNano"))if(typeof A.timeUnixNano==="number")w.timeUnixNano=O.longs===String?String(A.timeUnixNano):A.timeUnixNano;else w.timeUnixNano=O.longs===String?e6.Long.prototype.toString.call(A.timeUnixNano):O.longs===Number?new e6.LongBits(A.timeUnixNano.low>>>0,A.timeUnixNano.high>>>0).toNumber():A.timeUnixNano;if(A.count!=null&&A.hasOwnProperty("count"))if(typeof A.count==="number")w.count=O.longs===String?String(A.count):A.count;else w.count=O.longs===String?e6.Long.prototype.toString.call(A.count):O.longs===Number?new e6.LongBits(A.count.low>>>0,A.count.high>>>0).toNumber():A.count;if(A.sum!=null&&A.hasOwnProperty("sum"))w.sum=O.json&&!isFinite(A.sum)?String(A.sum):A.sum;if(A.quantileValues&&A.quantileValues.length){w.quantileValues=[];for(var H=0;H<A.quantileValues.length;++H)w.quantileValues[H]=a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(A.quantileValues[H],O)}if(A.attributes&&A.attributes.length){w.attributes=[];for(var H=0;H<A.attributes.length;++H)w.attributes[H]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(A.attributes[H],O)}if(A.flags!=null&&A.hasOwnProperty("flags"))w.flags=A.flags;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},Y.ValueAtQuantile=function(){function $(A){if(A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}return $.prototype.quantile=null,$.prototype.value=null,$.create=function(O){return new $(O)},$.encode=function(O,w){if(!w)w=m9.create();if(O.quantile!=null&&Object.hasOwnProperty.call(O,"quantile"))w.uint32(9).double(O.quantile);if(O.value!=null&&Object.hasOwnProperty.call(O,"value"))w.uint32(17).double(O.value);return w},$.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},$.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 1:{J.quantile=O.double();break}case 2:{J.value=O.double();break}default:O.skipType(M&7);break}}return J},$.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},$.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";if(O.quantile!=null&&O.hasOwnProperty("quantile")){if(typeof O.quantile!=="number")return"quantile: number expected"}if(O.value!=null&&O.hasOwnProperty("value")){if(typeof O.value!=="number")return"value: number expected"}return null},$.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return O;var w=new a6.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;if(O.quantile!=null)w.quantile=Number(O.quantile);if(O.value!=null)w.value=Number(O.value);return w},$.toObject=function(O,w){if(!w)w={};var j={};if(w.defaults)j.quantile=0,j.value=0;if(O.quantile!=null&&O.hasOwnProperty("quantile"))j.quantile=w.json&&!isFinite(O.quantile)?String(O.quantile):O.quantile;if(O.value!=null&&O.hasOwnProperty("value"))j.value=w.json&&!isFinite(O.value)?String(O.value):O.value;return j},$.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},$.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},$}(),Y}(),z.Exemplar=function(){function Y(A){if(this.filteredAttributes=[],A){for(var O=Object.keys(A),w=0;w<O.length;++w)if(A[O[w]]!=null)this[O[w]]=A[O[w]]}}Y.prototype.filteredAttributes=e6.emptyArray,Y.prototype.timeUnixNano=null,Y.prototype.asDouble=null,Y.prototype.asInt=null,Y.prototype.spanId=null,Y.prototype.traceId=null;var $;return Object.defineProperty(Y.prototype,"value",{get:e6.oneOfGetter($=["asDouble","asInt"]),set:e6.oneOfSetter($)}),Y.create=function(O){return new Y(O)},Y.encode=function(O,w){if(!w)w=m9.create();if(O.timeUnixNano!=null&&Object.hasOwnProperty.call(O,"timeUnixNano"))w.uint32(17).fixed64(O.timeUnixNano);if(O.asDouble!=null&&Object.hasOwnProperty.call(O,"asDouble"))w.uint32(25).double(O.asDouble);if(O.spanId!=null&&Object.hasOwnProperty.call(O,"spanId"))w.uint32(34).bytes(O.spanId);if(O.traceId!=null&&Object.hasOwnProperty.call(O,"traceId"))w.uint32(42).bytes(O.traceId);if(O.asInt!=null&&Object.hasOwnProperty.call(O,"asInt"))w.uint32(49).sfixed64(O.asInt);if(O.filteredAttributes!=null&&O.filteredAttributes.length)for(var j=0;j<O.filteredAttributes.length;++j)a6.opentelemetry.proto.common.v1.KeyValue.encode(O.filteredAttributes[j],w.uint32(58).fork()).ldelim();return w},Y.encodeDelimited=function(O,w){return this.encode(O,w).ldelim()},Y.decode=function(O,w,j){if(!(O instanceof D1))O=D1.create(O);var H=w===void 0?O.len:O.pos+w,J=new a6.opentelemetry.proto.metrics.v1.Exemplar;while(O.pos<H){var M=O.uint32();if(M===j)break;switch(M>>>3){case 7:{if(!(J.filteredAttributes&&J.filteredAttributes.length))J.filteredAttributes=[];J.filteredAttributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(O,O.uint32()));break}case 2:{J.timeUnixNano=O.fixed64();break}case 3:{J.asDouble=O.double();break}case 6:{J.asInt=O.sfixed64();break}case 4:{J.spanId=O.bytes();break}case 5:{J.traceId=O.bytes();break}default:O.skipType(M&7);break}}return J},Y.decodeDelimited=function(O){if(!(O instanceof D1))O=new D1(O);return this.decode(O,O.uint32())},Y.verify=function(O){if(typeof O!=="object"||O===null)return"object expected";var w={};if(O.filteredAttributes!=null&&O.hasOwnProperty("filteredAttributes")){if(!Array.isArray(O.filteredAttributes))return"filteredAttributes: array expected";for(var j=0;j<O.filteredAttributes.length;++j){var H=a6.opentelemetry.proto.common.v1.KeyValue.verify(O.filteredAttributes[j]);if(H)return"filteredAttributes."+H}}if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano")){if(!e6.isInteger(O.timeUnixNano)&&!(O.timeUnixNano&&e6.isInteger(O.timeUnixNano.low)&&e6.isInteger(O.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(O.asDouble!=null&&O.hasOwnProperty("asDouble")){if(w.value=1,typeof O.asDouble!=="number")return"asDouble: number expected"}if(O.asInt!=null&&O.hasOwnProperty("asInt")){if(w.value===1)return"value: multiple values";if(w.value=1,!e6.isInteger(O.asInt)&&!(O.asInt&&e6.isInteger(O.asInt.low)&&e6.isInteger(O.asInt.high)))return"asInt: integer|Long expected"}if(O.spanId!=null&&O.hasOwnProperty("spanId")){if(!(O.spanId&&typeof O.spanId.length==="number"||e6.isString(O.spanId)))return"spanId: buffer expected"}if(O.traceId!=null&&O.hasOwnProperty("traceId")){if(!(O.traceId&&typeof O.traceId.length==="number"||e6.isString(O.traceId)))return"traceId: buffer expected"}return null},Y.fromObject=function(O){if(O instanceof a6.opentelemetry.proto.metrics.v1.Exemplar)return O;var w=new a6.opentelemetry.proto.metrics.v1.Exemplar;if(O.filteredAttributes){if(!Array.isArray(O.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");w.filteredAttributes=[];for(var j=0;j<O.filteredAttributes.length;++j){if(typeof O.filteredAttributes[j]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");w.filteredAttributes[j]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(O.filteredAttributes[j])}}if(O.timeUnixNano!=null){if(e6.Long)(w.timeUnixNano=e6.Long.fromValue(O.timeUnixNano)).unsigned=!1;else if(typeof O.timeUnixNano==="string")w.timeUnixNano=parseInt(O.timeUnixNano,10);else if(typeof O.timeUnixNano==="number")w.timeUnixNano=O.timeUnixNano;else if(typeof O.timeUnixNano==="object")w.timeUnixNano=new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber()}if(O.asDouble!=null)w.asDouble=Number(O.asDouble);if(O.asInt!=null){if(e6.Long)(w.asInt=e6.Long.fromValue(O.asInt)).unsigned=!1;else if(typeof O.asInt==="string")w.asInt=parseInt(O.asInt,10);else if(typeof O.asInt==="number")w.asInt=O.asInt;else if(typeof O.asInt==="object")w.asInt=new e6.LongBits(O.asInt.low>>>0,O.asInt.high>>>0).toNumber()}if(O.spanId!=null){if(typeof O.spanId==="string")e6.base64.decode(O.spanId,w.spanId=e6.newBuffer(e6.base64.length(O.spanId)),0);else if(O.spanId.length>=0)w.spanId=O.spanId}if(O.traceId!=null){if(typeof O.traceId==="string")e6.base64.decode(O.traceId,w.traceId=e6.newBuffer(e6.base64.length(O.traceId)),0);else if(O.traceId.length>=0)w.traceId=O.traceId}return w},Y.toObject=function(O,w){if(!w)w={};var j={};if(w.arrays||w.defaults)j.filteredAttributes=[];if(w.defaults){if(e6.Long){var H=new e6.Long(0,0,!1);j.timeUnixNano=w.longs===String?H.toString():w.longs===Number?H.toNumber():H}else j.timeUnixNano=w.longs===String?"0":0;if(w.bytes===String)j.spanId="";else if(j.spanId=[],w.bytes!==Array)j.spanId=e6.newBuffer(j.spanId);if(w.bytes===String)j.traceId="";else if(j.traceId=[],w.bytes!==Array)j.traceId=e6.newBuffer(j.traceId)}if(O.timeUnixNano!=null&&O.hasOwnProperty("timeUnixNano"))if(typeof O.timeUnixNano==="number")j.timeUnixNano=w.longs===String?String(O.timeUnixNano):O.timeUnixNano;else j.timeUnixNano=w.longs===String?e6.Long.prototype.toString.call(O.timeUnixNano):w.longs===Number?new e6.LongBits(O.timeUnixNano.low>>>0,O.timeUnixNano.high>>>0).toNumber():O.timeUnixNano;if(O.asDouble!=null&&O.hasOwnProperty("asDouble")){if(j.asDouble=w.json&&!isFinite(O.asDouble)?String(O.asDouble):O.asDouble,w.oneofs)j.value="asDouble"}if(O.spanId!=null&&O.hasOwnProperty("spanId"))j.spanId=w.bytes===String?e6.base64.encode(O.spanId,0,O.spanId.length):w.bytes===Array?Array.prototype.slice.call(O.spanId):O.spanId;if(O.traceId!=null&&O.hasOwnProperty("traceId"))j.traceId=w.bytes===String?e6.base64.encode(O.traceId,0,O.traceId.length):w.bytes===Array?Array.prototype.slice.call(O.traceId):O.traceId;if(O.asInt!=null&&O.hasOwnProperty("asInt")){if(typeof O.asInt==="number")j.asInt=w.longs===String?String(O.asInt):O.asInt;else j.asInt=w.longs===String?e6.Long.prototype.toString.call(O.asInt):w.longs===Number?new e6.LongBits(O.asInt.low>>>0,O.asInt.high>>>0).toNumber():O.asInt;if(w.oneofs)j.value="asInt"}if(O.filteredAttributes&&O.filteredAttributes.length){j.filteredAttributes=[];for(var J=0;J<O.filteredAttributes.length;++J)j.filteredAttributes[J]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(O.filteredAttributes[J],w)}return j},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(O){if(O===void 0)O="type.googleapis.com";return O+"/opentelemetry.proto.metrics.v1.Exemplar"},Y}(),z}(),_}(),K.logs=function(){var _={};return _.v1=function(){var z={};return z.LogsData=function(){function Y($){if(this.resourceLogs=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.resourceLogs=e6.emptyArray,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.resourceLogs!=null&&A.resourceLogs.length)for(var w=0;w<A.resourceLogs.length;++w)a6.opentelemetry.proto.logs.v1.ResourceLogs.encode(A.resourceLogs[w],O.uint32(10).fork()).ldelim();return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.logs.v1.LogsData;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{if(!(H.resourceLogs&&H.resourceLogs.length))H.resourceLogs=[];H.resourceLogs.push(a6.opentelemetry.proto.logs.v1.ResourceLogs.decode(A,A.uint32()));break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.resourceLogs!=null&&A.hasOwnProperty("resourceLogs")){if(!Array.isArray(A.resourceLogs))return"resourceLogs: array expected";for(var O=0;O<A.resourceLogs.length;++O){var w=a6.opentelemetry.proto.logs.v1.ResourceLogs.verify(A.resourceLogs[O]);if(w)return"resourceLogs."+w}}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.logs.v1.LogsData)return A;var O=new a6.opentelemetry.proto.logs.v1.LogsData;if(A.resourceLogs){if(!Array.isArray(A.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");O.resourceLogs=[];for(var w=0;w<A.resourceLogs.length;++w){if(typeof A.resourceLogs[w]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");O.resourceLogs[w]=a6.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(A.resourceLogs[w])}}return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.resourceLogs=[];if(A.resourceLogs&&A.resourceLogs.length){w.resourceLogs=[];for(var j=0;j<A.resourceLogs.length;++j)w.resourceLogs[j]=a6.opentelemetry.proto.logs.v1.ResourceLogs.toObject(A.resourceLogs[j],O)}return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.logs.v1.LogsData"},Y}(),z.ResourceLogs=function(){function Y($){if(this.scopeLogs=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.resource=null,Y.prototype.scopeLogs=e6.emptyArray,Y.prototype.schemaUrl=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.resource!=null&&Object.hasOwnProperty.call(A,"resource"))a6.opentelemetry.proto.resource.v1.Resource.encode(A.resource,O.uint32(10).fork()).ldelim();if(A.scopeLogs!=null&&A.scopeLogs.length)for(var w=0;w<A.scopeLogs.length;++w)a6.opentelemetry.proto.logs.v1.ScopeLogs.encode(A.scopeLogs[w],O.uint32(18).fork()).ldelim();if(A.schemaUrl!=null&&Object.hasOwnProperty.call(A,"schemaUrl"))O.uint32(26).string(A.schemaUrl);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.logs.v1.ResourceLogs;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.resource=a6.opentelemetry.proto.resource.v1.Resource.decode(A,A.uint32());break}case 2:{if(!(H.scopeLogs&&H.scopeLogs.length))H.scopeLogs=[];H.scopeLogs.push(a6.opentelemetry.proto.logs.v1.ScopeLogs.decode(A,A.uint32()));break}case 3:{H.schemaUrl=A.string();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.resource!=null&&A.hasOwnProperty("resource")){var O=a6.opentelemetry.proto.resource.v1.Resource.verify(A.resource);if(O)return"resource."+O}if(A.scopeLogs!=null&&A.hasOwnProperty("scopeLogs")){if(!Array.isArray(A.scopeLogs))return"scopeLogs: array expected";for(var w=0;w<A.scopeLogs.length;++w){var O=a6.opentelemetry.proto.logs.v1.ScopeLogs.verify(A.scopeLogs[w]);if(O)return"scopeLogs."+O}}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl")){if(!e6.isString(A.schemaUrl))return"schemaUrl: string expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.logs.v1.ResourceLogs)return A;var O=new a6.opentelemetry.proto.logs.v1.ResourceLogs;if(A.resource!=null){if(typeof A.resource!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");O.resource=a6.opentelemetry.proto.resource.v1.Resource.fromObject(A.resource)}if(A.scopeLogs){if(!Array.isArray(A.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");O.scopeLogs=[];for(var w=0;w<A.scopeLogs.length;++w){if(typeof A.scopeLogs[w]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");O.scopeLogs[w]=a6.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(A.scopeLogs[w])}}if(A.schemaUrl!=null)O.schemaUrl=String(A.schemaUrl);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.scopeLogs=[];if(O.defaults)w.resource=null,w.schemaUrl="";if(A.resource!=null&&A.hasOwnProperty("resource"))w.resource=a6.opentelemetry.proto.resource.v1.Resource.toObject(A.resource,O);if(A.scopeLogs&&A.scopeLogs.length){w.scopeLogs=[];for(var j=0;j<A.scopeLogs.length;++j)w.scopeLogs[j]=a6.opentelemetry.proto.logs.v1.ScopeLogs.toObject(A.scopeLogs[j],O)}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl"))w.schemaUrl=A.schemaUrl;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.logs.v1.ResourceLogs"},Y}(),z.ScopeLogs=function(){function Y($){if(this.logRecords=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.scope=null,Y.prototype.logRecords=e6.emptyArray,Y.prototype.schemaUrl=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.scope!=null&&Object.hasOwnProperty.call(A,"scope"))a6.opentelemetry.proto.common.v1.InstrumentationScope.encode(A.scope,O.uint32(10).fork()).ldelim();if(A.logRecords!=null&&A.logRecords.length)for(var w=0;w<A.logRecords.length;++w)a6.opentelemetry.proto.logs.v1.LogRecord.encode(A.logRecords[w],O.uint32(18).fork()).ldelim();if(A.schemaUrl!=null&&Object.hasOwnProperty.call(A,"schemaUrl"))O.uint32(26).string(A.schemaUrl);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.logs.v1.ScopeLogs;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.decode(A,A.uint32());break}case 2:{if(!(H.logRecords&&H.logRecords.length))H.logRecords=[];H.logRecords.push(a6.opentelemetry.proto.logs.v1.LogRecord.decode(A,A.uint32()));break}case 3:{H.schemaUrl=A.string();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.scope!=null&&A.hasOwnProperty("scope")){var O=a6.opentelemetry.proto.common.v1.InstrumentationScope.verify(A.scope);if(O)return"scope."+O}if(A.logRecords!=null&&A.hasOwnProperty("logRecords")){if(!Array.isArray(A.logRecords))return"logRecords: array expected";for(var w=0;w<A.logRecords.length;++w){var O=a6.opentelemetry.proto.logs.v1.LogRecord.verify(A.logRecords[w]);if(O)return"logRecords."+O}}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl")){if(!e6.isString(A.schemaUrl))return"schemaUrl: string expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.logs.v1.ScopeLogs)return A;var O=new a6.opentelemetry.proto.logs.v1.ScopeLogs;if(A.scope!=null){if(typeof A.scope!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");O.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(A.scope)}if(A.logRecords){if(!Array.isArray(A.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");O.logRecords=[];for(var w=0;w<A.logRecords.length;++w){if(typeof A.logRecords[w]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");O.logRecords[w]=a6.opentelemetry.proto.logs.v1.LogRecord.fromObject(A.logRecords[w])}}if(A.schemaUrl!=null)O.schemaUrl=String(A.schemaUrl);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.logRecords=[];if(O.defaults)w.scope=null,w.schemaUrl="";if(A.scope!=null&&A.hasOwnProperty("scope"))w.scope=a6.opentelemetry.proto.common.v1.InstrumentationScope.toObject(A.scope,O);if(A.logRecords&&A.logRecords.length){w.logRecords=[];for(var j=0;j<A.logRecords.length;++j)w.logRecords[j]=a6.opentelemetry.proto.logs.v1.LogRecord.toObject(A.logRecords[j],O)}if(A.schemaUrl!=null&&A.hasOwnProperty("schemaUrl"))w.schemaUrl=A.schemaUrl;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.logs.v1.ScopeLogs"},Y}(),z.SeverityNumber=function(){var Y={},$=Object.create(Y);return $[Y[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,$[Y[1]="SEVERITY_NUMBER_TRACE"]=1,$[Y[2]="SEVERITY_NUMBER_TRACE2"]=2,$[Y[3]="SEVERITY_NUMBER_TRACE3"]=3,$[Y[4]="SEVERITY_NUMBER_TRACE4"]=4,$[Y[5]="SEVERITY_NUMBER_DEBUG"]=5,$[Y[6]="SEVERITY_NUMBER_DEBUG2"]=6,$[Y[7]="SEVERITY_NUMBER_DEBUG3"]=7,$[Y[8]="SEVERITY_NUMBER_DEBUG4"]=8,$[Y[9]="SEVERITY_NUMBER_INFO"]=9,$[Y[10]="SEVERITY_NUMBER_INFO2"]=10,$[Y[11]="SEVERITY_NUMBER_INFO3"]=11,$[Y[12]="SEVERITY_NUMBER_INFO4"]=12,$[Y[13]="SEVERITY_NUMBER_WARN"]=13,$[Y[14]="SEVERITY_NUMBER_WARN2"]=14,$[Y[15]="SEVERITY_NUMBER_WARN3"]=15,$[Y[16]="SEVERITY_NUMBER_WARN4"]=16,$[Y[17]="SEVERITY_NUMBER_ERROR"]=17,$[Y[18]="SEVERITY_NUMBER_ERROR2"]=18,$[Y[19]="SEVERITY_NUMBER_ERROR3"]=19,$[Y[20]="SEVERITY_NUMBER_ERROR4"]=20,$[Y[21]="SEVERITY_NUMBER_FATAL"]=21,$[Y[22]="SEVERITY_NUMBER_FATAL2"]=22,$[Y[23]="SEVERITY_NUMBER_FATAL3"]=23,$[Y[24]="SEVERITY_NUMBER_FATAL4"]=24,$}(),z.LogRecordFlags=function(){var Y={},$=Object.create(Y);return $[Y[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,$[Y[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,$}(),z.LogRecord=function(){function Y($){if(this.attributes=[],$){for(var A=Object.keys($),O=0;O<A.length;++O)if($[A[O]]!=null)this[A[O]]=$[A[O]]}}return Y.prototype.timeUnixNano=null,Y.prototype.observedTimeUnixNano=null,Y.prototype.severityNumber=null,Y.prototype.severityText=null,Y.prototype.body=null,Y.prototype.attributes=e6.emptyArray,Y.prototype.droppedAttributesCount=null,Y.prototype.flags=null,Y.prototype.traceId=null,Y.prototype.spanId=null,Y.prototype.eventName=null,Y.create=function(A){return new Y(A)},Y.encode=function(A,O){if(!O)O=m9.create();if(A.timeUnixNano!=null&&Object.hasOwnProperty.call(A,"timeUnixNano"))O.uint32(9).fixed64(A.timeUnixNano);if(A.severityNumber!=null&&Object.hasOwnProperty.call(A,"severityNumber"))O.uint32(16).int32(A.severityNumber);if(A.severityText!=null&&Object.hasOwnProperty.call(A,"severityText"))O.uint32(26).string(A.severityText);if(A.body!=null&&Object.hasOwnProperty.call(A,"body"))a6.opentelemetry.proto.common.v1.AnyValue.encode(A.body,O.uint32(42).fork()).ldelim();if(A.attributes!=null&&A.attributes.length)for(var w=0;w<A.attributes.length;++w)a6.opentelemetry.proto.common.v1.KeyValue.encode(A.attributes[w],O.uint32(50).fork()).ldelim();if(A.droppedAttributesCount!=null&&Object.hasOwnProperty.call(A,"droppedAttributesCount"))O.uint32(56).uint32(A.droppedAttributesCount);if(A.flags!=null&&Object.hasOwnProperty.call(A,"flags"))O.uint32(69).fixed32(A.flags);if(A.traceId!=null&&Object.hasOwnProperty.call(A,"traceId"))O.uint32(74).bytes(A.traceId);if(A.spanId!=null&&Object.hasOwnProperty.call(A,"spanId"))O.uint32(82).bytes(A.spanId);if(A.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(A,"observedTimeUnixNano"))O.uint32(89).fixed64(A.observedTimeUnixNano);if(A.eventName!=null&&Object.hasOwnProperty.call(A,"eventName"))O.uint32(98).string(A.eventName);return O},Y.encodeDelimited=function(A,O){return this.encode(A,O).ldelim()},Y.decode=function(A,O,w){if(!(A instanceof D1))A=D1.create(A);var j=O===void 0?A.len:A.pos+O,H=new a6.opentelemetry.proto.logs.v1.LogRecord;while(A.pos<j){var J=A.uint32();if(J===w)break;switch(J>>>3){case 1:{H.timeUnixNano=A.fixed64();break}case 11:{H.observedTimeUnixNano=A.fixed64();break}case 2:{H.severityNumber=A.int32();break}case 3:{H.severityText=A.string();break}case 5:{H.body=a6.opentelemetry.proto.common.v1.AnyValue.decode(A,A.uint32());break}case 6:{if(!(H.attributes&&H.attributes.length))H.attributes=[];H.attributes.push(a6.opentelemetry.proto.common.v1.KeyValue.decode(A,A.uint32()));break}case 7:{H.droppedAttributesCount=A.uint32();break}case 8:{H.flags=A.fixed32();break}case 9:{H.traceId=A.bytes();break}case 10:{H.spanId=A.bytes();break}case 12:{H.eventName=A.string();break}default:A.skipType(J&7);break}}return H},Y.decodeDelimited=function(A){if(!(A instanceof D1))A=new D1(A);return this.decode(A,A.uint32())},Y.verify=function(A){if(typeof A!=="object"||A===null)return"object expected";if(A.timeUnixNano!=null&&A.hasOwnProperty("timeUnixNano")){if(!e6.isInteger(A.timeUnixNano)&&!(A.timeUnixNano&&e6.isInteger(A.timeUnixNano.low)&&e6.isInteger(A.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(A.observedTimeUnixNano!=null&&A.hasOwnProperty("observedTimeUnixNano")){if(!e6.isInteger(A.observedTimeUnixNano)&&!(A.observedTimeUnixNano&&e6.isInteger(A.observedTimeUnixNano.low)&&e6.isInteger(A.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected"}if(A.severityNumber!=null&&A.hasOwnProperty("severityNumber"))switch(A.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(A.severityText!=null&&A.hasOwnProperty("severityText")){if(!e6.isString(A.severityText))return"severityText: string expected"}if(A.body!=null&&A.hasOwnProperty("body")){var O=a6.opentelemetry.proto.common.v1.AnyValue.verify(A.body);if(O)return"body."+O}if(A.attributes!=null&&A.hasOwnProperty("attributes")){if(!Array.isArray(A.attributes))return"attributes: array expected";for(var w=0;w<A.attributes.length;++w){var O=a6.opentelemetry.proto.common.v1.KeyValue.verify(A.attributes[w]);if(O)return"attributes."+O}}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount")){if(!e6.isInteger(A.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(A.flags!=null&&A.hasOwnProperty("flags")){if(!e6.isInteger(A.flags))return"flags: integer expected"}if(A.traceId!=null&&A.hasOwnProperty("traceId")){if(!(A.traceId&&typeof A.traceId.length==="number"||e6.isString(A.traceId)))return"traceId: buffer expected"}if(A.spanId!=null&&A.hasOwnProperty("spanId")){if(!(A.spanId&&typeof A.spanId.length==="number"||e6.isString(A.spanId)))return"spanId: buffer expected"}if(A.eventName!=null&&A.hasOwnProperty("eventName")){if(!e6.isString(A.eventName))return"eventName: string expected"}return null},Y.fromObject=function(A){if(A instanceof a6.opentelemetry.proto.logs.v1.LogRecord)return A;var O=new a6.opentelemetry.proto.logs.v1.LogRecord;if(A.timeUnixNano!=null){if(e6.Long)(O.timeUnixNano=e6.Long.fromValue(A.timeUnixNano)).unsigned=!1;else if(typeof A.timeUnixNano==="string")O.timeUnixNano=parseInt(A.timeUnixNano,10);else if(typeof A.timeUnixNano==="number")O.timeUnixNano=A.timeUnixNano;else if(typeof A.timeUnixNano==="object")O.timeUnixNano=new e6.LongBits(A.timeUnixNano.low>>>0,A.timeUnixNano.high>>>0).toNumber()}if(A.observedTimeUnixNano!=null){if(e6.Long)(O.observedTimeUnixNano=e6.Long.fromValue(A.observedTimeUnixNano)).unsigned=!1;else if(typeof A.observedTimeUnixNano==="string")O.observedTimeUnixNano=parseInt(A.observedTimeUnixNano,10);else if(typeof A.observedTimeUnixNano==="number")O.observedTimeUnixNano=A.observedTimeUnixNano;else if(typeof A.observedTimeUnixNano==="object")O.observedTimeUnixNano=new e6.LongBits(A.observedTimeUnixNano.low>>>0,A.observedTimeUnixNano.high>>>0).toNumber()}switch(A.severityNumber){default:if(typeof A.severityNumber==="number"){O.severityNumber=A.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:O.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:O.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:O.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:O.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:O.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:O.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:O.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:O.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:O.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:O.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:O.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:O.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:O.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:O.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:O.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:O.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:O.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:O.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:O.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:O.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:O.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:O.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:O.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:O.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:O.severityNumber=24;break}if(A.severityText!=null)O.severityText=String(A.severityText);if(A.body!=null){if(typeof A.body!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");O.body=a6.opentelemetry.proto.common.v1.AnyValue.fromObject(A.body)}if(A.attributes){if(!Array.isArray(A.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");O.attributes=[];for(var w=0;w<A.attributes.length;++w){if(typeof A.attributes[w]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");O.attributes[w]=a6.opentelemetry.proto.common.v1.KeyValue.fromObject(A.attributes[w])}}if(A.droppedAttributesCount!=null)O.droppedAttributesCount=A.droppedAttributesCount>>>0;if(A.flags!=null)O.flags=A.flags>>>0;if(A.traceId!=null){if(typeof A.traceId==="string")e6.base64.decode(A.traceId,O.traceId=e6.newBuffer(e6.base64.length(A.traceId)),0);else if(A.traceId.length>=0)O.traceId=A.traceId}if(A.spanId!=null){if(typeof A.spanId==="string")e6.base64.decode(A.spanId,O.spanId=e6.newBuffer(e6.base64.length(A.spanId)),0);else if(A.spanId.length>=0)O.spanId=A.spanId}if(A.eventName!=null)O.eventName=String(A.eventName);return O},Y.toObject=function(A,O){if(!O)O={};var w={};if(O.arrays||O.defaults)w.attributes=[];if(O.defaults){if(e6.Long){var j=new e6.Long(0,0,!1);w.timeUnixNano=O.longs===String?j.toString():O.longs===Number?j.toNumber():j}else w.timeUnixNano=O.longs===String?"0":0;if(w.severityNumber=O.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,w.severityText="",w.body=null,w.droppedAttributesCount=0,w.flags=0,O.bytes===String)w.traceId="";else if(w.traceId=[],O.bytes!==Array)w.traceId=e6.newBuffer(w.traceId);if(O.bytes===String)w.spanId="";else if(w.spanId=[],O.bytes!==Array)w.spanId=e6.newBuffer(w.spanId);if(e6.Long){var j=new e6.Long(0,0,!1);w.observedTimeUnixNano=O.longs===String?j.toString():O.longs===Number?j.toNumber():j}else w.observedTimeUnixNano=O.longs===String?"0":0;w.eventName=""}if(A.timeUnixNano!=null&&A.hasOwnProperty("timeUnixNano"))if(typeof A.timeUnixNano==="number")w.timeUnixNano=O.longs===String?String(A.timeUnixNano):A.timeUnixNano;else w.timeUnixNano=O.longs===String?e6.Long.prototype.toString.call(A.timeUnixNano):O.longs===Number?new e6.LongBits(A.timeUnixNano.low>>>0,A.timeUnixNano.high>>>0).toNumber():A.timeUnixNano;if(A.severityNumber!=null&&A.hasOwnProperty("severityNumber"))w.severityNumber=O.enums===String?a6.opentelemetry.proto.logs.v1.SeverityNumber[A.severityNumber]===void 0?A.severityNumber:a6.opentelemetry.proto.logs.v1.SeverityNumber[A.severityNumber]:A.severityNumber;if(A.severityText!=null&&A.hasOwnProperty("severityText"))w.severityText=A.severityText;if(A.body!=null&&A.hasOwnProperty("body"))w.body=a6.opentelemetry.proto.common.v1.AnyValue.toObject(A.body,O);if(A.attributes&&A.attributes.length){w.attributes=[];for(var H=0;H<A.attributes.length;++H)w.attributes[H]=a6.opentelemetry.proto.common.v1.KeyValue.toObject(A.attributes[H],O)}if(A.droppedAttributesCount!=null&&A.hasOwnProperty("droppedAttributesCount"))w.droppedAttributesCount=A.droppedAttributesCount;if(A.flags!=null&&A.hasOwnProperty("flags"))w.flags=A.flags;if(A.traceId!=null&&A.hasOwnProperty("traceId"))w.traceId=O.bytes===String?e6.base64.encode(A.traceId,0,A.traceId.length):O.bytes===Array?Array.prototype.slice.call(A.traceId):A.traceId;if(A.spanId!=null&&A.hasOwnProperty("spanId"))w.spanId=O.bytes===String?e6.base64.encode(A.spanId,0,A.spanId.length):O.bytes===Array?Array.prototype.slice.call(A.spanId):A.spanId;if(A.observedTimeUnixNano!=null&&A.hasOwnProperty("observedTimeUnixNano"))if(typeof A.observedTimeUnixNano==="number")w.observedTimeUnixNano=O.longs===String?String(A.observedTimeUnixNano):A.observedTimeUnixNano;else w.observedTimeUnixNano=O.longs===String?e6.Long.prototype.toString.call(A.observedTimeUnixNano):O.longs===Number?new e6.LongBits(A.observedTimeUnixNano.low>>>0,A.observedTimeUnixNano.high>>>0).toNumber():A.observedTimeUnixNano;if(A.eventName!=null&&A.hasOwnProperty("eventName"))w.eventName=A.eventName;return w},Y.prototype.toJSON=function(){return this.constructor.toObject(this,T5.util.toJSONOptions)},Y.getTypeUrl=function(A){if(A===void 0)A="type.googleapis.com";return A+"/opentelemetry.proto.logs.v1.LogRecord"},Y}(),z}(),_}(),K}(),q}();MU4.exports=a6});var DU4=m((PU4)=>{Object.defineProperty(PU4,"__esModule",{value:!0});PU4.hexToBinary=void 0;function XU4(q){if(q>=48&&q<=57)return q-48;if(q>=97&&q<=102)return q-87;return q-55}function w0z(q){let K=new Uint8Array(q.length/2),_=0;for(let z=0;z<q.length;z+=2){let Y=XU4(q.charCodeAt(z)),$=XU4(q.charCodeAt(z+1));K[_++]=Y<<4|$}return K}PU4.hexToBinary=w0z});var bR8=m((vU4)=>{Object.defineProperty(vU4,"__esModule",{value:!0});vU4.getOtlpEncoder=vU4.encodeAsString=vU4.encodeAsLongBits=vU4.toLongBits=vU4.hrTimeToNanos=void 0;var j0z=Oz(),MQ1=DU4();function XQ1(q){let K=BigInt(1e9);return BigInt(Math.trunc(q[0]))*K+BigInt(Math.trunc(q[1]))}vU4.hrTimeToNanos=XQ1;function ZU4(q){let K=Number(BigInt.asUintN(32,q)),_=Number(BigInt.asUintN(32,q>>BigInt(32)));return{low:K,high:_}}vU4.toLongBits=ZU4;function PQ1(q){let K=XQ1(q);return ZU4(K)}vU4.encodeAsLongBits=PQ1;function GU4(q){return XQ1(q).toString()}vU4.encodeAsString=GU4;var H0z=typeof BigInt<"u"?GU4:j0z.hrTimeToNanoseconds;function fU4(q){return q}function TU4(q){if(q===void 0)return;return(0,MQ1.hexToBinary)(q)}var J0z={encodeHrTime:PQ1,encodeSpanContext:MQ1.hexToBinary,encodeOptionalSpanContext:TU4};function M0z(q){if(q===void 0)return J0z;let K=q.useLongBits??!0,_=q.useHex??!1;return{encodeHrTime:K?PQ1:H0z,encodeSpanContext:_?fU4:MQ1.hexToBinary,encodeOptionalSpanContext:_?fU4:TU4}}vU4.getOtlpEncoder=M0z});var xR8=m((NU4)=>{Object.defineProperty(NU4,"__esModule",{value:!0});NU4.toAnyValue=NU4.toKeyValue=NU4.toAttributes=NU4.createInstrumentationScope=NU4.createResource=void 0;function f0z(q){let K={attributes:VU4(q.attributes),droppedAttributesCount:0},_=q.schemaUrl;if(_&&_!=="")K.schemaUrl=_;return K}NU4.createResource=f0z;function Z0z(q){return{name:q.name,version:q.version}}NU4.createInstrumentationScope=Z0z;function VU4(q){return Object.keys(q).map((K)=>WQ1(K,q[K]))}NU4.toAttributes=VU4;function WQ1(q,K){return{key:q,value:DQ1(K)}}NU4.toKeyValue=WQ1;function DQ1(q){let K=typeof q;if(K==="string")return{stringValue:q};if(K==="number"){if(!Number.isInteger(q))return{doubleValue:q};return{intValue:q}}if(K==="boolean")return{boolValue:q};if(q instanceof Uint8Array)return{bytesValue:q};if(Array.isArray(q))return{arrayValue:{values:q.map(DQ1)}};if(K==="object"&&q!=null)return{kvlistValue:{values:Object.entries(q).map(([_,z])=>WQ1(_,z))}};return{}}NU4.toAnyValue=DQ1});var fQ1=m((LU4)=>{Object.defineProperty(LU4,"__esModule",{value:!0});LU4.toLogAttributes=LU4.createExportLogsServiceRequest=void 0;var V0z=bR8(),IR8=xR8();function N0z(q,K){let _=(0,V0z.getOtlpEncoder)(K);return{resourceLogs:E0z(q,_)}}LU4.createExportLogsServiceRequest=N0z;function y0z(q){let K=new Map;for(let _ of q){let{resource:z,instrumentationScope:{name:Y,version:$="",schemaUrl:A=""}}=_,O=K.get(z);if(!O)O=new Map,K.set(z,O);let w=`${Y}@${$}:${A}`,j=O.get(w);if(!j)j=[],O.set(w,j);j.push(_)}return K}function E0z(q,K){let _=y0z(q);return Array.from(_,([z,Y])=>{let $=(0,IR8.createResource)(z);return{resource:$,scopeLogs:Array.from(Y,([,A])=>{return{scope:(0,IR8.createInstrumentationScope)(A[0].instrumentationScope),logRecords:A.map((O)=>L0z(O,K)),schemaUrl:A[0].instrumentationScope.schemaUrl}}),schemaUrl:$.schemaUrl}})}function L0z(q,K){return{timeUnixNano:K.encodeHrTime(q.hrTime),observedTimeUnixNano:K.encodeHrTime(q.hrTimeObserved),severityNumber:R0z(q.severityNumber),severityText:q.severityText,body:(0,IR8.toAnyValue)(q.body),eventName:q.eventName,attributes:EU4(q.attributes),droppedAttributesCount:q.droppedAttributesCount,flags:q.spanContext?.traceFlags,traceId:K.encodeOptionalSpanContext(q.spanContext?.traceId),spanId:K.encodeOptionalSpanContext(q.spanContext?.spanId)}}function R0z(q){return q}function EU4(q){return Object.keys(q).map((K)=>(0,IR8.toKeyValue)(K,q[K]))}LU4.toLogAttributes=EU4});var bU4=m((SU4)=>{Object.defineProperty(SU4,"__esModule",{value:!0});SU4.ProtobufLogsSerializer=void 0;var hU4=CR8(),S0z=fQ1(),C0z=hU4.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,b0z=hU4.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;SU4.ProtobufLogsSerializer={serializeRequest:(q)=>{let K=(0,S0z.createExportLogsServiceRequest)(q);return b0z.encode(K).finish()},deserializeResponse:(q)=>{return C0z.decode(q)}}});var xU4=m((ZQ1)=>{Object.defineProperty(ZQ1,"__esModule",{value:!0});ZQ1.ProtobufLogsSerializer=void 0;var x0z=bU4();Object.defineProperty(ZQ1,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return x0z.ProtobufLogsSerializer}})});var uU4=m((IU4)=>{Object.defineProperty(IU4,"__esModule",{value:!0});IU4.EAggregationTemporality=void 0;var u0z;(function(q){q[q.AGGREGATION_TEMPORALITY_UNSPECIFIED=0]="AGGREGATION_TEMPORALITY_UNSPECIFIED",q[q.AGGREGATION_TEMPORALITY_DELTA=1]="AGGREGATION_TEMPORALITY_DELTA",q[q.AGGREGATION_TEMPORALITY_CUMULATIVE=2]="AGGREGATION_TEMPORALITY_CUMULATIVE"})(u0z=IU4.EAggregationTemporality||(IU4.EAggregationTemporality={}))});var TQ1=m((QU4)=>{Object.defineProperty(QU4,"__esModule",{value:!0});QU4.createExportMetricsServiceRequest=QU4.toMetric=QU4.toScopeMetrics=QU4.toResourceMetrics=void 0;var mU4=nK(),jy6=z26(),pU4=uU4(),m0z=bR8(),Ls6=xR8();function gU4(q,K){let _=(0,m0z.getOtlpEncoder)(K),z=(0,Ls6.createResource)(q.resource);return{resource:z,schemaUrl:z.schemaUrl,scopeMetrics:FU4(q.scopeMetrics,_)}}QU4.toResourceMetrics=gU4;function FU4(q,K){return Array.from(q.map((_)=>({scope:(0,Ls6.createInstrumentationScope)(_.scope),metrics:_.metrics.map((z)=>UU4(z,K)),schemaUrl:_.scope.schemaUrl})))}QU4.toScopeMetrics=FU4;function UU4(q,K){let _={name:q.descriptor.name,description:q.descriptor.description,unit:q.descriptor.unit},z=F0z(q.aggregationTemporality);switch(q.dataPointType){case jy6.DataPointType.SUM:_.sum={aggregationTemporality:z,isMonotonic:q.isMonotonic,dataPoints:BU4(q,K)};break;case jy6.DataPointType.GAUGE:_.gauge={dataPoints:BU4(q,K)};break;case jy6.DataPointType.HISTOGRAM:_.histogram={aggregationTemporality:z,dataPoints:B0z(q,K)};break;case jy6.DataPointType.EXPONENTIAL_HISTOGRAM:_.exponentialHistogram={aggregationTemporality:z,dataPoints:g0z(q,K)};break}return _}QU4.toMetric=UU4;function p0z(q,K,_){let z={attributes:(0,Ls6.toAttributes)(q.attributes),startTimeUnixNano:_.encodeHrTime(q.startTime),timeUnixNano:_.encodeHrTime(q.endTime)};switch(K){case mU4.ValueType.INT:z.asInt=q.value;break;case mU4.ValueType.DOUBLE:z.asDouble=q.value;break}return z}function BU4(q,K){return q.dataPoints.map((_)=>{return p0z(_,q.descriptor.valueType,K)})}function B0z(q,K){return q.dataPoints.map((_)=>{let z=_.value;return{attributes:(0,Ls6.toAttributes)(_.attributes),bucketCounts:z.buckets.counts,explicitBounds:z.buckets.boundaries,count:z.count,sum:z.sum,min:z.min,max:z.max,startTimeUnixNano:K.encodeHrTime(_.startTime),timeUnixNano:K.encodeHrTime(_.endTime)}})}function g0z(q,K){return q.dataPoints.map((_)=>{let z=_.value;return{attributes:(0,Ls6.toAttributes)(_.attributes),count:z.count,min:z.min,max:z.max,sum:z.sum,positive:{offset:z.positive.offset,bucketCounts:z.positive.bucketCounts},negative:{offset:z.negative.offset,bucketCounts:z.negative.bucketCounts},scale:z.scale,zeroCount:z.zeroCount,startTimeUnixNano:K.encodeHrTime(_.startTime),timeUnixNano:K.encodeHrTime(_.endTime)}})}function F0z(q){switch(q){case jy6.AggregationTemporality.DELTA:return pU4.EAggregationTemporality.AGGREGATION_TEMPORALITY_DELTA;case jy6.AggregationTemporality.CUMULATIVE:return pU4.EAggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE}}function U0z(q,K){return{resourceMetrics:q.map((_)=>gU4(_,K))}}QU4.createExportMetricsServiceRequest=U0z});var iU4=m((lU4)=>{Object.defineProperty(lU4,"__esModule",{value:!0});lU4.ProtobufMetricsSerializer=void 0;var cU4=CR8(),l0z=TQ1(),n0z=cU4.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,i0z=cU4.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;lU4.ProtobufMetricsSerializer={serializeRequest:(q)=>{let K=(0,l0z.createExportMetricsServiceRequest)([q]);return i0z.encode(K).finish()},deserializeResponse:(q)=>{return n0z.decode(q)}}});var rU4=m((vQ1)=>{Object.defineProperty(vQ1,"__esModule",{value:!0});vQ1.ProtobufMetricsSerializer=void 0;var r0z=iU4();Object.defineProperty(vQ1,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return r0z.ProtobufMetricsSerializer}})});var kQ1=m((eU4)=>{Object.defineProperty(eU4,"__esModule",{value:!0});eU4.createExportTraceServiceRequest=eU4.toOtlpSpanEvent=eU4.toOtlpLink=eU4.sdkSpanToOtlpSpan=void 0;var Rs6=xR8(),a0z=bR8(),s0z=256,t0z=512;function oU4(q,K){let _=q&255|s0z;if(K)_|=t0z;return _}function aU4(q,K){let _=q.spanContext(),z=q.status,Y=q.parentSpanContext?.spanId?K.encodeSpanContext(q.parentSpanContext?.spanId):void 0;return{traceId:K.encodeSpanContext(_.traceId),spanId:K.encodeSpanContext(_.spanId),parentSpanId:Y,traceState:_.traceState?.serialize(),name:q.name,kind:q.kind==null?0:q.kind+1,startTimeUnixNano:K.encodeHrTime(q.startTime),endTimeUnixNano:K.encodeHrTime(q.endTime),attributes:(0,Rs6.toAttributes)(q.attributes),droppedAttributesCount:q.droppedAttributesCount,events:q.events.map(($)=>tU4($,K)),droppedEventsCount:q.droppedEventsCount,status:{code:z.code,message:z.message},links:q.links.map(($)=>sU4($,K)),droppedLinksCount:q.droppedLinksCount,flags:oU4(_.traceFlags,q.parentSpanContext?.isRemote)}}eU4.sdkSpanToOtlpSpan=aU4;function sU4(q,K){return{attributes:q.attributes?(0,Rs6.toAttributes)(q.attributes):[],spanId:K.encodeSpanContext(q.context.spanId),traceId:K.encodeSpanContext(q.context.traceId),traceState:q.context.traceState?.serialize(),droppedAttributesCount:q.droppedAttributesCount||0,flags:oU4(q.context.traceFlags,q.context.isRemote)}}eU4.toOtlpLink=sU4;function tU4(q,K){return{attributes:q.attributes?(0,Rs6.toAttributes)(q.attributes):[],name:q.name,timeUnixNano:K.encodeHrTime(q.time),droppedAttributesCount:q.droppedAttributesCount||0}}eU4.toOtlpSpanEvent=tU4;function e0z(q,K){let _=(0,a0z.getOtlpEncoder)(K);return{resourceSpans:KZz(q,_)}}eU4.createExportTraceServiceRequest=e0z;function qZz(q){let K=new Map;for(let _ of q){let z=K.get(_.resource);if(!z)z=new Map,K.set(_.resource,z);let Y=`${_.instrumentationScope.name}@${_.instrumentationScope.version||""}:${_.instrumentationScope.schemaUrl||""}`,$=z.get(Y);if(!$)$=[],z.set(Y,$);$.push(_)}return K}function KZz(q,K){let _=qZz(q),z=[],Y=_.entries(),$=Y.next();while(!$.done){let[A,O]=$.value,w=[],j=O.values(),H=j.next();while(!H.done){let X=H.value;if(X.length>0){let P=X.map((W)=>aU4(W,K));w.push({scope:(0,Rs6.createInstrumentationScope)(X[0].instrumentationScope),spans:P,schemaUrl:X[0].instrumentationScope.schemaUrl})}H=j.next()}let J=(0,Rs6.createResource)(A),M={resource:J,scopeSpans:w,schemaUrl:J.schemaUrl};z.push(M),$=Y.next()}return z}});var YQ4=m((_Q4)=>{Object.defineProperty(_Q4,"__esModule",{value:!0});_Q4.ProtobufTraceSerializer=void 0;var KQ4=CR8(),$Zz=kQ1(),AZz=KQ4.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,OZz=KQ4.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;_Q4.ProtobufTraceSerializer={serializeRequest:(q)=>{let K=(0,$Zz.createExportTraceServiceRequest)(q);return OZz.encode(K).finish()},deserializeResponse:(q)=>{return AZz.decode(q)}}});var $Q4=m((VQ1)=>{Object.defineProperty(VQ1,"__esModule",{value:!0});VQ1.ProtobufTraceSerializer=void 0;var wZz=YQ4();Object.defineProperty(VQ1,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return wZz.ProtobufTraceSerializer}})});var wQ4=m((AQ4)=>{Object.defineProperty(AQ4,"__esModule",{value:!0});AQ4.JsonLogsSerializer=void 0;var HZz=fQ1();AQ4.JsonLogsSerializer={serializeRequest:(q)=>{let K=(0,HZz.createExportLogsServiceRequest)(q,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(K))},deserializeResponse:(q)=>{if(q.length===0)return{};return JSON.parse(new TextDecoder().decode(q))}}});var jQ4=m((NQ1)=>{Object.defineProperty(NQ1,"__esModule",{value:!0});NQ1.JsonLogsSerializer=void 0;var JZz=wQ4();Object.defineProperty(NQ1,"JsonLogsSerializer",{enumerable:!0,get:function(){return JZz.JsonLogsSerializer}})});var MQ4=m((HQ4)=>{Object.defineProperty(HQ4,"__esModule",{value:!0});HQ4.JsonMetricsSerializer=void 0;var XZz=TQ1();HQ4.JsonMetricsSerializer={serializeRequest:(q)=>{let K=(0,XZz.createExportMetricsServiceRequest)([q],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(K))},deserializeResponse:(q)=>{if(q.length===0)return{};return JSON.parse(new TextDecoder().decode(q))}}});var XQ4=m((yQ1)=>{Object.defineProperty(yQ1,"__esModule",{value:!0});yQ1.JsonMetricsSerializer=void 0;var PZz=MQ4();Object.defineProperty(yQ1,"JsonMetricsSerializer",{enumerable:!0,get:function(){return PZz.JsonMetricsSerializer}})});var DQ4=m((PQ4)=>{Object.defineProperty(PQ4,"__esModule",{value:!0});PQ4.JsonTraceSerializer=void 0;var DZz=kQ1();PQ4.JsonTraceSerializer={serializeRequest:(q)=>{let K=(0,DZz.createExportTraceServiceRequest)(q,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(K))},deserializeResponse:(q)=>{if(q.length===0)return{};return JSON.parse(new TextDecoder().decode(q))}}});var fQ4=m((EQ1)=>{Object.defineProperty(EQ1,"__esModule",{value:!0});EQ1.JsonTraceSerializer=void 0;var fZz=DQ4();Object.defineProperty(EQ1,"JsonTraceSerializer",{enumerable:!0,get:function(){return fZz.JsonTraceSerializer}})});var tU=m((M46)=>{Object.defineProperty(M46,"__esModule",{value:!0});M46.JsonTraceSerializer=M46.JsonMetricsSerializer=M46.JsonLogsSerializer=M46.ProtobufTraceSerializer=M46.ProtobufMetricsSerializer=M46.ProtobufLogsSerializer=void 0;var GZz=xU4();Object.defineProperty(M46,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return GZz.ProtobufLogsSerializer}});var TZz=rU4();Object.defineProperty(M46,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return TZz.ProtobufMetricsSerializer}});var vZz=$Q4();Object.defineProperty(M46,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return vZz.ProtobufTraceSerializer}});var kZz=jQ4();Object.defineProperty(M46,"JsonLogsSerializer",{enumerable:!0,get:function(){return kZz.JsonLogsSerializer}});var VZz=XQ4();Object.defineProperty(M46,"JsonMetricsSerializer",{enumerable:!0,get:function(){return VZz.JsonMetricsSerializer}});var NZz=fQ4();Object.defineProperty(M46,"JsonTraceSerializer",{enumerable:!0,get:function(){return NZz.JsonTraceSerializer}})});var TQ4=m((ZQ4)=>{Object.defineProperty(ZQ4,"__esModule",{value:!0});ZQ4.validateAndNormalizeHeaders=void 0;var EZz=nK();function LZz(q){let K={};return Object.entries(q??{}).forEach(([_,z])=>{if(typeof z<"u")K[_]=String(z);else EZz.diag.warn(`Header "${_}" has invalid value (${z}) and will be ignored`)}),K}ZQ4.validateAndNormalizeHeaders=LZz});var NQ4=m((kQ4)=>{Object.defineProperty(kQ4,"__esModule",{value:!0});kQ4.getHttpConfigurationDefaults=kQ4.mergeOtlpHttpConfigurationWithDefaults=void 0;var vQ4=ks6(),RZz=TQ4();function hZz(q,K,_){return async()=>{let z={...await _()},Y={};if(K!=null)Object.assign(Y,await K());if(q!=null)Object.assign(Y,(0,RZz.validateAndNormalizeHeaders)(await q()));return Object.assign(Y,z)}}function SZz(q){if(q==null)return;try{let K=globalThis.location?.href;return new URL(q,K).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${q}'`)}}function CZz(q,K,_){return{...(0,vQ4.mergeOtlpSharedConfigurationWithDefaults)(q,K,_),headers:hZz(q.headers,K.headers,_.headers),url:SZz(q.url)??K.url??_.url}}kQ4.mergeOtlpHttpConfigurationWithDefaults=CZz;function bZz(q,K){return{...(0,vQ4.getSharedConfigurationDefaults)(),headers:async()=>q,url:"http://localhost:4318/"+K}}kQ4.getHttpConfigurationDefaults=bZz});var uR8=m((LQ4)=>{Object.defineProperty(LQ4,"__esModule",{value:!0});LQ4.getNodeHttpConfigurationDefaults=LQ4.mergeOtlpNodeHttpConfigurationWithDefaults=LQ4.httpAgentFactoryFromOptions=void 0;var yQ4=NQ4();function EQ4(q){return async(K)=>{let _=K==="http:",z=_?import("http"):import("https"),{Agent:Y}=await z;if(_){let{ca:$,cert:A,key:O,...w}=q;return new Y(w)}return new Y(q)}}LQ4.httpAgentFactoryFromOptions=EQ4;function IZz(q,K,_){return{...(0,yQ4.mergeOtlpHttpConfigurationWithDefaults)(q,K,_),agentFactory:q.agentFactory??K.agentFactory??_.agentFactory,userAgent:q.userAgent}}LQ4.mergeOtlpNodeHttpConfigurationWithDefaults=IZz;function uZz(q,K){return{...(0,yQ4.getHttpConfigurationDefaults)(q,K),agentFactory:EQ4({keepAlive:!0})}}LQ4.getNodeHttpConfigurationDefaults=uZz});var CQ4=m((hQ4)=>{Object.defineProperty(hQ4,"__esModule",{value:!0});hQ4.parseRetryAfterToMills=hQ4.isExportRetryable=void 0;function BZz(q){return[429,502,503,504].includes(q)}hQ4.isExportRetryable=BZz;function gZz(q){if(q==null)return;let K=Number.parseInt(q,10);if(Number.isInteger(K))return K>0?K*1000:-1;let _=new Date(q).getTime()-Date.now();if(_>=0)return _;return 0}hQ4.parseRetryAfterToMills=gZz});var IQ4=m((bQ4)=>{Object.defineProperty(bQ4,"__esModule",{value:!0});bQ4.VERSION=void 0;bQ4.VERSION="0.208.0"});var FQ4=m((BQ4)=>{Object.defineProperty(BQ4,"__esModule",{value:!0});BQ4.compressAndSend=BQ4.sendWithHttp=void 0;var UZz=U6("zlib"),QZz=U6("stream"),uQ4=CQ4(),dZz=VR8(),cZz=IQ4(),mQ4=`OTel-OTLP-Exporter-JavaScript/${cZz.VERSION}`;function lZz(q,K,_,z,Y,$,A,O,w){let j=new URL(K);if(Y)_["User-Agent"]=`${Y} ${mQ4}`;else _["User-Agent"]=mQ4;let H={hostname:j.hostname,port:j.port,path:j.pathname,method:"POST",headers:_,agent:$},J=q(H,(M)=>{let X=[];M.on("data",(P)=>X.push(P)),M.on("end",()=>{if(M.statusCode&&M.statusCode<299)O({status:"success",data:Buffer.concat(X)});else if(M.statusCode&&(0,uQ4.isExportRetryable)(M.statusCode))O({status:"retryable",retryInMillis:(0,uQ4.parseRetryAfterToMills)(M.headers["retry-after"])});else{let P=new dZz.OTLPExporterError(M.statusMessage,M.statusCode,Buffer.concat(X).toString());O({status:"failure",error:P})}})});J.setTimeout(w,()=>{J.destroy(),O({status:"failure",error:Error("Request Timeout")})}),J.on("error",(M)=>{O({status:"failure",error:M})}),pQ4(J,z,A,(M)=>{O({status:"failure",error:M})})}BQ4.sendWithHttp=lZz;function pQ4(q,K,_,z){let Y=nZz(_);if(K==="gzip")q.setHeader("Content-Encoding","gzip"),Y=Y.on("error",z).pipe(UZz.createGzip()).on("error",z);Y.pipe(q).on("error",z)}BQ4.compressAndSend=pQ4;function nZz(q){let K=new QZz.Readable;return K.push(q),K.push(null),K}});var cQ4=m((QQ4)=>{Object.defineProperty(QQ4,"__esModule",{value:!0});QQ4.createHttpExporterTransport=void 0;var rZz=FQ4();class UQ4{_parameters;_utils=null;constructor(q){this._parameters=q}async send(q,K){let{agent:_,request:z}=await this._loadUtils(),Y=await this._parameters.headers();return new Promise(($)=>{(0,rZz.sendWithHttp)(z,this._parameters.url,Y,this._parameters.compression,this._parameters.userAgent,_,q,(A)=>{$(A)},K)})}shutdown(){}async _loadUtils(){let q=this._utils;if(q===null){let K=new URL(this._parameters.url).protocol,[_,z]=await Promise.all([this._parameters.agentFactory(K),oZz(K)]);q=this._utils={agent:_,request:z}}return q}}async function oZz(q){let K=q==="http:"?import("http"):import("https"),{request:_}=await K;return _}function aZz(q){return new UQ4(q)}QQ4.createHttpExporterTransport=aZz});var oQ4=m((iQ4)=>{Object.defineProperty(iQ4,"__esModule",{value:!0});iQ4.createRetryingTransport=void 0;var sZz=5,tZz=1000,eZz=5000,qGz=1.5,lQ4=0.2;function KGz(){return Math.random()*(2*lQ4)-lQ4}class nQ4{_transport;constructor(q){this._transport=q}retry(q,K,_){return new Promise((z,Y)=>{setTimeout(()=>{this._transport.send(q,K).then(z,Y)},_)})}async send(q,K){let _=Date.now()+K,z=await this._transport.send(q,K),Y=sZz,$=tZz;while(z.status==="retryable"&&Y>0){Y--;let A=Math.max(Math.min($,eZz)+KGz(),0);$=$*qGz;let O=z.retryInMillis??A,w=_-Date.now();if(O>w)return z;z=await this.retry(q,w,O)}return z}shutdown(){return this._transport.shutdown()}}function _Gz(q){return new nQ4(q.transport)}iQ4.createRetryingTransport=_Gz});var tQ4=m((aQ4)=>{Object.defineProperty(aQ4,"__esModule",{value:!0});aQ4.createOtlpHttpExportDelegate=void 0;var zGz=cU1(),YGz=cQ4(),$Gz=dU1(),AGz=oQ4();function OGz(q,K){return(0,zGz.createOtlpExportDelegate)({transport:(0,AGz.createRetryingTransport)({transport:(0,YGz.createHttpExporterTransport)(q)}),serializer:K,promiseHandler:(0,$Gz.createBoundedQueueExportPromiseHandler)(q)},{timeout:q.timeoutMillis})}aQ4.createOtlpHttpExportDelegate=OGz});var LQ1=m((zd4)=>{Object.defineProperty(zd4,"__esModule",{value:!0});zd4.getSharedConfigurationFromEnvironment=void 0;var Kd4=Oz(),_d4=nK();function eQ4(q){let K=(0,Kd4.getNumberFromEnv)(q);if(K!=null){if(Number.isFinite(K)&&K>0)return K;_d4.diag.warn(`Configuration: ${q} is invalid, expected number greater than 0 (actual: ${K})`)}return}function wGz(q){let K=eQ4(`OTEL_EXPORTER_OTLP_${q}_TIMEOUT`),_=eQ4("OTEL_EXPORTER_OTLP_TIMEOUT");return K??_}function qd4(q){let K=(0,Kd4.getStringFromEnv)(q)?.trim();if(K==null||K==="none"||K==="gzip")return K;_d4.diag.warn(`Configuration: ${q} is invalid, expected 'none' or 'gzip' (actual: '${K}')`);return}function jGz(q){let K=qd4(`OTEL_EXPORTER_OTLP_${q}_COMPRESSION`),_=qd4("OTEL_EXPORTER_OTLP_COMPRESSION");return K??_}function HGz(q){return{timeoutMillis:wGz(q),compression:jGz(q)}}zd4.getSharedConfigurationFromEnvironment=HGz});var Od4=m(($d4)=>{Object.defineProperty($d4,"__esModule",{value:!0});$d4.getNodeHttpConfigurationFromEnvironment=void 0;var JGz=U6("fs"),MGz=U6("path"),eU=Oz(),mR8=nK(),XGz=LQ1(),PGz=ks6(),WGz=uR8();function DGz(q){let K=(0,eU.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${q}_HEADERS`),_=(0,eU.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),z=(0,eU.parseKeyPairsIntoRecord)(K),Y=(0,eU.parseKeyPairsIntoRecord)(_);if(Object.keys(z).length===0&&Object.keys(Y).length===0)return;return Object.assign({},(0,eU.parseKeyPairsIntoRecord)(_),(0,eU.parseKeyPairsIntoRecord)(K))}function fGz(q){try{return new URL(q).toString()}catch{mR8.diag.warn(`Configuration: Could not parse environment-provided export URL: '${q}', falling back to undefined`);return}}function ZGz(q,K){try{new URL(q)}catch{mR8.diag.warn(`Configuration: Could not parse environment-provided export URL: '${q}', falling back to undefined`);return}if(!q.endsWith("/"))q=q+"/";q+=K;try{new URL(q)}catch{mR8.diag.warn(`Configuration: Provided URL appended with '${K}' is not a valid URL, using 'undefined' instead of '${q}'`);return}return q}function GGz(q){let K=(0,eU.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if(K===void 0)return;return ZGz(K,q)}function TGz(q){let K=(0,eU.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${q}_ENDPOINT`);if(K===void 0)return;return fGz(K)}function RQ1(q,K,_){let z=(0,eU.getStringFromEnv)(q),Y=(0,eU.getStringFromEnv)(K),$=z??Y;if($!=null)try{return JGz.readFileSync(MGz.resolve(process.cwd(),$))}catch{mR8.diag.warn(_);return}else return}function vGz(q){return RQ1(`OTEL_EXPORTER_OTLP_${q}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function kGz(q){return RQ1(`OTEL_EXPORTER_OTLP_${q}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function VGz(q){return RQ1(`OTEL_EXPORTER_OTLP_${q}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function NGz(q,K){return{...(0,XGz.getSharedConfigurationFromEnvironment)(q),url:TGz(q)??GGz(K),headers:(0,PGz.wrapStaticHeadersInFunction)(DGz(q)),agentFactory:(0,WGz.httpAgentFactoryFromOptions)({keepAlive:!0,ca:VGz(q),cert:vGz(q),key:kGz(q)})}}$d4.getNodeHttpConfigurationFromEnvironment=NGz});var Hd4=m((wd4)=>{Object.defineProperty(wd4,"__esModule",{value:!0});wd4.convertLegacyHeaders=void 0;var yGz=ks6();function EGz(q){if(typeof q.headers==="function")return q.headers;return(0,yGz.wrapStaticHeadersInFunction)(q.headers)}wd4.convertLegacyHeaders=EGz});var Pd4=m((Md4)=>{Object.defineProperty(Md4,"__esModule",{value:!0});Md4.convertLegacyHttpOptions=void 0;var LGz=nK(),Jd4=uR8(),RGz=Po(),hGz=Od4(),SGz=Hd4();function CGz(q){if(typeof q.httpAgentOptions==="function")return q.httpAgentOptions;let K=q.httpAgentOptions;if(q.keepAlive!=null)K={keepAlive:q.keepAlive,...K};if(K!=null)return(0,RGz.httpAgentFactoryFromOptions)(K);else return}function bGz(q,K,_,z){if(q.metadata)LGz.diag.warn("Metadata cannot be set when using http");return(0,Jd4.mergeOtlpNodeHttpConfigurationWithDefaults)({url:q.url,headers:(0,SGz.convertLegacyHeaders)(q),concurrencyLimit:q.concurrencyLimit,timeoutMillis:q.timeoutMillis,compression:q.compression,agentFactory:CGz(q),userAgent:q.userAgent},(0,hGz.getNodeHttpConfigurationFromEnvironment)(K,_),(0,Jd4.getNodeHttpConfigurationDefaults)(z,_))}Md4.convertLegacyHttpOptions=bGz});var Po=m((Hy6)=>{Object.defineProperty(Hy6,"__esModule",{value:!0});Hy6.convertLegacyHttpOptions=Hy6.getSharedConfigurationFromEnvironment=Hy6.createOtlpHttpExportDelegate=Hy6.httpAgentFactoryFromOptions=void 0;var xGz=uR8();Object.defineProperty(Hy6,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return xGz.httpAgentFactoryFromOptions}});var IGz=tQ4();Object.defineProperty(Hy6,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return IGz.createOtlpHttpExportDelegate}});var uGz=LQ1();Object.defineProperty(Hy6,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return uGz.getSharedConfigurationFromEnvironment}});var mGz=Pd4();Object.defineProperty(Hy6,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return mGz.convertLegacyHttpOptions}})});var Gd4=m((fd4)=>{Object.defineProperty(fd4,"__esModule",{value:!0});fd4.OTLPMetricExporter=void 0;var BGz=iU1(),gGz=tU(),Wd4=Po();class Dd4 extends BGz.OTLPMetricExporterBase{constructor(q){super((0,Wd4.createOtlpHttpExportDelegate)((0,Wd4.convertLegacyHttpOptions)(q??{},"METRICS","v1/metrics",{"Content-Type":"application/json"}),gGz.JsonMetricsSerializer),q)}}fd4.OTLPMetricExporter=Dd4});var Td4=m((hQ1)=>{Object.defineProperty(hQ1,"__esModule",{value:!0});hQ1.OTLPMetricExporter=void 0;var FGz=Gd4();Object.defineProperty(hQ1,"OTLPMetricExporter",{enumerable:!0,get:function(){return FGz.OTLPMetricExporter}})});var vd4=m((SQ1)=>{Object.defineProperty(SQ1,"__esModule",{value:!0});SQ1.OTLPMetricExporter=void 0;var QGz=Td4();Object.defineProperty(SQ1,"OTLPMetricExporter",{enumerable:!0,get:function(){return QGz.OTLPMetricExporter}})});var BR8=m((X46)=>{Object.defineProperty(X46,"__esModule",{value:!0});X46.OTLPMetricExporterBase=X46.LowMemoryTemporalitySelector=X46.DeltaTemporalitySelector=X46.CumulativeTemporalitySelector=X46.AggregationTemporalityPreference=X46.OTLPMetricExporter=void 0;var cGz=vd4();Object.defineProperty(X46,"OTLPMetricExporter",{enumerable:!0,get:function(){return cGz.OTLPMetricExporter}});var lGz=UU1();Object.defineProperty(X46,"AggregationTemporalityPreference",{enumerable:!0,get:function(){return lGz.AggregationTemporalityPreference}});var pR8=iU1();Object.defineProperty(X46,"CumulativeTemporalitySelector",{enumerable:!0,get:function(){return pR8.CumulativeTemporalitySelector}});Object.defineProperty(X46,"DeltaTemporalitySelector",{enumerable:!0,get:function(){return pR8.DeltaTemporalitySelector}});Object.defineProperty(X46,"LowMemoryTemporalitySelector",{enumerable:!0,get:function(){return pR8.LowMemoryTemporalitySelector}});Object.defineProperty(X46,"OTLPMetricExporterBase",{enumerable:!0,get:function(){return pR8.OTLPMetricExporterBase}})});var Nd4=m((kd4)=>{Object.defineProperty(kd4,"__esModule",{value:!0});kd4.VERSION=void 0;kd4.VERSION="0.208.0"});var c_=m((Rd4)=>{Object.defineProperty(Rd4,"__esModule",{value:!0});Rd4.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=Rd4.DEFAULT_MAX_SEND_MESSAGE_LENGTH=Rd4.Propagate=Rd4.LogVerbosity=Rd4.Status=void 0;var yd4;(function(q){q[q.OK=0]="OK",q[q.CANCELLED=1]="CANCELLED",q[q.UNKNOWN=2]="UNKNOWN",q[q.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",q[q.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",q[q.NOT_FOUND=5]="NOT_FOUND",q[q.ALREADY_EXISTS=6]="ALREADY_EXISTS",q[q.PERMISSION_DENIED=7]="PERMISSION_DENIED",q[q.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",q[q.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",q[q.ABORTED=10]="ABORTED",q[q.OUT_OF_RANGE=11]="OUT_OF_RANGE",q[q.UNIMPLEMENTED=12]="UNIMPLEMENTED",q[q.INTERNAL=13]="INTERNAL",q[q.UNAVAILABLE=14]="UNAVAILABLE",q[q.DATA_LOSS=15]="DATA_LOSS",q[q.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(yd4||(Rd4.Status=yd4={}));var Ed4;(function(q){q[q.DEBUG=0]="DEBUG",q[q.INFO=1]="INFO",q[q.ERROR=2]="ERROR",q[q.NONE=3]="NONE"})(Ed4||(Rd4.LogVerbosity=Ed4={}));var Ld4;(function(q){q[q.DEADLINE=1]="DEADLINE",q[q.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",q[q.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",q[q.CANCELLATION=8]="CANCELLATION",q[q.DEFAULTS=65535]="DEFAULTS"})(Ld4||(Rd4.Propagate=Ld4={}));Rd4.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;Rd4.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4194304});var CQ1=m((hEO,sGz)=>{sGz.exports={name:"@grpc/grpc-js",version:"1.14.0",description:"gRPC Library for Node - pure JS implementation",homepage:"https://grpc.io/",repository:"https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",main:"build/src/index.js",engines:{node:">=12.10.0"},keywords:[],author:{name:"Google Inc."},types:"build/src/index.d.ts",license:"Apache-2.0",devDependencies:{"@grpc/proto-loader":"file:../proto-loader","@types/gulp":"^4.0.17","@types/gulp-mocha":"0.0.37","@types/lodash":"^4.14.202","@types/mocha":"^10.0.6","@types/ncp":"^2.0.8","@types/node":">=20.11.20","@types/pify":"^5.0.4","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/typescript-estree":"^7.1.0","clang-format":"^1.8.0",eslint:"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1",execa:"^2.0.3",gulp:"^4.0.2","gulp-mocha":"^6.0.0",lodash:"^4.17.21",madge:"^5.0.1","mocha-jenkins-reporter":"^0.4.1",ncp:"^2.0.0",pify:"^4.0.1",prettier:"^2.8.8",rimraf:"^3.0.2",semver:"^7.6.0","ts-node":"^10.9.2",typescript:"^5.3.3"},contributors:[{name:"Google Inc."}],scripts:{build:"npm run compile",clean:"rimraf ./build",compile:"tsc -p .",format:'clang-format -i -style="{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}" src/*.ts test/*.ts',lint:"eslint src/*.ts test/*.ts",prepare:"npm run copy-protos && npm run generate-types && npm run generate-test-types && npm run compile",test:"gulp test",check:"npm run lint",fix:"eslint --fix src/*.ts test/*.ts",pretest:"npm run generate-types && npm run generate-test-types && npm run compile",posttest:"npm run check && madge -c ./build/src","generate-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs proto/ proto/xds/ proto/protoc-gen-validate/ -O src/generated/ --grpcLib ../index channelz.proto xds/service/orca/v3/orca.proto","generate-test-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto echo_service.proto","copy-protos":"node ./copy-protos"},dependencies:{"@grpc/proto-loader":"^0.8.0","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/**/*.proto","proto/**/LICENSE","LICENSE","deps/envoy-api/envoy/api/v2/**/*.proto","deps/envoy-api/envoy/config/**/*.proto","deps/envoy-api/envoy/service/**/*.proto","deps/envoy-api/envoy/type/**/*.proto","deps/udpa/udpa/**/*.proto","deps/googleapis/google/api/*.proto","deps/googleapis/google/rpc/*.proto","deps/protoc-gen-validate/validate/**/*.proto"]}});var Gw=m((bd4)=>{var bQ1,xQ1,IQ1,uQ1;Object.defineProperty(bd4,"__esModule",{value:!0});bd4.log=bd4.setLoggerVerbosity=bd4.setLogger=bd4.getLogger=void 0;bd4.trace=wTz;bd4.isTracerEnabled=Cd4;var P46=c_(),tGz=U6("process"),eGz=CQ1().version,qTz={error:(q,...K)=>{console.error("E "+q,...K)},info:(q,...K)=>{console.error("I "+q,...K)},debug:(q,...K)=>{console.error("D "+q,...K)}},j26=qTz,Jy6=P46.LogVerbosity.ERROR,KTz=(xQ1=(bQ1=process.env.GRPC_NODE_VERBOSITY)!==null&&bQ1!==void 0?bQ1:process.env.GRPC_VERBOSITY)!==null&&xQ1!==void 0?xQ1:"";switch(KTz.toUpperCase()){case"DEBUG":Jy6=P46.LogVerbosity.DEBUG;break;case"INFO":Jy6=P46.LogVerbosity.INFO;break;case"ERROR":Jy6=P46.LogVerbosity.ERROR;break;case"NONE":Jy6=P46.LogVerbosity.NONE;break;default:}var _Tz=()=>{return j26};bd4.getLogger=_Tz;var zTz=(q)=>{j26=q};bd4.setLogger=zTz;var YTz=(q)=>{Jy6=q};bd4.setLoggerVerbosity=YTz;var $Tz=(q,...K)=>{let _;if(q>=Jy6){switch(q){case P46.LogVerbosity.DEBUG:_=j26.debug;break;case P46.LogVerbosity.INFO:_=j26.info;break;case P46.LogVerbosity.ERROR:_=j26.error;break}if(!_)_=j26.error;if(_)_.bind(j26)(...K)}};bd4.log=$Tz;var ATz=(uQ1=(IQ1=process.env.GRPC_NODE_TRACE)!==null&&IQ1!==void 0?IQ1:process.env.GRPC_TRACE)!==null&&uQ1!==void 0?uQ1:"",mQ1=new Set,Sd4=new Set;for(let q of ATz.split(","))if(q.startsWith("-"))Sd4.add(q.substring(1));else mQ1.add(q);var OTz=mQ1.has("all");function wTz(q,K,_){if(Cd4(K))bd4.log(q,new Date().toISOString()+" | v"+eGz+" "+tGz.pid+" | "+K+" | "+_)}function Cd4(q){return!Sd4.has(q)&&(OTz||mQ1.has(q))}});var gR8=m((xd4)=>{Object.defineProperty(xd4,"__esModule",{value:!0});xd4.getErrorMessage=PTz;xd4.getErrorCode=WTz;function PTz(q){if(q instanceof Error)return q.message;else return String(q)}function WTz(q){if(typeof q==="object"&&q!==null&&"code"in q&&typeof q.code==="number")return q.code;else return null}});var vD=m((md4)=>{Object.defineProperty(md4,"__esModule",{value:!0});md4.Metadata=void 0;var ZTz=Gw(),GTz=c_(),TTz=gR8(),vTz=/^[:0-9a-z_.-]+$/,kTz=/^[ -~]*$/;function VTz(q){return vTz.test(q)}function NTz(q){return kTz.test(q)}function ud4(q){return q.endsWith("-bin")}function yTz(q){return!q.startsWith("grpc-")}function FR8(q){return q.toLowerCase()}function Id4(q,K){if(!VTz(q))throw Error('Metadata key "'+q+'" contains illegal characters');if(K!==null&&K!==void 0)if(ud4(q)){if(!Buffer.isBuffer(K))throw Error("keys that end with '-bin' must have Buffer values")}else{if(Buffer.isBuffer(K))throw Error("keys that don't end with '-bin' must have String values");if(!NTz(K))throw Error('Metadata string value "'+K+'" contains illegal characters')}}class UR8{constructor(q={}){this.internalRepr=new Map,this.opaqueData=new Map,this.options=q}set(q,K){q=FR8(q),Id4(q,K),this.internalRepr.set(q,[K])}add(q,K){q=FR8(q),Id4(q,K);let _=this.internalRepr.get(q);if(_===void 0)this.internalRepr.set(q,[K]);else _.push(K)}remove(q){q=FR8(q),this.internalRepr.delete(q)}get(q){return q=FR8(q),this.internalRepr.get(q)||[]}getMap(){let q={};for(let[K,_]of this.internalRepr)if(_.length>0){let z=_[0];q[K]=Buffer.isBuffer(z)?Buffer.from(z):z}return q}clone(){let q=new UR8(this.options),K=q.internalRepr;for(let[_,z]of this.internalRepr){let Y=z.map(($)=>{if(Buffer.isBuffer($))return Buffer.from($);else return $});K.set(_,Y)}return q}merge(q){for(let[K,_]of q.internalRepr){let z=(this.internalRepr.get(K)||[]).concat(_);this.internalRepr.set(K,z)}}setOptions(q){this.options=q}getOptions(){return this.options}toHttp2Headers(){let q={};for(let[K,_]of this.internalRepr){if(K.startsWith(":"))continue;q[K]=_.map(ETz)}return q}toJSON(){let q={};for(let[K,_]of this.internalRepr)q[K]=_;return q}setOpaque(q,K){this.opaqueData.set(q,K)}getOpaque(q){return this.opaqueData.get(q)}static fromHttp2Headers(q){let K=new UR8;for(let _ of Object.keys(q)){if(_.charAt(0)===":")continue;let z=q[_];try{if(ud4(_)){if(Array.isArray(z))z.forEach((Y)=>{K.add(_,Buffer.from(Y,"base64"))});else if(z!==void 0)if(yTz(_))z.split(",").forEach((Y)=>{K.add(_,Buffer.from(Y.trim(),"base64"))});else K.add(_,Buffer.from(z,"base64"))}else if(Array.isArray(z))z.forEach((Y)=>{K.add(_,Y)});else if(z!==void 0)K.add(_,z)}catch(Y){let $=`Failed to add metadata entry ${_}: ${z}. ${(0,TTz.getErrorMessage)(Y)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,ZTz.log)(GTz.LogVerbosity.ERROR,$)}}return K}}md4.Metadata=UR8;var ETz=(q)=>{return Buffer.isBuffer(q)?q.toString("base64"):q}});var dR8=m((Bd4)=>{Object.defineProperty(Bd4,"__esModule",{value:!0});Bd4.CallCredentials=void 0;var BQ1=vD();function LTz(q){return"getRequestHeaders"in q&&typeof q.getRequestHeaders==="function"}class My6{static createFromMetadataGenerator(q){return new gQ1(q)}static createFromGoogleCredential(q){return My6.createFromMetadataGenerator((K,_)=>{let z;if(LTz(q))z=q.getRequestHeaders(K.service_url);else z=new Promise((Y,$)=>{q.getRequestMetadata(K.service_url,(A,O)=>{if(A){$(A);return}if(!O){$(Error("Headers not set by metadata plugin"));return}Y(O)})});z.then((Y)=>{let $=new BQ1.Metadata;for(let A of Object.keys(Y))$.add(A,Y[A]);_(null,$)},(Y)=>{_(Y)})})}static createEmpty(){return new FQ1}}Bd4.CallCredentials=My6;class QR8 extends My6{constructor(q){super();this.creds=q}async generateMetadata(q){let K=new BQ1.Metadata,_=await Promise.all(this.creds.map((z)=>z.generateMetadata(q)));for(let z of _)K.merge(z);return K}compose(q){return new QR8(this.creds.concat([q]))}_equals(q){if(this===q)return!0;if(q instanceof QR8)return this.creds.every((K,_)=>K._equals(q.creds[_]));else return!1}}class gQ1 extends My6{constructor(q){super();this.metadataGenerator=q}generateMetadata(q){return new Promise((K,_)=>{this.metadataGenerator(q,(z,Y)=>{if(Y!==void 0)K(Y);else _(z)})})}compose(q){return new QR8([this,q])}_equals(q){if(this===q)return!0;if(q instanceof gQ1)return this.metadataGenerator===q.metadataGenerator;else return!1}}class FQ1 extends My6{generateMetadata(q){return Promise.resolve(new BQ1.Metadata)}compose(q){return q}_equals(q){return q instanceof FQ1}}});var QQ1=m((Ud4)=>{Object.defineProperty(Ud4,"__esModule",{value:!0});Ud4.CIPHER_SUITES=void 0;Ud4.getDefaultRootsData=hTz;var RTz=U6("fs");Ud4.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var Fd4=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,UQ1=null;function hTz(){if(Fd4){if(UQ1===null)UQ1=RTz.readFileSync(Fd4);return UQ1}return null}});var tv=m((cd4)=>{Object.defineProperty(cd4,"__esModule",{value:!0});cd4.parseUri=bTz;cd4.splitHostPort=xTz;cd4.combineHostPort=ITz;cd4.uriToString=uTz;var CTz=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function bTz(q){let K=CTz.exec(q);if(K===null)return null;return{scheme:K[1],authority:K[2],path:K[3]}}var dd4=/^\d+$/;function xTz(q){if(q.startsWith("[")){let K=q.indexOf("]");if(K===-1)return null;let _=q.substring(1,K);if(_.indexOf(":")===-1)return null;if(q.length>K+1)if(q[K+1]===":"){let z=q.substring(K+2);if(dd4.test(z))return{host:_,port:+z};else return null}else return null;else return{host:_}}else{let K=q.split(":");if(K.length===2)if(dd4.test(K[1]))return{host:K[0],port:+K[1]};else return null;else return{host:q}}}function ITz(q){if(q.port===void 0)return q.host;else if(q.host.includes(":"))return`[${q.host}]:${q.port}`;else return`${q.host}:${q.port}`}function uTz(q){let K="";if(q.scheme!==void 0)K+=q.scheme+":";if(q.authority!==void 0)K+="//"+q.authority+"/";return K+=q.path,K}});var Tm=m((ld4)=>{Object.defineProperty(ld4,"__esModule",{value:!0});ld4.CHANNEL_ARGS_CONFIG_SELECTOR_KEY=void 0;ld4.registerResolver=FTz;ld4.registerDefaultScheme=UTz;ld4.createResolver=QTz;ld4.getDefaultAuthority=dTz;ld4.mapUriDefaultScheme=cTz;var cQ1=tv();ld4.CHANNEL_ARGS_CONFIG_SELECTOR_KEY="grpc.internal.config_selector";var Xy6={},dQ1=null;function FTz(q,K){Xy6[q]=K}function UTz(q){dQ1=q}function QTz(q,K,_){if(q.scheme!==void 0&&q.scheme in Xy6)return new Xy6[q.scheme](q,K,_);else throw Error(`No resolver could be created for target ${(0,cQ1.uriToString)(q)}`)}function dTz(q){if(q.scheme!==void 0&&q.scheme in Xy6)return Xy6[q.scheme].getDefaultAuthority(q);else throw Error(`Invalid target ${(0,cQ1.uriToString)(q)}`)}function cTz(q){if(q.scheme===void 0||!(q.scheme in Xy6))if(dQ1!==null)return{scheme:dQ1,authority:void 0,path:(0,cQ1.uriToString)(q)};else return null;return q}});var Wy6=m((ad4)=>{Object.defineProperty(ad4,"__esModule",{value:!0});ad4.ChannelCredentials=void 0;ad4.createCertificateProviderChannelCredentials=eTz;var Ss6=U6("tls"),nR8=dR8(),nQ1=QQ1(),id4=tv(),aTz=Tm(),sTz=Gw(),tTz=c_();function lQ1(q,K){if(q&&!(q instanceof Buffer))throw TypeError(`${K}, if provided, must be a Buffer.`)}class Py6{compose(q){return new lR8(this,q)}static createSsl(q,K,_,z){var Y;if(lQ1(q,"Root certificate"),lQ1(K,"Private key"),lQ1(_,"Certificate chain"),K&&!_)throw Error("Private key must be given with accompanying certificate chain");if(!K&&_)throw Error("Certificate chain must be given with accompanying private key");let $=(0,Ss6.createSecureContext)({ca:(Y=q!==null&&q!==void 0?q:(0,nQ1.getDefaultRootsData)())!==null&&Y!==void 0?Y:void 0,key:K!==null&&K!==void 0?K:void 0,cert:_!==null&&_!==void 0?_:void 0,ciphers:nQ1.CIPHER_SUITES});return new cR8($,z!==null&&z!==void 0?z:{})}static createFromSecureContext(q,K){return new cR8(q,K!==null&&K!==void 0?K:{})}static createInsecure(){return new iQ1}}ad4.ChannelCredentials=Py6;class iQ1 extends Py6{constructor(){super()}compose(q){throw Error("Cannot compose insecure credentials")}_isSecure(){return!1}_equals(q){return q instanceof iQ1}_createSecureConnector(q,K,_){return{connect(z){return Promise.resolve({socket:z,secure:!1})},waitForReady:()=>{return Promise.resolve()},getCallCredentials:()=>{return _!==null&&_!==void 0?_:nR8.CallCredentials.createEmpty()},destroy(){}}}}function rd4(q,K,_,z){var Y,$;let A={secureContext:q},O=_;if("grpc.http_connect_target"in z){let J=(0,id4.parseUri)(z["grpc.http_connect_target"]);if(J)O=J}let w=(0,aTz.getDefaultAuthority)(O),j=(0,id4.splitHostPort)(w),H=(Y=j===null||j===void 0?void 0:j.host)!==null&&Y!==void 0?Y:w;if(A.host=H,K.checkServerIdentity)A.checkServerIdentity=K.checkServerIdentity;if(K.rejectUnauthorized!==void 0)A.rejectUnauthorized=K.rejectUnauthorized;if(A.ALPNProtocols=["h2"],z["grpc.ssl_target_name_override"]){let J=z["grpc.ssl_target_name_override"],M=($=A.checkServerIdentity)!==null&&$!==void 0?$:Ss6.checkServerIdentity;A.checkServerIdentity=(X,P)=>{return M(J,P)},A.servername=J}else A.servername=H;if(z["grpc-node.tls_enable_trace"])A.enableTrace=!0;return A}class od4{constructor(q,K){this.connectionOptions=q,this.callCredentials=K}connect(q){let K=Object.assign({socket:q},this.connectionOptions);return new Promise((_,z)=>{let Y=(0,Ss6.connect)(K,()=>{var $;if((($=this.connectionOptions.rejectUnauthorized)!==null&&$!==void 0?$:!0)&&!Y.authorized){z(Y.authorizationError);return}_({socket:Y,secure:!0})});Y.on("error",($)=>{z($)})})}waitForReady(){return Promise.resolve()}getCallCredentials(){return this.callCredentials}destroy(){}}class cR8 extends Py6{constructor(q,K){super();this.secureContext=q,this.verifyOptions=K}_isSecure(){return!0}_equals(q){if(this===q)return!0;if(q instanceof cR8)return this.secureContext===q.secureContext&&this.verifyOptions.checkServerIdentity===q.verifyOptions.checkServerIdentity;else return!1}_createSecureConnector(q,K,_){let z=rd4(this.secureContext,this.verifyOptions,q,K);return new od4(z,_!==null&&_!==void 0?_:nR8.CallCredentials.createEmpty())}}class hs6 extends Py6{constructor(q,K,_){super();this.caCertificateProvider=q,this.identityCertificateProvider=K,this.verifyOptions=_,this.refcount=0,this.latestCaUpdate=void 0,this.latestIdentityUpdate=void 0,this.caCertificateUpdateListener=this.handleCaCertificateUpdate.bind(this),this.identityCertificateUpdateListener=this.handleIdentityCertitificateUpdate.bind(this),this.secureContextWatchers=[]}_isSecure(){return!0}_equals(q){var K,_;if(this===q)return!0;if(q instanceof hs6)return this.caCertificateProvider===q.caCertificateProvider&&this.identityCertificateProvider===q.identityCertificateProvider&&((K=this.verifyOptions)===null||K===void 0?void 0:K.checkServerIdentity)===((_=q.verifyOptions)===null||_===void 0?void 0:_.checkServerIdentity);else return!1}ref(){var q;if(this.refcount===0)this.caCertificateProvider.addCaCertificateListener(this.caCertificateUpdateListener),(q=this.identityCertificateProvider)===null||q===void 0||q.addIdentityCertificateListener(this.identityCertificateUpdateListener);this.refcount+=1}unref(){var q;if(this.refcount-=1,this.refcount===0)this.caCertificateProvider.removeCaCertificateListener(this.caCertificateUpdateListener),(q=this.identityCertificateProvider)===null||q===void 0||q.removeIdentityCertificateListener(this.identityCertificateUpdateListener)}_createSecureConnector(q,K,_){return this.ref(),new hs6.SecureConnectorImpl(this,q,K,_!==null&&_!==void 0?_:nR8.CallCredentials.createEmpty())}maybeUpdateWatchers(){if(this.hasReceivedUpdates()){for(let q of this.secureContextWatchers)q(this.getLatestSecureContext());this.secureContextWatchers=[]}}handleCaCertificateUpdate(q){this.latestCaUpdate=q,this.maybeUpdateWatchers()}handleIdentityCertitificateUpdate(q){this.latestIdentityUpdate=q,this.maybeUpdateWatchers()}hasReceivedUpdates(){if(this.latestCaUpdate===void 0)return!1;if(this.identityCertificateProvider&&this.latestIdentityUpdate===void 0)return!1;return!0}getSecureContext(){if(this.hasReceivedUpdates())return Promise.resolve(this.getLatestSecureContext());else return new Promise((q)=>{this.secureContextWatchers.push(q)})}getLatestSecureContext(){var q,K;if(!this.latestCaUpdate)return null;if(this.identityCertificateProvider!==null&&!this.latestIdentityUpdate)return null;try{return(0,Ss6.createSecureContext)({ca:this.latestCaUpdate.caCertificate,key:(q=this.latestIdentityUpdate)===null||q===void 0?void 0:q.privateKey,cert:(K=this.latestIdentityUpdate)===null||K===void 0?void 0:K.certificate,ciphers:nQ1.CIPHER_SUITES})}catch(_){return(0,sTz.log)(tTz.LogVerbosity.ERROR,"Failed to createSecureContext with error "+_.message),null}}}hs6.SecureConnectorImpl=class{constructor(q,K,_,z){this.parent=q,this.channelTarget=K,this.options=_,this.callCredentials=z}connect(q){return new Promise((K,_)=>{let z=this.parent.getLatestSecureContext();if(!z){_(Error("Failed to load credentials"));return}if(q.closed)_(Error("Socket closed while loading credentials"));let Y=rd4(z,this.parent.verifyOptions,this.channelTarget,this.options),$=Object.assign({socket:q},Y),A=()=>{_(Error("Socket closed"))},O=(j)=>{_(j)},w=(0,Ss6.connect)($,()=>{var j;if(w.removeListener("close",A),w.removeListener("error",O),((j=this.parent.verifyOptions.rejectUnauthorized)!==null&&j!==void 0?j:!0)&&!w.authorized){_(w.authorizationError);return}K({socket:w,secure:!0})});w.once("close",A),w.once("error",O)})}async waitForReady(){await this.parent.getSecureContext()}getCallCredentials(){return this.callCredentials}destroy(){this.parent.unref()}};function eTz(q,K,_){return new hs6(q,K,_!==null&&_!==void 0?_:{})}class lR8 extends Py6{constructor(q,K){super();if(this.channelCredentials=q,this.callCredentials=K,!q._isSecure())throw Error("Cannot compose insecure credentials")}compose(q){let K=this.callCredentials.compose(q);return new lR8(this.channelCredentials,K)}_isSecure(){return!0}_equals(q){if(this===q)return!0;if(q instanceof lR8)return this.channelCredentials._equals(q.channelCredentials)&&this.callCredentials._equals(q.callCredentials);else return!1}_createSecureConnector(q,K,_){let z=this.callCredentials.compose(_!==null&&_!==void 0?_:nR8.CallCredentials.createEmpty());return this.channelCredentials._createSecureConnector(q,K,z)}}});var D46=m((ed4)=>{Object.defineProperty(ed4,"__esModule",{value:!0});ed4.createChildChannelControlHelper=zvz;ed4.registerLoadBalancerType=Yvz;ed4.registerDefaultLoadBalancerType=$vz;ed4.createLoadBalancer=Avz;ed4.isLoadBalancerNameRegistered=Ovz;ed4.parseLoadBalancingConfig=td4;ed4.getDefaultConfig=wvz;ed4.selectLbConfigFromList=jvz;var Kvz=Gw(),_vz=c_();function zvz(q,K){var _,z,Y,$,A,O,w,j,H,J;return{createSubchannel:(z=(_=K.createSubchannel)===null||_===void 0?void 0:_.bind(K))!==null&&z!==void 0?z:q.createSubchannel.bind(q),updateState:($=(Y=K.updateState)===null||Y===void 0?void 0:Y.bind(K))!==null&&$!==void 0?$:q.updateState.bind(q),requestReresolution:(O=(A=K.requestReresolution)===null||A===void 0?void 0:A.bind(K))!==null&&O!==void 0?O:q.requestReresolution.bind(q),addChannelzChild:(j=(w=K.addChannelzChild)===null||w===void 0?void 0:w.bind(K))!==null&&j!==void 0?j:q.addChannelzChild.bind(q),removeChannelzChild:(J=(H=K.removeChannelzChild)===null||H===void 0?void 0:H.bind(K))!==null&&J!==void 0?J:q.removeChannelzChild.bind(q)}}var W46={},Cs6=null;function Yvz(q,K,_){W46[q]={LoadBalancer:K,LoadBalancingConfig:_}}function $vz(q){Cs6=q}function Avz(q,K){let _=q.getLoadBalancerName();if(_ in W46)return new W46[_].LoadBalancer(K);else return null}function Ovz(q){return q in W46}function td4(q){let K=Object.keys(q);if(K.length!==1)throw Error("Provided load balancing config has multiple conflicting entries");let _=K[0];if(_ in W46)try{return W46[_].LoadBalancingConfig.createFromJson(q[_])}catch(z){throw Error(`${_}: ${z.message}`)}else throw Error(`Unrecognized load balancing config name ${_}`)}function wvz(){if(!Cs6)throw Error("No default load balancer type registered");return new W46[Cs6].LoadBalancingConfig}function jvz(q,K=!1){for(let _ of q)try{return td4(_)}catch(z){(0,Kvz.log)(_vz.LogVerbosity.DEBUG,"Config parsing failed with error",z.message);continue}if(K)if(Cs6)return new W46[Cs6].LoadBalancingConfig;else return null;else return null}});var rQ1=m((_c4)=>{Object.defineProperty(_c4,"__esModule",{value:!0});_c4.validateRetryThrottling=qc4;_c4.validateServiceConfig=Kc4;_c4.extractAndSelectServiceConfig=Lvz;var Zvz=U6("os"),iR8=c_(),rR8=/^\d+(\.\d{1,9})?s$/,Gvz="node";function Tvz(q){if("service"in q&&q.service!==""){if(typeof q.service!=="string")throw Error(`Invalid method config name: invalid service: expected type string, got ${typeof q.service}`);if("method"in q&&q.method!==""){if(typeof q.method!=="string")throw Error(`Invalid method config name: invalid method: expected type string, got ${typeof q.service}`);return{service:q.service,method:q.method}}else return{service:q.service}}else{if("method"in q&&q.method!==void 0)throw Error("Invalid method config name: method set with empty or unset service");return{}}}function vvz(q){if(!("maxAttempts"in q)||!Number.isInteger(q.maxAttempts)||q.maxAttempts<2)throw Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in q)||typeof q.initialBackoff!=="string"||!rR8.test(q.initialBackoff))throw Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("maxBackoff"in q)||typeof q.maxBackoff!=="string"||!rR8.test(q.maxBackoff))throw Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("backoffMultiplier"in q)||typeof q.backoffMultiplier!=="number"||q.backoffMultiplier<=0)throw Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!(("retryableStatusCodes"in q)&&Array.isArray(q.retryableStatusCodes)))throw Error("Invalid method config retry policy: retryableStatusCodes is required");if(q.retryableStatusCodes.length===0)throw Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let K of q.retryableStatusCodes)if(typeof K==="number"){if(!Object.values(iR8.Status).includes(K))throw Error("Invalid method config retry policy: retryableStatusCodes value not in status code range")}else if(typeof K==="string"){if(!Object.values(iR8.Status).includes(K.toUpperCase()))throw Error("Invalid method config retry policy: retryableStatusCodes value not a status code name")}else throw Error("Invalid method config retry policy: retryableStatusCodes value must be a string or number");return{maxAttempts:q.maxAttempts,initialBackoff:q.initialBackoff,maxBackoff:q.maxBackoff,backoffMultiplier:q.backoffMultiplier,retryableStatusCodes:q.retryableStatusCodes}}function kvz(q){if(!("maxAttempts"in q)||!Number.isInteger(q.maxAttempts)||q.maxAttempts<2)throw Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in q&&(typeof q.hedgingDelay!=="string"||!rR8.test(q.hedgingDelay)))throw Error("Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s");if("nonFatalStatusCodes"in q&&Array.isArray(q.nonFatalStatusCodes))for(let _ of q.nonFatalStatusCodes)if(typeof _==="number"){if(!Object.values(iR8.Status).includes(_))throw Error("Invalid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof _==="string"){if(!Object.values(iR8.Status).includes(_.toUpperCase()))throw Error("Invalid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw Error("Invalid method config hedging policy: nonFatalStatusCodes value must be a string or number");let K={maxAttempts:q.maxAttempts};if(q.hedgingDelay)K.hedgingDelay=q.hedgingDelay;if(q.nonFatalStatusCodes)K.nonFatalStatusCodes=q.nonFatalStatusCodes;return K}function Vvz(q){var K;let _={name:[]};if(!("name"in q)||!Array.isArray(q.name))throw Error("Invalid method config: invalid name array");for(let z of q.name)_.name.push(Tvz(z));if("waitForReady"in q){if(typeof q.waitForReady!=="boolean")throw Error("Invalid method config: invalid waitForReady");_.waitForReady=q.waitForReady}if("timeout"in q)if(typeof q.timeout==="object"){if(!("seconds"in q.timeout)||typeof q.timeout.seconds!=="number")throw Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in q.timeout)||typeof q.timeout.nanos!=="number")throw Error("Invalid method config: invalid timeout.nanos");_.timeout=q.timeout}else if(typeof q.timeout==="string"&&rR8.test(q.timeout)){let z=q.timeout.substring(0,q.timeout.length-1).split(".");_.timeout={seconds:z[0]|0,nanos:((K=z[1])!==null&&K!==void 0?K:0)|0}}else throw Error("Invalid method config: invalid timeout");if("maxRequestBytes"in q){if(typeof q.maxRequestBytes!=="number")throw Error("Invalid method config: invalid maxRequestBytes");_.maxRequestBytes=q.maxRequestBytes}if("maxResponseBytes"in q){if(typeof q.maxResponseBytes!=="number")throw Error("Invalid method config: invalid maxRequestBytes");_.maxResponseBytes=q.maxResponseBytes}if("retryPolicy"in q)if("hedgingPolicy"in q)throw Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");else _.retryPolicy=vvz(q.retryPolicy);else if("hedgingPolicy"in q)_.hedgingPolicy=kvz(q.hedgingPolicy);return _}function qc4(q){if(!("maxTokens"in q)||typeof q.maxTokens!=="number"||q.maxTokens<=0||q.maxTokens>1000)throw Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in q)||typeof q.tokenRatio!=="number"||q.tokenRatio<=0)throw Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+q.maxTokens.toFixed(3),tokenRatio:+q.tokenRatio.toFixed(3)}}function Nvz(q){if(!(typeof q==="object"&&q!==null))throw Error(`Invalid loadBalancingConfig: unexpected type ${typeof q}`);let K=Object.keys(q);if(K.length>1)throw Error(`Invalid loadBalancingConfig: unexpected multiple keys ${K}`);if(K.length===0)throw Error("Invalid loadBalancingConfig: load balancing policy name required");return{[K[0]]:q[K[0]]}}function Kc4(q){let K={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in q)if(typeof q.loadBalancingPolicy==="string")K.loadBalancingPolicy=q.loadBalancingPolicy;else throw Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in q)if(Array.isArray(q.loadBalancingConfig))for(let z of q.loadBalancingConfig)K.loadBalancingConfig.push(Nvz(z));else throw Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in q){if(Array.isArray(q.methodConfig))for(let z of q.methodConfig)K.methodConfig.push(Vvz(z))}if("retryThrottling"in q)K.retryThrottling=qc4(q.retryThrottling);let _=[];for(let z of K.methodConfig)for(let Y of z.name){for(let $ of _)if(Y.service===$.service&&Y.method===$.method)throw Error(`Invalid service config: duplicate name ${Y.service}/${Y.method}`);_.push(Y)}return K}function yvz(q){if(!("serviceConfig"in q))throw Error("Invalid service config choice: missing service config");let K={serviceConfig:Kc4(q.serviceConfig)};if("clientLanguage"in q)if(Array.isArray(q.clientLanguage)){K.clientLanguage=[];for(let z of q.clientLanguage)if(typeof z==="string")K.clientLanguage.push(z);else throw Error("Invalid service config choice: invalid clientLanguage")}else throw Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in q)if(Array.isArray(q.clientHostname)){K.clientHostname=[];for(let z of q.clientHostname)if(typeof z==="string")K.clientHostname.push(z);else throw Error("Invalid service config choice: invalid clientHostname")}else throw Error("Invalid service config choice: invalid clientHostname");if("percentage"in q)if(typeof q.percentage==="number"&&0<=q.percentage&&q.percentage<=100)K.percentage=q.percentage;else throw Error("Invalid service config choice: invalid percentage");let _=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let z in q)if(!_.includes(z))throw Error(`Invalid service config choice: unexpected field ${z}`);return K}function Evz(q,K){if(!Array.isArray(q))throw Error("Invalid service config list");for(let _ of q){let z=yvz(_);if(typeof z.percentage==="number"&&K>z.percentage)continue;if(Array.isArray(z.clientHostname)){let Y=!1;for(let $ of z.clientHostname)if($===Zvz.hostname())Y=!0;if(!Y)continue}if(Array.isArray(z.clientLanguage)){let Y=!1;for(let $ of z.clientLanguage)if($===Gvz)Y=!0;if(!Y)continue}return z.serviceConfig}throw Error("No matching service config found")}function Lvz(q,K){for(let _ of q)if(_.length>0&&_[0].startsWith("grpc_config=")){let z=_.join("").substring(12),Y=JSON.parse(z);return Evz(Y,K)}return null}});var ev=m((Yc4)=>{Object.defineProperty(Yc4,"__esModule",{value:!0});Yc4.ConnectivityState=void 0;var zc4;(function(q){q[q.IDLE=0]="IDLE",q[q.CONNECTING=1]="CONNECTING",q[q.READY=2]="READY",q[q.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",q[q.SHUTDOWN=4]="SHUTDOWN"})(zc4||(Yc4.ConnectivityState=zc4={}))});var Wo=m((wc4)=>{Object.defineProperty(wc4,"__esModule",{value:!0});wc4.QueuePicker=wc4.UnavailablePicker=wc4.PickResultType=void 0;var Cvz=vD(),bvz=c_(),oR8;(function(q){q[q.COMPLETE=0]="COMPLETE",q[q.QUEUE=1]="QUEUE",q[q.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",q[q.DROP=3]="DROP"})(oR8||(wc4.PickResultType=oR8={}));class Ac4{constructor(q){this.status=Object.assign({code:bvz.Status.UNAVAILABLE,details:"No connection established",metadata:new Cvz.Metadata},q)}pick(q){return{pickResultType:oR8.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}}wc4.UnavailablePicker=Ac4;class Oc4{constructor(q,K){this.loadBalancer=q,this.childPicker=K,this.calledExitIdle=!1}pick(q){if(!this.calledExitIdle)process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0;if(this.childPicker)return this.childPicker.pick(q);else return{pickResultType:oR8.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}}wc4.QueuePicker=Oc4});var Dy6=m((Hc4)=>{Object.defineProperty(Hc4,"__esModule",{value:!0});Hc4.BackoffTimeout=void 0;var uvz=c_(),mvz=Gw(),pvz="backoff",Bvz=1000,gvz=1.6,Fvz=120000,Uvz=0.2;function Qvz(q,K){return Math.random()*(K-q)+q}class aR8{constructor(q,K){if(this.callback=q,this.initialDelay=Bvz,this.multiplier=gvz,this.maxDelay=Fvz,this.jitter=Uvz,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,this.id=aR8.getNextId(),K){if(K.initialDelay)this.initialDelay=K.initialDelay;if(K.multiplier)this.multiplier=K.multiplier;if(K.jitter)this.jitter=K.jitter;if(K.maxDelay)this.maxDelay=K.maxDelay}this.trace("constructed initialDelay="+this.initialDelay+" multiplier="+this.multiplier+" jitter="+this.jitter+" maxDelay="+this.maxDelay),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}static getNextId(){return this.nextId++}trace(q){mvz.trace(uvz.LogVerbosity.DEBUG,pvz,"{"+this.id+"} "+q)}runTimer(q){var K,_;if(this.trace("runTimer(delay="+q+")"),this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+q),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.trace("timer fired"),this.running=!1,this.callback()},q),!this.hasRef)(_=(K=this.timerId).unref)===null||_===void 0||_.call(K)}runOnce(){this.trace("runOnce()"),this.running=!0,this.startTime=new Date,this.runTimer(this.nextDelay);let q=Math.min(this.nextDelay*this.multiplier,this.maxDelay),K=q*this.jitter;this.nextDelay=q+Qvz(-K,K)}stop(){this.trace("stop()"),clearTimeout(this.timerId),this.running=!1}reset(){if(this.trace("reset() running="+this.running),this.nextDelay=this.initialDelay,this.running){let q=new Date,K=this.startTime;if(K.setMilliseconds(K.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),q<K)this.runTimer(K.getTime()-q.getTime());else this.running=!1}}isRunning(){return this.running}ref(){var q,K;this.hasRef=!0,(K=(q=this.timerId).ref)===null||K===void 0||K.call(q)}unref(){var q,K;this.hasRef=!1,(K=(q=this.timerId).unref)===null||K===void 0||K.call(q)}getEndTime(){return this.endTime}}Hc4.BackoffTimeout=aR8;aR8.nextId=0});var sR8=m((Xc4)=>{Object.defineProperty(Xc4,"__esModule",{value:!0});Xc4.ChildLoadBalancerHandler=void 0;var dvz=D46(),cvz=ev(),lvz="child_load_balancer_helper";class Mc4{constructor(q){this.channelControlHelper=q,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(K){this.parent=K,this.child=null}createSubchannel(K,_){return this.parent.channelControlHelper.createSubchannel(K,_)}updateState(K,_,z){var Y;if(this.calledByPendingChild()){if(K===cvz.ConnectivityState.CONNECTING)return;(Y=this.parent.currentChild)===null||Y===void 0||Y.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(K,_,z)}requestReresolution(){var K;let _=(K=this.parent.pendingChild)!==null&&K!==void 0?K:this.parent.currentChild;if(this.child===_)this.parent.channelControlHelper.requestReresolution()}setChild(K){this.child=K}addChannelzChild(K){this.parent.channelControlHelper.addChannelzChild(K)}removeChannelzChild(K){this.parent.channelControlHelper.removeChannelzChild(K)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(q,K){return q.getLoadBalancerName()!==K.getLoadBalancerName()}updateAddressList(q,K,_,z){let Y;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,K)){let $=new this.ChildPolicyHelper(this),A=(0,dvz.createLoadBalancer)(K,$);if($.setChild(A),this.currentChild===null)this.currentChild=A,Y=this.currentChild;else{if(this.pendingChild)this.pendingChild.destroy();this.pendingChild=A,Y=this.pendingChild}}else if(this.pendingChild===null)Y=this.currentChild;else Y=this.pendingChild;return this.latestConfig=K,Y.updateAddressList(q,K,_,z)}exitIdle(){if(this.currentChild){if(this.currentChild.exitIdle(),this.pendingChild)this.pendingChild.exitIdle()}}resetBackoff(){if(this.currentChild){if(this.currentChild.resetBackoff(),this.pendingChild)this.pendingChild.resetBackoff()}}destroy(){if(this.currentChild)this.currentChild.destroy(),this.currentChild=null;if(this.pendingChild)this.pendingChild.destroy(),this.pendingChild=null}getTypeName(){return lvz}}Xc4.ChildLoadBalancerHandler=Mc4});var Tc4=m((Zc4)=>{Object.defineProperty(Zc4,"__esModule",{value:!0});Zc4.ResolvingLoadBalancer=void 0;var nvz=D46(),ivz=rQ1(),gN=ev(),Wc4=Tm(),bs6=Wo(),rvz=Dy6(),oQ1=c_(),ovz=vD(),avz=Gw(),svz=c_(),tvz=tv(),evz=sR8(),qkz="resolving_load_balancer";function Dc4(q){avz.trace(svz.LogVerbosity.DEBUG,qkz,q)}var Kkz=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function _kz(q,K,_,z){for(let Y of _.name)switch(z){case"EMPTY":if(!Y.service&&!Y.method)return!0;break;case"SERVICE":if(Y.service===q&&!Y.method)return!0;break;case"SERVICE_AND_METHOD":if(Y.service===q&&Y.method===K)return!0}return!1}function zkz(q,K,_,z){for(let Y of _)if(_kz(q,K,Y,z))return Y;return null}function Ykz(q){return{invoke(K,_){var z,Y;let $=K.split("/").filter((w)=>w.length>0),A=(z=$[0])!==null&&z!==void 0?z:"",O=(Y=$[1])!==null&&Y!==void 0?Y:"";if(q&&q.methodConfig)for(let w of Kkz){let j=zkz(A,O,q.methodConfig,w);if(j)return{methodConfig:j,pickInformation:{},status:oQ1.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:oQ1.Status.OK,dynamicFilterFactories:[]}},unref(){}}}class fc4{constructor(q,K,_,z,Y){if(this.target=q,this.channelControlHelper=K,this.channelOptions=_,this.onSuccessfulResolution=z,this.onFailedResolution=Y,this.latestChildState=gN.ConnectivityState.IDLE,this.latestChildPicker=new bs6.QueuePicker(this),this.latestChildErrorMessage=null,this.currentState=gN.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,_["grpc.service_config"])this.defaultServiceConfig=(0,ivz.validateServiceConfig)(JSON.parse(_["grpc.service_config"]));else this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]};this.updateState(gN.ConnectivityState.IDLE,new bs6.QueuePicker(this),null),this.childLoadBalancer=new evz.ChildLoadBalancerHandler({createSubchannel:K.createSubchannel.bind(K),requestReresolution:()=>{if(this.backoffTimeout.isRunning())Dc4("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0;else this.updateResolution()},updateState:(A,O,w)=>{this.latestChildState=A,this.latestChildPicker=O,this.latestChildErrorMessage=w,this.updateState(A,O,w)},addChannelzChild:K.addChannelzChild.bind(K),removeChannelzChild:K.removeChannelzChild.bind(K)}),this.innerResolver=(0,Wc4.createResolver)(q,this.handleResolverResult.bind(this),_);let $={initialDelay:_["grpc.initial_reconnect_backoff_ms"],maxDelay:_["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new rvz.BackoffTimeout(()=>{if(this.continueResolving)this.updateResolution(),this.continueResolving=!1;else this.updateState(this.latestChildState,this.latestChildPicker,this.latestChildErrorMessage)},$),this.backoffTimeout.unref()}handleResolverResult(q,K,_,z){var Y,$;this.backoffTimeout.stop(),this.backoffTimeout.reset();let A=!0,O=null;if(_===null)O=this.defaultServiceConfig;else if(_.ok)O=_.value;else if(this.previousServiceConfig!==null)O=this.previousServiceConfig;else A=!1,this.handleResolutionFailure(_.error);if(O!==null){let w=(Y=O===null||O===void 0?void 0:O.loadBalancingConfig)!==null&&Y!==void 0?Y:[],j=(0,nvz.selectLbConfigFromList)(w,!0);if(j===null)A=!1,this.handleResolutionFailure({code:oQ1.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new ovz.Metadata});else A=this.childLoadBalancer.updateAddressList(q,j,Object.assign(Object.assign({},this.channelOptions),K),z)}if(A)this.onSuccessfulResolution(O,($=K[Wc4.CHANNEL_ARGS_CONFIG_SELECTOR_KEY])!==null&&$!==void 0?$:Ykz(O));return A}updateResolution(){if(this.innerResolver.updateResolution(),this.currentState===gN.ConnectivityState.IDLE)this.updateState(gN.ConnectivityState.CONNECTING,this.latestChildPicker,this.latestChildErrorMessage);this.backoffTimeout.runOnce()}updateState(q,K,_){if(Dc4((0,tvz.uriToString)(this.target)+" "+gN.ConnectivityState[this.currentState]+" -> "+gN.ConnectivityState[q]),q===gN.ConnectivityState.IDLE)K=new bs6.QueuePicker(this,K);this.currentState=q,this.channelControlHelper.updateState(q,K,_)}handleResolutionFailure(q){if(this.latestChildState===gN.ConnectivityState.IDLE)this.updateState(gN.ConnectivityState.TRANSIENT_FAILURE,new bs6.UnavailablePicker(q),q.details),this.onFailedResolution(q)}exitIdle(){if(this.currentState===gN.ConnectivityState.IDLE||this.currentState===gN.ConnectivityState.TRANSIENT_FAILURE)if(this.backoffTimeout.isRunning())this.continueResolving=!0;else this.updateResolution();this.childLoadBalancer.exitIdle()}updateAddressList(q,K){throw Error("updateAddressList not supported on ResolvingLoadBalancer")}resetBackoff(){this.backoffTimeout.reset(),this.childLoadBalancer.resetBackoff()}destroy(){this.childLoadBalancer.destroy(),this.innerResolver.destroy(),this.backoffTimeout.reset(),this.backoffTimeout.stop(),this.latestChildState=gN.ConnectivityState.IDLE,this.latestChildPicker=new bs6.QueuePicker(this),this.currentState=gN.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}}Zc4.ResolvingLoadBalancer=fc4});var Vc4=m((vc4)=>{Object.defineProperty(vc4,"__esModule",{value:!0});vc4.recognizedOptions=void 0;vc4.channelOptionsEqual=$kz;vc4.recognizedOptions={"grpc.ssl_target_name_override":!0,"grpc.primary_user_agent":!0,"grpc.secondary_user_agent":!0,"grpc.default_authority":!0,"grpc.keepalive_time_ms":!0,"grpc.keepalive_timeout_ms":!0,"grpc.keepalive_permit_without_calls":!0,"grpc.service_config":!0,"grpc.max_concurrent_streams":!0,"grpc.initial_reconnect_backoff_ms":!0,"grpc.max_reconnect_backoff_ms":!0,"grpc.use_local_subchannel_pool":!0,"grpc.max_send_message_length":!0,"grpc.max_receive_message_length":!0,"grpc.enable_http_proxy":!0,"grpc.enable_channelz":!0,"grpc.dns_min_time_between_resolutions_ms":!0,"grpc.enable_retries":!0,"grpc.per_rpc_retry_buffer_size":!0,"grpc.retry_buffer_size":!0,"grpc.max_connection_age_ms":!0,"grpc.max_connection_age_grace_ms":!0,"grpc-node.max_session_memory":!0,"grpc.service_config_disable_resolution":!0,"grpc.client_idle_timeout_ms":!0,"grpc-node.tls_enable_trace":!0,"grpc.lb.ring_hash.ring_size_cap":!0,"grpc-node.retry_max_attempts_limit":!0,"grpc-node.flow_control_window":!0,"grpc.server_call_metric_recording":!0};function $kz(q,K){let _=Object.keys(q).sort(),z=Object.keys(K).sort();if(_.length!==z.length)return!1;for(let Y=0;Y<_.length;Y+=1){if(_[Y]!==z[Y])return!1;if(q[_[Y]]!==K[z[Y]])return!1}return!0}});var FN=m((Rc4)=>{Object.defineProperty(Rc4,"__esModule",{value:!0});Rc4.EndpointMap=void 0;Rc4.isTcpSubchannelAddress=Is6;Rc4.subchannelAddressEqual=tR8;Rc4.subchannelAddressToString=yc4;Rc4.stringToSubchannelAddress=wkz;Rc4.endpointEqual=jkz;Rc4.endpointToString=Hkz;Rc4.endpointHasAddress=Ec4;var Nc4=U6("net");function Is6(q){return"port"in q}function tR8(q,K){if(!q&&!K)return!0;if(!q||!K)return!1;if(Is6(q))return Is6(K)&&q.host===K.host&&q.port===K.port;else return!Is6(K)&&q.path===K.path}function yc4(q){if(Is6(q))if((0,Nc4.isIPv6)(q.host))return"["+q.host+"]:"+q.port;else return q.host+":"+q.port;else return q.path}var Okz=443;function wkz(q,K){if((0,Nc4.isIP)(q))return{host:q,port:K!==null&&K!==void 0?K:Okz};else return{path:q}}function jkz(q,K){if(q.addresses.length!==K.addresses.length)return!1;for(let _=0;_<q.addresses.length;_++)if(!tR8(q.addresses[_],K.addresses[_]))return!1;return!0}function Hkz(q){return"["+q.addresses.map(yc4).join(", ")+"]"}function Ec4(q,K){for(let _ of q.addresses)if(tR8(_,K))return!0;return!1}function xs6(q,K){if(q.addresses.length!==K.addresses.length)return!1;for(let _ of q.addresses){let z=!1;for(let Y of K.addresses)if(tR8(_,Y)){z=!0;break}if(!z)return!1}return!0}class Lc4{constructor(){this.map=new Set}get size(){return this.map.size}getForSubchannelAddress(q){for(let K of this.map)if(Ec4(K.key,q))return K.value;return}deleteMissing(q){let K=[];for(let _ of this.map){let z=!1;for(let Y of q)if(xs6(Y,_.key))z=!0;if(!z)K.push(_.value),this.map.delete(_)}return K}get(q){for(let K of this.map)if(xs6(q,K.key))return K.value;return}set(q,K){for(let _ of this.map)if(xs6(q,_.key)){_.value=K;return}this.map.add({key:q,value:K})}delete(q){for(let K of this.map)if(xs6(q,K.key)){this.map.delete(K);return}}has(q){for(let K of this.map)if(xs6(q,K.key))return!0;return!1}clear(){this.map.clear()}*keys(){for(let q of this.map)yield q.key}*values(){for(let q of this.map)yield q.value}*entries(){for(let q of this.map)yield[q.key,q.value]}}Rc4.EndpointMap=Lc4});var Bc4=m((pc4)=>{Object.defineProperty(pc4,"t",{value:!0});class aQ1{constructor(q,K,_=1){this.i=void 0,this.h=void 0,this.o=void 0,this.u=q,this.l=K,this.p=_}I(){let q=this,K=q.o.o===q;if(K&&q.p===1)q=q.h;else if(q.i){q=q.i;while(q.h)q=q.h}else{if(K)return q.o;let _=q.o;while(_.i===q)q=_,_=q.o;q=_}return q}B(){let q=this;if(q.h){q=q.h;while(q.i)q=q.i;return q}else{let K=q.o;while(K.h===q)q=K,K=q.o;if(q.h!==K)return K;else return q}}_(){let q=this.o,K=this.h,_=K.i;if(q.o===this)q.o=K;else if(q.i===this)q.i=K;else q.h=K;if(K.o=q,K.i=this,this.o=K,this.h=_,_)_.o=this;return K}g(){let q=this.o,K=this.i,_=K.h;if(q.o===this)q.o=K;else if(q.i===this)q.i=K;else q.h=K;if(K.o=q,K.h=this,this.o=K,this.i=_,_)_.o=this;return K}}class Sc4 extends aQ1{constructor(){super(...arguments);this.M=1}_(){let q=super._();return this.O(),q.O(),q}g(){let q=super.g();return this.O(),q.O(),q}O(){if(this.M=1,this.i)this.M+=this.i.M;if(this.h)this.M+=this.h.M}}class Cc4{constructor(q=0){this.iteratorType=q}equals(q){return this.T===q.T}}class bc4{constructor(){this.m=0}get length(){return this.m}size(){return this.m}empty(){return this.m===0}}class xc4 extends bc4{}function H26(){throw RangeError("Iterator access denied!")}class Ic4 extends xc4{constructor(q=function(_,z){if(_<z)return-1;if(_>z)return 1;return 0},K=!1){super();this.v=void 0,this.A=q,this.enableIndex=K,this.N=K?Sc4:aQ1,this.C=new this.N}R(q,K){let _=this.C;while(q){let z=this.A(q.u,K);if(z<0)q=q.h;else if(z>0)_=q,q=q.i;else return q}return _}K(q,K){let _=this.C;while(q)if(this.A(q.u,K)<=0)q=q.h;else _=q,q=q.i;return _}L(q,K){let _=this.C;while(q){let z=this.A(q.u,K);if(z<0)_=q,q=q.h;else if(z>0)q=q.i;else return q}return _}k(q,K){let _=this.C;while(q)if(this.A(q.u,K)<0)_=q,q=q.h;else q=q.i;return _}P(q){while(!0){let K=q.o;if(K===this.C)return;if(q.p===1){q.p=0;return}if(q===K.i){let _=K.h;if(_.p===1)if(_.p=0,K.p=1,K===this.v)this.v=K._();else K._();else if(_.h&&_.h.p===1){if(_.p=K.p,K.p=0,_.h.p=0,K===this.v)this.v=K._();else K._();return}else if(_.i&&_.i.p===1)_.p=1,_.i.p=0,_.g();else _.p=1,q=K}else{let _=K.i;if(_.p===1)if(_.p=0,K.p=1,K===this.v)this.v=K.g();else K.g();else if(_.i&&_.i.p===1){if(_.p=K.p,K.p=0,_.i.p=0,K===this.v)this.v=K.g();else K.g();return}else if(_.h&&_.h.p===1)_.p=1,_.h.p=0,_._();else _.p=1,q=K}}}S(q){if(this.m===1){this.clear();return}let K=q;while(K.i||K.h){if(K.h){K=K.h;while(K.i)K=K.i}else K=K.i;let z=q.u;q.u=K.u,K.u=z;let Y=q.l;q.l=K.l,K.l=Y,q=K}if(this.C.i===K)this.C.i=K.o;else if(this.C.h===K)this.C.h=K.o;this.P(K);let _=K.o;if(K===_.i)_.i=void 0;else _.h=void 0;if(this.m-=1,this.v.p=0,this.enableIndex)while(_!==this.C)_.M-=1,_=_.o}U(q){let K=typeof q==="number"?q:void 0,_=typeof q==="function"?q:void 0,z=typeof q>"u"?[]:void 0,Y=0,$=this.v,A=[];while(A.length||$)if($)A.push($),$=$.i;else{if($=A.pop(),Y===K)return $;z&&z.push($),_&&_($,Y,this),Y+=1,$=$.h}return z}j(q){while(!0){let K=q.o;if(K.p===0)return;let _=K.o;if(K===_.i){let z=_.h;if(z&&z.p===1){if(z.p=K.p=0,_===this.v)return;_.p=1,q=_;continue}else if(q===K.h){if(q.p=0,q.i)q.i.o=K;if(q.h)q.h.o=_;if(K.h=q.i,_.i=q.h,q.i=K,q.h=_,_===this.v)this.v=q,this.C.o=q;else{let Y=_.o;if(Y.i===_)Y.i=q;else Y.h=q}q.o=_.o,K.o=q,_.o=q,_.p=1}else{if(K.p=0,_===this.v)this.v=_.g();else _.g();_.p=1;return}}else{let z=_.i;if(z&&z.p===1){if(z.p=K.p=0,_===this.v)return;_.p=1,q=_;continue}else if(q===K.i){if(q.p=0,q.i)q.i.o=_;if(q.h)q.h.o=K;if(_.h=q.i,K.i=q.h,q.i=_,q.h=K,_===this.v)this.v=q,this.C.o=q;else{let Y=_.o;if(Y.i===_)Y.i=q;else Y.h=q}q.o=_.o,K.o=q,_.o=q,_.p=1}else{if(K.p=0,_===this.v)this.v=_._();else _._();_.p=1;return}}if(this.enableIndex)K.O(),_.O(),q.O();return}}q(q,K,_){if(this.v===void 0)return this.m+=1,this.v=new this.N(q,K,0),this.v.o=this.C,this.C.o=this.C.i=this.C.h=this.v,this.m;let z,Y=this.C.i,$=this.A(Y.u,q);if($===0)return Y.l=K,this.m;else if($>0)Y.i=new this.N(q,K),Y.i.o=Y,z=Y.i,this.C.i=z;else{let A=this.C.h,O=this.A(A.u,q);if(O===0)return A.l=K,this.m;else if(O<0)A.h=new this.N(q,K),A.h.o=A,z=A.h,this.C.h=z;else{if(_!==void 0){let w=_.T;if(w!==this.C){let j=this.A(w.u,q);if(j===0)return w.l=K,this.m;else if(j>0){let H=w.I(),J=this.A(H.u,q);if(J===0)return H.l=K,this.m;else if(J<0)if(z=new this.N(q,K),H.h===void 0)H.h=z,z.o=H;else w.i=z,z.o=w}}}if(z===void 0){z=this.v;while(!0){let w=this.A(z.u,q);if(w>0){if(z.i===void 0){z.i=new this.N(q,K),z.i.o=z,z=z.i;break}z=z.i}else if(w<0){if(z.h===void 0){z.h=new this.N(q,K),z.h.o=z,z=z.h;break}z=z.h}else return z.l=K,this.m}}}}if(this.enableIndex){let A=z.o;while(A!==this.C)A.M+=1,A=A.o}return this.j(z),this.m+=1,this.m}H(q,K){while(q){let _=this.A(q.u,K);if(_<0)q=q.h;else if(_>0)q=q.i;else return q}return q||this.C}clear(){this.m=0,this.v=void 0,this.C.o=void 0,this.C.i=this.C.h=void 0}updateKeyByIterator(q,K){let _=q.T;if(_===this.C)H26();if(this.m===1)return _.u=K,!0;let z=_.B().u;if(_===this.C.i){if(this.A(z,K)>0)return _.u=K,!0;return!1}let Y=_.I().u;if(_===this.C.h){if(this.A(Y,K)<0)return _.u=K,!0;return!1}if(this.A(Y,K)>=0||this.A(z,K)<=0)return!1;return _.u=K,!0}eraseElementByPos(q){if(q<0||q>this.m-1)throw RangeError();let K=this.U(q);return this.S(K),this.m}eraseElementByKey(q){if(this.m===0)return!1;let K=this.H(this.v,q);if(K===this.C)return!1;return this.S(K),!0}eraseElementByIterator(q){let K=q.T;if(K===this.C)H26();let _=K.h===void 0;if(q.iteratorType===0){if(_)q.next()}else if(!_||K.i===void 0)q.next();return this.S(K),q}getHeight(){if(this.m===0)return 0;function q(K){if(!K)return 0;return Math.max(q(K.i),q(K.h))+1}return q(this.v)}}class uc4 extends Cc4{constructor(q,K,_){super(_);if(this.T=q,this.C=K,this.iteratorType===0)this.pre=function(){if(this.T===this.C.i)H26();return this.T=this.T.I(),this},this.next=function(){if(this.T===this.C)H26();return this.T=this.T.B(),this};else this.pre=function(){if(this.T===this.C.h)H26();return this.T=this.T.B(),this},this.next=function(){if(this.T===this.C)H26();return this.T=this.T.I(),this}}get index(){let q=this.T,K=this.C.o;if(q===this.C){if(K)return K.M-1;return 0}let _=0;if(q.i)_+=q.i.M;while(q!==K){let z=q.o;if(q===z.h){if(_+=1,z.i)_+=z.i.M}q=z}return _}isAccessible(){return this.T!==this.C}}class vm extends uc4{constructor(q,K,_,z){super(q,K,z);this.container=_}get pointer(){if(this.T===this.C)H26();let q=this;return new Proxy([],{get(K,_){if(_==="0")return q.T.u;else if(_==="1")return q.T.l;return K[0]=q.T.u,K[1]=q.T.l,K[_]},set(K,_,z){if(_!=="1")throw TypeError("prop must be 1");return q.T.l=z,!0}})}copy(){return new vm(this.T,this.C,this.container,this.iteratorType)}}class mc4 extends Ic4{constructor(q=[],K,_){super(K,_);let z=this;q.forEach(function(Y){z.setElement(Y[0],Y[1])})}begin(){return new vm(this.C.i||this.C,this.C,this)}end(){return new vm(this.C,this.C,this)}rBegin(){return new vm(this.C.h||this.C,this.C,this,1)}rEnd(){return new vm(this.C,this.C,this,1)}front(){if(this.m===0)return;let q=this.C.i;return[q.u,q.l]}back(){if(this.m===0)return;let q=this.C.h;return[q.u,q.l]}lowerBound(q){let K=this.R(this.v,q);return new vm(K,this.C,this)}upperBound(q){let K=this.K(this.v,q);return new vm(K,this.C,this)}reverseLowerBound(q){let K=this.L(this.v,q);return new vm(K,this.C,this)}reverseUpperBound(q){let K=this.k(this.v,q);return new vm(K,this.C,this)}forEach(q){this.U(function(K,_,z){q([K.u,K.l],_,z)})}setElement(q,K,_){return this.q(q,K,_)}getElementByPos(q){if(q<0||q>this.m-1)throw RangeError();let K=this.U(q);return[K.u,K.l]}find(q){let K=this.H(this.v,q);return new vm(K,this.C,this)}getElementByKey(q){return this.H(this.v,q).l}union(q){let K=this;return q.forEach(function(_){K.setElement(_[0],_[1])}),this.m}*[Symbol.iterator](){let q=this.m,K=this.U();for(let _=0;_<q;++_){let z=K[_];yield[z.u,z.l]}}}pc4.OrderedMap=mc4});var eR8=m((Fc4)=>{Object.defineProperty(Fc4,"__esModule",{value:!0});Fc4.registerAdminService=Gkz;Fc4.addAdminServicesToServer=Tkz;var gc4=[];function Gkz(q,K){gc4.push({getServiceDefinition:q,getHandlers:K})}function Tkz(q){for(let{getServiceDefinition:K,getHandlers:_}of gc4)q.addService(K(),_())}});var ic4=m((lc4)=>{Object.defineProperty(lc4,"__esModule",{value:!0});lc4.ClientDuplexStreamImpl=lc4.ClientWritableStreamImpl=lc4.ClientReadableStreamImpl=lc4.ClientUnaryCallImpl=void 0;lc4.callErrorFromStatus=Nkz;var Vkz=U6("events"),sQ1=U6("stream"),us6=c_();function Nkz(q,K){let _=`${q.code} ${us6.Status[q.code]}: ${q.details}`,Y=`${Error(_).stack}
2074for call at
2075${K}`;return Object.assign(Error(_),q,{stack:Y})}class Uc4 extends Vkz.EventEmitter{constructor(){super()}cancel(){var q;(q=this.call)===null||q===void 0||q.cancelWithStatus(us6.Status.CANCELLED,"Cancelled on client")}getPeer(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getPeer())!==null&&K!==void 0?K:"unknown"}getAuthContext(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getAuthContext())!==null&&K!==void 0?K:null}}lc4.ClientUnaryCallImpl=Uc4;class Qc4 extends sQ1.Readable{constructor(q){super({objectMode:!0});this.deserialize=q}cancel(){var q;(q=this.call)===null||q===void 0||q.cancelWithStatus(us6.Status.CANCELLED,"Cancelled on client")}getPeer(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getPeer())!==null&&K!==void 0?K:"unknown"}getAuthContext(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getAuthContext())!==null&&K!==void 0?K:null}_read(q){var K;(K=this.call)===null||K===void 0||K.startRead()}}lc4.ClientReadableStreamImpl=Qc4;class dc4 extends sQ1.Writable{constructor(q){super({objectMode:!0});this.serialize=q}cancel(){var q;(q=this.call)===null||q===void 0||q.cancelWithStatus(us6.Status.CANCELLED,"Cancelled on client")}getPeer(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getPeer())!==null&&K!==void 0?K:"unknown"}getAuthContext(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getAuthContext())!==null&&K!==void 0?K:null}_write(q,K,_){var z;let Y={callback:_},$=Number(K);if(!Number.isNaN($))Y.flags=$;(z=this.call)===null||z===void 0||z.sendMessageWithContext(Y,q)}_final(q){var K;(K=this.call)===null||K===void 0||K.halfClose(),q()}}lc4.ClientWritableStreamImpl=dc4;class cc4 extends sQ1.Duplex{constructor(q,K){super({objectMode:!0});this.serialize=q,this.deserialize=K}cancel(){var q;(q=this.call)===null||q===void 0||q.cancelWithStatus(us6.Status.CANCELLED,"Cancelled on client")}getPeer(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getPeer())!==null&&K!==void 0?K:"unknown"}getAuthContext(){var q,K;return(K=(q=this.call)===null||q===void 0?void 0:q.getAuthContext())!==null&&K!==void 0?K:null}_read(q){var K;(K=this.call)===null||K===void 0||K.startRead()}_write(q,K,_){var z;let Y={callback:_},$=Number(K);if(!Number.isNaN($))Y.flags=$;(z=this.call)===null||z===void 0||z.sendMessageWithContext(Y,q)}_final(q){var K;(K=this.call)===null||K===void 0||K.halfClose(),q()}}lc4.ClientDuplexStreamImpl=cc4});var J26=m((oc4)=>{Object.defineProperty(oc4,"__esModule",{value:!0});oc4.InterceptingListenerImpl=void 0;oc4.statusOrFromValue=Skz;oc4.statusOrFromError=Ckz;oc4.isInterceptingListener=bkz;var hkz=vD();function Skz(q){return{ok:!0,value:q}}function Ckz(q){var K;return{ok:!1,error:Object.assign(Object.assign({},q),{metadata:(K=q.metadata)!==null&&K!==void 0?K:new hkz.Metadata})}}function bkz(q){return q.onReceiveMetadata!==void 0&&q.onReceiveMetadata.length===1}class rc4{constructor(q,K){this.listener=q,this.nextListener=K,this.processingMetadata=!1,this.hasPendingMessage=!1,this.processingMessage=!1,this.pendingStatus=null}processPendingMessage(){if(this.hasPendingMessage)this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1}processPendingStatus(){if(this.pendingStatus)this.nextListener.onReceiveStatus(this.pendingStatus)}onReceiveMetadata(q){this.processingMetadata=!0,this.listener.onReceiveMetadata(q,(K)=>{this.processingMetadata=!1,this.nextListener.onReceiveMetadata(K),this.processPendingMessage(),this.processPendingStatus()})}onReceiveMessage(q){this.processingMessage=!0,this.listener.onReceiveMessage(q,(K)=>{if(this.processingMessage=!1,this.processingMetadata)this.pendingMessage=K,this.hasPendingMessage=!0;else this.nextListener.onReceiveMessage(K),this.processPendingStatus()})}onReceiveStatus(q){this.listener.onReceiveStatus(q,(K)=>{if(this.processingMetadata||this.processingMessage)this.pendingStatus=K;else this.nextListener.onReceiveStatus(K)})}}oc4.InterceptingListenerImpl=rc4});var qd1=m(($l4)=>{Object.defineProperty($l4,"__esModule",{value:!0});$l4.InterceptingCall=$l4.RequesterBuilder=$l4.ListenerBuilder=$l4.InterceptorConfigurationError=void 0;$l4.getInterceptingCall=gkz;var mkz=vD(),sc4=J26(),tc4=c_(),ec4=gR8();class ps6 extends Error{constructor(q){super(q);this.name="InterceptorConfigurationError",Error.captureStackTrace(this,ps6)}}$l4.InterceptorConfigurationError=ps6;class ql4{constructor(){this.metadata=void 0,this.message=void 0,this.status=void 0}withOnReceiveMetadata(q){return this.metadata=q,this}withOnReceiveMessage(q){return this.message=q,this}withOnReceiveStatus(q){return this.status=q,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveStatus:this.status}}}$l4.ListenerBuilder=ql4;class Kl4{constructor(){this.start=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withStart(q){return this.start=q,this}withSendMessage(q){return this.message=q,this}withHalfClose(q){return this.halfClose=q,this}withCancel(q){return this.cancel=q,this}build(){return{start:this.start,sendMessage:this.message,halfClose:this.halfClose,cancel:this.cancel}}}$l4.RequesterBuilder=Kl4;var tQ1={onReceiveMetadata:(q,K)=>{K(q)},onReceiveMessage:(q,K)=>{K(q)},onReceiveStatus:(q,K)=>{K(q)}},ms6={start:(q,K,_)=>{_(q,K)},sendMessage:(q,K)=>{K(q)},halfClose:(q)=>{q()},cancel:(q)=>{q()}};class _l4{constructor(q,K){var _,z,Y,$;if(this.nextCall=q,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,K)this.requester={start:(_=K.start)!==null&&_!==void 0?_:ms6.start,sendMessage:(z=K.sendMessage)!==null&&z!==void 0?z:ms6.sendMessage,halfClose:(Y=K.halfClose)!==null&&Y!==void 0?Y:ms6.halfClose,cancel:($=K.cancel)!==null&&$!==void 0?$:ms6.cancel};else this.requester=ms6}cancelWithStatus(q,K){this.requester.cancel(()=>{this.nextCall.cancelWithStatus(q,K)})}getPeer(){return this.nextCall.getPeer()}processPendingMessage(){if(this.pendingMessageContext)this.nextCall.sendMessageWithContext(this.pendingMessageContext,this.pendingMessage),this.pendingMessageContext=null,this.pendingMessage=null}processPendingHalfClose(){if(this.pendingHalfClose)this.nextCall.halfClose()}start(q,K){var _,z,Y,$,A,O;let w={onReceiveMetadata:(z=(_=K===null||K===void 0?void 0:K.onReceiveMetadata)===null||_===void 0?void 0:_.bind(K))!==null&&z!==void 0?z:(j)=>{},onReceiveMessage:($=(Y=K===null||K===void 0?void 0:K.onReceiveMessage)===null||Y===void 0?void 0:Y.bind(K))!==null&&$!==void 0?$:(j)=>{},onReceiveStatus:(O=(A=K===null||K===void 0?void 0:K.onReceiveStatus)===null||A===void 0?void 0:A.bind(K))!==null&&O!==void 0?O:(j)=>{}};this.processingMetadata=!0,this.requester.start(q,w,(j,H)=>{var J,M,X;this.processingMetadata=!1;let P;if((0,sc4.isInterceptingListener)(H))P=H;else{let W={onReceiveMetadata:(J=H.onReceiveMetadata)!==null&&J!==void 0?J:tQ1.onReceiveMetadata,onReceiveMessage:(M=H.onReceiveMessage)!==null&&M!==void 0?M:tQ1.onReceiveMessage,onReceiveStatus:(X=H.onReceiveStatus)!==null&&X!==void 0?X:tQ1.onReceiveStatus};P=new sc4.InterceptingListenerImpl(W,w)}this.nextCall.start(j,P),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(q,K){this.processingMessage=!0,this.requester.sendMessage(K,(_)=>{if(this.processingMessage=!1,this.processingMetadata)this.pendingMessageContext=q,this.pendingMessage=K;else this.nextCall.sendMessageWithContext(q,_),this.processPendingHalfClose()})}sendMessage(q){this.sendMessageWithContext({},q)}startRead(){this.nextCall.startRead()}halfClose(){this.requester.halfClose(()=>{if(this.processingMetadata||this.processingMessage)this.pendingHalfClose=!0;else this.nextCall.halfClose()})}getAuthContext(){return this.nextCall.getAuthContext()}}$l4.InterceptingCall=_l4;function pkz(q,K,_){var z,Y;let $=(z=_.deadline)!==null&&z!==void 0?z:1/0,A=_.host,O=(Y=_.parent)!==null&&Y!==void 0?Y:null,w=_.propagate_flags,j=_.credentials,H=q.createCall(K,$,A,O,w);if(j)H.setCredentials(j);return H}class eQ1{constructor(q,K){this.call=q,this.methodDefinition=K}cancelWithStatus(q,K){this.call.cancelWithStatus(q,K)}getPeer(){return this.call.getPeer()}sendMessageWithContext(q,K){let _;try{_=this.methodDefinition.requestSerialize(K)}catch(z){this.call.cancelWithStatus(tc4.Status.INTERNAL,`Request message serialization failure: ${(0,ec4.getErrorMessage)(z)}`);return}this.call.sendMessageWithContext(q,_)}sendMessage(q){this.sendMessageWithContext({},q)}start(q,K){let _=null;this.call.start(q,{onReceiveMetadata:(z)=>{var Y;(Y=K===null||K===void 0?void 0:K.onReceiveMetadata)===null||Y===void 0||Y.call(K,z)},onReceiveMessage:(z)=>{var Y;let $;try{$=this.methodDefinition.responseDeserialize(z)}catch(A){_={code:tc4.Status.INTERNAL,details:`Response message parsing error: ${(0,ec4.getErrorMessage)(A)}`,metadata:new mkz.Metadata},this.call.cancelWithStatus(_.code,_.details);return}(Y=K===null||K===void 0?void 0:K.onReceiveMessage)===null||Y===void 0||Y.call(K,$)},onReceiveStatus:(z)=>{var Y,$;if(_)(Y=K===null||K===void 0?void 0:K.onReceiveStatus)===null||Y===void 0||Y.call(K,_);else($=K===null||K===void 0?void 0:K.onReceiveStatus)===null||$===void 0||$.call(K,z)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}getAuthContext(){return this.call.getAuthContext()}}class zl4 extends eQ1{constructor(q,K){super(q,K)}start(q,K){var _,z;let Y=!1,$={onReceiveMetadata:(z=(_=K===null||K===void 0?void 0:K.onReceiveMetadata)===null||_===void 0?void 0:_.bind(K))!==null&&z!==void 0?z:(A)=>{},onReceiveMessage:(A)=>{var O;Y=!0,(O=K===null||K===void 0?void 0:K.onReceiveMessage)===null||O===void 0||O.call(K,A)},onReceiveStatus:(A)=>{var O,w;if(!Y)(O=K===null||K===void 0?void 0:K.onReceiveMessage)===null||O===void 0||O.call(K,null);(w=K===null||K===void 0?void 0:K.onReceiveStatus)===null||w===void 0||w.call(K,A)}};super.start(q,$),this.call.startRead()}}class Yl4 extends eQ1{}function Bkz(q,K,_){let z=pkz(q,_.path,K);if(_.responseStream)return new Yl4(z,_);else return new zl4(z,_)}function gkz(q,K,_,z){if(q.clientInterceptors.length>0&&q.clientInterceptorProviders.length>0)throw new ps6("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(q.callInterceptors.length>0&&q.callInterceptorProviders.length>0)throw new ps6("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let Y=[];if(q.callInterceptors.length>0||q.callInterceptorProviders.length>0)Y=[].concat(q.callInterceptors,q.callInterceptorProviders.map((O)=>O(K))).filter((O)=>O);else Y=[].concat(q.clientInterceptors,q.clientInterceptorProviders.map((O)=>O(K))).filter((O)=>O);let $=Object.assign({},_,{method_definition:K});return Y.reduceRight((O,w)=>{return(j)=>w(j,O)},(O)=>Bkz(z,O,K))($)}});var _d1=m((wl4)=>{Object.defineProperty(wl4,"__esModule",{value:!0});wl4.Client=void 0;var qQ=ic4(),ckz=zd1(),lkz=ev(),f46=c_(),fy6=vD(),qh8=qd1(),km=Symbol(),Zy6=Symbol(),Gy6=Symbol(),Do=Symbol();function Kd1(q){return typeof q==="function"}function Ty6(q){var K;return((K=q.stack)===null||K===void 0?void 0:K.split(`

Callers 1

doExportMethod · 0.85

Calls 6

d7Function · 0.85
BWFunction · 0.85
j8Function · 0.85
yg4Function · 0.85
nowMethod · 0.80
catchMethod · 0.45

Tested by

no test coverage detected