@cline/core 0.0.95 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/dist/ClineCore.d.ts +6 -1
  2. package/dist/account/rpc.d.ts +3 -1
  3. package/dist/cline-core/runtime-services.d.ts +4 -2
  4. package/dist/cloud/controller.d.ts +5 -2
  5. package/dist/cloud/hub-client.d.ts +51 -0
  6. package/dist/cloud/hub-protocol.d.ts +18 -0
  7. package/dist/cloud/index.d.ts +2 -0
  8. package/dist/cloud/index.js +16 -16
  9. package/dist/cloud/types.d.ts +4 -1
  10. package/dist/extensions/context/compaction-shared.d.ts +1 -0
  11. package/dist/extensions/context/compaction.d.ts +7 -0
  12. package/dist/extensions/context/summarize-conversation.d.ts +7 -0
  13. package/dist/extensions/context/summary-generation.d.ts +14 -0
  14. package/dist/extensions/mcp/apps.d.ts +16 -0
  15. package/dist/extensions/mcp/client.d.ts +1 -0
  16. package/dist/extensions/mcp/index.d.ts +5 -1
  17. package/dist/extensions/mcp/manager.d.ts +2 -1
  18. package/dist/extensions/mcp/session-apps.d.ts +28 -0
  19. package/dist/extensions/mcp/types.d.ts +22 -0
  20. package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
  21. package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
  22. package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
  23. package/dist/hub/client/index.d.ts +6 -0
  24. package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
  25. package/dist/hub/client/plugin-commands.d.ts +4 -0
  26. package/dist/hub/client/session-client.d.ts +2 -0
  27. package/dist/hub/daemon/entry.js +241 -228
  28. package/dist/hub/index.d.ts +1 -0
  29. package/dist/hub/index.js +231 -218
  30. package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
  31. package/dist/hub/server/cloud-session-service.d.ts +50 -0
  32. package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
  33. package/dist/hub/server/handlers/context.d.ts +13 -2
  34. package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
  35. package/dist/hub/server/hub-server-options.d.ts +3 -0
  36. package/dist/hub/server/hub-server-transport.d.ts +2 -0
  37. package/dist/index.d.ts +8 -4
  38. package/dist/index.js +278 -258
  39. package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
  40. package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
  41. package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-b1d8eb67.js +1 -0
  42. package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-33qvrctr.js +1 -0
  43. package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-paabhz8w.js +1 -0
  44. package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-yhsfqcy1.js +1 -0
  45. package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +21 -0
  46. package/dist/plugin-runtime/node_modules/@cline/core/dist/community-gqgs7446.js +1 -0
  47. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-822304b0.js +1 -0
  48. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-hky2m2yx.js +1 -0
  49. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-sqf1kd37.js +1 -0
  50. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-tx1kp6xn.js +1 -0
  51. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-6cpgjxme.js +2 -0
  52. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-fxchqbze.js +2 -0
  53. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-m3bzwmzc.js +1 -0
  54. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-pr9sb5fr.js +1 -0
  55. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-nckraycx.js +1 -0
  56. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-w91yq3tm.js +1 -0
  57. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-xdyxc2tf.js +1 -0
  58. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-yxsvs11a.js +1 -0
  59. package/dist/plugin-runtime/node_modules/@cline/core/dist/google-pgdk2dm9.js +1 -0
  60. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1160 -0
  61. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1147 -0
  62. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-02jpyn9y.js +85 -0
  63. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0cb4390m.js +137 -0
  64. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0f8xrhgt.js +209 -0
  65. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1f8vb421.js +2 -0
  66. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-28c7m0fv.js +16 -0
  67. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-2em3jg4q.js +1 -0
  68. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4n1zpzbe.js +2 -0
  69. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-54eea0ex.js +2 -0
  70. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5j92dtg5.js +16 -0
  71. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6akf3a5d.js +2 -0
  72. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6k6ep10s.js +136 -0
  73. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-71ym4q6s.js +2 -0
  74. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-91p1ghfk.js +14 -0
  75. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9qkpjy7x.js +2 -0
  76. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9swk4nej.js +3 -0
  77. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-aa2s5myc.js +1 -0
  78. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ae0ajw38.js +13 -0
  79. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bxvyzjhc.js +1 -0
  80. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bzy863k0.js +6 -0
  81. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d96n0s70.js +20 -0
  82. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-dsd6vt8c.js +1 -0
  83. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-e2q4azd9.js +119 -0
  84. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-egd18jj2.js +4 -0
  85. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-eh83hr16.js +2 -0
  86. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ev9r2dy3.js +1204 -0
  87. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f2mvvryf.js +190 -0
  88. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7gn5v3f.js +2 -0
  89. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7s1a560.js +12 -0
  90. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkhq3jtz.js +21 -0
  91. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-j8r18nfg.js +15 -0
  92. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-jhny555h.js +6 -0
  93. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m1gpa2eg.js +146 -0
  94. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m2ad6tgj.js +1 -0
  95. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m7mks2jq.js +4 -0
  96. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-mcnngj50.js +62 -0
  97. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-n2srkkh0.js +39 -0
  98. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nbs1tsny.js +142 -0
  99. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nqjnz7m4.js +9 -0
  100. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rmhzyxr8.js +3 -0
  101. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rtzf3vvk.js +6 -0
  102. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sw74pcm3.js +2 -0
  103. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t3eanyjj.js +3 -0
  104. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-tseksj1v.js +1 -0
  105. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v0ctpcdr.js +12 -0
  106. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-dx8bd4wq.js +1 -0
  107. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v695918t.js +14 -0
  108. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v96yy1pw.js +1 -0
  109. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vfm7r9wk.js +65 -0
  110. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xecthgrg.js +9 -0
  111. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xn1xhp06.js +9 -0
  112. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yfdscfdx.js +1 -0
  113. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yrnwqsdt.js +2 -0
  114. package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
  115. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-3mgy2y9y.js +473 -0
  116. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-w1xrs0vd.js +1 -0
  117. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-9tppg77c.js +1 -0
  118. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-y658kpzy.js +1 -0
  119. package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-cmhqd91b.js +1 -0
  120. package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-qkjjf8mm.js +2 -0
  121. package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-8z6y9d1h.js +1 -0
  122. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-cfmja1ez.js +1 -0
  123. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-1t7n5sxj.js +1 -0
  124. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-k6yqgnyd.js +1 -0
  125. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-6rdyebbq.js +1 -0
  126. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
  127. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
  128. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-1h068py9.js +1 -0
  129. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-7jchft51.js +1 -0
  130. package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-qfxfsrn4.js +1 -0
  131. package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
  132. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
  133. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
  134. package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
  135. package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
  136. package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
  137. package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
  138. package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
  139. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
  140. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
  141. package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
  142. package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
  143. package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
  144. package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
  145. package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
  146. package/dist/plugin-runtime/package.json +1 -0
  147. package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
  148. package/dist/remote/remote-environments.d.ts +1 -0
  149. package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
  150. package/dist/runtime/host/local-runtime-host.d.ts +10 -0
  151. package/dist/runtime/host/runtime-host.d.ts +6 -0
  152. package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
  153. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
  154. package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
  155. package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
  156. package/dist/services/llms/cline-recommended-models.d.ts +2 -0
  157. package/dist/services/local-runtime-bootstrap.d.ts +1 -0
  158. package/dist/services/plugin-command-api.d.ts +47 -0
  159. package/dist/services/plugin-commands.d.ts +25 -27
  160. package/dist/services/skills-cli.d.ts +2 -0
  161. package/dist/services/telemetry/core-events.d.ts +26 -0
  162. package/dist/services/telemetry/index.js +1 -1
  163. package/dist/services/telemetry/run-health.d.ts +40 -0
  164. package/dist/services/telemetry/stall-signals.d.ts +12 -0
  165. package/dist/types/config.d.ts +1 -0
  166. package/dist/types/session.d.ts +7 -0
  167. package/package.json +6 -5
@@ -0,0 +1,14 @@
1
+ import{Wt}from"./index-54eea0ex.js";import{O}from"./index-eh83hr16.js";import{v,i,c}from"./index-mcnngj50.js";var eo=i(function(Zn){Object.defineProperty(Zn,"__esModule",{value:!0});Zn.OTLPExporterBase=void 0;class Xn{_delegate;constructor(n){this._delegate=n}export(n,o){this._delegate.export(n,o)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}Zn.OTLPExporterBase=Xn});var Et=i(function(ro){Object.defineProperty(ro,"__esModule",{value:!0});ro.OTLPExporterError=void 0;class to extends Error{code;name="OTLPExporterError";data;constructor(n,o,l){super(n);this.data=l,this.code=o}}ro.OTLPExporterError=to});var Xe=i(function(io){Object.defineProperty(io,"__esModule",{value:!0});io.getSharedConfigurationDefaults=io.mergeOtlpSharedConfigurationWithDefaults=io.wrapStaticHeadersInFunction=io.validateTimeoutMillis=void 0;function oo(n){if(Number.isFinite(n)&&n>0)return n;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${n}')`)}io.validateTimeoutMillis=oo;function Rh(n){if(n==null)return;return async()=>n}io.wrapStaticHeadersInFunction=Rh;function Mh(n,o,l){return{timeoutMillis:oo(n.timeoutMillis??o.timeoutMillis??l.timeoutMillis),concurrencyLimit:n.concurrencyLimit??o.concurrencyLimit??l.concurrencyLimit,compression:n.compression??o.compression??l.compression}}io.mergeOtlpSharedConfigurationWithDefaults=Mh;function Uh(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}io.getSharedConfigurationDefaults=Uh});var co=i(function(ao){Object.defineProperty(ao,"__esModule",{value:!0});ao.CompressionAlgorithm=void 0;var kh;(function(n){n.NONE="none",n.GZIP="gzip"})(kh=ao.CompressionAlgorithm||(ao.CompressionAlgorithm={}))});var mr=i(function(lo){Object.defineProperty(lo,"__esModule",{value:!0});lo.createBoundedQueueExportPromiseHandler=void 0;class so{_concurrencyLimit;_sendingPromises=[];constructor(n){this._concurrencyLimit=n}pushPromise(n){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(n);let o=()=>{let l=this._sendingPromises.indexOf(n);this._sendingPromises.splice(l,1)};n.then(o,o)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function Vh(n){return new so(n.concurrencyLimit)}lo.createBoundedQueueExportPromiseHandler=Vh});var Ze=i(function(ho){Object.defineProperty(ho,"__esModule",{value:!0});ho.isTracingSuppressed=ho.unsuppressTracing=ho.suppressTracing=void 0;var Bh=O(),_r=Bh.createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function qh(n){return n.setValue(_r,!0)}ho.suppressTracing=qh;function jh(n){return n.deleteValue(_r)}ho.unsuppressTracing=jh;function Gh(n){return n.getValue(_r)===!0}ho.isTracingSuppressed=Gh});var gr=i(function(mo){Object.defineProperty(mo,"__esModule",{value:!0});mo.BAGGAGE_MAX_TOTAL_LENGTH=mo.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=mo.BAGGAGE_MAX_NAME_VALUE_PAIRS=mo.BAGGAGE_HEADER=mo.BAGGAGE_ITEMS_SEPARATOR=mo.BAGGAGE_PROPERTIES_SEPARATOR=mo.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;mo.BAGGAGE_KEY_PAIR_SEPARATOR="=";mo.BAGGAGE_PROPERTIES_SEPARATOR=";";mo.BAGGAGE_ITEMS_SEPARATOR=",";mo.BAGGAGE_HEADER="baggage";mo.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;mo.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;mo.BAGGAGE_MAX_TOTAL_LENGTH=8192});var vr=i(function(vo){Object.defineProperty(vo,"__esModule",{value:!0});vo.parseKeyPairsIntoRecord=vo.parsePairKeyValue=vo.getKeyPairs=vo.serializeKeyPairs=void 0;var Xh=O(),ke=gr();function Zh(n){return n.reduce((o,l)=>{let p=`${o}${o!==""?ke.BAGGAGE_ITEMS_SEPARATOR:""}${l}`;return p.length>ke.BAGGAGE_MAX_TOTAL_LENGTH?o:p},"")}vo.serializeKeyPairs=Zh;function Qh(n){return n.getAllEntries().map(([o,l])=>{let p=`${encodeURIComponent(o)}=${encodeURIComponent(l.value)}`;if(l.metadata!==void 0)p+=ke.BAGGAGE_PROPERTIES_SEPARATOR+l.metadata.toString();return p})}vo.getKeyPairs=Qh;function go(n){if(!n)return;let o=n.indexOf(ke.BAGGAGE_PROPERTIES_SEPARATOR),l=o===-1?n:n.substring(0,o),p=l.indexOf(ke.BAGGAGE_KEY_PAIR_SEPARATOR);if(p<=0)return;let u=l.substring(0,p).trim(),s=l.substring(p+1).trim();if(!u||!s)return;let t,e;try{t=decodeURIComponent(u),e=decodeURIComponent(s)}catch{return}let r;if(o!==-1&&o<n.length-1){let a=n.substring(o+1);r=Xh.baggageEntryMetadataFromString(a)}return{key:t,value:e,metadata:r}}vo.parsePairKeyValue=go;function ey(n){let o={};if(typeof n==="string"&&n.length>0)n.split(ke.BAGGAGE_ITEMS_SEPARATOR).forEach((l)=>{let p=go(l);if(p!==void 0&&p.value.length>0)o[p.key]=p.value});return o}vo.parseKeyPairsIntoRecord=ey});var xo=i(function(So){Object.defineProperty(So,"__esModule",{value:!0});So.W3CBaggagePropagator=void 0;var br=O(),oy=Ze(),ve=gr(),Or=vr();class Oo{inject(n,o,l){let p=br.propagation.getBaggage(n);if(!p||oy.isTracingSuppressed(n))return;let u=Or.getKeyPairs(p).filter((t)=>t.length<=ve.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,ve.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=Or.serializeKeyPairs(u);if(s.length>0)l.set(o,ve.BAGGAGE_HEADER,s)}extract(n,o,l){let p=l.get(o,ve.BAGGAGE_HEADER),u=Array.isArray(p)?p.join(ve.BAGGAGE_ITEMS_SEPARATOR):p;if(!u)return n;let s={};if(u.length===0)return n;if(u.split(ve.BAGGAGE_ITEMS_SEPARATOR).forEach((e)=>{let r=Or.parsePairKeyValue(e);if(r){let a={value:r.value};if(r.metadata)a.metadata=r.metadata;s[r.key]=a}}),Object.entries(s).length===0)return n;return br.propagation.setBaggage(n,br.propagation.createBaggage(s))}fields(){return[ve.BAGGAGE_HEADER]}}So.W3CBaggagePropagator=Oo});var Po=i(function(Ao){Object.defineProperty(Ao,"__esModule",{value:!0});Ao.AnchoredClock=void 0;class Eo{_monotonicClock;_epochMillis;_performanceMillis;constructor(n,o){this._monotonicClock=o,this._epochMillis=n.now(),this._performanceMillis=o.now()}now(){let n=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+n}}Ao.AnchoredClock=Eo});var Co=i(function(Uo){Object.defineProperty(Uo,"__esModule",{value:!0});Uo.isAttributeValue=Uo.isAttributeKey=Uo.sanitizeAttributes=void 0;var wo=O();function iy(n){let o={};if(typeof n!=="object"||n==null)return o;for(let l in n){if(!Object.prototype.hasOwnProperty.call(n,l))continue;if(!Io(l)){wo.diag.warn(`Invalid attribute key: ${l}`);continue}let p=n[l];if(!Ro(p)){wo.diag.warn(`Invalid attribute value set for key: ${l}`);continue}if(Array.isArray(p))o[l]=p.slice();else o[l]=p}return o}Uo.sanitizeAttributes=iy;function Io(n){return typeof n==="string"&&n!==""}Uo.isAttributeKey=Io;function Ro(n){if(n==null)return!0;if(Array.isArray(n))return uy(n);return Mo(typeof n)}Uo.isAttributeValue=Ro;function uy(n){let o;for(let l of n){if(l==null)continue;let p=typeof l;if(p===o)continue;if(!o){if(Mo(p)){o=p;continue}return!1}return!1}return!0}function Mo(n){switch(n){case"number":case"boolean":case"string":return!0}return!1}});var Sr=i(function(Do){Object.defineProperty(Do,"__esModule",{value:!0});Do.loggingErrorHandler=void 0;var sy=O();function ly(){return(n)=>{sy.diag.error(py(n))}}Do.loggingErrorHandler=ly;function py(n){if(typeof n==="string")return n;else return JSON.stringify(fy(n))}function fy(n){let o={},l=n;while(l!==null)Object.getOwnPropertyNames(l).forEach((p)=>{if(o[p])return;let u=l[p];if(u)o[p]=String(u)}),l=Object.getPrototypeOf(l);return o}});var jo=i(function(Bo){Object.defineProperty(Bo,"__esModule",{value:!0});Bo.globalErrorHandler=Bo.setGlobalErrorHandler=void 0;var dy=Sr(),Vo=dy.loggingErrorHandler();function hy(n){Vo=n}Bo.setGlobalErrorHandler=hy;function yy(n){try{Vo(n)}catch{}}Bo.globalErrorHandler=yy});var Jo=i(function(Ko){Object.defineProperty(Ko,"__esModule",{value:!0});Ko.getStringListFromEnv=Ko.getBooleanFromEnv=Ko.getStringFromEnv=Ko.getNumberFromEnv=void 0;var Go=O(),Ho=c("util");function _y(n){let o=process.env[n];if(o==null||o.trim()==="")return;let l=Number(o);if(isNaN(l)){Go.diag.warn(`Unknown value ${Ho.inspect(o)} for ${n}, expected a number, using defaults`);return}return l}Ko.getNumberFromEnv=_y;function Fo(n){let o=process.env[n];if(o==null||o.trim()==="")return;return o}Ko.getStringFromEnv=Fo;function gy(n){let o=process.env[n]?.trim().toLowerCase();if(o==null||o==="")return!1;if(o==="true")return!0;else if(o==="false")return!1;else return Go.diag.warn(`Unknown value ${Ho.inspect(o)} for ${n}, expected 'true' or 'false', falling back to 'false' (default)`),!1}Ko.getBooleanFromEnv=gy;function vy(n){return Fo(n)?.split(",").map((o)=>o.trim()).filter((o)=>o!=="")}Ko.getStringListFromEnv=vy});var Yo=i(function($o){Object.defineProperty($o,"__esModule",{value:!0});$o._globalThis=void 0;$o._globalThis=globalThis});var Qo=i(function(Xo){Object.defineProperty(Xo,"__esModule",{value:!0});Xo.VERSION=void 0;Xo.VERSION="2.6.1"});var ri=i(function(ei){Object.defineProperty(ei,"__esModule",{value:!0});ei.ATTR_PROCESS_RUNTIME_NAME=void 0;ei.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var ii=i(function(ni){Object.defineProperty(ni,"__esModule",{value:!0});ni.SDK_INFO=void 0;var Ty=Qo(),At=Wt(),xy=ri();ni.SDK_INFO={[At.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[xy.ATTR_PROCESS_RUNTIME_NAME]:"node",[At.ATTR_TELEMETRY_SDK_LANGUAGE]:At.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[At.ATTR_TELEMETRY_SDK_VERSION]:Ty.VERSION}});var ai=i(function(pe){Object.defineProperty(pe,"__esModule",{value:!0});pe.otperformance=pe.SDK_INFO=pe._globalThis=pe.getStringListFromEnv=pe.getNumberFromEnv=pe.getBooleanFromEnv=pe.getStringFromEnv=void 0;var Nt=Jo();Object.defineProperty(pe,"getStringFromEnv",{enumerable:!0,get:function(){return Nt.getStringFromEnv}});Object.defineProperty(pe,"getBooleanFromEnv",{enumerable:!0,get:function(){return Nt.getBooleanFromEnv}});Object.defineProperty(pe,"getNumberFromEnv",{enumerable:!0,get:function(){return Nt.getNumberFromEnv}});Object.defineProperty(pe,"getStringListFromEnv",{enumerable:!0,get:function(){return Nt.getStringListFromEnv}});var Ey=Yo();Object.defineProperty(pe,"_globalThis",{enumerable:!0,get:function(){return Ey._globalThis}});var Ay=ii();Object.defineProperty(pe,"SDK_INFO",{enumerable:!0,get:function(){return Ay.SDK_INFO}});pe.otperformance=performance});var Tr=i(function(ae){Object.defineProperty(ae,"__esModule",{value:!0});ae.getStringListFromEnv=ae.getNumberFromEnv=ae.getStringFromEnv=ae.getBooleanFromEnv=ae.otperformance=ae._globalThis=ae.SDK_INFO=void 0;var be=ai();Object.defineProperty(ae,"SDK_INFO",{enumerable:!0,get:function(){return be.SDK_INFO}});Object.defineProperty(ae,"_globalThis",{enumerable:!0,get:function(){return be._globalThis}});Object.defineProperty(ae,"otperformance",{enumerable:!0,get:function(){return be.otperformance}});Object.defineProperty(ae,"getBooleanFromEnv",{enumerable:!0,get:function(){return be.getBooleanFromEnv}});Object.defineProperty(ae,"getStringFromEnv",{enumerable:!0,get:function(){return be.getStringFromEnv}});Object.defineProperty(ae,"getNumberFromEnv",{enumerable:!0,get:function(){return be.getNumberFromEnv}});Object.defineProperty(ae,"getStringListFromEnv",{enumerable:!0,get:function(){return be.getStringListFromEnv}})});var di=i(function(pi){Object.defineProperty(pi,"__esModule",{value:!0});pi.addHrTimes=pi.isTimeInput=pi.isTimeInputHrTime=pi.hrTimeToMicroseconds=pi.hrTimeToMilliseconds=pi.hrTimeToNanoseconds=pi.hrTimeToTimeStamp=pi.hrTimeDuration=pi.timeInputToHrTime=pi.hrTime=pi.getTimeOrigin=pi.millisToHrTime=void 0;var Pt=Tr(),ci=9,Py=6,wy=Math.pow(10,Py),wt=Math.pow(10,ci);function Qe(n){let o=n/1000,l=Math.trunc(o),p=Math.round(n%1000*wy);return[l,p]}pi.millisToHrTime=Qe;function Iy(){return Pt.otperformance.timeOrigin}pi.getTimeOrigin=Iy;function si(n){let o=Qe(Pt.otperformance.timeOrigin),l=Qe(typeof n==="number"?n:Pt.otperformance.now());return li(o,l)}pi.hrTime=si;function Ry(n){if(xr(n))return n;else if(typeof n==="number")if(n<Pt.otperformance.timeOrigin)return si(n);else return Qe(n);else if(n instanceof Date)return Qe(n.getTime());else throw TypeError("Invalid input type")}pi.timeInputToHrTime=Ry;function My(n,o){let l=o[0]-n[0],p=o[1]-n[1];if(p<0)l-=1,p+=wt;return[l,p]}pi.hrTimeDuration=My;function Uy(n){let o=ci,l=`${"0".repeat(o)}${n[1]}Z`,p=l.substring(l.length-o-1);return new Date(n[0]*1000).toISOString().replace("000Z",p)}pi.hrTimeToTimeStamp=Uy;function Ly(n){return n[0]*wt+n[1]}pi.hrTimeToNanoseconds=Ly;function Cy(n){return n[0]*1000+n[1]/1e6}pi.hrTimeToMilliseconds=Cy;function Dy(n){return n[0]*1e6+n[1]/1000}pi.hrTimeToMicroseconds=Dy;function xr(n){return Array.isArray(n)&&n.length===2&&typeof n[0]==="number"&&typeof n[1]==="number"}pi.isTimeInputHrTime=xr;function ky(n){return xr(n)||typeof n==="number"||n instanceof Date}pi.isTimeInput=ky;function li(n,o){let l=[n[0]+o[0],n[1]+o[1]];if(l[1]>=wt)l[1]-=wt,l[0]+=1;return l}pi.addHrTimes=li});var mi=i(function(hi){Object.defineProperty(hi,"__esModule",{value:!0});hi.unrefTimer=void 0;function Wy(n){if(typeof n!=="number")n.unref()}hi.unrefTimer=Wy});var gi=i(function(_i){Object.defineProperty(_i,"__esModule",{value:!0});_i.ExportResultCode=void 0;var Yy;(function(n){n[n.SUCCESS=0]="SUCCESS",n[n.FAILED=1]="FAILED"})(Yy=_i.ExportResultCode||(_i.ExportResultCode={}))});var Ti=i(function(Oi){Object.defineProperty(Oi,"__esModule",{value:!0});Oi.CompositePropagator=void 0;var vi=O();class bi{_propagators;_fields;constructor(n={}){this._propagators=n.propagators??[],this._fields=Array.from(new Set(this._propagators.map((o)=>typeof o.fields==="function"?o.fields():[]).reduce((o,l)=>o.concat(l),[])))}inject(n,o,l){for(let p of this._propagators)try{p.inject(n,o,l)}catch(u){vi.diag.warn(`Failed to inject with ${p.constructor.name}. Err: ${u.message}`)}}extract(n,o,l){return this._propagators.reduce((p,u)=>{try{return u.extract(p,o,l)}catch(s){vi.diag.warn(`Failed to extract with ${u.constructor.name}. Err: ${s.message}`)}return p},n)}fields(){return this._fields.slice()}}Oi.CompositePropagator=bi});var Ai=i(function(xi){Object.defineProperty(xi,"__esModule",{value:!0});xi.validateValue=xi.validateKey=void 0;var Ar="[_0-9a-z-*/]",Xy=`[a-z]${Ar}{0,255}`,Zy=`[a-z0-9]${Ar}{0,240}@[a-z]${Ar}{0,13}`,Qy=new RegExp(`^(?:${Xy}|${Zy})$`),em=/^[ -~]{0,255}[!-~]$/,tm=/,|=/;function rm(n){return Qy.test(n)}xi.validateKey=rm;function nm(n){return em.test(n)&&!tm.test(n)}xi.validateValue=nm});var Pr=i(function(Ri){Object.defineProperty(Ri,"__esModule",{value:!0});Ri.TraceState=void 0;var Ii=Ai(),Ni=32,im=512,Pi=",",wi="=";class Nr{_internalState=new Map;constructor(n){if(n)this._parse(n)}set(n,o){let l=this._clone();if(l._internalState.has(n))l._internalState.delete(n);return l._internalState.set(n,o),l}unset(n){let o=this._clone();return o._internalState.delete(n),o}get(n){return this._internalState.get(n)}serialize(){return this._keys().reduce((n,o)=>(n.push(o+wi+this.get(o)),n),[]).join(Pi)}_parse(n){if(n.length>im)return;if(this._internalState=n.split(Pi).reverse().reduce((o,l)=>{let p=l.trim(),u=p.indexOf(wi);if(u!==-1){let s=p.slice(0,u),t=p.slice(u+1,l.length);if(Ii.validateKey(s)&&Ii.validateValue(t))o.set(s,t)}return o},new Map),this._internalState.size>Ni)this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ni))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let n=new Nr;return n._internalState=new Map(this._internalState),n}}Ri.TraceState=Nr});var ki=i(function(Ci){Object.defineProperty(Ci,"__esModule",{value:!0});Ci.W3CTraceContextPropagator=Ci.parseTraceParent=Ci.TRACE_STATE_HEADER=Ci.TRACE_PARENT_HEADER=void 0;var Mt=O(),um=Ze(),am=Pr();Ci.TRACE_PARENT_HEADER="traceparent";Ci.TRACE_STATE_HEADER="tracestate";var cm="00",sm="(?!ff)[\\da-f]{2}",lm="(?![0]{32})[\\da-f]{32}",pm="(?![0]{16})[\\da-f]{16}",fm="[\\da-f]{2}",dm=new RegExp(`^\\s?(${sm})-(${lm})-(${pm})-(${fm})(-.*)?\\s?$`);function Ui(n){let o=dm.exec(n);if(!o)return null;if(o[1]==="00"&&o[5])return null;return{traceId:o[2],spanId:o[3],traceFlags:parseInt(o[4],16)}}Ci.parseTraceParent=Ui;class Li{inject(n,o,l){let p=Mt.trace.getSpanContext(n);if(!p||um.isTracingSuppressed(n)||!Mt.isSpanContextValid(p))return;let u=`${cm}-${p.traceId}-${p.spanId}-0${Number(p.traceFlags||Mt.TraceFlags.NONE).toString(16)}`;if(l.set(o,Ci.TRACE_PARENT_HEADER,u),p.traceState)l.set(o,Ci.TRACE_STATE_HEADER,p.traceState.serialize())}extract(n,o,l){let p=l.get(o,Ci.TRACE_PARENT_HEADER);if(!p)return n;let u=Array.isArray(p)?p[0]:p;if(typeof u!=="string")return n;let s=Ui(u);if(!s)return n;s.isRemote=!0;let t=l.get(o,Ci.TRACE_STATE_HEADER);if(t){let e=Array.isArray(t)?t.join(","):t;s.traceState=new am.TraceState(typeof e==="string"?e:void 0)}return Mt.trace.setSpanContext(n,s)}fields(){return[Ci.TRACE_PARENT_HEADER,Ci.TRACE_STATE_HEADER]}}Ci.W3CTraceContextPropagator=Li});var ji=i(function(Bi){Object.defineProperty(Bi,"__esModule",{value:!0});Bi.getRPCMetadata=Bi.deleteRPCMetadata=Bi.setRPCMetadata=Bi.RPCType=void 0;var ym=O(),wr=ym.createContextKey("OpenTelemetry SDK Context Key RPC_METADATA"),mm;(function(n){n.HTTP="http"})(mm=Bi.RPCType||(Bi.RPCType={}));function _m(n,o){return n.setValue(wr,o)}Bi.setRPCMetadata=_m;function gm(n){return n.deleteValue(wr)}Bi.deleteRPCMetadata=gm;function Om(n){return n.getValue(wr)}Bi.getRPCMetadata=Om});var $i=i(function(zi){Object.defineProperty(zi,"__esModule",{value:!0});zi.isPlainObject=void 0;var xm="[object Object]",Em="[object Null]",Am="[object Undefined]",Nm=Function.prototype,Gi=Nm.toString,Pm=Gi.call(Object),{getPrototypeOf:wm,prototype:Hi}=Object,Fi=Hi.hasOwnProperty,Oe=Symbol?Symbol.toStringTag:void 0,Ki=Hi.toString;function Im(n){if(!Rm(n)||Mm(n)!==xm)return!1;let o=wm(n);if(o===null)return!0;let l=Fi.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&Gi.call(l)===Pm}zi.isPlainObject=Im;function Rm(n){return n!=null&&typeof n=="object"}function Mm(n){if(n==null)return n===void 0?Am:Em;return Oe&&Oe in Object(n)?Um(n):Lm(n)}function Um(n){let o=Fi.call(n,Oe),l=n[Oe],p=!1;try{n[Oe]=void 0,p=!0}catch{}let u=Ki.call(n);if(p)if(o)n[Oe]=l;else delete n[Oe];return u}function Lm(n){return Ki.call(n)}});var tu=i(function(Qi){Object.defineProperty(Qi,"__esModule",{value:!0});Qi.merge=void 0;var Wi=$i(),Cm=20;function Dm(...n){let o=n.shift(),l=new WeakMap;while(n.length>0)o=Xi(o,n.shift(),0,l);return o}Qi.merge=Dm;function Ir(n){if(Lt(n))return n.slice();return n}function Xi(n,o,l=0,p){let u;if(l>Cm)return;if(l++,Ut(n)||Ut(o)||Zi(o))u=Ir(o);else if(Lt(n)){if(u=n.slice(),Lt(o))for(let s=0,t=o.length;s<t;s++)u.push(Ir(o[s]));else if(et(o)){let s=Object.keys(o);for(let t=0,e=s.length;t<e;t++){let r=s[t];u[r]=Ir(o[r])}}}else if(et(n))if(et(o)){if(!km(n,o))return o;u=Object.assign({},n);let s=Object.keys(o);for(let t=0,e=s.length;t<e;t++){let r=s[t],a=o[r];if(Ut(a))if(typeof a>"u")delete u[r];else u[r]=a;else{let f=u[r],y=a;if(Yi(n,r,p)||Yi(o,r,p))delete u[r];else{if(et(f)&&et(y)){let g=p.get(f)||[],M=p.get(y)||[];g.push({obj:n,key:r}),M.push({obj:o,key:r}),p.set(f,g),p.set(y,M)}u[r]=Xi(u[r],a,l,p)}}}}else u=o;return u}function Yi(n,o,l){let p=l.get(n[o])||[];for(let u=0,s=p.length;u<s;u++){let t=p[u];if(t.key===o&&t.obj===n)return!0}return!1}function Lt(n){return Array.isArray(n)}function Zi(n){return typeof n==="function"}function et(n){return!Ut(n)&&!Lt(n)&&!Zi(n)&&typeof n==="object"}function Ut(n){return typeof n==="string"||typeof n==="number"||typeof n==="boolean"||typeof n>"u"||n instanceof Date||n instanceof RegExp||n===null}function km(n,o){if(!Wi.isPlainObject(n)||!Wi.isPlainObject(o))return!1;return!0}});var ou=i(function(ru){Object.defineProperty(ru,"__esModule",{value:!0});ru.callWithTimeout=ru.TimeoutError=void 0;class Ct extends Error{constructor(n){super(n);Object.setPrototypeOf(this,Ct.prototype)}}ru.TimeoutError=Ct;function Vm(n,o){let l,p=new Promise(function(s,t){l=setTimeout(function(){t(new Ct("Operation timed out."))},o)});return Promise.race([n,p]).then((u)=>(clearTimeout(l),u),(u)=>{throw clearTimeout(l),u})}ru.callWithTimeout=Vm});var cu=i(function(uu){Object.defineProperty(uu,"__esModule",{value:!0});uu.isUrlIgnored=uu.urlMatches=void 0;function iu(n,o){if(typeof o==="string")return n===o;else return!!n.match(o)}uu.urlMatches=iu;function qm(n,o){if(!o)return!1;for(let l of o)if(iu(n,l))return!0;return!1}uu.isUrlIgnored=qm});var fu=i(function(lu){Object.defineProperty(lu,"__esModule",{value:!0});lu.Deferred=void 0;class su{_promise;_resolve;_reject;constructor(){this._promise=new Promise((n,o)=>{this._resolve=n,this._reject=o})}get promise(){return this._promise}resolve(n){this._resolve(n)}reject(n){this._reject(n)}}lu.Deferred=su});var mu=i(function(hu){Object.defineProperty(hu,"__esModule",{value:!0});hu.BindOnceFuture=void 0;var Gm=fu();class du{_isCalled=!1;_deferred=new Gm.Deferred;_callback;_that;constructor(n,o){this._callback=n,this._that=o}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...n){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...n)).then((o)=>this._deferred.resolve(o),(o)=>this._deferred.reject(o))}catch(o){this._deferred.reject(o)}}return this._deferred.promise}}hu.BindOnceFuture=du});var bu=i(function(gu){Object.defineProperty(gu,"__esModule",{value:!0});gu.diagLogLevelFromString=void 0;var ce=O(),_u={ALL:ce.DiagLogLevel.ALL,VERBOSE:ce.DiagLogLevel.VERBOSE,DEBUG:ce.DiagLogLevel.DEBUG,INFO:ce.DiagLogLevel.INFO,WARN:ce.DiagLogLevel.WARN,ERROR:ce.DiagLogLevel.ERROR,NONE:ce.DiagLogLevel.NONE};function Hm(n){if(n==null)return;let o=_u[n.toUpperCase()];if(o==null)return ce.diag.warn(`Unknown log level "${n}", expected one of ${Object.keys(_u)}, using default`),ce.DiagLogLevel.INFO;return o}gu.diagLogLevelFromString=Hm});var xu=i(function(Su){Object.defineProperty(Su,"__esModule",{value:!0});Su._export=void 0;var Ou=O(),Fm=Ze();function Km(n,o){return new Promise((l)=>{Ou.context.with(Fm.suppressTracing(Ou.context.active()),()=>{n.export(o,l)})})}Su._export=Km});var kt=i(function(A){Object.defineProperty(A,"__esModule",{value:!0});A.internal=A.diagLogLevelFromString=A.BindOnceFuture=A.urlMatches=A.isUrlIgnored=A.callWithTimeout=A.TimeoutError=A.merge=A.TraceState=A.unsuppressTracing=A.suppressTracing=A.isTracingSuppressed=A.setRPCMetadata=A.getRPCMetadata=A.deleteRPCMetadata=A.RPCType=A.parseTraceParent=A.W3CTraceContextPropagator=A.TRACE_STATE_HEADER=A.TRACE_PARENT_HEADER=A.CompositePropagator=A.otperformance=A.getStringListFromEnv=A.getNumberFromEnv=A.getBooleanFromEnv=A.getStringFromEnv=A._globalThis=A.SDK_INFO=A.parseKeyPairsIntoRecord=A.ExportResultCode=A.unrefTimer=A.timeInputToHrTime=A.millisToHrTime=A.isTimeInputHrTime=A.isTimeInput=A.hrTimeToTimeStamp=A.hrTimeToNanoseconds=A.hrTimeToMilliseconds=A.hrTimeToMicroseconds=A.hrTimeDuration=A.hrTime=A.getTimeOrigin=A.addHrTimes=A.loggingErrorHandler=A.setGlobalErrorHandler=A.globalErrorHandler=A.sanitizeAttributes=A.isAttributeValue=A.AnchoredClock=A.W3CBaggagePropagator=void 0;var zm=xo();Object.defineProperty(A,"W3CBaggagePropagator",{enumerable:!0,get:function(){return zm.W3CBaggagePropagator}});var Jm=Po();Object.defineProperty(A,"AnchoredClock",{enumerable:!0,get:function(){return Jm.AnchoredClock}});var Eu=Co();Object.defineProperty(A,"isAttributeValue",{enumerable:!0,get:function(){return Eu.isAttributeValue}});Object.defineProperty(A,"sanitizeAttributes",{enumerable:!0,get:function(){return Eu.sanitizeAttributes}});var Au=jo();Object.defineProperty(A,"globalErrorHandler",{enumerable:!0,get:function(){return Au.globalErrorHandler}});Object.defineProperty(A,"setGlobalErrorHandler",{enumerable:!0,get:function(){return Au.setGlobalErrorHandler}});var $m=Sr();Object.defineProperty(A,"loggingErrorHandler",{enumerable:!0,get:function(){return $m.loggingErrorHandler}});var J=di();Object.defineProperty(A,"addHrTimes",{enumerable:!0,get:function(){return J.addHrTimes}});Object.defineProperty(A,"getTimeOrigin",{enumerable:!0,get:function(){return J.getTimeOrigin}});Object.defineProperty(A,"hrTime",{enumerable:!0,get:function(){return J.hrTime}});Object.defineProperty(A,"hrTimeDuration",{enumerable:!0,get:function(){return J.hrTimeDuration}});Object.defineProperty(A,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return J.hrTimeToMicroseconds}});Object.defineProperty(A,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return J.hrTimeToMilliseconds}});Object.defineProperty(A,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return J.hrTimeToNanoseconds}});Object.defineProperty(A,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return J.hrTimeToTimeStamp}});Object.defineProperty(A,"isTimeInput",{enumerable:!0,get:function(){return J.isTimeInput}});Object.defineProperty(A,"isTimeInputHrTime",{enumerable:!0,get:function(){return J.isTimeInputHrTime}});Object.defineProperty(A,"millisToHrTime",{enumerable:!0,get:function(){return J.millisToHrTime}});Object.defineProperty(A,"timeInputToHrTime",{enumerable:!0,get:function(){return J.timeInputToHrTime}});var Wm=mi();Object.defineProperty(A,"unrefTimer",{enumerable:!0,get:function(){return Wm.unrefTimer}});var Ym=gi();Object.defineProperty(A,"ExportResultCode",{enumerable:!0,get:function(){return Ym.ExportResultCode}});var Xm=vr();Object.defineProperty(A,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Xm.parseKeyPairsIntoRecord}});var Se=Tr();Object.defineProperty(A,"SDK_INFO",{enumerable:!0,get:function(){return Se.SDK_INFO}});Object.defineProperty(A,"_globalThis",{enumerable:!0,get:function(){return Se._globalThis}});Object.defineProperty(A,"getStringFromEnv",{enumerable:!0,get:function(){return Se.getStringFromEnv}});Object.defineProperty(A,"getBooleanFromEnv",{enumerable:!0,get:function(){return Se.getBooleanFromEnv}});Object.defineProperty(A,"getNumberFromEnv",{enumerable:!0,get:function(){return Se.getNumberFromEnv}});Object.defineProperty(A,"getStringListFromEnv",{enumerable:!0,get:function(){return Se.getStringListFromEnv}});Object.defineProperty(A,"otperformance",{enumerable:!0,get:function(){return Se.otperformance}});var Zm=Ti();Object.defineProperty(A,"CompositePropagator",{enumerable:!0,get:function(){return Zm.CompositePropagator}});var Dt=ki();Object.defineProperty(A,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return Dt.TRACE_PARENT_HEADER}});Object.defineProperty(A,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return Dt.TRACE_STATE_HEADER}});Object.defineProperty(A,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return Dt.W3CTraceContextPropagator}});Object.defineProperty(A,"parseTraceParent",{enumerable:!0,get:function(){return Dt.parseTraceParent}});var Vt=ji();Object.defineProperty(A,"RPCType",{enumerable:!0,get:function(){return Vt.RPCType}});Object.defineProperty(A,"deleteRPCMetadata",{enumerable:!0,get:function(){return Vt.deleteRPCMetadata}});Object.defineProperty(A,"getRPCMetadata",{enumerable:!0,get:function(){return Vt.getRPCMetadata}});Object.defineProperty(A,"setRPCMetadata",{enumerable:!0,get:function(){return Vt.setRPCMetadata}});var Rr=Ze();Object.defineProperty(A,"isTracingSuppressed",{enumerable:!0,get:function(){return Rr.isTracingSuppressed}});Object.defineProperty(A,"suppressTracing",{enumerable:!0,get:function(){return Rr.suppressTracing}});Object.defineProperty(A,"unsuppressTracing",{enumerable:!0,get:function(){return Rr.unsuppressTracing}});var Qm=Pr();Object.defineProperty(A,"TraceState",{enumerable:!0,get:function(){return Qm.TraceState}});var e_=tu();Object.defineProperty(A,"merge",{enumerable:!0,get:function(){return e_.merge}});var Nu=ou();Object.defineProperty(A,"TimeoutError",{enumerable:!0,get:function(){return Nu.TimeoutError}});Object.defineProperty(A,"callWithTimeout",{enumerable:!0,get:function(){return Nu.callWithTimeout}});var Pu=cu();Object.defineProperty(A,"isUrlIgnored",{enumerable:!0,get:function(){return Pu.isUrlIgnored}});Object.defineProperty(A,"urlMatches",{enumerable:!0,get:function(){return Pu.urlMatches}});var t_=mu();Object.defineProperty(A,"BindOnceFuture",{enumerable:!0,get:function(){return t_.BindOnceFuture}});var r_=bu();Object.defineProperty(A,"diagLogLevelFromString",{enumerable:!0,get:function(){return r_.diagLogLevelFromString}});var n_=xu();A.internal={_export:n_._export}});var Mu=i(function(Iu){Object.defineProperty(Iu,"__esModule",{value:!0});Iu.createLoggingPartialSuccessResponseHandler=void 0;var o_=O();function i_(n){return Object.prototype.hasOwnProperty.call(n,"partialSuccess")}function u_(){return{handleResponse(n){if(n==null||!i_(n)||n.partialSuccess==null||Object.keys(n.partialSuccess).length===0)return;o_.diag.warn("Received Partial Success response:",JSON.stringify(n.partialSuccess))}}}Iu.createLoggingPartialSuccessResponseHandler=u_});var Mr=i(function(Cu){Object.defineProperty(Cu,"__esModule",{value:!0});Cu.createOtlpExportDelegate=void 0;var Te=kt(),Uu=Et(),a_=Mu(),c_=O();class Lu{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(n,o,l,p,u){this._transport=n,this._serializer=o,this._responseHandler=l,this._promiseQueue=p,this._timeout=u,this._diagLogger=c_.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(n,o){if(this._diagLogger.debug("items to be sent",n),this._promiseQueue.hasReachedLimit()){o({code:Te.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let l=this._serializer.serializeRequest(n);if(l==null){o({code:Te.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(l,this._timeout).then((p)=>{if(p.status==="success"){if(p.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(p.data))}catch(u){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",u,p.data)}o({code:Te.ExportResultCode.SUCCESS});return}else if(p.status==="failure"&&p.error){o({code:Te.ExportResultCode.FAILED,error:p.error});return}else if(p.status==="retryable")o({code:Te.ExportResultCode.FAILED,error:p.error??new Uu.OTLPExporterError("Export failed with retryable status")});else o({code:Te.ExportResultCode.FAILED,error:new Uu.OTLPExporterError("Export failed with unknown error")})},(p)=>o({code:Te.ExportResultCode.FAILED,error:p})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function s_(n,o){return new Lu(n.transport,n.serializer,a_.createLoggingPartialSuccessResponseHandler(),n.promiseHandler,o.timeout)}Cu.createOtlpExportDelegate=s_});var Bu=i(function(ku){Object.defineProperty(ku,"__esModule",{value:!0});ku.createOtlpNetworkExportDelegate=void 0;var l_=mr(),p_=Mr();function f_(n,o,l){return p_.createOtlpExportDelegate({transport:l,serializer:o,promiseHandler:l_.createBoundedQueueExportPromiseHandler(n)},{timeout:n.timeoutMillis})}ku.createOtlpNetworkExportDelegate=f_});var bm=i(function(fe){Object.defineProperty(fe,"__esModule",{value:!0});fe.createOtlpNetworkExportDelegate=fe.CompressionAlgorithm=fe.getSharedConfigurationDefaults=fe.mergeOtlpSharedConfigurationWithDefaults=fe.OTLPExporterError=fe.OTLPExporterBase=void 0;var d_=eo();Object.defineProperty(fe,"OTLPExporterBase",{enumerable:!0,get:function(){return d_.OTLPExporterBase}});var h_=Et();Object.defineProperty(fe,"OTLPExporterError",{enumerable:!0,get:function(){return h_.OTLPExporterError}});var qu=Xe();Object.defineProperty(fe,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return qu.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(fe,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return qu.getSharedConfigurationDefaults}});var y_=co();Object.defineProperty(fe,"CompressionAlgorithm",{enumerable:!0,get:function(){return y_.CompressionAlgorithm}});var m_=Bu();Object.defineProperty(fe,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return m_.createOtlpNetworkExportDelegate}})});var Hu=i(function(PE,ju){ju.exports=g_;function g_(n,o){var l=Array(arguments.length-1),p=0,u=2,s=!0;while(u<arguments.length)l[p++]=arguments[u++];return new Promise(function(e,r){l[p]=function(f){if(s)if(s=!1,f)r(f);else{var y=Array(arguments.length-1),g=0;while(g<y.length)y[g++]=arguments[g];e.apply(null,y)}};try{n.apply(o||null,l)}catch(a){if(s)s=!1,r(a)}})}});var Ju=i(function(zu){var Bt=zu;Bt.length=function(o){var l=o.length;if(!l)return 0;var p=0;while(--l%4>1&&o.charAt(l)==="=")++p;return Math.ceil(o.length*3)/4-p};var Ve=Array(64),Ku=Array(123);for(W=0;W<64;)Ku[Ve[W]=W<26?W+65:W<52?W+71:W<62?W-4:W-59|43]=W++;var W;Bt.encode=function(o,l,p){var u=null,s=[],t=0,e=0,r;while(l<p){var a=o[l++];switch(e){case 0:s[t++]=Ve[a>>2],r=(a&3)<<4,e=1;break;case 1:s[t++]=Ve[r|a>>4],r=(a&15)<<2,e=2;break;case 2:s[t++]=Ve[r|a>>6],s[t++]=Ve[a&63],e=0;break}if(t>8191)(u||(u=[])).push(String.fromCharCode.apply(String,s)),t=0}if(e){if(s[t++]=Ve[r],s[t++]=61,e===1)s[t++]=61}if(u){if(t)u.push(String.fromCharCode.apply(String,s.slice(0,t)));return u.join("")}return String.fromCharCode.apply(String,s.slice(0,t))};var Fu="invalid encoding";Bt.decode=function(o,l,p){var u=p,s=0,t;for(var e=0;e<o.length;){var r=o.charCodeAt(e++);if(r===61&&s>1)break;if((r=Ku[r])===void 0)throw Error(Fu);switch(s){case 0:t=r,s=1;break;case 1:l[p++]=t<<2|(r&48)>>4,t=r,s=2;break;case 2:l[p++]=(t&15)<<4|(r&60)>>2,t=r,s=3;break;case 3:l[p++]=(t&3)<<6|r,s=0;break}}if(s===1)throw Error(Fu);return p-u};Bt.test=function(o){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(o)}});var Wu=i(function(IE,$u){$u.exports=qt;function qt(){this._listeners=Object.create(null)}qt.prototype.on=function(o,l,p){return(this._listeners[o]||(this._listeners[o]=[])).push({fn:l,ctx:p||this}),this};qt.prototype.off=function(o,l){if(o===void 0)this._listeners=Object.create(null);else if(l===void 0)this._listeners[o]=[];else{var p=this._listeners[o];if(!p)return this;for(var u=0;u<p.length;)if(p[u].fn===l)p.splice(u,1);else++u}return this};qt.prototype.emit=function(o){var l=this._listeners[o];if(l){var p=[],u=1;for(;u<arguments.length;)p.push(arguments[u++]);for(u=0;u<l.length;)l[u].fn.apply(l[u++].ctx,p)}return this}});var ra=i(function(RE,ta){ta.exports=Yu(Yu);function Yu(n){if(typeof Float32Array<"u")(function(){var o=new Float32Array([-0]),l=new Uint8Array(o.buffer),p=l[3]===128;function u(r,a,f){o[0]=r,a[f]=l[0],a[f+1]=l[1],a[f+2]=l[2],a[f+3]=l[3]}function s(r,a,f){o[0]=r,a[f]=l[3],a[f+1]=l[2],a[f+2]=l[1],a[f+3]=l[0]}n.writeFloatLE=p?u:s,n.writeFloatBE=p?s:u;function t(r,a){return l[0]=r[a],l[1]=r[a+1],l[2]=r[a+2],l[3]=r[a+3],o[0]}function e(r,a){return l[3]=r[a],l[2]=r[a+1],l[1]=r[a+2],l[0]=r[a+3],o[0]}n.readFloatLE=p?t:e,n.readFloatBE=p?e:t})();else(function(){function o(p,u,s,t){var e=u<0?1:0;if(e)u=-u;if(u===0)p(1/u>0?0:2147483648,s,t);else if(isNaN(u))p(2143289344,s,t);else if(u>340282346638528860000000000000000000000)p((e<<31|2139095040)>>>0,s,t);else if(u<0.000000000000000000000000000000000000011754943508222875)p((e<<31|Math.round(u/0.000000000000000000000000000000000000000000001401298464324817))>>>0,s,t);else{var r=Math.floor(Math.log(u)/Math.LN2),a=Math.round(u*Math.pow(2,-r)*8388608)&8388607;p((e<<31|r+127<<23|a)>>>0,s,t)}}n.writeFloatLE=o.bind(null,Xu),n.writeFloatBE=o.bind(null,Zu);function l(p,u,s){var t=p(u,s),e=(t>>31)*2+1,r=t>>>23&255,a=t&8388607;return r===255?a?NaN:e*(1/0):r===0?e*0.000000000000000000000000000000000000000000001401298464324817*a:e*Math.pow(2,r-150)*(a+8388608)}n.readFloatLE=l.bind(null,Qu),n.readFloatBE=l.bind(null,ea)})();if(typeof Float64Array<"u")(function(){var o=new Float64Array([-0]),l=new Uint8Array(o.buffer),p=l[7]===128;function u(r,a,f){o[0]=r,a[f]=l[0],a[f+1]=l[1],a[f+2]=l[2],a[f+3]=l[3],a[f+4]=l[4],a[f+5]=l[5],a[f+6]=l[6],a[f+7]=l[7]}function s(r,a,f){o[0]=r,a[f]=l[7],a[f+1]=l[6],a[f+2]=l[5],a[f+3]=l[4],a[f+4]=l[3],a[f+5]=l[2],a[f+6]=l[1],a[f+7]=l[0]}n.writeDoubleLE=p?u:s,n.writeDoubleBE=p?s:u;function t(r,a){return l[0]=r[a],l[1]=r[a+1],l[2]=r[a+2],l[3]=r[a+3],l[4]=r[a+4],l[5]=r[a+5],l[6]=r[a+6],l[7]=r[a+7],o[0]}function e(r,a){return l[7]=r[a],l[6]=r[a+1],l[5]=r[a+2],l[4]=r[a+3],l[3]=r[a+4],l[2]=r[a+5],l[1]=r[a+6],l[0]=r[a+7],o[0]}n.readDoubleLE=p?t:e,n.readDoubleBE=p?e:t})();else(function(){function o(p,u,s,t,e,r){var a=t<0?1:0;if(a)t=-t;if(t===0)p(0,e,r+u),p(1/t>0?0:2147483648,e,r+s);else if(isNaN(t))p(0,e,r+u),p(2146959360,e,r+s);else if(t>179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)p(0,e,r+u),p((a<<31|2146435072)>>>0,e,r+s);else{var f;if(t<0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014)f=t/0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005,p(f>>>0,e,r+u),p((a<<31|f/4294967296)>>>0,e,r+s);else{var y=Math.floor(Math.log(t)/Math.LN2);if(y===1024)y=1023;f=t*Math.pow(2,-y),p(f*4503599627370496>>>0,e,r+u),p((a<<31|y+1023<<20|f*1048576&1048575)>>>0,e,r+s)}}}n.writeDoubleLE=o.bind(null,Xu,0,4),n.writeDoubleBE=o.bind(null,Zu,4,0);function l(p,u,s,t,e){var r=p(t,e+u),a=p(t,e+s),f=(a>>31)*2+1,y=a>>>20&2047,g=4294967296*(a&1048575)+r;return y===2047?g?NaN:f*(1/0):y===0?f*0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005*g:f*Math.pow(2,y-1075)*(g+4503599627370496)}n.readDoubleLE=l.bind(null,Qu,0,4),n.readDoubleBE=l.bind(null,ea,4,0)})();return n}function Xu(n,o,l){o[l]=n&255,o[l+1]=n>>>8&255,o[l+2]=n>>>16&255,o[l+3]=n>>>24}function Zu(n,o,l){o[l]=n>>>24,o[l+1]=n>>>16&255,o[l+2]=n>>>8&255,o[l+3]=n&255}function Qu(n,o){return(n[o]|n[o+1]<<8|n[o+2]<<16|n[o+3]<<24)>>>0}function ea(n,o){return(n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3])>>>0}});var oa=i(function(na){var Lr=na,Ur=65533;Lr.length=function(o){var l=0,p=0;for(var u=0;u<o.length;++u)if(p=o.charCodeAt(u),p<128)l+=1;else if(p<2048)l+=2;else if((p&64512)===55296&&(o.charCodeAt(u+1)&64512)===56320)++u,l+=4;else l+=3;return l};Lr.read=function(o,l,p){if(p-l<1)return"";var u=null,s=[],t=0,e,r,a,f;while(l<p){if(e=o[l++],e<=127)s[t++]=e;else if(e>=192&&e<224)a=(e&31)<<6|o[l++]&63,s[t++]=a>=128?a:Ur;else if(e>=224&&e<240)f=(e&15)<<12|(o[l++]&63)<<6|o[l++]&63,s[t++]=f>=2048?f:Ur;else if(e>=240)if(r=(e&7)<<18|(o[l++]&63)<<12|(o[l++]&63)<<6|o[l++]&63,r<65536||r>1114111)s[t++]=Ur;else r-=65536,s[t++]=55296+(r>>10),s[t++]=56320+(r&1023);if(t>8191)(u||(u=[])).push(String.fromCharCode.apply(String,s.slice(0,t))),t=0}if(u){if(t)u.push(String.fromCharCode.apply(String,s.slice(0,t)));return u.join("")}return String.fromCharCode.apply(String,s.slice(0,t))};Lr.write=function(o,l,p){var u=p,s,t;for(var e=0;e<o.length;++e)if(s=o.charCodeAt(e),s<128)l[p++]=s;else if(s<2048)l[p++]=s>>6|192,l[p++]=s&63|128;else if((s&64512)===55296&&((t=o.charCodeAt(e+1))&64512)===56320)s=65536+((s&1023)<<10)+(t&1023),++e,l[p++]=s>>18|240,l[p++]=s>>12&63|128,l[p++]=s>>6&63|128,l[p++]=s&63|128;else l[p++]=s>>12|224,l[p++]=s>>6&63|128,l[p++]=s&63|128;return p-u}});var ua=i(function(UE,ia){ia.exports=v_;function v_(n,o,l){var p=l||8192,u=p>>>1,s=null,t=p;return function(r){if(r<1||r>u)return n(r);if(t+r>p)s=n(p),t=0;var a=o.call(s,t,t+=r);if(t&7)t=(t|7)+1;return a}}});var ca=i(function(LE,aa){aa.exports=k;var tt=he();function k(n,o){this.lo=n>>>0,this.hi=o>>>0}var xe=k.zero=new k(0,0);xe.toNumber=function(){return 0};xe.zzEncode=xe.zzDecode=function(){return this};xe.length=function(){return 1};var b_=k.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";k.fromNumber=function(o){if(o===0)return xe;var l=o<0;if(l)o=-o;var p=o>>>0,u=(o-p)/4294967296>>>0;if(l){if(u=~u>>>0,p=~p>>>0,++p>4294967295){if(p=0,++u>4294967295)u=0}}return new k(p,u)};k.from=function(o){if(typeof o==="number")return k.fromNumber(o);if(tt.isString(o))if(tt.Long)o=tt.Long.fromString(o);else return k.fromNumber(parseInt(o,10));return o.low||o.high?new k(o.low>>>0,o.high>>>0):xe};k.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var l=~this.lo+1>>>0,p=~this.hi>>>0;if(!l)p=p+1>>>0;return-(l+p*4294967296)}return this.lo+this.hi*4294967296};k.prototype.toLong=function(o){return tt.Long?new tt.Long(this.lo|0,this.hi|0,Boolean(o)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(o)}};var de=String.prototype.charCodeAt;k.fromHash=function(o){if(o===b_)return xe;return new k((de.call(o,0)|de.call(o,1)<<8|de.call(o,2)<<16|de.call(o,3)<<24)>>>0,(de.call(o,4)|de.call(o,5)<<8|de.call(o,6)<<16|de.call(o,7)<<24)>>>0)};k.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)};k.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this};k.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this};k.prototype.length=function(){var o=this.lo,l=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p===0?l===0?o<16384?o<128?1:2:o<2097152?3:4:l<16384?l<128?5:6:l<2097152?7:8:p<128?9:10}});var sa=i(function(rt,Cr){(function(n,o){function l(p){return p.default||p}if(typeof define==="function"&&define.amd)define([],function(){var p={};return o(p),l(p)});else if(typeof rt==="object"){if(o(rt),typeof Cr==="object")Cr.exports=l(rt)}else(function(){var p={};o(p),n.Long=l(p)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:rt,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=null;try{o=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 l(b,m,T){this.low=b|0,this.high=m|0,this.unsigned=!!T}l.prototype.__isLong__,Object.defineProperty(l.prototype,"__isLong__",{value:!0});function p(b){return(b&&b.__isLong__)===!0}function u(b){var m=Math.clz32(b&-b);return b?31-m:m}l.isLong=p;var s={},t={};function e(b,m){var T,P,R;if(m){if(b>>>=0,R=0<=b&&b<256){if(P=t[b],P)return P}if(T=a(b,0,!0),R)t[b]=T;return T}else{if(b|=0,R=-128<=b&&b<128){if(P=s[b],P)return P}if(T=a(b,b<0?-1:0,!1),R)s[b]=T;return T}}l.fromInt=e;function r(b,m){if(isNaN(b))return m?ue:Q;if(m){if(b<0)return ue;if(b>=Kn)return Yn}else{if(b<=-zn)return B;if(b+1>=zn)return Wn}if(b<0)return r(-b,m).neg();return a(b%le|0,b/le|0,m)}l.fromNumber=r;function a(b,m,T){return new l(b,m,T)}l.fromBits=a;var f=Math.pow;function y(b,m,T){if(b.length===0)throw Error("empty string");if(typeof m==="number")T=m,m=!1;else m=!!m;if(b==="NaN"||b==="Infinity"||b==="+Infinity"||b==="-Infinity")return m?ue:Q;if(T=T||10,T<2||36<T)throw RangeError("radix");var P;if((P=b.indexOf("-"))>0)throw Error("interior hyphen");else if(P===0)return y(b.substring(1),m,T).neg();var R=r(f(T,8)),I=Q;for(var C=0;C<b.length;C+=8){var q=Math.min(8,b.length-C),K=parseInt(b.substring(C,C+q),T);if(q<8){var V=r(f(T,q));I=I.mul(V).add(r(K))}else I=I.mul(R),I=I.add(r(K))}return I.unsigned=m,I}l.fromString=y;function g(b,m){if(typeof b==="number")return r(b,m);if(typeof b==="string")return y(b,m);return a(b.low,b.high,typeof m==="boolean"?m:b.unsigned)}l.fromValue=g;var M=65536,F=16777216,le=M*M,Kn=le*le,zn=Kn/2,Jn=e(F),Q=e(0);l.ZERO=Q;var ue=e(0,!0);l.UZERO=ue;var De=e(1);l.ONE=De;var $n=e(1,!0);l.UONE=$n;var hr=e(-1);l.NEG_ONE=hr;var Wn=a(-1,2147483647,!1);l.MAX_VALUE=Wn;var Yn=a(-1,-1,!0);l.MAX_UNSIGNED_VALUE=Yn;var B=a(0,-2147483648,!1);l.MIN_VALUE=B;var S=l.prototype;if(S.toInt=function(){return this.unsigned?this.low>>>0:this.low},S.toNumber=function(){if(this.unsigned)return(this.high>>>0)*le+(this.low>>>0);return this.high*le+(this.low>>>0)},S.toString=function(m){if(m=m||10,m<2||36<m)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(B)){var T=r(m),P=this.div(T),R=P.mul(T).sub(this);return P.toString(m)+R.toInt().toString(m)}else return"-"+this.neg().toString(m);var I=r(f(m,6),this.unsigned),C=this,q="";while(!0){var K=C.div(I),V=C.sub(K.mul(I)).toInt()>>>0,L=V.toString(m);if(C=K,C.isZero())return L+q;else{while(L.length<6)L="0"+L;q=""+L+q}}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(B)?64:this.neg().getNumBitsAbs();var m=this.high!=0?this.high:this.low;for(var T=31;T>0;T--)if((m&1<<T)!=0)break;return this.high!=0?T+33:T+1},S.isSafeInteger=function(){var m=this.high>>21;if(!m)return!0;if(this.unsigned)return!1;return m===-1&&!(this.low===0&&this.high===-2097152)},S.isZero=function(){return this.high===0&&this.low===0},S.eqz=S.isZero,S.isNegative=function(){return!this.unsigned&&this.high<0},S.isPositive=function(){return this.unsigned||this.high>=0},S.isOdd=function(){return(this.low&1)===1},S.isEven=function(){return(this.low&1)===0},S.equals=function(m){if(!p(m))m=g(m);if(this.unsigned!==m.unsigned&&this.high>>>31===1&&m.high>>>31===1)return!1;return this.high===m.high&&this.low===m.low},S.eq=S.equals,S.notEquals=function(m){return!this.eq(m)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(m){return this.comp(m)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(m){return this.comp(m)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(m){return this.comp(m)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(m){return this.comp(m)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(m){if(!p(m))m=g(m);if(this.eq(m))return 0;var T=this.isNegative(),P=m.isNegative();if(T&&!P)return-1;if(!T&&P)return 1;if(!this.unsigned)return this.sub(m).isNegative()?-1:1;return m.high>>>0>this.high>>>0||m.high===this.high&&m.low>>>0>this.low>>>0?-1:1},S.comp=S.compare,S.negate=function(){if(!this.unsigned&&this.eq(B))return B;return this.not().add(De)},S.neg=S.negate,S.add=function(m){if(!p(m))m=g(m);var T=this.high>>>16,P=this.high&65535,R=this.low>>>16,I=this.low&65535,C=m.high>>>16,q=m.high&65535,K=m.low>>>16,V=m.low&65535,L=0,z=0,D=0,H=0;return H+=I+V,D+=H>>>16,H&=65535,D+=R+K,z+=D>>>16,D&=65535,z+=P+q,L+=z>>>16,z&=65535,L+=T+C,L&=65535,a(D<<16|H,L<<16|z,this.unsigned)},S.subtract=function(m){if(!p(m))m=g(m);return this.add(m.neg())},S.sub=S.subtract,S.multiply=function(m){if(this.isZero())return this;if(!p(m))m=g(m);if(o){var T=o.mul(this.low,this.high,m.low,m.high);return a(T,o.get_high(),this.unsigned)}if(m.isZero())return this.unsigned?ue:Q;if(this.eq(B))return m.isOdd()?B:Q;if(m.eq(B))return this.isOdd()?B:Q;if(this.isNegative())if(m.isNegative())return this.neg().mul(m.neg());else return this.neg().mul(m).neg();else if(m.isNegative())return this.mul(m.neg()).neg();if(this.lt(Jn)&&m.lt(Jn))return r(this.toNumber()*m.toNumber(),this.unsigned);var P=this.high>>>16,R=this.high&65535,I=this.low>>>16,C=this.low&65535,q=m.high>>>16,K=m.high&65535,V=m.low>>>16,L=m.low&65535,z=0,D=0,H=0,xt=0;return xt+=C*L,H+=xt>>>16,xt&=65535,H+=I*L,D+=H>>>16,H&=65535,H+=C*V,D+=H>>>16,H&=65535,D+=R*L,z+=D>>>16,D&=65535,D+=I*V,z+=D>>>16,D&=65535,D+=C*K,z+=D>>>16,D&=65535,z+=P*L+R*V+I*K+C*q,z&=65535,a(H<<16|xt,z<<16|D,this.unsigned)},S.mul=S.multiply,S.divide=function(m){if(!p(m))m=g(m);if(m.isZero())throw Error("division by zero");if(o){if(!this.unsigned&&this.high===-2147483648&&m.low===-1&&m.high===-1)return this;var T=(this.unsigned?o.div_u:o.div_s)(this.low,this.high,m.low,m.high);return a(T,o.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?ue:Q;var P,R,I;if(!this.unsigned){if(this.eq(B))if(m.eq(De)||m.eq(hr))return B;else if(m.eq(B))return De;else{var C=this.shr(1);if(P=C.div(m).shl(1),P.eq(Q))return m.isNegative()?De:hr;else return R=this.sub(m.mul(P)),I=P.add(R.div(m)),I}else if(m.eq(B))return this.unsigned?ue:Q;if(this.isNegative()){if(m.isNegative())return this.neg().div(m.neg());return this.neg().div(m).neg()}else if(m.isNegative())return this.div(m.neg()).neg();I=Q}else{if(!m.unsigned)m=m.toUnsigned();if(m.gt(this))return ue;if(m.gt(this.shru(1)))return $n;I=ue}R=this;while(R.gte(m)){P=Math.max(1,Math.floor(R.toNumber()/m.toNumber()));var q=Math.ceil(Math.log(P)/Math.LN2),K=q<=48?1:f(2,q-48),V=r(P),L=V.mul(m);while(L.isNegative()||L.gt(R))P-=K,V=r(P,this.unsigned),L=V.mul(m);if(V.isZero())V=De;I=I.add(V),R=R.sub(L)}return I},S.div=S.divide,S.modulo=function(m){if(!p(m))m=g(m);if(o){var T=(this.unsigned?o.rem_u:o.rem_s)(this.low,this.high,m.low,m.high);return a(T,o.get_high(),this.unsigned)}return this.sub(this.div(m).mul(m))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return a(~this.low,~this.high,this.unsigned)},S.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},S.clz=S.countLeadingZeros,S.countTrailingZeros=function(){return this.low?u(this.low):u(this.high)+32},S.ctz=S.countTrailingZeros,S.and=function(m){if(!p(m))m=g(m);return a(this.low&m.low,this.high&m.high,this.unsigned)},S.or=function(m){if(!p(m))m=g(m);return a(this.low|m.low,this.high|m.high,this.unsigned)},S.xor=function(m){if(!p(m))m=g(m);return a(this.low^m.low,this.high^m.high,this.unsigned)},S.shiftLeft=function(m){if(p(m))m=m.toInt();if((m&=63)===0)return this;else if(m<32)return a(this.low<<m,this.high<<m|this.low>>>32-m,this.unsigned);else return a(0,this.low<<m-32,this.unsigned)},S.shl=S.shiftLeft,S.shiftRight=function(m){if(p(m))m=m.toInt();if((m&=63)===0)return this;else if(m<32)return a(this.low>>>m|this.high<<32-m,this.high>>m,this.unsigned);else return a(this.high>>m-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(m){if(p(m))m=m.toInt();if((m&=63)===0)return this;if(m<32)return a(this.low>>>m|this.high<<32-m,this.high>>>m,this.unsigned);if(m===32)return a(this.high,0,this.unsigned);return a(this.high>>>m-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.rotateLeft=function(m){var T;if(p(m))m=m.toInt();if((m&=63)===0)return this;if(m===32)return a(this.high,this.low,this.unsigned);if(m<32)return T=32-m,a(this.low<<m|this.high>>>T,this.high<<m|this.low>>>T,this.unsigned);return m-=32,T=32-m,a(this.high<<m|this.low>>>T,this.low<<m|this.high>>>T,this.unsigned)},S.rotl=S.rotateLeft,S.rotateRight=function(m){var T;if(p(m))m=m.toInt();if((m&=63)===0)return this;if(m===32)return a(this.high,this.low,this.unsigned);if(m<32)return T=32-m,a(this.high<<T|this.low>>>m,this.low<<T|this.high>>>m,this.unsigned);return m-=32,T=32-m,a(this.low<<T|this.high>>>m,this.high<<T|this.low>>>m,this.unsigned)},S.rotr=S.rotateRight,S.toSigned=function(){if(!this.unsigned)return this;return a(this.low,this.high,!1)},S.toUnsigned=function(){if(this.unsigned)return this;return a(this.low,this.high,!0)},S.toBytes=function(m){return m?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var m=this.high,T=this.low;return[T&255,T>>>8&255,T>>>16&255,T>>>24,m&255,m>>>8&255,m>>>16&255,m>>>24]},S.toBytesBE=function(){var m=this.high,T=this.low;return[m>>>24,m>>>16&255,m>>>8&255,m&255,T>>>24,T>>>16&255,T>>>8&255,T&255]},l.fromBytes=function(m,T,P){return P?l.fromBytesLE(m,T):l.fromBytesBE(m,T)},l.fromBytesLE=function(m,T){return new l(m[0]|m[1]<<8|m[2]<<16|m[3]<<24,m[4]|m[5]<<8|m[6]<<16|m[7]<<24,T)},l.fromBytesBE=function(m,T){return new l(m[4]<<24|m[5]<<16|m[6]<<8|m[7],m[0]<<24|m[1]<<16|m[2]<<8|m[3],T)},typeof BigInt==="function")l.fromBigInt=function(m,T){var P=Number(BigInt.asIntN(32,m)),R=Number(BigInt.asIntN(32,m>>BigInt(32)));return a(P,R,T)},l.fromValue=function(m,T){if(typeof m==="bigint")return l.fromBigInt(m,T);return g(m,T)},S.toBigInt=function(){var m=BigInt(this.low>>>0),T=BigInt(this.unsigned?this.high>>>0:this.high);return T<<BigInt(32)|m};var Px=n.default=l})});var he=i(function(Dr){var x=Dr;x.asPromise=Hu();x.base64=Ju();x.EventEmitter=Wu();x.float=ra();x.utf8=oa();x.pool=ua();x.LongBits=ca();function la(n){return n==="__proto__"||n==="prototype"||n==="constructor"}x.isUnsafeProperty=la;x.isNode=Boolean(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);x.global=x.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Dr;x.emptyArray=Object.freeze?Object.freeze([]):[];x.emptyObject=Object.freeze?Object.freeze({}):{};x.isInteger=Number.isInteger||function(o){return typeof o==="number"&&isFinite(o)&&Math.floor(o)===o};x.isString=function(o){return typeof o==="string"||o instanceof String};x.isObject=function(o){return o&&typeof o==="object"};x.isset=x.isSet=function(o,l){var p=o[l];if(p!=null&&Object.hasOwnProperty.call(o,l))return typeof p!=="object"||(Array.isArray(p)?p.length:Object.keys(p).length)>0;return!1};x.Buffer=function(){try{var n=x.global.Buffer;return n.prototype.utf8Write?n:null}catch(o){return null}}();x._Buffer_from=null;x._Buffer_allocUnsafe=null;x.newBuffer=function(o){return typeof o==="number"?x.Buffer?x._Buffer_allocUnsafe(o):new x.Array(o):x.Buffer?x._Buffer_from(o):typeof Uint8Array>"u"?o:new Uint8Array(o)};x.Array=typeof Uint8Array<"u"?Uint8Array:Array;x.Long=x.global.dcodeIO&&x.global.dcodeIO.Long||x.global.Long||function(){try{var n=sa();return n&&n.isLong?n:null}catch(o){return null}}();x.key2Re=/^true|false|0|1$/;x.key32Re=/^-?(?:0|[1-9][0-9]*)$/;x.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;x.longToHash=function(o){return o?x.LongBits.from(o).toHash():x.LongBits.zeroHash};x.longFromHash=function(o,l){var p=x.LongBits.fromHash(o);if(x.Long)return x.Long.fromBits(p.lo,p.hi,l);return p.toNumber(Boolean(l))};function pa(n){var o=typeof arguments[arguments.length-1]==="boolean",l=o?arguments.length-1:arguments.length;o=o&&arguments[arguments.length-1];for(var p=1;p<l;++p){var u=arguments[p];if(!u)continue;for(var s=Object.keys(u),t=0;t<s.length;++t)if(!la(s[t])&&(n[s[t]]===void 0||!o))n[s[t]]=u[s[t]]}return n}x.merge=pa;x.nestingLimit=32;x.recursionLimit=100;x.makeProp=function(o,l){Object.defineProperty(o,l,{enumerable:!0,configurable:!0,writable:!0})};x.lcFirst=function(o){return o.charAt(0).toLowerCase()+o.substring(1)};function fa(n){function o(l,p){if(!(this instanceof o))return new o(l,p);if(Object.defineProperty(this,"message",{get:function(){return l}}),Error.captureStackTrace)Error.captureStackTrace(this,o);else Object.defineProperty(this,"stack",{value:Error().stack||""});if(p)pa(this,p)}return o.prototype=Object.create(Error.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return n},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),o}x.newError=fa;x.ProtocolError=fa("ProtocolError");x.oneOfGetter=function(o){var l={};for(var p=0;p<o.length;++p)l[o[p]]=1;return function(){for(var u=Object.keys(this),s=u.length-1;s>-1;--s)if(l[u[s]]===1&&this[u[s]]!==void 0&&this[u[s]]!==null)return u[s]}};x.oneOfSetter=function(o){return function(l){for(var p=0;p<o.length;++p)if(o[p]!==l)delete this[o[p]]}};x.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};x._configure=function(){var n=x.Buffer;if(!n){x._Buffer_from=x._Buffer_allocUnsafe=null;return}x._Buffer_from=n.from!==Uint8Array.from&&n.from||function(l,p){return new n(l,p)},x._Buffer_allocUnsafe=n.allocUnsafe||function(l){return new n(l)}}});var Hr=i(function(DE,ma){ma.exports=w;var Y=he(),kr,{LongBits:jt,base64:da,utf8:ha}=Y;function nt(n,o,l){this.fn=n,this.len=o,this.next=void 0,this.val=l}function Br(){}function O_(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function w(){this.len=0,this.head=new nt(Br,0,0),this.tail=this.head,this.states=null}var ya=function(){return Y.Buffer?function(){return(w.create=function(){return new kr})()}:function(){return new w}};w.create=ya();w.alloc=function(o){return new Y.Array(o)};if(Y.Array!==Array)w.alloc=Y.pool(w.alloc,Y.Array.prototype.subarray);w.prototype._push=function(o,l,p){return this.tail=this.tail.next=new nt(o,l,p),this.len+=l,this};function qr(n,o,l){o[l]=n&255}function S_(n,o,l){while(n>127)o[l++]=n&127|128,n>>>=7;o[l]=n}function jr(n,o){this.len=n,this.next=void 0,this.val=o}jr.prototype=Object.create(nt.prototype);jr.prototype.fn=S_;w.prototype.uint32=function(o){return this.len+=(this.tail=this.tail.next=new jr((o=o>>>0)<128?1:o<16384?2:o<2097152?3:o<268435456?4:5,o)).len,this};w.prototype.int32=function(o){return(o|=0)<0?this._push(Gr,10,jt.fromNumber(o)):this.uint32(o)};w.prototype.sint32=function(o){return this.uint32((o<<1^o>>31)>>>0)};function Gr(n,o,l){var{lo:p,hi:u}=n;while(u)o[l++]=p&127|128,p=(p>>>7|u<<25)>>>0,u>>>=7;while(p>127)o[l++]=p&127|128,p=p>>>7;o[l++]=p}w.prototype.uint64=function(o){var l=jt.from(o);return this._push(Gr,l.length(),l)};w.prototype.int64=w.prototype.uint64;w.prototype.sint64=function(o){var l=jt.from(o).zzEncode();return this._push(Gr,l.length(),l)};w.prototype.bool=function(o){return this._push(qr,1,o?1:0)};function Vr(n,o,l){o[l]=n&255,o[l+1]=n>>>8&255,o[l+2]=n>>>16&255,o[l+3]=n>>>24}w.prototype.fixed32=function(o){return this._push(Vr,4,o>>>0)};w.prototype.sfixed32=w.prototype.fixed32;w.prototype.fixed64=function(o){var l=jt.from(o);return this._push(Vr,4,l.lo)._push(Vr,4,l.hi)};w.prototype.sfixed64=w.prototype.fixed64;w.prototype.float=function(o){return this._push(Y.float.writeFloatLE,4,o)};w.prototype.double=function(o){return this._push(Y.float.writeDoubleLE,8,o)};var T_=Y.Array.prototype.set?function(o,l,p){l.set(o,p)}:function(o,l,p){for(var u=0;u<o.length;++u)l[p+u]=o[u]};w.prototype.bytes=function(o){var l=o.length>>>0;if(!l)return this._push(qr,1,0);if(Y.isString(o)){var p=w.alloc(l=da.length(o));da.decode(o,p,0),o=p}return this.uint32(l)._push(T_,l,o)};w.prototype.string=function(o){var l=ha.length(o);return l?this.uint32(l)._push(ha.write,l,o):this._push(qr,1,0)};w.prototype.fork=function(){return this.states=new O_(this),this.head=this.tail=new nt(Br,0,0),this.len=0,this};w.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 nt(Br,0,0),this.len=0;return this};w.prototype.ldelim=function(){var o=this.head,l=this.tail,p=this.len;if(this.reset().uint32(p),p)this.tail.next=o.next,this.tail=l,this.len+=p;return this};w.prototype.finish=function(){var o=this.head.next,l=this.constructor.alloc(this.len),p=0;while(o)o.fn(o.val,l,p),p+=o.len,o=o.next;return l};w._configure=function(n){kr=n,w.create=ya(),kr._configure()}});var va=i(function(kE,ga){ga.exports=re;var _a=Hr();(re.prototype=Object.create(_a.prototype)).constructor=re;var ye=he();function re(){_a.call(this)}re._configure=function(){re.alloc=ye._Buffer_allocUnsafe,re.writeBytesBuffer=ye.Buffer&&ye.Buffer.prototype instanceof Uint8Array&&ye.Buffer.prototype.set.name==="set"?function(o,l,p){l.set(o,p)}:function(o,l,p){if(o.copy)o.copy(l,p,0,o.length);else for(var u=0;u<o.length;)l[p++]=o[u++]}};re.prototype.bytes=function(o){if(ye.isString(o))o=ye._Buffer_from(o,"base64");var l=o.length>>>0;if(this.uint32(l),l)this._push(re.writeBytesBuffer,l,o);return this};function x_(n,o,l){if(n.length<40)ye.utf8.write(n,o,l);else if(o.utf8Write)o.utf8Write(n,l);else o.write(n,l)}re.prototype.string=function(o){var l=ye.Buffer.byteLength(o);if(this.uint32(l),l)this._push(x_,l,o);return this};re._configure()});var zr=i(function(VE,xa){xa.exports=U;var X=he(),Kr,{LongBits:Sa,utf8:E_}=X;function ee(n,o){return RangeError("index out of range: "+n.pos+" + "+(o||1)+" > "+n.len)}function U(n){this.buf=n,this.pos=0,this.len=n.length}var ba=typeof Uint8Array<"u"?function(o){if(o instanceof Uint8Array||Array.isArray(o))return new U(o);throw Error("illegal buffer")}:function(o){if(Array.isArray(o))return new U(o);throw Error("illegal buffer")},Ta=function(){return X.Buffer?function(l){return(U.create=function(u){return X.Buffer.isBuffer(u)?new Kr(u):ba(u)})(l)}:ba};U.create=Ta();U.prototype._slice=X.Array.prototype.subarray||X.Array.prototype.slice;U.prototype.uint32=function(){var o=4294967295;return function(){if(o=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128)return o;if((this.pos+=5)>this.len)throw this.pos=this.len,ee(this,10);return o}}();U.prototype.int32=function(){return this.uint32()|0};U.prototype.sint32=function(){var o=this.uint32();return o>>>1^-(o&1)|0};function Fr(){var n=new Sa(0,0),o=0;if(this.len-this.pos>4){for(;o<4;++o)if(n.lo=(n.lo|(this.buf[this.pos]&127)<<o*7)>>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;o=0}else{for(;o<3;++o){if(this.pos>=this.len)throw ee(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<<o*7)>>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<<o*7)>>>0,n}if(this.len-this.pos>4){for(;o<5;++o)if(n.hi=(n.hi|(this.buf[this.pos]&127)<<o*7+3)>>>0,this.buf[this.pos++]<128)return n}else for(;o<5;++o){if(this.pos>=this.len)throw ee(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<<o*7+3)>>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}U.prototype.bool=function(){return this.uint32()!==0};function Gt(n,o){return(n[o-4]|n[o-3]<<8|n[o-2]<<16|n[o-1]<<24)>>>0}U.prototype.fixed32=function(){if(this.pos+4>this.len)throw ee(this,4);return Gt(this.buf,this.pos+=4)};U.prototype.sfixed32=function(){if(this.pos+4>this.len)throw ee(this,4);return Gt(this.buf,this.pos+=4)|0};function Oa(){if(this.pos+8>this.len)throw ee(this,8);return new Sa(Gt(this.buf,this.pos+=4),Gt(this.buf,this.pos+=4))}U.prototype.float=function(){if(this.pos+4>this.len)throw ee(this,4);var o=X.float.readFloatLE(this.buf,this.pos);return this.pos+=4,o};U.prototype.double=function(){if(this.pos+8>this.len)throw ee(this,4);var o=X.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,o};U.prototype.bytes=function(){var o=this.uint32(),l=this.pos,p=this.pos+o;if(p>this.len)throw ee(this,o);if(this.pos+=o,Array.isArray(this.buf))return this.buf.slice(l,p);if(l===p){var u=X.Buffer;return u?u.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,l,p)};U.prototype.string=function(){var o=this.bytes();return E_.read(o,0,o.length)};U.prototype.skip=function(o){if(typeof o==="number"){if(this.pos+o>this.len)throw ee(this,o);this.pos+=o}else do if(this.pos>=this.len)throw ee(this);while(this.buf[this.pos++]&128);return this};U.recursionLimit=X.recursionLimit;U.prototype.skipType=function(n,o){if(o===void 0)o=0;if(o>U.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:while((n=this.uint32()&7)!==4)this.skipType(n,o+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};U._configure=function(n){Kr=n,U.create=Ta(),Kr._configure();var o=X.Long?"toLong":"toNumber";X.merge(U.prototype,{int64:function(){return Fr.call(this)[o](!1)},uint64:function(){return Fr.call(this)[o](!0)},sint64:function(){return Fr.call(this).zzDecode()[o](!1)},fixed64:function(){return Oa.call(this)[o](!0)},sfixed64:function(){return Oa.call(this)[o](!1)}})}});var Pa=i(function(BE,Na){Na.exports=Ee;var Aa=zr();(Ee.prototype=Object.create(Aa.prototype)).constructor=Ee;var Ea=he();function Ee(n){Aa.call(this,n)}Ee._configure=function(){if(Ea.Buffer)Ee.prototype._slice=Ea.Buffer.prototype.slice};Ee.prototype.string=function(){var o=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+o,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+o,this.len))};Ee._configure()});var Ia=i(function(qE,wa){wa.exports=ot;var Jr=he();(ot.prototype=Object.create(Jr.EventEmitter.prototype)).constructor=ot;function ot(n,o,l){if(typeof n!=="function")throw TypeError("rpcImpl must be a function");Jr.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=Boolean(o),this.responseDelimited=Boolean(l)}ot.prototype.rpcCall=function n(o,l,p,u,s){if(!u)throw TypeError("request must be specified");var t=this;if(!s)return Jr.asPromise(n,t,o,l,p,u);if(!t.rpcImpl){setTimeout(function(){s(Error("already ended"))},0);return}try{return t.rpcImpl(o,l[t.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(r,a){if(r)return t.emit("error",r,o),s(r);if(a===null){t.end(!0);return}if(!(a instanceof p))try{a=p[t.responseDelimited?"decodeDelimited":"decode"](a)}catch(f){return t.emit("error",f,o),s(f)}return t.emit("data",a,o),s(null,a)})}catch(e){t.emit("error",e,o),setTimeout(function(){s(e)},0);return}};ot.prototype.end=function(o){if(this.rpcImpl){if(!o)this.rpcImpl(null,null,null);this.rpcImpl=null,this.emit("end").off()}return this}});var Ma=i(function(Ra){var A_=Ra;A_.Service=Ia()});var La=i(function(GE,Ua){Ua.exports=Object.create(null)});var ka=i(function(Da){var j=Da;j.build="minimal";j.Writer=Hr();j.BufferWriter=va();j.Reader=zr();j.BufferReader=Pa();j.util=he();j.rpc=Ma();j.roots=La();j.configure=Ca;function Ca(){j.util._configure(),j.Writer._configure(j.BufferWriter),j.Reader._configure(j.BufferReader)}Ca()});var Ht=i(function(Va,Ba){Object.defineProperty(Va,"__esModule",{value:!0});var E=ka(),{Reader:_,Writer:N,util:h}=E,d=E.roots.default||(E.roots.default={});d.opentelemetry=function(){var n={};return n.proto=function(){var o={};return o.common=function(){var l={};return l.v1=function(){var p={};return p.AnyValue=function(){function u(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.stringValue=null,u.prototype.boolValue=null,u.prototype.intValue=null,u.prototype.doubleValue=null,u.prototype.arrayValue=null,u.prototype.kvlistValue=null,u.prototype.bytesValue=null;var s;return Object.defineProperty(u.prototype,"value",{get:h.oneOfGetter(s=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.stringValue!=null&&Object.hasOwnProperty.call(e,"stringValue"))r.uint32(10).string(e.stringValue);if(e.boolValue!=null&&Object.hasOwnProperty.call(e,"boolValue"))r.uint32(16).bool(e.boolValue);if(e.intValue!=null&&Object.hasOwnProperty.call(e,"intValue"))r.uint32(24).int64(e.intValue);if(e.doubleValue!=null&&Object.hasOwnProperty.call(e,"doubleValue"))r.uint32(33).double(e.doubleValue);if(e.arrayValue!=null&&Object.hasOwnProperty.call(e,"arrayValue"))d.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,r.uint32(42).fork()).ldelim();if(e.kvlistValue!=null&&Object.hasOwnProperty.call(e,"kvlistValue"))d.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,r.uint32(50).fork()).ldelim();if(e.bytesValue!=null&&Object.hasOwnProperty.call(e,"bytesValue"))r.uint32(58).bytes(e.bytesValue);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.common.v1.AnyValue;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.stringValue=e.string();break}case 2:{y.boolValue=e.bool();break}case 3:{y.intValue=e.int64();break}case 4:{y.doubleValue=e.double();break}case 5:{y.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break}case 6:{y.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break}case 7:{y.bytesValue=e.bytes();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")){if(r.value=1,!h.isString(e.stringValue))return"stringValue: string expected"}if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof e.boolValue!=="boolean")return"boolValue: boolean expected"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!h.isInteger(e.intValue)&&!(e.intValue&&h.isInteger(e.intValue.low)&&h.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(r.value===1)return"value: multiple values";if(r.value=1,typeof e.doubleValue!=="number")return"doubleValue: number expected"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=d.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue);if(a)return"arrayValue."+a}}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(r.value===1)return"value: multiple values";r.value=1;{var a=d.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue);if(a)return"kvlistValue."+a}}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(r.value===1)return"value: multiple values";if(r.value=1,!(e.bytesValue&&typeof e.bytesValue.length==="number"||h.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.common.v1.AnyValue)return e;var r=new d.opentelemetry.proto.common.v1.AnyValue;if(e.stringValue!=null)r.stringValue=String(e.stringValue);if(e.boolValue!=null)r.boolValue=Boolean(e.boolValue);if(e.intValue!=null){if(h.Long)(r.intValue=h.Long.fromValue(e.intValue)).unsigned=!1;else if(typeof e.intValue==="string")r.intValue=parseInt(e.intValue,10);else if(typeof e.intValue==="number")r.intValue=e.intValue;else if(typeof e.intValue==="object")r.intValue=new h.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber()}if(e.doubleValue!=null)r.doubleValue=Number(e.doubleValue);if(e.arrayValue!=null){if(typeof e.arrayValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");r.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(e.kvlistValue!=null){if(typeof e.kvlistValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");r.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}if(e.bytesValue!=null){if(typeof e.bytesValue==="string")h.base64.decode(e.bytesValue,r.bytesValue=h.newBuffer(h.base64.length(e.bytesValue)),0);else if(e.bytesValue.length>=0)r.bytesValue=e.bytesValue}return r},u.toObject=function(e,r){if(!r)r={};var a={};if(e.stringValue!=null&&e.hasOwnProperty("stringValue")){if(a.stringValue=e.stringValue,r.oneofs)a.value="stringValue"}if(e.boolValue!=null&&e.hasOwnProperty("boolValue")){if(a.boolValue=e.boolValue,r.oneofs)a.value="boolValue"}if(e.intValue!=null&&e.hasOwnProperty("intValue")){if(typeof e.intValue==="number")a.intValue=r.longs===String?String(e.intValue):e.intValue;else a.intValue=r.longs===String?h.Long.prototype.toString.call(e.intValue):r.longs===Number?new h.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue;if(r.oneofs)a.value="intValue"}if(e.doubleValue!=null&&e.hasOwnProperty("doubleValue")){if(a.doubleValue=r.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,r.oneofs)a.value="doubleValue"}if(e.arrayValue!=null&&e.hasOwnProperty("arrayValue")){if(a.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,r),r.oneofs)a.value="arrayValue"}if(e.kvlistValue!=null&&e.hasOwnProperty("kvlistValue")){if(a.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,r),r.oneofs)a.value="kvlistValue"}if(e.bytesValue!=null&&e.hasOwnProperty("bytesValue")){if(a.bytesValue=r.bytes===String?h.base64.encode(e.bytesValue,0,e.bytesValue.length):r.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,r.oneofs)a.value="bytesValue"}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.common.v1.AnyValue"},u}(),p.ArrayValue=function(){function u(s){if(this.values=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.values=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.values!=null&&t.values.length)for(var r=0;r<t.values.length;++r)d.opentelemetry.proto.common.v1.AnyValue.encode(t.values[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.ArrayValue;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.values&&f.values.length))f.values=[];f.values.push(d.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var r=d.opentelemetry.proto.common.v1.AnyValue.verify(t.values[e]);if(r)return"values."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.ArrayValue)return t;var e=new d.opentelemetry.proto.common.v1.ArrayValue;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");e.values=[];for(var r=0;r<t.values.length;++r){if(typeof t.values[r]!=="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");e.values[r]=d.opentelemetry.proto.common.v1.AnyValue.fromObject(t.values[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.values=[];if(t.values&&t.values.length){r.values=[];for(var a=0;a<t.values.length;++a)r.values[a]=d.opentelemetry.proto.common.v1.AnyValue.toObject(t.values[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.ArrayValue"},u}(),p.KeyValueList=function(){function u(s){if(this.values=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.values=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.values!=null&&t.values.length)for(var r=0;r<t.values.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.values[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.KeyValueList;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.values&&f.values.length))f.values=[];f.values.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.values!=null&&t.hasOwnProperty("values")){if(!Array.isArray(t.values))return"values: array expected";for(var e=0;e<t.values.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.values[e]);if(r)return"values."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.KeyValueList)return t;var e=new d.opentelemetry.proto.common.v1.KeyValueList;if(t.values){if(!Array.isArray(t.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");e.values=[];for(var r=0;r<t.values.length;++r){if(typeof t.values[r]!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");e.values[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.values[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.values=[];if(t.values&&t.values.length){r.values=[];for(var a=0;a<t.values.length;++a)r.values[a]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.values[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.KeyValueList"},u}(),p.KeyValue=function(){function u(s){if(s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.key=null,u.prototype.value=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.key!=null&&Object.hasOwnProperty.call(t,"key"))e.uint32(10).string(t.key);if(t.value!=null&&Object.hasOwnProperty.call(t,"value"))d.opentelemetry.proto.common.v1.AnyValue.encode(t.value,e.uint32(18).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.KeyValue;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.key=t.string();break}case 2:{f.value=d.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.key!=null&&t.hasOwnProperty("key")){if(!h.isString(t.key))return"key: string expected"}if(t.value!=null&&t.hasOwnProperty("value")){var e=d.opentelemetry.proto.common.v1.AnyValue.verify(t.value);if(e)return"value."+e}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.KeyValue)return t;var e=new d.opentelemetry.proto.common.v1.KeyValue;if(t.key!=null)e.key=String(t.key);if(t.value!=null){if(typeof t.value!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");e.value=d.opentelemetry.proto.common.v1.AnyValue.fromObject(t.value)}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.defaults)r.key="",r.value=null;if(t.key!=null&&t.hasOwnProperty("key"))r.key=t.key;if(t.value!=null&&t.hasOwnProperty("value"))r.value=d.opentelemetry.proto.common.v1.AnyValue.toObject(t.value,e);return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.KeyValue"},u}(),p.InstrumentationScope=function(){function u(s){if(this.attributes=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.name=null,u.prototype.version=null,u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.name!=null&&Object.hasOwnProperty.call(t,"name"))e.uint32(10).string(t.name);if(t.version!=null&&Object.hasOwnProperty.call(t,"version"))e.uint32(18).string(t.version);if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(26).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(32).uint32(t.droppedAttributesCount);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.InstrumentationScope;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.name=t.string();break}case 2:{f.version=t.string();break}case 3:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 4:{f.droppedAttributesCount=t.uint32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.name!=null&&t.hasOwnProperty("name")){if(!h.isString(t.name))return"name: string expected"}if(t.version!=null&&t.hasOwnProperty("version")){if(!h.isString(t.version))return"version: string expected"}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.InstrumentationScope)return t;var e=new d.opentelemetry.proto.common.v1.InstrumentationScope;if(t.name!=null)e.name=String(t.name);if(t.version!=null)e.version=String(t.version);if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[];if(e.defaults)r.name="",r.version="",r.droppedAttributesCount=0;if(t.name!=null&&t.hasOwnProperty("name"))r.name=t.name;if(t.version!=null&&t.hasOwnProperty("version"))r.version=t.version;if(t.attributes&&t.attributes.length){r.attributes=[];for(var a=0;a<t.attributes.length;++a)r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[a],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.InstrumentationScope"},u}(),p.EntityRef=function(){function u(s){if(this.idKeys=[],this.descriptionKeys=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.schemaUrl=null,u.prototype.type=null,u.prototype.idKeys=h.emptyArray,u.prototype.descriptionKeys=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(10).string(t.schemaUrl);if(t.type!=null&&Object.hasOwnProperty.call(t,"type"))e.uint32(18).string(t.type);if(t.idKeys!=null&&t.idKeys.length)for(var r=0;r<t.idKeys.length;++r)e.uint32(26).string(t.idKeys[r]);if(t.descriptionKeys!=null&&t.descriptionKeys.length)for(var r=0;r<t.descriptionKeys.length;++r)e.uint32(34).string(t.descriptionKeys[r]);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.common.v1.EntityRef;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.schemaUrl=t.string();break}case 2:{f.type=t.string();break}case 3:{if(!(f.idKeys&&f.idKeys.length))f.idKeys=[];f.idKeys.push(t.string());break}case 4:{if(!(f.descriptionKeys&&f.descriptionKeys.length))f.descriptionKeys=[];f.descriptionKeys.push(t.string());break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}if(t.type!=null&&t.hasOwnProperty("type")){if(!h.isString(t.type))return"type: string expected"}if(t.idKeys!=null&&t.hasOwnProperty("idKeys")){if(!Array.isArray(t.idKeys))return"idKeys: array expected";for(var e=0;e<t.idKeys.length;++e)if(!h.isString(t.idKeys[e]))return"idKeys: string[] expected"}if(t.descriptionKeys!=null&&t.hasOwnProperty("descriptionKeys")){if(!Array.isArray(t.descriptionKeys))return"descriptionKeys: array expected";for(var e=0;e<t.descriptionKeys.length;++e)if(!h.isString(t.descriptionKeys[e]))return"descriptionKeys: string[] expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.common.v1.EntityRef)return t;var e=new d.opentelemetry.proto.common.v1.EntityRef;if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);if(t.type!=null)e.type=String(t.type);if(t.idKeys){if(!Array.isArray(t.idKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.idKeys: array expected");e.idKeys=[];for(var r=0;r<t.idKeys.length;++r)e.idKeys[r]=String(t.idKeys[r])}if(t.descriptionKeys){if(!Array.isArray(t.descriptionKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.descriptionKeys: array expected");e.descriptionKeys=[];for(var r=0;r<t.descriptionKeys.length;++r)e.descriptionKeys[r]=String(t.descriptionKeys[r])}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.idKeys=[],r.descriptionKeys=[];if(e.defaults)r.schemaUrl="",r.type="";if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;if(t.type!=null&&t.hasOwnProperty("type"))r.type=t.type;if(t.idKeys&&t.idKeys.length){r.idKeys=[];for(var a=0;a<t.idKeys.length;++a)r.idKeys[a]=t.idKeys[a]}if(t.descriptionKeys&&t.descriptionKeys.length){r.descriptionKeys=[];for(var a=0;a<t.descriptionKeys.length;++a)r.descriptionKeys[a]=t.descriptionKeys[a]}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.common.v1.EntityRef"},u}(),p}(),l}(),o.resource=function(){var l={};return l.v1=function(){var p={};return p.Resource=function(){function u(s){if(this.attributes=[],this.entityRefs=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.entityRefs=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(10).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(16).uint32(t.droppedAttributesCount);if(t.entityRefs!=null&&t.entityRefs.length)for(var r=0;r<t.entityRefs.length;++r)d.opentelemetry.proto.common.v1.EntityRef.encode(t.entityRefs[r],e.uint32(26).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.resource.v1.Resource;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{f.droppedAttributesCount=t.uint32();break}case 3:{if(!(f.entityRefs&&f.entityRefs.length))f.entityRefs=[];f.entityRefs.push(d.opentelemetry.proto.common.v1.EntityRef.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(t.entityRefs!=null&&t.hasOwnProperty("entityRefs")){if(!Array.isArray(t.entityRefs))return"entityRefs: array expected";for(var e=0;e<t.entityRefs.length;++e){var r=d.opentelemetry.proto.common.v1.EntityRef.verify(t.entityRefs[e]);if(r)return"entityRefs."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.resource.v1.Resource)return t;var e=new d.opentelemetry.proto.resource.v1.Resource;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;if(t.entityRefs){if(!Array.isArray(t.entityRefs))throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: array expected");e.entityRefs=[];for(var r=0;r<t.entityRefs.length;++r){if(typeof t.entityRefs[r]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: object expected");e.entityRefs[r]=d.opentelemetry.proto.common.v1.EntityRef.fromObject(t.entityRefs[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[],r.entityRefs=[];if(e.defaults)r.droppedAttributesCount=0;if(t.attributes&&t.attributes.length){r.attributes=[];for(var a=0;a<t.attributes.length;++a)r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[a],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;if(t.entityRefs&&t.entityRefs.length){r.entityRefs=[];for(var a=0;a<t.entityRefs.length;++a)r.entityRefs[a]=d.opentelemetry.proto.common.v1.EntityRef.toObject(t.entityRefs[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.resource.v1.Resource"},u}(),p}(),l}(),o.trace=function(){var l={};return l.v1=function(){var p={};return p.TracesData=function(){function u(s){if(this.resourceSpans=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resourceSpans=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resourceSpans!=null&&t.resourceSpans.length)for(var r=0;r<t.resourceSpans.length;++r)d.opentelemetry.proto.trace.v1.ResourceSpans.encode(t.resourceSpans[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.TracesData;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.resourceSpans&&f.resourceSpans.length))f.resourceSpans=[];f.resourceSpans.push(d.opentelemetry.proto.trace.v1.ResourceSpans.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resourceSpans!=null&&t.hasOwnProperty("resourceSpans")){if(!Array.isArray(t.resourceSpans))return"resourceSpans: array expected";for(var e=0;e<t.resourceSpans.length;++e){var r=d.opentelemetry.proto.trace.v1.ResourceSpans.verify(t.resourceSpans[e]);if(r)return"resourceSpans."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.TracesData)return t;var e=new d.opentelemetry.proto.trace.v1.TracesData;if(t.resourceSpans){if(!Array.isArray(t.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");e.resourceSpans=[];for(var r=0;r<t.resourceSpans.length;++r){if(typeof t.resourceSpans[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");e.resourceSpans[r]=d.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(t.resourceSpans[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.resourceSpans=[];if(t.resourceSpans&&t.resourceSpans.length){r.resourceSpans=[];for(var a=0;a<t.resourceSpans.length;++a)r.resourceSpans[a]=d.opentelemetry.proto.trace.v1.ResourceSpans.toObject(t.resourceSpans[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.TracesData"},u}(),p.ResourceSpans=function(){function u(s){if(this.scopeSpans=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resource=null,u.prototype.scopeSpans=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resource!=null&&Object.hasOwnProperty.call(t,"resource"))d.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim();if(t.scopeSpans!=null&&t.scopeSpans.length)for(var r=0;r<t.scopeSpans.length;++r)d.opentelemetry.proto.trace.v1.ScopeSpans.encode(t.scopeSpans[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.ResourceSpans;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.resource=d.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{if(!(f.scopeSpans&&f.scopeSpans.length))f.scopeSpans=[];f.scopeSpans.push(d.opentelemetry.proto.trace.v1.ScopeSpans.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=d.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeSpans!=null&&t.hasOwnProperty("scopeSpans")){if(!Array.isArray(t.scopeSpans))return"scopeSpans: array expected";for(var r=0;r<t.scopeSpans.length;++r){var e=d.opentelemetry.proto.trace.v1.ScopeSpans.verify(t.scopeSpans[r]);if(e)return"scopeSpans."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.ResourceSpans)return t;var e=new d.opentelemetry.proto.trace.v1.ResourceSpans;if(t.resource!=null){if(typeof t.resource!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");e.resource=d.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeSpans){if(!Array.isArray(t.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");e.scopeSpans=[];for(var r=0;r<t.scopeSpans.length;++r){if(typeof t.scopeSpans[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");e.scopeSpans[r]=d.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(t.scopeSpans[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.scopeSpans=[];if(e.defaults)r.resource=null,r.schemaUrl="";if(t.resource!=null&&t.hasOwnProperty("resource"))r.resource=d.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e);if(t.scopeSpans&&t.scopeSpans.length){r.scopeSpans=[];for(var a=0;a<t.scopeSpans.length;++a)r.scopeSpans[a]=d.opentelemetry.proto.trace.v1.ScopeSpans.toObject(t.scopeSpans[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.ResourceSpans"},u}(),p.ScopeSpans=function(){function u(s){if(this.spans=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.scope=null,u.prototype.spans=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.scope!=null&&Object.hasOwnProperty.call(t,"scope"))d.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim();if(t.spans!=null&&t.spans.length)for(var r=0;r<t.spans.length;++r)d.opentelemetry.proto.trace.v1.Span.encode(t.spans[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.ScopeSpans;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{if(!(f.spans&&f.spans.length))f.spans=[];f.spans.push(d.opentelemetry.proto.trace.v1.Span.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.spans!=null&&t.hasOwnProperty("spans")){if(!Array.isArray(t.spans))return"spans: array expected";for(var r=0;r<t.spans.length;++r){var e=d.opentelemetry.proto.trace.v1.Span.verify(t.spans[r]);if(e)return"spans."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.ScopeSpans)return t;var e=new d.opentelemetry.proto.trace.v1.ScopeSpans;if(t.scope!=null){if(typeof t.scope!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");e.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.spans){if(!Array.isArray(t.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");e.spans=[];for(var r=0;r<t.spans.length;++r){if(typeof t.spans[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");e.spans[r]=d.opentelemetry.proto.trace.v1.Span.fromObject(t.spans[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.spans=[];if(e.defaults)r.scope=null,r.schemaUrl="";if(t.scope!=null&&t.hasOwnProperty("scope"))r.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e);if(t.spans&&t.spans.length){r.spans=[];for(var a=0;a<t.spans.length;++a)r.spans[a]=d.opentelemetry.proto.trace.v1.Span.toObject(t.spans[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.ScopeSpans"},u}(),p.Span=function(){function u(s){if(this.attributes=[],this.events=[],this.links=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.traceState=null,u.prototype.parentSpanId=null,u.prototype.flags=null,u.prototype.name=null,u.prototype.kind=null,u.prototype.startTimeUnixNano=null,u.prototype.endTimeUnixNano=null,u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.events=h.emptyArray,u.prototype.droppedEventsCount=null,u.prototype.links=h.emptyArray,u.prototype.droppedLinksCount=null,u.prototype.status=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId"))e.uint32(10).bytes(t.traceId);if(t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId"))e.uint32(18).bytes(t.spanId);if(t.traceState!=null&&Object.hasOwnProperty.call(t,"traceState"))e.uint32(26).string(t.traceState);if(t.parentSpanId!=null&&Object.hasOwnProperty.call(t,"parentSpanId"))e.uint32(34).bytes(t.parentSpanId);if(t.name!=null&&Object.hasOwnProperty.call(t,"name"))e.uint32(42).string(t.name);if(t.kind!=null&&Object.hasOwnProperty.call(t,"kind"))e.uint32(48).int32(t.kind);if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano"))e.uint32(57).fixed64(t.startTimeUnixNano);if(t.endTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"endTimeUnixNano"))e.uint32(65).fixed64(t.endTimeUnixNano);if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(80).uint32(t.droppedAttributesCount);if(t.events!=null&&t.events.length)for(var r=0;r<t.events.length;++r)d.opentelemetry.proto.trace.v1.Span.Event.encode(t.events[r],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&Object.hasOwnProperty.call(t,"droppedEventsCount"))e.uint32(96).uint32(t.droppedEventsCount);if(t.links!=null&&t.links.length)for(var r=0;r<t.links.length;++r)d.opentelemetry.proto.trace.v1.Span.Link.encode(t.links[r],e.uint32(106).fork()).ldelim();if(t.droppedLinksCount!=null&&Object.hasOwnProperty.call(t,"droppedLinksCount"))e.uint32(112).uint32(t.droppedLinksCount);if(t.status!=null&&Object.hasOwnProperty.call(t,"status"))d.opentelemetry.proto.trace.v1.Status.encode(t.status,e.uint32(122).fork()).ldelim();if(t.flags!=null&&Object.hasOwnProperty.call(t,"flags"))e.uint32(133).fixed32(t.flags);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.Span;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.traceId=t.bytes();break}case 2:{f.spanId=t.bytes();break}case 3:{f.traceState=t.string();break}case 4:{f.parentSpanId=t.bytes();break}case 16:{f.flags=t.fixed32();break}case 5:{f.name=t.string();break}case 6:{f.kind=t.int32();break}case 7:{f.startTimeUnixNano=t.fixed64();break}case 8:{f.endTimeUnixNano=t.fixed64();break}case 9:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 10:{f.droppedAttributesCount=t.uint32();break}case 11:{if(!(f.events&&f.events.length))f.events=[];f.events.push(d.opentelemetry.proto.trace.v1.Span.Event.decode(t,t.uint32()));break}case 12:{f.droppedEventsCount=t.uint32();break}case 13:{if(!(f.links&&f.links.length))f.links=[];f.links.push(d.opentelemetry.proto.trace.v1.Span.Link.decode(t,t.uint32()));break}case 14:{f.droppedLinksCount=t.uint32();break}case 15:{f.status=d.opentelemetry.proto.trace.v1.Status.decode(t,t.uint32());break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.traceId!=null&&t.hasOwnProperty("traceId")){if(!(t.traceId&&typeof t.traceId.length==="number"||h.isString(t.traceId)))return"traceId: buffer expected"}if(t.spanId!=null&&t.hasOwnProperty("spanId")){if(!(t.spanId&&typeof t.spanId.length==="number"||h.isString(t.spanId)))return"spanId: buffer expected"}if(t.traceState!=null&&t.hasOwnProperty("traceState")){if(!h.isString(t.traceState))return"traceState: string expected"}if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId")){if(!(t.parentSpanId&&typeof t.parentSpanId.length==="number"||h.isString(t.parentSpanId)))return"parentSpanId: buffer expected"}if(t.flags!=null&&t.hasOwnProperty("flags")){if(!h.isInteger(t.flags))return"flags: integer expected"}if(t.name!=null&&t.hasOwnProperty("name")){if(!h.isString(t.name))return"name: string expected"}if(t.kind!=null&&t.hasOwnProperty("kind"))switch(t.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&h.isInteger(t.startTimeUnixNano.low)&&h.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano")){if(!h.isInteger(t.endTimeUnixNano)&&!(t.endTimeUnixNano&&h.isInteger(t.endTimeUnixNano.low)&&h.isInteger(t.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected"}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(t.events!=null&&t.hasOwnProperty("events")){if(!Array.isArray(t.events))return"events: array expected";for(var e=0;e<t.events.length;++e){var r=d.opentelemetry.proto.trace.v1.Span.Event.verify(t.events[e]);if(r)return"events."+r}}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount")){if(!h.isInteger(t.droppedEventsCount))return"droppedEventsCount: integer expected"}if(t.links!=null&&t.hasOwnProperty("links")){if(!Array.isArray(t.links))return"links: array expected";for(var e=0;e<t.links.length;++e){var r=d.opentelemetry.proto.trace.v1.Span.Link.verify(t.links[e]);if(r)return"links."+r}}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount")){if(!h.isInteger(t.droppedLinksCount))return"droppedLinksCount: integer expected"}if(t.status!=null&&t.hasOwnProperty("status")){var r=d.opentelemetry.proto.trace.v1.Status.verify(t.status);if(r)return"status."+r}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.Span)return t;var e=new d.opentelemetry.proto.trace.v1.Span;if(t.traceId!=null){if(typeof t.traceId==="string")h.base64.decode(t.traceId,e.traceId=h.newBuffer(h.base64.length(t.traceId)),0);else if(t.traceId.length>=0)e.traceId=t.traceId}if(t.spanId!=null){if(typeof t.spanId==="string")h.base64.decode(t.spanId,e.spanId=h.newBuffer(h.base64.length(t.spanId)),0);else if(t.spanId.length>=0)e.spanId=t.spanId}if(t.traceState!=null)e.traceState=String(t.traceState);if(t.parentSpanId!=null){if(typeof t.parentSpanId==="string")h.base64.decode(t.parentSpanId,e.parentSpanId=h.newBuffer(h.base64.length(t.parentSpanId)),0);else if(t.parentSpanId.length>=0)e.parentSpanId=t.parentSpanId}if(t.flags!=null)e.flags=t.flags>>>0;if(t.name!=null)e.name=String(t.name);switch(t.kind){default:if(typeof t.kind==="number"){e.kind=t.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:e.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:e.kind=1;break;case"SPAN_KIND_SERVER":case 2:e.kind=2;break;case"SPAN_KIND_CLIENT":case 3:e.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:e.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:e.kind=5;break}if(t.startTimeUnixNano!=null){if(h.Long)(e.startTimeUnixNano=h.Long.fromValue(t.startTimeUnixNano)).unsigned=!1;else if(typeof t.startTimeUnixNano==="string")e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10);else if(typeof t.startTimeUnixNano==="number")e.startTimeUnixNano=t.startTimeUnixNano;else if(typeof t.startTimeUnixNano==="object")e.startTimeUnixNano=new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber()}if(t.endTimeUnixNano!=null){if(h.Long)(e.endTimeUnixNano=h.Long.fromValue(t.endTimeUnixNano)).unsigned=!1;else if(typeof t.endTimeUnixNano==="string")e.endTimeUnixNano=parseInt(t.endTimeUnixNano,10);else if(typeof t.endTimeUnixNano==="number")e.endTimeUnixNano=t.endTimeUnixNano;else if(typeof t.endTimeUnixNano==="object")e.endTimeUnixNano=new h.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber()}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;if(t.events){if(!Array.isArray(t.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");e.events=[];for(var r=0;r<t.events.length;++r){if(typeof t.events[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");e.events[r]=d.opentelemetry.proto.trace.v1.Span.Event.fromObject(t.events[r])}}if(t.droppedEventsCount!=null)e.droppedEventsCount=t.droppedEventsCount>>>0;if(t.links){if(!Array.isArray(t.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");e.links=[];for(var r=0;r<t.links.length;++r){if(typeof t.links[r]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");e.links[r]=d.opentelemetry.proto.trace.v1.Span.Link.fromObject(t.links[r])}}if(t.droppedLinksCount!=null)e.droppedLinksCount=t.droppedLinksCount>>>0;if(t.status!=null){if(typeof t.status!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");e.status=d.opentelemetry.proto.trace.v1.Status.fromObject(t.status)}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[],r.events=[],r.links=[];if(e.defaults){if(e.bytes===String)r.traceId="";else if(r.traceId=[],e.bytes!==Array)r.traceId=h.newBuffer(r.traceId);if(e.bytes===String)r.spanId="";else if(r.spanId=[],e.bytes!==Array)r.spanId=h.newBuffer(r.spanId);if(r.traceState="",e.bytes===String)r.parentSpanId="";else if(r.parentSpanId=[],e.bytes!==Array)r.parentSpanId=h.newBuffer(r.parentSpanId);if(r.name="",r.kind=e.enums===String?"SPAN_KIND_UNSPECIFIED":0,h.Long){var a=new h.Long(0,0,!1);r.startTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.startTimeUnixNano=e.longs===String?"0":0;if(h.Long){var a=new h.Long(0,0,!1);r.endTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.endTimeUnixNano=e.longs===String?"0":0;r.droppedAttributesCount=0,r.droppedEventsCount=0,r.droppedLinksCount=0,r.status=null,r.flags=0}if(t.traceId!=null&&t.hasOwnProperty("traceId"))r.traceId=e.bytes===String?h.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId;if(t.spanId!=null&&t.hasOwnProperty("spanId"))r.spanId=e.bytes===String?h.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId;if(t.traceState!=null&&t.hasOwnProperty("traceState"))r.traceState=t.traceState;if(t.parentSpanId!=null&&t.hasOwnProperty("parentSpanId"))r.parentSpanId=e.bytes===String?h.base64.encode(t.parentSpanId,0,t.parentSpanId.length):e.bytes===Array?Array.prototype.slice.call(t.parentSpanId):t.parentSpanId;if(t.name!=null&&t.hasOwnProperty("name"))r.name=t.name;if(t.kind!=null&&t.hasOwnProperty("kind"))r.kind=e.enums===String?d.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]===void 0?t.kind:d.opentelemetry.proto.trace.v1.Span.SpanKind[t.kind]:t.kind;if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano"))if(typeof t.startTimeUnixNano==="number")r.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano;else r.startTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano;if(t.endTimeUnixNano!=null&&t.hasOwnProperty("endTimeUnixNano"))if(typeof t.endTimeUnixNano==="number")r.endTimeUnixNano=e.longs===String?String(t.endTimeUnixNano):t.endTimeUnixNano;else r.endTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.endTimeUnixNano):e.longs===Number?new h.LongBits(t.endTimeUnixNano.low>>>0,t.endTimeUnixNano.high>>>0).toNumber():t.endTimeUnixNano;if(t.attributes&&t.attributes.length){r.attributes=[];for(var f=0;f<t.attributes.length;++f)r.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[f],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;if(t.events&&t.events.length){r.events=[];for(var f=0;f<t.events.length;++f)r.events[f]=d.opentelemetry.proto.trace.v1.Span.Event.toObject(t.events[f],e)}if(t.droppedEventsCount!=null&&t.hasOwnProperty("droppedEventsCount"))r.droppedEventsCount=t.droppedEventsCount;if(t.links&&t.links.length){r.links=[];for(var f=0;f<t.links.length;++f)r.links[f]=d.opentelemetry.proto.trace.v1.Span.Link.toObject(t.links[f],e)}if(t.droppedLinksCount!=null&&t.hasOwnProperty("droppedLinksCount"))r.droppedLinksCount=t.droppedLinksCount;if(t.status!=null&&t.hasOwnProperty("status"))r.status=d.opentelemetry.proto.trace.v1.Status.toObject(t.status,e);if(t.flags!=null&&t.hasOwnProperty("flags"))r.flags=t.flags;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.Span"},u.SpanKind=function(){var s={},t=Object.create(s);return t[s[0]="SPAN_KIND_UNSPECIFIED"]=0,t[s[1]="SPAN_KIND_INTERNAL"]=1,t[s[2]="SPAN_KIND_SERVER"]=2,t[s[3]="SPAN_KIND_CLIENT"]=3,t[s[4]="SPAN_KIND_PRODUCER"]=4,t[s[5]="SPAN_KIND_CONSUMER"]=5,t}(),u.Event=function(){function s(t){if(this.attributes=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.timeUnixNano=null,s.prototype.name=null,s.prototype.attributes=h.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(9).fixed64(e.timeUnixNano);if(e.name!=null&&Object.hasOwnProperty.call(e,"name"))r.uint32(18).string(e.name);if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(26).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount"))r.uint32(32).uint32(e.droppedAttributesCount);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.trace.v1.Span.Event;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.timeUnixNano=e.fixed64();break}case 2:{y.name=e.string();break}case 3:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 4:{y.droppedAttributesCount=e.uint32();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.name!=null&&e.hasOwnProperty("name")){if(!h.isString(e.name))return"name: string expected"}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var a=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(a)return"attributes."+a}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.trace.v1.Span.Event)return e;var r=new d.opentelemetry.proto.trace.v1.Span.Event;if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.name!=null)r.name=String(e.name);if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.droppedAttributesCount!=null)r.droppedAttributesCount=e.droppedAttributesCount>>>0;return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.attributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;a.name="",a.droppedAttributesCount=0}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.name!=null&&e.hasOwnProperty("name"))a.name=e.name;if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount"))a.droppedAttributesCount=e.droppedAttributesCount;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.trace.v1.Span.Event"},s}(),u.Link=function(){function s(t){if(this.attributes=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.attributes=h.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.flags=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId"))r.uint32(10).bytes(e.traceId);if(e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId"))r.uint32(18).bytes(e.spanId);if(e.traceState!=null&&Object.hasOwnProperty.call(e,"traceState"))r.uint32(26).string(e.traceState);if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(34).fork()).ldelim();if(e.droppedAttributesCount!=null&&Object.hasOwnProperty.call(e,"droppedAttributesCount"))r.uint32(40).uint32(e.droppedAttributesCount);if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(53).fixed32(e.flags);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.trace.v1.Span.Link;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.traceId=e.bytes();break}case 2:{y.spanId=e.bytes();break}case 3:{y.traceState=e.string();break}case 4:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 5:{y.droppedAttributesCount=e.uint32();break}case 6:{y.flags=e.fixed32();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.traceId!=null&&e.hasOwnProperty("traceId")){if(!(e.traceId&&typeof e.traceId.length==="number"||h.isString(e.traceId)))return"traceId: buffer expected"}if(e.spanId!=null&&e.hasOwnProperty("spanId")){if(!(e.spanId&&typeof e.spanId.length==="number"||h.isString(e.spanId)))return"spanId: buffer expected"}if(e.traceState!=null&&e.hasOwnProperty("traceState")){if(!h.isString(e.traceState))return"traceState: string expected"}if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var r=0;r<e.attributes.length;++r){var a=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[r]);if(a)return"attributes."+a}}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.trace.v1.Span.Link)return e;var r=new d.opentelemetry.proto.trace.v1.Span.Link;if(e.traceId!=null){if(typeof e.traceId==="string")h.base64.decode(e.traceId,r.traceId=h.newBuffer(h.base64.length(e.traceId)),0);else if(e.traceId.length>=0)r.traceId=e.traceId}if(e.spanId!=null){if(typeof e.spanId==="string")h.base64.decode(e.spanId,r.spanId=h.newBuffer(h.base64.length(e.spanId)),0);else if(e.spanId.length>=0)r.spanId=e.spanId}if(e.traceState!=null)r.traceState=String(e.traceState);if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.droppedAttributesCount!=null)r.droppedAttributesCount=e.droppedAttributesCount>>>0;if(e.flags!=null)r.flags=e.flags>>>0;return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.attributes=[];if(r.defaults){if(r.bytes===String)a.traceId="";else if(a.traceId=[],r.bytes!==Array)a.traceId=h.newBuffer(a.traceId);if(r.bytes===String)a.spanId="";else if(a.spanId=[],r.bytes!==Array)a.spanId=h.newBuffer(a.spanId);a.traceState="",a.droppedAttributesCount=0,a.flags=0}if(e.traceId!=null&&e.hasOwnProperty("traceId"))a.traceId=r.bytes===String?h.base64.encode(e.traceId,0,e.traceId.length):r.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId;if(e.spanId!=null&&e.hasOwnProperty("spanId"))a.spanId=r.bytes===String?h.base64.encode(e.spanId,0,e.spanId.length):r.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId;if(e.traceState!=null&&e.hasOwnProperty("traceState"))a.traceState=e.traceState;if(e.attributes&&e.attributes.length){a.attributes=[];for(var f=0;f<e.attributes.length;++f)a.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[f],r)}if(e.droppedAttributesCount!=null&&e.hasOwnProperty("droppedAttributesCount"))a.droppedAttributesCount=e.droppedAttributesCount;if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.trace.v1.Span.Link"},s}(),u}(),p.Status=function(){function u(s){if(s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.message=null,u.prototype.code=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.message!=null&&Object.hasOwnProperty.call(t,"message"))e.uint32(18).string(t.message);if(t.code!=null&&Object.hasOwnProperty.call(t,"code"))e.uint32(24).int32(t.code);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.trace.v1.Status;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 2:{f.message=t.string();break}case 3:{f.code=t.int32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.message!=null&&t.hasOwnProperty("message")){if(!h.isString(t.message))return"message: string expected"}if(t.code!=null&&t.hasOwnProperty("code"))switch(t.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.trace.v1.Status)return t;var e=new d.opentelemetry.proto.trace.v1.Status;if(t.message!=null)e.message=String(t.message);switch(t.code){default:if(typeof t.code==="number"){e.code=t.code;break}break;case"STATUS_CODE_UNSET":case 0:e.code=0;break;case"STATUS_CODE_OK":case 1:e.code=1;break;case"STATUS_CODE_ERROR":case 2:e.code=2;break}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.defaults)r.message="",r.code=e.enums===String?"STATUS_CODE_UNSET":0;if(t.message!=null&&t.hasOwnProperty("message"))r.message=t.message;if(t.code!=null&&t.hasOwnProperty("code"))r.code=e.enums===String?d.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]===void 0?t.code:d.opentelemetry.proto.trace.v1.Status.StatusCode[t.code]:t.code;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.trace.v1.Status"},u.StatusCode=function(){var s={},t=Object.create(s);return t[s[0]="STATUS_CODE_UNSET"]=0,t[s[1]="STATUS_CODE_OK"]=1,t[s[2]="STATUS_CODE_ERROR"]=2,t}(),u}(),p.SpanFlags=function(){var u={},s=Object.create(u);return s[u[0]="SPAN_FLAGS_DO_NOT_USE"]=0,s[u[255]="SPAN_FLAGS_TRACE_FLAGS_MASK"]=255,s[u[256]="SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK"]=256,s[u[512]="SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK"]=512,s}(),p}(),l}(),o.collector=function(){var l={};return l.trace=function(){var p={};return p.v1=function(){var u={};return u.TraceService=function(){function s(t,e,r){E.rpc.Service.call(this,t,e,r)}return(s.prototype=Object.create(E.rpc.Service.prototype)).constructor=s,s.create=function(e,r,a){return new this(e,r,a)},Object.defineProperty(s.prototype.export=function t(e,r){return this.rpcCall(t,d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,e,r)},"name",{value:"Export"}),s}(),u.ExportTraceServiceRequest=function(){function s(t){if(this.resourceSpans=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.resourceSpans=h.emptyArray,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.resourceSpans!=null&&e.resourceSpans.length)for(var a=0;a<e.resourceSpans.length;++a)d.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[a],r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.resourceSpans&&y.resourceSpans.length))y.resourceSpans=[];y.resourceSpans.push(d.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.resourceSpans!=null&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var r=0;r<e.resourceSpans.length;++r){var a=d.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[r]);if(a)return"resourceSpans."+a}}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var r=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");r.resourceSpans=[];for(var a=0;a<e.resourceSpans.length;++a){if(typeof e.resourceSpans[a]!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");r.resourceSpans[a]=d.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[a])}}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.resourceSpans=[];if(e.resourceSpans&&e.resourceSpans.length){a.resourceSpans=[];for(var f=0;f<e.resourceSpans.length;++f)a.resourceSpans[f]=d.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[f],r)}return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},s}(),u.ExportTraceServiceResponse=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.partialSuccess=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess"))d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32());break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var r=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(r)return"partialSuccess."+r}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var r=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");r.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.partialSuccess=null;if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess"))a.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,r);return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},s}(),u.ExportTracePartialSuccess=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.rejectedSpans=null,s.prototype.errorMessage=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.rejectedSpans!=null&&Object.hasOwnProperty.call(e,"rejectedSpans"))r.uint32(8).int64(e.rejectedSpans);if(e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage"))r.uint32(18).string(e.errorMessage);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.rejectedSpans=e.int64();break}case 2:{y.errorMessage=e.string();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans")){if(!h.isInteger(e.rejectedSpans)&&!(e.rejectedSpans&&h.isInteger(e.rejectedSpans.low)&&h.isInteger(e.rejectedSpans.high)))return"rejectedSpans: integer|Long expected"}if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage")){if(!h.isString(e.errorMessage))return"errorMessage: string expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var r=new d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;if(e.rejectedSpans!=null){if(h.Long)(r.rejectedSpans=h.Long.fromValue(e.rejectedSpans)).unsigned=!1;else if(typeof e.rejectedSpans==="string")r.rejectedSpans=parseInt(e.rejectedSpans,10);else if(typeof e.rejectedSpans==="number")r.rejectedSpans=e.rejectedSpans;else if(typeof e.rejectedSpans==="object")r.rejectedSpans=new h.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber()}if(e.errorMessage!=null)r.errorMessage=String(e.errorMessage);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.rejectedSpans=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.rejectedSpans=r.longs===String?"0":0;a.errorMessage=""}if(e.rejectedSpans!=null&&e.hasOwnProperty("rejectedSpans"))if(typeof e.rejectedSpans==="number")a.rejectedSpans=r.longs===String?String(e.rejectedSpans):e.rejectedSpans;else a.rejectedSpans=r.longs===String?h.Long.prototype.toString.call(e.rejectedSpans):r.longs===Number?new h.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans;if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage"))a.errorMessage=e.errorMessage;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},s}(),u}(),p}(),l.metrics=function(){var p={};return p.v1=function(){var u={};return u.MetricsService=function(){function s(t,e,r){E.rpc.Service.call(this,t,e,r)}return(s.prototype=Object.create(E.rpc.Service.prototype)).constructor=s,s.create=function(e,r,a){return new this(e,r,a)},Object.defineProperty(s.prototype.export=function t(e,r){return this.rpcCall(t,d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,e,r)},"name",{value:"Export"}),s}(),u.ExportMetricsServiceRequest=function(){function s(t){if(this.resourceMetrics=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.resourceMetrics=h.emptyArray,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.resourceMetrics!=null&&e.resourceMetrics.length)for(var a=0;a<e.resourceMetrics.length;++a)d.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[a],r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.resourceMetrics&&y.resourceMetrics.length))y.resourceMetrics=[];y.resourceMetrics.push(d.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.resourceMetrics!=null&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var r=0;r<e.resourceMetrics.length;++r){var a=d.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[r]);if(a)return"resourceMetrics."+a}}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var r=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");r.resourceMetrics=[];for(var a=0;a<e.resourceMetrics.length;++a){if(typeof e.resourceMetrics[a]!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");r.resourceMetrics[a]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[a])}}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.resourceMetrics=[];if(e.resourceMetrics&&e.resourceMetrics.length){a.resourceMetrics=[];for(var f=0;f<e.resourceMetrics.length;++f)a.resourceMetrics[f]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[f],r)}return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},s}(),u.ExportMetricsServiceResponse=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.partialSuccess=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess"))d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var r=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(r)return"partialSuccess."+r}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var r=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");r.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.partialSuccess=null;if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess"))a.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,r);return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},s}(),u.ExportMetricsPartialSuccess=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.rejectedDataPoints=null,s.prototype.errorMessage=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.rejectedDataPoints!=null&&Object.hasOwnProperty.call(e,"rejectedDataPoints"))r.uint32(8).int64(e.rejectedDataPoints);if(e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage"))r.uint32(18).string(e.errorMessage);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.rejectedDataPoints=e.int64();break}case 2:{y.errorMessage=e.string();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints")){if(!h.isInteger(e.rejectedDataPoints)&&!(e.rejectedDataPoints&&h.isInteger(e.rejectedDataPoints.low)&&h.isInteger(e.rejectedDataPoints.high)))return"rejectedDataPoints: integer|Long expected"}if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage")){if(!h.isString(e.errorMessage))return"errorMessage: string expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var r=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;if(e.rejectedDataPoints!=null){if(h.Long)(r.rejectedDataPoints=h.Long.fromValue(e.rejectedDataPoints)).unsigned=!1;else if(typeof e.rejectedDataPoints==="string")r.rejectedDataPoints=parseInt(e.rejectedDataPoints,10);else if(typeof e.rejectedDataPoints==="number")r.rejectedDataPoints=e.rejectedDataPoints;else if(typeof e.rejectedDataPoints==="object")r.rejectedDataPoints=new h.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber()}if(e.errorMessage!=null)r.errorMessage=String(e.errorMessage);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.rejectedDataPoints=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.rejectedDataPoints=r.longs===String?"0":0;a.errorMessage=""}if(e.rejectedDataPoints!=null&&e.hasOwnProperty("rejectedDataPoints"))if(typeof e.rejectedDataPoints==="number")a.rejectedDataPoints=r.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints;else a.rejectedDataPoints=r.longs===String?h.Long.prototype.toString.call(e.rejectedDataPoints):r.longs===Number?new h.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints;if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage"))a.errorMessage=e.errorMessage;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},s}(),u}(),p}(),l.logs=function(){var p={};return p.v1=function(){var u={};return u.LogsService=function(){function s(t,e,r){E.rpc.Service.call(this,t,e,r)}return(s.prototype=Object.create(E.rpc.Service.prototype)).constructor=s,s.create=function(e,r,a){return new this(e,r,a)},Object.defineProperty(s.prototype.export=function t(e,r){return this.rpcCall(t,d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,e,r)},"name",{value:"Export"}),s}(),u.ExportLogsServiceRequest=function(){function s(t){if(this.resourceLogs=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.resourceLogs=h.emptyArray,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.resourceLogs!=null&&e.resourceLogs.length)for(var a=0;a<e.resourceLogs.length;++a)d.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[a],r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.resourceLogs&&y.resourceLogs.length))y.resourceLogs=[];y.resourceLogs.push(d.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.resourceLogs!=null&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var r=0;r<e.resourceLogs.length;++r){var a=d.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[r]);if(a)return"resourceLogs."+a}}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var r=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");r.resourceLogs=[];for(var a=0;a<e.resourceLogs.length;++a){if(typeof e.resourceLogs[a]!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");r.resourceLogs[a]=d.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[a])}}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.resourceLogs=[];if(e.resourceLogs&&e.resourceLogs.length){a.resourceLogs=[];for(var f=0;f<e.resourceLogs.length;++f)a.resourceLogs[f]=d.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[f],r)}return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},s}(),u.ExportLogsServiceResponse=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.partialSuccess=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.partialSuccess!=null&&Object.hasOwnProperty.call(e,"partialSuccess"))d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,r.uint32(10).fork()).ldelim();return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32());break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess")){var r=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(r)return"partialSuccess."+r}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var r=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(e.partialSuccess!=null){if(typeof e.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");r.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.partialSuccess=null;if(e.partialSuccess!=null&&e.hasOwnProperty("partialSuccess"))a.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,r);return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},s}(),u.ExportLogsPartialSuccess=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.rejectedLogRecords=null,s.prototype.errorMessage=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.rejectedLogRecords!=null&&Object.hasOwnProperty.call(e,"rejectedLogRecords"))r.uint32(8).int64(e.rejectedLogRecords);if(e.errorMessage!=null&&Object.hasOwnProperty.call(e,"errorMessage"))r.uint32(18).string(e.errorMessage);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.rejectedLogRecords=e.int64();break}case 2:{y.errorMessage=e.string();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords")){if(!h.isInteger(e.rejectedLogRecords)&&!(e.rejectedLogRecords&&h.isInteger(e.rejectedLogRecords.low)&&h.isInteger(e.rejectedLogRecords.high)))return"rejectedLogRecords: integer|Long expected"}if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage")){if(!h.isString(e.errorMessage))return"errorMessage: string expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var r=new d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;if(e.rejectedLogRecords!=null){if(h.Long)(r.rejectedLogRecords=h.Long.fromValue(e.rejectedLogRecords)).unsigned=!1;else if(typeof e.rejectedLogRecords==="string")r.rejectedLogRecords=parseInt(e.rejectedLogRecords,10);else if(typeof e.rejectedLogRecords==="number")r.rejectedLogRecords=e.rejectedLogRecords;else if(typeof e.rejectedLogRecords==="object")r.rejectedLogRecords=new h.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber()}if(e.errorMessage!=null)r.errorMessage=String(e.errorMessage);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.rejectedLogRecords=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.rejectedLogRecords=r.longs===String?"0":0;a.errorMessage=""}if(e.rejectedLogRecords!=null&&e.hasOwnProperty("rejectedLogRecords"))if(typeof e.rejectedLogRecords==="number")a.rejectedLogRecords=r.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords;else a.rejectedLogRecords=r.longs===String?h.Long.prototype.toString.call(e.rejectedLogRecords):r.longs===Number?new h.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords;if(e.errorMessage!=null&&e.hasOwnProperty("errorMessage"))a.errorMessage=e.errorMessage;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},s}(),u}(),p}(),l}(),o.metrics=function(){var l={};return l.v1=function(){var p={};return p.MetricsData=function(){function u(s){if(this.resourceMetrics=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resourceMetrics=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resourceMetrics!=null&&t.resourceMetrics.length)for(var r=0;r<t.resourceMetrics.length;++r)d.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(t.resourceMetrics[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.MetricsData;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.resourceMetrics&&f.resourceMetrics.length))f.resourceMetrics=[];f.resourceMetrics.push(d.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resourceMetrics!=null&&t.hasOwnProperty("resourceMetrics")){if(!Array.isArray(t.resourceMetrics))return"resourceMetrics: array expected";for(var e=0;e<t.resourceMetrics.length;++e){var r=d.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(t.resourceMetrics[e]);if(r)return"resourceMetrics."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.MetricsData)return t;var e=new d.opentelemetry.proto.metrics.v1.MetricsData;if(t.resourceMetrics){if(!Array.isArray(t.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");e.resourceMetrics=[];for(var r=0;r<t.resourceMetrics.length;++r){if(typeof t.resourceMetrics[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");e.resourceMetrics[r]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(t.resourceMetrics[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.resourceMetrics=[];if(t.resourceMetrics&&t.resourceMetrics.length){r.resourceMetrics=[];for(var a=0;a<t.resourceMetrics.length;++a)r.resourceMetrics[a]=d.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(t.resourceMetrics[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.MetricsData"},u}(),p.ResourceMetrics=function(){function u(s){if(this.scopeMetrics=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resource=null,u.prototype.scopeMetrics=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resource!=null&&Object.hasOwnProperty.call(t,"resource"))d.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim();if(t.scopeMetrics!=null&&t.scopeMetrics.length)for(var r=0;r<t.scopeMetrics.length;++r)d.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(t.scopeMetrics[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.ResourceMetrics;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.resource=d.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{if(!(f.scopeMetrics&&f.scopeMetrics.length))f.scopeMetrics=[];f.scopeMetrics.push(d.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=d.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeMetrics!=null&&t.hasOwnProperty("scopeMetrics")){if(!Array.isArray(t.scopeMetrics))return"scopeMetrics: array expected";for(var r=0;r<t.scopeMetrics.length;++r){var e=d.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(t.scopeMetrics[r]);if(e)return"scopeMetrics."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.ResourceMetrics)return t;var e=new d.opentelemetry.proto.metrics.v1.ResourceMetrics;if(t.resource!=null){if(typeof t.resource!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");e.resource=d.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeMetrics){if(!Array.isArray(t.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");e.scopeMetrics=[];for(var r=0;r<t.scopeMetrics.length;++r){if(typeof t.scopeMetrics[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");e.scopeMetrics[r]=d.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(t.scopeMetrics[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.scopeMetrics=[];if(e.defaults)r.resource=null,r.schemaUrl="";if(t.resource!=null&&t.hasOwnProperty("resource"))r.resource=d.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e);if(t.scopeMetrics&&t.scopeMetrics.length){r.scopeMetrics=[];for(var a=0;a<t.scopeMetrics.length;++a)r.scopeMetrics[a]=d.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(t.scopeMetrics[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},u}(),p.ScopeMetrics=function(){function u(s){if(this.metrics=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.scope=null,u.prototype.metrics=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.scope!=null&&Object.hasOwnProperty.call(t,"scope"))d.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim();if(t.metrics!=null&&t.metrics.length)for(var r=0;r<t.metrics.length;++r)d.opentelemetry.proto.metrics.v1.Metric.encode(t.metrics[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.ScopeMetrics;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{if(!(f.metrics&&f.metrics.length))f.metrics=[];f.metrics.push(d.opentelemetry.proto.metrics.v1.Metric.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.metrics!=null&&t.hasOwnProperty("metrics")){if(!Array.isArray(t.metrics))return"metrics: array expected";for(var r=0;r<t.metrics.length;++r){var e=d.opentelemetry.proto.metrics.v1.Metric.verify(t.metrics[r]);if(e)return"metrics."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.ScopeMetrics)return t;var e=new d.opentelemetry.proto.metrics.v1.ScopeMetrics;if(t.scope!=null){if(typeof t.scope!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");e.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.metrics){if(!Array.isArray(t.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");e.metrics=[];for(var r=0;r<t.metrics.length;++r){if(typeof t.metrics[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");e.metrics[r]=d.opentelemetry.proto.metrics.v1.Metric.fromObject(t.metrics[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.metrics=[];if(e.defaults)r.scope=null,r.schemaUrl="";if(t.scope!=null&&t.hasOwnProperty("scope"))r.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e);if(t.metrics&&t.metrics.length){r.metrics=[];for(var a=0;a<t.metrics.length;++a)r.metrics[a]=d.opentelemetry.proto.metrics.v1.Metric.toObject(t.metrics[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},u}(),p.Metric=function(){function u(t){if(this.metadata=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.name=null,u.prototype.description=null,u.prototype.unit=null,u.prototype.gauge=null,u.prototype.sum=null,u.prototype.histogram=null,u.prototype.exponentialHistogram=null,u.prototype.summary=null,u.prototype.metadata=h.emptyArray;var s;return Object.defineProperty(u.prototype,"data",{get:h.oneOfGetter(s=["gauge","sum","histogram","exponentialHistogram","summary"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.name!=null&&Object.hasOwnProperty.call(e,"name"))r.uint32(10).string(e.name);if(e.description!=null&&Object.hasOwnProperty.call(e,"description"))r.uint32(18).string(e.description);if(e.unit!=null&&Object.hasOwnProperty.call(e,"unit"))r.uint32(26).string(e.unit);if(e.gauge!=null&&Object.hasOwnProperty.call(e,"gauge"))d.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,r.uint32(42).fork()).ldelim();if(e.sum!=null&&Object.hasOwnProperty.call(e,"sum"))d.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,r.uint32(58).fork()).ldelim();if(e.histogram!=null&&Object.hasOwnProperty.call(e,"histogram"))d.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,r.uint32(74).fork()).ldelim();if(e.exponentialHistogram!=null&&Object.hasOwnProperty.call(e,"exponentialHistogram"))d.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,r.uint32(82).fork()).ldelim();if(e.summary!=null&&Object.hasOwnProperty.call(e,"summary"))d.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,r.uint32(90).fork()).ldelim();if(e.metadata!=null&&e.metadata.length)for(var a=0;a<e.metadata.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.metadata[a],r.uint32(98).fork()).ldelim();return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.Metric;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.name=e.string();break}case 2:{y.description=e.string();break}case 3:{y.unit=e.string();break}case 5:{y.gauge=d.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break}case 7:{y.sum=d.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break}case 9:{y.histogram=d.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break}case 10:{y.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break}case 11:{y.summary=d.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break}case 12:{if(!(y.metadata&&y.metadata.length))y.metadata=[];y.metadata.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.name!=null&&e.hasOwnProperty("name")){if(!h.isString(e.name))return"name: string expected"}if(e.description!=null&&e.hasOwnProperty("description")){if(!h.isString(e.description))return"description: string expected"}if(e.unit!=null&&e.hasOwnProperty("unit")){if(!h.isString(e.unit))return"unit: string expected"}if(e.gauge!=null&&e.hasOwnProperty("gauge")){r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge);if(a)return"gauge."+a}}if(e.sum!=null&&e.hasOwnProperty("sum")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Sum.verify(e.sum);if(a)return"sum."+a}}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram);if(a)return"histogram."+a}}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram);if(a)return"exponentialHistogram."+a}}if(e.summary!=null&&e.hasOwnProperty("summary")){if(r.data===1)return"data: multiple values";r.data=1;{var a=d.opentelemetry.proto.metrics.v1.Summary.verify(e.summary);if(a)return"summary."+a}}if(e.metadata!=null&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(var f=0;f<e.metadata.length;++f){var a=d.opentelemetry.proto.common.v1.KeyValue.verify(e.metadata[f]);if(a)return"metadata."+a}}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.Metric)return e;var r=new d.opentelemetry.proto.metrics.v1.Metric;if(e.name!=null)r.name=String(e.name);if(e.description!=null)r.description=String(e.description);if(e.unit!=null)r.unit=String(e.unit);if(e.gauge!=null){if(typeof e.gauge!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");r.gauge=d.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(e.sum!=null){if(typeof e.sum!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");r.sum=d.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(e.histogram!=null){if(typeof e.histogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");r.histogram=d.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(e.exponentialHistogram!=null){if(typeof e.exponentialHistogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");r.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(e.summary!=null){if(typeof e.summary!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");r.summary=d.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: array expected");r.metadata=[];for(var a=0;a<e.metadata.length;++a){if(typeof e.metadata[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: object expected");r.metadata[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.metadata[a])}}return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.metadata=[];if(r.defaults)a.name="",a.description="",a.unit="";if(e.name!=null&&e.hasOwnProperty("name"))a.name=e.name;if(e.description!=null&&e.hasOwnProperty("description"))a.description=e.description;if(e.unit!=null&&e.hasOwnProperty("unit"))a.unit=e.unit;if(e.gauge!=null&&e.hasOwnProperty("gauge")){if(a.gauge=d.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,r),r.oneofs)a.data="gauge"}if(e.sum!=null&&e.hasOwnProperty("sum")){if(a.sum=d.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,r),r.oneofs)a.data="sum"}if(e.histogram!=null&&e.hasOwnProperty("histogram")){if(a.histogram=d.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,r),r.oneofs)a.data="histogram"}if(e.exponentialHistogram!=null&&e.hasOwnProperty("exponentialHistogram")){if(a.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,r),r.oneofs)a.data="exponentialHistogram"}if(e.summary!=null&&e.hasOwnProperty("summary")){if(a.summary=d.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,r),r.oneofs)a.data="summary"}if(e.metadata&&e.metadata.length){a.metadata=[];for(var f=0;f<e.metadata.length;++f)a.metadata[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.metadata[f],r)}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.Metric"},u}(),p.Gauge=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Gauge;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Gauge)return t;var e=new d.opentelemetry.proto.metrics.v1.Gauge;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Gauge"},u}(),p.Sum=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.prototype.aggregationTemporality=null,u.prototype.isMonotonic=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();if(t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality"))e.uint32(16).int32(t.aggregationTemporality);if(t.isMonotonic!=null&&Object.hasOwnProperty.call(t,"isMonotonic"))e.uint32(24).bool(t.isMonotonic);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Sum;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(t,t.uint32()));break}case 2:{f.aggregationTemporality=t.int32();break}case 3:{f.isMonotonic=t.bool();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}if(t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic")){if(typeof t.isMonotonic!=="boolean")return"isMonotonic: boolean expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Sum)return t;var e=new d.opentelemetry.proto.metrics.v1.Sum;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(t.dataPoints[r])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality==="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}if(t.isMonotonic!=null)e.isMonotonic=Boolean(t.isMonotonic);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(e.defaults)r.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,r.isMonotonic=!1;if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(t.dataPoints[a],e)}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))r.aggregationTemporality=e.enums===String?d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality;if(t.isMonotonic!=null&&t.hasOwnProperty("isMonotonic"))r.isMonotonic=t.isMonotonic;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Sum"},u}(),p.Histogram=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();if(t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality"))e.uint32(16).int32(t.aggregationTemporality);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Histogram;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(t,t.uint32()));break}case 2:{f.aggregationTemporality=t.int32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Histogram)return t;var e=new d.opentelemetry.proto.metrics.v1.Histogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(t.dataPoints[r])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality==="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(e.defaults)r.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(t.dataPoints[a],e)}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))r.aggregationTemporality=e.enums===String?d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Histogram"},u}(),p.ExponentialHistogram=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.prototype.aggregationTemporality=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();if(t.aggregationTemporality!=null&&Object.hasOwnProperty.call(t,"aggregationTemporality"))e.uint32(16).int32(t.aggregationTemporality);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.ExponentialHistogram;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(t,t.uint32()));break}case 2:{f.aggregationTemporality=t.int32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))switch(t.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.ExponentialHistogram)return t;var e=new d.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(t.dataPoints[r])}}switch(t.aggregationTemporality){default:if(typeof t.aggregationTemporality==="number"){e.aggregationTemporality=t.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:e.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:e.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:e.aggregationTemporality=2;break}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(e.defaults)r.aggregationTemporality=e.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(t.dataPoints[a],e)}if(t.aggregationTemporality!=null&&t.hasOwnProperty("aggregationTemporality"))r.aggregationTemporality=e.enums===String?d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]===void 0?t.aggregationTemporality:d.opentelemetry.proto.metrics.v1.AggregationTemporality[t.aggregationTemporality]:t.aggregationTemporality;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},u}(),p.Summary=function(){function u(s){if(this.dataPoints=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.dataPoints=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.dataPoints!=null&&t.dataPoints.length)for(var r=0;r<t.dataPoints.length;++r)d.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(t.dataPoints[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.Summary;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.dataPoints&&f.dataPoints.length))f.dataPoints=[];f.dataPoints.push(d.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.dataPoints!=null&&t.hasOwnProperty("dataPoints")){if(!Array.isArray(t.dataPoints))return"dataPoints: array expected";for(var e=0;e<t.dataPoints.length;++e){var r=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(t.dataPoints[e]);if(r)return"dataPoints."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.Summary)return t;var e=new d.opentelemetry.proto.metrics.v1.Summary;if(t.dataPoints){if(!Array.isArray(t.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");e.dataPoints=[];for(var r=0;r<t.dataPoints.length;++r){if(typeof t.dataPoints[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");e.dataPoints[r]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(t.dataPoints[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.dataPoints=[];if(t.dataPoints&&t.dataPoints.length){r.dataPoints=[];for(var a=0;a<t.dataPoints.length;++a)r.dataPoints[a]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(t.dataPoints[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.Summary"},u}(),p.AggregationTemporality=function(){var u={},s=Object.create(u);return s[u[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,s[u[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,s[u[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,s}(),p.DataPointFlags=function(){var u={},s=Object.create(u);return s[u[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,s[u[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,s}(),p.NumberDataPoint=function(){function u(t){if(this.attributes=[],this.exemplars=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.exemplars=h.emptyArray,u.prototype.flags=null;var s;return Object.defineProperty(u.prototype,"value",{get:h.oneOfGetter(s=["asDouble","asInt"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano"))r.uint32(17).fixed64(e.startTimeUnixNano);if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(25).fixed64(e.timeUnixNano);if(e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble"))r.uint32(33).double(e.asDouble);if(e.exemplars!=null&&e.exemplars.length)for(var a=0;a<e.exemplars.length;++a)d.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[a],r.uint32(42).fork()).ldelim();if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt"))r.uint32(49).sfixed64(e.asInt);if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(58).fork()).ldelim();if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(64).uint32(e.flags);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.NumberDataPoint;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 7:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.startTimeUnixNano=e.fixed64();break}case 3:{y.timeUnixNano=e.fixed64();break}case 4:{y.asDouble=e.double();break}case 6:{y.asInt=e.sfixed64();break}case 5:{if(!(y.exemplars&&y.exemplars.length))y.exemplars=[];y.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 8:{y.flags=e.uint32();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var a=0;a<e.attributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[a]);if(f)return"attributes."+f}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&h.isInteger(e.startTimeUnixNano.low)&&h.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(r.value=1,typeof e.asDouble!=="number")return"asDouble: number expected"}if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!h.isInteger(e.asInt)&&!(e.asInt&&h.isInteger(e.asInt.low)&&h.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var a=0;a<e.exemplars.length;++a){var f=d.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[a]);if(f)return"exemplars."+f}}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var r=new d.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.startTimeUnixNano!=null){if(h.Long)(r.startTimeUnixNano=h.Long.fromValue(e.startTimeUnixNano)).unsigned=!1;else if(typeof e.startTimeUnixNano==="string")r.startTimeUnixNano=parseInt(e.startTimeUnixNano,10);else if(typeof e.startTimeUnixNano==="number")r.startTimeUnixNano=e.startTimeUnixNano;else if(typeof e.startTimeUnixNano==="object")r.startTimeUnixNano=new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber()}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.asDouble!=null)r.asDouble=Number(e.asDouble);if(e.asInt!=null){if(h.Long)(r.asInt=h.Long.fromValue(e.asInt)).unsigned=!1;else if(typeof e.asInt==="string")r.asInt=parseInt(e.asInt,10);else if(typeof e.asInt==="number")r.asInt=e.asInt;else if(typeof e.asInt==="object")r.asInt=new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber()}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<e.exemplars.length;++a){if(typeof e.exemplars[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");r.exemplars[a]=d.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[a])}}if(e.flags!=null)r.flags=e.flags>>>0;return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.exemplars=[],a.attributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.startTimeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;a.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano"))if(typeof e.startTimeUnixNano==="number")a.startTimeUnixNano=r.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano;else a.startTimeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.startTimeUnixNano):r.longs===Number?new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano;if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(a.asDouble=r.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,r.oneofs)a.value="asDouble"}if(e.exemplars&&e.exemplars.length){a.exemplars=[];for(var y=0;y<e.exemplars.length;++y)a.exemplars[y]=d.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[y],r)}if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(typeof e.asInt==="number")a.asInt=r.longs===String?String(e.asInt):e.asInt;else a.asInt=r.longs===String?h.Long.prototype.toString.call(e.asInt):r.longs===Number?new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt;if(r.oneofs)a.value="asInt"}if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},u}(),p.HistogramDataPoint=function(){function u(t){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.bucketCounts=h.emptyArray,u.prototype.explicitBounds=h.emptyArray,u.prototype.exemplars=h.emptyArray,u.prototype.flags=null,u.prototype.min=null,u.prototype.max=null;var s;return Object.defineProperty(u.prototype,"_sum",{get:h.oneOfGetter(s=["sum"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_min",{get:h.oneOfGetter(s=["min"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_max",{get:h.oneOfGetter(s=["max"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano"))r.uint32(17).fixed64(e.startTimeUnixNano);if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(25).fixed64(e.timeUnixNano);if(e.count!=null&&Object.hasOwnProperty.call(e,"count"))r.uint32(33).fixed64(e.count);if(e.sum!=null&&Object.hasOwnProperty.call(e,"sum"))r.uint32(41).double(e.sum);if(e.bucketCounts!=null&&e.bucketCounts.length){r.uint32(50).fork();for(var a=0;a<e.bucketCounts.length;++a)r.fixed64(e.bucketCounts[a]);r.ldelim()}if(e.explicitBounds!=null&&e.explicitBounds.length){r.uint32(58).fork();for(var a=0;a<e.explicitBounds.length;++a)r.double(e.explicitBounds[a]);r.ldelim()}if(e.exemplars!=null&&e.exemplars.length)for(var a=0;a<e.exemplars.length;++a)d.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[a],r.uint32(66).fork()).ldelim();if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(74).fork()).ldelim();if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(80).uint32(e.flags);if(e.min!=null&&Object.hasOwnProperty.call(e,"min"))r.uint32(89).double(e.min);if(e.max!=null&&Object.hasOwnProperty.call(e,"max"))r.uint32(97).double(e.max);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.HistogramDataPoint;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 9:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.startTimeUnixNano=e.fixed64();break}case 3:{y.timeUnixNano=e.fixed64();break}case 4:{y.count=e.fixed64();break}case 5:{y.sum=e.double();break}case 6:{if(!(y.bucketCounts&&y.bucketCounts.length))y.bucketCounts=[];if((g&7)===2){var M=e.uint32()+e.pos;while(e.pos<M)y.bucketCounts.push(e.fixed64())}else y.bucketCounts.push(e.fixed64());break}case 7:{if(!(y.explicitBounds&&y.explicitBounds.length))y.explicitBounds=[];if((g&7)===2){var M=e.uint32()+e.pos;while(e.pos<M)y.explicitBounds.push(e.double())}else y.explicitBounds.push(e.double());break}case 8:{if(!(y.exemplars&&y.exemplars.length))y.exemplars=[];y.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 10:{y.flags=e.uint32();break}case 11:{y.min=e.double();break}case 12:{y.max=e.double();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var a=0;a<e.attributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[a]);if(f)return"attributes."+f}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&h.isInteger(e.startTimeUnixNano.low)&&h.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.count!=null&&e.hasOwnProperty("count")){if(!h.isInteger(e.count)&&!(e.count&&h.isInteger(e.count.low)&&h.isInteger(e.count.high)))return"count: integer|Long expected"}if(e.sum!=null&&e.hasOwnProperty("sum")){if(r._sum=1,typeof e.sum!=="number")return"sum: number expected"}if(e.bucketCounts!=null&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<e.bucketCounts.length;++a)if(!h.isInteger(e.bucketCounts[a])&&!(e.bucketCounts[a]&&h.isInteger(e.bucketCounts[a].low)&&h.isInteger(e.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}if(e.explicitBounds!=null&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(var a=0;a<e.explicitBounds.length;++a)if(typeof e.explicitBounds[a]!=="number")return"explicitBounds: number[] expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var a=0;a<e.exemplars.length;++a){var f=d.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[a]);if(f)return"exemplars."+f}}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}if(e.min!=null&&e.hasOwnProperty("min")){if(r._min=1,typeof e.min!=="number")return"min: number expected"}if(e.max!=null&&e.hasOwnProperty("max")){if(r._max=1,typeof e.max!=="number")return"max: number expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var r=new d.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.startTimeUnixNano!=null){if(h.Long)(r.startTimeUnixNano=h.Long.fromValue(e.startTimeUnixNano)).unsigned=!1;else if(typeof e.startTimeUnixNano==="string")r.startTimeUnixNano=parseInt(e.startTimeUnixNano,10);else if(typeof e.startTimeUnixNano==="number")r.startTimeUnixNano=e.startTimeUnixNano;else if(typeof e.startTimeUnixNano==="object")r.startTimeUnixNano=new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber()}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.count!=null){if(h.Long)(r.count=h.Long.fromValue(e.count)).unsigned=!1;else if(typeof e.count==="string")r.count=parseInt(e.count,10);else if(typeof e.count==="number")r.count=e.count;else if(typeof e.count==="object")r.count=new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber()}if(e.sum!=null)r.sum=Number(e.sum);if(e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");r.bucketCounts=[];for(var a=0;a<e.bucketCounts.length;++a)if(h.Long)(r.bucketCounts[a]=h.Long.fromValue(e.bucketCounts[a])).unsigned=!1;else if(typeof e.bucketCounts[a]==="string")r.bucketCounts[a]=parseInt(e.bucketCounts[a],10);else if(typeof e.bucketCounts[a]==="number")r.bucketCounts[a]=e.bucketCounts[a];else if(typeof e.bucketCounts[a]==="object")r.bucketCounts[a]=new h.LongBits(e.bucketCounts[a].low>>>0,e.bucketCounts[a].high>>>0).toNumber()}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");r.explicitBounds=[];for(var a=0;a<e.explicitBounds.length;++a)r.explicitBounds[a]=Number(e.explicitBounds[a])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<e.exemplars.length;++a){if(typeof e.exemplars[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");r.exemplars[a]=d.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[a])}}if(e.flags!=null)r.flags=e.flags>>>0;if(e.min!=null)r.min=Number(e.min);if(e.max!=null)r.max=Number(e.max);return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.bucketCounts=[],a.explicitBounds=[],a.exemplars=[],a.attributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.startTimeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.count=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.count=r.longs===String?"0":0;a.flags=0}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano"))if(typeof e.startTimeUnixNano==="number")a.startTimeUnixNano=r.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano;else a.startTimeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.startTimeUnixNano):r.longs===Number?new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano;if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.count!=null&&e.hasOwnProperty("count"))if(typeof e.count==="number")a.count=r.longs===String?String(e.count):e.count;else a.count=r.longs===String?h.Long.prototype.toString.call(e.count):r.longs===Number?new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count;if(e.sum!=null&&e.hasOwnProperty("sum")){if(a.sum=r.json&&!isFinite(e.sum)?String(e.sum):e.sum,r.oneofs)a._sum="sum"}if(e.bucketCounts&&e.bucketCounts.length){a.bucketCounts=[];for(var y=0;y<e.bucketCounts.length;++y)if(typeof e.bucketCounts[y]==="number")a.bucketCounts[y]=r.longs===String?String(e.bucketCounts[y]):e.bucketCounts[y];else a.bucketCounts[y]=r.longs===String?h.Long.prototype.toString.call(e.bucketCounts[y]):r.longs===Number?new h.LongBits(e.bucketCounts[y].low>>>0,e.bucketCounts[y].high>>>0).toNumber():e.bucketCounts[y]}if(e.explicitBounds&&e.explicitBounds.length){a.explicitBounds=[];for(var y=0;y<e.explicitBounds.length;++y)a.explicitBounds[y]=r.json&&!isFinite(e.explicitBounds[y])?String(e.explicitBounds[y]):e.explicitBounds[y]}if(e.exemplars&&e.exemplars.length){a.exemplars=[];for(var y=0;y<e.exemplars.length;++y)a.exemplars[y]=d.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[y],r)}if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;if(e.min!=null&&e.hasOwnProperty("min")){if(a.min=r.json&&!isFinite(e.min)?String(e.min):e.min,r.oneofs)a._min="min"}if(e.max!=null&&e.hasOwnProperty("max")){if(a.max=r.json&&!isFinite(e.max)?String(e.max):e.max,r.oneofs)a._max="max"}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},u}(),p.ExponentialHistogramDataPoint=function(){function u(t){if(this.attributes=[],this.exemplars=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.scale=null,u.prototype.zeroCount=null,u.prototype.positive=null,u.prototype.negative=null,u.prototype.flags=null,u.prototype.exemplars=h.emptyArray,u.prototype.min=null,u.prototype.max=null,u.prototype.zeroThreshold=null;var s;return Object.defineProperty(u.prototype,"_sum",{get:h.oneOfGetter(s=["sum"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_min",{get:h.oneOfGetter(s=["min"]),set:h.oneOfSetter(s)}),Object.defineProperty(u.prototype,"_max",{get:h.oneOfGetter(s=["max"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.attributes!=null&&e.attributes.length)for(var a=0;a<e.attributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[a],r.uint32(10).fork()).ldelim();if(e.startTimeUnixNano!=null&&Object.hasOwnProperty.call(e,"startTimeUnixNano"))r.uint32(17).fixed64(e.startTimeUnixNano);if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(25).fixed64(e.timeUnixNano);if(e.count!=null&&Object.hasOwnProperty.call(e,"count"))r.uint32(33).fixed64(e.count);if(e.sum!=null&&Object.hasOwnProperty.call(e,"sum"))r.uint32(41).double(e.sum);if(e.scale!=null&&Object.hasOwnProperty.call(e,"scale"))r.uint32(48).sint32(e.scale);if(e.zeroCount!=null&&Object.hasOwnProperty.call(e,"zeroCount"))r.uint32(57).fixed64(e.zeroCount);if(e.positive!=null&&Object.hasOwnProperty.call(e,"positive"))d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,r.uint32(66).fork()).ldelim();if(e.negative!=null&&Object.hasOwnProperty.call(e,"negative"))d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,r.uint32(74).fork()).ldelim();if(e.flags!=null&&Object.hasOwnProperty.call(e,"flags"))r.uint32(80).uint32(e.flags);if(e.exemplars!=null&&e.exemplars.length)for(var a=0;a<e.exemplars.length;++a)d.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[a],r.uint32(90).fork()).ldelim();if(e.min!=null&&Object.hasOwnProperty.call(e,"min"))r.uint32(97).double(e.min);if(e.max!=null&&Object.hasOwnProperty.call(e,"max"))r.uint32(105).double(e.max);if(e.zeroThreshold!=null&&Object.hasOwnProperty.call(e,"zeroThreshold"))r.uint32(113).double(e.zeroThreshold);return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{if(!(y.attributes&&y.attributes.length))y.attributes=[];y.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.startTimeUnixNano=e.fixed64();break}case 3:{y.timeUnixNano=e.fixed64();break}case 4:{y.count=e.fixed64();break}case 5:{y.sum=e.double();break}case 6:{y.scale=e.sint32();break}case 7:{y.zeroCount=e.fixed64();break}case 8:{y.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 9:{y.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break}case 10:{y.flags=e.uint32();break}case 11:{if(!(y.exemplars&&y.exemplars.length))y.exemplars=[];y.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break}case 12:{y.min=e.double();break}case 13:{y.max=e.double();break}case 14:{y.zeroThreshold=e.double();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.attributes!=null&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var a=0;a<e.attributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[a]);if(f)return"attributes."+f}}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(e.startTimeUnixNano)&&!(e.startTimeUnixNano&&h.isInteger(e.startTimeUnixNano.low)&&h.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.count!=null&&e.hasOwnProperty("count")){if(!h.isInteger(e.count)&&!(e.count&&h.isInteger(e.count.low)&&h.isInteger(e.count.high)))return"count: integer|Long expected"}if(e.sum!=null&&e.hasOwnProperty("sum")){if(r._sum=1,typeof e.sum!=="number")return"sum: number expected"}if(e.scale!=null&&e.hasOwnProperty("scale")){if(!h.isInteger(e.scale))return"scale: integer expected"}if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount")){if(!h.isInteger(e.zeroCount)&&!(e.zeroCount&&h.isInteger(e.zeroCount.low)&&h.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected"}if(e.positive!=null&&e.hasOwnProperty("positive")){var f=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive);if(f)return"positive."+f}if(e.negative!=null&&e.hasOwnProperty("negative")){var f=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative);if(f)return"negative."+f}if(e.flags!=null&&e.hasOwnProperty("flags")){if(!h.isInteger(e.flags))return"flags: integer expected"}if(e.exemplars!=null&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(var a=0;a<e.exemplars.length;++a){var f=d.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[a]);if(f)return"exemplars."+f}}if(e.min!=null&&e.hasOwnProperty("min")){if(r._min=1,typeof e.min!=="number")return"min: number expected"}if(e.max!=null&&e.hasOwnProperty("max")){if(r._max=1,typeof e.max!=="number")return"max: number expected"}if(e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold")){if(typeof e.zeroThreshold!=="number")return"zeroThreshold: number expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var r=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");r.attributes=[];for(var a=0;a<e.attributes.length;++a){if(typeof e.attributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");r.attributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[a])}}if(e.startTimeUnixNano!=null){if(h.Long)(r.startTimeUnixNano=h.Long.fromValue(e.startTimeUnixNano)).unsigned=!1;else if(typeof e.startTimeUnixNano==="string")r.startTimeUnixNano=parseInt(e.startTimeUnixNano,10);else if(typeof e.startTimeUnixNano==="number")r.startTimeUnixNano=e.startTimeUnixNano;else if(typeof e.startTimeUnixNano==="object")r.startTimeUnixNano=new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber()}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.count!=null){if(h.Long)(r.count=h.Long.fromValue(e.count)).unsigned=!1;else if(typeof e.count==="string")r.count=parseInt(e.count,10);else if(typeof e.count==="number")r.count=e.count;else if(typeof e.count==="object")r.count=new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber()}if(e.sum!=null)r.sum=Number(e.sum);if(e.scale!=null)r.scale=e.scale|0;if(e.zeroCount!=null){if(h.Long)(r.zeroCount=h.Long.fromValue(e.zeroCount)).unsigned=!1;else if(typeof e.zeroCount==="string")r.zeroCount=parseInt(e.zeroCount,10);else if(typeof e.zeroCount==="number")r.zeroCount=e.zeroCount;else if(typeof e.zeroCount==="object")r.zeroCount=new h.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber()}if(e.positive!=null){if(typeof e.positive!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");r.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(e.negative!=null){if(typeof e.negative!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");r.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(e.flags!=null)r.flags=e.flags>>>0;if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");r.exemplars=[];for(var a=0;a<e.exemplars.length;++a){if(typeof e.exemplars[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");r.exemplars[a]=d.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[a])}}if(e.min!=null)r.min=Number(e.min);if(e.max!=null)r.max=Number(e.max);if(e.zeroThreshold!=null)r.zeroThreshold=Number(e.zeroThreshold);return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.attributes=[],a.exemplars=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.startTimeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.startTimeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;if(h.Long){var f=new h.Long(0,0,!1);a.count=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.count=r.longs===String?"0":0;if(a.scale=0,h.Long){var f=new h.Long(0,0,!1);a.zeroCount=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.zeroCount=r.longs===String?"0":0;a.positive=null,a.negative=null,a.flags=0,a.zeroThreshold=0}if(e.attributes&&e.attributes.length){a.attributes=[];for(var y=0;y<e.attributes.length;++y)a.attributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[y],r)}if(e.startTimeUnixNano!=null&&e.hasOwnProperty("startTimeUnixNano"))if(typeof e.startTimeUnixNano==="number")a.startTimeUnixNano=r.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano;else a.startTimeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.startTimeUnixNano):r.longs===Number?new h.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano;if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.count!=null&&e.hasOwnProperty("count"))if(typeof e.count==="number")a.count=r.longs===String?String(e.count):e.count;else a.count=r.longs===String?h.Long.prototype.toString.call(e.count):r.longs===Number?new h.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count;if(e.sum!=null&&e.hasOwnProperty("sum")){if(a.sum=r.json&&!isFinite(e.sum)?String(e.sum):e.sum,r.oneofs)a._sum="sum"}if(e.scale!=null&&e.hasOwnProperty("scale"))a.scale=e.scale;if(e.zeroCount!=null&&e.hasOwnProperty("zeroCount"))if(typeof e.zeroCount==="number")a.zeroCount=r.longs===String?String(e.zeroCount):e.zeroCount;else a.zeroCount=r.longs===String?h.Long.prototype.toString.call(e.zeroCount):r.longs===Number?new h.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount;if(e.positive!=null&&e.hasOwnProperty("positive"))a.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,r);if(e.negative!=null&&e.hasOwnProperty("negative"))a.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,r);if(e.flags!=null&&e.hasOwnProperty("flags"))a.flags=e.flags;if(e.exemplars&&e.exemplars.length){a.exemplars=[];for(var y=0;y<e.exemplars.length;++y)a.exemplars[y]=d.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[y],r)}if(e.min!=null&&e.hasOwnProperty("min")){if(a.min=r.json&&!isFinite(e.min)?String(e.min):e.min,r.oneofs)a._min="min"}if(e.max!=null&&e.hasOwnProperty("max")){if(a.max=r.json&&!isFinite(e.max)?String(e.max):e.max,r.oneofs)a._max="max"}if(e.zeroThreshold!=null&&e.hasOwnProperty("zeroThreshold"))a.zeroThreshold=r.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold;return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},u.Buckets=function(){function t(e){if(this.bucketCounts=[],e){for(var r=Object.keys(e),a=0;a<r.length;++a)if(e[r[a]]!=null)this[r[a]]=e[r[a]]}}return t.prototype.offset=null,t.prototype.bucketCounts=h.emptyArray,t.create=function(r){return new t(r)},t.encode=function(r,a){if(!a)a=N.create();if(r.offset!=null&&Object.hasOwnProperty.call(r,"offset"))a.uint32(8).sint32(r.offset);if(r.bucketCounts!=null&&r.bucketCounts.length){a.uint32(18).fork();for(var f=0;f<r.bucketCounts.length;++f)a.uint64(r.bucketCounts[f]);a.ldelim()}return a},t.encodeDelimited=function(r,a){return this.encode(r,a).ldelim()},t.decode=function(r,a,f){if(!(r instanceof _))r=_.create(r);var y=a===void 0?r.len:r.pos+a,g=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;while(r.pos<y){var M=r.uint32();if(M===f)break;switch(M>>>3){case 1:{g.offset=r.sint32();break}case 2:{if(!(g.bucketCounts&&g.bucketCounts.length))g.bucketCounts=[];if((M&7)===2){var F=r.uint32()+r.pos;while(r.pos<F)g.bucketCounts.push(r.uint64())}else g.bucketCounts.push(r.uint64());break}default:r.skipType(M&7);break}}return g},t.decodeDelimited=function(r){if(!(r instanceof _))r=new _(r);return this.decode(r,r.uint32())},t.verify=function(r){if(typeof r!=="object"||r===null)return"object expected";if(r.offset!=null&&r.hasOwnProperty("offset")){if(!h.isInteger(r.offset))return"offset: integer expected"}if(r.bucketCounts!=null&&r.hasOwnProperty("bucketCounts")){if(!Array.isArray(r.bucketCounts))return"bucketCounts: array expected";for(var a=0;a<r.bucketCounts.length;++a)if(!h.isInteger(r.bucketCounts[a])&&!(r.bucketCounts[a]&&h.isInteger(r.bucketCounts[a].low)&&h.isInteger(r.bucketCounts[a].high)))return"bucketCounts: integer|Long[] expected"}return null},t.fromObject=function(r){if(r instanceof d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return r;var a=new d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(r.offset!=null)a.offset=r.offset|0;if(r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");a.bucketCounts=[];for(var f=0;f<r.bucketCounts.length;++f)if(h.Long)(a.bucketCounts[f]=h.Long.fromValue(r.bucketCounts[f])).unsigned=!0;else if(typeof r.bucketCounts[f]==="string")a.bucketCounts[f]=parseInt(r.bucketCounts[f],10);else if(typeof r.bucketCounts[f]==="number")a.bucketCounts[f]=r.bucketCounts[f];else if(typeof r.bucketCounts[f]==="object")a.bucketCounts[f]=new h.LongBits(r.bucketCounts[f].low>>>0,r.bucketCounts[f].high>>>0).toNumber(!0)}return a},t.toObject=function(r,a){if(!a)a={};var f={};if(a.arrays||a.defaults)f.bucketCounts=[];if(a.defaults)f.offset=0;if(r.offset!=null&&r.hasOwnProperty("offset"))f.offset=r.offset;if(r.bucketCounts&&r.bucketCounts.length){f.bucketCounts=[];for(var y=0;y<r.bucketCounts.length;++y)if(typeof r.bucketCounts[y]==="number")f.bucketCounts[y]=a.longs===String?String(r.bucketCounts[y]):r.bucketCounts[y];else f.bucketCounts[y]=a.longs===String?h.Long.prototype.toString.call(r.bucketCounts[y]):a.longs===Number?new h.LongBits(r.bucketCounts[y].low>>>0,r.bucketCounts[y].high>>>0).toNumber(!0):r.bucketCounts[y]}return f},t.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},t.getTypeUrl=function(r){if(r===void 0)r="type.googleapis.com";return r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},t}(),u}(),p.SummaryDataPoint=function(){function u(s){if(this.attributes=[],this.quantileValues=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.attributes=h.emptyArray,u.prototype.startTimeUnixNano=null,u.prototype.timeUnixNano=null,u.prototype.count=null,u.prototype.sum=null,u.prototype.quantileValues=h.emptyArray,u.prototype.flags=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.startTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"startTimeUnixNano"))e.uint32(17).fixed64(t.startTimeUnixNano);if(t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano"))e.uint32(25).fixed64(t.timeUnixNano);if(t.count!=null&&Object.hasOwnProperty.call(t,"count"))e.uint32(33).fixed64(t.count);if(t.sum!=null&&Object.hasOwnProperty.call(t,"sum"))e.uint32(41).double(t.sum);if(t.quantileValues!=null&&t.quantileValues.length)for(var r=0;r<t.quantileValues.length;++r)d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(t.quantileValues[r],e.uint32(50).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(58).fork()).ldelim();if(t.flags!=null&&Object.hasOwnProperty.call(t,"flags"))e.uint32(64).uint32(t.flags);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 7:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 2:{f.startTimeUnixNano=t.fixed64();break}case 3:{f.timeUnixNano=t.fixed64();break}case 4:{f.count=t.fixed64();break}case 5:{f.sum=t.double();break}case 6:{if(!(f.quantileValues&&f.quantileValues.length))f.quantileValues=[];f.quantileValues.push(d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(t,t.uint32()));break}case 8:{f.flags=t.uint32();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var e=0;e<t.attributes.length;++e){var r=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[e]);if(r)return"attributes."+r}}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(t.startTimeUnixNano)&&!(t.startTimeUnixNano&&h.isInteger(t.startTimeUnixNano.low)&&h.isInteger(t.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")){if(!h.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&h.isInteger(t.timeUnixNano.low)&&h.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(t.count!=null&&t.hasOwnProperty("count")){if(!h.isInteger(t.count)&&!(t.count&&h.isInteger(t.count.low)&&h.isInteger(t.count.high)))return"count: integer|Long expected"}if(t.sum!=null&&t.hasOwnProperty("sum")){if(typeof t.sum!=="number")return"sum: number expected"}if(t.quantileValues!=null&&t.hasOwnProperty("quantileValues")){if(!Array.isArray(t.quantileValues))return"quantileValues: array expected";for(var e=0;e<t.quantileValues.length;++e){var r=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(t.quantileValues[e]);if(r)return"quantileValues."+r}}if(t.flags!=null&&t.hasOwnProperty("flags")){if(!h.isInteger(t.flags))return"flags: integer expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.metrics.v1.SummaryDataPoint)return t;var e=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.startTimeUnixNano!=null){if(h.Long)(e.startTimeUnixNano=h.Long.fromValue(t.startTimeUnixNano)).unsigned=!1;else if(typeof t.startTimeUnixNano==="string")e.startTimeUnixNano=parseInt(t.startTimeUnixNano,10);else if(typeof t.startTimeUnixNano==="number")e.startTimeUnixNano=t.startTimeUnixNano;else if(typeof t.startTimeUnixNano==="object")e.startTimeUnixNano=new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber()}if(t.timeUnixNano!=null){if(h.Long)(e.timeUnixNano=h.Long.fromValue(t.timeUnixNano)).unsigned=!1;else if(typeof t.timeUnixNano==="string")e.timeUnixNano=parseInt(t.timeUnixNano,10);else if(typeof t.timeUnixNano==="number")e.timeUnixNano=t.timeUnixNano;else if(typeof t.timeUnixNano==="object")e.timeUnixNano=new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber()}if(t.count!=null){if(h.Long)(e.count=h.Long.fromValue(t.count)).unsigned=!1;else if(typeof t.count==="string")e.count=parseInt(t.count,10);else if(typeof t.count==="number")e.count=t.count;else if(typeof t.count==="object")e.count=new h.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber()}if(t.sum!=null)e.sum=Number(t.sum);if(t.quantileValues){if(!Array.isArray(t.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");e.quantileValues=[];for(var r=0;r<t.quantileValues.length;++r){if(typeof t.quantileValues[r]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");e.quantileValues[r]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(t.quantileValues[r])}}if(t.flags!=null)e.flags=t.flags>>>0;return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.quantileValues=[],r.attributes=[];if(e.defaults){if(h.Long){var a=new h.Long(0,0,!1);r.startTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.startTimeUnixNano=e.longs===String?"0":0;if(h.Long){var a=new h.Long(0,0,!1);r.timeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.timeUnixNano=e.longs===String?"0":0;if(h.Long){var a=new h.Long(0,0,!1);r.count=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.count=e.longs===String?"0":0;r.sum=0,r.flags=0}if(t.startTimeUnixNano!=null&&t.hasOwnProperty("startTimeUnixNano"))if(typeof t.startTimeUnixNano==="number")r.startTimeUnixNano=e.longs===String?String(t.startTimeUnixNano):t.startTimeUnixNano;else r.startTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.startTimeUnixNano):e.longs===Number?new h.LongBits(t.startTimeUnixNano.low>>>0,t.startTimeUnixNano.high>>>0).toNumber():t.startTimeUnixNano;if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano"))if(typeof t.timeUnixNano==="number")r.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano;else r.timeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano;if(t.count!=null&&t.hasOwnProperty("count"))if(typeof t.count==="number")r.count=e.longs===String?String(t.count):t.count;else r.count=e.longs===String?h.Long.prototype.toString.call(t.count):e.longs===Number?new h.LongBits(t.count.low>>>0,t.count.high>>>0).toNumber():t.count;if(t.sum!=null&&t.hasOwnProperty("sum"))r.sum=e.json&&!isFinite(t.sum)?String(t.sum):t.sum;if(t.quantileValues&&t.quantileValues.length){r.quantileValues=[];for(var f=0;f<t.quantileValues.length;++f)r.quantileValues[f]=d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(t.quantileValues[f],e)}if(t.attributes&&t.attributes.length){r.attributes=[];for(var f=0;f<t.attributes.length;++f)r.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[f],e)}if(t.flags!=null&&t.hasOwnProperty("flags"))r.flags=t.flags;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},u.ValueAtQuantile=function(){function s(t){if(t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}return s.prototype.quantile=null,s.prototype.value=null,s.create=function(e){return new s(e)},s.encode=function(e,r){if(!r)r=N.create();if(e.quantile!=null&&Object.hasOwnProperty.call(e,"quantile"))r.uint32(9).double(e.quantile);if(e.value!=null&&Object.hasOwnProperty.call(e,"value"))r.uint32(17).double(e.value);return r},s.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},s.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 1:{y.quantile=e.double();break}case 2:{y.value=e.double();break}default:e.skipType(g&7);break}}return y},s.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},s.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";if(e.quantile!=null&&e.hasOwnProperty("quantile")){if(typeof e.quantile!=="number")return"quantile: number expected"}if(e.value!=null&&e.hasOwnProperty("value")){if(typeof e.value!=="number")return"value: number expected"}return null},s.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var r=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;if(e.quantile!=null)r.quantile=Number(e.quantile);if(e.value!=null)r.value=Number(e.value);return r},s.toObject=function(e,r){if(!r)r={};var a={};if(r.defaults)a.quantile=0,a.value=0;if(e.quantile!=null&&e.hasOwnProperty("quantile"))a.quantile=r.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile;if(e.value!=null&&e.hasOwnProperty("value"))a.value=r.json&&!isFinite(e.value)?String(e.value):e.value;return a},s.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},s.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},s}(),u}(),p.Exemplar=function(){function u(t){if(this.filteredAttributes=[],t){for(var e=Object.keys(t),r=0;r<e.length;++r)if(t[e[r]]!=null)this[e[r]]=t[e[r]]}}u.prototype.filteredAttributes=h.emptyArray,u.prototype.timeUnixNano=null,u.prototype.asDouble=null,u.prototype.asInt=null,u.prototype.spanId=null,u.prototype.traceId=null;var s;return Object.defineProperty(u.prototype,"value",{get:h.oneOfGetter(s=["asDouble","asInt"]),set:h.oneOfSetter(s)}),u.create=function(e){return new u(e)},u.encode=function(e,r){if(!r)r=N.create();if(e.timeUnixNano!=null&&Object.hasOwnProperty.call(e,"timeUnixNano"))r.uint32(17).fixed64(e.timeUnixNano);if(e.asDouble!=null&&Object.hasOwnProperty.call(e,"asDouble"))r.uint32(25).double(e.asDouble);if(e.spanId!=null&&Object.hasOwnProperty.call(e,"spanId"))r.uint32(34).bytes(e.spanId);if(e.traceId!=null&&Object.hasOwnProperty.call(e,"traceId"))r.uint32(42).bytes(e.traceId);if(e.asInt!=null&&Object.hasOwnProperty.call(e,"asInt"))r.uint32(49).sfixed64(e.asInt);if(e.filteredAttributes!=null&&e.filteredAttributes.length)for(var a=0;a<e.filteredAttributes.length;++a)d.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[a],r.uint32(58).fork()).ldelim();return r},u.encodeDelimited=function(e,r){return this.encode(e,r).ldelim()},u.decode=function(e,r,a){if(!(e instanceof _))e=_.create(e);var f=r===void 0?e.len:e.pos+r,y=new d.opentelemetry.proto.metrics.v1.Exemplar;while(e.pos<f){var g=e.uint32();if(g===a)break;switch(g>>>3){case 7:{if(!(y.filteredAttributes&&y.filteredAttributes.length))y.filteredAttributes=[];y.filteredAttributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break}case 2:{y.timeUnixNano=e.fixed64();break}case 3:{y.asDouble=e.double();break}case 6:{y.asInt=e.sfixed64();break}case 4:{y.spanId=e.bytes();break}case 5:{y.traceId=e.bytes();break}default:e.skipType(g&7);break}}return y},u.decodeDelimited=function(e){if(!(e instanceof _))e=new _(e);return this.decode(e,e.uint32())},u.verify=function(e){if(typeof e!=="object"||e===null)return"object expected";var r={};if(e.filteredAttributes!=null&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var a=0;a<e.filteredAttributes.length;++a){var f=d.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[a]);if(f)return"filteredAttributes."+f}}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano")){if(!h.isInteger(e.timeUnixNano)&&!(e.timeUnixNano&&h.isInteger(e.timeUnixNano.low)&&h.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(r.value=1,typeof e.asDouble!=="number")return"asDouble: number expected"}if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(r.value===1)return"value: multiple values";if(r.value=1,!h.isInteger(e.asInt)&&!(e.asInt&&h.isInteger(e.asInt.low)&&h.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(e.spanId!=null&&e.hasOwnProperty("spanId")){if(!(e.spanId&&typeof e.spanId.length==="number"||h.isString(e.spanId)))return"spanId: buffer expected"}if(e.traceId!=null&&e.hasOwnProperty("traceId")){if(!(e.traceId&&typeof e.traceId.length==="number"||h.isString(e.traceId)))return"traceId: buffer expected"}return null},u.fromObject=function(e){if(e instanceof d.opentelemetry.proto.metrics.v1.Exemplar)return e;var r=new d.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");r.filteredAttributes=[];for(var a=0;a<e.filteredAttributes.length;++a){if(typeof e.filteredAttributes[a]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");r.filteredAttributes[a]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[a])}}if(e.timeUnixNano!=null){if(h.Long)(r.timeUnixNano=h.Long.fromValue(e.timeUnixNano)).unsigned=!1;else if(typeof e.timeUnixNano==="string")r.timeUnixNano=parseInt(e.timeUnixNano,10);else if(typeof e.timeUnixNano==="number")r.timeUnixNano=e.timeUnixNano;else if(typeof e.timeUnixNano==="object")r.timeUnixNano=new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber()}if(e.asDouble!=null)r.asDouble=Number(e.asDouble);if(e.asInt!=null){if(h.Long)(r.asInt=h.Long.fromValue(e.asInt)).unsigned=!1;else if(typeof e.asInt==="string")r.asInt=parseInt(e.asInt,10);else if(typeof e.asInt==="number")r.asInt=e.asInt;else if(typeof e.asInt==="object")r.asInt=new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber()}if(e.spanId!=null){if(typeof e.spanId==="string")h.base64.decode(e.spanId,r.spanId=h.newBuffer(h.base64.length(e.spanId)),0);else if(e.spanId.length>=0)r.spanId=e.spanId}if(e.traceId!=null){if(typeof e.traceId==="string")h.base64.decode(e.traceId,r.traceId=h.newBuffer(h.base64.length(e.traceId)),0);else if(e.traceId.length>=0)r.traceId=e.traceId}return r},u.toObject=function(e,r){if(!r)r={};var a={};if(r.arrays||r.defaults)a.filteredAttributes=[];if(r.defaults){if(h.Long){var f=new h.Long(0,0,!1);a.timeUnixNano=r.longs===String?f.toString():r.longs===Number?f.toNumber():f}else a.timeUnixNano=r.longs===String?"0":0;if(r.bytes===String)a.spanId="";else if(a.spanId=[],r.bytes!==Array)a.spanId=h.newBuffer(a.spanId);if(r.bytes===String)a.traceId="";else if(a.traceId=[],r.bytes!==Array)a.traceId=h.newBuffer(a.traceId)}if(e.timeUnixNano!=null&&e.hasOwnProperty("timeUnixNano"))if(typeof e.timeUnixNano==="number")a.timeUnixNano=r.longs===String?String(e.timeUnixNano):e.timeUnixNano;else a.timeUnixNano=r.longs===String?h.Long.prototype.toString.call(e.timeUnixNano):r.longs===Number?new h.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano;if(e.asDouble!=null&&e.hasOwnProperty("asDouble")){if(a.asDouble=r.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,r.oneofs)a.value="asDouble"}if(e.spanId!=null&&e.hasOwnProperty("spanId"))a.spanId=r.bytes===String?h.base64.encode(e.spanId,0,e.spanId.length):r.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId;if(e.traceId!=null&&e.hasOwnProperty("traceId"))a.traceId=r.bytes===String?h.base64.encode(e.traceId,0,e.traceId.length):r.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId;if(e.asInt!=null&&e.hasOwnProperty("asInt")){if(typeof e.asInt==="number")a.asInt=r.longs===String?String(e.asInt):e.asInt;else a.asInt=r.longs===String?h.Long.prototype.toString.call(e.asInt):r.longs===Number?new h.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt;if(r.oneofs)a.value="asInt"}if(e.filteredAttributes&&e.filteredAttributes.length){a.filteredAttributes=[];for(var y=0;y<e.filteredAttributes.length;++y)a.filteredAttributes[y]=d.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[y],r)}return a},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(e){if(e===void 0)e="type.googleapis.com";return e+"/opentelemetry.proto.metrics.v1.Exemplar"},u}(),p}(),l}(),o.logs=function(){var l={};return l.v1=function(){var p={};return p.LogsData=function(){function u(s){if(this.resourceLogs=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resourceLogs=h.emptyArray,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resourceLogs!=null&&t.resourceLogs.length)for(var r=0;r<t.resourceLogs.length;++r)d.opentelemetry.proto.logs.v1.ResourceLogs.encode(t.resourceLogs[r],e.uint32(10).fork()).ldelim();return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.LogsData;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{if(!(f.resourceLogs&&f.resourceLogs.length))f.resourceLogs=[];f.resourceLogs.push(d.opentelemetry.proto.logs.v1.ResourceLogs.decode(t,t.uint32()));break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resourceLogs!=null&&t.hasOwnProperty("resourceLogs")){if(!Array.isArray(t.resourceLogs))return"resourceLogs: array expected";for(var e=0;e<t.resourceLogs.length;++e){var r=d.opentelemetry.proto.logs.v1.ResourceLogs.verify(t.resourceLogs[e]);if(r)return"resourceLogs."+r}}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.LogsData)return t;var e=new d.opentelemetry.proto.logs.v1.LogsData;if(t.resourceLogs){if(!Array.isArray(t.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");e.resourceLogs=[];for(var r=0;r<t.resourceLogs.length;++r){if(typeof t.resourceLogs[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");e.resourceLogs[r]=d.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(t.resourceLogs[r])}}return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.resourceLogs=[];if(t.resourceLogs&&t.resourceLogs.length){r.resourceLogs=[];for(var a=0;a<t.resourceLogs.length;++a)r.resourceLogs[a]=d.opentelemetry.proto.logs.v1.ResourceLogs.toObject(t.resourceLogs[a],e)}return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.LogsData"},u}(),p.ResourceLogs=function(){function u(s){if(this.scopeLogs=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.resource=null,u.prototype.scopeLogs=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.resource!=null&&Object.hasOwnProperty.call(t,"resource"))d.opentelemetry.proto.resource.v1.Resource.encode(t.resource,e.uint32(10).fork()).ldelim();if(t.scopeLogs!=null&&t.scopeLogs.length)for(var r=0;r<t.scopeLogs.length;++r)d.opentelemetry.proto.logs.v1.ScopeLogs.encode(t.scopeLogs[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.ResourceLogs;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.resource=d.opentelemetry.proto.resource.v1.Resource.decode(t,t.uint32());break}case 2:{if(!(f.scopeLogs&&f.scopeLogs.length))f.scopeLogs=[];f.scopeLogs.push(d.opentelemetry.proto.logs.v1.ScopeLogs.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.resource!=null&&t.hasOwnProperty("resource")){var e=d.opentelemetry.proto.resource.v1.Resource.verify(t.resource);if(e)return"resource."+e}if(t.scopeLogs!=null&&t.hasOwnProperty("scopeLogs")){if(!Array.isArray(t.scopeLogs))return"scopeLogs: array expected";for(var r=0;r<t.scopeLogs.length;++r){var e=d.opentelemetry.proto.logs.v1.ScopeLogs.verify(t.scopeLogs[r]);if(e)return"scopeLogs."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.ResourceLogs)return t;var e=new d.opentelemetry.proto.logs.v1.ResourceLogs;if(t.resource!=null){if(typeof t.resource!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");e.resource=d.opentelemetry.proto.resource.v1.Resource.fromObject(t.resource)}if(t.scopeLogs){if(!Array.isArray(t.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");e.scopeLogs=[];for(var r=0;r<t.scopeLogs.length;++r){if(typeof t.scopeLogs[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");e.scopeLogs[r]=d.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(t.scopeLogs[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.scopeLogs=[];if(e.defaults)r.resource=null,r.schemaUrl="";if(t.resource!=null&&t.hasOwnProperty("resource"))r.resource=d.opentelemetry.proto.resource.v1.Resource.toObject(t.resource,e);if(t.scopeLogs&&t.scopeLogs.length){r.scopeLogs=[];for(var a=0;a<t.scopeLogs.length;++a)r.scopeLogs[a]=d.opentelemetry.proto.logs.v1.ScopeLogs.toObject(t.scopeLogs[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.ResourceLogs"},u}(),p.ScopeLogs=function(){function u(s){if(this.logRecords=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.scope=null,u.prototype.logRecords=h.emptyArray,u.prototype.schemaUrl=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.scope!=null&&Object.hasOwnProperty.call(t,"scope"))d.opentelemetry.proto.common.v1.InstrumentationScope.encode(t.scope,e.uint32(10).fork()).ldelim();if(t.logRecords!=null&&t.logRecords.length)for(var r=0;r<t.logRecords.length;++r)d.opentelemetry.proto.logs.v1.LogRecord.encode(t.logRecords[r],e.uint32(18).fork()).ldelim();if(t.schemaUrl!=null&&Object.hasOwnProperty.call(t,"schemaUrl"))e.uint32(26).string(t.schemaUrl);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.ScopeLogs;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(t,t.uint32());break}case 2:{if(!(f.logRecords&&f.logRecords.length))f.logRecords=[];f.logRecords.push(d.opentelemetry.proto.logs.v1.LogRecord.decode(t,t.uint32()));break}case 3:{f.schemaUrl=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.scope!=null&&t.hasOwnProperty("scope")){var e=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(t.scope);if(e)return"scope."+e}if(t.logRecords!=null&&t.hasOwnProperty("logRecords")){if(!Array.isArray(t.logRecords))return"logRecords: array expected";for(var r=0;r<t.logRecords.length;++r){var e=d.opentelemetry.proto.logs.v1.LogRecord.verify(t.logRecords[r]);if(e)return"logRecords."+e}}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl")){if(!h.isString(t.schemaUrl))return"schemaUrl: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.ScopeLogs)return t;var e=new d.opentelemetry.proto.logs.v1.ScopeLogs;if(t.scope!=null){if(typeof t.scope!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");e.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(t.scope)}if(t.logRecords){if(!Array.isArray(t.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");e.logRecords=[];for(var r=0;r<t.logRecords.length;++r){if(typeof t.logRecords[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");e.logRecords[r]=d.opentelemetry.proto.logs.v1.LogRecord.fromObject(t.logRecords[r])}}if(t.schemaUrl!=null)e.schemaUrl=String(t.schemaUrl);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.logRecords=[];if(e.defaults)r.scope=null,r.schemaUrl="";if(t.scope!=null&&t.hasOwnProperty("scope"))r.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.toObject(t.scope,e);if(t.logRecords&&t.logRecords.length){r.logRecords=[];for(var a=0;a<t.logRecords.length;++a)r.logRecords[a]=d.opentelemetry.proto.logs.v1.LogRecord.toObject(t.logRecords[a],e)}if(t.schemaUrl!=null&&t.hasOwnProperty("schemaUrl"))r.schemaUrl=t.schemaUrl;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.ScopeLogs"},u}(),p.SeverityNumber=function(){var u={},s=Object.create(u);return s[u[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,s[u[1]="SEVERITY_NUMBER_TRACE"]=1,s[u[2]="SEVERITY_NUMBER_TRACE2"]=2,s[u[3]="SEVERITY_NUMBER_TRACE3"]=3,s[u[4]="SEVERITY_NUMBER_TRACE4"]=4,s[u[5]="SEVERITY_NUMBER_DEBUG"]=5,s[u[6]="SEVERITY_NUMBER_DEBUG2"]=6,s[u[7]="SEVERITY_NUMBER_DEBUG3"]=7,s[u[8]="SEVERITY_NUMBER_DEBUG4"]=8,s[u[9]="SEVERITY_NUMBER_INFO"]=9,s[u[10]="SEVERITY_NUMBER_INFO2"]=10,s[u[11]="SEVERITY_NUMBER_INFO3"]=11,s[u[12]="SEVERITY_NUMBER_INFO4"]=12,s[u[13]="SEVERITY_NUMBER_WARN"]=13,s[u[14]="SEVERITY_NUMBER_WARN2"]=14,s[u[15]="SEVERITY_NUMBER_WARN3"]=15,s[u[16]="SEVERITY_NUMBER_WARN4"]=16,s[u[17]="SEVERITY_NUMBER_ERROR"]=17,s[u[18]="SEVERITY_NUMBER_ERROR2"]=18,s[u[19]="SEVERITY_NUMBER_ERROR3"]=19,s[u[20]="SEVERITY_NUMBER_ERROR4"]=20,s[u[21]="SEVERITY_NUMBER_FATAL"]=21,s[u[22]="SEVERITY_NUMBER_FATAL2"]=22,s[u[23]="SEVERITY_NUMBER_FATAL3"]=23,s[u[24]="SEVERITY_NUMBER_FATAL4"]=24,s}(),p.LogRecordFlags=function(){var u={},s=Object.create(u);return s[u[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,s[u[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,s}(),p.LogRecord=function(){function u(s){if(this.attributes=[],s){for(var t=Object.keys(s),e=0;e<t.length;++e)if(s[t[e]]!=null)this[t[e]]=s[t[e]]}}return u.prototype.timeUnixNano=null,u.prototype.observedTimeUnixNano=null,u.prototype.severityNumber=null,u.prototype.severityText=null,u.prototype.body=null,u.prototype.attributes=h.emptyArray,u.prototype.droppedAttributesCount=null,u.prototype.flags=null,u.prototype.traceId=null,u.prototype.spanId=null,u.prototype.eventName=null,u.create=function(t){return new u(t)},u.encode=function(t,e){if(!e)e=N.create();if(t.timeUnixNano!=null&&Object.hasOwnProperty.call(t,"timeUnixNano"))e.uint32(9).fixed64(t.timeUnixNano);if(t.severityNumber!=null&&Object.hasOwnProperty.call(t,"severityNumber"))e.uint32(16).int32(t.severityNumber);if(t.severityText!=null&&Object.hasOwnProperty.call(t,"severityText"))e.uint32(26).string(t.severityText);if(t.body!=null&&Object.hasOwnProperty.call(t,"body"))d.opentelemetry.proto.common.v1.AnyValue.encode(t.body,e.uint32(42).fork()).ldelim();if(t.attributes!=null&&t.attributes.length)for(var r=0;r<t.attributes.length;++r)d.opentelemetry.proto.common.v1.KeyValue.encode(t.attributes[r],e.uint32(50).fork()).ldelim();if(t.droppedAttributesCount!=null&&Object.hasOwnProperty.call(t,"droppedAttributesCount"))e.uint32(56).uint32(t.droppedAttributesCount);if(t.flags!=null&&Object.hasOwnProperty.call(t,"flags"))e.uint32(69).fixed32(t.flags);if(t.traceId!=null&&Object.hasOwnProperty.call(t,"traceId"))e.uint32(74).bytes(t.traceId);if(t.spanId!=null&&Object.hasOwnProperty.call(t,"spanId"))e.uint32(82).bytes(t.spanId);if(t.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(t,"observedTimeUnixNano"))e.uint32(89).fixed64(t.observedTimeUnixNano);if(t.eventName!=null&&Object.hasOwnProperty.call(t,"eventName"))e.uint32(98).string(t.eventName);return e},u.encodeDelimited=function(t,e){return this.encode(t,e).ldelim()},u.decode=function(t,e,r){if(!(t instanceof _))t=_.create(t);var a=e===void 0?t.len:t.pos+e,f=new d.opentelemetry.proto.logs.v1.LogRecord;while(t.pos<a){var y=t.uint32();if(y===r)break;switch(y>>>3){case 1:{f.timeUnixNano=t.fixed64();break}case 11:{f.observedTimeUnixNano=t.fixed64();break}case 2:{f.severityNumber=t.int32();break}case 3:{f.severityText=t.string();break}case 5:{f.body=d.opentelemetry.proto.common.v1.AnyValue.decode(t,t.uint32());break}case 6:{if(!(f.attributes&&f.attributes.length))f.attributes=[];f.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(t,t.uint32()));break}case 7:{f.droppedAttributesCount=t.uint32();break}case 8:{f.flags=t.fixed32();break}case 9:{f.traceId=t.bytes();break}case 10:{f.spanId=t.bytes();break}case 12:{f.eventName=t.string();break}default:t.skipType(y&7);break}}return f},u.decodeDelimited=function(t){if(!(t instanceof _))t=new _(t);return this.decode(t,t.uint32())},u.verify=function(t){if(typeof t!=="object"||t===null)return"object expected";if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano")){if(!h.isInteger(t.timeUnixNano)&&!(t.timeUnixNano&&h.isInteger(t.timeUnixNano.low)&&h.isInteger(t.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano")){if(!h.isInteger(t.observedTimeUnixNano)&&!(t.observedTimeUnixNano&&h.isInteger(t.observedTimeUnixNano.low)&&h.isInteger(t.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected"}if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))switch(t.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(t.severityText!=null&&t.hasOwnProperty("severityText")){if(!h.isString(t.severityText))return"severityText: string expected"}if(t.body!=null&&t.hasOwnProperty("body")){var e=d.opentelemetry.proto.common.v1.AnyValue.verify(t.body);if(e)return"body."+e}if(t.attributes!=null&&t.hasOwnProperty("attributes")){if(!Array.isArray(t.attributes))return"attributes: array expected";for(var r=0;r<t.attributes.length;++r){var e=d.opentelemetry.proto.common.v1.KeyValue.verify(t.attributes[r]);if(e)return"attributes."+e}}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(t.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(t.flags!=null&&t.hasOwnProperty("flags")){if(!h.isInteger(t.flags))return"flags: integer expected"}if(t.traceId!=null&&t.hasOwnProperty("traceId")){if(!(t.traceId&&typeof t.traceId.length==="number"||h.isString(t.traceId)))return"traceId: buffer expected"}if(t.spanId!=null&&t.hasOwnProperty("spanId")){if(!(t.spanId&&typeof t.spanId.length==="number"||h.isString(t.spanId)))return"spanId: buffer expected"}if(t.eventName!=null&&t.hasOwnProperty("eventName")){if(!h.isString(t.eventName))return"eventName: string expected"}return null},u.fromObject=function(t){if(t instanceof d.opentelemetry.proto.logs.v1.LogRecord)return t;var e=new d.opentelemetry.proto.logs.v1.LogRecord;if(t.timeUnixNano!=null){if(h.Long)(e.timeUnixNano=h.Long.fromValue(t.timeUnixNano)).unsigned=!1;else if(typeof t.timeUnixNano==="string")e.timeUnixNano=parseInt(t.timeUnixNano,10);else if(typeof t.timeUnixNano==="number")e.timeUnixNano=t.timeUnixNano;else if(typeof t.timeUnixNano==="object")e.timeUnixNano=new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber()}if(t.observedTimeUnixNano!=null){if(h.Long)(e.observedTimeUnixNano=h.Long.fromValue(t.observedTimeUnixNano)).unsigned=!1;else if(typeof t.observedTimeUnixNano==="string")e.observedTimeUnixNano=parseInt(t.observedTimeUnixNano,10);else if(typeof t.observedTimeUnixNano==="number")e.observedTimeUnixNano=t.observedTimeUnixNano;else if(typeof t.observedTimeUnixNano==="object")e.observedTimeUnixNano=new h.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber()}switch(t.severityNumber){default:if(typeof t.severityNumber==="number"){e.severityNumber=t.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:e.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:e.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:e.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:e.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:e.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:e.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:e.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:e.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:e.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:e.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:e.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:e.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:e.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:e.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:e.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:e.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:e.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:e.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:e.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:e.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:e.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:e.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:e.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:e.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:e.severityNumber=24;break}if(t.severityText!=null)e.severityText=String(t.severityText);if(t.body!=null){if(typeof t.body!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");e.body=d.opentelemetry.proto.common.v1.AnyValue.fromObject(t.body)}if(t.attributes){if(!Array.isArray(t.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");e.attributes=[];for(var r=0;r<t.attributes.length;++r){if(typeof t.attributes[r]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");e.attributes[r]=d.opentelemetry.proto.common.v1.KeyValue.fromObject(t.attributes[r])}}if(t.droppedAttributesCount!=null)e.droppedAttributesCount=t.droppedAttributesCount>>>0;if(t.flags!=null)e.flags=t.flags>>>0;if(t.traceId!=null){if(typeof t.traceId==="string")h.base64.decode(t.traceId,e.traceId=h.newBuffer(h.base64.length(t.traceId)),0);else if(t.traceId.length>=0)e.traceId=t.traceId}if(t.spanId!=null){if(typeof t.spanId==="string")h.base64.decode(t.spanId,e.spanId=h.newBuffer(h.base64.length(t.spanId)),0);else if(t.spanId.length>=0)e.spanId=t.spanId}if(t.eventName!=null)e.eventName=String(t.eventName);return e},u.toObject=function(t,e){if(!e)e={};var r={};if(e.arrays||e.defaults)r.attributes=[];if(e.defaults){if(h.Long){var a=new h.Long(0,0,!1);r.timeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.timeUnixNano=e.longs===String?"0":0;if(r.severityNumber=e.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,r.severityText="",r.body=null,r.droppedAttributesCount=0,r.flags=0,e.bytes===String)r.traceId="";else if(r.traceId=[],e.bytes!==Array)r.traceId=h.newBuffer(r.traceId);if(e.bytes===String)r.spanId="";else if(r.spanId=[],e.bytes!==Array)r.spanId=h.newBuffer(r.spanId);if(h.Long){var a=new h.Long(0,0,!1);r.observedTimeUnixNano=e.longs===String?a.toString():e.longs===Number?a.toNumber():a}else r.observedTimeUnixNano=e.longs===String?"0":0;r.eventName=""}if(t.timeUnixNano!=null&&t.hasOwnProperty("timeUnixNano"))if(typeof t.timeUnixNano==="number")r.timeUnixNano=e.longs===String?String(t.timeUnixNano):t.timeUnixNano;else r.timeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.timeUnixNano):e.longs===Number?new h.LongBits(t.timeUnixNano.low>>>0,t.timeUnixNano.high>>>0).toNumber():t.timeUnixNano;if(t.severityNumber!=null&&t.hasOwnProperty("severityNumber"))r.severityNumber=e.enums===String?d.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]===void 0?t.severityNumber:d.opentelemetry.proto.logs.v1.SeverityNumber[t.severityNumber]:t.severityNumber;if(t.severityText!=null&&t.hasOwnProperty("severityText"))r.severityText=t.severityText;if(t.body!=null&&t.hasOwnProperty("body"))r.body=d.opentelemetry.proto.common.v1.AnyValue.toObject(t.body,e);if(t.attributes&&t.attributes.length){r.attributes=[];for(var f=0;f<t.attributes.length;++f)r.attributes[f]=d.opentelemetry.proto.common.v1.KeyValue.toObject(t.attributes[f],e)}if(t.droppedAttributesCount!=null&&t.hasOwnProperty("droppedAttributesCount"))r.droppedAttributesCount=t.droppedAttributesCount;if(t.flags!=null&&t.hasOwnProperty("flags"))r.flags=t.flags;if(t.traceId!=null&&t.hasOwnProperty("traceId"))r.traceId=e.bytes===String?h.base64.encode(t.traceId,0,t.traceId.length):e.bytes===Array?Array.prototype.slice.call(t.traceId):t.traceId;if(t.spanId!=null&&t.hasOwnProperty("spanId"))r.spanId=e.bytes===String?h.base64.encode(t.spanId,0,t.spanId.length):e.bytes===Array?Array.prototype.slice.call(t.spanId):t.spanId;if(t.observedTimeUnixNano!=null&&t.hasOwnProperty("observedTimeUnixNano"))if(typeof t.observedTimeUnixNano==="number")r.observedTimeUnixNano=e.longs===String?String(t.observedTimeUnixNano):t.observedTimeUnixNano;else r.observedTimeUnixNano=e.longs===String?h.Long.prototype.toString.call(t.observedTimeUnixNano):e.longs===Number?new h.LongBits(t.observedTimeUnixNano.low>>>0,t.observedTimeUnixNano.high>>>0).toNumber():t.observedTimeUnixNano;if(t.eventName!=null&&t.hasOwnProperty("eventName"))r.eventName=t.eventName;return r},u.prototype.toJSON=function(){return this.constructor.toObject(this,E.util.toJSONOptions)},u.getTypeUrl=function(t){if(t===void 0)t="type.googleapis.com";return t+"/opentelemetry.proto.logs.v1.LogRecord"},u}(),p}(),l}(),o}(),n}();Ba.exports=d});var Kt=i(function(Ga){Object.defineProperty(Ga,"__esModule",{value:!0});Ga.toAnyValue=Ga.toKeyValue=Ga.toAttributes=Ga.createInstrumentationScope=Ga.createResource=void 0;function N_(n,o){let l={attributes:qa(n.attributes,o),droppedAttributesCount:0},p=n.schemaUrl;if(p&&p!=="")l.schemaUrl=p;return l}Ga.createResource=N_;function P_(n){return{name:n.name,version:n.version}}Ga.createInstrumentationScope=P_;function qa(n,o){return Object.keys(n).map((l)=>ja(l,n[l],o))}Ga.toAttributes=qa;function ja(n,o,l){return{key:n,value:Ft(o,l)}}Ga.toKeyValue=ja;function Ft(n,o){let l=typeof n;if(l==="string")return{stringValue:n};if(l==="number"){if(!Number.isInteger(n))return{doubleValue:n};return{intValue:n}}if(l==="boolean")return{boolValue:n};if(n instanceof Uint8Array)return{bytesValue:o.encodeUint8Array(n)};if(Array.isArray(n)){let p=Array(n.length);for(let u=0;u<n.length;u++)p[u]=Ft(n[u],o);return{arrayValue:{values:p}}}if(l==="object"&&n!=null){let p=Object.keys(n),u=Array(p.length);for(let s=0;s<p.length;s++)u[s]={key:p[s],value:Ft(n[p[s]],o)};return{kvlistValue:{values:u}}}return{}}Ga.toAnyValue=Ft});var $r=i(function(Ka){Object.defineProperty(Ka,"__esModule",{value:!0});Ka.toLogAttributes=Ka.createExportLogsServiceRequest=void 0;var zt=Kt();function U_(n,o){return{resourceLogs:C_(n,o)}}Ka.createExportLogsServiceRequest=U_;function L_(n){let o=new Map;for(let l of n){let{resource:p,instrumentationScope:{name:u,version:s="",schemaUrl:t=""}}=l,e=o.get(p);if(!e)e=new Map,o.set(p,e);let r=`${u}@${s}:${t}`,a=e.get(r);if(!a)a=[],e.set(r,a);a.push(l)}return o}function C_(n,o){let l=L_(n);return Array.from(l,([p,u])=>{let s=zt.createResource(p,o);return{resource:s,scopeLogs:Array.from(u,([,t])=>({scope:zt.createInstrumentationScope(t[0].instrumentationScope),logRecords:t.map((e)=>D_(e,o)),schemaUrl:t[0].instrumentationScope.schemaUrl})),schemaUrl:s.schemaUrl}})}function D_(n,o){return{timeUnixNano:o.encodeHrTime(n.hrTime),observedTimeUnixNano:o.encodeHrTime(n.hrTimeObserved),severityNumber:k_(n.severityNumber),severityText:n.severityText,body:zt.toAnyValue(n.body,o),eventName:n.eventName,attributes:Fa(n.attributes,o),droppedAttributesCount:n.droppedAttributesCount,flags:n.spanContext?.traceFlags,traceId:o.encodeOptionalSpanContext(n.spanContext?.traceId),spanId:o.encodeOptionalSpanContext(n.spanContext?.spanId)}}function k_(n){return n}function Fa(n,o){return Object.keys(n).map((l)=>zt.toKeyValue(l,n[l],o))}Ka.toLogAttributes=Fa});var Ya=i(function($a){Object.defineProperty($a,"__esModule",{value:!0});$a.hexToBinary=void 0;function Ja(n){if(n>=48&&n<=57)return n-48;if(n>=97&&n<=102)return n-87;return n-55}function B_(n){let o=new Uint8Array(n.length/2),l=0;for(let p=0;p<n.length;p+=2){let u=Ja(n.charCodeAt(p)),s=Ja(n.charCodeAt(p+1));o[l++]=u<<4|s}return o}$a.hexToBinary=B_});var Ae=i(function(tc){Object.defineProperty(tc,"__esModule",{value:!0});tc.JSON_ENCODER=tc.PROTOBUF_ENCODER=tc.encodeAsString=tc.encodeAsLongBits=tc.toLongBits=tc.hrTimeToNanos=void 0;var q_=kt(),Xa=Ya();function Yr(n){let o=BigInt(1e9);return BigInt(Math.trunc(n[0]))*o+BigInt(Math.trunc(n[1]))}tc.hrTimeToNanos=Yr;function Za(n){let o=Number(BigInt.asUintN(32,n)),l=Number(BigInt.asUintN(32,n>>BigInt(32)));return{low:o,high:l}}tc.toLongBits=Za;function Qa(n){let o=Yr(n);return Za(o)}tc.encodeAsLongBits=Qa;function ec(n){return Yr(n).toString()}tc.encodeAsString=ec;var j_=typeof BigInt<"u"?ec:q_.hrTimeToNanoseconds;function Wr(n){return n}function G_(n){if(n===void 0)return;return Xa.hexToBinary(n)}tc.PROTOBUF_ENCODER={encodeHrTime:Qa,encodeSpanContext:Xa.hexToBinary,encodeOptionalSpanContext:G_,encodeUint8Array:Wr};tc.JSON_ENCODER={encodeHrTime:j_,encodeSpanContext:Wr,encodeOptionalSpanContext:Wr,encodeUint8Array:(n)=>{if(typeof Buffer<"u")return Buffer.from(n).toString("base64");let o=Array(n.length);for(let l=0;l<n.length;l++)o[l]=String.fromCharCode(n[l]);return btoa(o.join(""))}}});var uc=i(function(oc){Object.defineProperty(oc,"__esModule",{value:!0});oc.ProtobufLogsSerializer=void 0;var nc=Ht(),$_=$r(),W_=Ae(),Y_=nc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,X_=nc.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;oc.ProtobufLogsSerializer={serializeRequest:(n)=>{let o=$_.createExportLogsServiceRequest(n,W_.PROTOBUF_ENCODER);return X_.encode(o).finish()},deserializeResponse:(n)=>Y_.decode(n)}});var ac=i(function(Xr){Object.defineProperty(Xr,"__esModule",{value:!0});Xr.ProtobufLogsSerializer=void 0;var Z_=uc();Object.defineProperty(Xr,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return Z_.ProtobufLogsSerializer}})});var Jt=i(function(cc){Object.defineProperty(cc,"__esModule",{value:!0});cc.AggregationTemporality=void 0;var eg;(function(n){n[n.DELTA=0]="DELTA",n[n.CUMULATIVE=1]="CUMULATIVE"})(eg=cc.AggregationTemporality||(cc.AggregationTemporality={}))});var me=i(function(lc){Object.defineProperty(lc,"__esModule",{value:!0});lc.DataPointType=lc.InstrumentType=void 0;var tg;(function(n){n.COUNTER="COUNTER",n.GAUGE="GAUGE",n.HISTOGRAM="HISTOGRAM",n.UP_DOWN_COUNTER="UP_DOWN_COUNTER",n.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",n.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",n.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(tg=lc.InstrumentType||(lc.InstrumentType={}));var rg;(function(n){n[n.HISTOGRAM=0]="HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",n[n.GAUGE=2]="GAUGE",n[n.SUM=3]="SUM"})(rg=lc.DataPointType||(lc.DataPointType={}))});var ne=i(function(pc){Object.defineProperty(pc,"__esModule",{value:!0});pc.equalsCaseInsensitive=pc.binarySearchUB=pc.setEquals=pc.callWithTimeout=pc.TimeoutError=pc.instrumentationScopeId=pc.hashAttributes=void 0;function ng(n){let o=Object.keys(n);if(o.length===0)return"";return o=o.sort(),JSON.stringify(o.map((l)=>[l,n[l]]))}pc.hashAttributes=ng;function og(n){return`${n.name}:${n.version??""}:${n.schemaUrl??""}`}pc.instrumentationScopeId=og;class $t extends Error{constructor(n){super(n);Object.setPrototypeOf(this,$t.prototype)}}pc.TimeoutError=$t;function ig(n,o){let l,p=new Promise(function(s,t){l=setTimeout(function(){t(new $t("Operation timed out."))},o)});return Promise.race([n,p]).then((u)=>(clearTimeout(l),u),(u)=>{throw clearTimeout(l),u})}pc.callWithTimeout=ig;function ug(n,o){if(n.size!==o.size)return!1;for(let l of n)if(!o.has(l))return!1;return!0}pc.setEquals=ug;function ag(n,o){let l=0,p=n.length-1,u=n.length;while(p>=l){let s=l+Math.trunc((p-l)/2);if(n[s]<o)l=s+1;else u=s,p=s-1}return u}pc.binarySearchUB=ag;function cg(n,o){return n.toLowerCase()===o.toLowerCase()}pc.equalsCaseInsensitive=cg});var Be=i(function(dc){Object.defineProperty(dc,"__esModule",{value:!0});dc.AggregatorKind=void 0;var yg;(function(n){n[n.DROP=0]="DROP",n[n.SUM=1]="SUM",n[n.LAST_VALUE=2]="LAST_VALUE",n[n.HISTOGRAM=3]="HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(yg=dc.AggregatorKind||(dc.AggregatorKind={}))});var _c=i(function(yc){Object.defineProperty(yc,"__esModule",{value:!0});yc.DropAggregator=void 0;var mg=Be();class hc{kind=mg.AggregatorKind.DROP;createAccumulation(){return}merge(n,o){return}diff(n,o){return}toMetricData(n,o,l,p){return}}yc.DropAggregator=hc});var Oc=i(function(vc){Object.defineProperty(vc,"__esModule",{value:!0});vc.HistogramAggregator=vc.HistogramAccumulation=void 0;var _g=Be(),it=me(),gg=ne();function vg(n){let o=n.map(()=>0);return o.push(0),{buckets:{boundaries:n,counts:o},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}class ut{startTime;_boundaries;_recordMinMax;_current;constructor(n,o,l=!0,p=vg(o)){this.startTime=n,this._boundaries=o,this._recordMinMax=l,this._current=p}record(n){if(Number.isNaN(n))return;if(this._current.count+=1,this._current.sum+=n,this._recordMinMax)this._current.min=Math.min(n,this._current.min),this._current.max=Math.max(n,this._current.max),this._current.hasMinMax=!0;let o=gg.binarySearchUB(this._boundaries,n);this._current.buckets.counts[o]+=1}setStartTime(n){this.startTime=n}toPointValue(){return this._current}}vc.HistogramAccumulation=ut;class gc{kind=_g.AggregatorKind.HISTOGRAM;_boundaries;_recordMinMax;constructor(n,o){this._boundaries=n,this._recordMinMax=o}createAccumulation(n){return new ut(n,this._boundaries,this._recordMinMax)}merge(n,o){let l=n.toPointValue(),p=o.toPointValue(),u=l.buckets.counts,s=p.buckets.counts,t=Array(u.length);for(let a=0;a<u.length;a++)t[a]=u[a]+s[a];let e=1/0,r=-1/0;if(this._recordMinMax){if(l.hasMinMax&&p.hasMinMax)e=Math.min(l.min,p.min),r=Math.max(l.max,p.max);else if(l.hasMinMax)e=l.min,r=l.max;else if(p.hasMinMax)e=p.min,r=p.max}return new ut(n.startTime,l.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:l.buckets.boundaries,counts:t},count:l.count+p.count,sum:l.sum+p.sum,hasMinMax:this._recordMinMax&&(l.hasMinMax||p.hasMinMax),min:e,max:r})}diff(n,o){let l=n.toPointValue(),p=o.toPointValue(),u=l.buckets.counts,s=p.buckets.counts,t=Array(u.length);for(let e=0;e<u.length;e++)t[e]=s[e]-u[e];return new ut(o.startTime,l.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:l.buckets.boundaries,counts:t},count:p.count-l.count,sum:p.sum-l.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:it.DataPointType.HISTOGRAM,dataPoints:l.map(([u,s])=>{let t=s.toPointValue(),e=n.type===it.InstrumentType.GAUGE||n.type===it.InstrumentType.UP_DOWN_COUNTER||n.type===it.InstrumentType.OBSERVABLE_GAUGE||n.type===it.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:s.startTime,endTime:p,value:{min:t.hasMinMax?t.min:void 0,max:t.hasMinMax?t.max:void 0,sum:!e?t.sum:void 0,buckets:t.buckets,count:t.count}}})}}}vc.HistogramAggregator=gc});var xc=i(function(Sc){Object.defineProperty(Sc,"__esModule",{value:!0});Sc.Buckets=void 0;class tn{backing;indexBase;indexStart;indexEnd;constructor(n=new rn,o=0,l=0,p=0){this.backing=n,this.indexBase=o,this.indexStart=l,this.indexEnd=p}get offset(){return this.indexStart}get length(){if(this.backing.length===0)return 0;if(this.indexEnd===this.indexStart&&this.at(0)===0)return 0;return this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(n,o)=>this.at(o))}at(n){let o=this.indexBase-this.indexStart;if(n<o)n+=this.backing.length;return n-=o,this.backing.countAt(n)}incrementBucket(n,o){this.backing.increment(n,o)}decrementBucket(n,o){this.backing.decrement(n,o)}trim(){for(let n=0;n<this.length;n++)if(this.at(n)!==0){this.indexStart+=n;break}else if(n===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let n=this.length-1;n>=0;n--)if(this.at(n)!==0){this.indexEnd-=this.length-n-1;break}this._rotate()}downscale(n){this._rotate();let o=1+this.indexEnd-this.indexStart,l=1<<n,p=0,u=0;for(let s=this.indexStart;s<=this.indexEnd;){let t=s%l;if(t<0)t+=l;for(let e=t;e<l&&p<o;e++)this._relocateBucket(u,p),p++,s++;u++}this.indexStart>>=n,this.indexEnd>>=n,this.indexBase=this.indexStart}clone(){return new tn(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let n=this.indexBase-this.indexStart;if(n===0)return;else if(n>0)this.backing.reverse(0,this.backing.length),this.backing.reverse(0,n),this.backing.reverse(n,this.backing.length);else this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+n);this.indexBase=this.indexStart}_relocateBucket(n,o){if(n===o)return;this.incrementBucket(n,this.backing.emptyBucket(o))}}Sc.Buckets=tn;class rn{_counts;constructor(n=[0]){this._counts=n}get length(){return this._counts.length}countAt(n){return this._counts[n]}growTo(n,o,l){let p=Array(n).fill(0);p.splice(l,this._counts.length-o,...this._counts.slice(o)),p.splice(0,o,...this._counts.slice(0,o)),this._counts=p}reverse(n,o){let l=Math.floor((n+o)/2)-n;for(let p=0;p<l;p++){let u=this._counts[n+p];this._counts[n+p]=this._counts[o-p-1],this._counts[o-p-1]=u}}emptyBucket(n){let o=this._counts[n];return this._counts[n]=0,o}increment(n,o){this._counts[n]+=o}decrement(n,o){if(this._counts[n]>=o)this._counts[n]-=o;else this._counts[n]=0}clone(){return new rn([...this._counts])}}});var on=i(function(Ec){Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getSignificand=Ec.getNormalBase2=Ec.MIN_VALUE=Ec.MAX_NORMAL_EXPONENT=Ec.MIN_NORMAL_EXPONENT=Ec.SIGNIFICAND_WIDTH=void 0;Ec.SIGNIFICAND_WIDTH=52;var Og=2146435072,Sg=1048575,nn=1023;Ec.MIN_NORMAL_EXPONENT=-nn+1;Ec.MAX_NORMAL_EXPONENT=nn;Ec.MIN_VALUE=Math.pow(2,-1022);function Tg(n){let o=new DataView(new ArrayBuffer(8));return o.setFloat64(0,n),((o.getUint32(0)&Og)>>20)-nn}Ec.getNormalBase2=Tg;function xg(n){let o=new DataView(new ArrayBuffer(8));o.setFloat64(0,n);let l=o.getUint32(0),p=o.getUint32(4);return(l&Sg)*Math.pow(2,32)+p}Ec.getSignificand=xg});var Yt=i(function(Nc){Object.defineProperty(Nc,"__esModule",{value:!0});Nc.nextGreaterSquare=Nc.ldexp=void 0;function Ig(n,o){if(n===0||n===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY||Number.isNaN(n))return n;return n*Math.pow(2,o)}Nc.ldexp=Ig;function Rg(n){return n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,n++,n}Nc.nextGreaterSquare=Rg});var Xt=i(function(Ic){Object.defineProperty(Ic,"__esModule",{value:!0});Ic.MappingError=void 0;class wc extends Error{}Ic.MappingError=wc});var Dc=i(function(Lc){Object.defineProperty(Lc,"__esModule",{value:!0});Lc.ExponentMapping=void 0;var qe=on(),Ug=Yt(),Mc=Xt();class Uc{_shift;constructor(n){this._shift=-n}mapToIndex(n){if(n<qe.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let o=qe.getNormalBase2(n),l=this._rightShift(qe.getSignificand(n)-1,qe.SIGNIFICAND_WIDTH);return o+l>>this._shift}lowerBoundary(n){let o=this._minNormalLowerBoundaryIndex();if(n<o)throw new Mc.MappingError(`underflow: ${n} is < minimum lower boundary: ${o}`);let l=this._maxNormalLowerBoundaryIndex();if(n>l)throw new Mc.MappingError(`overflow: ${n} is > maximum lower boundary: ${l}`);return Ug.ldexp(1,n<<this._shift)}get scale(){if(this._shift===0)return 0;return-this._shift}_minNormalLowerBoundaryIndex(){let n=qe.MIN_NORMAL_EXPONENT>>this._shift;if(this._shift<2)n--;return n}_maxNormalLowerBoundaryIndex(){return qe.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(n,o){return Math.floor(n*Math.pow(2,-o))}}Lc.ExponentMapping=Uc});var Gc=i(function(qc){Object.defineProperty(qc,"__esModule",{value:!0});qc.LogarithmMapping=void 0;var je=on(),kc=Yt(),Vc=Xt();class Bc{_scale;_scaleFactor;_inverseFactor;constructor(n){this._scale=n,this._scaleFactor=kc.ldexp(Math.LOG2E,n),this._inverseFactor=kc.ldexp(Math.LN2,-n)}mapToIndex(n){if(n<=je.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(je.getSignificand(n)===0)return(je.getNormalBase2(n)<<this._scale)-1;let o=Math.floor(Math.log(n)*this._scaleFactor),l=this._maxNormalLowerBoundaryIndex();if(o>=l)return l;return o}lowerBoundary(n){let o=this._maxNormalLowerBoundaryIndex();if(n>=o){if(n===o)return 2*Math.exp((n-(1<<this._scale))/this._scaleFactor);throw new Vc.MappingError(`overflow: ${n} is > maximum lower boundary: ${o}`)}let l=this._minNormalLowerBoundaryIndex();if(n<=l){if(n===l)return je.MIN_VALUE;else if(n===l-1)return Math.exp((n+(1<<this._scale))/this._scaleFactor)/2;throw new Vc.MappingError(`overflow: ${n} is < minimum lower boundary: ${l}`)}return Math.exp(n*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return je.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(je.MAX_NORMAL_EXPONENT+1<<this._scale)-1}}qc.LogarithmMapping=Bc});var Jc=i(function(Kc){Object.defineProperty(Kc,"__esModule",{value:!0});Kc.getMapping=void 0;var Lg=Dc(),Cg=Gc(),Dg=Xt(),Hc=-10,Fc=20,kg=Array.from({length:31},(n,o)=>{if(o>10)return new Cg.LogarithmMapping(o-10);return new Lg.ExponentMapping(o-10)});function Vg(n){if(n>Fc||n<Hc)throw new Dg.MappingError(`expected scale >= ${Hc} && <= ${Fc}, got: ${n}`);return kg[n+10]}Kc.getMapping=Vg});var Qc=i(function(Xc){Object.defineProperty(Xc,"__esModule",{value:!0});Xc.ExponentialHistogramAggregator=Xc.ExponentialHistogramAccumulation=void 0;var Bg=Be(),at=me(),qg=O(),$c=xc(),Wc=Jc(),jg=Yt();class Ge{static combine(n,o){return new Ge(Math.min(n.low,o.low),Math.max(n.high,o.high))}low;high;constructor(n,o){this.low=n,this.high=o}}var Gg=20,Hg=160,un=2;class Zt{startTime;_maxSize;_recordMinMax;_sum;_count;_zeroCount;_min;_max;_positive;_negative;_mapping;constructor(n,o=Hg,l=!0,p=0,u=0,s=0,t=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,r=new $c.Buckets,a=new $c.Buckets,f=Wc.getMapping(Gg)){if(this.startTime=n,this._maxSize=o,this._recordMinMax=l,this._sum=p,this._count=u,this._zeroCount=s,this._min=t,this._max=e,this._positive=r,this._negative=a,this._mapping=f,this._maxSize<un)qg.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${un}`),this._maxSize=un}record(n){this.updateByIncrement(n,1)}setStartTime(n){this.startTime=n}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){if(this._count===this._zeroCount)return 0;return this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(n,o){if(Number.isNaN(n))return;if(n>this._max)this._max=n;if(n<this._min)this._min=n;if(this._count+=o,n===0){this._zeroCount+=o;return}if(this._sum+=n*o,n>0)this._updateBuckets(this._positive,n,o);else this._updateBuckets(this._negative,-n,o)}merge(n){if(this._count===0)this._min=n.min,this._max=n.max;else if(n.count!==0){if(n.min<this.min)this._min=n.min;if(n.max>this.max)this._max=n.max}this.startTime=n.startTime,this._sum+=n.sum,this._count+=n.count,this._zeroCount+=n.zeroCount;let o=this._minScale(n);this._downscale(this.scale-o),this._mergeBuckets(this.positive,n,n.positive,o),this._mergeBuckets(this.negative,n,n.negative,o)}diff(n){this._min=1/0,this._max=-1/0,this._sum-=n.sum,this._count-=n.count,this._zeroCount-=n.zeroCount;let o=this._minScale(n);this._downscale(this.scale-o),this._diffBuckets(this.positive,n,n.positive,o),this._diffBuckets(this.negative,n,n.negative,o)}clone(){return new Zt(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(n,o,l){let p=this._mapping.mapToIndex(o),u=!1,s=0,t=0;if(n.length===0)n.indexStart=p,n.indexEnd=n.indexStart,n.indexBase=n.indexStart;else if(p<n.indexStart&&n.indexEnd-p>=this._maxSize)u=!0,t=p,s=n.indexEnd;else if(p>n.indexEnd&&p-n.indexStart>=this._maxSize)u=!0,t=n.indexStart,s=p;if(u){let e=this._changeScale(s,t);this._downscale(e),p=this._mapping.mapToIndex(o)}this._incrementIndexBy(n,p,l)}_incrementIndexBy(n,o,l){if(l===0)return;if(n.length===0)n.indexStart=n.indexEnd=n.indexBase=o;if(o<n.indexStart){let u=n.indexEnd-o;if(u>=n.backing.length)this._grow(n,u+1);n.indexStart=o}else if(o>n.indexEnd){let u=o-n.indexStart;if(u>=n.backing.length)this._grow(n,u+1);n.indexEnd=o}let p=o-n.indexBase;if(p<0)p+=n.backing.length;n.incrementBucket(p,l)}_grow(n,o){let l=n.backing.length,p=n.indexBase-n.indexStart,u=l-p,s=jg.nextGreaterSquare(o);if(s>this._maxSize)s=this._maxSize;let t=s-p;n.backing.growTo(s,u,t)}_changeScale(n,o){let l=0;while(n-o>=this._maxSize)n>>=1,o>>=1,l++;return l}_downscale(n){if(n===0)return;if(n<0)throw Error(`impossible change of scale: ${this.scale}`);let o=this._mapping.scale-n;this._positive.downscale(n),this._negative.downscale(n),this._mapping=Wc.getMapping(o)}_minScale(n){let o=Math.min(this.scale,n.scale),l=Ge.combine(this._highLowAtScale(this.positive,this.scale,o),this._highLowAtScale(n.positive,n.scale,o)),p=Ge.combine(this._highLowAtScale(this.negative,this.scale,o),this._highLowAtScale(n.negative,n.scale,o));return Math.min(o-this._changeScale(l.high,l.low),o-this._changeScale(p.high,p.low))}_highLowAtScale(n,o,l){if(n.length===0)return new Ge(0,-1);let p=o-l;return new Ge(n.indexStart>>p,n.indexEnd>>p)}_mergeBuckets(n,o,l,p){let u=l.offset,s=o.scale-p;for(let t=0;t<l.length;t++)this._incrementIndexBy(n,u+t>>s,l.at(t))}_diffBuckets(n,o,l,p){let u=l.offset,s=o.scale-p;for(let t=0;t<l.length;t++){let r=(u+t>>s)-n.indexBase;if(r<0)r+=n.backing.length;n.decrementBucket(r,l.at(t))}n.trim()}}Xc.ExponentialHistogramAccumulation=Zt;class Yc{kind=Bg.AggregatorKind.EXPONENTIAL_HISTOGRAM;_maxSize;_recordMinMax;constructor(n,o){this._maxSize=n,this._recordMinMax=o}createAccumulation(n){return new Zt(n,this._maxSize,this._recordMinMax)}merge(n,o){let l=o.clone();return l.merge(n),l}diff(n,o){let l=o.clone();return l.diff(n),l}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:at.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:l.map(([u,s])=>{let t=s.toPointValue(),e=n.type===at.InstrumentType.GAUGE||n.type===at.InstrumentType.UP_DOWN_COUNTER||n.type===at.InstrumentType.OBSERVABLE_GAUGE||n.type===at.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:s.startTime,endTime:p,value:{min:t.hasMinMax?t.min:void 0,max:t.hasMinMax?t.max:void 0,sum:!e?t.sum:void 0,positive:{offset:t.positive.offset,bucketCounts:t.positive.bucketCounts},negative:{offset:t.negative.offset,bucketCounts:t.negative.bucketCounts},count:t.count,scale:t.scale,zeroCount:t.zeroCount}}})}}}Xc.ExponentialHistogramAggregator=Yc});var ns=i(function(ts){Object.defineProperty(ts,"__esModule",{value:!0});ts.LastValueAggregator=ts.LastValueAccumulation=void 0;var Kg=Be(),ct=kt(),zg=me();class st{startTime;_current;sampleTime;constructor(n,o=0,l=[0,0]){this.startTime=n,this._current=o,this.sampleTime=l}record(n){this._current=n,this.sampleTime=ct.millisToHrTime(Date.now())}setStartTime(n){this.startTime=n}toPointValue(){return this._current}}ts.LastValueAccumulation=st;class es{kind=Kg.AggregatorKind.LAST_VALUE;createAccumulation(n){return new st(n)}merge(n,o){let l=ct.hrTimeToMicroseconds(o.sampleTime)>=ct.hrTimeToMicroseconds(n.sampleTime)?o:n;return new st(n.startTime,l.toPointValue(),l.sampleTime)}diff(n,o){let l=ct.hrTimeToMicroseconds(o.sampleTime)>=ct.hrTimeToMicroseconds(n.sampleTime)?o:n;return new st(o.startTime,l.toPointValue(),l.sampleTime)}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:zg.DataPointType.GAUGE,dataPoints:l.map(([u,s])=>({attributes:u,startTime:s.startTime,endTime:p,value:s.toPointValue()}))}}}ts.LastValueAggregator=es});var as=i(function(is){Object.defineProperty(is,"__esModule",{value:!0});is.SumAggregator=is.SumAccumulation=void 0;var $g=Be(),Wg=me();class Ne{startTime;monotonic;_current;reset;constructor(n,o,l=0,p=!1){this.startTime=n,this.monotonic=o,this._current=l,this.reset=p}record(n){if(this.monotonic&&n<0)return;this._current+=n}setStartTime(n){this.startTime=n}toPointValue(){return this._current}}is.SumAccumulation=Ne;class os{kind=$g.AggregatorKind.SUM;monotonic;constructor(n){this.monotonic=n}createAccumulation(n){return new Ne(n,this.monotonic)}merge(n,o){let l=n.toPointValue(),p=o.toPointValue();if(o.reset)return new Ne(o.startTime,this.monotonic,p,o.reset);return new Ne(n.startTime,this.monotonic,l+p)}diff(n,o){let l=n.toPointValue(),p=o.toPointValue();if(this.monotonic&&l>p)return new Ne(o.startTime,this.monotonic,p,!0);return new Ne(o.startTime,this.monotonic,p-l)}toMetricData(n,o,l,p){return{descriptor:n,aggregationTemporality:o,dataPointType:Wg.DataPointType.SUM,dataPoints:l.map(([u,s])=>({attributes:u,startTime:s.startTime,endTime:p,value:s.toPointValue()})),isMonotonic:this.monotonic}}}is.SumAggregator=os});var fs=i(function(te){Object.defineProperty(te,"__esModule",{value:!0});te.SumAggregator=te.SumAccumulation=te.LastValueAggregator=te.LastValueAccumulation=te.ExponentialHistogramAggregator=te.ExponentialHistogramAccumulation=te.HistogramAggregator=te.HistogramAccumulation=te.DropAggregator=void 0;var Xg=_c();Object.defineProperty(te,"DropAggregator",{enumerable:!0,get:function(){return Xg.DropAggregator}});var cs=Oc();Object.defineProperty(te,"HistogramAccumulation",{enumerable:!0,get:function(){return cs.HistogramAccumulation}});Object.defineProperty(te,"HistogramAggregator",{enumerable:!0,get:function(){return cs.HistogramAggregator}});var ss=Qc();Object.defineProperty(te,"ExponentialHistogramAccumulation",{enumerable:!0,get:function(){return ss.ExponentialHistogramAccumulation}});Object.defineProperty(te,"ExponentialHistogramAggregator",{enumerable:!0,get:function(){return ss.ExponentialHistogramAggregator}});var ls=ns();Object.defineProperty(te,"LastValueAccumulation",{enumerable:!0,get:function(){return ls.LastValueAccumulation}});Object.defineProperty(te,"LastValueAggregator",{enumerable:!0,get:function(){return ls.LastValueAggregator}});var ps=as();Object.defineProperty(te,"SumAccumulation",{enumerable:!0,get:function(){return ps.SumAccumulation}});Object.defineProperty(te,"SumAggregator",{enumerable:!0,get:function(){return ps.SumAggregator}})});var vs=i(function(ds){Object.defineProperty(ds,"__esModule",{value:!0});ds.DEFAULT_AGGREGATION=ds.EXPONENTIAL_HISTOGRAM_AGGREGATION=ds.HISTOGRAM_AGGREGATION=ds.LAST_VALUE_AGGREGATION=ds.SUM_AGGREGATION=ds.DROP_AGGREGATION=ds.DefaultAggregation=ds.ExponentialHistogramAggregation=ds.ExplicitBucketHistogramAggregation=ds.HistogramAggregation=ds.LastValueAggregation=ds.SumAggregation=ds.DropAggregation=void 0;var Qg=O(),Pe=fs(),oe=me();class Qt{static DEFAULT_INSTANCE=new Pe.DropAggregator;createAggregator(n){return Qt.DEFAULT_INSTANCE}}ds.DropAggregation=Qt;class lt{static MONOTONIC_INSTANCE=new Pe.SumAggregator(!0);static NON_MONOTONIC_INSTANCE=new Pe.SumAggregator(!1);createAggregator(n){switch(n.type){case oe.InstrumentType.COUNTER:case oe.InstrumentType.OBSERVABLE_COUNTER:case oe.InstrumentType.HISTOGRAM:return lt.MONOTONIC_INSTANCE;default:return lt.NON_MONOTONIC_INSTANCE}}}ds.SumAggregation=lt;class er{static DEFAULT_INSTANCE=new Pe.LastValueAggregator;createAggregator(n){return er.DEFAULT_INSTANCE}}ds.LastValueAggregation=er;class tr{static DEFAULT_INSTANCE=new Pe.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1000,2500,5000,7500,1e4],!0);createAggregator(n){return tr.DEFAULT_INSTANCE}}ds.HistogramAggregation=tr;class an{_boundaries;_recordMinMax;constructor(n,o=!0){if(n==null)throw Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort((u,s)=>u-s);let l=n.lastIndexOf(-1/0),p=n.indexOf(1/0);if(p===-1)p=void 0;this._boundaries=n.slice(l+1,p),this._recordMinMax=o}createAggregator(n){return new Pe.HistogramAggregator(this._boundaries,this._recordMinMax)}}ds.ExplicitBucketHistogramAggregation=an;class cn{_maxSize;_recordMinMax;constructor(n=160,o=!0){this._maxSize=n,this._recordMinMax=o}createAggregator(n){return new Pe.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}}ds.ExponentialHistogramAggregation=cn;class sn{_resolve(n){switch(n.type){case oe.InstrumentType.COUNTER:case oe.InstrumentType.UP_DOWN_COUNTER:case oe.InstrumentType.OBSERVABLE_COUNTER:case oe.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return ds.SUM_AGGREGATION;case oe.InstrumentType.GAUGE:case oe.InstrumentType.OBSERVABLE_GAUGE:return ds.LAST_VALUE_AGGREGATION;case oe.InstrumentType.HISTOGRAM:{if(n.advice.explicitBucketBoundaries)return new an(n.advice.explicitBucketBoundaries);return ds.HISTOGRAM_AGGREGATION}}return Qg.diag.warn(`Unable to recognize instrument type: ${n.type}`),ds.DROP_AGGREGATION}createAggregator(n){return this._resolve(n).createAggregator(n)}}ds.DefaultAggregation=sn;ds.DROP_AGGREGATION=new Qt;ds.SUM_AGGREGATION=new lt;ds.LAST_VALUE_AGGREGATION=new er;ds.HISTOGRAM_AGGREGATION=new tr;ds.EXPONENTIAL_HISTOGRAM_AGGREGATION=new cn;ds.DEFAULT_AGGREGATION=new sn});var pt=i(function(Os){Object.defineProperty(Os,"__esModule",{value:!0});Os.toAggregation=Os.AggregationType=void 0;var Ie=vs(),we;(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.DROP=1]="DROP",n[n.SUM=2]="SUM",n[n.LAST_VALUE=3]="LAST_VALUE",n[n.EXPLICIT_BUCKET_HISTOGRAM=4]="EXPLICIT_BUCKET_HISTOGRAM",n[n.EXPONENTIAL_HISTOGRAM=5]="EXPONENTIAL_HISTOGRAM"})(we=Os.AggregationType||(Os.AggregationType={}));function cv(n){switch(n.type){case we.DEFAULT:return Ie.DEFAULT_AGGREGATION;case we.DROP:return Ie.DROP_AGGREGATION;case we.SUM:return Ie.SUM_AGGREGATION;case we.LAST_VALUE:return Ie.LAST_VALUE_AGGREGATION;case we.EXPONENTIAL_HISTOGRAM:{let o=n;return new Ie.ExponentialHistogramAggregation(o.options?.maxSize,o.options?.recordMinMax)}case we.EXPLICIT_BUCKET_HISTOGRAM:{let o=n;if(o.options==null)return Ie.HISTOGRAM_AGGREGATION;else return new Ie.ExplicitBucketHistogramAggregation(o.options?.boundaries,o.options?.recordMinMax)}default:throw Error("Unsupported Aggregation")}}Os.toAggregation=cv});var ln=i(function(Ts){Object.defineProperty(Ts,"__esModule",{value:!0});Ts.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=Ts.DEFAULT_AGGREGATION_SELECTOR=void 0;var sv=Jt(),lv=pt(),pv=(n)=>({type:lv.AggregationType.DEFAULT});Ts.DEFAULT_AGGREGATION_SELECTOR=pv;var fv=(n)=>sv.AggregationTemporality.CUMULATIVE;Ts.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=fv});var pn=i(function(ws){Object.defineProperty(ws,"__esModule",{value:!0});ws.MetricReader=void 0;var Es=O(),As=ne(),Ns=ln();class Ps{_shutdown=!1;_metricProducers;_sdkMetricProducer;_aggregationTemporalitySelector;_aggregationSelector;_cardinalitySelector;constructor(n){this._aggregationSelector=n?.aggregationSelector??Ns.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=n?.aggregationTemporalitySelector??Ns.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=n?.metricProducers??[],this._cardinalitySelector=n?.cardinalitySelector}setMetricProducer(n){if(this._sdkMetricProducer)throw Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=n,this.onInitialized()}selectAggregation(n){return this._aggregationSelector(n)}selectAggregationTemporality(n){return this._aggregationTemporalitySelector(n)}selectCardinalityLimit(n){return this._cardinalitySelector?this._cardinalitySelector(n):2000}onInitialized(){}async collect(n){if(this._sdkMetricProducer===void 0)throw Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw Error("MetricReader is shutdown");let[o,...l]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:n?.timeoutMillis}),...this._metricProducers.map((t)=>t.collect({timeoutMillis:n?.timeoutMillis}))]),p=o.errors.concat(l.flatMap((t)=>t.errors)),u=o.resourceMetrics.resource,s=o.resourceMetrics.scopeMetrics.concat(l.flatMap((t)=>t.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:u,scopeMetrics:s},errors:p}}async shutdown(n){if(this._shutdown){Es.diag.error("Cannot call shutdown twice.");return}if(n?.timeoutMillis==null)await this.onShutdown();else await As.callWithTimeout(this.onShutdown(),n.timeoutMillis);this._shutdown=!0}async forceFlush(n){if(this._shutdown){Es.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(n?.timeoutMillis==null){await this.onForceFlush();return}await As.callWithTimeout(this.onForceFlush(),n.timeoutMillis)}}ws.MetricReader=Ps});var Cs=i(function(Us){Object.defineProperty(Us,"__esModule",{value:!0});Us.PeriodicExportingMetricReader=void 0;var rr=O(),nr=kt(),hv=pn(),Rs=ne();class Ms extends hv.MetricReader{_interval;_exporter;_exportInterval;_exportTimeout;constructor(n){let{exporter:o,exportIntervalMillis:l=60000,metricProducers:p}=n,{exportTimeoutMillis:u=30000}=n;super({aggregationSelector:o.selectAggregation?.bind(o),aggregationTemporalitySelector:o.selectAggregationTemporality?.bind(o),metricProducers:p});if(l<=0)throw Error("exportIntervalMillis must be greater than 0");if(u<=0)throw Error("exportTimeoutMillis must be greater than 0");if(l<u)if("exportIntervalMillis"in n&&"exportTimeoutMillis"in n)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");else rr.diag.info(`Timeout of ${u} exceeds the interval of ${l}. Clamping timeout to interval duration.`),u=l;this._exportInterval=l,this._exportTimeout=u,this._exporter=o}async _runOnce(){try{await Rs.callWithTimeout(this._doRun(),this._exportTimeout)}catch(n){if(n instanceof Rs.TimeoutError){rr.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}nr.globalErrorHandler(n)}}async _doRun(){let{resourceMetrics:n,errors:o}=await this.collect({timeoutMillis:this._exportTimeout});if(o.length>0)rr.diag.error("PeriodicExportingMetricReader: metrics collection errors",...o);if(n.resource.asyncAttributesPending)try{await n.resource.waitForAsyncAttributes?.()}catch(p){rr.diag.debug("Error while resolving async portion of resource: ",p),nr.globalErrorHandler(p)}if(n.scopeMetrics.length===0)return;let l=await nr.internal._export(this._exporter,n);if(l.code!==nr.ExportResultCode.SUCCESS)throw Error(`PeriodicExportingMetricReader: metrics export failed (error ${l.error})`)}onInitialized(){if(this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),typeof this._interval!=="number")this._interval.unref()}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){if(this._interval)clearInterval(this._interval);await this.onForceFlush(),await this._exporter.shutdown()}}Us.PeriodicExportingMetricReader=Ms});var qs=i(function(Vs){Object.defineProperty(Vs,"__esModule",{value:!0});Vs.InMemoryMetricExporter=void 0;var Ds=kt();class ks{_shutdown=!1;_aggregationTemporality;_metrics=[];constructor(n){this._aggregationTemporality=n}export(n,o){if(this._shutdown){setTimeout(()=>o({code:Ds.ExportResultCode.FAILED}),0);return}this._metrics.push(n),setTimeout(()=>o({code:Ds.ExportResultCode.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(n){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}}Vs.InMemoryMetricExporter=ks});var Fs=i(function(Gs){Object.defineProperty(Gs,"__esModule",{value:!0});Gs.ConsoleMetricExporter=void 0;var js=kt(),yv=ln();class fn{_shutdown=!1;_temporalitySelector;constructor(n){this._temporalitySelector=n?.temporalitySelector??yv.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(n,o){if(this._shutdown){o({code:js.ExportResultCode.FAILED});return}return fn._sendMetrics(n,o)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(n){return this._temporalitySelector(n)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(n,o){for(let l of n.scopeMetrics)for(let p of l.metrics)console.dir({descriptor:p.descriptor,dataPointType:p.dataPointType,dataPoints:p.dataPoints},{depth:null});o({code:js.ExportResultCode.SUCCESS})}}Gs.ConsoleMetricExporter=fn});var dn=i(function(Ks){Object.defineProperty(Ks,"__esModule",{value:!0});Ks._clearDefaultServiceNameCache=Ks.defaultServiceName=void 0;var ft;function mv(){if(ft===void 0)try{let n=globalThis.process.argv0;ft=n?`unknown_service:${n}`:"unknown_service"}catch{ft="unknown_service"}return ft}Ks.defaultServiceName=mv;function _v(){ft=void 0}Ks._clearDefaultServiceNameCache=_v});var Ws=i(function(Js){Object.defineProperty(Js,"__esModule",{value:!0});Js.isPromiseLike=void 0;var vv=(n)=>n!==null&&typeof n==="object"&&typeof n.then==="function";Js.isPromiseLike=vv});var mn=i(function(Xs){Object.defineProperty(Xs,"__esModule",{value:!0});Xs.defaultResource=Xs.emptyResource=Xs.resourceFromDetectedResource=Xs.resourceFromAttributes=void 0;var ht=O(),hn=kt(),Re=Wt(),bv=dn(),dt=Ws();class yt{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(n,o){let l=new yt({},o);return l._rawAttributes=Ys(n),l._asyncAttributesPending=n.filter(([p,u])=>dt.isPromiseLike(u)).length>0,l}constructor(n,o){let l=n.attributes??{};this._rawAttributes=Object.entries(l).map(([p,u])=>{if(dt.isPromiseLike(u))this._asyncAttributesPending=!0;return[p,u]}),this._rawAttributes=Ys(this._rawAttributes),this._schemaUrl=xv(o?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let n=0;n<this._rawAttributes.length;n++){let[o,l]=this._rawAttributes[n];this._rawAttributes[n]=[o,dt.isPromiseLike(l)?await l:l]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)ht.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let n={};for(let[o,l]of this._rawAttributes){if(dt.isPromiseLike(l)){ht.diag.debug(`Unsettled resource attribute ${o} skipped`);continue}if(l!=null)n[o]??=l}if(!this._asyncAttributesPending)this._memoizedAttributes=n;return n}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(n){if(n==null)return this;let o=Ev(this,n),l=o?{schemaUrl:o}:void 0;return yt.FromAttributeList([...n.getRawAttributes(),...this.getRawAttributes()],l)}}function yn(n,o){return yt.FromAttributeList(Object.entries(n),o)}Xs.resourceFromAttributes=yn;function Ov(n,o){return new yt(n,o)}Xs.resourceFromDetectedResource=Ov;function Sv(){return yn({})}Xs.emptyResource=Sv;function Tv(){return yn({[Re.ATTR_SERVICE_NAME]:bv.defaultServiceName(),[Re.ATTR_TELEMETRY_SDK_LANGUAGE]:hn.SDK_INFO[Re.ATTR_TELEMETRY_SDK_LANGUAGE],[Re.ATTR_TELEMETRY_SDK_NAME]:hn.SDK_INFO[Re.ATTR_TELEMETRY_SDK_NAME],[Re.ATTR_TELEMETRY_SDK_VERSION]:hn.SDK_INFO[Re.ATTR_TELEMETRY_SDK_VERSION]})}Xs.defaultResource=Tv;function Ys(n){return n.map(([o,l])=>{if(dt.isPromiseLike(l))return[o,l.catch((p)=>{ht.diag.debug("promise rejection for resource attribute: %s - %s",o,p);return})];return[o,l]})}function xv(n){if(typeof n==="string"||n===void 0)return n;ht.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",n);return}function Ev(n,o){let l=n?.schemaUrl,p=o?.schemaUrl,u=l===void 0||l==="",s=p===void 0||p==="";if(u)return p;if(s)return l;if(l===p)return l;ht.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',l,p);return}});var rl=i(function(el){Object.defineProperty(el,"__esModule",{value:!0});el.detectResources=void 0;var Qs=O(),_n=mn(),wv=(n={})=>(n.detectors||[]).map((l)=>{try{let p=_n.resourceFromDetectedResource(l.detect(n));return Qs.diag.debug(`${l.constructor.name} found resource.`,p),p}catch(p){return Qs.diag.debug(`${l.constructor.name} failed: ${p.message}`),_n.emptyResource()}}).reduce((l,p)=>l.merge(p),_n.emptyResource());el.detectResources=wv});var al=i(function(il){Object.defineProperty(il,"__esModule",{value:!0});il.envDetector=void 0;var Iv=O(),Rv=Wt(),nl=kt();class ol{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";detect(n){let o={},l=nl.getStringFromEnv("OTEL_RESOURCE_ATTRIBUTES"),p=nl.getStringFromEnv("OTEL_SERVICE_NAME");if(l)try{let u=this._parseResourceAttributes(l);Object.assign(o,u)}catch(u){Iv.diag.debug(`EnvDetector failed: ${u instanceof Error?u.message:u}`)}if(p)o[Rv.ATTR_SERVICE_NAME]=p;return{attributes:o}}_parseResourceAttributes(n){if(!n)return{};let o={},l=n.split(this._COMMA_SEPARATOR);for(let p of l){let u=p.split(this._LABEL_KEY_VALUE_SPLITTER);if(u.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${p}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[s,t]=u,e=s.trim(),r=t.trim();if(e.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${p}".`);let a,f;try{a=decodeURIComponent(e),f=decodeURIComponent(r)}catch(y){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${p}": ${y instanceof Error?y.message:y}`)}if(a.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${a}".`);if(f.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${a}".`);o[a]=f}return o}}il.envDetector=new ol});var mt=i(function(cl){Object.defineProperty(cl,"__esModule",{value:!0});cl.ATTR_WEBENGINE_VERSION=cl.ATTR_WEBENGINE_NAME=cl.ATTR_WEBENGINE_DESCRIPTION=cl.ATTR_SERVICE_NAMESPACE=cl.ATTR_SERVICE_INSTANCE_ID=cl.ATTR_PROCESS_RUNTIME_VERSION=cl.ATTR_PROCESS_RUNTIME_NAME=cl.ATTR_PROCESS_RUNTIME_DESCRIPTION=cl.ATTR_PROCESS_PID=cl.ATTR_PROCESS_OWNER=cl.ATTR_PROCESS_EXECUTABLE_PATH=cl.ATTR_PROCESS_EXECUTABLE_NAME=cl.ATTR_PROCESS_COMMAND_ARGS=cl.ATTR_PROCESS_COMMAND=cl.ATTR_OS_VERSION=cl.ATTR_OS_TYPE=cl.ATTR_K8S_POD_NAME=cl.ATTR_K8S_NAMESPACE_NAME=cl.ATTR_K8S_DEPLOYMENT_NAME=cl.ATTR_K8S_CLUSTER_NAME=cl.ATTR_HOST_TYPE=cl.ATTR_HOST_NAME=cl.ATTR_HOST_IMAGE_VERSION=cl.ATTR_HOST_IMAGE_NAME=cl.ATTR_HOST_IMAGE_ID=cl.ATTR_HOST_ID=cl.ATTR_HOST_ARCH=cl.ATTR_CONTAINER_NAME=cl.ATTR_CONTAINER_IMAGE_TAGS=cl.ATTR_CONTAINER_IMAGE_NAME=cl.ATTR_CONTAINER_ID=cl.ATTR_CLOUD_REGION=cl.ATTR_CLOUD_PROVIDER=cl.ATTR_CLOUD_AVAILABILITY_ZONE=cl.ATTR_CLOUD_ACCOUNT_ID=void 0;cl.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";cl.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";cl.ATTR_CLOUD_PROVIDER="cloud.provider";cl.ATTR_CLOUD_REGION="cloud.region";cl.ATTR_CONTAINER_ID="container.id";cl.ATTR_CONTAINER_IMAGE_NAME="container.image.name";cl.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";cl.ATTR_CONTAINER_NAME="container.name";cl.ATTR_HOST_ARCH="host.arch";cl.ATTR_HOST_ID="host.id";cl.ATTR_HOST_IMAGE_ID="host.image.id";cl.ATTR_HOST_IMAGE_NAME="host.image.name";cl.ATTR_HOST_IMAGE_VERSION="host.image.version";cl.ATTR_HOST_NAME="host.name";cl.ATTR_HOST_TYPE="host.type";cl.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";cl.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";cl.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";cl.ATTR_K8S_POD_NAME="k8s.pod.name";cl.ATTR_OS_TYPE="os.type";cl.ATTR_OS_VERSION="os.version";cl.ATTR_PROCESS_COMMAND="process.command";cl.ATTR_PROCESS_COMMAND_ARGS="process.command_args";cl.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";cl.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";cl.ATTR_PROCESS_OWNER="process.owner";cl.ATTR_PROCESS_PID="process.pid";cl.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";cl.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";cl.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";cl.ATTR_SERVICE_INSTANCE_ID="service.instance.id";cl.ATTR_SERVICE_NAMESPACE="service.namespace";cl.ATTR_WEBENGINE_DESCRIPTION="webengine.description";cl.ATTR_WEBENGINE_NAME="webengine.name";cl.ATTR_WEBENGINE_VERSION="webengine.version"});var fl=i(function(ll){Object.defineProperty(ll,"__esModule",{value:!0});ll.getMachineId=void 0;var fb=c("process"),Me;async function db(){if(!Me)switch(fb.platform){case"darwin":Me=(await import("./getMachineId-darwin-6cpgjxme.js").then((m)=>v(m.default))).getMachineId;break;case"linux":Me=(await import("./getMachineId-linux-pr9sb5fr.js").then((m)=>v(m.default))).getMachineId;break;case"freebsd":Me=(await import("./getMachineId-bsd-sqf1kd37.js").then((m)=>v(m.default))).getMachineId;break;case"win32":Me=(await import("./getMachineId-win-xdyxc2tf.js").then((m)=>v(m.default))).getMachineId;break;default:Me=(await import("./getMachineId-unsupported-w91yq3tm.js").then((m)=>v(m.default))).getMachineId;break}return Me()}ll.getMachineId=db});var gn=i(function(dl){Object.defineProperty(dl,"__esModule",{value:!0});dl.normalizeType=dl.normalizeArch=void 0;var hb=(n)=>{switch(n){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return n}};dl.normalizeArch=hb;var yb=(n)=>{switch(n){case"sunos":return"solaris";case"win32":return"windows";default:return n}};dl.normalizeType=yb});var vl=i(function(_l){Object.defineProperty(_l,"__esModule",{value:!0});_l.hostDetector=void 0;var vn=mt(),yl=c("os"),_b=fl(),gb=gn();class ml{detect(n){return{attributes:{[vn.ATTR_HOST_NAME]:yl.hostname(),[vn.ATTR_HOST_ARCH]:gb.normalizeArch(yl.arch()),[vn.ATTR_HOST_ID]:_b.getMachineId()}}}}_l.hostDetector=new ml});var El=i(function(Tl){Object.defineProperty(Tl,"__esModule",{value:!0});Tl.osDetector=void 0;var bl=mt(),Ol=c("os"),vb=gn();class Sl{detect(n){return{attributes:{[bl.ATTR_OS_TYPE]:vb.normalizeType(Ol.platform()),[bl.ATTR_OS_VERSION]:Ol.release()}}}}Tl.osDetector=new Sl});var wl=i(function(Nl){Object.defineProperty(Nl,"__esModule",{value:!0});Nl.processDetector=void 0;var bb=O(),se=mt(),Ob=c("os");class Al{detect(n){let o={[se.ATTR_PROCESS_PID]:process.pid,[se.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[se.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[se.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[se.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[se.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[se.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};if(process.argv.length>1)o[se.ATTR_PROCESS_COMMAND]=process.argv[1];try{let l=Ob.userInfo();o[se.ATTR_PROCESS_OWNER]=l.username}catch(l){bb.diag.debug(`error obtaining process owner: ${l}`)}return{attributes:o}}}Nl.processDetector=new Al});var Ul=i(function(Rl){Object.defineProperty(Rl,"__esModule",{value:!0});Rl.serviceInstanceIdDetector=void 0;var Sb=mt(),Tb=c("crypto");class Il{detect(n){return{attributes:{[Sb.ATTR_SERVICE_INSTANCE_ID]:Tb.randomUUID()}}}}Rl.serviceInstanceIdDetector=new Il});var Ll=i(function(He){Object.defineProperty(He,"__esModule",{value:!0});He.serviceInstanceIdDetector=He.processDetector=He.osDetector=He.hostDetector=void 0;var xb=vl();Object.defineProperty(He,"hostDetector",{enumerable:!0,get:function(){return xb.hostDetector}});var Eb=El();Object.defineProperty(He,"osDetector",{enumerable:!0,get:function(){return Eb.osDetector}});var Ab=wl();Object.defineProperty(He,"processDetector",{enumerable:!0,get:function(){return Ab.processDetector}});var Nb=Ul();Object.defineProperty(He,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return Nb.serviceInstanceIdDetector}})});var Cl=i(function(Fe){Object.defineProperty(Fe,"__esModule",{value:!0});Fe.serviceInstanceIdDetector=Fe.processDetector=Fe.osDetector=Fe.hostDetector=void 0;var or=Ll();Object.defineProperty(Fe,"hostDetector",{enumerable:!0,get:function(){return or.hostDetector}});Object.defineProperty(Fe,"osDetector",{enumerable:!0,get:function(){return or.osDetector}});Object.defineProperty(Fe,"processDetector",{enumerable:!0,get:function(){return or.processDetector}});Object.defineProperty(Fe,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return or.serviceInstanceIdDetector}})});var Vl=i(function(Dl){Object.defineProperty(Dl,"__esModule",{value:!0});Dl.noopDetector=Dl.NoopDetector=void 0;class bn{detect(){return{attributes:{}}}}Dl.NoopDetector=bn;Dl.noopDetector=new bn});var Bl=i(function(_e){Object.defineProperty(_e,"__esModule",{value:!0});_e.noopDetector=_e.serviceInstanceIdDetector=_e.processDetector=_e.osDetector=_e.hostDetector=_e.envDetector=void 0;var Rb=al();Object.defineProperty(_e,"envDetector",{enumerable:!0,get:function(){return Rb.envDetector}});var ir=Cl();Object.defineProperty(_e,"hostDetector",{enumerable:!0,get:function(){return ir.hostDetector}});Object.defineProperty(_e,"osDetector",{enumerable:!0,get:function(){return ir.osDetector}});Object.defineProperty(_e,"processDetector",{enumerable:!0,get:function(){return ir.processDetector}});Object.defineProperty(_e,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return ir.serviceInstanceIdDetector}});var Mb=Vl();Object.defineProperty(_e,"noopDetector",{enumerable:!0,get:function(){return Mb.noopDetector}})});var rf=i(function(Z){Object.defineProperty(Z,"__esModule",{value:!0});Z.defaultServiceName=Z.emptyResource=Z.defaultResource=Z.resourceFromAttributes=Z.serviceInstanceIdDetector=Z.processDetector=Z.osDetector=Z.hostDetector=Z.envDetector=Z.detectResources=void 0;var Lb=rl();Object.defineProperty(Z,"detectResources",{enumerable:!0,get:function(){return Lb.detectResources}});var _t=Bl();Object.defineProperty(Z,"envDetector",{enumerable:!0,get:function(){return _t.envDetector}});Object.defineProperty(Z,"hostDetector",{enumerable:!0,get:function(){return _t.hostDetector}});Object.defineProperty(Z,"osDetector",{enumerable:!0,get:function(){return _t.osDetector}});Object.defineProperty(Z,"processDetector",{enumerable:!0,get:function(){return _t.processDetector}});Object.defineProperty(Z,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return _t.serviceInstanceIdDetector}});var On=mn();Object.defineProperty(Z,"resourceFromAttributes",{enumerable:!0,get:function(){return On.resourceFromAttributes}});Object.defineProperty(Z,"defaultResource",{enumerable:!0,get:function(){return On.defaultResource}});Object.defineProperty(Z,"emptyResource",{enumerable:!0,get:function(){return On.emptyResource}});var Cb=dn();Object.defineProperty(Z,"defaultServiceName",{enumerable:!0,get:function(){return Cb.defaultServiceName}})});var Hl=i(function(jl){Object.defineProperty(jl,"__esModule",{value:!0});jl.ViewRegistry=void 0;class ql{_registeredViews=[];addView(n){this._registeredViews.push(n)}findViews(n,o){return this._registeredViews.filter((p)=>this._matchInstrument(p.instrumentSelector,n)&&this._matchMeter(p.meterSelector,o))}_matchInstrument(n,o){return(n.getType()===void 0||o.type===n.getType())&&n.getNameFilter().match(o.name)&&n.getUnitFilter().match(o.unit)}_matchMeter(n,o){return n.getNameFilter().match(o.name)&&(o.version===void 0||n.getVersionFilter().match(o.version))&&(o.schemaUrl===void 0||n.getSchemaUrlFilter().match(o.schemaUrl))}}jl.ViewRegistry=ql});var gt=i(function(zl){Object.defineProperty(zl,"__esModule",{value:!0});zl.isValidName=zl.isDescriptorCompatibleWith=zl.createInstrumentDescriptorWithView=zl.createInstrumentDescriptor=void 0;var Fl=O(),kb=ne();function Vb(n,o,l){if(!Kl(n))Fl.diag.warn(`Invalid metric name: "${n}". The metric name should be a ASCII string with a length no greater than 255 characters.`);return{name:n,type:o,description:l?.description??"",unit:l?.unit??"",valueType:l?.valueType??Fl.ValueType.DOUBLE,advice:l?.advice??{}}}zl.createInstrumentDescriptor=Vb;function Bb(n,o){return{name:n.name??o.name,description:n.description??o.description,type:o.type,unit:o.unit,valueType:o.valueType,advice:o.advice}}zl.createInstrumentDescriptorWithView=Bb;function qb(n,o){return kb.equalsCaseInsensitive(n.name,o.name)&&n.unit===o.unit&&n.type===o.type&&n.valueType===o.valueType}zl.isDescriptorCompatibleWith=qb;var jb=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Kl(n){return jb.test(n)}zl.isValidName=Kl});var ur=i(function(tp){Object.defineProperty(tp,"__esModule",{value:!0});tp.isObservableInstrument=tp.ObservableUpDownCounterInstrument=tp.ObservableGaugeInstrument=tp.ObservableCounterInstrument=tp.ObservableInstrument=tp.HistogramInstrument=tp.GaugeInstrument=tp.CounterInstrument=tp.UpDownCounterInstrument=tp.SyncInstrument=void 0;var Ke=O(),Kb=kt();class ze{_writableMetricStorage;_descriptor;constructor(n,o){this._writableMetricStorage=n,this._descriptor=o}_record(n,o={},l=Ke.context.active()){if(typeof n!=="number"){Ke.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${n}`);return}if(this._descriptor.valueType===Ke.ValueType.INT&&!Number.isInteger(n)){if(Ke.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),n=Math.trunc(n),!Number.isInteger(n))return}this._writableMetricStorage.record(n,o,l,Kb.millisToHrTime(Date.now()))}}tp.SyncInstrument=ze;class $l extends ze{add(n,o,l){this._record(n,o,l)}}tp.UpDownCounterInstrument=$l;class Wl extends ze{add(n,o,l){if(n<0){Ke.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${n}`);return}this._record(n,o,l)}}tp.CounterInstrument=Wl;class Yl extends ze{record(n,o,l){this._record(n,o,l)}}tp.GaugeInstrument=Yl;class Xl extends ze{record(n,o,l){if(n<0){Ke.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${n}`);return}this._record(n,o,l)}}tp.HistogramInstrument=Xl;class Je{_metricStorages;_descriptor;_observableRegistry;constructor(n,o,l){this._descriptor=n,this._metricStorages=o,this._observableRegistry=l}addCallback(n){this._observableRegistry.addCallback(n,this)}removeCallback(n){this._observableRegistry.removeCallback(n,this)}}tp.ObservableInstrument=Je;class Zl extends Je{}tp.ObservableCounterInstrument=Zl;class Ql extends Je{}tp.ObservableGaugeInstrument=Ql;class ep extends Je{}tp.ObservableUpDownCounterInstrument=ep;function zb(n){return n instanceof Je}tp.isObservableInstrument=zb});var up=i(function(op){Object.defineProperty(op,"__esModule",{value:!0});op.Meter=void 0;var Ue=gt(),Ce=ur(),Le=me();class np{_meterSharedState;constructor(n){this._meterSharedState=n}createGauge(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.GAUGE,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.GaugeInstrument(p,l)}createHistogram(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.HISTOGRAM,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.HistogramInstrument(p,l)}createCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.COUNTER,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.CounterInstrument(p,l)}createUpDownCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.UP_DOWN_COUNTER,o),p=this._meterSharedState.registerMetricStorage(l);return new Ce.UpDownCounterInstrument(p,l)}createObservableGauge(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.OBSERVABLE_GAUGE,o),p=this._meterSharedState.registerAsyncMetricStorage(l);return new Ce.ObservableGaugeInstrument(l,p,this._meterSharedState.observableRegistry)}createObservableCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.OBSERVABLE_COUNTER,o),p=this._meterSharedState.registerAsyncMetricStorage(l);return new Ce.ObservableCounterInstrument(l,p,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(n,o){let l=Ue.createInstrumentDescriptor(n,Le.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,o),p=this._meterSharedState.registerAsyncMetricStorage(l);return new Ce.ObservableUpDownCounterInstrument(l,p,this._meterSharedState.observableRegistry)}addBatchObservableCallback(n,o){this._meterSharedState.observableRegistry.addBatchCallback(n,o)}removeBatchObservableCallback(n,o){this._meterSharedState.observableRegistry.removeBatchCallback(n,o)}}op.Meter=np});var Sn=i(function(cp){Object.defineProperty(cp,"__esModule",{value:!0});cp.MetricStorage=void 0;var rO=gt();class ap{_instrumentDescriptor;constructor(n){this._instrumentDescriptor=n}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(n){this._instrumentDescriptor=rO.createInstrumentDescriptor(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:n,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}}cp.MetricStorage=ap});var vt=i(function(pp){Object.defineProperty(pp,"__esModule",{value:!0});pp.AttributeHashMap=pp.HashMap=void 0;var nO=ne();class Tn{_valueMap=new Map;_keyMap=new Map;_hash;constructor(n){this._hash=n}get(n,o){return o??=this._hash(n),this._valueMap.get(o)}getOrDefault(n,o){let l=this._hash(n);if(this._valueMap.has(l))return this._valueMap.get(l);let p=o();if(!this._keyMap.has(l))this._keyMap.set(l,n);return this._valueMap.set(l,p),p}set(n,o,l){if(l??=this._hash(n),!this._keyMap.has(l))this._keyMap.set(l,n);this._valueMap.set(l,o)}has(n,o){return o??=this._hash(n),this._valueMap.has(o)}*keys(){let n=this._keyMap.entries(),o=n.next();while(o.done!==!0)yield[o.value[1],o.value[0]],o=n.next()}*entries(){let n=this._valueMap.entries(),o=n.next();while(o.done!==!0)yield[this._keyMap.get(o.value[0]),o.value[1],o.value[0]],o=n.next()}get size(){return this._valueMap.size}}pp.HashMap=Tn;class lp extends Tn{constructor(){super(nO.hashAttributes)}}pp.AttributeHashMap=lp});var En=i(function(hp){Object.defineProperty(hp,"__esModule",{value:!0});hp.DeltaMetricProcessor=void 0;var iO=ne(),xn=vt();class dp{_activeCollectionStorage=new xn.AttributeHashMap;_cumulativeMemoStorage=new xn.AttributeHashMap;_cardinalityLimit;_overflowAttributes={"otel.metric.overflow":!0};_overflowHashCode;_aggregator;constructor(n,o){this._aggregator=n,this._cardinalityLimit=(o??2000)-1,this._overflowHashCode=iO.hashAttributes(this._overflowAttributes)}record(n,o,l,p){let u=this._activeCollectionStorage.get(o);if(!u){if(this._activeCollectionStorage.size>=this._cardinalityLimit){this._activeCollectionStorage.getOrDefault(this._overflowAttributes,()=>this._aggregator.createAccumulation(p))?.record(n);return}u=this._aggregator.createAccumulation(p),this._activeCollectionStorage.set(o,u)}u?.record(n)}batchCumulate(n,o){Array.from(n.entries()).forEach(([l,p,u])=>{let s=this._aggregator.createAccumulation(o);s?.record(p);let t=s;if(this._cumulativeMemoStorage.has(l,u)){let e=this._cumulativeMemoStorage.get(l,u);t=this._aggregator.diff(e,s)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit){if(l=this._overflowAttributes,u=this._overflowHashCode,this._cumulativeMemoStorage.has(l,u)){let e=this._cumulativeMemoStorage.get(l,u);t=this._aggregator.diff(e,s)}}if(this._activeCollectionStorage.has(l,u)){let e=this._activeCollectionStorage.get(l,u);t=this._aggregator.merge(e,t)}this._cumulativeMemoStorage.set(l,s,u),this._activeCollectionStorage.set(l,t,u)})}collect(){let n=this._activeCollectionStorage;return this._activeCollectionStorage=new xn.AttributeHashMap,n}}hp.DeltaMetricProcessor=dp});var An=i(function(mp){Object.defineProperty(mp,"__esModule",{value:!0});mp.TemporalMetricProcessor=void 0;var uO=Jt(),aO=vt();class bt{_aggregator;_unreportedAccumulations=new Map;_reportHistory=new Map;constructor(n,o){this._aggregator=n,o.forEach((l)=>{this._unreportedAccumulations.set(l,[])})}buildMetrics(n,o,l,p){this._stashAccumulations(l);let u=this._getMergedUnreportedAccumulations(n),s=u,t;if(this._reportHistory.has(n)){let r=this._reportHistory.get(n),a=r.collectionTime;if(t=r.aggregationTemporality,t===uO.AggregationTemporality.CUMULATIVE)s=bt.merge(r.accumulations,u,this._aggregator);else s=bt.calibrateStartTime(r.accumulations,u,a)}else t=n.selectAggregationTemporality(o.type);this._reportHistory.set(n,{accumulations:s,collectionTime:p,aggregationTemporality:t});let e=cO(s);if(e.length===0)return;return this._aggregator.toMetricData(o,t,e,p)}_stashAccumulations(n){let o=this._unreportedAccumulations.keys();for(let l of o){let p=this._unreportedAccumulations.get(l);if(p===void 0)p=[],this._unreportedAccumulations.set(l,p);p.push(n)}}_getMergedUnreportedAccumulations(n){let o=new aO.AttributeHashMap,l=this._unreportedAccumulations.get(n);if(this._unreportedAccumulations.set(n,[]),l===void 0)return o;for(let p of l)o=bt.merge(o,p,this._aggregator);return o}static merge(n,o,l){let p=n,u=o.entries(),s=u.next();while(s.done!==!0){let[t,e,r]=s.value;if(n.has(t,r)){let a=n.get(t,r),f=l.merge(a,e);p.set(t,f,r)}else p.set(t,e,r);s=u.next()}return p}static calibrateStartTime(n,o,l){for(let[p,u]of n.keys())o.get(p,u)?.setStartTime(l);return o}}mp.TemporalMetricProcessor=bt;function cO(n){return Array.from(n.entries())}});var Op=i(function(vp){Object.defineProperty(vp,"__esModule",{value:!0});vp.AsyncMetricStorage=void 0;var sO=Sn(),lO=En(),pO=An(),fO=vt();class gp extends sO.MetricStorage{_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;_attributesProcessor;constructor(n,o,l,p,u){super(n);this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new lO.DeltaMetricProcessor(o,this._aggregationCardinalityLimit),this._temporalMetricStorage=new pO.TemporalMetricProcessor(o,p),this._attributesProcessor=l}record(n,o){let l=new fO.AttributeHashMap;Array.from(n.entries()).forEach(([p,u])=>{l.set(this._attributesProcessor.process(p),u)}),this._deltaMetricStorage.batchCumulate(l,o)}collect(n,o){let l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,l,o)}}vp.AsyncMetricStorage=gp});var Pp=i(function(Ap){Object.defineProperty(Ap,"__esModule",{value:!0});Ap.getConflictResolutionRecipe=Ap.getDescriptionResolutionRecipe=Ap.getTypeConflictResolutionRecipe=Ap.getUnitConflictResolutionRecipe=Ap.getValueTypeConflictResolutionRecipe=Ap.getIncompatibilityDetails=void 0;function dO(n,o){let l="";if(n.unit!==o.unit)l+=` - Unit '${n.unit}' does not match '${o.unit}'
2
+ `;if(n.type!==o.type)l+=` - Type '${n.type}' does not match '${o.type}'
3
+ `;if(n.valueType!==o.valueType)l+=` - Value Type '${n.valueType}' does not match '${o.valueType}'
4
+ `;if(n.description!==o.description)l+=` - Description '${n.description}' does not match '${o.description}'
5
+ `;return l}Ap.getIncompatibilityDetails=dO;function Sp(n,o){return` - use valueType '${n.valueType}' on instrument creation or use an instrument name other than '${o.name}'`}Ap.getValueTypeConflictResolutionRecipe=Sp;function Tp(n,o){return` - use unit '${n.unit}' on instrument creation or use an instrument name other than '${o.name}'`}Ap.getUnitConflictResolutionRecipe=Tp;function xp(n,o){let l={name:o.name,type:o.type,unit:o.unit},p=JSON.stringify(l);return` - create a new view with a name other than '${n.name}' and InstrumentSelector '${p}'`}Ap.getTypeConflictResolutionRecipe=xp;function Ep(n,o){let l={name:o.name,type:o.type,unit:o.unit},p=JSON.stringify(l);return` - create a new view with a name other than '${n.name}' and InstrumentSelector '${p}'
6
+ - OR - create a new view with the name ${n.name} and description '${n.description}' and InstrumentSelector ${p}
7
+ - OR - create a new view with the name ${o.name} and description '${n.description}' and InstrumentSelector ${p}`}Ap.getDescriptionResolutionRecipe=Ep;function hO(n,o){if(n.valueType!==o.valueType)return Sp(n,o);if(n.unit!==o.unit)return Tp(n,o);if(n.type!==o.type)return xp(n,o);if(n.description!==o.description)return Ep(n,o);return""}Ap.getConflictResolutionRecipe=hO});var Mp=i(function(Ip){Object.defineProperty(Ip,"__esModule",{value:!0});Ip.MetricStorageRegistry=void 0;var bO=gt(),wp=O(),ar=Pp();class Nn{_sharedRegistry=new Map;_perCollectorRegistry=new Map;static create(){return new Nn}getStorages(n){let o=[];for(let p of this._sharedRegistry.values())o=o.concat(p);let l=this._perCollectorRegistry.get(n);if(l!=null)for(let p of l.values())o=o.concat(p);return o}register(n){this._registerStorage(n,this._sharedRegistry)}registerForCollector(n,o){let l=this._perCollectorRegistry.get(n);if(l==null)l=new Map,this._perCollectorRegistry.set(n,l);this._registerStorage(o,l)}findOrUpdateCompatibleStorage(n){let o=this._sharedRegistry.get(n.name);if(o===void 0)return null;return this._findOrUpdateCompatibleStorage(n,o)}findOrUpdateCompatibleCollectorStorage(n,o){let l=this._perCollectorRegistry.get(n);if(l===void 0)return null;let p=l.get(o.name);if(p===void 0)return null;return this._findOrUpdateCompatibleStorage(o,p)}_registerStorage(n,o){let l=n.getInstrumentDescriptor(),p=o.get(l.name);if(p===void 0){o.set(l.name,[n]);return}p.push(n)}_findOrUpdateCompatibleStorage(n,o){let l=null;for(let p of o){let u=p.getInstrumentDescriptor();if(bO.isDescriptorCompatibleWith(u,n)){if(u.description!==n.description){if(n.description.length>u.description.length)p.updateDescription(n.description);wp.diag.warn("A view or instrument with the name ",n.name,` has already been registered, but has a different description and is incompatible with another registered view.
8
+ `,`Details:
9
+ `,ar.getIncompatibilityDetails(u,n),`The longer description will be used.
10
+ To resolve the conflict:`,ar.getConflictResolutionRecipe(u,n))}l=p}else wp.diag.warn("A view or instrument with the name ",n.name,` has already been registered and is incompatible with another registered view.
11
+ `,`Details:
12
+ `,ar.getIncompatibilityDetails(u,n),`To resolve the conflict:
13
+ `,ar.getConflictResolutionRecipe(u,n))}return l}}Ip.MetricStorageRegistry=Nn});var Dp=i(function(Lp){Object.defineProperty(Lp,"__esModule",{value:!0});Lp.MultiMetricStorage=void 0;class Up{_backingStorages;constructor(n){this._backingStorages=n}record(n,o,l,p){this._backingStorages.forEach((u)=>{u.record(n,o,l,p)})}}Lp.MultiMetricStorage=Up});var Gp=i(function(qp){Object.defineProperty(qp,"__esModule",{value:!0});qp.BatchObservableResultImpl=qp.ObservableResultImpl=void 0;var $e=O(),kp=vt(),OO=ur();class Vp{_buffer=new kp.AttributeHashMap;_instrumentName;_valueType;constructor(n,o){this._instrumentName=n,this._valueType=o}observe(n,o={}){if(typeof n!=="number"){$e.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${n}`);return}if(this._valueType===$e.ValueType.INT&&!Number.isInteger(n)){if($e.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),n=Math.trunc(n),!Number.isInteger(n))return}this._buffer.set(o,n)}}qp.ObservableResultImpl=Vp;class Bp{_buffer=new Map;observe(n,o,l={}){if(!OO.isObservableInstrument(n))return;let p=this._buffer.get(n);if(p==null)p=new kp.AttributeHashMap,this._buffer.set(n,p);if(typeof o!=="number"){$e.diag.warn(`non-number value provided to metric ${n._descriptor.name}: ${o}`);return}if(n._descriptor.valueType===$e.ValueType.INT&&!Number.isInteger(o)){if($e.diag.warn(`INT value type cannot accept a floating-point value for ${n._descriptor.name}, ignoring the fractional digits.`),o=Math.trunc(o),!Number.isInteger(o))return}p.set(l,o)}}qp.BatchObservableResultImpl=Bp});var $p=i(function(zp){Object.defineProperty(zp,"__esModule",{value:!0});zp.ObservableRegistry=void 0;var TO=O(),Hp=ur(),Fp=Gp(),Pn=ne();class Kp{_callbacks=[];_batchCallbacks=[];addCallback(n,o){if(this._findCallback(n,o)>=0)return;this._callbacks.push({callback:n,instrument:o})}removeCallback(n,o){let l=this._findCallback(n,o);if(l<0)return;this._callbacks.splice(l,1)}addBatchCallback(n,o){let l=new Set(o.filter(Hp.isObservableInstrument));if(l.size===0){TO.diag.error("BatchObservableCallback is not associated with valid instruments",o);return}if(this._findBatchCallback(n,l)>=0)return;this._batchCallbacks.push({callback:n,instruments:l})}removeBatchCallback(n,o){let l=new Set(o.filter(Hp.isObservableInstrument)),p=this._findBatchCallback(n,l);if(p<0)return;this._batchCallbacks.splice(p,1)}async observe(n,o){let l=this._observeCallbacks(n,o),p=this._observeBatchCallbacks(n,o);return(await Promise.allSettled([...l,...p])).filter((t)=>t.status==="rejected").map((t)=>t.reason)}_observeCallbacks(n,o){return this._callbacks.map(async({callback:l,instrument:p})=>{let u=new Fp.ObservableResultImpl(p._descriptor.name,p._descriptor.valueType),s=Promise.resolve(l(u));if(o!=null)s=Pn.callWithTimeout(s,o);await s,p._metricStorages.forEach((t)=>{t.record(u._buffer,n)})})}_observeBatchCallbacks(n,o){return this._batchCallbacks.map(async({callback:l,instruments:p})=>{let u=new Fp.BatchObservableResultImpl,s=Promise.resolve(l(u));if(o!=null)s=Pn.callWithTimeout(s,o);await s,p.forEach((t)=>{let e=u._buffer.get(t);if(e==null)return;t._metricStorages.forEach((r)=>{r.record(e,n)})})})}_findCallback(n,o){return this._callbacks.findIndex((l)=>l.callback===n&&l.instrument===o)}_findBatchCallback(n,o){return this._batchCallbacks.findIndex((l)=>l.callback===n&&Pn.setEquals(l.instruments,o))}}zp.ObservableRegistry=Kp});var Zp=i(function(Yp){Object.defineProperty(Yp,"__esModule",{value:!0});Yp.SyncMetricStorage=void 0;var xO=Sn(),EO=En(),AO=An();class Wp extends xO.MetricStorage{_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;_attributesProcessor;constructor(n,o,l,p,u){super(n);this._aggregationCardinalityLimit=u,this._deltaMetricStorage=new EO.DeltaMetricProcessor(o,this._aggregationCardinalityLimit),this._temporalMetricStorage=new AO.TemporalMetricProcessor(o,p),this._attributesProcessor=l}record(n,o,l,p){o=this._attributesProcessor.process(o,l),this._deltaMetricStorage.record(n,o,l,p)}collect(n,o){let l=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,l,o)}}Yp.SyncMetricStorage=Wp});var cr=i(function(of){Object.defineProperty(of,"__esModule",{value:!0});of.createDenyListAttributesProcessor=of.createAllowListAttributesProcessor=of.createMultiAttributesProcessor=of.createNoopAttributesProcessor=void 0;class Qp{process(n,o){return n}}class ef{_processors;constructor(n){this._processors=n}process(n,o){let l=n;for(let p of this._processors)l=p.process(l,o);return l}}class tf{_allowedAttributeNames;constructor(n){this._allowedAttributeNames=n}process(n,o){let l={};return Object.keys(n).forEach((p)=>{if(this._allowedAttributeNames.includes(p))l[p]=n[p]}),l}}class nf{_deniedAttributeNames;constructor(n){this._deniedAttributeNames=n}process(n,o){let l={};return Object.keys(n).forEach((p)=>{if(!this._deniedAttributeNames.includes(p))l[p]=n[p]}),l}}function NO(){return RO}of.createNoopAttributesProcessor=NO;function PO(n){return new ef(n)}of.createMultiAttributesProcessor=PO;function wO(n){return new tf(n)}of.createAllowListAttributesProcessor=wO;function IO(n){return new nf(n)}of.createDenyListAttributesProcessor=IO;var RO=new Qp});var pf=i(function(cf){Object.defineProperty(cf,"__esModule",{value:!0});cf.MeterSharedState=void 0;var CO=gt(),DO=up(),kO=Op(),VO=Mp(),BO=Dp(),qO=$p(),jO=Zp(),GO=cr();class af{metricStorageRegistry=new VO.MetricStorageRegistry;observableRegistry=new qO.ObservableRegistry;meter;_meterProviderSharedState;_instrumentationScope;constructor(n,o){this.meter=new DO.Meter(this),this._meterProviderSharedState=n,this._instrumentationScope=o}registerMetricStorage(n){let o=this._registerMetricStorage(n,jO.SyncMetricStorage);if(o.length===1)return o[0];return new BO.MultiMetricStorage(o)}registerAsyncMetricStorage(n){return this._registerMetricStorage(n,kO.AsyncMetricStorage)}async collect(n,o,l){let p=await this.observableRegistry.observe(o,l?.timeoutMillis),u=this.metricStorageRegistry.getStorages(n);if(u.length===0)return null;let s=[];if(u.forEach((t)=>{let e=t.collect(n,o);if(e!=null)s.push(e)}),s.length===0)return{errors:p};return{scopeMetrics:{scope:this._instrumentationScope,metrics:s},errors:p}}_registerMetricStorage(n,o){let p=this._meterProviderSharedState.viewRegistry.findViews(n,this._instrumentationScope).map((u)=>{let s=CO.createInstrumentDescriptorWithView(u,n),t=this.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(t!=null)return t;let e=u.aggregation.createAggregator(s),r=new o(s,e,u.attributesProcessor,this._meterProviderSharedState.metricCollectors,u.aggregationCardinalityLimit);return this.metricStorageRegistry.register(r),r});if(p.length===0){let s=this._meterProviderSharedState.selectAggregations(n.type).map(([t,e])=>{let r=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(t,n);if(r!=null)return r;let a=e.createAggregator(n),f=t.selectCardinalityLimit(n.type),y=new o(n,a,GO.createNoopAttributesProcessor(),[t],f);return this.metricStorageRegistry.registerForCollector(t,y),y});p=p.concat(s)}return p}}cf.MeterSharedState=af});var yf=i(function(df){Object.defineProperty(df,"__esModule",{value:!0});df.MeterProviderSharedState=void 0;var HO=ne(),FO=Hl(),KO=pf(),zO=pt();class ff{viewRegistry=new FO.ViewRegistry;metricCollectors=[];meterSharedStates=new Map;resource;constructor(n){this.resource=n}getMeterSharedState(n){let o=HO.instrumentationScopeId(n),l=this.meterSharedStates.get(o);if(l==null)l=new KO.MeterSharedState(this,n),this.meterSharedStates.set(o,l);return l}selectAggregations(n){let o=[];for(let l of this.metricCollectors)o.push([l,zO.toAggregation(l.selectAggregation(n))]);return o}}df.MeterProviderSharedState=ff});var vf=i(function(_f){Object.defineProperty(_f,"__esModule",{value:!0});_f.MetricCollector=void 0;var JO=kt();class mf{_sharedState;_metricReader;constructor(n,o){this._sharedState=n,this._metricReader=o}async collect(n){let o=JO.millisToHrTime(Date.now()),l=[],p=[],u=Array.from(this._sharedState.meterSharedStates.values()).map(async(s)=>{let t=await s.collect(this,o,n);if(t?.scopeMetrics!=null)l.push(t.scopeMetrics);if(t?.errors!=null)p.push(...t.errors)});return await Promise.all(u),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:l},errors:p}}async forceFlush(n){await this._metricReader.forceFlush(n)}async shutdown(n){await this._metricReader.shutdown(n)}selectAggregationTemporality(n){return this._metricReader.selectAggregationTemporality(n)}selectAggregation(n){return this._metricReader.selectAggregation(n)}selectCardinalityLimit(n){return this._metricReader.selectCardinalityLimit?.(n)??2000}}_f.MetricCollector=mf});var sr=i(function(Of){Object.defineProperty(Of,"__esModule",{value:!0});Of.ExactPredicate=Of.PatternPredicate=void 0;var $O=/[\^$\\.+?()[\]{}|]/g;class wn{_matchAll;_regexp;constructor(n){if(n==="*")this._matchAll=!0,this._regexp=/.*/;else this._matchAll=!1,this._regexp=new RegExp(wn.escapePattern(n))}match(n){if(this._matchAll)return!0;return this._regexp.test(n)}static escapePattern(n){return`^${n.replace($O,"\\$&").replace("*",".*")}$`}static hasWildcard(n){return n.includes("*")}}Of.PatternPredicate=wn;class bf{_matchAll;_pattern;constructor(n){this._matchAll=n===void 0,this._pattern=n}match(n){if(this._matchAll)return!0;if(n===this._pattern)return!0;return!1}}Of.ExactPredicate=bf});var Nf=i(function(Ef){Object.defineProperty(Ef,"__esModule",{value:!0});Ef.InstrumentSelector=void 0;var Tf=sr();class xf{_nameFilter;_type;_unitFilter;constructor(n){this._nameFilter=new Tf.PatternPredicate(n?.name??"*"),this._type=n?.type,this._unitFilter=new Tf.ExactPredicate(n?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}}Ef.InstrumentSelector=xf});var Rf=i(function(wf){Object.defineProperty(wf,"__esModule",{value:!0});wf.MeterSelector=void 0;var In=sr();class Pf{_nameFilter;_versionFilter;_schemaUrlFilter;constructor(n){this._nameFilter=new In.ExactPredicate(n?.name),this._versionFilter=new In.ExactPredicate(n?.version),this._schemaUrlFilter=new In.ExactPredicate(n?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}}wf.MeterSelector=Pf});var kf=i(function(Cf){Object.defineProperty(Cf,"__esModule",{value:!0});Cf.View=void 0;var YO=sr(),Mf=cr(),XO=Nf(),ZO=Rf(),Uf=pt();function QO(n){return n.instrumentName==null&&n.instrumentType==null&&n.instrumentUnit==null&&n.meterName==null&&n.meterVersion==null&&n.meterSchemaUrl==null}function eS(n){if(QO(n))throw Error("Cannot create view with no selector arguments supplied");if(n.name!=null&&(n?.instrumentName==null||YO.PatternPredicate.hasWildcard(n.instrumentName)))throw Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.")}class Lf{name;description;aggregation;attributesProcessor;instrumentSelector;meterSelector;aggregationCardinalityLimit;constructor(n){if(eS(n),n.attributesProcessors!=null)this.attributesProcessor=Mf.createMultiAttributesProcessor(n.attributesProcessors);else this.attributesProcessor=Mf.createNoopAttributesProcessor();this.name=n.name,this.description=n.description,this.aggregation=Uf.toAggregation(n.aggregation??{type:Uf.AggregationType.DEFAULT}),this.instrumentSelector=new XO.InstrumentSelector({name:n.instrumentName,type:n.instrumentType,unit:n.instrumentUnit}),this.meterSelector=new ZO.MeterSelector({name:n.meterName,version:n.meterVersion,schemaUrl:n.meterSchemaUrl}),this.aggregationCardinalityLimit=n.aggregationCardinalityLimit}}Cf.View=Lf});var jf=i(function(Bf){Object.defineProperty(Bf,"__esModule",{value:!0});Bf.MeterProvider=void 0;var lr=O(),tS=rf(),rS=yf(),nS=vf(),oS=kf();class Vf{_sharedState;_shutdown=!1;constructor(n){if(this._sharedState=new rS.MeterProviderSharedState(n?.resource??tS.defaultResource()),n?.views!=null&&n.views.length>0)for(let o of n.views)this._sharedState.viewRegistry.addView(new oS.View(o));if(n?.readers!=null&&n.readers.length>0)for(let o of n.readers){let l=new nS.MetricCollector(this._sharedState,o);o.setMetricProducer(l),this._sharedState.metricCollectors.push(l)}}getMeter(n,o="",l={}){if(this._shutdown)return lr.diag.warn("A shutdown MeterProvider cannot provide a Meter"),lr.createNoopMeter();return this._sharedState.getMeterSharedState({name:n,version:o,schemaUrl:l.schemaUrl}).meter}async shutdown(n){if(this._shutdown){lr.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map((o)=>o.shutdown(n)))}async forceFlush(n){if(this._shutdown){lr.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map((o)=>o.forceFlush(n)))}}Bf.MeterProvider=Vf});var sf=i(function(G){Object.defineProperty(G,"__esModule",{value:!0});G.TimeoutError=G.createDenyListAttributesProcessor=G.createAllowListAttributesProcessor=G.AggregationType=G.MeterProvider=G.ConsoleMetricExporter=G.InMemoryMetricExporter=G.PeriodicExportingMetricReader=G.MetricReader=G.InstrumentType=G.DataPointType=G.AggregationTemporality=void 0;var iS=Jt();Object.defineProperty(G,"AggregationTemporality",{enumerable:!0,get:function(){return iS.AggregationTemporality}});var Gf=me();Object.defineProperty(G,"DataPointType",{enumerable:!0,get:function(){return Gf.DataPointType}});Object.defineProperty(G,"InstrumentType",{enumerable:!0,get:function(){return Gf.InstrumentType}});var uS=pn();Object.defineProperty(G,"MetricReader",{enumerable:!0,get:function(){return uS.MetricReader}});var aS=Cs();Object.defineProperty(G,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return aS.PeriodicExportingMetricReader}});var cS=qs();Object.defineProperty(G,"InMemoryMetricExporter",{enumerable:!0,get:function(){return cS.InMemoryMetricExporter}});var sS=Fs();Object.defineProperty(G,"ConsoleMetricExporter",{enumerable:!0,get:function(){return sS.ConsoleMetricExporter}});var lS=jf();Object.defineProperty(G,"MeterProvider",{enumerable:!0,get:function(){return lS.MeterProvider}});var pS=pt();Object.defineProperty(G,"AggregationType",{enumerable:!0,get:function(){return pS.AggregationType}});var Hf=cr();Object.defineProperty(G,"createAllowListAttributesProcessor",{enumerable:!0,get:function(){return Hf.createAllowListAttributesProcessor}});Object.defineProperty(G,"createDenyListAttributesProcessor",{enumerable:!0,get:function(){return Hf.createDenyListAttributesProcessor}});var fS=ne();Object.defineProperty(G,"TimeoutError",{enumerable:!0,get:function(){return fS.TimeoutError}})});var Kf=i(function(Ff){Object.defineProperty(Ff,"__esModule",{value:!0});Ff.EAggregationTemporality=void 0;var hS;(function(n){n[n.AGGREGATION_TEMPORALITY_UNSPECIFIED=0]="AGGREGATION_TEMPORALITY_UNSPECIFIED",n[n.AGGREGATION_TEMPORALITY_DELTA=1]="AGGREGATION_TEMPORALITY_DELTA",n[n.AGGREGATION_TEMPORALITY_CUMULATIVE=2]="AGGREGATION_TEMPORALITY_CUMULATIVE"})(hS=Ff.EAggregationTemporality||(Ff.EAggregationTemporality={}))});var Mn=i(function(Zf){Object.defineProperty(Zf,"__esModule",{value:!0});Zf.createExportMetricsServiceRequest=Zf.toMetric=Zf.toScopeMetrics=Zf.toResourceMetrics=void 0;var zf=O(),We=sf(),Jf=Kf(),Ot=Kt();function Wf(n,o){let l=Ot.createResource(n.resource,o);return{resource:l,schemaUrl:l.schemaUrl,scopeMetrics:Yf(n.scopeMetrics,o)}}Zf.toResourceMetrics=Wf;function Yf(n,o){return Array.from(n.map((l)=>({scope:Ot.createInstrumentationScope(l.scope),metrics:l.metrics.map((p)=>Xf(p,o)),schemaUrl:l.scope.schemaUrl})))}Zf.toScopeMetrics=Yf;function Xf(n,o){let l={name:n.descriptor.name,description:n.descriptor.description,unit:n.descriptor.unit},p=gS(n.aggregationTemporality);switch(n.dataPointType){case We.DataPointType.SUM:l.sum={aggregationTemporality:p,isMonotonic:n.isMonotonic,dataPoints:$f(n,o)};break;case We.DataPointType.GAUGE:l.gauge={dataPoints:$f(n,o)};break;case We.DataPointType.HISTOGRAM:l.histogram={aggregationTemporality:p,dataPoints:mS(n,o)};break;case We.DataPointType.EXPONENTIAL_HISTOGRAM:l.exponentialHistogram={aggregationTemporality:p,dataPoints:_S(n,o)};break}return l}Zf.toMetric=Xf;function yS(n,o,l){let p={attributes:Ot.toAttributes(n.attributes,l),startTimeUnixNano:l.encodeHrTime(n.startTime),timeUnixNano:l.encodeHrTime(n.endTime)};switch(o){case zf.ValueType.INT:p.asInt=n.value;break;case zf.ValueType.DOUBLE:p.asDouble=n.value;break}return p}function $f(n,o){return n.dataPoints.map((l)=>yS(l,n.descriptor.valueType,o))}function mS(n,o){return n.dataPoints.map((l)=>{let p=l.value;return{attributes:Ot.toAttributes(l.attributes,o),bucketCounts:p.buckets.counts,explicitBounds:p.buckets.boundaries,count:p.count,sum:p.sum,min:p.min,max:p.max,startTimeUnixNano:o.encodeHrTime(l.startTime),timeUnixNano:o.encodeHrTime(l.endTime)}})}function _S(n,o){return n.dataPoints.map((l)=>{let p=l.value;return{attributes:Ot.toAttributes(l.attributes,o),count:p.count,min:p.min,max:p.max,sum:p.sum,positive:{offset:p.positive.offset,bucketCounts:p.positive.bucketCounts},negative:{offset:p.negative.offset,bucketCounts:p.negative.bucketCounts},scale:p.scale,zeroCount:p.zeroCount,startTimeUnixNano:o.encodeHrTime(l.startTime),timeUnixNano:o.encodeHrTime(l.endTime)}})}function gS(n){switch(n){case We.AggregationTemporality.DELTA:return Jf.EAggregationTemporality.AGGREGATION_TEMPORALITY_DELTA;case We.AggregationTemporality.CUMULATIVE:return Jf.EAggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE}}function vS(n,o){return{resourceMetrics:n.map((l)=>Wf(l,o))}}Zf.createExportMetricsServiceRequest=vS});var nd=i(function(td){Object.defineProperty(td,"__esModule",{value:!0});td.ProtobufMetricsSerializer=void 0;var ed=Ht(),TS=Mn(),xS=Ae(),ES=ed.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,AS=ed.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;td.ProtobufMetricsSerializer={serializeRequest:(n)=>{let o=TS.createExportMetricsServiceRequest([n],xS.PROTOBUF_ENCODER);return AS.encode(o).finish()},deserializeResponse:(n)=>ES.decode(n)}});var od=i(function(Un){Object.defineProperty(Un,"__esModule",{value:!0});Un.ProtobufMetricsSerializer=void 0;var NS=nd();Object.defineProperty(Un,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return NS.ProtobufMetricsSerializer}})});var Ln=i(function(sd){Object.defineProperty(sd,"__esModule",{value:!0});sd.createExportTraceServiceRequest=sd.toOtlpSpanEvent=sd.toOtlpLink=sd.sdkSpanToOtlpSpan=void 0;var St=Kt(),wS=256,IS=512;function id(n,o){let l=n&255|wS;if(o)l|=IS;return l}function ud(n,o){let l=n.spanContext(),p=n.status,u=n.parentSpanContext?.spanId?o.encodeSpanContext(n.parentSpanContext?.spanId):void 0;return{traceId:o.encodeSpanContext(l.traceId),spanId:o.encodeSpanContext(l.spanId),parentSpanId:u,traceState:l.traceState?.serialize(),name:n.name,kind:n.kind==null?0:n.kind+1,startTimeUnixNano:o.encodeHrTime(n.startTime),endTimeUnixNano:o.encodeHrTime(n.endTime),attributes:St.toAttributes(n.attributes,o),droppedAttributesCount:n.droppedAttributesCount,events:n.events.map((s)=>cd(s,o)),droppedEventsCount:n.droppedEventsCount,status:{code:p.code,message:p.message},links:n.links.map((s)=>ad(s,o)),droppedLinksCount:n.droppedLinksCount,flags:id(l.traceFlags,n.parentSpanContext?.isRemote)}}sd.sdkSpanToOtlpSpan=ud;function ad(n,o){return{attributes:n.attributes?St.toAttributes(n.attributes,o):[],spanId:o.encodeSpanContext(n.context.spanId),traceId:o.encodeSpanContext(n.context.traceId),traceState:n.context.traceState?.serialize(),droppedAttributesCount:n.droppedAttributesCount||0,flags:id(n.context.traceFlags,n.context.isRemote)}}sd.toOtlpLink=ad;function cd(n,o){return{attributes:n.attributes?St.toAttributes(n.attributes,o):[],name:n.name,timeUnixNano:o.encodeHrTime(n.time),droppedAttributesCount:n.droppedAttributesCount||0}}sd.toOtlpSpanEvent=cd;function RS(n,o){return{resourceSpans:US(n,o)}}sd.createExportTraceServiceRequest=RS;function MS(n){let o=new Map;for(let l of n){let p=o.get(l.resource);if(!p)p=new Map,o.set(l.resource,p);let u=`${l.instrumentationScope.name}@${l.instrumentationScope.version||""}:${l.instrumentationScope.schemaUrl||""}`,s=p.get(u);if(!s)s=[],p.set(u,s);s.push(l)}return o}function US(n,o){let l=MS(n),p=[],u=l.entries(),s=u.next();while(!s.done){let[t,e]=s.value,r=[],a=e.values(),f=a.next();while(!f.done){let M=f.value;if(M.length>0){let F=M.map((le)=>ud(le,o));r.push({scope:St.createInstrumentationScope(M[0].instrumentationScope),spans:F,schemaUrl:M[0].instrumentationScope.schemaUrl})}f=a.next()}let y=St.createResource(t,o),g={resource:y,scopeSpans:r,schemaUrl:y.schemaUrl};p.push(g),s=u.next()}return p}});var hd=i(function(fd){Object.defineProperty(fd,"__esModule",{value:!0});fd.ProtobufTraceSerializer=void 0;var pd=Ht(),kS=Ln(),VS=Ae(),BS=pd.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,qS=pd.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;fd.ProtobufTraceSerializer={serializeRequest:(n)=>{let o=kS.createExportTraceServiceRequest(n,VS.PROTOBUF_ENCODER);return qS.encode(o).finish()},deserializeResponse:(n)=>BS.decode(n)}});var yd=i(function(Cn){Object.defineProperty(Cn,"__esModule",{value:!0});Cn.ProtobufTraceSerializer=void 0;var jS=hd();Object.defineProperty(Cn,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return jS.ProtobufTraceSerializer}})});var gd=i(function(md){Object.defineProperty(md,"__esModule",{value:!0});md.JsonLogsSerializer=void 0;var HS=$r(),FS=Ae();md.JsonLogsSerializer={serializeRequest:(n)=>{let o=HS.createExportLogsServiceRequest(n,FS.JSON_ENCODER);return new TextEncoder().encode(JSON.stringify(o))},deserializeResponse:(n)=>{if(n.length===0)return{};return JSON.parse(new TextDecoder().decode(n))}}});var vd=i(function(Dn){Object.defineProperty(Dn,"__esModule",{value:!0});Dn.JsonLogsSerializer=void 0;var KS=gd();Object.defineProperty(Dn,"JsonLogsSerializer",{enumerable:!0,get:function(){return KS.JsonLogsSerializer}})});var Sd=i(function(bd){Object.defineProperty(bd,"__esModule",{value:!0});bd.JsonMetricsSerializer=void 0;var JS=Mn(),$S=Ae();bd.JsonMetricsSerializer={serializeRequest:(n)=>{let o=JS.createExportMetricsServiceRequest([n],$S.JSON_ENCODER);return new TextEncoder().encode(JSON.stringify(o))},deserializeResponse:(n)=>{if(n.length===0)return{};return JSON.parse(new TextDecoder().decode(n))}}});var Td=i(function(kn){Object.defineProperty(kn,"__esModule",{value:!0});kn.JsonMetricsSerializer=void 0;var WS=Sd();Object.defineProperty(kn,"JsonMetricsSerializer",{enumerable:!0,get:function(){return WS.JsonMetricsSerializer}})});var Ad=i(function(xd){Object.defineProperty(xd,"__esModule",{value:!0});xd.JsonTraceSerializer=void 0;var XS=Ln(),ZS=Ae();xd.JsonTraceSerializer={serializeRequest:(n)=>{let o=XS.createExportTraceServiceRequest(n,ZS.JSON_ENCODER);return new TextEncoder().encode(JSON.stringify(o))},deserializeResponse:(n)=>{if(n.length===0)return{};return JSON.parse(new TextDecoder().decode(n))}}});var Nd=i(function(Vn){Object.defineProperty(Vn,"__esModule",{value:!0});Vn.JsonTraceSerializer=void 0;var QS=Ad();Object.defineProperty(Vn,"JsonTraceSerializer",{enumerable:!0,get:function(){return QS.JsonTraceSerializer}})});var vm=i(function(ge){Object.defineProperty(ge,"__esModule",{value:!0});ge.JsonTraceSerializer=ge.JsonMetricsSerializer=ge.JsonLogsSerializer=ge.ProtobufTraceSerializer=ge.ProtobufMetricsSerializer=ge.ProtobufLogsSerializer=void 0;var tT=ac();Object.defineProperty(ge,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return tT.ProtobufLogsSerializer}});var rT=od();Object.defineProperty(ge,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return rT.ProtobufMetricsSerializer}});var nT=yd();Object.defineProperty(ge,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return nT.ProtobufTraceSerializer}});var oT=vd();Object.defineProperty(ge,"JsonLogsSerializer",{enumerable:!0,get:function(){return oT.JsonLogsSerializer}});var iT=Td();Object.defineProperty(ge,"JsonMetricsSerializer",{enumerable:!0,get:function(){return iT.JsonMetricsSerializer}});var uT=Nd();Object.defineProperty(ge,"JsonTraceSerializer",{enumerable:!0,get:function(){return uT.JsonTraceSerializer}})});var Id=i(function(Pd){Object.defineProperty(Pd,"__esModule",{value:!0});Pd.validateAndNormalizeHeaders=void 0;var cT=O();function sT(n){let o={};return Object.entries(n??{}).forEach(([l,p])=>{if(typeof p<"u")o[l]=String(p);else cT.diag.warn(`Header "${l}" has invalid value (${p}) and will be ignored`)}),o}Pd.validateAndNormalizeHeaders=sT});var Ld=i(function(Md){Object.defineProperty(Md,"__esModule",{value:!0});Md.getHttpConfigurationDefaults=Md.mergeOtlpHttpConfigurationWithDefaults=void 0;var Rd=Xe(),lT=Id();function pT(n,o,l){return async()=>{let p={...await l()},u={};if(o!=null)Object.assign(u,await o());if(n!=null)Object.assign(u,lT.validateAndNormalizeHeaders(await n()));return Object.assign(u,p)}}function fT(n){if(n==null)return;try{let o=globalThis.location?.href;return new URL(n,o).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${n}'`)}}function dT(n,o,l){return{...Rd.mergeOtlpSharedConfigurationWithDefaults(n,o,l),headers:pT(n.headers,o.headers,l.headers),url:fT(n.url)??o.url??l.url}}Md.mergeOtlpHttpConfigurationWithDefaults=dT;function hT(n,o){return{...Rd.getSharedConfigurationDefaults(),headers:async()=>n,url:"http://localhost:4318/"+o}}Md.getHttpConfigurationDefaults=hT});var pr=i(function(kd){Object.defineProperty(kd,"__esModule",{value:!0});kd.getNodeHttpConfigurationDefaults=kd.mergeOtlpNodeHttpConfigurationWithDefaults=kd.httpAgentFactoryFromOptions=void 0;var Cd=Ld();function Dd(n){return async(o)=>{let l=o==="http:",p=l?import("http"):import("https"),{Agent:u}=await p;if(l){let{ca:s,cert:t,key:e,...r}=n;return new u(r)}return new u(n)}}kd.httpAgentFactoryFromOptions=Dd;function mT(n,o,l){return{...Cd.mergeOtlpHttpConfigurationWithDefaults(n,o,l),agentFactory:n.agentFactory??o.agentFactory??l.agentFactory,userAgent:n.userAgent}}kd.mergeOtlpNodeHttpConfigurationWithDefaults=mT;function _T(n,o){return{...Cd.getHttpConfigurationDefaults(n,o),agentFactory:Dd({keepAlive:!0})}}kd.getNodeHttpConfigurationDefaults=_T});var jd=i(function(Bd){Object.defineProperty(Bd,"__esModule",{value:!0});Bd.parseRetryAfterToMills=Bd.isExportHTTPErrorRetryable=void 0;function bT(n){return n===429||n===502||n===503||n===504}Bd.isExportHTTPErrorRetryable=bT;function OT(n){if(n==null)return;let o=Number.parseInt(n,10);if(Number.isInteger(o))return o>0?o*1000:-1;let l=new Date(n).getTime()-Date.now();if(l>=0)return l;return 0}Bd.parseRetryAfterToMills=OT});var Fd=i(function(Gd){Object.defineProperty(Gd,"__esModule",{value:!0});Gd.VERSION=void 0;Gd.VERSION="0.214.0"});var Wd=i(function(Jd){Object.defineProperty(Jd,"__esModule",{value:!0});Jd.compressAndSend=Jd.sendWithHttp=void 0;var TT=c("zlib"),xT=c("stream"),fr=jd(),ET=Et(),AT=Fd(),Kd=`OTel-OTLP-Exporter-JavaScript/${AT.VERSION}`;function NT(n,o,l,p,u,s,t,e){return new Promise((r)=>{let a=new URL(o);if(u)l["User-Agent"]=`${u} ${Kd}`;else l["User-Agent"]=Kd;let f={hostname:a.hostname,port:a.port,path:a.pathname,method:"POST",headers:l,agent:s},y=n(f,(g)=>{let M=[];g.on("data",(F)=>M.push(F)),g.on("end",()=>{if(g.statusCode&&g.statusCode<=299)r({status:"success",data:Buffer.concat(M)});else if(g.statusCode&&fr.isExportHTTPErrorRetryable(g.statusCode))r({status:"retryable",retryInMillis:fr.parseRetryAfterToMills(g.headers["retry-after"])});else{let F=new ET.OTLPExporterError(g.statusMessage,g.statusCode,Buffer.concat(M).toString());r({status:"failure",error:F})}}),g.on("error",(F)=>{if(g.statusCode&&g.statusCode<=299)r({status:"success"});else if(g.statusCode&&fr.isExportHTTPErrorRetryable(g.statusCode))r({status:"retryable",error:F,retryInMillis:fr.parseRetryAfterToMills(g.headers["retry-after"])});else r({status:"failure",error:F})})});y.setTimeout(e,()=>{y.destroy(),r({status:"retryable",error:Error("Request timed out")})}),y.on("error",(g)=>{if(wT(g))r({status:"retryable",error:g});else r({status:"failure",error:g})}),zd(y,p,t,(g)=>{r({status:"failure",error:g})})})}Jd.sendWithHttp=NT;function zd(n,o,l,p){let u=PT(l);if(o==="gzip")n.setHeader("Content-Encoding","gzip"),u=u.on("error",p).pipe(TT.createGzip()).on("error",p);u.pipe(n).on("error",p)}Jd.compressAndSend=zd;function PT(n){let o=new xT.Readable;return o.push(n),o.push(null),o}function wT(n){let o=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in n&&typeof n.code==="string")return o.has(n.code);return!1}});var Qd=i(function(Xd){Object.defineProperty(Xd,"__esModule",{value:!0});Xd.createHttpExporterTransport=void 0;var RT=Wd();class Yd{_utils=null;_parameters;constructor(n){this._parameters=n}async send(n,o){let{agent:l,request:p}=await this._loadUtils(),u=await this._parameters.headers();return RT.sendWithHttp(p,this._parameters.url,u,this._parameters.compression,this._parameters.userAgent,l,n,o)}shutdown(){}async _loadUtils(){let n=this._utils;if(n===null){let o=new URL(this._parameters.url).protocol,[l,p]=await Promise.all([this._parameters.agentFactory(o),MT(o)]);n=this._utils={agent:l,request:p}}return n}}async function MT(n){let o=n==="http:"?import("http"):import("https"),{request:l}=await o;return l}function UT(n){return new Yd(n)}Xd.createHttpExporterTransport=UT});var oh=i(function(rh){Object.defineProperty(rh,"__esModule",{value:!0});rh.createRetryingTransport=void 0;var Tt=O(),Bn=5,LT=1000,CT=5000,DT=1.5,eh=0.2;function kT(){return Math.random()*(2*eh)-eh}class th{_transport;constructor(n){this._transport=n}retry(n,o,l){return new Promise((p,u)=>{setTimeout(()=>{this._transport.send(n,o).then(p,u)},l)})}async send(n,o){let l=Bn,p=LT,u=Date.now()+o,s=await this._transport.send(n,o);while(s.status==="retryable"&&l>0){l--;let t=Math.max(Math.min(p*(1+kT()),CT),0);p=p*DT;let e=s.retryInMillis??t,r=u-Date.now();if(e>r)return Tt.diag.info(`Export retry time ${Math.round(e)}ms exceeds remaining timeout ${Math.round(r)}ms, not retrying further.`),s;Tt.diag.verbose(`Scheduling export retry in ${Math.round(e)}ms`),s=await this.retry(n,r,e)}if(s.status==="success")Tt.diag.verbose(`Export succeeded after ${Bn-l} retry attempts.`);else if(s.status==="retryable")Tt.diag.info(`Export failed after maximum retry attempts (${Bn}).`);else Tt.diag.info(`Export failed with non-retryable error: ${s.error}`);return s}shutdown(){return this._transport.shutdown()}}function VT(n){return new th(n.transport)}rh.createRetryingTransport=VT});var ah=i(function(ih){Object.defineProperty(ih,"__esModule",{value:!0});ih.createOtlpHttpExportDelegate=void 0;var BT=Mr(),qT=Qd(),jT=mr(),GT=oh();function HT(n,o){return BT.createOtlpExportDelegate({transport:GT.createRetryingTransport({transport:qT.createHttpExporterTransport(n)}),serializer:o,promiseHandler:jT.createBoundedQueueExportPromiseHandler(n)},{timeout:n.timeoutMillis})}ih.createOtlpHttpExportDelegate=HT});var qn=i(function(fh){Object.defineProperty(fh,"__esModule",{value:!0});fh.getSharedConfigurationFromEnvironment=void 0;var lh=kt(),ph=O();function ch(n){let o=lh.getNumberFromEnv(n);if(o!=null){if(Number.isFinite(o)&&o>0)return o;ph.diag.warn(`Configuration: ${n} is invalid, expected number greater than 0 (actual: ${o})`)}return}function FT(n){let o=ch(`OTEL_EXPORTER_OTLP_${n}_TIMEOUT`),l=ch("OTEL_EXPORTER_OTLP_TIMEOUT");return o??l}function sh(n){let o=lh.getStringFromEnv(n)?.trim();if(o==null||o==="none"||o==="gzip")return o;ph.diag.warn(`Configuration: ${n} is invalid, expected 'none' or 'gzip' (actual: '${o}')`);return}function KT(n){let o=sh(`OTEL_EXPORTER_OTLP_${n}_COMPRESSION`),l=sh("OTEL_EXPORTER_OTLP_COMPRESSION");return o??l}function zT(n){return{timeoutMillis:FT(n),compression:KT(n)}}fh.getSharedConfigurationFromEnvironment=zT});var mh=i(function(hh){Object.defineProperty(hh,"__esModule",{value:!0});hh.getNodeHttpConfigurationFromEnvironment=void 0;var JT=c("fs"),$T=c("path"),ie=kt(),dr=O(),WT=qn(),YT=Xe(),XT=pr();function ZT(n){let o=ie.getStringFromEnv(`OTEL_EXPORTER_OTLP_${n}_HEADERS`),l=ie.getStringFromEnv("OTEL_EXPORTER_OTLP_HEADERS"),p=ie.parseKeyPairsIntoRecord(o),u=ie.parseKeyPairsIntoRecord(l);if(Object.keys(p).length===0&&Object.keys(u).length===0)return;return Object.assign({},ie.parseKeyPairsIntoRecord(l),ie.parseKeyPairsIntoRecord(o))}function QT(n){try{return new URL(n).toString()}catch{dr.diag.warn(`Configuration: Could not parse environment-provided export URL: '${n}', falling back to undefined`);return}}function ex(n,o){try{new URL(n)}catch{dr.diag.warn(`Configuration: Could not parse environment-provided export URL: '${n}', falling back to undefined`);return}if(!n.endsWith("/"))n=n+"/";n+=o;try{new URL(n)}catch{dr.diag.warn(`Configuration: Provided URL appended with '${o}' is not a valid URL, using 'undefined' instead of '${n}'`);return}return n}function tx(n){let o=ie.getStringFromEnv("OTEL_EXPORTER_OTLP_ENDPOINT");if(o===void 0)return;return ex(o,n)}function rx(n){let o=ie.getStringFromEnv(`OTEL_EXPORTER_OTLP_${n}_ENDPOINT`);if(o===void 0)return;return QT(o)}function jn(n,o,l){let p=ie.getStringFromEnv(n),u=ie.getStringFromEnv(o),s=p??u;if(s!=null)try{return JT.readFileSync($T.resolve(process.cwd(),s))}catch{dr.diag.warn(l);return}else return}function nx(n){return jn(`OTEL_EXPORTER_OTLP_${n}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function ox(n){return jn(`OTEL_EXPORTER_OTLP_${n}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function ix(n){return jn(`OTEL_EXPORTER_OTLP_${n}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function ux(n,o){return{...WT.getSharedConfigurationFromEnvironment(n),url:rx(n)??tx(o),headers:YT.wrapStaticHeadersInFunction(ZT(n)),agentFactory:XT.httpAgentFactoryFromOptions({keepAlive:!0,ca:ix(n),cert:nx(n),key:ox(n)})}}hh.getNodeHttpConfigurationFromEnvironment=ux});var vh=i(function(_h){Object.defineProperty(_h,"__esModule",{value:!0});_h.convertLegacyHeaders=void 0;var ax=Xe();function cx(n){if(typeof n.headers==="function")return n.headers;return ax.wrapStaticHeadersInFunction(n.headers)}_h.convertLegacyHeaders=cx});var Th=i(function(Oh){Object.defineProperty(Oh,"__esModule",{value:!0});Oh.convertLegacyHttpOptions=void 0;var sx=O(),bh=pr(),lx=Gu(),px=mh(),fx=vh();function dx(n){if(typeof n.httpAgentOptions==="function")return n.httpAgentOptions;let o=n.httpAgentOptions;if(n.keepAlive!=null)o={keepAlive:n.keepAlive,...o};if(o!=null)return lx.httpAgentFactoryFromOptions(o);else return}function hx(n,o,l,p){if(n.metadata)sx.diag.warn("Metadata cannot be set when using http");return bh.mergeOtlpNodeHttpConfigurationWithDefaults({url:n.url,headers:fx.convertLegacyHeaders(n),concurrencyLimit:n.concurrencyLimit,timeoutMillis:n.timeoutMillis,compression:n.compression,agentFactory:dx(n),userAgent:n.userAgent},px.getNodeHttpConfigurationFromEnvironment(o,l),bh.getNodeHttpConfigurationDefaults(p,l))}Oh.convertLegacyHttpOptions=hx});var Gu=i(function(Ye){Object.defineProperty(Ye,"__esModule",{value:!0});Ye.convertLegacyHttpOptions=Ye.getSharedConfigurationFromEnvironment=Ye.createOtlpHttpExportDelegate=Ye.httpAgentFactoryFromOptions=void 0;var yx=pr();Object.defineProperty(Ye,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return yx.httpAgentFactoryFromOptions}});var mx=ah();Object.defineProperty(Ye,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return mx.createOtlpHttpExportDelegate}});var _x=qn();Object.defineProperty(Ye,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return _x.getSharedConfigurationFromEnvironment}});var gx=Th();Object.defineProperty(Ye,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return gx.convertLegacyHttpOptions}})});var Ph=i(function(Ah){Object.defineProperty(Ah,"__esModule",{value:!0});Ah.OTLPTraceExporter=void 0;var bx=bm(),Ox=vm(),xh=Gu();class Eh extends bx.OTLPExporterBase{constructor(n={}){super(xh.createOtlpHttpExportDelegate(xh.convertLegacyHttpOptions(n,"TRACES","v1/traces",{"Content-Type":"application/json"}),Ox.JsonTraceSerializer))}}Ah.OTLPTraceExporter=Eh});var wh=i(function(Gn){Object.defineProperty(Gn,"__esModule",{value:!0});Gn.OTLPTraceExporter=void 0;var Sx=Ph();Object.defineProperty(Gn,"OTLPTraceExporter",{enumerable:!0,get:function(){return Sx.OTLPTraceExporter}})});var Ih=i(function(Hn){Object.defineProperty(Hn,"__esModule",{value:!0});Hn.OTLPTraceExporter=void 0;var xx=wh();Object.defineProperty(Hn,"OTLPTraceExporter",{enumerable:!0,get:function(){return xx.OTLPTraceExporter}})});var po=i(function(Fn){Object.defineProperty(Fn,"__esModule",{value:!0});Fn.OTLPTraceExporter=void 0;var Ax=Ih();Object.defineProperty(Fn,"OTLPTraceExporter",{enumerable:!0,get:function(){return Ax.OTLPTraceExporter}})});
14
+ export{kt,bm,rf,sf,vm,Gu,po};