import{createRequire}from"module";const require=createRequire(import.meta.url); var hY=Object.create;var _c=Object.defineProperty;var vY=Object.getOwnPropertyDescriptor;var RY=Object.getOwnPropertyNames;var mY=Object.getPrototypeOf,OY=Object.prototype.hasOwnProperty;var H=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var S=(o,e)=>()=>(o&&(e=o(o=0)),e);var A=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Me=(o,e)=>{for(var t in e)_c(o,t,{get:e[t],enumerable:!0})},cR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of RY(e))!OY.call(o,a)&&a!==t&&_c(o,a,{get:()=>e[a],enumerable:!(i=vY(e,a))||i.enumerable});return o};var fn=(o,e,t)=>(t=o!=null?hY(mY(o)):{},cR(e||!o||!o.__esModule?_c(t,"default",{value:o,enumerable:!0}):t,o)),$=o=>cR(_c({},"__esModule",{value:!0}),o);var uR,ER=S(()=>{uR=typeof globalThis=="object"?globalThis:global});var _R=S(()=>{ER()});var TR=S(()=>{_R()});var Xr,NS=S(()=>{Xr="1.9.0"});function NY(o){var e=new Set([o]),t=new Set,i=o.match(SR);if(!i)return function(){return!1};var a={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]};if(a.prerelease!=null)return function(l){return l===o};function s(r){return t.add(r),!1}function n(r){return e.add(r),!0}return function(l){if(e.has(l))return!0;if(t.has(l))return!1;var c=l.match(SR);if(!c)return s(l);var u={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return u.prerelease!=null||a.major!==u.major?s(l):a.major===0?a.minor===u.minor&&a.patch<=u.patch?n(l):s(l):a.minor<=u.minor?n(l):s(l)}}var SR,pR,dR=S(()=>{NS();SR=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;pR=NY(Xr)});function vr(o,e,t,i){var a;i===void 0&&(i=!1);var s=ss[as]=(a=ss[as])!==null&&a!==void 0?a:{version:Xr};if(!i&&s[o]){var n=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+o);return t.error(n.stack||n.message),!1}if(s.version!==Xr){var n=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+o+" does not match previously registered API v"+Xr);return t.error(n.stack||n.message),!1}return s[o]=e,t.debug("@opentelemetry/api: Registered a global for "+o+" v"+Xr+"."),!0}function It(o){var e,t,i=(e=ss[as])===null||e===void 0?void 0:e.version;if(!(!i||!pR(i)))return(t=ss[as])===null||t===void 0?void 0:t[o]}function Rr(o,e){e.debug("@opentelemetry/api: Unregistering a global for "+o+" v"+Xr+".");var t=ss[as];t&&delete t[o]}var MY,as,ss,_o=S(()=>{TR();NS();dR();MY=Xr.split(".")[0],as=Symbol.for("opentelemetry.js.api."+MY),ss=uR});function ls(o,e,t){var i=It("diag");if(i)return t.unshift(e),i[o].apply(i,PY([],CY(t),!1))}var CY,PY,fR,AR=S(()=>{_o();CY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},PY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i{(function(o){o[o.NONE=0]="NONE",o[o.ERROR=30]="ERROR",o[o.WARN=50]="WARN",o[o.INFO=60]="INFO",o[o.DEBUG=70]="DEBUG",o[o.VERBOSE=80]="VERBOSE",o[o.ALL=9999]="ALL"})(me||(me={}))});function hR(o,e){ome.ALL&&(o=me.ALL),e=e||{};function t(i,a){var s=e[i];return typeof s=="function"&&o>=a?s.bind(e):function(){}}return{error:t("error",me.ERROR),warn:t("warn",me.WARN),info:t("info",me.INFO),debug:t("debug",me.DEBUG),verbose:t("verbose",me.VERBOSE)}}var vR=S(()=>{Tc()});var gY,LY,yY,at,To=S(()=>{AR();vR();Tc();_o();gY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},LY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i";u.warn("Current logger will be overwritten from "+d),E.warn("Current logger will overwrite one already registered from "+d)}return vr("diag",E,t,!0)};t.setLogger=i,t.disable=function(){Rr(yY,t)},t.createComponentLogger=function(a){return new fR(a)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return o.instance=function(){return this._instance||(this._instance=new o),this._instance},o}()});var IY,DY,RR,mR=S(()=>{IY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},DY=function(o){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&o[e],i=0;if(t)return t.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},RR=function(){function o(e){this._entries=e?new Map(e):new Map}return o.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},o.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=IY(e,2),i=t[0],a=t[1];return[i,a]})},o.prototype.setEntry=function(e,t){var i=new o(this._entries);return i._entries.set(e,t),i},o.prototype.removeEntry=function(e){var t=new o(this._entries);return t._entries.delete(e),t},o.prototype.removeEntries=function(){for(var e,t,i=[],a=0;a{OR=Symbol("BaggageEntryMetadata")});function MR(o){return o===void 0&&(o={}),new RR(new Map(Object.entries(o)))}function Sc(o){return typeof o!="string"&&(xY.error("Cannot create baggage metadata from unknown type: "+typeof o),o=""),{__TYPE__:OR,toString:function(){return o}}}var xY,MS=S(()=>{To();mR();NR();xY=at.instance()});function Gt(o){return Symbol.for(o)}var UY,pc,cs=S(()=>{UY=function(){function o(e){var t=this;t._currentContext=e?new Map(e):new Map,t.getValue=function(i){return t._currentContext.get(i)},t.setValue=function(i,a){var s=new o(t._currentContext);return s._currentContext.set(i,a),s},t.deleteValue=function(i){var a=new o(t._currentContext);return a._currentContext.delete(i),a}}return o}(),pc=new UY});var CS,dc,CR=S(()=>{CS=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],dc=function(){function o(){function e(i){return function(){for(var a=[],s=0;s{So=function(){var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(i[s]=a[s])},o(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),bY=function(){function o(){}return o.prototype.createGauge=function(e,t){return KY},o.prototype.createHistogram=function(e,t){return qY},o.prototype.createCounter=function(e,t){return FY},o.prototype.createUpDownCounter=function(e,t){return WY},o.prototype.createObservableGauge=function(e,t){return zY},o.prototype.createObservableCounter=function(e,t){return jY},o.prototype.createObservableUpDownCounter=function(e,t){return $Y},o.prototype.addBatchObservableCallback=function(e,t){},o.prototype.removeBatchObservableCallback=function(e){},o}(),fc=function(){function o(){}return o}(),VY=function(o){So(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.add=function(t,i){},e}(fc),wY=function(o){So(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.add=function(t,i){},e}(fc),BY=function(o){So(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.record=function(t,i){},e}(fc),GY=function(o){So(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.record=function(t,i){},e}(fc),PS=function(){function o(){}return o.prototype.addCallback=function(e){},o.prototype.removeCallback=function(e){},o}(),HY=function(o){So(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(PS),kY=function(o){So(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(PS),YY=function(o){So(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(PS),gS=new bY,FY=new VY,KY=new BY,qY=new GY,WY=new wY,jY=new HY,zY=new kY,$Y=new YY});var Rt,PR=S(()=>{(function(o){o[o.INT=0]="INT",o[o.DOUBLE=1]="DOUBLE"})(Rt||(Rt={}))});var hc,vc,yS=S(()=>{hc={get:function(o,e){if(o!=null)return o[e]},keys:function(o){return o==null?[]:Object.keys(o)}},vc={set:function(o,e,t){o!=null&&(o[e]=t)}}});var XY,JY,gR,LR=S(()=>{cs();XY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},JY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i{LR();_o();To();QY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},ZY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i{(function(o){o[o.NONE=0]="NONE",o[o.SAMPLED=1]="SAMPLED"})(Se||(Se={}))});var Es,_s,ni,Rc=S(()=>{DS();Es="0000000000000000",_s="00000000000000000000000000000000",ni={traceId:_s,spanId:Es,traceFlags:Se.NONE}});var hn,mc=S(()=>{Rc();hn=function(){function o(e){e===void 0&&(e=ni),this._spanContext=e}return o.prototype.spanContext=function(){return this._spanContext},o.prototype.setAttribute=function(e,t){return this},o.prototype.setAttributes=function(e){return this},o.prototype.addEvent=function(e,t){return this},o.prototype.addLink=function(e){return this},o.prototype.addLinks=function(e){return this},o.prototype.setStatus=function(e){return this},o.prototype.updateName=function(e){return this},o.prototype.end=function(e){},o.prototype.isRecording=function(){return!1},o.prototype.recordException=function(e,t){},o}()});function Oc(o){return o.getValue(xS)||void 0}function yR(){return Oc(An.getInstance().active())}function Ts(o,e){return o.setValue(xS,e)}function IR(o){return o.deleteValue(xS)}function DR(o,e){return Ts(o,new hn(e))}function Nc(o){var e;return(e=Oc(o))===null||e===void 0?void 0:e.spanContext()}var xS,US=S(()=>{cs();mc();us();xS=Gt("OpenTelemetry Context Key SPAN")});function sr(o){return tF.test(o)&&o!==_s}function po(o){return rF.test(o)&&o!==Es}function qe(o){return sr(o.traceId)&&po(o.spanId)}function xR(o){return new hn(o)}var tF,rF,Mc=S(()=>{Rc();mc();tF=/^([0-9a-f]{32})$/i,rF=/^[0-9a-f]{16}$/i});function nF(o){return typeof o=="object"&&typeof o.spanId=="string"&&typeof o.traceId=="string"&&typeof o.traceFlags=="number"}var bS,Cc,VS=S(()=>{us();US();mc();Mc();bS=An.getInstance(),Cc=function(){function o(){}return o.prototype.startSpan=function(e,t,i){i===void 0&&(i=bS.active());var a=!!(t!=null&&t.root);if(a)return new hn;var s=i&&Nc(i);return nF(s)&&qe(s)?new hn(s):new hn},o.prototype.startActiveSpan=function(e,t,i,a){var s,n,r;if(!(arguments.length<2)){arguments.length===2?r=t:arguments.length===3?(s=t,r=i):(s=t,n=i,r=a);var l=n??bS.active(),c=this.startSpan(e,s,l),u=Ts(l,c);return bS.with(u,r,void 0,c)}},o}()});var oF,Pc,wS=S(()=>{VS();oF=new Cc,Pc=function(){function o(e,t,i,a){this._provider=e,this.name=t,this.version=i,this.options=a}return o.prototype.startSpan=function(e,t,i){return this._getTracer().startSpan(e,t,i)},o.prototype.startActiveSpan=function(e,t,i,a){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},o.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):oF},o}()});var UR,bR=S(()=>{VS();UR=function(){function o(){}return o.prototype.getTracer=function(e,t,i){return new Cc},o}()});var iF,Ss,BS=S(()=>{wS();bR();iF=new UR,Ss=function(){function o(){}return o.prototype.getTracer=function(e,t,i){var a;return(a=this.getDelegateTracer(e,t,i))!==null&&a!==void 0?a:new Pc(this,e,t,i)},o.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:iF},o.prototype.setDelegate=function(e){this._delegate=e},o.prototype.getDelegateTracer=function(e,t,i){var a;return(a=this._delegate)===null||a===void 0?void 0:a.getTracer(e,t,i)},o}()});var mt,VR=S(()=>{(function(o){o[o.NOT_RECORD=0]="NOT_RECORD",o[o.RECORD=1]="RECORD",o[o.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(mt||(mt={}))});var Ht,wR=S(()=>{(function(o){o[o.INTERNAL=0]="INTERNAL",o[o.SERVER=1]="SERVER",o[o.CLIENT=2]="CLIENT",o[o.PRODUCER=3]="PRODUCER",o[o.CONSUMER=4]="CONSUMER"})(Ht||(Ht={}))});var mr,BR=S(()=>{(function(o){o[o.UNSET=0]="UNSET",o[o.OK=1]="OK",o[o.ERROR=2]="ERROR"})(mr||(mr={}))});function GR(o){return lF.test(o)}function HR(o){return cF.test(o)&&!uF.test(o)}var GS,aF,sF,lF,cF,uF,kR=S(()=>{GS="[_0-9a-z-*/]",aF="[a-z]"+GS+"{0,255}",sF="[a-z0-9]"+GS+"{0,240}@[a-z]"+GS+"{0,13}",lF=new RegExp("^(?:"+aF+"|"+sF+")$"),cF=/^[ -~]{0,255}[!-~]$/,uF=/,|=/});var YR,EF,FR,KR,qR,WR=S(()=>{kR();YR=32,EF=512,FR=",",KR="=",qR=function(){function o(e){this._internalState=new Map,e&&this._parse(e)}return o.prototype.set=function(e,t){var i=this._clone();return i._internalState.has(e)&&i._internalState.delete(e),i._internalState.set(e,t),i},o.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},o.prototype.get=function(e){return this._internalState.get(e)},o.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,i){return t.push(i+KR+e.get(i)),t},[]).join(FR)},o.prototype._parse=function(e){e.length>EF||(this._internalState=e.split(FR).reverse().reduce(function(t,i){var a=i.trim(),s=a.indexOf(KR);if(s!==-1){var n=a.slice(0,s),r=a.slice(s+1,i.length);GR(n)&&HR(r)&&t.set(n,r)}return t},new Map),this._internalState.size>YR&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,YR))))},o.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},o.prototype._clone=function(){var e=new o;return e._internalState=new Map(this._internalState),e},o}()});function jR(o){return new qR(o)}var zR=S(()=>{WR()});var Ye,$R=S(()=>{us();Ye=An.getInstance()});var m,XR=S(()=>{To();m=at.instance()});var _F,JR,QR=S(()=>{LS();_F=function(){function o(){}return o.prototype.getMeter=function(e,t,i){return gS},o}(),JR=new _F});var HS,ZR,em=S(()=>{QR();_o();To();HS="metrics",ZR=function(){function o(){}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalMeterProvider=function(e){return vr(HS,e,at.instance())},o.prototype.getMeterProvider=function(){return It(HS)||JR},o.prototype.getMeter=function(e,t,i){return this.getMeterProvider().getMeter(e,t,i)},o.prototype.disable=function(){Rr(HS,at.instance())},o}()});var fo,tm=S(()=>{em();fo=ZR.getInstance()});var rm,nm=S(()=>{rm=function(){function o(){}return o.prototype.inject=function(e,t){},o.prototype.extract=function(e,t){return e},o.prototype.fields=function(){return[]},o}()});function YS(o){return o.getValue(kS)||void 0}function om(){return YS(An.getInstance().active())}function im(o,e){return o.setValue(kS,e)}function am(o){return o.deleteValue(kS)}var kS,sm=S(()=>{us();cs();kS=Gt("OpenTelemetry Baggage Key")});var FS,TF,lm,cm=S(()=>{_o();nm();yS();sm();MS();To();FS="propagation",TF=new rm,lm=function(){function o(){this.createBaggage=MR,this.getBaggage=YS,this.getActiveBaggage=om,this.setBaggage=im,this.deleteBaggage=am}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalPropagator=function(e){return vr(FS,e,at.instance())},o.prototype.inject=function(e,t,i){return i===void 0&&(i=vc),this._getGlobalPropagator().inject(e,t,i)},o.prototype.extract=function(e,t,i){return i===void 0&&(i=hc),this._getGlobalPropagator().extract(e,t,i)},o.prototype.fields=function(){return this._getGlobalPropagator().fields()},o.prototype.disable=function(){Rr(FS,at.instance())},o.prototype._getGlobalPropagator=function(){return It(FS)||TF},o}()});var Ot,um=S(()=>{cm();Ot=lm.getInstance()});var KS,Em,_m=S(()=>{_o();BS();Mc();US();To();KS="trace",Em=function(){function o(){this._proxyTracerProvider=new Ss,this.wrapSpanContext=xR,this.isSpanContextValid=qe,this.deleteSpan=IR,this.getSpan=Oc,this.getActiveSpan=yR,this.getSpanContext=Nc,this.setSpan=Ts,this.setSpanContext=DR}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalTracerProvider=function(e){var t=vr(KS,this._proxyTracerProvider,at.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},o.prototype.getTracerProvider=function(){return It(KS)||this._proxyTracerProvider},o.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},o.prototype.disable=function(){Rr(KS,at.instance()),this._proxyTracerProvider=new Ss},o}()});var Ee,Tm=S(()=>{_m();Ee=Em.getInstance()});var Ze={};Me(Ze,{DiagConsoleLogger:()=>dc,DiagLogLevel:()=>me,INVALID_SPANID:()=>Es,INVALID_SPAN_CONTEXT:()=>ni,INVALID_TRACEID:()=>_s,ProxyTracer:()=>Pc,ProxyTracerProvider:()=>Ss,ROOT_CONTEXT:()=>pc,SamplingDecision:()=>mt,SpanKind:()=>Ht,SpanStatusCode:()=>mr,TraceFlags:()=>Se,ValueType:()=>Rt,baggageEntryMetadataFromString:()=>Sc,context:()=>Ye,createContextKey:()=>Gt,createNoopMeter:()=>Ac,createTraceState:()=>jR,default:()=>SF,defaultTextMapGetter:()=>hc,defaultTextMapSetter:()=>vc,diag:()=>m,isSpanContextValid:()=>qe,isValidSpanId:()=>po,isValidTraceId:()=>sr,metrics:()=>fo,propagation:()=>Ot,trace:()=>Ee});var SF,x=S(()=>{MS();cs();CR();Tc();LS();PR();yS();wS();BS();VR();wR();BR();DS();zR();Mc();Rc();$R();XR();tm();um();Tm();SF={context:Ye,diag:m,metrics:fo,propagation:Ot,trace:Ee}});var Sm=S(()=>{});var pm=S(()=>{Sm()});var pF,dF,fF,AF,hF,vF,RF,mF,OF,NF,MF,CF,PF,gF,LF,yF,IF,DF,xF,dm,fm,Am,hm,vm,Rm,mm,Om,Nm,Mm,Cm,gc,ps,Lc,yc,Pm,qS,WS,jS,gm=S(()=>{pF="host.id",dF="host.name",fF="host.arch",AF="os.type",hF="os.version",vF="process.pid",RF="process.executable.name",mF="process.executable.path",OF="process.command",NF="process.command_args",MF="process.owner",CF="process.runtime.name",PF="process.runtime.version",gF="process.runtime.description",LF="service.name",yF="service.instance.id",IF="telemetry.sdk.name",DF="telemetry.sdk.language",xF="telemetry.sdk.version",dm=pF,fm=dF,Am=fF,hm=AF,vm=hF,Rm=vF,mm=RF,Om=mF,Nm=OF,Mm=NF,Cm=MF,gc=CF,ps=PF,Lc=gF,yc=LF,Pm=yF,qS=IF,WS=DF,jS=xF});var Lm=S(()=>{gm()});var ym=S(()=>{});var Im=S(()=>{});var vn=S(()=>{pm();Lm();ym();Im()});function oi(o){return o.setValue(zS,!0)}function Dm(o){return o.deleteValue(zS)}function st(o){return o.getValue(zS)===!0}var zS,ds=S(()=>{x();zS=Gt("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var xm,Ic,ii,Dc,$S=S(()=>{xm="=",Ic=";",ii=",",Dc="baggage"});function xc(o){return o.reduce((e,t)=>{let i=`${e}${e!==""?ii:""}${t}`;return i.length>8192?e:i},"")}function Uc(o){return o.getAllEntries().map(([e,t])=>{let i=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(i+=Ic+t.metadata.toString()),i})}function fs(o){let e=o.split(Ic);if(e.length<=0)return;let t=e.shift();if(!t)return;let i=t.indexOf(xm);if(i<=0)return;let a=decodeURIComponent(t.substring(0,i).trim()),s=decodeURIComponent(t.substring(i+1).trim()),n;return e.length>0&&(n=Sc(e.join(Ic))),{key:a,value:s,metadata:n}}function Um(o){return typeof o!="string"||o.length===0?{}:o.split(ii).map(e=>fs(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}var XS=S(()=>{x();$S()});var ai,bm=S(()=>{x();ds();$S();XS();ai=class{inject(e,t,i){let a=Ot.getBaggage(e);if(!a||st(e))return;let s=Uc(a).filter(r=>r.length<=4096).slice(0,180),n=xc(s);n.length>0&&i.set(t,Dc,n)}extract(e,t,i){let a=i.get(t,Dc),s=Array.isArray(a)?a.join(ii):a;if(!s)return e;let n={};return s.length===0||(s.split(ii).forEach(l=>{let c=fs(l);if(c){let u={value:c.value};c.metadata&&(u.metadata=c.metadata),n[c.key]=u}}),Object.entries(n).length===0)?e:Ot.setBaggage(e,Ot.createBaggage(n))}fields(){return[Dc]}}});var bc,Vm=S(()=>{bc=class{constructor(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}}});function Rn(o){let e={};if(typeof o!="object"||o==null)return e;for(let[t,i]of Object.entries(o)){if(!JS(t)){m.warn(`Invalid attribute key: ${t}`);continue}if(!mn(i)){m.warn(`Invalid attribute value set for key: ${t}`);continue}Array.isArray(i)?e[t]=i.slice():e[t]=i}return e}function JS(o){return typeof o=="string"&&o.length>0}function mn(o){return o==null?!0:Array.isArray(o)?wF(o):wm(o)}function wF(o){let e;for(let t of o)if(t!=null){if(!e){if(wm(t)){e=typeof t;continue}return!1}if(typeof t!==e)return!1}return!0}function wm(o){switch(typeof o){case"number":case"boolean":case"string":return!0}return!1}var Bm=S(()=>{x()});function Vc(){return o=>{m.error(BF(o))}}function BF(o){return typeof o=="string"?o:JSON.stringify(GF(o))}function GF(o){let e={},t=o;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(i=>{if(e[i])return;let a=t[i];a&&(e[i]=String(a))}),t=Object.getPrototypeOf(t);return e}var QS=S(()=>{x()});function Hm(o){Gm=o}function Oe(o){try{Gm(o)}catch{}}var Gm,ZS=S(()=>{QS();Gm=Vc()});var Nt,ep=S(()=>{(function(o){o.AlwaysOff="always_off",o.AlwaysOn="always_on",o.ParentBasedAlwaysOff="parentbased_always_off",o.ParentBasedAlwaysOn="parentbased_always_on",o.ParentBasedTraceIdRatio="parentbased_traceidratio",o.TraceIdRatio="traceidratio"})(Nt||(Nt={}))});function YF(o){return kF.indexOf(o)>-1}function KF(o){return FF.indexOf(o)>-1}function WF(o){return qF.indexOf(o)>-1}function jF(o,e,t){if(typeof t[o]>"u")return;let i=String(t[o]);e[o]=i.toLowerCase()==="true"}function zF(o,e,t,i=-1/0,a=1/0){if(typeof t[o]<"u"){let s=Number(t[o]);isNaN(s)||(sa?e[o]=a:e[o]=s)}}function $F(o,e,t,i=HF){let a=t[o];typeof a=="string"&&(e[o]=a.split(i).map(s=>s.trim()))}function JF(o,e,t){let i=t[o];if(typeof i=="string"){let a=XF[i.toUpperCase()];a!=null&&(e[o]=a)}}function hs(o){let e={};for(let t in As){let i=t;switch(i){case"OTEL_LOG_LEVEL":JF(i,e,o);break;default:if(YF(i))jF(i,e,o);else if(KF(i))zF(i,e,o);else if(WF(i))$F(i,e,o);else{let a=o[i];typeof a<"u"&&a!==null&&(e[i]=String(a))}}}return e}var HF,kF,FF,qF,Jr,Qr,tp,rp,As,XF,np=S(()=>{x();ep();HF=",",kF=["OTEL_SDK_DISABLED"];FF=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];qF=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];Jr=1/0,Qr=128,tp=128,rp=128,As={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:me.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Jr,OTEL_ATTRIBUTE_COUNT_LIMIT:Qr,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Jr,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Qr,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Jr,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Qr,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:tp,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:rp,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Nt.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};XF={ALL:me.ALL,VERBOSE:me.VERBOSE,DEBUG:me.DEBUG,INFO:me.INFO,WARN:me.WARN,ERROR:me.ERROR,NONE:me.NONE}});function Ue(){let o=hs(process.env);return Object.assign({},As,o)}function On(){return hs(process.env)}var km=S(()=>{np()});var wc,Ym=S(()=>{wc=typeof globalThis=="object"?globalThis:global});function Fm(o){return o>=48&&o<=57?o-48:o>=97&&o<=102?o-87:o-55}function Nn(o){let e=new Uint8Array(o.length/2),t=0;for(let i=0;i{});function Bc(o){return Buffer.from(Nn(o)).toString("base64")}var Km=S(()=>{op()});function qm(o){return function(){for(let t=0;t>>0,t*4);for(let t=0;t0);t++)t===o-1&&(Gc[o-1]=1);return Gc.toString("hex",0,o)}}var si,Gc,Wm=S(()=>{si=class{constructor(){this.generateTraceId=qm(16),this.generateSpanId=qm(8)}},Gc=Buffer.allocUnsafe(16)});import{performance as QF}from"perf_hooks";var kt,jm=S(()=>{kt=QF});var Hc,ip=S(()=>{Hc="1.29.0"});var zm=S(()=>{});var $m=S(()=>{zm()});var ZF,e2,t2,r2,Xm,Jm,Qm,Zm,n2,eO,tO=S(()=>{ZF="process.runtime.name",e2="telemetry.sdk.name",t2="telemetry.sdk.language",r2="telemetry.sdk.version",Xm=ZF,Jm=e2,Qm=t2,Zm=r2,n2="nodejs",eO=n2});var rO=S(()=>{tO()});var nO=S(()=>{});var oO=S(()=>{});var iO=S(()=>{$m();rO();nO();oO()});var Mn,aO=S(()=>{ip();iO();Mn={[Jm]:"opentelemetry",[Xm]:"node",[Qm]:eO,[Zm]:Hc}});function Or(o){o.unref()}var sO=S(()=>{});var lO=S(()=>{km();Ym();Km();Wm();jm();aO();sO()});var ap=S(()=>{lO()});function et(o){let e=o/1e3,t=Math.trunc(e),i=Math.round(o%1e3*i2);return[t,i]}function li(){let o=kt.timeOrigin;if(typeof o!="number"){let e=kt;o=e.timing&&e.timing.fetchStart}return o}function vs(o){let e=et(li()),t=et(typeof o=="number"?o:kt.now());return Os(e,t)}function Rs(o){if(ci(o))return o;if(typeof o=="number")return o=kc&&(t[1]-=kc,t[0]+=1),t}var cO,o2,i2,kc,_O=S(()=>{ap();cO=9,o2=6,i2=Math.pow(10,o2),kc=Math.pow(10,cO)});var X,TO=S(()=>{(function(o){o[o.SUCCESS=0]="SUCCESS",o[o.FAILED=1]="FAILED"})(X||(X={}))});var ui,SO=S(()=>{x();ui=class{constructor(e={}){var t;this._propagators=(t=e.propagators)!==null&&t!==void 0?t:[],this._fields=Array.from(new Set(this._propagators.map(i=>typeof i.fields=="function"?i.fields():[]).reduce((i,a)=>i.concat(a),[])))}inject(e,t,i){for(let a of this._propagators)try{a.inject(e,t,i)}catch(s){m.warn(`Failed to inject with ${a.constructor.name}. Err: ${s.message}`)}}extract(e,t,i){return this._propagators.reduce((a,s)=>{try{return s.extract(a,t,i)}catch(n){m.warn(`Failed to extract with ${s.constructor.name}. Err: ${n.message}`)}return a},e)}fields(){return this._fields.slice()}}});function pO(o){return l2.test(o)}function dO(o){return c2.test(o)&&!u2.test(o)}var sp,a2,s2,l2,c2,u2,fO=S(()=>{sp="[_0-9a-z-*/]",a2=`[a-z]${sp}{0,255}`,s2=`[a-z0-9]${sp}{0,240}@[a-z]${sp}{0,13}`,l2=new RegExp(`^(?:${a2}|${s2})$`),c2=/^[ -~]{0,255}[!-~]$/,u2=/,|=/});var AO,E2,hO,vO,Ei,lp=S(()=>{fO();AO=32,E2=512,hO=",",vO="=",Ei=class o{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let i=this._clone();return i._internalState.has(e)&&i._internalState.delete(e),i._internalState.set(e,t),i}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+vO+this.get(t)),e),[]).join(hO)}_parse(e){e.length>E2||(this._internalState=e.split(hO).reverse().reduce((t,i)=>{let a=i.trim(),s=a.indexOf(vO);if(s!==-1){let n=a.slice(0,s),r=a.slice(s+1,i.length);pO(n)&&dO(r)&&t.set(n,r)}return t},new Map),this._internalState.size>AO&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,AO))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new o;return e._internalState=new Map(this._internalState),e}}});function cp(o){let e=f2.exec(o);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Ns,Ms,_2,T2,S2,p2,d2,f2,_i,RO=S(()=>{x();ds();lp();Ns="traceparent",Ms="tracestate",_2="00",T2="(?!ff)[\\da-f]{2}",S2="(?![0]{32})[\\da-f]{32}",p2="(?![0]{16})[\\da-f]{16}",d2="[\\da-f]{2}",f2=new RegExp(`^\\s?(${T2})-(${S2})-(${p2})-(${d2})(-.*)?\\s?$`);_i=class{inject(e,t,i){let a=Ee.getSpanContext(e);if(!a||st(e)||!qe(a))return;let s=`${_2}-${a.traceId}-${a.spanId}-0${Number(a.traceFlags||Se.NONE).toString(16)}`;i.set(t,Ns,s),a.traceState&&i.set(t,Ms,a.traceState.serialize())}extract(e,t,i){let a=i.get(t,Ns);if(!a)return e;let s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;let n=cp(s);if(!n)return e;n.isRemote=!0;let r=i.get(t,Ms);if(r){let l=Array.isArray(r)?r.join(","):r;n.traceState=new Ei(typeof l=="string"?l:void 0)}return Ee.setSpanContext(e,n)}fields(){return[Ns,Ms]}}});function mO(o,e){return o.setValue(up,e)}function OO(o){return o.deleteValue(up)}function NO(o){return o.getValue(up)}var up,Kc,MO=S(()=>{x();up=Gt("OpenTelemetry SDK Context Key RPC_METADATA");(function(o){o.HTTP="http"})(Kc||(Kc={}))});var Ao,Ep=S(()=>{x();Ao=class{shouldSample(){return{decision:mt.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}});var Cn,_p=S(()=>{x();Cn=class{shouldSample(){return{decision:mt.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}});var qc,CO=S(()=>{x();ZS();Ep();_p();qc=class{constructor(e){var t,i,a,s;this._root=e.root,this._root||(Oe(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Cn),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new Cn,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new Ao,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Cn,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new Ao}shouldSample(e,t,i,a,s,n){let r=Ee.getSpanContext(e);return!r||!qe(r)?this._root.shouldSample(e,t,i,a,s,n):r.isRemote?r.traceFlags&Se.SAMPLED?this._remoteParentSampled.shouldSample(e,t,i,a,s,n):this._remoteParentNotSampled.shouldSample(e,t,i,a,s,n):r.traceFlags&Se.SAMPLED?this._localParentSampled.shouldSample(e,t,i,a,s,n):this._localParentNotSampled.shouldSample(e,t,i,a,s,n)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}});var Wc,PO=S(()=>{x();Wc=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:sr(t)&&this._accumulate(t)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let i=0;i>>0}return t}}});function N2(o,e){return function(t){return o(e(t))}}function Tp(o){if(!M2(o)||C2(o)!==A2)return!1;let e=O2(o);if(e===null)return!0;let t=yO.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&gO.call(t)===m2}function M2(o){return o!=null&&typeof o=="object"}function C2(o){return o==null?o===void 0?v2:h2:ho&&ho in Object(o)?P2(o):g2(o)}function P2(o){let e=yO.call(o,ho),t=o[ho],i=!1;try{o[ho]=void 0,i=!0}catch{}let a=IO.call(o);return i&&(e?o[ho]=t:delete o[ho]),a}function g2(o){return IO.call(o)}var A2,h2,v2,R2,gO,m2,O2,LO,yO,ho,IO,DO=S(()=>{A2="[object Object]",h2="[object Null]",v2="[object Undefined]",R2=Function.prototype,gO=R2.toString,m2=gO.call(Object),O2=N2(Object.getPrototypeOf,Object),LO=Object.prototype,yO=LO.hasOwnProperty,ho=Symbol?Symbol.toStringTag:void 0,IO=LO.toString});function Ti(...o){let e=o.shift(),t=new WeakMap;for(;o.length>0;)e=UO(e,o.shift(),0,t);return e}function Sp(o){return zc(o)?o.slice():o}function UO(o,e,t=0,i){let a;if(!(t>L2)){if(t++,jc(o)||jc(e)||bO(e))a=Sp(e);else if(zc(o)){if(a=o.slice(),zc(e))for(let s=0,n=e.length;s"u"?delete a[l]:a[l]=c;else{let u=a[l],E=c;if(xO(o,l,i)||xO(e,l,i))delete a[l];else{if(Cs(u)&&Cs(E)){let d=i.get(u)||[],f=i.get(E)||[];d.push({obj:o,key:l}),f.push({obj:e,key:l}),i.set(u,d),i.set(E,f)}a[l]=UO(a[l],c,t,i)}}}}else a=e;return a}}function xO(o,e,t){let i=t.get(o[e])||[];for(let a=0,s=i.length;a"u"||o instanceof Date||o instanceof RegExp||o===null}function y2(o,e){return!(!Tp(o)||!Tp(e))}var L2,VO=S(()=>{DO();L2=20});function Si(o,e){let t,i=new Promise(function(s,n){t=setTimeout(function(){n(new Ps("Operation timed out."))},e)});return Promise.race([o,i]).then(a=>(clearTimeout(t),a),a=>{throw clearTimeout(t),a})}var Ps,wO=S(()=>{Ps=class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}});function pp(o,e){return typeof e=="string"?o===e:!!o.match(e)}function BO(o,e){if(!e)return!1;for(let t of e)if(pp(o,t))return!0;return!1}var GO=S(()=>{});function HO(o){return typeof o=="function"&&typeof o.__original=="function"&&typeof o.__unwrap=="function"&&o.__wrapped===!0}var kO=S(()=>{});var $c,YO=S(()=>{$c=class{constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}});var ct,FO=S(()=>{YO();ct=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new $c}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(t=>this._deferred.resolve(t),t=>this._deferred.reject(t))}catch(t){this._deferred.reject(t)}}return this._deferred.promise}}});function KO(o,e){return new Promise(t=>{Ye.with(oi(Ye.active()),()=>{o.export(e,i=>{t(i)})})})}var qO=S(()=>{x();ds()});var gs={};Me(gs,{AlwaysOffSampler:()=>Ao,AlwaysOnSampler:()=>Cn,AnchoredClock:()=>bc,BindOnceFuture:()=>ct,CompositePropagator:()=>ui,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>Qr,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>Jr,DEFAULT_ENVIRONMENT:()=>As,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>tp,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>rp,ExportResultCode:()=>X,ParentBasedSampler:()=>qc,RPCType:()=>Kc,RandomIdGenerator:()=>si,SDK_INFO:()=>Mn,TRACE_PARENT_HEADER:()=>Ns,TRACE_STATE_HEADER:()=>Ms,TimeoutError:()=>Ps,TraceIdRatioBasedSampler:()=>Wc,TraceState:()=>Ei,TracesSamplerValues:()=>Nt,VERSION:()=>Hc,W3CBaggagePropagator:()=>ai,W3CTraceContextPropagator:()=>_i,_globalThis:()=>wc,addHrTimes:()=>Os,baggageUtils:()=>pi,callWithTimeout:()=>Si,deleteRPCMetadata:()=>OO,getEnv:()=>Ue,getEnvWithoutDefaults:()=>On,getRPCMetadata:()=>NO,getTimeOrigin:()=>li,globalErrorHandler:()=>Oe,hexToBase64:()=>Bc,hexToBinary:()=>Nn,hrTime:()=>vs,hrTimeDuration:()=>Yc,hrTimeToMicroseconds:()=>lt,hrTimeToMilliseconds:()=>EO,hrTimeToNanoseconds:()=>Fc,hrTimeToTimeStamp:()=>uO,internal:()=>Zr,isAttributeKey:()=>JS,isAttributeValue:()=>mn,isTimeInput:()=>ms,isTimeInputHrTime:()=>ci,isTracingSuppressed:()=>st,isUrlIgnored:()=>BO,isWrapped:()=>HO,loggingErrorHandler:()=>Vc,merge:()=>Ti,millisToHrTime:()=>et,otperformance:()=>kt,parseEnvironment:()=>hs,parseTraceParent:()=>cp,sanitizeAttributes:()=>Rn,setGlobalErrorHandler:()=>Hm,setRPCMetadata:()=>mO,suppressTracing:()=>oi,timeInputToHrTime:()=>Rs,unrefTimer:()=>Or,unsuppressTracing:()=>Dm,urlMatches:()=>pp});var pi,Zr,ee=S(()=>{bm();Vm();Bm();ZS();QS();_O();op();TO();XS();ap();SO();RO();MO();Ep();_p();CO();PO();ds();lp();np();VO();ep();wO();GO();kO();FO();ip();qO();pi={getKeyPairs:Uc,serializeKeyPairs:xc,parseKeyPairsIntoRecord:Um,parsePairKeyValue:fs},Zr={_export:KO}});function di(){return`unknown_service:${process.argv0}`}var WO=S(()=>{});var jO=S(()=>{WO()});var dp=S(()=>{jO()});var le,en=S(()=>{x();vn();ee();dp();le=class o{constructor(e,t){var i;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=t==null?void 0:t.then(a=>(this._attributes=Object.assign({},this._attributes,a),this.asyncAttributesPending=!1,a),a=>(m.debug("a resource's async attributes promise rejected: %s",a),this.asyncAttributesPending=!1,{}))}static empty(){return o.EMPTY}static default(){return new o({[yc]:di(),[WS]:Mn[WS],[qS]:Mn[qS],[jS]:Mn[jS]})}get attributes(){var e;return this.asyncAttributesPending&&m.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(e){var t;if(!e)return this;let i=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new o(i);let a=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([s,n])=>{var r;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),s),(r=e._syncAttributes)!==null&&r!==void 0?r:e.attributes),n)});return new o(i,a)}};le.EMPTY=new le({})});var zO,$O,fp=S(()=>{zO=o=>{switch(o){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return o}},$O=o=>{switch(o){case"sunos":return"solaris";case"win32":return"windows";default:return o}}});import*as XO from"child_process";import*as JO from"util";var fi,Xc=S(()=>{fi=JO.promisify(XO.exec)});var QO={};Me(QO,{getMachineId:()=>I2});async function I2(){try{let e=(await fi('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(` `).find(i=>i.includes("IOPlatformUUID"));if(!e)return"";let t=e.split('" = "');if(t.length===2)return t[1].slice(0,-1)}catch(o){m.debug(`error reading machine id: ${o}`)}return""}var ZO=S(()=>{Xc();x()});var eN={};Me(eN,{getMachineId:()=>x2});import{promises as D2}from"fs";async function x2(){let o=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of o)try{return(await D2.readFile(e,{encoding:"utf8"})).trim()}catch(t){m.debug(`error reading machine id: ${t}`)}return""}var tN=S(()=>{x()});var rN={};Me(rN,{getMachineId:()=>b2});import{promises as U2}from"fs";async function b2(){try{return(await U2.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(o){m.debug(`error reading machine id: ${o}`)}try{return(await fi("kenv -q smbios.system.uuid")).stdout.trim()}catch(o){m.debug(`error reading machine id: ${o}`)}return""}var nN=S(()=>{Xc();x()});var oN={};Me(oN,{getMachineId:()=>V2});import*as Jc from"process";async function V2(){let o="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";Jc.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Jc.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let i=(await fi(`${e} ${o}`)).stdout.split("REG_SZ");if(i.length===2)return i[1].trim()}catch(t){m.debug(`error reading machine id: ${t}`)}return""}var iN=S(()=>{Xc();x()});var aN={};Me(aN,{getMachineId:()=>w2});async function w2(){return m.debug("could not read machine-id: unsupported platform"),""}var sN=S(()=>{x()});import*as lN from"process";var vo,cN=S(()=>{switch(lN.platform){case"darwin":({getMachineId:vo}=(ZO(),$(QO)));break;case"linux":({getMachineId:vo}=(tN(),$(eN)));break;case"freebsd":({getMachineId:vo}=(nN(),$(rN)));break;case"win32":({getMachineId:vo}=(iN(),$(oN)));break;default:({getMachineId:vo}=(sN(),$(aN)))}});import{arch as B2,hostname as G2}from"os";var Ap,Ro,hp=S(()=>{vn();en();fp();cN();Ap=class{detect(e){let t={[fm]:G2(),[Am]:zO(B2())};return new le(t,this._getAsyncAttributes())}_getAsyncAttributes(){return vo().then(e=>{let t={};return e&&(t[dm]=e),t})}},Ro=new Ap});var vp,Ls,uN=S(()=>{hp();vp=class{detect(e){return Promise.resolve(Ro.detect(e))}},Ls=new vp});import{platform as H2,release as k2}from"os";var Rp,mo,mp=S(()=>{vn();en();fp();Rp=class{detect(e){let t={[hm]:$O(H2()),[vm]:k2()};return new le(t)}},mo=new Rp});var Op,ys,EN=S(()=>{mp();Op=class{detect(e){return Promise.resolve(mo.detect(e))}},ys=new Op});import*as _N from"os";var Np,Oo,Mp=S(()=>{x();vn();en();Np=class{detect(e){let t={[Rm]:process.pid,[mm]:process.title,[Om]:process.execPath,[Mm]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[ps]:process.versions.node,[gc]:"nodejs",[Lc]:"Node.js"};process.argv.length>1&&(t[Nm]=process.argv[1]);try{let i=_N.userInfo();t[Cm]=i.username}catch(i){m.debug(`error obtaining process owner: ${i}`)}return new le(t)}},Oo=new Np});var Cp,Is,TN=S(()=>{Mp();Cp=class{detect(e){return Promise.resolve(Oo.detect(e))}},Is=new Cp});import{randomUUID as Y2}from"crypto";var Pp,Ds,SN=S(()=>{vn();en();Pp=class{detect(e){let t={[Pm]:Y2()};return new le(t)}},Ds=new Pp});var pN=S(()=>{uN();hp();EN();mp();TN();Mp();SN()});var dN=S(()=>{pN()});var gp,xs,Lp=S(()=>{vn();x();en();gp=class{detect(e){var t,i,a;if(!(typeof navigator<"u"&&((i=(t=global.process)===null||t===void 0?void 0:t.versions)===null||i===void 0?void 0:i.node)===void 0&&((a=global.Bun)===null||a===void 0?void 0:a.version)===void 0))return le.empty();let n={[gc]:"browser",[Lc]:"Web Browser",[ps]:navigator.userAgent};return this._getResourceAttributes(n,e)}_getResourceAttributes(e,t){return e[ps]===""?(m.debug("BrowserDetector failed: Unable to find required browser resources. "),le.empty()):new le(Object.assign({},e))}},xs=new gp});var yp,Ip,fN=S(()=>{Lp();yp=class{detect(e){return Promise.resolve(xs.detect(e))}},Ip=new yp});var Dp,Us,xp=S(()=>{x();ee();vn();en();Dp=class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}detect(e){let t={},i=Ue(),a=i.OTEL_RESOURCE_ATTRIBUTES,s=i.OTEL_SERVICE_NAME;if(a)try{let n=this._parseResourceAttributes(a);Object.assign(t,n)}catch(n){m.debug(`EnvDetector failed: ${n.message}`)}return s&&(t[yc]=s),new le(t)}_parseResourceAttributes(e){if(!e)return{};let t={},i=e.split(this._COMMA_SEPARATOR,-1);for(let a of i){let s=a.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(s.length!==2)continue;let[n,r]=s;if(n=n.trim(),r=r.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(n))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(r))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[n]=decodeURIComponent(r)}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let t=0;t126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}},Us=new Dp});var Up,bp,AN=S(()=>{xp();Up=class{detect(e){return Promise.resolve(Us.detect(e))}},bp=new Up});var hN=S(()=>{dN();fN();AN();Lp();xp()});var vN,RN=S(()=>{vN=o=>o!==null&&typeof o=="object"&&typeof o.then=="function"});var mN,ON,NN,MN=S(()=>{en();x();RN();mN=async(o={})=>{let e=await Promise.all((o.detectors||[]).map(async t=>{try{let i=await t.detect(o);return m.debug(`${t.constructor.name} found resource.`,i),i}catch(i){return m.debug(`${t.constructor.name} failed: ${i.message}`),le.empty()}}));return NN(e),e.reduce((t,i)=>t.merge(i),le.empty())},ON=(o={})=>{var e;let t=((e=o.detectors)!==null&&e!==void 0?e:[]).map(a=>{try{let s=a.detect(o),n;if(vN(s)){let r=async()=>{var l;let c=await s;return await((l=c.waitForAsyncAttributes)===null||l===void 0?void 0:l.call(c)),c.attributes};n=new le({},r())}else n=s;return n.waitForAsyncAttributes?n.waitForAsyncAttributes().then(()=>m.debug(`${a.constructor.name} found resource.`,n)):m.debug(`${a.constructor.name} found resource.`,n),n}catch(s){return m.error(`${a.constructor.name} failed: ${s.message}`),le.empty()}}),i=t.reduce((a,s)=>a.merge(s),le.empty());return i.waitForAsyncAttributes&&i.waitForAsyncAttributes().then(()=>{NN(t)}),i},NN=o=>{o.forEach(e=>{if(Object.keys(e.attributes).length>0){let t=JSON.stringify(e.attributes,null,4);m.verbose(t)}})}});var Qc={};Me(Qc,{Resource:()=>le,browserDetector:()=>Ip,browserDetectorSync:()=>xs,defaultServiceName:()=>di,detectResources:()=>mN,detectResourcesSync:()=>ON,envDetector:()=>bp,envDetectorSync:()=>Us,hostDetector:()=>Ls,hostDetectorSync:()=>Ro,osDetector:()=>ys,osDetectorSync:()=>mo,processDetector:()=>Is,processDetectorSync:()=>Oo,serviceInstanceIdDetectorSync:()=>Ds});var Pn=S(()=>{en();dp();hN();MN()});var Zc,CN=S(()=>{(function(o){o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.TRACE=1]="TRACE",o[o.TRACE2=2]="TRACE2",o[o.TRACE3=3]="TRACE3",o[o.TRACE4=4]="TRACE4",o[o.DEBUG=5]="DEBUG",o[o.DEBUG2=6]="DEBUG2",o[o.DEBUG3=7]="DEBUG3",o[o.DEBUG4=8]="DEBUG4",o[o.INFO=9]="INFO",o[o.INFO2=10]="INFO2",o[o.INFO3=11]="INFO3",o[o.INFO4=12]="INFO4",o[o.WARN=13]="WARN",o[o.WARN2=14]="WARN2",o[o.WARN3=15]="WARN3",o[o.WARN4=16]="WARN4",o[o.ERROR=17]="ERROR",o[o.ERROR2=18]="ERROR2",o[o.ERROR3=19]="ERROR3",o[o.ERROR4=20]="ERROR4",o[o.FATAL=21]="FATAL",o[o.FATAL2=22]="FATAL2",o[o.FATAL3=23]="FATAL3",o[o.FATAL4=24]="FATAL4"})(Zc||(Zc={}))});var No,Ai,eu=S(()=>{No=class{emit(e){}},Ai=new No});var bs,hi,tu=S(()=>{eu();bs=class{getLogger(e,t,i){return new No}},hi=new bs});var vi,Vp=S(()=>{eu();vi=class{constructor(e,t,i,a){this._provider=e,this.name=t,this.version=i,this.options=a}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Ai}}});var Mo,wp=S(()=>{tu();Vp();Mo=class{getLogger(e,t,i){var a;return(a=this.getDelegateLogger(e,t,i))!==null&&a!==void 0?a:new vi(this,e,t,i)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:hi}setDelegate(e){this._delegate=e}getDelegateLogger(e,t,i){var a;return(a=this._delegate)===null||a===void 0?void 0:a.getLogger(e,t,i)}}});var ru,PN=S(()=>{ru=typeof globalThis=="object"?globalThis:global});var gN=S(()=>{PN()});var LN=S(()=>{gN()});function yN(o,e,t){return i=>i===o?e:t}var Vs,Ri,Bp,IN=S(()=>{LN();Vs=Symbol.for("io.opentelemetry.js.api.logs"),Ri=ru;Bp=1});var nu,DN=S(()=>{IN();tu();wp();nu=class o{constructor(){this._proxyLoggerProvider=new Mo}static getInstance(){return this._instance||(this._instance=new o),this._instance}setGlobalLoggerProvider(e){return Ri[Vs]?this.getLoggerProvider():(Ri[Vs]=yN(Bp,e,hi),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,t;return(t=(e=Ri[Vs])===null||e===void 0?void 0:e.call(Ri,Bp))!==null&&t!==void 0?t:this._proxyLoggerProvider}getLogger(e,t,i){return this.getLoggerProvider().getLogger(e,t,i)}disable(){delete Ri[Vs],this._proxyLoggerProvider=new Mo}}});var xN={};Me(xN,{NOOP_LOGGER:()=>Ai,NOOP_LOGGER_PROVIDER:()=>hi,NoopLogger:()=>No,NoopLoggerProvider:()=>bs,ProxyLogger:()=>vi,ProxyLoggerProvider:()=>Mo,SeverityNumber:()=>Zc,logs:()=>ws});var ws,Bs=S(()=>{CN();eu();tu();Vp();wp();DN();ws=nu.getInstance()});var mi,Gp=S(()=>{x();x();ee();mi=class{constructor(e,t,i){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:a,observedTimestamp:s,severityNumber:n,severityText:r,body:l,attributes:c={},context:u}=i,E=Date.now();if(this.hrTime=Rs(a??E),this.hrTimeObserved=Rs(s??E),u){let d=Ee.getSpanContext(u);d&&qe(d)&&(this.spanContext=d)}this.severityNumber=n,this.severityText=r,this.body=l,this.resource=e.resource,this.instrumentationScope=t,this._logRecordLimits=e.logRecordLimits,this.setAttributes(c)}set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}setAttribute(e,t){return this._isLogRecordReadonly()?this:t===null?this:e.length===0?(m.warn(`Invalid attribute key: ${e}`),this):!mn(t)&&!(typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0)?(m.warn(`Invalid attribute value set for key: ${e}`),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.droppedAttributesCount===1&&m.warn("Dropping extra attributes."),this):(mn(t)?this.attributes[e]=this._truncateToSize(t):this.attributes[e]=t,this))}setAttributes(e){for(let[t,i]of Object.entries(e))this.setAttribute(t,i);return this}setBody(e){return this.body=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){let t=this._logRecordLimits.attributeValueLengthLimit;return t<=0?(m.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(i=>typeof i=="string"?this._truncateToLimitUtil(i,t):i):e}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_isLogRecordReadonly(){return this._isReadonly&&m.warn("Can not execute the operation on emitted log record"),this._isReadonly}}});var ou,UN=S(()=>{x();Gp();ou=class{constructor(e,t){this.instrumentationScope=e,this._sharedState=t}emit(e){let t=e.context||Ye.active(),i=new mi(this._sharedState,this.instrumentationScope,Object.assign({context:t},e));this._sharedState.activeProcessor.onEmit(i,t),i._makeReadonly()}}});function bN(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:Ue().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Ue().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0,mergeResourceWithDefaults:!0}}function VN(o){var e,t,i,a,s,n;let r=On();return{attributeCountLimit:(i=(t=(e=o.attributeCountLimit)!==null&&e!==void 0?e:r.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:r.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:Qr,attributeValueLengthLimit:(n=(s=(a=o.attributeValueLengthLimit)!==null&&a!==void 0?a:r.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&s!==void 0?s:r.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&n!==void 0?n:Jr}}var wN=S(()=>{ee()});var iu,BN=S(()=>{ee();iu=class{constructor(e,t){this.processors=e,this.forceFlushTimeoutMillis=t}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(t=>Si(t.forceFlush(),e)))}onEmit(e,t){this.processors.forEach(i=>i.onEmit(e,t))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}}});var Oi,Hp=S(()=>{Oi=class{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}}});var au,GN=S(()=>{Hp();au=class{constructor(e,t,i){this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=i,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Oi}}});function K2(o,e){let t=e??le.empty();return o?le.default().merge(t):t}var F2,su,HN=S(()=>{x();Bs();Pn();ee();UN();wN();BN();GN();F2="unknown";su=class{constructor(e={}){let t=Ti({},bN(),e),i=K2(t.mergeResourceWithDefaults,e.resource);this._sharedState=new au(i,t.forceFlushTimeoutMillis,VN(t.logRecordLimits)),this._shutdownOnce=new ct(this._shutdown,this)}getLogger(e,t,i){if(this._shutdownOnce.isCalled)return m.warn("A shutdown LoggerProvider cannot provide a Logger"),Ai;e||m.warn("Logger requested without instrumentation scope name.");let a=e||F2,s=`${a}@${t||""}:${(i==null?void 0:i.schemaUrl)||""}`;return this._sharedState.loggers.has(s)||this._sharedState.loggers.set(s,new ou({name:a,version:t,schemaUrl:i==null?void 0:i.schemaUrl},this._sharedState)),this._sharedState.loggers.get(s)}addLogRecordProcessor(e){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(t=>m.error("Error while trying to shutdown current log record processor",t)),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new iu(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(m.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(m.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}}});var lu,kN=S(()=>{ee();ee();lu=class{export(e,t){this._sendLogRecords(e,t)}shutdown(){return Promise.resolve()}_exportInfo(e){var t,i,a;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,timestamp:lt(e.hrTime),traceId:(t=e.spanContext)===null||t===void 0?void 0:t.traceId,spanId:(i=e.spanContext)===null||i===void 0?void 0:i.spanId,traceFlags:(a=e.spanContext)===null||a===void 0?void 0:a.traceFlags,severityText:e.severityText,severityNumber:e.severityNumber,body:e.body,attributes:e.attributes}}_sendLogRecords(e,t){for(let i of e)console.dir(this._exportInfo(i),{depth:3});t==null||t({code:X.SUCCESS})}}});var cu,YN=S(()=>{ee();cu=class{constructor(e){this._exporter=e,this._shutdownOnce=new ct(this._shutdown,this),this._unresolvedExports=new Set}onEmit(e){var t,i;if(this._shutdownOnce.isCalled)return;let a=()=>Zr._export(this._exporter,[e]).then(s=>{var n;s.code!==X.SUCCESS&&Oe((n=s.error)!==null&&n!==void 0?n:new Error(`SimpleLogRecordProcessor: log record export failed (status ${s})`))}).catch(Oe);if(e.resource.asyncAttributesPending){let s=(i=(t=e.resource).waitForAsyncAttributes)===null||i===void 0?void 0:i.call(t).then(()=>(this._unresolvedExports.delete(s),a()),Oe);s!=null&&this._unresolvedExports.add(s)}else a()}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports))}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}});var uu,FN=S(()=>{ee();uu=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:X.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...e),t({code:X.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}}});var Eu,KN=S(()=>{x();ee();Eu=class{constructor(e,t){var i,a,s,n;this._exporter=e,this._finishedLogRecords=[];let r=Ue();this._maxExportBatchSize=(i=t==null?void 0:t.maxExportBatchSize)!==null&&i!==void 0?i:r.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(a=t==null?void 0:t.maxQueueSize)!==null&&a!==void 0?a:r.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(s=t==null?void 0:t.scheduledDelayMillis)!==null&&s!==void 0?s:r.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(n=t==null?void 0:t.exportTimeoutMillis)!==null&&n!==void 0?n:r.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new ct(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(m.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}onEmit(e){this._shutdownOnce.isCalled||this._addToBuffer(e)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())}_flushAll(){return new Promise((e,t)=>{let i=[],a=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let s=0;s{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((e,t)=>{Si(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>e()).catch(t)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{Oe(e)})},this._scheduledDelayMillis),Or(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(e){let t=()=>Zr._export(this._exporter,e).then(a=>{var s;a.code!==X.SUCCESS&&Oe((s=a.error)!==null&&s!==void 0?s:new Error(`BatchLogRecordProcessor: log record export failed (status ${a})`))}).catch(Oe),i=e.map(a=>a.resource).filter(a=>a.asyncAttributesPending);return i.length===0?t():Promise.all(i.map(a=>{var s;return(s=a.waitForAsyncAttributes)===null||s===void 0?void 0:s.call(a)})).then(t,Oe)}}});var Ni,qN=S(()=>{KN();Ni=class extends Eu{onShutdown(){}}});var WN=S(()=>{qN()});var jN=S(()=>{WN()});var kp={};Me(kp,{BatchLogRecordProcessor:()=>Ni,ConsoleLogRecordExporter:()=>lu,InMemoryLogRecordExporter:()=>uu,LogRecord:()=>mi,LoggerProvider:()=>su,NoopLogRecordProcessor:()=>Oi,SimpleLogRecordProcessor:()=>cu});var Yp=S(()=>{HN();Gp();Hp();kN();YN();FN();jN()});var lr,_u=S(()=>{(function(o){o[o.DELTA=0]="DELTA",o[o.CUMULATIVE=1]="CUMULATIVE"})(lr||(lr={}))});var tt,Mi=S(()=>{(function(o){o[o.HISTOGRAM=0]="HISTOGRAM",o[o.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",o[o.GAUGE=2]="GAUGE",o[o.SUM=3]="SUM"})(tt||(tt={}))});function zN(o){return o!=null}function Tu(o){let e=Object.keys(o);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(t=>[t,o[t]])))}function $N(o){var e,t;return`${o.name}:${(e=o.version)!==null&&e!==void 0?e:""}:${(t=o.schemaUrl)!==null&&t!==void 0?t:""}`}function gn(o,e){let t,i=new Promise(function(s,n){t=setTimeout(function(){n(new Co("Operation timed out."))},e)});return Promise.race([o,i]).then(a=>(clearTimeout(t),a),a=>{throw clearTimeout(t),a})}async function XN(o){return Promise.all(o.map(async e=>{try{return{status:"fulfilled",value:await e}}catch(t){return{status:"rejected",reason:t}}}))}function JN(o){return o.status==="rejected"}function Fp(o,e){let t=[];return o.forEach(i=>{t.push(...e(i))}),t}function QN(o,e){if(o.size!==e.size)return!1;for(let t of o)if(!e.has(t))return!1;return!0}function ZN(o,e){let t=0,i=o.length-1,a=o.length;for(;i>=t;){let s=t+Math.trunc((i-t)/2);o[s]{Co=class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}});var Yt,Ci=S(()=>{(function(o){o[o.DROP=0]="DROP",o[o.SUM=1]="SUM",o[o.LAST_VALUE=2]="LAST_VALUE",o[o.HISTOGRAM=3]="HISTOGRAM",o[o.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Yt||(Yt={}))});var Gs,tM=S(()=>{Ci();Gs=class{constructor(){this.kind=Yt.DROP}createAccumulation(){}merge(e,t){}diff(e,t){}toMetricData(e,t,i,a){}}});function Nr(o,e,t){var i,a,s,n;return W2(o)||m.warn(`Invalid metric name: "${o}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:o,type:e,description:(i=t==null?void 0:t.description)!==null&&i!==void 0?i:"",unit:(a=t==null?void 0:t.unit)!==null&&a!==void 0?a:"",valueType:(s=t==null?void 0:t.valueType)!==null&&s!==void 0?s:Rt.DOUBLE,advice:(n=t==null?void 0:t.advice)!==null&&n!==void 0?n:{}}}function rM(o,e){var t,i;return{name:(t=o.name)!==null&&t!==void 0?t:e.name,description:(i=o.description)!==null&&i!==void 0?i:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function nM(o,e){return eM(o.name,e.name)&&o.unit===e.unit&&o.type===e.type&&o.valueType===e.valueType}function W2(o){return o.match(q2)!=null}var pe,q2,tn=S(()=>{x();cr();(function(o){o.COUNTER="COUNTER",o.GAUGE="GAUGE",o.HISTOGRAM="HISTOGRAM",o.UP_DOWN_COUNTER="UP_DOWN_COUNTER",o.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",o.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",o.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(pe||(pe={}));q2=/^[a-z][a-z0-9_.\-/]{0,254}$/i});function j2(o){let e=o.map(()=>0);return e.push(0),{buckets:{boundaries:o,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Pi,gi,oM=S(()=>{Ci();Mi();tn();cr();Pi=class{constructor(e,t,i=!0,a=j2(t)){this.startTime=e,this._boundaries=t,this._recordMinMax=i,this._current=a}record(e){if(Number.isNaN(e))return;this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);let t=ZN(this._boundaries,e);this._current.buckets.counts[t]+=1}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},gi=class{constructor(e,t){this._boundaries=e,this._recordMinMax=t,this.kind=Yt.HISTOGRAM}createAccumulation(e){return new Pi(e,this._boundaries,this._recordMinMax)}merge(e,t){let i=e.toPointValue(),a=t.toPointValue(),s=i.buckets.counts,n=a.buckets.counts,r=new Array(s.length);for(let u=0;u{let r=n.toPointValue(),l=e.type===pe.GAUGE||e.type===pe.UP_DOWN_COUNTER||e.type===pe.OBSERVABLE_GAUGE||e.type===pe.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:s,startTime:n.startTime,endTime:a,value:{min:r.hasMinMax?r.min:void 0,max:r.hasMinMax?r.max:void 0,sum:l?void 0:r.sum,buckets:r.buckets,count:r.count}}})}}}});var Hs,Kp,iM=S(()=>{Hs=class o{constructor(e=new Kp,t=0,i=0,a=0){this.backing=e,this.indexBase=t,this.indexStart=i,this.indexEnd=a}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(e,t)=>this.at(t))}at(e){let t=this.indexBase-this.indexStart;return e=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()}downscale(e){this._rotate();let t=1+this.indexEnd-this.indexStart,i=1<>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}clone(){return new o(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)}_relocateBucket(e,t){e!==t&&this.incrementBucket(e,this.backing.emptyBucket(t))}},Kp=class o{constructor(e=[0]){this._counts=e}get length(){return this._counts.length}countAt(e){return this._counts[e]}growTo(e,t,i){let a=new Array(e).fill(0);a.splice(i,this._counts.length-t,...this._counts.slice(t)),a.splice(0,t,...this._counts.slice(0,t)),this._counts=a}reverse(e,t){let i=Math.floor((e+t)/2)-e;for(let a=0;a=t?this._counts[e]-=t:this._counts[e]=0}clone(){return new o([...this._counts])}}});function Su(o){let e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,o),((e.getUint32(0)&2146435072)>>20)-1023}function pu(o){let e=new DataView(new ArrayBuffer(8));e.setFloat64(0,o);let t=e.getUint32(0),i=e.getUint32(4);return(t&1048575)*Math.pow(2,32)+i}var ks,qp=S(()=>{ks=Math.pow(2,-1022)});function Ys(o,e){return o===0||o===Number.POSITIVE_INFINITY||o===Number.NEGATIVE_INFINITY||Number.isNaN(o)?o:o*Math.pow(2,e)}function sM(o){return o--,o|=o>>1,o|=o>>2,o|=o>>4,o|=o>>8,o|=o>>16,o++,o}var du=S(()=>{});var Mr,fu=S(()=>{Mr=class extends Error{}});var Au,cM=S(()=>{qp();du();fu();Au=class{constructor(e){this._shift=-e}mapToIndex(e){if(e>this._shift}lowerBoundary(e){let t=this._minNormalLowerBoundaryIndex();if(ei)throw new Mr(`overflow: ${e} is > maximum lower boundary: ${i}`);return Ys(1,e<>this._shift;return this._shift<2&&e--,e}_maxNormalLowerBoundaryIndex(){return 1023>>this._shift}_rightShift(e,t){return Math.floor(e*Math.pow(2,-t))}}});var hu,uM=S(()=>{qp();du();fu();hu=class{constructor(e){this._scale=e,this._scaleFactor=Ys(Math.LOG2E,e),this._inverseFactor=Ys(Math.LN2,-e)}mapToIndex(e){if(e<=ks)return this._minNormalLowerBoundaryIndex()-1;if(pu(e)===0)return(Su(e)<=i?i:t}lowerBoundary(e){let t=this._maxNormalLowerBoundaryIndex();if(e>=t){if(e===t)return 2*Math.exp((e-(1< maximum lower boundary: ${t}`)}let i=this._minNormalLowerBoundaryIndex();if(e<=i){if(e===i)return ks;if(e===i-1)return Math.exp((e+(1<_M||o= ${EM} && <= ${_M}, got: ${o}`);return $2[o+10]}var EM,_M,$2,TM=S(()=>{cM();uM();fu();EM=-10,_M=20,$2=Array.from({length:31},(o,e)=>e>10?new hu(e-10):new Au(e-10))});var Li,X2,J2,$p,vu,Fs,SM=S(()=>{Ci();Mi();x();tn();iM();TM();du();Li=class o{constructor(e,t){this.low=e,this.high=t}static combine(e,t){return new o(Math.min(e.low,t.low),Math.max(e.high,t.high))}},X2=20,J2=160,$p=2,vu=class o{constructor(e=e,t=J2,i=!0,a=0,s=0,n=0,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=new Hs,u=new Hs,E=zp(X2)){this.startTime=e,this._maxSize=t,this._recordMinMax=i,this._sum=a,this._count=s,this._zeroCount=n,this._min=r,this._max=l,this._positive=c,this._negative=u,this._mapping=E,this._maxSize<$p&&(m.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${$p}`),this._maxSize=$p)}record(e){this.updateByIncrement(e,1)}setStartTime(e){this.startTime=e}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(e,t){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e0?this._updateBuckets(this._positive,e,t):this._updateBuckets(this._negative,-e,t)}}merge(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.minthis.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;let t=this._minScale(e);this._downscale(this.scale-t),this._mergeBuckets(this.positive,e,e.positive,t),this._mergeBuckets(this.negative,e,e.negative,t)}diff(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;let t=this._minScale(e);this._downscale(this.scale-t),this._diffBuckets(this.positive,e,e.positive,t),this._diffBuckets(this.negative,e,e.negative,t)}clone(){return new o(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(e,t,i){let a=this._mapping.mapToIndex(t),s=!1,n=0,r=0;if(e.length===0?(e.indexStart=a,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):a=this._maxSize?(s=!0,r=a,n=e.indexEnd):a>e.indexEnd&&a-e.indexStart>=this._maxSize&&(s=!0,r=e.indexStart,n=a),s){let l=this._changeScale(n,r);this._downscale(l),a=this._mapping.mapToIndex(t)}this._incrementIndexBy(e,a,i)}_incrementIndexBy(e,t,i){if(i===0)return;if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=t),t=e.backing.length&&this._grow(e,s+1),e.indexStart=t}else if(t>e.indexEnd){let s=t-e.indexStart;s>=e.backing.length&&this._grow(e,s+1),e.indexEnd=t}let a=t-e.indexBase;a<0&&(a+=e.backing.length),e.incrementBucket(a,i)}_grow(e,t){let i=e.backing.length,a=e.indexBase-e.indexStart,s=i-a,n=sM(t);n>this._maxSize&&(n=this._maxSize);let r=n-a;e.backing.growTo(n,s,r)}_changeScale(e,t){let i=0;for(;e-t>=this._maxSize;)e>>=1,t>>=1,i++;return i}_downscale(e){if(e===0)return;if(e<0)throw new Error(`impossible change of scale: ${this.scale}`);let t=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=zp(t)}_minScale(e){let t=Math.min(this.scale,e.scale),i=Li.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(e.positive,e.scale,t)),a=Li.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(e.negative,e.scale,t));return Math.min(t-this._changeScale(i.high,i.low),t-this._changeScale(a.high,a.low))}_highLowAtScale(e,t,i){if(e.length===0)return new Li(0,-1);let a=t-i;return new Li(e.indexStart>>a,e.indexEnd>>a)}_mergeBuckets(e,t,i,a){let s=i.offset,n=t.scale-a;for(let r=0;r>n,i.at(r))}_diffBuckets(e,t,i,a){let s=i.offset,n=t.scale-a;for(let r=0;r>n)-e.indexBase;c<0&&(c+=e.backing.length),e.decrementBucket(c,i.at(r))}e.trim()}},Fs=class{constructor(e,t){this._maxSize=e,this._recordMinMax=t,this.kind=Yt.EXPONENTIAL_HISTOGRAM}createAccumulation(e){return new vu(e,this._maxSize,this._recordMinMax)}merge(e,t){let i=t.clone();return i.merge(e),i}diff(e,t){let i=t.clone();return i.diff(e),i}toMetricData(e,t,i,a){return{descriptor:e,aggregationTemporality:t,dataPointType:tt.EXPONENTIAL_HISTOGRAM,dataPoints:i.map(([s,n])=>{let r=n.toPointValue(),l=e.type===pe.GAUGE||e.type===pe.UP_DOWN_COUNTER||e.type===pe.OBSERVABLE_GAUGE||e.type===pe.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:s,startTime:n.startTime,endTime:a,value:{min:r.hasMinMax?r.min:void 0,max:r.hasMinMax?r.max:void 0,sum:l?void 0:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},count:r.count,scale:r.scale,zeroCount:r.zeroCount}}})}}}});var yi,Ks,pM=S(()=>{Ci();ee();Mi();yi=class{constructor(e,t=0,i=[0,0]){this.startTime=e,this._current=t,this.sampleTime=i}record(e){this._current=e,this.sampleTime=et(Date.now())}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Ks=class{constructor(){this.kind=Yt.LAST_VALUE}createAccumulation(e){return new yi(e)}merge(e,t){let i=lt(t.sampleTime)>=lt(e.sampleTime)?t:e;return new yi(e.startTime,i.toPointValue(),i.sampleTime)}diff(e,t){let i=lt(t.sampleTime)>=lt(e.sampleTime)?t:e;return new yi(t.startTime,i.toPointValue(),i.sampleTime)}toMetricData(e,t,i,a){return{descriptor:e,aggregationTemporality:t,dataPointType:tt.GAUGE,dataPoints:i.map(([s,n])=>({attributes:s,startTime:n.startTime,endTime:a,value:n.toPointValue()}))}}}});var Ln,Ii,dM=S(()=>{Ci();Mi();Ln=class{constructor(e,t,i=0,a=!1){this.startTime=e,this.monotonic=t,this._current=i,this.reset=a}record(e){this.monotonic&&e<0||(this._current+=e)}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Ii=class{constructor(e){this.monotonic=e,this.kind=Yt.SUM}createAccumulation(e){return new Ln(e,this.monotonic)}merge(e,t){let i=e.toPointValue(),a=t.toPointValue();return t.reset?new Ln(t.startTime,this.monotonic,a,t.reset):new Ln(e.startTime,this.monotonic,i+a)}diff(e,t){let i=e.toPointValue(),a=t.toPointValue();return this.monotonic&&i>a?new Ln(t.startTime,this.monotonic,a,!0):new Ln(t.startTime,this.monotonic,a-i)}toMetricData(e,t,i,a){return{descriptor:e,aggregationTemporality:t,dataPointType:tt.SUM,dataPoints:i.map(([s,n])=>({attributes:s,startTime:n.startTime,endTime:a,value:n.toPointValue()})),isMonotonic:this.monotonic}}}});var fM=S(()=>{tM();oM();SM();pM();dM()});var Tt,Di,Po,xi,Ui,qs,Ws,js,AM,hM,vM,RM,Q2,Z2,Ru=S(()=>{x();fM();tn();Tt=class{static Drop(){return AM}static Sum(){return hM}static LastValue(){return vM}static Histogram(){return RM}static ExponentialHistogram(){return Q2}static Default(){return Z2}},Di=class o extends Tt{createAggregator(e){return o.DEFAULT_INSTANCE}};Di.DEFAULT_INSTANCE=new Gs;Po=class o extends Tt{createAggregator(e){switch(e.type){case pe.COUNTER:case pe.OBSERVABLE_COUNTER:case pe.HISTOGRAM:return o.MONOTONIC_INSTANCE;default:return o.NON_MONOTONIC_INSTANCE}}};Po.MONOTONIC_INSTANCE=new Ii(!0);Po.NON_MONOTONIC_INSTANCE=new Ii(!1);xi=class o extends Tt{createAggregator(e){return o.DEFAULT_INSTANCE}};xi.DEFAULT_INSTANCE=new Ks;Ui=class o extends Tt{createAggregator(e){return o.DEFAULT_INSTANCE}};Ui.DEFAULT_INSTANCE=new gi([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);qs=class extends Tt{constructor(e,t=!0){if(super(),this._recordMinMax=t,e==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");e=e.concat(),e=e.sort((s,n)=>s-n);let i=e.lastIndexOf(-1/0),a=e.indexOf(1/0);a===-1&&(a=void 0),this._boundaries=e.slice(i+1,a)}createAggregator(e){return new gi(this._boundaries,this._recordMinMax)}},Ws=class extends Tt{constructor(e=160,t=!0){super(),this._maxSize=e,this._recordMinMax=t}createAggregator(e){return new Fs(this._maxSize,this._recordMinMax)}},js=class extends Tt{_resolve(e){switch(e.type){case pe.COUNTER:case pe.UP_DOWN_COUNTER:case pe.OBSERVABLE_COUNTER:case pe.OBSERVABLE_UP_DOWN_COUNTER:return hM;case pe.GAUGE:case pe.OBSERVABLE_GAUGE:return vM;case pe.HISTOGRAM:return e.advice.explicitBucketBoundaries?new qs(e.advice.explicitBucketBoundaries):RM}return m.warn(`Unable to recognize instrument type: ${e.type}`),AM}createAggregator(e){return this._resolve(e).createAggregator(e)}},AM=new Di,hM=new Po,vM=new xi,RM=new Ui,Q2=new Ws,Z2=new js});var mM,mu,Xp=S(()=>{Ru();_u();mM=o=>Tt.Default(),mu=o=>lr.CUMULATIVE});var bi,Jp=S(()=>{x();cr();Xp();bi=class{constructor(e){var t,i,a;this._shutdown=!1,this._aggregationSelector=(t=e==null?void 0:e.aggregationSelector)!==null&&t!==void 0?t:mM,this._aggregationTemporalitySelector=(i=e==null?void 0:e.aggregationTemporalitySelector)!==null&&i!==void 0?i:mu,this._metricProducers=(a=e==null?void 0:e.metricProducers)!==null&&a!==void 0?a:[],this._cardinalitySelector=e==null?void 0:e.cardinalitySelector}setMetricProducer(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()}selectAggregation(e){return this._aggregationSelector(e)}selectAggregationTemporality(e){return this._aggregationTemporalitySelector(e)}selectCardinalityLimit(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3}onInitialized(){}async collect(e){if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let[t,...i]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:e==null?void 0:e.timeoutMillis}),...this._metricProducers.map(r=>r.collect({timeoutMillis:e==null?void 0:e.timeoutMillis}))]),a=t.errors.concat(Fp(i,r=>r.errors)),s=t.resourceMetrics.resource,n=t.resourceMetrics.scopeMetrics.concat(Fp(i,r=>r.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:s,scopeMetrics:n},errors:a}}async shutdown(e){if(this._shutdown){m.error("Cannot call shutdown twice.");return}(e==null?void 0:e.timeoutMillis)==null?await this.onShutdown():await gn(this.onShutdown(),e.timeoutMillis),this._shutdown=!0}async forceFlush(e){if(this._shutdown){m.warn("Cannot forceFlush on already shutdown MetricReader.");return}if((e==null?void 0:e.timeoutMillis)==null){await this.onForceFlush();return}await gn(this.onForceFlush(),e.timeoutMillis)}}});var Ou,OM=S(()=>{x();ee();Jp();cr();Ou=class extends bi{constructor(e){var t,i,a,s;if(super({aggregationSelector:(t=e.exporter.selectAggregation)===null||t===void 0?void 0:t.bind(e.exporter),aggregationTemporalitySelector:(i=e.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(e.exporter),metricProducers:e.metricProducers}),e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportIntervalMillis!==void 0&&e.exportIntervalMillis0&&m.error("PeriodicExportingMetricReader: metrics collection errors",...a),i.resource.asyncAttributesPending)try{await((t=(e=i.resource).waitForAsyncAttributes)===null||t===void 0?void 0:t.call(e))}catch(n){m.debug("Error while resolving async portion of resource: ",n),Oe(n)}let s=await Zr._export(this._exporter,i);if(s.code!==X.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${s.error})`)}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),Or(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}}});var Nu,NM=S(()=>{ee();Nu=class{constructor(e){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=e}export(e,t){if(this._shutdown){setTimeout(()=>t({code:X.FAILED}),0);return}this._metrics.push(e),setTimeout(()=>t({code:X.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(e){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}}});var Mu,MM=S(()=>{ee();Xp();Mu=class o{constructor(e){var t;this._shutdown=!1,this._temporalitySelector=(t=e==null?void 0:e.temporalitySelector)!==null&&t!==void 0?t:mu}export(e,t){if(this._shutdown){setImmediate(t,{code:X.FAILED});return}return o._sendMetrics(e,t)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(e){return this._temporalitySelector(e)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(e,t){for(let i of e.scopeMetrics)for(let a of i.metrics)console.dir({descriptor:a.descriptor,dataPointType:a.dataPointType,dataPoints:a.dataPoints},{depth:null});t({code:X.SUCCESS})}}});var Cu,CM=S(()=>{Cu=class{constructor(){this._registeredViews=[]}addView(e){this._registeredViews.push(e)}findViews(e,t){return this._registeredViews.filter(a=>this._matchInstrument(a.instrumentSelector,e)&&this._matchMeter(a.meterSelector,t))}_matchInstrument(e,t){return(e.getType()===void 0||t.type===e.getType())&&e.getNameFilter().match(t.name)&&e.getUnitFilter().match(t.unit)}_matchMeter(e,t){return e.getNameFilter().match(t.name)&&(t.version===void 0||e.getVersionFilter().match(t.version))&&(t.schemaUrl===void 0||e.getSchemaUrlFilter().match(t.schemaUrl))}}});function zs(o){return o instanceof wi}var Vi,Pu,gu,Lu,yu,wi,Iu,Du,xu,Uu=S(()=>{x();ee();Vi=class{constructor(e,t){this._writableMetricStorage=e,this._descriptor=t}_record(e,t={},i=Ye.active()){if(typeof e!="number"){m.warn(`non-number value provided to metric ${this._descriptor.name}: ${e}`);return}this._descriptor.valueType===Rt.INT&&!Number.isInteger(e)&&(m.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,t,i,et(Date.now()))}},Pu=class extends Vi{add(e,t,i){this._record(e,t,i)}},gu=class extends Vi{add(e,t,i){if(e<0){m.warn(`negative value provided to counter ${this._descriptor.name}: ${e}`);return}this._record(e,t,i)}},Lu=class extends Vi{record(e,t,i){this._record(e,t,i)}},yu=class extends Vi{record(e,t,i){if(e<0){m.warn(`negative value provided to histogram ${this._descriptor.name}: ${e}`);return}this._record(e,t,i)}},wi=class{constructor(e,t,i){this._observableRegistry=i,this._descriptor=e,this._metricStorages=t}addCallback(e){this._observableRegistry.addCallback(e,this)}removeCallback(e){this._observableRegistry.removeCallback(e,this)}},Iu=class extends wi{},Du=class extends wi{},xu=class extends wi{}});var bu,PM=S(()=>{tn();Uu();bu=class{constructor(e){this._meterSharedState=e}createGauge(e,t){let i=Nr(e,pe.GAUGE,t),a=this._meterSharedState.registerMetricStorage(i);return new Lu(a,i)}createHistogram(e,t){let i=Nr(e,pe.HISTOGRAM,t),a=this._meterSharedState.registerMetricStorage(i);return new yu(a,i)}createCounter(e,t){let i=Nr(e,pe.COUNTER,t),a=this._meterSharedState.registerMetricStorage(i);return new gu(a,i)}createUpDownCounter(e,t){let i=Nr(e,pe.UP_DOWN_COUNTER,t),a=this._meterSharedState.registerMetricStorage(i);return new Pu(a,i)}createObservableGauge(e,t){let i=Nr(e,pe.OBSERVABLE_GAUGE,t),a=this._meterSharedState.registerAsyncMetricStorage(i);return new Du(i,a,this._meterSharedState.observableRegistry)}createObservableCounter(e,t){let i=Nr(e,pe.OBSERVABLE_COUNTER,t),a=this._meterSharedState.registerAsyncMetricStorage(i);return new Iu(i,a,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(e,t){let i=Nr(e,pe.OBSERVABLE_UP_DOWN_COUNTER,t),a=this._meterSharedState.registerAsyncMetricStorage(i);return new xu(i,a,this._meterSharedState.observableRegistry)}addBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.addBatchCallback(e,t)}removeBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.removeBatchCallback(e,t)}}});var Bi,Qp=S(()=>{tn();Bi=class{constructor(e){this._instrumentDescriptor=e}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(e){this._instrumentDescriptor=Nr(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}}});var Zp,Dt,$s=S(()=>{cr();Zp=class{constructor(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}get(e,t){return t??(t=this._hash(e)),this._valueMap.get(t)}getOrDefault(e,t){let i=this._hash(e);if(this._valueMap.has(i))return this._valueMap.get(i);let a=t();return this._keyMap.has(i)||this._keyMap.set(i,e),this._valueMap.set(i,a),a}set(e,t,i){i??(i=this._hash(e)),this._keyMap.has(i)||this._keyMap.set(i,e),this._valueMap.set(i,t)}has(e,t){return t??(t=this._hash(e)),this._valueMap.has(t)}*keys(){let e=this._keyMap.entries(),t=e.next();for(;t.done!==!0;)yield[t.value[1],t.value[0]],t=e.next()}*entries(){let e=this._valueMap.entries(),t=e.next();for(;t.done!==!0;)yield[this._keyMap.get(t.value[0]),t.value[1],t.value[0]],t=e.next()}get size(){return this._valueMap.size}},Dt=class extends Zp{constructor(){super(Tu)}}});var Gi,ed=S(()=>{cr();$s();Gi=class{constructor(e,t){this._aggregator=e,this._activeCollectionStorage=new Dt,this._cumulativeMemoStorage=new Dt,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(t??2e3)-1,this._overflowHashCode=Tu(this._overflowAttributes)}record(e,t,i,a){let s=this._activeCollectionStorage.get(t);if(!s){if(this._activeCollectionStorage.size>=this._cardinalityLimit){let n=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,()=>this._aggregator.createAccumulation(a));n==null||n.record(e);return}s=this._aggregator.createAccumulation(a),this._activeCollectionStorage.set(t,s)}s==null||s.record(e)}batchCumulate(e,t){Array.from(e.entries()).forEach(([i,a,s])=>{let n=this._aggregator.createAccumulation(t);n==null||n.record(a);let r=n;if(this._cumulativeMemoStorage.has(i,s)){let l=this._cumulativeMemoStorage.get(i,s);r=this._aggregator.diff(l,n)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit&&(i=this._overflowAttributes,s=this._overflowHashCode,this._cumulativeMemoStorage.has(i,s))){let l=this._cumulativeMemoStorage.get(i,s);r=this._aggregator.diff(l,n)}if(this._activeCollectionStorage.has(i,s)){let l=this._activeCollectionStorage.get(i,s);r=this._aggregator.merge(l,r)}this._cumulativeMemoStorage.set(i,n,s),this._activeCollectionStorage.set(i,r,s)})}collect(){let e=this._activeCollectionStorage;return this._activeCollectionStorage=new Dt,e}}});function e3(o){return Array.from(o.entries())}var Hi,td=S(()=>{_u();$s();Hi=class o{constructor(e,t){this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,t.forEach(i=>{this._unreportedAccumulations.set(i,[])})}buildMetrics(e,t,i,a){this._stashAccumulations(i);let s=this._getMergedUnreportedAccumulations(e),n=s,r;if(this._reportHistory.has(e)){let c=this._reportHistory.get(e),u=c.collectionTime;r=c.aggregationTemporality,r===lr.CUMULATIVE?n=o.merge(c.accumulations,s,this._aggregator):n=o.calibrateStartTime(c.accumulations,s,u)}else r=e.selectAggregationTemporality(t.type);this._reportHistory.set(e,{accumulations:n,collectionTime:a,aggregationTemporality:r});let l=e3(n);if(l.length!==0)return this._aggregator.toMetricData(t,r,l,a)}_stashAccumulations(e){let t=this._unreportedAccumulations.keys();for(let i of t){let a=this._unreportedAccumulations.get(i);a===void 0&&(a=[],this._unreportedAccumulations.set(i,a)),a.push(e)}}_getMergedUnreportedAccumulations(e){let t=new Dt,i=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),i===void 0)return t;for(let a of i)t=o.merge(t,a,this._aggregator);return t}static merge(e,t,i){let a=e,s=t.entries(),n=s.next();for(;n.done!==!0;){let[r,l,c]=n.value;if(e.has(r,c)){let u=e.get(r,c),E=i.merge(u,l);a.set(r,E,c)}else a.set(r,l,c);n=s.next()}return a}static calibrateStartTime(e,t,i){for(let[a,s]of e.keys()){let n=t.get(a,s);n==null||n.setStartTime(i)}return t}}});var Vu,gM=S(()=>{Qp();ed();td();$s();Vu=class extends Bi{constructor(e,t,i,a,s){super(e),this._attributesProcessor=i,this._aggregationCardinalityLimit=s,this._deltaMetricStorage=new Gi(t,this._aggregationCardinalityLimit),this._temporalMetricStorage=new Hi(t,a)}record(e,t){let i=new Dt;Array.from(e.entries()).forEach(([a,s])=>{i.set(this._attributesProcessor.process(a),s)}),this._deltaMetricStorage.batchCumulate(i,t)}collect(e,t){let i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,i,t)}}});function rd(o,e){let t="";return o.unit!==e.unit&&(t+=` - Unit '${o.unit}' does not match '${e.unit}' `),o.type!==e.type&&(t+=` - Type '${o.type}' does not match '${e.type}' `),o.valueType!==e.valueType&&(t+=` - Value Type '${o.valueType}' does not match '${e.valueType}' `),o.description!==e.description&&(t+=` - Description '${o.description}' does not match '${e.description}' `),t}function t3(o,e){return` - use valueType '${o.valueType}' on instrument creation or use an instrument name other than '${e.name}'`}function r3(o,e){return` - use unit '${o.unit}' on instrument creation or use an instrument name other than '${e.name}'`}function n3(o,e){let t={name:e.name,type:e.type,unit:e.unit},i=JSON.stringify(t);return` - create a new view with a name other than '${o.name}' and InstrumentSelector '${i}'`}function o3(o,e){let t={name:e.name,type:e.type,unit:e.unit},i=JSON.stringify(t);return` - create a new view with a name other than '${o.name}' and InstrumentSelector '${i}' - OR - create a new view with the name ${o.name} and description '${o.description}' and InstrumentSelector ${i} - OR - create a new view with the name ${e.name} and description '${o.description}' and InstrumentSelector ${i}`}function nd(o,e){return o.valueType!==e.valueType?t3(o,e):o.unit!==e.unit?r3(o,e):o.type!==e.type?n3(o,e):o.description!==e.description?o3(o,e):""}var LM=S(()=>{});var wu,yM=S(()=>{tn();x();LM();wu=class o{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new o}getStorages(e){let t=[];for(let a of this._sharedRegistry.values())t=t.concat(a);let i=this._perCollectorRegistry.get(e);if(i!=null)for(let a of i.values())t=t.concat(a);return t}register(e){this._registerStorage(e,this._sharedRegistry)}registerForCollector(e,t){let i=this._perCollectorRegistry.get(e);i==null&&(i=new Map,this._perCollectorRegistry.set(e,i)),this._registerStorage(t,i)}findOrUpdateCompatibleStorage(e){let t=this._sharedRegistry.get(e.name);return t===void 0?null:this._findOrUpdateCompatibleStorage(e,t)}findOrUpdateCompatibleCollectorStorage(e,t){let i=this._perCollectorRegistry.get(e);if(i===void 0)return null;let a=i.get(t.name);return a===void 0?null:this._findOrUpdateCompatibleStorage(t,a)}_registerStorage(e,t){let i=e.getInstrumentDescriptor(),a=t.get(i.name);if(a===void 0){t.set(i.name,[e]);return}a.push(e)}_findOrUpdateCompatibleStorage(e,t){let i=null;for(let a of t){let s=a.getInstrumentDescriptor();nM(s,e)?(s.description!==e.description&&(e.description.length>s.description.length&&a.updateDescription(e.description),m.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view. `,`Details: `,rd(s,e),`The longer description will be used. To resolve the conflict:`,nd(s,e))),i=a):m.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view. `,`Details: `,rd(s,e),`To resolve the conflict: `,nd(s,e))}return i}}});var Bu,IM=S(()=>{Bu=class{constructor(e){this._backingStorages=e}record(e,t,i,a){this._backingStorages.forEach(s=>{s.record(e,t,i,a)})}}});var Gu,Hu,DM=S(()=>{x();$s();Uu();Gu=class{constructor(e,t){this._instrumentName=e,this._valueType=t,this._buffer=new Dt}observe(e,t={}){if(typeof e!="number"){m.warn(`non-number value provided to metric ${this._instrumentName}: ${e}`);return}this._valueType===Rt.INT&&!Number.isInteger(e)&&(m.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(t,e)}},Hu=class{constructor(){this._buffer=new Map}observe(e,t,i={}){if(!zs(e))return;let a=this._buffer.get(e);if(a==null&&(a=new Dt,this._buffer.set(e,a)),typeof t!="number"){m.warn(`non-number value provided to metric ${e._descriptor.name}: ${t}`);return}e._descriptor.valueType===Rt.INT&&!Number.isInteger(t)&&(m.warn(`INT value type cannot accept a floating-point value for ${e._descriptor.name}, ignoring the fractional digits.`),t=Math.trunc(t),!Number.isInteger(t))||a.set(i,t)}}});var ku,xM=S(()=>{x();Uu();DM();cr();ku=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(e,t){this._findCallback(e,t)>=0||this._callbacks.push({callback:e,instrument:t})}removeCallback(e,t){let i=this._findCallback(e,t);i<0||this._callbacks.splice(i,1)}addBatchCallback(e,t){let i=new Set(t.filter(zs));if(i.size===0){m.error("BatchObservableCallback is not associated with valid instruments",t);return}this._findBatchCallback(e,i)>=0||this._batchCallbacks.push({callback:e,instruments:i})}removeBatchCallback(e,t){let i=new Set(t.filter(zs)),a=this._findBatchCallback(e,i);a<0||this._batchCallbacks.splice(a,1)}async observe(e,t){let i=this._observeCallbacks(e,t),a=this._observeBatchCallbacks(e,t);return(await XN([...i,...a])).filter(JN).map(r=>r.reason)}_observeCallbacks(e,t){return this._callbacks.map(async({callback:i,instrument:a})=>{let s=new Gu(a._descriptor.name,a._descriptor.valueType),n=Promise.resolve(i(s));t!=null&&(n=gn(n,t)),await n,a._metricStorages.forEach(r=>{r.record(s._buffer,e)})})}_observeBatchCallbacks(e,t){return this._batchCallbacks.map(async({callback:i,instruments:a})=>{let s=new Hu,n=Promise.resolve(i(s));t!=null&&(n=gn(n,t)),await n,a.forEach(r=>{let l=s._buffer.get(r);l!=null&&r._metricStorages.forEach(c=>{c.record(l,e)})})})}_findCallback(e,t){return this._callbacks.findIndex(i=>i.callback===e&&i.instrument===t)}_findBatchCallback(e,t){return this._batchCallbacks.findIndex(i=>i.callback===e&&QN(i.instruments,t))}}});var Yu,UM=S(()=>{Qp();ed();td();Yu=class extends Bi{constructor(e,t,i,a,s){super(e),this._attributesProcessor=i,this._aggregationCardinalityLimit=s,this._deltaMetricStorage=new Gi(t,this._aggregationCardinalityLimit),this._temporalMetricStorage=new Hi(t,a)}record(e,t,i,a){t=this._attributesProcessor.process(t,i),this._deltaMetricStorage.record(e,t,i,a)}collect(e,t){let i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,i,t)}}});var yn,od,Fu,i3,id=S(()=>{yn=class{static Noop(){return i3}},od=class extends yn{process(e,t){return e}},Fu=class extends yn{constructor(e){super(),this._allowedAttributeNames=e}process(e,t){let i={};return Object.keys(e).filter(a=>this._allowedAttributeNames.includes(a)).forEach(a=>i[a]=e[a]),i}},i3=new od});var Ku,bM=S(()=>{tn();PM();cr();gM();yM();IM();xM();UM();id();Ku=class{constructor(e,t){this._meterProviderSharedState=e,this._instrumentationScope=t,this.metricStorageRegistry=new wu,this.observableRegistry=new ku,this.meter=new bu(this)}registerMetricStorage(e){let t=this._registerMetricStorage(e,Yu);return t.length===1?t[0]:new Bu(t)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,Vu)}async collect(e,t,i){let a=await this.observableRegistry.observe(t,i==null?void 0:i.timeoutMillis),s=this.metricStorageRegistry.getStorages(e);if(s.length===0)return null;let n=s.map(r=>r.collect(e,t)).filter(zN);return n.length===0?{errors:a}:{scopeMetrics:{scope:this._instrumentationScope,metrics:n},errors:a}}_registerMetricStorage(e,t){let a=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(s=>{let n=rM(s,e),r=this.metricStorageRegistry.findOrUpdateCompatibleStorage(n);if(r!=null)return r;let l=s.aggregation.createAggregator(n),c=new t(n,l,s.attributesProcessor,this._meterProviderSharedState.metricCollectors,s.aggregationCardinalityLimit);return this.metricStorageRegistry.register(c),c});if(a.length===0){let n=this._meterProviderSharedState.selectAggregations(e.type).map(([r,l])=>{let c=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(r,e);if(c!=null)return c;let u=l.createAggregator(e),E=r.selectCardinalityLimit(e.type),d=new t(e,u,yn.Noop(),[r],E);return this.metricStorageRegistry.registerForCollector(r,d),d});a=a.concat(n)}return a}}});var qu,VM=S(()=>{cr();CM();bM();qu=class{constructor(e){this.resource=e,this.viewRegistry=new Cu,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(e){let t=$N(e),i=this.meterSharedStates.get(t);return i==null&&(i=new Ku(this,e),this.meterSharedStates.set(t,i)),i}selectAggregations(e){let t=[];for(let i of this.metricCollectors)t.push([i,i.selectAggregation(e)]);return t}}});var Wu,wM=S(()=>{ee();Wu=class{constructor(e,t){this._sharedState=e,this._metricReader=t}async collect(e){let t=et(Date.now()),i=[],a=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(async n=>{let r=await n.collect(this,t,e);(r==null?void 0:r.scopeMetrics)!=null&&i.push(r.scopeMetrics),(r==null?void 0:r.errors)!=null&&a.push(...r.errors)});return await Promise.all(s),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:i},errors:a}}async forceFlush(e){await this._metricReader.forceFlush(e)}async shutdown(e){await this._metricReader.shutdown(e)}selectAggregationTemporality(e){return this._metricReader.selectAggregationTemporality(e)}selectAggregation(e){return this._metricReader.selectAggregation(e)}selectCardinalityLimit(e){var t,i,a;return(a=(i=(t=this._metricReader).selectCardinalityLimit)===null||i===void 0?void 0:i.call(t,e))!==null&&a!==void 0?a:2e3}}});function a3(o,e){let t=e??le.empty();return o?le.default().merge(t):t}var ju,BM=S(()=>{x();Pn();VM();wM();ju=class{constructor(e){var t;if(this._shutdown=!1,this._sharedState=new qu(a3((t=e==null?void 0:e.mergeResourceWithDefaults)!==null&&t!==void 0?t:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)for(let i of e.views)this._sharedState.viewRegistry.addView(i);if((e==null?void 0:e.readers)!=null&&e.readers.length>0)for(let i of e.readers)this.addMetricReader(i)}getMeter(e,t="",i={}){return this._shutdown?(m.warn("A shutdown MeterProvider cannot provide a Meter"),Ac()):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:i.schemaUrl}).meter}addMetricReader(e){let t=new Wu(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)}async shutdown(e){if(this._shutdown){m.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(t=>t.shutdown(e)))}async forceFlush(e){if(this._shutdown){m.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(t=>t.forceFlush(e)))}}});var s3,ki,In,zu=S(()=>{s3=/[\^$\\.+?()[\]{}|]/g,ki=class o{constructor(e){e==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(o.escapePattern(e)))}match(e){return this._matchAll?!0:this._regexp.test(e)}static escapePattern(e){return`^${e.replace(s3,"\\$&").replace("*",".*")}$`}static hasWildcard(e){return e.includes("*")}},In=class{constructor(e){this._matchAll=e===void 0,this._pattern=e}match(e){return!!(this._matchAll||e===this._pattern)}}});var $u,GM=S(()=>{zu();$u=class{constructor(e){var t;this._nameFilter=new ki((t=e==null?void 0:e.name)!==null&&t!==void 0?t:"*"),this._type=e==null?void 0:e.type,this._unitFilter=new In(e==null?void 0:e.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}}});var Xu,HM=S(()=>{zu();Xu=class{constructor(e){this._nameFilter=new In(e==null?void 0:e.name),this._versionFilter=new In(e==null?void 0:e.version),this._schemaUrlFilter=new In(e==null?void 0:e.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}}});function l3(o){return o.instrumentName==null&&o.instrumentType==null&&o.instrumentUnit==null&&o.meterName==null&&o.meterVersion==null&&o.meterSchemaUrl==null}var Ju,kM=S(()=>{zu();id();GM();HM();Ru();Ju=class{constructor(e){var t;if(l3(e))throw new Error("Cannot create view with no selector arguments supplied");if(e.name!=null&&((e==null?void 0:e.instrumentName)==null||ki.hasWildcard(e.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");e.attributeKeys!=null?this.attributesProcessor=new Fu(e.attributeKeys):this.attributesProcessor=yn.Noop(),this.name=e.name,this.description=e.description,this.aggregation=(t=e.aggregation)!==null&&t!==void 0?t:Tt.Default(),this.instrumentSelector=new $u({name:e.instrumentName,type:e.instrumentType,unit:e.instrumentUnit}),this.meterSelector=new Xu({name:e.meterName,version:e.meterVersion,schemaUrl:e.meterSchemaUrl}),this.aggregationCardinalityLimit=e.aggregationCardinalityLimit}}});var ad={};Me(ad,{Aggregation:()=>Tt,AggregationTemporality:()=>lr,ConsoleMetricExporter:()=>Mu,DataPointType:()=>tt,DefaultAggregation:()=>js,DropAggregation:()=>Di,ExplicitBucketHistogramAggregation:()=>qs,ExponentialHistogramAggregation:()=>Ws,HistogramAggregation:()=>Ui,InMemoryMetricExporter:()=>Nu,InstrumentType:()=>pe,LastValueAggregation:()=>xi,MeterProvider:()=>ju,MetricReader:()=>bi,PeriodicExportingMetricReader:()=>Ou,SumAggregation:()=>Po,TimeoutError:()=>Co,View:()=>Ju});var Qu=S(()=>{_u();Mi();Jp();OM();NM();MM();tn();BM();Ru();kM();cr()});var ld=A(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AbstractAsyncHooksContextManager=void 0;var c3=H("events"),u3=["addListener","on","once","prependListener","prependOnceListener"],sd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,t){return t instanceof c3.EventEmitter?this._bindEventEmitter(e,t):typeof t=="function"?this._bindFunction(e,t):t}_bindFunction(e,t){let i=this,a=function(...s){return i.with(e,()=>t.apply(this,s))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),a}_bindEventEmitter(e,t){return this._getPatchMap(t)!==void 0||(this._createPatchMap(t),u3.forEach(a=>{t[a]!==void 0&&(t[a]=this._patchAddListener(t,t[a],e))}),typeof t.removeListener=="function"&&(t.removeListener=this._patchRemoveListener(t,t.removeListener)),typeof t.off=="function"&&(t.off=this._patchRemoveListener(t,t.off)),typeof t.removeAllListeners=="function"&&(t.removeAllListeners=this._patchRemoveAllListeners(t,t.removeAllListeners))),t}_patchRemoveListener(e,t){let i=this;return function(a,s){var n;let r=(n=i._getPatchMap(e))===null||n===void 0?void 0:n[a];if(r===void 0)return t.call(this,a,s);let l=r.get(s);return t.call(this,a,l||s)}}_patchRemoveAllListeners(e,t){let i=this;return function(a){let s=i._getPatchMap(e);return s!==void 0&&(arguments.length===0?i._createPatchMap(e):s[a]!==void 0&&delete s[a]),t.apply(this,arguments)}}_patchAddListener(e,t,i){let a=this;return function(s,n){if(a._wrapped)return t.call(this,s,n);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let l=r[s];l===void 0&&(l=new WeakMap,r[s]=l);let c=a.bind(i,n);l.set(n,c),a._wrapped=!0;try{return t.call(this,s,c)}finally{a._wrapped=!1}}}_createPatchMap(e){let t=Object.create(null);return e[this._kOtListeners]=t,t}_getPatchMap(e){return e[this._kOtListeners]}};Zu.AbstractAsyncHooksContextManager=sd});var YM=A(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.AsyncHooksContextManager=void 0;var E3=(x(),$(Ze)),_3=H("async_hooks"),T3=ld(),cd=class extends T3.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=_3.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){var e;return(e=this._stack[this._stack.length-1])!==null&&e!==void 0?e:E3.ROOT_CONTEXT}with(e,t,i,...a){this._enterContext(e);try{return t.call(i,...a)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,t){if(t==="TIMERWRAP")return;let i=this._stack[this._stack.length-1];i!==void 0&&this._contexts.set(e,i)}_destroy(e){this._contexts.delete(e)}_before(e){let t=this._contexts.get(e);t!==void 0&&this._enterContext(t)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};eE.AsyncHooksContextManager=cd});var FM=A(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.AsyncLocalStorageContextManager=void 0;var S3=(x(),$(Ze)),p3=H("async_hooks"),d3=ld(),ud=class extends d3.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new p3.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:S3.ROOT_CONTEXT}with(e,t,i,...a){let s=i==null?t:t.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};tE.AsyncLocalStorageContextManager=ud});var KM=A(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.AsyncLocalStorageContextManager=Yi.AsyncHooksContextManager=void 0;var f3=YM();Object.defineProperty(Yi,"AsyncHooksContextManager",{enumerable:!0,get:function(){return f3.AsyncHooksContextManager}});var A3=FM();Object.defineProperty(Yi,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return A3.AsyncLocalStorageContextManager}})});var Fi,Ed=S(()=>{x();Fi=Gt("OpenTelemetry Context Key B3 Debug Flag")});var Dn,Ki,qi,Wi,rE,ji,Xs=S(()=>{Dn="b3",Ki="x-b3-traceid",qi="x-b3-spanid",Wi="x-b3-sampled",rE="x-b3-parentspanid",ji="x-b3-flags"});function R3(o){return o===Se.SAMPLED||o===Se.NONE}function m3(o){return Array.isArray(o)?o[0]:o}function oE(o,e,t){let i=e.get(o,t);return m3(i)}function O3(o,e){let t=oE(o,e,Ki);return typeof t=="string"?t.padStart(32,"0"):""}function N3(o,e){let t=oE(o,e,qi);return typeof t=="string"?t:""}function qM(o,e){return oE(o,e,ji)==="1"?"1":void 0}function M3(o,e){let t=oE(o,e,Wi);if(qM(o,e)==="1"||h3.has(t))return Se.SAMPLED;if(t===void 0||v3.has(t))return Se.NONE}var h3,v3,nE,WM=S(()=>{x();ee();Ed();Xs();h3=new Set([!0,"true","True","1",1]),v3=new Set([!1,"false","False","0",0]);nE=class{inject(e,t,i){let a=Ee.getSpanContext(e);if(!a||!qe(a)||st(e))return;let s=e.getValue(Fi);i.set(t,Ki,a.traceId),i.set(t,qi,a.spanId),s==="1"?i.set(t,ji,s):a.traceFlags!==void 0&&i.set(t,Wi,(Se.SAMPLED&a.traceFlags)===Se.SAMPLED?"1":"0")}extract(e,t,i){let a=O3(t,i),s=N3(t,i),n=M3(t,i),r=qM(t,i);return sr(a)&&po(s)&&R3(n)?(e=e.setValue(Fi,r),Ee.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:n})):e}fields(){return[Ki,qi,ji,Wi,rE]}}});function y3(o){return o.length===32?o:`${P3}${o}`}function I3(o){return o&&g3.has(o)?Se.SAMPLED:Se.NONE}var C3,P3,g3,L3,iE,jM=S(()=>{x();ee();Ed();Xs();C3=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,P3="0".repeat(16),g3=new Set(["d","1"]),L3="d";iE=class{inject(e,t,i){let a=Ee.getSpanContext(e);if(!a||!qe(a)||st(e))return;let s=e.getValue(Fi)||a.traceFlags&1,n=`${a.traceId}-${a.spanId}-${s}`;i.set(t,Dn,n)}extract(e,t,i){let a=i.get(t,Dn),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;let n=s.match(C3);if(!n)return e;let[,r,l,c]=n,u=y3(r);if(!sr(u)||!po(l))return e;let E=I3(c);return c===L3&&(e=e.setValue(Fi,c)),Ee.setSpanContext(e,{traceId:u,spanId:l,isRemote:!0,traceFlags:E})}fields(){return[Dn]}}});var zi,_d=S(()=>{(function(o){o[o.SINGLE_HEADER=0]="SINGLE_HEADER",o[o.MULTI_HEADER=1]="MULTI_HEADER"})(zi||(zi={}))});var aE,zM=S(()=>{ee();WM();jM();Xs();_d();aE=class{constructor(e={}){this._b3MultiPropagator=new nE,this._b3SinglePropagator=new iE,e.injectEncoding===zi.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}inject(e,t,i){st(e)||this._inject(e,t,i)}extract(e,t,i){let a=i.get(t,Dn);return(Array.isArray(a)?a[0]:a)?this._b3SinglePropagator.extract(e,t,i):this._b3MultiPropagator.extract(e,t,i)}fields(){return this._fields}}});var $M={};Me($M,{B3InjectEncoding:()=>zi,B3Propagator:()=>aE,B3_CONTEXT_HEADER:()=>Dn,X_B3_FLAGS:()=>ji,X_B3_PARENT_SPAN_ID:()=>rE,X_B3_SAMPLED:()=>Wi,X_B3_SPAN_ID:()=>qi,X_B3_TRACE_ID:()=>Ki});var XM=S(()=>{zM();Xs();_d()});var D3,x3,U3,sE,lE,JM,QM=S(()=>{D3="exception.type",x3="exception.message",U3="exception.stacktrace",sE=D3,lE=x3,JM=U3});var ZM=S(()=>{QM()});var eC=S(()=>{});var tC=S(()=>{eC()});var rC=S(()=>{});var nC=S(()=>{});var oC=S(()=>{ZM();tC();rC();nC()});var iC,aC=S(()=>{iC="exception"});var $i,Td=S(()=>{x();ee();oC();aC();$i=class{constructor(e,t,i,a,s,n,r=[],l,c,u){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:mr.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=n,this.kind=s,this.links=r;let E=Date.now();this._performanceStartTime=kt.now(),this._performanceOffset=E-(this._performanceStartTime+li()),this._startTimeProvided=l!=null,this.startTime=this._getTime(l??E),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}spanContext(){return this._spanContext}setAttribute(e,t){return t==null||this._isSpanEnded()?this:e.length===0?(m.warn(`Invalid attribute key: ${e}`),this):mn(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(m.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,i]of Object.entries(e))this.setAttribute(t,i);return this}addEvent(e,t,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return m.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&m.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),ms(t)&&(ms(i)||(i=t),t=void 0);let a=Rn(t);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}setStatus(e){return this._isSpanEnded()?this:(this.status=Object.assign({},e),this.status.message!=null&&typeof e.message!="string"&&(m.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`),delete this.status.message),this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){m.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(e),this._duration=Yc(this.startTime,this.endTime),this._duration[0]<0&&(m.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&m.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=kt.now())return vs(e+this._performanceOffset);if(typeof e=="number")return et(e);if(e instanceof Date)return et(e.getTime());if(ci(e))return e;if(this._startTimeProvided)return et(Date.now());let t=kt.now()-this._performanceStartTime;return Os(this.startTime,et(t))}isRecording(){return this._ended===!1}recordException(e,t){let i={};typeof e=="string"?i[lE]=e:e&&(e.code?i[sE]=e.code.toString():e.name&&(i[sE]=e.name),e.message&&(i[lE]=e.message),e.stack&&(i[JM]=e.stack)),i[sE]||i[lE]?this.addEvent(iC,i,t):m.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&m.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(m.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(i=>typeof i=="string"?this._truncateToLimitUtil(i,t):i):e}}});var ur,Js=S(()=>{(function(o){o[o.NOT_RECORD=0]="NOT_RECORD",o[o.RECORD=1]="RECORD",o[o.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ur||(ur={}))});var Cr,cE=S(()=>{Js();Cr=class{shouldSample(){return{decision:ur.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}});var Ft,uE=S(()=>{Js();Ft=class{shouldSample(){return{decision:ur.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}});var xn,Sd=S(()=>{x();ee();cE();uE();xn=class{constructor(e){var t,i,a,s;this._root=e.root,this._root||(Oe(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ft),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new Ft,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new Cr,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Ft,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new Cr}shouldSample(e,t,i,a,s,n){let r=Ee.getSpanContext(e);return!r||!qe(r)?this._root.shouldSample(e,t,i,a,s,n):r.isRemote?r.traceFlags&Se.SAMPLED?this._remoteParentSampled.shouldSample(e,t,i,a,s,n):this._remoteParentNotSampled.shouldSample(e,t,i,a,s,n):r.traceFlags&Se.SAMPLED?this._localParentSampled.shouldSample(e,t,i,a,s,n):this._localParentNotSampled.shouldSample(e,t,i,a,s,n)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}});var go,pd=S(()=>{x();Js();go=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:sr(t)&&this._accumulate(t)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let i=0;i>>0}return t}}});function EE(){let o=Ue();return{sampler:dd(b3),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:o.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:o.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:o.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:o.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:o.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:o.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:o.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:o.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function dd(o=Ue()){switch(o.OTEL_TRACES_SAMPLER){case Nt.AlwaysOn:return new Ft;case Nt.AlwaysOff:return new Cr;case Nt.ParentBasedAlwaysOn:return new xn({root:new Ft});case Nt.ParentBasedAlwaysOff:return new xn({root:new Cr});case Nt.TraceIdRatio:return new go(sC(o));case Nt.ParentBasedTraceIdRatio:return new xn({root:new go(sC(o))});default:return m.error(`OTEL_TRACES_SAMPLER value "${o.OTEL_TRACES_SAMPLER} invalid, defaulting to ${V3}".`),new Ft}}function sC(o){if(o.OTEL_TRACES_SAMPLER_ARG===void 0||o.OTEL_TRACES_SAMPLER_ARG==="")return m.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Xi}.`),Xi;let e=Number(o.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(m.error(`OTEL_TRACES_SAMPLER_ARG=${o.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Xi}.`),Xi):e<0||e>1?(m.error(`OTEL_TRACES_SAMPLER_ARG=${o.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${Xi}.`),Xi):e}var b3,V3,Xi,fd=S(()=>{x();ee();cE();uE();Sd();pd();b3=Ue(),V3=Nt.AlwaysOn,Xi=1});function lC(o){let e={sampler:dd()},t=EE(),i=Object.assign({},t,e,o);return i.generalLimits=Object.assign({},t.generalLimits,o.generalLimits||{}),i.spanLimits=Object.assign({},t.spanLimits,o.spanLimits||{}),i}function cC(o){var e,t,i,a,s,n,r,l,c,u,E,d;let f=Object.assign({},o.spanLimits),O=On();return f.attributeCountLimit=(n=(s=(a=(t=(e=o.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&t!==void 0?t:(i=o.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:O.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:O.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:Qr,f.attributeValueLengthLimit=(d=(E=(u=(l=(r=o.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&l!==void 0?l:(c=o.generalLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&u!==void 0?u:O.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&E!==void 0?E:O.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:Jr,Object.assign({},o,{spanLimits:f})}var Ad=S(()=>{fd();ee()});var _E,uC=S(()=>{x();ee();_E=class{constructor(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let i=Ue();this._maxExportBatchSize=typeof(t==null?void 0:t.maxExportBatchSize)=="number"?t.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(t==null?void 0:t.maxQueueSize)=="number"?t.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(t==null?void 0:t.scheduledDelayMillis)=="number"?t.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(t==null?void 0:t.exportTimeoutMillis)=="number"?t.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new ct(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(m.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Se.SAMPLED&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&m.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(m.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let i=[],a=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let s=0,n=a;s{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let i=setTimeout(()=>{t(new Error("Timeout"))},this._exportTimeoutMillis);Ye.with(oi(Ye.active()),()=>{let a;this._finishedSpans.length<=this._maxExportBatchSize?(a=this._finishedSpans,this._finishedSpans=[]):a=this._finishedSpans.splice(0,this._maxExportBatchSize);let s=()=>this._exporter.export(a,r=>{var l;clearTimeout(i),r.code===X.SUCCESS?e():t((l=r.error)!==null&&l!==void 0?l:new Error("BatchSpanProcessor: span export failed"))}),n=null;for(let r=0,l=a.length;r{Oe(r),t(r)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(t=>{this._isExporting=!1,Oe(t)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),Or(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}});var Un,EC=S(()=>{uC();Un=class extends _E{onShutdown(){}}});function _C(o){return function(){for(let t=0;t>>0,t*4);for(let t=0;t0);t++)t===o-1&&(TE[o-1]=1);return TE.toString("hex",0,o)}}var bn,TE,TC=S(()=>{bn=class{constructor(){this.generateTraceId=_C(16),this.generateSpanId=_C(8)}},TE=Buffer.allocUnsafe(16)});var SC=S(()=>{EC();TC()});var SE=S(()=>{SC()});var Ji,pC=S(()=>{x();ee();Td();Ad();SE();Ji=class{constructor(e,t,i){this._tracerProvider=i;let a=lC(t);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=t.idGenerator||new bn,this.resource=i.resource,this.instrumentationLibrary=e}startSpan(e,t={},i=Ye.active()){var a,s,n;t.root&&(i=Ee.deleteSpan(i));let r=Ee.getSpan(i);if(st(i))return m.debug("Instrumentation suppressed, returning Noop Span"),Ee.wrapSpanContext(ni);let l=r==null?void 0:r.spanContext(),c=this._idGenerator.generateSpanId(),u,E,d;!l||!Ee.isSpanContextValid(l)?u=this._idGenerator.generateTraceId():(u=l.traceId,E=l.traceState,d=l.spanId);let f=(a=t.kind)!==null&&a!==void 0?a:Ht.INTERNAL,O=((s=t.links)!==null&&s!==void 0?s:[]).map(q=>({context:q.context,attributes:Rn(q.attributes)})),v=Rn(t.attributes),M=this._sampler.shouldSample(i,u,e,f,v,O);E=(n=M.traceState)!==null&&n!==void 0?n:E;let C=M.decision===mt.RECORD_AND_SAMPLED?Se.SAMPLED:Se.NONE,P={traceId:u,spanId:c,traceFlags:C,traceState:E};if(M.decision===mt.NOT_RECORD)return m.debug("Recording is off, propagating context in a non-recording span"),Ee.wrapSpanContext(P);let b=Rn(Object.assign(v,M.attributes));return new $i(this,i,e,P,f,d,O,t.startTime,void 0,b)}startActiveSpan(e,t,i,a){let s,n,r;if(arguments.length<2)return;arguments.length===2?r=t:arguments.length===3?(s=t,r=i):(s=t,n=i,r=a);let l=n??Ye.active(),c=this.startSpan(e,s,l),u=Ee.setSpan(l,c);return Ye.with(u,r,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}});var Qs,dC=S(()=>{ee();Qs=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(i=>{Oe(i||new Error("MultiSpanProcessor: forceFlush failed")),t()})})}onStart(e,t){for(let i of this._spanProcessors)i.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,i)=>{Promise.all(e).then(()=>{t()},i)})}}});var Qi,hd=S(()=>{Qi=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}});var rn,Zi,fC=S(()=>{x();ee();Pn();Lo();fd();dC();hd();SE();Ad();(function(o){o[o.resolved=0]="resolved",o[o.timeout=1]="timeout",o[o.error=2]="error",o[o.unresolved=3]="unresolved"})(rn||(rn={}));Zi=class{constructor(e={}){var t,i;this._registeredSpanProcessors=[],this._tracers=new Map;let a=Ti({},EE(),cC(e));if(this.resource=(t=a.resource)!==null&&t!==void 0?t:le.empty(),a.mergeResourceWithDefaults&&(this.resource=le.default().merge(this.resource)),this._config=Object.assign({},a,{resource:this.resource}),!((i=e.spanProcessors)===null||i===void 0)&&i.length)this._registeredSpanProcessors=[...e.spanProcessors],this.activeSpanProcessor=new Qs(this._registeredSpanProcessors);else{let s=this._buildExporterFromEnv();if(s!==void 0){let n=new Un(s);this.activeSpanProcessor=n}else this.activeSpanProcessor=new Qi}}getTracer(e,t,i){let a=`${e}@${t||""}:${(i==null?void 0:i.schemaUrl)||""}`;return this._tracers.has(a)||this._tracers.set(a,new Ji({name:e,version:t,schemaUrl:i==null?void 0:i.schemaUrl},this._config,this)),this._tracers.get(a)}addSpanProcessor(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(t=>m.error("Error while trying to shutdown current span processor",t)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new Qs(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){Ee.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ye.setGlobalContextManager(e.contextManager),e.propagator&&Ot.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map(i=>new Promise(a=>{let s,n=setTimeout(()=>{a(new Error(`Span processor did not completed within timeout period of ${e} ms`)),s=rn.timeout},e);i.forceFlush().then(()=>{clearTimeout(n),s!==rn.timeout&&(s=rn.resolved,a(s))}).catch(r=>{clearTimeout(n),s=rn.error,a(r)})}));return new Promise((i,a)=>{Promise.all(t).then(s=>{let n=s.filter(r=>r!==rn.resolved);n.length>0?a(n):i()}).catch(s=>a([s]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return(t=this.constructor._registeredPropagators.get(e))===null||t===void 0?void 0:t()}_getSpanExporter(e){var t;return(t=this.constructor._registeredExporters.get(e))===null||t===void 0?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(Ue().OTEL_PROPAGATORS)),i=e.map(a=>{let s=this._getPropagator(a);return s||m.warn(`Propagator "${a}" requested through environment variable is unavailable.`),s}).reduce((a,s)=>(s&&a.push(s),a),[]);if(i.length!==0)return e.length===1?i[0]:new ui({propagators:i})}_buildExporterFromEnv(){let e=Ue().OTEL_TRACES_EXPORTER;if(e==="none"||e==="")return;let t=this._getSpanExporter(e);return t||m.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};Zi._registeredPropagators=new Map([["tracecontext",()=>new _i],["baggage",()=>new ai]]);Zi._registeredExporters=new Map});var pE,AC=S(()=>{ee();pE=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){var t;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(t=e.spanContext().traceState)===null||t===void 0?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:lt(e.startTime),duration:lt(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,t){for(let i of e)console.dir(this._exportInfo(i),{depth:3});if(t)return t({code:X.SUCCESS})}}});var dE,hC=S(()=>{ee();dE=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:X.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>t({code:X.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}});var fE,vC=S(()=>{x();ee();fE=class{constructor(e){this._exporter=e,this._shutdownOnce=new ct(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,t){}onEnd(e){var t,i;if(this._shutdownOnce.isCalled||!(e.spanContext().traceFlags&Se.SAMPLED))return;let a=()=>Zr._export(this._exporter,[e]).then(s=>{var n;s.code!==X.SUCCESS&&Oe((n=s.error)!==null&&n!==void 0?n:new Error(`SimpleSpanProcessor: span export failed (status ${s})`))}).catch(s=>{Oe(s)});if(e.resource.asyncAttributesPending){let s=(i=(t=e.resource).waitForAsyncAttributes)===null||i===void 0?void 0:i.call(t).then(()=>(s!=null&&this._unresolvedExports.delete(s),a()),n=>Oe(n));s!=null&&this._unresolvedExports.add(s)}else a()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}});var ea={};Me(ea,{AlwaysOffSampler:()=>Cr,AlwaysOnSampler:()=>Ft,BasicTracerProvider:()=>Zi,BatchSpanProcessor:()=>Un,ConsoleSpanExporter:()=>pE,ForceFlushState:()=>rn,InMemorySpanExporter:()=>dE,NoopSpanProcessor:()=>Qi,ParentBasedSampler:()=>xn,RandomIdGenerator:()=>bn,SamplingDecision:()=>ur,SimpleSpanProcessor:()=>fE,Span:()=>$i,TraceIdRatioBasedSampler:()=>go,Tracer:()=>Ji});var Lo=S(()=>{pC();fC();SE();AC();hC();vC();hd();cE();uE();Sd();pd();Js();Td()});var Zs=A((qRe,RC)=>{var w3="2.0.0",B3=Number.MAX_SAFE_INTEGER||9007199254740991,G3=16,H3=250,k3=["major","premajor","minor","preminor","patch","prepatch","prerelease"];RC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:G3,MAX_SAFE_BUILD_LENGTH:H3,MAX_SAFE_INTEGER:B3,RELEASE_TYPES:k3,SEMVER_SPEC_VERSION:w3,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var el=A((WRe,mC)=>{var Y3=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...o)=>console.error("SEMVER",...o):()=>{};mC.exports=Y3});var ta=A((Pr,OC)=>{var{MAX_SAFE_COMPONENT_LENGTH:vd,MAX_SAFE_BUILD_LENGTH:F3,MAX_LENGTH:K3}=Zs(),q3=el();Pr=OC.exports={};var W3=Pr.re=[],j3=Pr.safeRe=[],V=Pr.src=[],z3=Pr.safeSrc=[],w=Pr.t={},$3=0,Rd="[a-zA-Z0-9-]",X3=[["\\s",1],["\\d",K3],[Rd,F3]],J3=o=>{for(let[e,t]of X3)o=o.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return o},te=(o,e,t)=>{let i=J3(e),a=$3++;q3(o,a,e),w[o]=a,V[a]=e,z3[a]=i,W3[a]=new RegExp(e,t?"g":void 0),j3[a]=new RegExp(i,t?"g":void 0)};te("NUMERICIDENTIFIER","0|[1-9]\\d*");te("NUMERICIDENTIFIERLOOSE","\\d+");te("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Rd}*`);te("MAINVERSION",`(${V[w.NUMERICIDENTIFIER]})\\.(${V[w.NUMERICIDENTIFIER]})\\.(${V[w.NUMERICIDENTIFIER]})`);te("MAINVERSIONLOOSE",`(${V[w.NUMERICIDENTIFIERLOOSE]})\\.(${V[w.NUMERICIDENTIFIERLOOSE]})\\.(${V[w.NUMERICIDENTIFIERLOOSE]})`);te("PRERELEASEIDENTIFIER",`(?:${V[w.NUMERICIDENTIFIER]}|${V[w.NONNUMERICIDENTIFIER]})`);te("PRERELEASEIDENTIFIERLOOSE",`(?:${V[w.NUMERICIDENTIFIERLOOSE]}|${V[w.NONNUMERICIDENTIFIER]})`);te("PRERELEASE",`(?:-(${V[w.PRERELEASEIDENTIFIER]}(?:\\.${V[w.PRERELEASEIDENTIFIER]})*))`);te("PRERELEASELOOSE",`(?:-?(${V[w.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${V[w.PRERELEASEIDENTIFIERLOOSE]})*))`);te("BUILDIDENTIFIER",`${Rd}+`);te("BUILD",`(?:\\+(${V[w.BUILDIDENTIFIER]}(?:\\.${V[w.BUILDIDENTIFIER]})*))`);te("FULLPLAIN",`v?${V[w.MAINVERSION]}${V[w.PRERELEASE]}?${V[w.BUILD]}?`);te("FULL",`^${V[w.FULLPLAIN]}$`);te("LOOSEPLAIN",`[v=\\s]*${V[w.MAINVERSIONLOOSE]}${V[w.PRERELEASELOOSE]}?${V[w.BUILD]}?`);te("LOOSE",`^${V[w.LOOSEPLAIN]}$`);te("GTLT","((?:<|>)?=?)");te("XRANGEIDENTIFIERLOOSE",`${V[w.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);te("XRANGEIDENTIFIER",`${V[w.NUMERICIDENTIFIER]}|x|X|\\*`);te("XRANGEPLAIN",`[v=\\s]*(${V[w.XRANGEIDENTIFIER]})(?:\\.(${V[w.XRANGEIDENTIFIER]})(?:\\.(${V[w.XRANGEIDENTIFIER]})(?:${V[w.PRERELEASE]})?${V[w.BUILD]}?)?)?`);te("XRANGEPLAINLOOSE",`[v=\\s]*(${V[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${V[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${V[w.XRANGEIDENTIFIERLOOSE]})(?:${V[w.PRERELEASELOOSE]})?${V[w.BUILD]}?)?)?`);te("XRANGE",`^${V[w.GTLT]}\\s*${V[w.XRANGEPLAIN]}$`);te("XRANGELOOSE",`^${V[w.GTLT]}\\s*${V[w.XRANGEPLAINLOOSE]}$`);te("COERCEPLAIN",`(^|[^\\d])(\\d{1,${vd}})(?:\\.(\\d{1,${vd}}))?(?:\\.(\\d{1,${vd}}))?`);te("COERCE",`${V[w.COERCEPLAIN]}(?:$|[^\\d])`);te("COERCEFULL",V[w.COERCEPLAIN]+`(?:${V[w.PRERELEASE]})?(?:${V[w.BUILD]})?(?:$|[^\\d])`);te("COERCERTL",V[w.COERCE],!0);te("COERCERTLFULL",V[w.COERCEFULL],!0);te("LONETILDE","(?:~>?)");te("TILDETRIM",`(\\s*)${V[w.LONETILDE]}\\s+`,!0);Pr.tildeTrimReplace="$1~";te("TILDE",`^${V[w.LONETILDE]}${V[w.XRANGEPLAIN]}$`);te("TILDELOOSE",`^${V[w.LONETILDE]}${V[w.XRANGEPLAINLOOSE]}$`);te("LONECARET","(?:\\^)");te("CARETTRIM",`(\\s*)${V[w.LONECARET]}\\s+`,!0);Pr.caretTrimReplace="$1^";te("CARET",`^${V[w.LONECARET]}${V[w.XRANGEPLAIN]}$`);te("CARETLOOSE",`^${V[w.LONECARET]}${V[w.XRANGEPLAINLOOSE]}$`);te("COMPARATORLOOSE",`^${V[w.GTLT]}\\s*(${V[w.LOOSEPLAIN]})$|^$`);te("COMPARATOR",`^${V[w.GTLT]}\\s*(${V[w.FULLPLAIN]})$|^$`);te("COMPARATORTRIM",`(\\s*)${V[w.GTLT]}\\s*(${V[w.LOOSEPLAIN]}|${V[w.XRANGEPLAIN]})`,!0);Pr.comparatorTrimReplace="$1$2$3";te("HYPHENRANGE",`^\\s*(${V[w.XRANGEPLAIN]})\\s+-\\s+(${V[w.XRANGEPLAIN]})\\s*$`);te("HYPHENRANGELOOSE",`^\\s*(${V[w.XRANGEPLAINLOOSE]})\\s+-\\s+(${V[w.XRANGEPLAINLOOSE]})\\s*$`);te("STAR","(<|>)?=?\\s*\\*");te("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");te("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var AE=A((jRe,NC)=>{var Q3=Object.freeze({loose:!0}),Z3=Object.freeze({}),eK=o=>o?typeof o!="object"?Q3:o:Z3;NC.exports=eK});var md=A((zRe,PC)=>{var MC=/^[0-9]+$/,CC=(o,e)=>{let t=MC.test(o),i=MC.test(e);return t&&i&&(o=+o,e=+e),o===e?0:t&&!i?-1:i&&!t?1:oCC(e,o);PC.exports={compareIdentifiers:CC,rcompareIdentifiers:tK}});var ut=A(($Re,IC)=>{var hE=el(),{MAX_LENGTH:gC,MAX_SAFE_INTEGER:vE}=Zs(),{safeRe:LC,safeSrc:yC,t:RE}=ta(),rK=AE(),{compareIdentifiers:ra}=md(),Od=class o{constructor(e,t){if(t=rK(t),e instanceof o){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>gC)throw new TypeError(`version is longer than ${gC} characters`);hE("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?LC[RE.LOOSE]:LC[RE.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>vE||this.major<0)throw new TypeError("Invalid major version");if(this.minor>vE||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>vE||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let s=+a;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(t){let s=[t,a];i===!1&&(s=[t]),ra(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};IC.exports=Od});var yo=A((XRe,xC)=>{var DC=ut(),nK=(o,e,t=!1)=>{if(o instanceof DC)return o;try{return new DC(o,e)}catch(i){if(!t)return null;throw i}};xC.exports=nK});var bC=A((JRe,UC)=>{var oK=yo(),iK=(o,e)=>{let t=oK(o,e);return t?t.version:null};UC.exports=iK});var wC=A((QRe,VC)=>{var aK=yo(),sK=(o,e)=>{let t=aK(o.trim().replace(/^[=v]+/,""),e);return t?t.version:null};VC.exports=sK});var HC=A((ZRe,GC)=>{var BC=ut(),lK=(o,e,t,i,a)=>{typeof t=="string"&&(a=i,i=t,t=void 0);try{return new BC(o instanceof BC?o.version:o,t).inc(e,i,a).version}catch{return null}};GC.exports=lK});var FC=A((eme,YC)=>{var kC=yo(),cK=(o,e)=>{let t=kC(o,null,!0),i=kC(e,null,!0),a=t.compare(i);if(a===0)return null;let s=a>0,n=s?t:i,r=s?i:t,l=!!n.prerelease.length;if(!!r.prerelease.length&&!l){if(!r.patch&&!r.minor)return"major";if(r.compareMain(n)===0)return r.minor&&!r.patch?"minor":"patch"}let u=l?"pre":"";return t.major!==i.major?u+"major":t.minor!==i.minor?u+"minor":t.patch!==i.patch?u+"patch":"prerelease"};YC.exports=cK});var qC=A((tme,KC)=>{var uK=ut(),EK=(o,e)=>new uK(o,e).major;KC.exports=EK});var jC=A((rme,WC)=>{var _K=ut(),TK=(o,e)=>new _K(o,e).minor;WC.exports=TK});var $C=A((nme,zC)=>{var SK=ut(),pK=(o,e)=>new SK(o,e).patch;zC.exports=pK});var JC=A((ome,XC)=>{var dK=yo(),fK=(o,e)=>{let t=dK(o,e);return t&&t.prerelease.length?t.prerelease:null};XC.exports=fK});var Kt=A((ime,ZC)=>{var QC=ut(),AK=(o,e,t)=>new QC(o,t).compare(new QC(e,t));ZC.exports=AK});var tP=A((ame,eP)=>{var hK=Kt(),vK=(o,e,t)=>hK(e,o,t);eP.exports=vK});var nP=A((sme,rP)=>{var RK=Kt(),mK=(o,e)=>RK(o,e,!0);rP.exports=mK});var mE=A((lme,iP)=>{var oP=ut(),OK=(o,e,t)=>{let i=new oP(o,t),a=new oP(e,t);return i.compare(a)||i.compareBuild(a)};iP.exports=OK});var sP=A((cme,aP)=>{var NK=mE(),MK=(o,e)=>o.sort((t,i)=>NK(t,i,e));aP.exports=MK});var cP=A((ume,lP)=>{var CK=mE(),PK=(o,e)=>o.sort((t,i)=>CK(i,t,e));lP.exports=PK});var tl=A((Eme,uP)=>{var gK=Kt(),LK=(o,e,t)=>gK(o,e,t)>0;uP.exports=LK});var OE=A((_me,EP)=>{var yK=Kt(),IK=(o,e,t)=>yK(o,e,t)<0;EP.exports=IK});var Nd=A((Tme,_P)=>{var DK=Kt(),xK=(o,e,t)=>DK(o,e,t)===0;_P.exports=xK});var Md=A((Sme,TP)=>{var UK=Kt(),bK=(o,e,t)=>UK(o,e,t)!==0;TP.exports=bK});var NE=A((pme,SP)=>{var VK=Kt(),wK=(o,e,t)=>VK(o,e,t)>=0;SP.exports=wK});var ME=A((dme,pP)=>{var BK=Kt(),GK=(o,e,t)=>BK(o,e,t)<=0;pP.exports=GK});var Cd=A((fme,dP)=>{var HK=Nd(),kK=Md(),YK=tl(),FK=NE(),KK=OE(),qK=ME(),WK=(o,e,t,i)=>{switch(e){case"===":return typeof o=="object"&&(o=o.version),typeof t=="object"&&(t=t.version),o===t;case"!==":return typeof o=="object"&&(o=o.version),typeof t=="object"&&(t=t.version),o!==t;case"":case"=":case"==":return HK(o,t,i);case"!=":return kK(o,t,i);case">":return YK(o,t,i);case">=":return FK(o,t,i);case"<":return KK(o,t,i);case"<=":return qK(o,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};dP.exports=WK});var AP=A((Ame,fP)=>{var jK=ut(),zK=yo(),{safeRe:CE,t:PE}=ta(),$K=(o,e)=>{if(o instanceof jK)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;e=e||{};let t=null;if(!e.rtl)t=o.match(e.includePrerelease?CE[PE.COERCEFULL]:CE[PE.COERCE]);else{let l=e.includePrerelease?CE[PE.COERCERTLFULL]:CE[PE.COERCERTL],c;for(;(c=l.exec(o))&&(!t||t.index+t[0].length!==o.length);)(!t||c.index+c[0].length!==t.index+t[0].length)&&(t=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(t===null)return null;let i=t[2],a=t[3]||"0",s=t[4]||"0",n=e.includePrerelease&&t[5]?`-${t[5]}`:"",r=e.includePrerelease&&t[6]?`+${t[6]}`:"";return zK(`${i}.${a}.${s}${n}${r}`,e)};fP.exports=$K});var vP=A((hme,hP)=>{var Pd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,t)}return this}};hP.exports=Pd});var qt=A((vme,NP)=>{var XK=/\s+/g,gd=class o{constructor(e,t){if(t=QK(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof Ld)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(XK," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!mP(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&iq(a[0])){this.set=[a];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let t=this.set[e];for(let i=0;i0&&(this.formatted+=" "),this.formatted+=t[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&nq)|(this.options.loose&&oq))+":"+e,a=RP.get(i);if(a)return a;let s=this.options.loose,n=s?Mt[St.HYPHENRANGELOOSE]:Mt[St.HYPHENRANGE];e=e.replace(n,pq(this.options.includePrerelease)),ge("hyphen replace",e),e=e.replace(Mt[St.COMPARATORTRIM],eq),ge("comparator trim",e),e=e.replace(Mt[St.TILDETRIM],tq),ge("tilde trim",e),e=e.replace(Mt[St.CARETTRIM],rq),ge("caret trim",e);let r=e.split(" ").map(E=>aq(E,this.options)).join(" ").split(/\s+/).map(E=>Sq(E,this.options));s&&(r=r.filter(E=>(ge("loose invalid filter",E,this.options),!!E.match(Mt[St.COMPARATORLOOSE])))),ge("range list",r);let l=new Map,c=r.map(E=>new Ld(E,this.options));for(let E of c){if(mP(E))return[E];l.set(E.value,E)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return RP.set(i,u),u}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Range is required");return this.set.some(i=>OP(i,t)&&e.set.some(a=>OP(a,t)&&i.every(s=>a.every(n=>s.intersects(n,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ZK(e,this.options)}catch{return!1}for(let t=0;to.value==="<0.0.0-0",iq=o=>o.value==="",OP=(o,e)=>{let t=!0,i=o.slice(),a=i.pop();for(;t&&i.length;)t=i.every(s=>a.intersects(s,e)),a=i.pop();return t},aq=(o,e)=>(ge("comp",o,e),o=cq(o,e),ge("caret",o),o=sq(o,e),ge("tildes",o),o=Eq(o,e),ge("xrange",o),o=Tq(o,e),ge("stars",o),o),pt=o=>!o||o.toLowerCase()==="x"||o==="*",sq=(o,e)=>o.trim().split(/\s+/).map(t=>lq(t,e)).join(" "),lq=(o,e)=>{let t=e.loose?Mt[St.TILDELOOSE]:Mt[St.TILDE];return o.replace(t,(i,a,s,n,r)=>{ge("tilde",o,i,a,s,n,r);let l;return pt(a)?l="":pt(s)?l=`>=${a}.0.0 <${+a+1}.0.0-0`:pt(n)?l=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(ge("replaceTilde pr",r),l=`>=${a}.${s}.${n}-${r} <${a}.${+s+1}.0-0`):l=`>=${a}.${s}.${n} <${a}.${+s+1}.0-0`,ge("tilde return",l),l})},cq=(o,e)=>o.trim().split(/\s+/).map(t=>uq(t,e)).join(" "),uq=(o,e)=>{ge("caret",o,e);let t=e.loose?Mt[St.CARETLOOSE]:Mt[St.CARET],i=e.includePrerelease?"-0":"";return o.replace(t,(a,s,n,r,l)=>{ge("caret",o,a,s,n,r,l);let c;return pt(s)?c="":pt(n)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:pt(r)?s==="0"?c=`>=${s}.${n}.0${i} <${s}.${+n+1}.0-0`:c=`>=${s}.${n}.0${i} <${+s+1}.0.0-0`:l?(ge("replaceCaret pr",l),s==="0"?n==="0"?c=`>=${s}.${n}.${r}-${l} <${s}.${n}.${+r+1}-0`:c=`>=${s}.${n}.${r}-${l} <${s}.${+n+1}.0-0`:c=`>=${s}.${n}.${r}-${l} <${+s+1}.0.0-0`):(ge("no pr"),s==="0"?n==="0"?c=`>=${s}.${n}.${r}${i} <${s}.${n}.${+r+1}-0`:c=`>=${s}.${n}.${r}${i} <${s}.${+n+1}.0-0`:c=`>=${s}.${n}.${r} <${+s+1}.0.0-0`),ge("caret return",c),c})},Eq=(o,e)=>(ge("replaceXRanges",o,e),o.split(/\s+/).map(t=>_q(t,e)).join(" ")),_q=(o,e)=>{o=o.trim();let t=e.loose?Mt[St.XRANGELOOSE]:Mt[St.XRANGE];return o.replace(t,(i,a,s,n,r,l)=>{ge("xRange",o,i,a,s,n,r,l);let c=pt(s),u=c||pt(n),E=u||pt(r),d=E;return a==="="&&d&&(a=""),l=e.includePrerelease?"-0":"",c?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&d?(u&&(n=0),r=0,a===">"?(a=">=",u?(s=+s+1,n=0,r=0):(n=+n+1,r=0)):a==="<="&&(a="<",u?s=+s+1:n=+n+1),a==="<"&&(l="-0"),i=`${a+s}.${n}.${r}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:E&&(i=`>=${s}.${n}.0${l} <${s}.${+n+1}.0-0`),ge("xRange return",i),i})},Tq=(o,e)=>(ge("replaceStars",o,e),o.trim().replace(Mt[St.STAR],"")),Sq=(o,e)=>(ge("replaceGTE0",o,e),o.trim().replace(Mt[e.includePrerelease?St.GTE0PRE:St.GTE0],"")),pq=o=>(e,t,i,a,s,n,r,l,c,u,E,d)=>(pt(i)?t="":pt(a)?t=`>=${i}.0.0${o?"-0":""}`:pt(s)?t=`>=${i}.${a}.0${o?"-0":""}`:n?t=`>=${t}`:t=`>=${t}${o?"-0":""}`,pt(c)?l="":pt(u)?l=`<${+c+1}.0.0-0`:pt(E)?l=`<${c}.${+u+1}.0-0`:d?l=`<=${c}.${u}.${E}-${d}`:o?l=`<${c}.${u}.${+E+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),dq=(o,e,t)=>{for(let i=0;i0){let a=o[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var rl=A((Rme,yP)=>{var nl=Symbol("SemVer ANY"),Dd=class o{static get ANY(){return nl}constructor(e,t){if(t=MP(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Id("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===nl?this.value="":this.value=this.operator+this.semver.version,Id("comp",this)}parse(e){let t=this.options.loose?CP[PP.COMPARATORLOOSE]:CP[PP.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new gP(i[2],this.options.loose):this.semver=nl}toString(){return this.value}test(e){if(Id("Comparator.test",e,this.options.loose),this.semver===nl||e===nl)return!0;if(typeof e=="string")try{e=new gP(e,this.options)}catch{return!1}return yd(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new LP(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new LP(this.value,t).test(e.semver):(t=MP(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||yd(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||yd(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};yP.exports=Dd;var MP=AE(),{safeRe:CP,t:PP}=ta(),yd=Cd(),Id=el(),gP=ut(),LP=qt()});var ol=A((mme,IP)=>{var fq=qt(),Aq=(o,e,t)=>{try{e=new fq(e,t)}catch{return!1}return e.test(o)};IP.exports=Aq});var xP=A((Ome,DP)=>{var hq=qt(),vq=(o,e)=>new hq(o,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));DP.exports=vq});var bP=A((Nme,UP)=>{var Rq=ut(),mq=qt(),Oq=(o,e,t)=>{let i=null,a=null,s=null;try{s=new mq(e,t)}catch{return null}return o.forEach(n=>{s.test(n)&&(!i||a.compare(n)===-1)&&(i=n,a=new Rq(i,t))}),i};UP.exports=Oq});var wP=A((Mme,VP)=>{var Nq=ut(),Mq=qt(),Cq=(o,e,t)=>{let i=null,a=null,s=null;try{s=new Mq(e,t)}catch{return null}return o.forEach(n=>{s.test(n)&&(!i||a.compare(n)===1)&&(i=n,a=new Nq(i,t))}),i};VP.exports=Cq});var HP=A((Cme,GP)=>{var xd=ut(),Pq=qt(),BP=tl(),gq=(o,e)=>{o=new Pq(o,e);let t=new xd("0.0.0");if(o.test(t)||(t=new xd("0.0.0-0"),o.test(t)))return t;t=null;for(let i=0;i{let r=new xd(n.semver.version);switch(n.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||BP(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${n.operator}`)}}),s&&(!t||BP(t,s))&&(t=s)}return t&&o.test(t)?t:null};GP.exports=gq});var YP=A((Pme,kP)=>{var Lq=qt(),yq=(o,e)=>{try{return new Lq(o,e).range||"*"}catch{return null}};kP.exports=yq});var gE=A((gme,WP)=>{var Iq=ut(),qP=rl(),{ANY:Dq}=qP,xq=qt(),Uq=ol(),FP=tl(),KP=OE(),bq=ME(),Vq=NE(),wq=(o,e,t,i)=>{o=new Iq(o,i),e=new xq(e,i);let a,s,n,r,l;switch(t){case">":a=FP,s=bq,n=KP,r=">",l=">=";break;case"<":a=KP,s=Vq,n=FP,r="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Uq(o,e,i))return!1;for(let c=0;c{f.semver===Dq&&(f=new qP(">=0.0.0")),E=E||f,d=d||f,a(f.semver,E.semver,i)?E=f:n(f.semver,d.semver,i)&&(d=f)}),E.operator===r||E.operator===l||(!d.operator||d.operator===r)&&s(o,d.semver))return!1;if(d.operator===l&&n(o,d.semver))return!1}return!0};WP.exports=wq});var zP=A((Lme,jP)=>{var Bq=gE(),Gq=(o,e,t)=>Bq(o,e,">",t);jP.exports=Gq});var XP=A((yme,$P)=>{var Hq=gE(),kq=(o,e,t)=>Hq(o,e,"<",t);$P.exports=kq});var ZP=A((Ime,QP)=>{var JP=qt(),Yq=(o,e,t)=>(o=new JP(o,t),e=new JP(e,t),o.intersects(e,t));QP.exports=Yq});var tg=A((Dme,eg)=>{var Fq=ol(),Kq=Kt();eg.exports=(o,e,t)=>{let i=[],a=null,s=null,n=o.sort((u,E)=>Kq(u,E,t));for(let u of n)Fq(u,e,t)?(s=u,a||(a=u)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[u,E]of i)u===E?r.push(u):!E&&u===n[0]?r.push("*"):E?u===n[0]?r.push(`<=${E}`):r.push(`${u} - ${E}`):r.push(`>=${u}`);let l=r.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var rg=qt(),bd=rl(),{ANY:Ud}=bd,il=ol(),Vd=Kt(),qq=(o,e,t={})=>{if(o===e)return!0;o=new rg(o,t),e=new rg(e,t);let i=!1;e:for(let a of o.set){for(let s of e.set){let n=jq(a,s,t);if(i=i||n!==null,n)continue e}if(i)return!1}return!0},Wq=[new bd(">=0.0.0-0")],ng=[new bd(">=0.0.0")],jq=(o,e,t)=>{if(o===e)return!0;if(o.length===1&&o[0].semver===Ud){if(e.length===1&&e[0].semver===Ud)return!0;t.includePrerelease?o=Wq:o=ng}if(e.length===1&&e[0].semver===Ud){if(t.includePrerelease)return!0;e=ng}let i=new Set,a,s;for(let f of o)f.operator===">"||f.operator===">="?a=og(a,f,t):f.operator==="<"||f.operator==="<="?s=ig(s,f,t):i.add(f.semver);if(i.size>1)return null;let n;if(a&&s){if(n=Vd(a.semver,s.semver,t),n>0)return null;if(n===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let f of i){if(a&&!il(f,String(a),t)||s&&!il(f,String(s),t))return null;for(let O of e)if(!il(f,String(O),t))return!1;return!0}let r,l,c,u,E=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,d=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1;E&&E.prerelease.length===1&&s.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let f of e){if(u=u||f.operator===">"||f.operator===">=",c=c||f.operator==="<"||f.operator==="<=",a){if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),f.operator===">"||f.operator===">="){if(r=og(a,f,t),r===f&&r!==a)return!1}else if(a.operator===">="&&!il(a.semver,String(f),t))return!1}if(s){if(E&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===E.major&&f.semver.minor===E.minor&&f.semver.patch===E.patch&&(E=!1),f.operator==="<"||f.operator==="<="){if(l=ig(s,f,t),l===f&&l!==s)return!1}else if(s.operator==="<="&&!il(s.semver,String(f),t))return!1}if(!f.operator&&(s||a)&&n!==0)return!1}return!(a&&c&&!s&&n!==0||s&&u&&!a&&n!==0||d||E)},og=(o,e,t)=>{if(!o)return e;let i=Vd(o.semver,e.semver,t);return i>0?o:i<0||e.operator===">"&&o.operator===">="?e:o},ig=(o,e,t)=>{if(!o)return e;let i=Vd(o.semver,e.semver,t);return i<0?o:i>0||e.operator==="<"&&o.operator==="<="?e:o};ag.exports=qq});var Bd=A((Ume,ug)=>{var wd=ta(),lg=Zs(),zq=ut(),cg=md(),$q=yo(),Xq=bC(),Jq=wC(),Qq=HC(),Zq=FC(),eW=qC(),tW=jC(),rW=$C(),nW=JC(),oW=Kt(),iW=tP(),aW=nP(),sW=mE(),lW=sP(),cW=cP(),uW=tl(),EW=OE(),_W=Nd(),TW=Md(),SW=NE(),pW=ME(),dW=Cd(),fW=AP(),AW=rl(),hW=qt(),vW=ol(),RW=xP(),mW=bP(),OW=wP(),NW=HP(),MW=YP(),CW=gE(),PW=zP(),gW=XP(),LW=ZP(),yW=tg(),IW=sg();ug.exports={parse:$q,valid:Xq,clean:Jq,inc:Qq,diff:Zq,major:eW,minor:tW,patch:rW,prerelease:nW,compare:oW,rcompare:iW,compareLoose:aW,compareBuild:sW,sort:lW,rsort:cW,gt:uW,lt:EW,eq:_W,neq:TW,gte:SW,lte:pW,cmp:dW,coerce:fW,Comparator:AW,Range:hW,satisfies:vW,toComparators:RW,maxSatisfying:mW,minSatisfying:OW,minVersion:NW,validRange:MW,outside:CW,gtr:PW,ltr:gW,intersects:LW,simplifyRange:yW,subset:IW,SemVer:zq,re:wd.re,src:wd.src,tokens:wd.t,SEMVER_SPEC_VERSION:lg.SEMVER_SPEC_VERSION,RELEASE_TYPES:lg.RELEASE_TYPES,compareIdentifiers:cg.compareIdentifiers,rcompareIdentifiers:cg.rcompareIdentifiers}});function xW(o){var e=decodeURIComponent(o).split(":");if(e.length!==4)return null;var t=_g(e,4),i=t[0],a=t[1],s=t[3],n=i.padStart(32,"0"),r=a.padStart(16,"0"),l=DW.test(s)?parseInt(s,16)&1:1;return{traceId:n,spanId:r,isRemote:!0,traceFlags:l}}var Eg,_g,Gd,LE,Tg,DW,Sg=S(()=>{x();ee();Eg=function(o){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&o[e],i=0;if(t)return t.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_g=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},Gd="uber-trace-id",LE="uberctx",Tg=function(){function o(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=LE):(this._jaegerTraceHeader=(e==null?void 0:e.customTraceHeader)||Gd,this._jaegerBaggageHeaderPrefix=(e==null?void 0:e.customBaggageHeaderPrefix)||LE)}return o.prototype.inject=function(e,t,i){var a,s,n=Ee.getSpanContext(e),r=Ot.getBaggage(e);if(n&&st(e)===!1){var l="0"+(n.traceFlags||Se.NONE).toString(16);i.set(t,this._jaegerTraceHeader,n.traceId+":"+n.spanId+":0:"+l)}if(r)try{for(var c=Eg(r.getAllEntries()),u=c.next();!u.done;u=c.next()){var E=_g(u.value,2),d=E[0],f=E[1];i.set(t,this._jaegerBaggageHeaderPrefix+"-"+d,encodeURIComponent(f.value))}}catch(O){a={error:O}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}},o.prototype.extract=function(e,t,i){var a,s,n=this,r,l=i.get(t,this._jaegerTraceHeader),c=Array.isArray(l)?l[0]:l,u=i.keys(t).filter(function(C){return C.startsWith(n._jaegerBaggageHeaderPrefix+"-")}).map(function(C){var P=i.get(t,C);return{key:C.substring(n._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(P)?P[0]:P}}),E=e;if(typeof c=="string"){var d=xW(c);d&&(E=Ee.setSpanContext(E,d))}if(u.length===0)return E;var f=(r=Ot.getBaggage(e))!==null&&r!==void 0?r:Ot.createBaggage();try{for(var O=Eg(u),v=O.next();!v.done;v=O.next()){var M=v.value;M.value!==void 0&&(f=f.setEntry(M.key,{value:decodeURIComponent(M.value)}))}}catch(C){a={error:C}}finally{try{v&&!v.done&&(s=O.return)&&s.call(O)}finally{if(a)throw a.error}}return E=Ot.setBaggage(E,f),E},o.prototype.fields=function(){return[this._jaegerTraceHeader]},o}(),DW=/^[0-9a-f]{1,2}$/i});var pg={};Me(pg,{JaegerPropagator:()=>Tg,UBER_BAGGAGE_HEADER_PREFIX:()=>LE,UBER_TRACE_ID_HEADER:()=>Gd});var dg=S(()=>{Sg()});var hg=A(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});DE.NodeTracerProvider=void 0;var fg=KM(),yE=(XM(),$($M)),Ag=(Lo(),$(ea)),UW=Bd(),bW=(dg(),$(pg)),IE=class extends Ag.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let t=UW.gte(process.version,"14.8.0")?fg.AsyncLocalStorageContextManager:fg.AsyncHooksContextManager;e.contextManager=new t,e.contextManager.enable()}super.register(e)}};DE.NodeTracerProvider=IE;IE._registeredPropagators=new Map([...Ag.BasicTracerProvider._registeredPropagators,["b3",()=>new yE.B3Propagator({injectEncoding:yE.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new yE.B3Propagator({injectEncoding:yE.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new bW.JaegerPropagator]])});var Hd=A(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.Tracer=_e.TraceIdRatioBasedSampler=_e.Span=_e.SimpleSpanProcessor=_e.SamplingDecision=_e.RandomIdGenerator=_e.ParentBasedSampler=_e.NoopSpanProcessor=_e.InMemorySpanExporter=_e.ForceFlushState=_e.ConsoleSpanExporter=_e.BatchSpanProcessor=_e.BasicTracerProvider=_e.AlwaysOnSampler=_e.AlwaysOffSampler=_e.NodeTracerProvider=void 0;var VW=hg();Object.defineProperty(_e,"NodeTracerProvider",{enumerable:!0,get:function(){return VW.NodeTracerProvider}});var dt=(Lo(),$(ea));Object.defineProperty(_e,"AlwaysOffSampler",{enumerable:!0,get:function(){return dt.AlwaysOffSampler}});Object.defineProperty(_e,"AlwaysOnSampler",{enumerable:!0,get:function(){return dt.AlwaysOnSampler}});Object.defineProperty(_e,"BasicTracerProvider",{enumerable:!0,get:function(){return dt.BasicTracerProvider}});Object.defineProperty(_e,"BatchSpanProcessor",{enumerable:!0,get:function(){return dt.BatchSpanProcessor}});Object.defineProperty(_e,"ConsoleSpanExporter",{enumerable:!0,get:function(){return dt.ConsoleSpanExporter}});Object.defineProperty(_e,"ForceFlushState",{enumerable:!0,get:function(){return dt.ForceFlushState}});Object.defineProperty(_e,"InMemorySpanExporter",{enumerable:!0,get:function(){return dt.InMemorySpanExporter}});Object.defineProperty(_e,"NoopSpanProcessor",{enumerable:!0,get:function(){return dt.NoopSpanProcessor}});Object.defineProperty(_e,"ParentBasedSampler",{enumerable:!0,get:function(){return dt.ParentBasedSampler}});Object.defineProperty(_e,"RandomIdGenerator",{enumerable:!0,get:function(){return dt.RandomIdGenerator}});Object.defineProperty(_e,"SamplingDecision",{enumerable:!0,get:function(){return dt.SamplingDecision}});Object.defineProperty(_e,"SimpleSpanProcessor",{enumerable:!0,get:function(){return dt.SimpleSpanProcessor}});Object.defineProperty(_e,"Span",{enumerable:!0,get:function(){return dt.Span}});Object.defineProperty(_e,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return dt.TraceIdRatioBasedSampler}});Object.defineProperty(_e,"Tracer",{enumerable:!0,get:function(){return dt.Tracer}})});function vg(o,e,t,i){for(let a=0,s=o.length;ae.disable())}var mg=S(()=>{});function Og(o){var e,t;let i=o.tracerProvider||Ee.getTracerProvider(),a=o.meterProvider||fo.getMeterProvider(),s=o.loggerProvider||ws.getLoggerProvider(),n=(t=(e=o.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&t!==void 0?t:[];return vg(n,i,a,s),()=>{Rg(n)}}var Ng=S(()=>{x();Bs();mg()});var Yd=A((Wme,Pg)=>{"use strict";function kd(o){return typeof o=="function"}var ft=console.error.bind(console);function al(o,e,t){var i=!!o[e]&&o.propertyIsEnumerable(e);Object.defineProperty(o,e,{configurable:!0,enumerable:i,writable:!0,value:t})}function sl(o){o&&o.logger&&(kd(o.logger)?ft=o.logger:ft("new logger isn't a function, not replacing"))}function Mg(o,e,t){if(!o||!o[e]){ft("no original function "+e+" to wrap");return}if(!t){ft("no wrapper function"),ft(new Error().stack);return}if(!kd(o[e])||!kd(t)){ft("original object and wrapper must be functions");return}var i=o[e],a=t(i,e);return al(a,"__original",i),al(a,"__unwrap",function(){o[e]===a&&al(o,e,i)}),al(a,"__wrapped",!0),al(o,e,a),a}function wW(o,e,t){if(o)Array.isArray(o)||(o=[o]);else{ft("must provide one or more modules to patch"),ft(new Error().stack);return}if(!(e&&Array.isArray(e))){ft("must provide one or more functions to wrap on modules");return}o.forEach(function(i){e.forEach(function(a){Mg(i,a,t)})})}function Cg(o,e){if(!o||!o[e]){ft("no function to unwrap."),ft(new Error().stack);return}if(!o[e].__unwrap)ft("no original to unwrap to -- has "+e+" already been unwrapped?");else return o[e].__unwrap()}function BW(o,e){if(o)Array.isArray(o)||(o=[o]);else{ft("must provide one or more modules to patch"),ft(new Error().stack);return}if(!(e&&Array.isArray(e))){ft("must provide one or more functions to unwrap on modules");return}o.forEach(function(t){e.forEach(function(i){Cg(t,i)})})}sl.wrap=Mg;sl.massWrap=wW;sl.unwrap=Cg;sl.massUnwrap=BW;Pg.exports=sl});var Vn,xE,gg=S(()=>{x();Bs();Vn=fn(Yd()),xE=class{constructor(e,t,i){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Vn.wrap,this._unwrap=Vn.unwrap,this._massWrap=Vn.massWrap,this._massUnwrap=Vn.massUnwrap,this.setConfig(i),this._diag=m.createComponentLogger({namespace:e}),this._tracer=Ee.getTracer(e,t),this._meter=fo.getMeter(e,t),this._logger=ws.getLogger(e,t),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){var e;let t=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config=Object.assign({enabled:!0},e)}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,i,a){if(e)try{e(i,a)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},s)}}}});var Fd=A((Xme,Lg)=>{"use strict";var GW=H("os");Lg.exports=GW.homedir||function(){var e=process.env.HOME,t=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(t?"/Users/"+t:null):process.platform==="linux"?e||(process.getuid()===0?"/root":t?"/home/"+t:null):e||null}});var Kd=A((Jme,yg)=>{yg.exports=function(){var o=Error.prepareStackTrace;Error.prepareStackTrace=function(t,i){return i};var e=new Error().stack;return Error.prepareStackTrace=o,e[2].getFileName()}});var Ig=A((Qme,ll)=>{"use strict";var HW=process.platform==="win32",kW=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,qd={};function YW(o){return kW.exec(o).slice(1)}qd.parse=function(o){if(typeof o!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof o);var e=YW(o);if(!e||e.length!==5)throw new TypeError("Invalid path '"+o+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var FW=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Wd={};function KW(o){return FW.exec(o).slice(1)}Wd.parse=function(o){if(typeof o!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof o);var e=KW(o);if(!e||e.length!==5)throw new TypeError("Invalid path '"+o+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};HW?ll.exports=qd.parse:ll.exports=Wd.parse;ll.exports.posix=Wd.parse;ll.exports.win32=qd.parse});var jd=A((Zme,bg)=>{var Ug=H("path"),Dg=Ug.parse||Ig(),xg=function(e,t){var i="/";/^([A-Za-z]:)/.test(e)?i="":/^\\\\/.test(e)&&(i="\\\\");for(var a=[e],s=Dg(e);s.dir!==a[a.length-1];)a.push(s.dir),s=Dg(s.dir);return a.reduce(function(n,r){return n.concat(t.map(function(l){return Ug.resolve(i,r,l)}))},[])};bg.exports=function(e,t,i){var a=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];if(t&&typeof t.paths=="function")return t.paths(i,e,function(){return xg(e,a)},t);var s=xg(e,a);return t&&t.paths?s.concat(t.paths):s}});var zd=A((eOe,Vg)=>{Vg.exports=function(o,e){return e||{}}});var Bg=A((tOe,wg)=>{"use strict";var qW="Function.prototype.bind called on incompatible ",$d=Array.prototype.slice,WW=Object.prototype.toString,jW="[object Function]";wg.exports=function(e){var t=this;if(typeof t!="function"||WW.call(t)!==jW)throw new TypeError(qW+t);for(var i=$d.call(arguments,1),a,s=function(){if(this instanceof a){var u=t.apply(this,i.concat($d.call(arguments)));return Object(u)===u?u:this}else return t.apply(e,i.concat($d.call(arguments)))},n=Math.max(0,t.length-i.length),r=[],l=0;l{"use strict";var zW=Bg();Gg.exports=Function.prototype.bind||zW});var Yg=A((nOe,kg)=>{"use strict";var $W=Hg();kg.exports=$W.call(Function.call,Object.prototype.hasOwnProperty)});var Fg=A((oOe,XW)=>{XW.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":[">= 19.9",">= 20"],"node:test/reporters":[">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 20"],"node:wasi":">= 20",worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var cl=A((iOe,Wg)=>{"use strict";var JW=Yg();function QW(o,e){for(var t=o.split("."),i=e.split(" "),a=i.length>1?i[0]:"=",s=(i.length>1?i[1]:i[0]).split("."),n=0;n<3;++n){var r=parseInt(t[n]||0,10),l=parseInt(s[n]||0,10);if(r!==l)return a==="<"?r="?r>=l:!1}return a===">="}function Kg(o,e){var t=e.split(/ ?&& ?/);if(t.length===0)return!1;for(var i=0;i"u"?process.versions&&process.versions.node:o;if(typeof t!="string")throw new TypeError(typeof o>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var i=0;i{var Io=H("fs"),e4=Fd(),Ge=H("path"),t4=Kd(),r4=jd(),n4=zd(),o4=cl(),i4=process.platform!=="win32"&&Io.realpath&&typeof Io.realpath.native=="function"?Io.realpath.native:Io.realpath,jg=e4(),a4=function(){return[Ge.join(jg,".node_modules"),Ge.join(jg,".node_libraries")]},s4=function(e,t){Io.stat(e,function(i,a){return i?i.code==="ENOENT"||i.code==="ENOTDIR"?t(null,!1):t(i):t(null,a.isFile()||a.isFIFO())})},l4=function(e,t){Io.stat(e,function(i,a){return i?i.code==="ENOENT"||i.code==="ENOTDIR"?t(null,!1):t(i):t(null,a.isDirectory())})},c4=function(e,t){i4(e,function(i,a){i&&i.code!=="ENOENT"?t(i):t(null,i?e:a)})},ul=function(e,t,i,a){i&&i.preserveSymlinks===!1?e(t,a):a(null,t)},u4=function(e,t,i){e(t,function(a,s){if(a)i(a);else try{var n=JSON.parse(s);i(null,n)}catch{i(null)}})},E4=function(e,t,i){for(var a=r4(t,i,e),s=0;s{_4.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:">= 13.4 && < 13.5",worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var eL=A((lOe,Zg)=>{"use strict";var T4=cl(),Jg=Xg(),Qg={};for(UE in Jg)Object.prototype.hasOwnProperty.call(Jg,UE)&&(Qg[UE]=T4(UE));var UE;Zg.exports=Qg});var rL=A((cOe,tL)=>{var S4=cl();tL.exports=function(e){return S4(e)}});var iL=A((uOe,oL)=>{var p4=cl(),Do=H("fs"),Et=H("path"),d4=Fd(),f4=Kd(),A4=jd(),h4=zd(),v4=process.platform!=="win32"&&Do.realpathSync&&typeof Do.realpathSync.native=="function"?Do.realpathSync.native:Do.realpathSync,nL=d4(),R4=function(){return[Et.join(nL,".node_modules"),Et.join(nL,".node_libraries")]},m4=function(e){try{var t=Do.statSync(e,{throwIfNoEntry:!1})}catch(i){if(i&&(i.code==="ENOENT"||i.code==="ENOTDIR"))return!1;throw i}return!!t&&(t.isFile()||t.isFIFO())},O4=function(e){try{var t=Do.statSync(e,{throwIfNoEntry:!1})}catch(i){if(i&&(i.code==="ENOENT"||i.code==="ENOTDIR"))return!1;throw i}return!!t&&t.isDirectory()},N4=function(e){try{return v4(e)}catch(t){if(t.code!=="ENOENT")throw t}return e},El=function(e,t,i){return i&&i.preserveSymlinks===!1?e(t):t},M4=function(e,t){var i=e(t);try{var a=JSON.parse(i);return a}catch{}},C4=function(e,t,i){for(var a=A4(t,i,e),s=0;s{var bE=$g();bE.core=eL();bE.isCore=rL();bE.sync=iL();aL.exports=bE});var cL=A((_Oe,lL)=>{var na=1e3,oa=na*60,ia=oa*60,xo=ia*24,P4=xo*7,g4=xo*365.25;lL.exports=function(o,e){e=e||{};var t=typeof o;if(t==="string"&&o.length>0)return L4(o);if(t==="number"&&isFinite(o))return e.long?I4(o):y4(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function L4(o){if(o=String(o),!(o.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*g4;case"weeks":case"week":case"w":return t*P4;case"days":case"day":case"d":return t*xo;case"hours":case"hour":case"hrs":case"hr":case"h":return t*ia;case"minutes":case"minute":case"mins":case"min":case"m":return t*oa;case"seconds":case"second":case"secs":case"sec":case"s":return t*na;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function y4(o){var e=Math.abs(o);return e>=xo?Math.round(o/xo)+"d":e>=ia?Math.round(o/ia)+"h":e>=oa?Math.round(o/oa)+"m":e>=na?Math.round(o/na)+"s":o+"ms"}function I4(o){var e=Math.abs(o);return e>=xo?VE(o,e,xo,"day"):e>=ia?VE(o,e,ia,"hour"):e>=oa?VE(o,e,oa,"minute"):e>=na?VE(o,e,na,"second"):o+" ms"}function VE(o,e,t,i){var a=e>=t*1.5;return Math.round(o/t)+" "+i+(a?"s":"")}});var Xd=A((TOe,uL)=>{function D4(o){t.debug=t,t.default=t,t.coerce=l,t.disable=n,t.enable=a,t.enabled=r,t.humanize=cL(),t.destroy=c,Object.keys(o).forEach(u=>{t[u]=o[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let E=0;for(let d=0;d{if(K==="%%")return"%";I++;let oe=t.formatters[k];if(typeof oe=="function"){let Z=M[I];K=oe.call(C,Z),M.splice(I,1),I--}return K}),t.formatArgs.call(C,M),(C.log||t.log).apply(C,M)}return v.namespace=u,v.useColors=t.useColors(),v.color=t.selectColor(u),v.extend=i,v.destroy=t.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(f!==t.namespaces&&(f=t.namespaces,O=t.enabled(u)),O),set:M=>{d=M}}),typeof t.init=="function"&&t.init(v),v}function i(u,E){let d=t(this.namespace+(typeof E>"u"?":":E)+u);return d.log=this.log,d}function a(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let E=(typeof u=="string"?u:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of E)d[0]==="-"?t.skips.push(d.slice(1)):t.names.push(d)}function s(u,E){let d=0,f=0,O=-1,v=0;for(;d"-"+E)].join(",");return t.enable(""),u}function r(u){for(let E of t.skips)if(s(u,E))return!1;for(let E of t.names)if(s(u,E))return!0;return!1}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}uL.exports=D4});var EL=A((xt,wE)=>{xt.formatArgs=U4;xt.save=b4;xt.load=V4;xt.useColors=x4;xt.storage=w4();xt.destroy=(()=>{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();xt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function x4(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let o;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(o=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(o[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function U4(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+wE.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;o.splice(1,0,e,"color: inherit");let t=0,i=0;o[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(t++,a==="%c"&&(i=t))}),o.splice(i,0,e)}xt.log=console.debug||console.log||(()=>{});function b4(o){try{o?xt.storage.setItem("debug",o):xt.storage.removeItem("debug")}catch{}}function V4(){let o;try{o=xt.storage.getItem("debug")}catch{}return!o&&typeof process<"u"&&"env"in process&&(o=process.env.DEBUG),o}function w4(){try{return localStorage}catch{}}wE.exports=Xd()(xt);var{formatters:B4}=wE.exports;B4.j=function(o){try{return JSON.stringify(o)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var TL=A((SOe,_L)=>{"use strict";_L.exports=(o,e=process.argv)=>{let t=o.startsWith("-")?"":o.length===1?"-":"--",i=e.indexOf(t+o),a=e.indexOf("--");return i!==-1&&(a===-1||i{"use strict";var G4=H("os"),SL=H("tty"),Wt=TL(),{env:We}=process,wn;Wt("no-color")||Wt("no-colors")||Wt("color=false")||Wt("color=never")?wn=0:(Wt("color")||Wt("colors")||Wt("color=true")||Wt("color=always"))&&(wn=1);"FORCE_COLOR"in We&&(We.FORCE_COLOR==="true"?wn=1:We.FORCE_COLOR==="false"?wn=0:wn=We.FORCE_COLOR.length===0?1:Math.min(parseInt(We.FORCE_COLOR,10),3));function Jd(o){return o===0?!1:{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function Qd(o,e){if(wn===0)return 0;if(Wt("color=16m")||Wt("color=full")||Wt("color=truecolor"))return 3;if(Wt("color=256"))return 2;if(o&&!e&&wn===void 0)return 0;let t=wn||0;if(We.TERM==="dumb")return t;if(process.platform==="win32"){let i=G4.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in We)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in We)||We.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in We)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(We.TEAMCITY_VERSION)?1:0;if(We.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in We){let i=parseInt((We.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(We.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(We.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(We.TERM)||"COLORTERM"in We?1:t}function H4(o){let e=Qd(o,o&&o.isTTY);return Jd(e)}pL.exports={supportsColor:H4,stdout:Jd(Qd(!0,SL.isatty(1))),stderr:Jd(Qd(!0,SL.isatty(2)))}});var AL=A((je,GE)=>{var k4=H("tty"),BE=H("util");je.init=z4;je.log=q4;je.formatArgs=F4;je.save=W4;je.load=j4;je.useColors=Y4;je.destroy=BE.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");je.colors=[6,2,3,4,5,1];try{let o=dL();o&&(o.stderr||o).level>=2&&(je.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}je.inspectOpts=Object.keys(process.env).filter(o=>/^debug_/i.test(o)).reduce((o,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(a,s)=>s.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),o[t]=i,o},{});function Y4(){return"colors"in je.inspectOpts?!!je.inspectOpts.colors:k4.isatty(process.stderr.fd)}function F4(o){let{namespace:e,useColors:t}=this;if(t){let i=this.color,a="\x1B[3"+(i<8?i:"8;5;"+i),s=` ${a};1m${e} \x1B[0m`;o[0]=s+o[0].split(` `).join(` `+s),o.push(a+"m+"+GE.exports.humanize(this.diff)+"\x1B[0m")}else o[0]=K4()+e+" "+o[0]}function K4(){return je.inspectOpts.hideDate?"":new Date().toISOString()+" "}function q4(...o){return process.stderr.write(BE.formatWithOptions(je.inspectOpts,...o)+` `)}function W4(o){o?process.env.DEBUG=o:delete process.env.DEBUG}function j4(){return process.env.DEBUG}function z4(o){o.inspectOpts={};let e=Object.keys(je.inspectOpts);for(let t=0;te.trim()).join(" ")};fL.O=function(o){return this.inspectOpts.colors=this.useColors,BE.inspect(o,this.inspectOpts)}});var hL=A((dOe,Zd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Zd.exports=EL():Zd.exports=AL()});var tf=A((fOe,vL)=>{"use strict";var ef=H("path");vL.exports=function(o){var e=o.split(ef.sep),t=e.lastIndexOf("node_modules");if(t!==-1&&e[t+1]){var i=e[t+1][0]==="@",a=i?e[t+1]+"/"+e[t+2]:e[t+1],s=i?3:2;return{name:a,basedir:e.slice(0,t+s).join(ef.sep),path:e.slice(t+s).join(ef.sep)}}}});var RL=A((AOe,$4)=>{$4.exports={name:"require-in-the-middle",version:"7.3.0",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.1.1","module-details-from-path":"^1.0.3",resolve:"^1.22.1"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/elastic/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/elastic/require-in-the-middle/issues"},homepage:"https://github.com/elastic/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var af=A((hOe,of)=>{"use strict";var aa=H("path"),nn=H("module"),rf=sL(),rt=hL()("require-in-the-middle"),X4=tf();of.exports=Tl;of.exports.Hook=Tl;var _l;if(nn.isBuiltin)_l=nn.isBuiltin;else{let[o,e]=process.versions.node.split(".").map(Number);o===8&&e<8?_l=t=>t==="http2"?!0:!!rf.core[t]:_l=t=>!!rf.core[t]}var J4=/([/\\]index)?(\.js)?$/,nf=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,t){if(this._localCache.has(e))return!0;if(t)return!1;{let i=H.cache[e];return!!(i&&this._kRitmExports in i)}}get(e,t){let i=this._localCache.get(e);if(i!==void 0)return i;if(!t){let a=H.cache[e];return a&&a[this._kRitmExports]}}set(e,t,i){i?this._localCache.set(e,t):e in H.cache?H.cache[e][this._kRitmExports]=t:(rt('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,t))}};function Tl(o,e,t){if(!(this instanceof Tl))return new Tl(o,e,t);if(typeof o=="function"?(t=o,o=null,e=null):typeof e=="function"&&(t=e,e=null),typeof nn._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof nn._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,RL().bugs.url);return}this._cache=new nf,this._unhooked=!1,this._origRequire=nn.prototype.require;let i=this,a=new Set,s=e?e.internals===!0:!1,n=Array.isArray(o);rt("registering require hook"),this._require=nn.prototype.require=function(r){if(i._unhooked===!0)return rt("ignoring require call - module is soft-unhooked"),i._origRequire.apply(this,arguments);let l=_l(r),c;if(l){if(c=r,r.startsWith("node:")){let v=r.slice(5);_l(v)&&(c=v)}}else try{c=nn._resolveFilename(r,this)}catch(v){return rt('Module._resolveFilename("%s") threw %j, calling original Module.require',r,v.message),i._origRequire.apply(this,arguments)}let u,E;if(rt("processing %s module require('%s'): %s",l===!0?"core":"non-core",r,c),i._cache.has(c,l)===!0)return rt("returning already patched cached module: %s",c),i._cache.get(c,l);let d=a.has(c);d===!1&&a.add(c);let f=i._origRequire.apply(this,arguments);if(d===!0)return rt("module is in the process of being patched already - ignoring: %s",c),f;if(a.delete(c),l===!0){if(n===!0&&o.includes(c)===!1)return rt("ignoring core module not on whitelist: %s",c),f;u=c}else if(n===!0&&o.includes(c)){let v=aa.parse(c);u=v.name,E=v.dir}else{let v=X4(c);if(v===void 0)return rt("could not parse filename: %s",c),f;u=v.name,E=v.basedir;let M=Q4(v);rt("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",u,r,M,E);let C=!1;if(n){if(!r.startsWith(".")&&o.includes(r)&&(u=r,C=!0),!o.includes(u)&&!o.includes(M))return f;o.includes(M)&&M!==u&&(u=M,C=!0)}if(!C){let P;try{P=rf.sync(u,{basedir:E})}catch{return rt("could not resolve module: %s",u),i._cache.set(c,f,l),f}if(P!==c)if(s===!0)u=u+aa.sep+aa.relative(E,c),rt("preparing to process require of internal file: %s",u);else return rt("ignoring require of non-main module file: %s",P),i._cache.set(c,f,l),f}}i._cache.set(c,f,l),rt("calling require hook: %s",u);let O=t(f,u,E);return i._cache.set(c,O,l),rt("returning module: %s",u),O}}Tl.prototype.unhook=function(){this._unhooked=!0,this._require===nn.prototype.require?(nn.prototype.require=this._origRequire,rt("unhook successful")):rt("unhook unsuccessful")};function Q4(o){let e=aa.sep!=="/"?o.path.split(aa.sep).join("/"):o.path;return aa.posix.join(o.name,e).replace(J4,"")}});var Sl,HE,kE,mL=S(()=>{Sl="/",HE=class{constructor(){this.hooks=[],this.children=new Map}},kE=class{constructor(){this._trie=new HE,this._counter=0}insert(e){let t=this._trie;for(let i of e.moduleName.split(Sl)){let a=t.children.get(i);a||(a=new HE,t.children.set(i,a)),t=a}t.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:t,fullOnly:i}={}){let a=this._trie,s=[],n=!0;for(let r of e.split(Sl)){let l=a.children.get(r);if(!l){n=!1;break}i||s.push(...l.hooks),a=l}return i&&n&&s.push(...a.hooks),s.length===0?[]:s.length===1?[s[0].hook]:(t&&s.sort((r,l)=>r.insertedId-l.insertedId),s.map(({hook:r})=>r))}}});import*as sf from"path";function e6(o){return sf.sep!==Sl?o.split(sf.sep).join(Sl):o}var OL,Z4,YE,NL=S(()=>{OL=fn(af());mL();Z4=["afterEach","after","beforeEach","before","describe","it"].every(o=>typeof global[o]=="function"),YE=class o{constructor(){this._moduleNameTrie=new kE,this._initialize()}_initialize(){new OL.Hook(null,{internals:!0},(e,t,i)=>{let a=e6(t),s=this._moduleNameTrie.search(a,{maintainInsertionOrder:!0,fullOnly:i===void 0});for(let{onRequire:n}of s)e=n(e,t,i);return e})}register(e,t){let i={moduleName:e,onRequire:t};return this._moduleNameTrie.insert(i),i}static getInstance(){var e;return Z4?new o:this._instance=(e=this._instance)!==null&&e!==void 0?e:new o}}});var gL=A(pl=>{var ML=[],lf=new WeakMap,CL=new Map,PL=[],t6={set(o,e,t){return lf.get(o)[e](t)},defineProperty(o,e,t){if(!("value"in t))throw new Error("Getters/setters are not supported for exports property descriptors.");return lf.get(o)[e](t.value)}};function r6(o,e,t,i){CL.set(o,i),lf.set(e,t);let a=new Proxy(e,t6);ML.forEach(s=>s(o,a)),PL.push([o,a])}pl.register=r6;pl.importHooks=ML;pl.specifiers=CL;pl.toHook=PL});var UL=A((MOe,fl)=>{var LL=H("path"),n6=tf(),{fileURLToPath:yL}=H("url"),{importHooks:cf,specifiers:o6,toHook:i6}=gL();function DL(o){cf.push(o),i6.forEach(([e,t])=>o(e,t))}function xL(o){let e=cf.indexOf(o);e>-1&&cf.splice(e,1)}function IL(o,e,t,i){let a=o(e,t,i);a&&a!==e&&(e.default=a)}function dl(o,e,t){if(!(this instanceof dl))return new dl(o,e,t);typeof o=="function"?(t=o,o=null,e=null):typeof e=="function"&&(t=e,e=null);let i=e?e.internals===!0:!1;this._iitmHook=(a,s)=>{let n=a,r=a.startsWith("node:"),l;if(r)a=a.replace(/^node:/,"");else{if(a.startsWith("file://"))try{a=yL(a)}catch{}let c=n6(a);c&&(a=c.name,l=c.basedir)}if(o){for(let c of o)if(c===a){if(l){if(i)a=a+LL.sep+LL.relative(l,yL(n));else if(!l.endsWith(o6.get(n)))continue}IL(t,s,a,l)}}else IL(t,s,a,l)},DL(this._iitmHook)}dl.prototype.unhook=function(){xL(this._iitmHook)};fl.exports=dl;fl.exports.Hook=dl;fl.exports.addHook=DL;fl.exports.removeHook=xL});function bL(o,e,t){let i,a;try{a=o()}catch(s){i=s}finally{if(e(i,a),i&&!t)throw i;return a}}async function VL(o,e,t){let i,a;try{a=await o()}catch(s){i=s}finally{if(e(i,a),i&&!t)throw i;return a}}function FE(o){return typeof o=="function"&&typeof o.__original=="function"&&typeof o.__unwrap=="function"&&o.__wrapped===!0}var uf=S(()=>{});import*as on from"path";import{types as wL}from"util";import{readFileSync as a6}from"fs";function BL(o,e,t){return typeof e>"u"?o.includes("*"):o.some(i=>(0,GL.satisfies)(e,i,{includePrerelease:t}))}var GL,Al,HL,kL,sa,YL=S(()=>{GL=fn(Bd()),Al=fn(Yd());gg();NL();HL=fn(UL());x();kL=fn(af());uf();sa=class extends xE{constructor(e,t,i){super(e,t,i),this._hooks=[],this._requireInTheMiddleSingleton=YE.getInstance(),this._enabled=!1,this._wrap=(s,n,r)=>{if(FE(s[n])&&this._unwrap(s,n),wL.isProxy(s)){let l=(0,Al.wrap)(Object.assign({},s),n,r);return Object.defineProperty(s,n,{value:l}),l}else return(0,Al.wrap)(s,n,r)},this._unwrap=(s,n)=>wL.isProxy(s)?Object.defineProperty(s,n,{value:s[n]}):(0,Al.unwrap)(s,n),this._massWrap=(s,n,r)=>{if(s)Array.isArray(s)||(s=[s]);else{m.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){m.error("must provide one or more functions to wrap on modules");return}s.forEach(l=>{n.forEach(c=>{this._wrap(l,c,r)})})},this._massUnwrap=(s,n)=>{if(s)Array.isArray(s)||(s=[s]);else{m.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){m.error("must provide one or more functions to wrap on modules");return}s.forEach(r=>{n.forEach(l=>{this._unwrap(r,l)})})};let a=this.init();a&&!Array.isArray(a)&&(a=[a]),this._modules=a||[],this._config.enabled&&this.enable()}_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:t}=e;try{let i=H.resolve(t);H.cache[i]&&this._diag.warn(`Module ${t} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${t}`)}catch{}})}_extractPackageVersion(e){try{let t=a6(on.join(e,"package.json"),{encoding:"utf8"}),i=JSON.parse(t).version;return typeof i=="string"?i:void 0}catch{m.warn("Failed extracting version",e)}}_onRequire(e,t,i,a){var s;if(!a)return typeof e.patch=="function"&&(e.moduleExports=t,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:e.name}),e.patch(t)):t;let n=this._extractPackageVersion(a);if(e.moduleVersion=n,e.name===i)return BL(e.supportedVersions,n,e.includePrerelease)&&typeof e.patch=="function"&&(e.moduleExports=t,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:e.name,version:e.moduleVersion,baseDir:a}),e.patch(t,e.moduleVersion)):t;let r=(s=e.files)!==null&&s!==void 0?s:[],l=on.normalize(i);return r.filter(u=>u.name===l).filter(u=>BL(u.supportedVersions,n,e.includePrerelease)).reduce((u,E)=>(E.moduleExports=u,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:E.name,baseDir:a}),E.patch(u,e.moduleVersion)):u),t)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let e of this._modules){typeof e.patch=="function"&&e.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:e.name,version:e.moduleVersion}),e.patch(e.moduleExports,e.moduleVersion));for(let t of e.files)t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:e.name,version:e.moduleVersion,fileName:t.name}),t.patch(t.moduleExports,e.moduleVersion))}return}this._warnOnPreloadedModules();for(let e of this._modules){let t=(n,r,l)=>{if(!l&&on.isAbsolute(r)){let c=on.parse(r);r=c.name,l=c.dir}return this._onRequire(e,n,r,l)},i=(n,r,l)=>this._onRequire(e,n,r,l),a=on.isAbsolute(e.name)?new kL.Hook([e.name],{internals:!0},i):this._requireInTheMiddleSingleton.register(e.name,i);this._hooks.push(a);let s=new HL.Hook([e.name],{internals:!1},t);this._hooks.push(s)}}}disable(){if(this._enabled){this._enabled=!1;for(let e of this._modules){typeof e.unpatch=="function"&&e.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:e.name,version:e.moduleVersion}),e.unpatch(e.moduleExports,e.moduleVersion));for(let t of e.files)t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:e.name,version:e.moduleVersion,fileName:t.name}),t.unpatch(t.moduleExports,e.moduleVersion))}}}isEnabled(){return this._enabled}}});import{normalize as KE}from"path";var FL=S(()=>{});var KL=S(()=>{YL();FL()});var Ef=S(()=>{KL()});var qE,qL=S(()=>{qE=class{constructor(e,t,i,a,s){this.name=e,this.supportedVersions=t,this.patch=i,this.unpatch=a,this.files=s||[]}}});var WE,WL=S(()=>{Ef();WE=class{constructor(e,t,i,a){this.supportedVersions=t,this.patch=i,this.unpatch=a,this.name=KE(e)}}});var jL={};Me(jL,{InstrumentationBase:()=>sa,InstrumentationNodeModuleDefinition:()=>qE,InstrumentationNodeModuleFile:()=>WE,isWrapped:()=>FE,registerInstrumentations:()=>Og,safeExecuteInTheMiddle:()=>bL,safeExecuteInTheMiddleAsync:()=>VL});var zL=S(()=>{Ng();Ef();qL();WL();uf()});var gr,$L=S(()=>{gr=function(){function o(e){this._delegate=e}return o.prototype.export=function(e,t){this._delegate.export(e,t)},o.prototype.forceFlush=function(){return this._delegate.forceFlush()},o.prototype.shutdown=function(){return this._delegate.shutdown()},o}()});var s6,Uo,jE=S(()=>{s6=function(){var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(i[s]=a[s])},o(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Uo=function(o){s6(e,o);function e(t,i,a){var s=o.call(this,t)||this;return s.name="OTLPExporterError",s.data=a,s.code=i,s}return e}(Error)});function l6(o){if(!Number.isNaN(o)&&Number.isFinite(o)&&o>0)return o;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+o+"')")}function zE(o){if(o!=null)return function(){return o}}function $E(o,e,t){var i,a,s,n,r,l;return{timeoutMillis:l6((a=(i=o.timeoutMillis)!==null&&i!==void 0?i:e.timeoutMillis)!==null&&a!==void 0?a:t.timeoutMillis),concurrencyLimit:(n=(s=o.concurrencyLimit)!==null&&s!==void 0?s:e.concurrencyLimit)!==null&&n!==void 0?n:t.concurrencyLimit,compression:(l=(r=o.compression)!==null&&r!==void 0?r:e.compression)!==null&&l!==void 0?l:t.compression}}function XE(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var hl=S(()=>{});var JE,XL=S(()=>{(function(o){o.NONE="none",o.GZIP="gzip"})(JE||(JE={}))});function QE(o){return new E6(o.concurrencyLimit)}var c6,u6,E6,_f=S(()=>{c6=function(o,e,t,i){function a(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function r(u){try{c(i.next(u))}catch(E){n(E)}}function l(u){try{c(i.throw(u))}catch(E){n(E)}}function c(u){u.done?s(u.value):a(u.value).then(r,l)}c((i=i.apply(o,e||[])).next())})},u6=function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,n;return n={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function r(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,a&&(s=c[0]&2?a.return:c[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,c[1])).done)return s;switch(a=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,a=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=this._concurrencyLimit},o.prototype.awaitAll=function(){return c6(this,void 0,void 0,function(){return u6(this,function(e){switch(e.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return e.sent(),[2]}})})},o}()});function _6(o){return Object.prototype.hasOwnProperty.call(o,"partialSuccess")}function JL(){return{handleResponse:function(o){o==null||!_6(o)||o.partialSuccess==null||Object.keys(o.partialSuccess).length===0||m.warn("Received Partial Success response:",JSON.stringify(o.partialSuccess))}}}var QL=S(()=>{x()});function ZE(o,e){return new p6(o.transport,o.serializer,JL(),o.promiseHandler,e.timeout)}var T6,S6,p6,Tf=S(()=>{ee();jE();QL();x();T6=function(o,e,t,i){function a(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function r(u){try{c(i.next(u))}catch(E){n(E)}}function l(u){try{c(i.throw(u))}catch(E){n(E)}}function c(u){u.done?s(u.value):a(u.value).then(r,l)}c((i=i.apply(o,e||[])).next())})},S6=function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,n;return n={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function r(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,a&&(s=c[0]&2?a.return:c[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,c[1])).done)return s;switch(a=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,a=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]{_f();Tf()});var vl={};Me(vl,{CompressionAlgorithm:()=>JE,OTLPExporterBase:()=>gr,OTLPExporterError:()=>Uo,createOtlpNetworkExportDelegate:()=>ZL,getSharedConfigurationDefaults:()=>XE,mergeOtlpSharedConfigurationWithDefaults:()=>$E});var an=S(()=>{$L();jE();hl();XL();ey()});function e_(o){let e=BigInt(1e9);return BigInt(o[0])*e+BigInt(o[1])}function Sf(o){let e=Number(BigInt.asUintN(32,o)),t=Number(BigInt.asUintN(32,o>>BigInt(32)));return{low:e,high:t}}function t_(o){let e=e_(o);return Sf(e)}function pf(o){return e_(o).toString()}function ty(o){return o}function ry(o){if(o!==void 0)return Nn(o)}function Bn(o){var e,t;if(o===void 0)return f6;let i=(e=o.useLongBits)!==null&&e!==void 0?e:!0,a=(t=o.useHex)!==null&&t!==void 0?t:!1;return{encodeHrTime:i?t_:d6,encodeSpanContext:a?ty:Nn,encodeOptionalSpanContext:a?ty:ry}}var d6,f6,Rl=S(()=>{ee();d6=typeof BigInt<"u"?pf:Fc;f6={encodeHrTime:t_,encodeSpanContext:Nn,encodeOptionalSpanContext:ry}});var r_,ny=S(()=>{(function(o){o[o.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",o[o.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",o[o.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",o[o.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",o[o.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",o[o.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER"})(r_||(r_={}))});function la(o){return{name:o.name,version:o.version}}function Lr(o){return Object.keys(o).map(e=>n_(e,o[e]))}function n_(o,e){return{key:o,value:o_(e)}}function o_(o){let e=typeof o;return e==="string"?{stringValue:o}:e==="number"?Number.isInteger(o)?{intValue:o}:{doubleValue:o}:e==="boolean"?{boolValue:o}:o instanceof Uint8Array?{bytesValue:o}:Array.isArray(o)?{arrayValue:{values:o.map(o_)}}:e==="object"&&o!=null?{kvlistValue:{values:Object.entries(o).map(([t,i])=>n_(t,i))}}:{}}var ca=S(()=>{});function oy(o,e){var t;let i=o.spanContext(),a=o.status;return{traceId:e.encodeSpanContext(i.traceId),spanId:e.encodeSpanContext(i.spanId),parentSpanId:e.encodeOptionalSpanContext(o.parentSpanId),traceState:(t=i.traceState)===null||t===void 0?void 0:t.serialize(),name:o.name,kind:o.kind==null?0:o.kind+1,startTimeUnixNano:e.encodeHrTime(o.startTime),endTimeUnixNano:e.encodeHrTime(o.endTime),attributes:Lr(o.attributes),droppedAttributesCount:o.droppedAttributesCount,events:o.events.map(s=>h6(s,e)),droppedEventsCount:o.droppedEventsCount,status:{code:a.code,message:a.message},links:o.links.map(s=>A6(s,e)),droppedLinksCount:o.droppedLinksCount}}function A6(o,e){var t;return{attributes:o.attributes?Lr(o.attributes):[],spanId:e.encodeSpanContext(o.context.spanId),traceId:e.encodeSpanContext(o.context.traceId),traceState:(t=o.context.traceState)===null||t===void 0?void 0:t.serialize(),droppedAttributesCount:o.droppedAttributesCount||0}}function h6(o,e){return{attributes:o.attributes?Lr(o.attributes):[],name:o.name,timeUnixNano:e.encodeHrTime(o.time),droppedAttributesCount:o.droppedAttributesCount||0}}var iy=S(()=>{ca()});function ua(o){return{attributes:Lr(o.attributes),droppedAttributesCount:0}}var i_=S(()=>{ca()});function Gn(o,e){let t=Bn(e);return{resourceSpans:R6(o,t)}}function v6(o){let e=new Map;for(let t of o){let i=e.get(t.resource);i||(i=new Map,e.set(t.resource,i));let a=`${t.instrumentationLibrary.name}@${t.instrumentationLibrary.version||""}:${t.instrumentationLibrary.schemaUrl||""}`,s=i.get(a);s||(s=[],i.set(a,s)),s.push(t)}return e}function R6(o,e){let t=v6(o),i=[],a=t.entries(),s=a.next();for(;!s.done;){let[n,r]=s.value,l=[],c=r.values(),u=c.next();for(;!u.done;){let d=u.value;if(d.length>0){let f=d.map(O=>oy(O,e));l.push({scope:la(d[0].instrumentationLibrary),spans:f,schemaUrl:d[0].instrumentationLibrary.schemaUrl})}u=c.next()}let E={resource:ua(n),scopeSpans:l,schemaUrl:void 0};i.push(E),s=a.next()}return i}var a_=S(()=>{iy();Rl();ca();i_()});function sy(o,e){let t=Bn(e);return{resource:ua(o.resource),schemaUrl:void 0,scopeMetrics:m6(o.scopeMetrics,t)}}function m6(o,e){return Array.from(o.map(t=>({scope:la(t.scope),metrics:t.metrics.map(i=>O6(i,e)),schemaUrl:t.scope.schemaUrl})))}function O6(o,e){let t={name:o.descriptor.name,description:o.descriptor.description,unit:o.descriptor.unit},i=P6(o.aggregationTemporality);switch(o.dataPointType){case tt.SUM:t.sum={aggregationTemporality:i,isMonotonic:o.isMonotonic,dataPoints:ay(o,e)};break;case tt.GAUGE:t.gauge={dataPoints:ay(o,e)};break;case tt.HISTOGRAM:t.histogram={aggregationTemporality:i,dataPoints:M6(o,e)};break;case tt.EXPONENTIAL_HISTOGRAM:t.exponentialHistogram={aggregationTemporality:i,dataPoints:C6(o,e)};break}return t}function N6(o,e,t){let i={attributes:Lr(o.attributes),startTimeUnixNano:t.encodeHrTime(o.startTime),timeUnixNano:t.encodeHrTime(o.endTime)};switch(e){case Rt.INT:i.asInt=o.value;break;case Rt.DOUBLE:i.asDouble=o.value;break}return i}function ay(o,e){return o.dataPoints.map(t=>N6(t,o.descriptor.valueType,e))}function M6(o,e){return o.dataPoints.map(t=>{let i=t.value;return{attributes:Lr(t.attributes),bucketCounts:i.buckets.counts,explicitBounds:i.buckets.boundaries,count:i.count,sum:i.sum,min:i.min,max:i.max,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})}function C6(o,e){return o.dataPoints.map(t=>{let i=t.value;return{attributes:Lr(t.attributes),count:i.count,min:i.min,max:i.max,sum:i.sum,positive:{offset:i.positive.offset,bucketCounts:i.positive.bucketCounts},negative:{offset:i.negative.offset,bucketCounts:i.negative.bucketCounts},scale:i.scale,zeroCount:i.zeroCount,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})}function P6(o){switch(o){case lr.DELTA:return 1;case lr.CUMULATIVE:return 2}}var ly=S(()=>{x();Qu();Rl();ca();i_()});function Ea(o,e){return{resourceMetrics:o.map(t=>sy(t,e))}}var s_=S(()=>{ly()});function _a(o,e){let t=Bn(e);return{resourceLogs:L6(o,t)}}function g6(o){let e=new Map;for(let t of o){let{resource:i,instrumentationScope:{name:a,version:s="",schemaUrl:n=""}}=t,r=e.get(i);r||(r=new Map,e.set(i,r));let l=`${a}@${s}:${n}`,c=r.get(l);c||(c=[],r.set(l,c)),c.push(t)}return e}function L6(o,e){let t=g6(o);return Array.from(t,([i,a])=>({resource:ua(i),scopeLogs:Array.from(a,([,s])=>({scope:la(s[0].instrumentationScope),logRecords:s.map(n=>y6(n,e)),schemaUrl:s[0].instrumentationScope.schemaUrl})),schemaUrl:void 0}))}function y6(o,e){var t,i,a;return{timeUnixNano:e.encodeHrTime(o.hrTime),observedTimeUnixNano:e.encodeHrTime(o.hrTimeObserved),severityNumber:o.severityNumber,severityText:o.severityText,body:o_(o.body),attributes:I6(o.attributes),droppedAttributesCount:o.droppedAttributesCount,flags:(t=o.spanContext)===null||t===void 0?void 0:t.traceFlags,traceId:e.encodeOptionalSpanContext((i=o.spanContext)===null||i===void 0?void 0:i.traceId),spanId:e.encodeOptionalSpanContext((a=o.spanContext)===null||a===void 0?void 0:a.spanId)}}function I6(o){return Object.keys(o).map(e=>n_(e,o[e]))}var l_=S(()=>{Rl();ca();i_()});var df=A((kNe,cy)=>{"use strict";cy.exports=D6;function D6(o,e){for(var t=new Array(arguments.length-1),i=0,a=2,s=!0;a{"use strict";var c_=_y;c_.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&e.charAt(t)==="=";)++i;return Math.ceil(e.length*3)/4-i};var Ta=new Array(64),Ey=new Array(123);for(Er=0;Er<64;)Ey[Ta[Er]=Er<26?Er+65:Er<52?Er+71:Er<62?Er-4:Er-59|43]=Er++;var Er;c_.encode=function(e,t,i){for(var a=null,s=[],n=0,r=0,l;t>2],l=(c&3)<<4,r=1;break;case 1:s[n++]=Ta[l|c>>4],l=(c&15)<<2,r=2;break;case 2:s[n++]=Ta[l|c>>6],s[n++]=Ta[c&63],r=0;break}n>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,s)),n=0)}return r&&(s[n++]=Ta[l],s[n++]=61,r===1&&(s[n++]=61)),a?(n&&a.push(String.fromCharCode.apply(String,s.slice(0,n))),a.join("")):String.fromCharCode.apply(String,s.slice(0,n))};var uy="invalid encoding";c_.decode=function(e,t,i){for(var a=i,s=0,n,r=0;r1)break;if((l=Ey[l])===void 0)throw Error(uy);switch(s){case 0:n=l,s=1;break;case 1:t[i++]=n<<2|(l&48)>>4,n=l,s=2;break;case 2:t[i++]=(n&15)<<4|(l&60)>>2,n=l,s=3;break;case 3:t[i++]=(n&3)<<6|l,s=0;break}}if(s===1)throw Error(uy);return i-a};c_.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var py=A((FNe,Sy)=>{"use strict";Sy.exports=u_;function u_(){this._listeners={}}u_.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this};u_.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var i=this._listeners[e],a=0;a{"use strict";Ry.exports=dy(dy);function dy(o){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),i=t[3]===128;function a(l,c,u){e[0]=l,c[u]=t[0],c[u+1]=t[1],c[u+2]=t[2],c[u+3]=t[3]}function s(l,c,u){e[0]=l,c[u]=t[3],c[u+1]=t[2],c[u+2]=t[1],c[u+3]=t[0]}o.writeFloatLE=i?a:s,o.writeFloatBE=i?s:a;function n(l,c){return t[0]=l[c],t[1]=l[c+1],t[2]=l[c+2],t[3]=l[c+3],e[0]}function r(l,c){return t[3]=l[c],t[2]=l[c+1],t[1]=l[c+2],t[0]=l[c+3],e[0]}o.readFloatLE=i?n:r,o.readFloatBE=i?r:n}():function(){function e(i,a,s,n){var r=a<0?1:0;if(r&&(a=-a),a===0)i(1/a>0?0:2147483648,s,n);else if(isNaN(a))i(2143289344,s,n);else if(a>34028234663852886e22)i((r<<31|2139095040)>>>0,s,n);else if(a<11754943508222875e-54)i((r<<31|Math.round(a/1401298464324817e-60))>>>0,s,n);else{var l=Math.floor(Math.log(a)/Math.LN2),c=Math.round(a*Math.pow(2,-l)*8388608)&8388607;i((r<<31|l+127<<23|c)>>>0,s,n)}}o.writeFloatLE=e.bind(null,fy),o.writeFloatBE=e.bind(null,Ay);function t(i,a,s){var n=i(a,s),r=(n>>31)*2+1,l=n>>>23&255,c=n&8388607;return l===255?c?NaN:r*(1/0):l===0?r*1401298464324817e-60*c:r*Math.pow(2,l-150)*(c+8388608)}o.readFloatLE=t.bind(null,hy),o.readFloatBE=t.bind(null,vy)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),i=t[7]===128;function a(l,c,u){e[0]=l,c[u]=t[0],c[u+1]=t[1],c[u+2]=t[2],c[u+3]=t[3],c[u+4]=t[4],c[u+5]=t[5],c[u+6]=t[6],c[u+7]=t[7]}function s(l,c,u){e[0]=l,c[u]=t[7],c[u+1]=t[6],c[u+2]=t[5],c[u+3]=t[4],c[u+4]=t[3],c[u+5]=t[2],c[u+6]=t[1],c[u+7]=t[0]}o.writeDoubleLE=i?a:s,o.writeDoubleBE=i?s:a;function n(l,c){return t[0]=l[c],t[1]=l[c+1],t[2]=l[c+2],t[3]=l[c+3],t[4]=l[c+4],t[5]=l[c+5],t[6]=l[c+6],t[7]=l[c+7],e[0]}function r(l,c){return t[7]=l[c],t[6]=l[c+1],t[5]=l[c+2],t[4]=l[c+3],t[3]=l[c+4],t[2]=l[c+5],t[1]=l[c+6],t[0]=l[c+7],e[0]}o.readDoubleLE=i?n:r,o.readDoubleBE=i?r:n}():function(){function e(i,a,s,n,r,l){var c=n<0?1:0;if(c&&(n=-n),n===0)i(0,r,l+a),i(1/n>0?0:2147483648,r,l+s);else if(isNaN(n))i(0,r,l+a),i(2146959360,r,l+s);else if(n>17976931348623157e292)i(0,r,l+a),i((c<<31|2146435072)>>>0,r,l+s);else{var u;if(n<22250738585072014e-324)u=n/5e-324,i(u>>>0,r,l+a),i((c<<31|u/4294967296)>>>0,r,l+s);else{var E=Math.floor(Math.log(n)/Math.LN2);E===1024&&(E=1023),u=n*Math.pow(2,-E),i(u*4503599627370496>>>0,r,l+a),i((c<<31|E+1023<<20|u*1048576&1048575)>>>0,r,l+s)}}}o.writeDoubleLE=e.bind(null,fy,0,4),o.writeDoubleBE=e.bind(null,Ay,4,0);function t(i,a,s,n,r){var l=i(n,r+a),c=i(n,r+s),u=(c>>31)*2+1,E=c>>>20&2047,d=4294967296*(c&1048575)+l;return E===2047?d?NaN:u*(1/0):E===0?u*5e-324*d:u*Math.pow(2,E-1075)*(d+4503599627370496)}o.readDoubleLE=t.bind(null,hy,0,4),o.readDoubleBE=t.bind(null,vy,4,0)}(),o}function fy(o,e,t){e[t]=o&255,e[t+1]=o>>>8&255,e[t+2]=o>>>16&255,e[t+3]=o>>>24}function Ay(o,e,t){e[t]=o>>>24,e[t+1]=o>>>16&255,e[t+2]=o>>>8&255,e[t+3]=o&255}function hy(o,e){return(o[e]|o[e+1]<<8|o[e+2]<<16|o[e+3]<<24)>>>0}function vy(o,e){return(o[e]<<24|o[e+1]<<16|o[e+2]<<8|o[e+3])>>>0}});var ff=A((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(o){}return null}});var Ny=A(Oy=>{"use strict";var Af=Oy;Af.length=function(e){for(var t=0,i=0,a=0;a191&&l<224?n[r++]=(l&31)<<6|e[t++]&63:l>239&&l<365?(l=((l&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,n[r++]=55296+(l>>10),n[r++]=56320+(l&1023)):n[r++]=(l&15)<<12|(e[t++]&63)<<6|e[t++]&63,r>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),r=0);return s?(r&&s.push(String.fromCharCode.apply(String,n.slice(0,r))),s.join("")):String.fromCharCode.apply(String,n.slice(0,r))};Af.write=function(e,t,i){for(var a=i,s,n,r=0;r>6|192,t[i++]=s&63|128):(s&64512)===55296&&((n=e.charCodeAt(r+1))&64512)===56320?(s=65536+((s&1023)<<10)+(n&1023),++r,t[i++]=s>>18|240,t[i++]=s>>12&63|128,t[i++]=s>>6&63|128,t[i++]=s&63|128):(t[i++]=s>>12|224,t[i++]=s>>6&63|128,t[i++]=s&63|128);return i-a}});var Cy=A((WNe,My)=>{"use strict";My.exports=x6;function x6(o,e,t){var i=t||8192,a=i>>>1,s=null,n=i;return function(l){if(l<1||l>a)return o(l);n+l>i&&(s=o(i),n=0);var c=e.call(s,n,n+=l);return n&7&&(n=(n|7)+1),c}}});var gy=A((jNe,Py)=>{"use strict";Py.exports=ze;var ml=yr();function ze(o,e){this.lo=o>>>0,this.hi=e>>>0}var bo=ze.zero=new ze(0,0);bo.toNumber=function(){return 0};bo.zzEncode=bo.zzDecode=function(){return this};bo.length=function(){return 1};var U6=ze.zeroHash="\0\0\0\0\0\0\0\0";ze.fromNumber=function(e){if(e===0)return bo;var t=e<0;t&&(e=-e);var i=e>>>0,a=(e-i)/4294967296>>>0;return t&&(a=~a>>>0,i=~i>>>0,++i>4294967295&&(i=0,++a>4294967295&&(a=0))),new ze(i,a)};ze.from=function(e){if(typeof e=="number")return ze.fromNumber(e);if(ml.isString(e))if(ml.Long)e=ml.Long.fromString(e);else return ze.fromNumber(parseInt(e,10));return e.low||e.high?new ze(e.low>>>0,e.high>>>0):bo};ze.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+i*4294967296)}return this.lo+this.hi*4294967296};ze.prototype.toLong=function(e){return ml.Long?new ml.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var Hn=String.prototype.charCodeAt;ze.fromHash=function(e){return e===U6?bo:new ze((Hn.call(e,0)|Hn.call(e,1)<<8|Hn.call(e,2)<<16|Hn.call(e,3)<<24)>>>0,(Hn.call(e,4)|Hn.call(e,5)<<8|Hn.call(e,6)<<16|Hn.call(e,7)<<24)>>>0)};ze.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)};ze.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};ze.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};ze.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return i===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}});var yr=A(hf=>{"use strict";var Y=hf;Y.asPromise=df();Y.base64=Ty();Y.EventEmitter=py();Y.float=my();Y.inquire=ff();Y.utf8=Ny();Y.pool=Cy();Y.LongBits=gy();Y.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);Y.global=Y.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||hf;Y.emptyArray=Object.freeze?Object.freeze([]):[];Y.emptyObject=Object.freeze?Object.freeze({}):{};Y.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};Y.isString=function(e){return typeof e=="string"||e instanceof String};Y.isObject=function(e){return e&&typeof e=="object"};Y.isset=Y.isSet=function(e,t){var i=e[t];return i!=null&&e.hasOwnProperty(t)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1};Y.Buffer=function(){try{var o=Y.inquire("buffer").Buffer;return o.prototype.utf8Write?o:null}catch{return null}}();Y._Buffer_from=null;Y._Buffer_allocUnsafe=null;Y.newBuffer=function(e){return typeof e=="number"?Y.Buffer?Y._Buffer_allocUnsafe(e):new Y.Array(e):Y.Buffer?Y._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};Y.Array=typeof Uint8Array<"u"?Uint8Array:Array;Y.Long=Y.global.dcodeIO&&Y.global.dcodeIO.Long||Y.global.Long||Y.inquire("long");Y.key2Re=/^true|false|0|1$/;Y.key32Re=/^-?(?:0|[1-9][0-9]*)$/;Y.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;Y.longToHash=function(e){return e?Y.LongBits.from(e).toHash():Y.LongBits.zeroHash};Y.longFromHash=function(e,t){var i=Y.LongBits.fromHash(e);return Y.Long?Y.Long.fromBits(i.lo,i.hi,t):i.toNumber(!!t)};function Ly(o,e,t){for(var i=Object.keys(e),a=0;a-1;--s)if(t[a[s]]===1&&this[a[s]]!==void 0&&this[a[s]]!==null)return a[s]}};Y.oneOfSetter=function(e){return function(t){for(var i=0;i{"use strict";Uy.exports=de;var jt=yr(),vf,E_=jt.LongBits,Iy=jt.base64,Dy=jt.utf8;function Ol(o,e,t){this.fn=o,this.len=e,this.next=void 0,this.val=t}function mf(){}function b6(o){this.head=o.head,this.tail=o.tail,this.len=o.len,this.next=o.states}function de(){this.len=0,this.head=new Ol(mf,0,0),this.tail=this.head,this.states=null}var xy=function(){return jt.Buffer?function(){return(de.create=function(){return new vf})()}:function(){return new de}};de.create=xy();de.alloc=function(e){return new jt.Array(e)};jt.Array!==Array&&(de.alloc=jt.pool(de.alloc,jt.Array.prototype.subarray));de.prototype._push=function(e,t,i){return this.tail=this.tail.next=new Ol(e,t,i),this.len+=t,this};function Of(o,e,t){e[t]=o&255}function V6(o,e,t){for(;o>127;)e[t++]=o&127|128,o>>>=7;e[t]=o}function Nf(o,e){this.len=o,this.next=void 0,this.val=e}Nf.prototype=Object.create(Ol.prototype);Nf.prototype.fn=V6;de.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new Nf((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};de.prototype.int32=function(e){return e<0?this._push(Mf,10,E_.fromNumber(e)):this.uint32(e)};de.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function Mf(o,e,t){for(;o.hi;)e[t++]=o.lo&127|128,o.lo=(o.lo>>>7|o.hi<<25)>>>0,o.hi>>>=7;for(;o.lo>127;)e[t++]=o.lo&127|128,o.lo=o.lo>>>7;e[t++]=o.lo}de.prototype.uint64=function(e){var t=E_.from(e);return this._push(Mf,t.length(),t)};de.prototype.int64=de.prototype.uint64;de.prototype.sint64=function(e){var t=E_.from(e).zzEncode();return this._push(Mf,t.length(),t)};de.prototype.bool=function(e){return this._push(Of,1,e?1:0)};function Rf(o,e,t){e[t]=o&255,e[t+1]=o>>>8&255,e[t+2]=o>>>16&255,e[t+3]=o>>>24}de.prototype.fixed32=function(e){return this._push(Rf,4,e>>>0)};de.prototype.sfixed32=de.prototype.fixed32;de.prototype.fixed64=function(e){var t=E_.from(e);return this._push(Rf,4,t.lo)._push(Rf,4,t.hi)};de.prototype.sfixed64=de.prototype.fixed64;de.prototype.float=function(e){return this._push(jt.float.writeFloatLE,4,e)};de.prototype.double=function(e){return this._push(jt.float.writeDoubleLE,8,e)};var w6=jt.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var a=0;a>>0;if(!t)return this._push(Of,1,0);if(jt.isString(e)){var i=de.alloc(t=Iy.length(e));Iy.decode(e,i,0),e=i}return this.uint32(t)._push(w6,t,e)};de.prototype.string=function(e){var t=Dy.length(e);return t?this.uint32(t)._push(Dy.write,t,e):this._push(Of,1,0)};de.prototype.fork=function(){return this.states=new b6(this),this.head=this.tail=new Ol(mf,0,0),this.len=0,this};de.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ol(mf,0,0),this.len=0),this};de.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this};de.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t};de._configure=function(o){vf=o,de.create=xy(),vf._configure()}});var wy=A((XNe,Vy)=>{"use strict";Vy.exports=Ir;var by=__();(Ir.prototype=Object.create(by.prototype)).constructor=Ir;var kn=yr();function Ir(){by.call(this)}Ir._configure=function(){Ir.alloc=kn._Buffer_allocUnsafe,Ir.writeBytesBuffer=kn.Buffer&&kn.Buffer.prototype instanceof Uint8Array&&kn.Buffer.prototype.set.name==="set"?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var a=0;a>>0;return this.uint32(t),t&&this._push(Ir.writeBytesBuffer,t,e),this};function B6(o,e,t){o.length<40?kn.utf8.write(o,e,t):e.utf8Write?e.utf8Write(o,t):e.write(o,t)}Ir.prototype.string=function(e){var t=kn.Buffer.byteLength(e);return this.uint32(t),t&&this._push(B6,t,e),this};Ir._configure()});var S_=A((JNe,Yy)=>{"use strict";Yy.exports=Ve;var _r=yr(),Pf,Hy=_r.LongBits,G6=_r.utf8;function Tr(o,e){return RangeError("index out of range: "+o.pos+" + "+(e||1)+" > "+o.len)}function Ve(o){this.buf=o,this.pos=0,this.len=o.length}var By=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new Ve(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new Ve(e);throw Error("illegal buffer")},ky=function(){return _r.Buffer?function(t){return(Ve.create=function(a){return _r.Buffer.isBuffer(a)?new Pf(a):By(a)})(t)}:By};Ve.create=ky();Ve.prototype._slice=_r.Array.prototype.subarray||_r.Array.prototype.slice;Ve.prototype.uint32=function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,Tr(this,10);return e}}();Ve.prototype.int32=function(){return this.uint32()|0};Ve.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function Cf(){var o=new Hy(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(o.lo=(o.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return o;if(o.lo=(o.lo|(this.buf[this.pos]&127)<<28)>>>0,o.hi=(o.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return o;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw Tr(this);if(o.lo=(o.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return o}return o.lo=(o.lo|(this.buf[this.pos++]&127)<>>0,o}if(this.len-this.pos>4){for(;e<5;++e)if(o.hi=(o.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return o}else for(;e<5;++e){if(this.pos>=this.len)throw Tr(this);if(o.hi=(o.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return o}throw Error("invalid varint encoding")}Ve.prototype.bool=function(){return this.uint32()!==0};function T_(o,e){return(o[e-4]|o[e-3]<<8|o[e-2]<<16|o[e-1]<<24)>>>0}Ve.prototype.fixed32=function(){if(this.pos+4>this.len)throw Tr(this,4);return T_(this.buf,this.pos+=4)};Ve.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Tr(this,4);return T_(this.buf,this.pos+=4)|0};function Gy(){if(this.pos+8>this.len)throw Tr(this,8);return new Hy(T_(this.buf,this.pos+=4),T_(this.buf,this.pos+=4))}Ve.prototype.float=function(){if(this.pos+4>this.len)throw Tr(this,4);var e=_r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};Ve.prototype.double=function(){if(this.pos+8>this.len)throw Tr(this,4);var e=_r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};Ve.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw Tr(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,i);if(t===i){var a=_r.Buffer;return a?a.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,i)};Ve.prototype.string=function(){var e=this.bytes();return G6.read(e,0,e.length)};Ve.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw Tr(this,e);this.pos+=e}else do if(this.pos>=this.len)throw Tr(this);while(this.buf[this.pos++]&128);return this};Ve.prototype.skipType=function(o){switch(o){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(o=this.uint32()&7)!==4;)this.skipType(o);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+o+" at offset "+this.pos)}return this};Ve._configure=function(o){Pf=o,Ve.create=ky(),Pf._configure();var e=_r.Long?"toLong":"toNumber";_r.merge(Ve.prototype,{int64:function(){return Cf.call(this)[e](!1)},uint64:function(){return Cf.call(this)[e](!0)},sint64:function(){return Cf.call(this).zzDecode()[e](!1)},fixed64:function(){return Gy.call(this)[e](!0)},sfixed64:function(){return Gy.call(this)[e](!1)}})}});var Wy=A((QNe,qy)=>{"use strict";qy.exports=Vo;var Ky=S_();(Vo.prototype=Object.create(Ky.prototype)).constructor=Vo;var Fy=yr();function Vo(o){Ky.call(this,o)}Vo._configure=function(){Fy.Buffer&&(Vo.prototype._slice=Fy.Buffer.prototype.slice)};Vo.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))};Vo._configure()});var zy=A((ZNe,jy)=>{"use strict";jy.exports=Nl;var gf=yr();(Nl.prototype=Object.create(gf.EventEmitter.prototype)).constructor=Nl;function Nl(o,e,t){if(typeof o!="function")throw TypeError("rpcImpl must be a function");gf.EventEmitter.call(this),this.rpcImpl=o,this.requestDelimited=!!e,this.responseDelimited=!!t}Nl.prototype.rpcCall=function o(e,t,i,a,s){if(!a)throw TypeError("request must be specified");var n=this;if(!s)return gf.asPromise(o,n,e,t,i,a);if(!n.rpcImpl){setTimeout(function(){s(Error("already ended"))},0);return}try{return n.rpcImpl(e,t[n.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(l,c){if(l)return n.emit("error",l,e),s(l);if(c===null){n.end(!0);return}if(!(c instanceof i))try{c=i[n.responseDelimited?"decodeDelimited":"decode"](c)}catch(u){return n.emit("error",u,e),s(u)}return n.emit("data",c,e),s(null,c)})}catch(r){n.emit("error",r,e),setTimeout(function(){s(r)},0);return}};Nl.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Lf=A($y=>{"use strict";var H6=$y;H6.Service=zy()});var yf=A((tMe,Xy)=>{"use strict";Xy.exports={}});var If=A(Qy=>{"use strict";var Ct=Qy;Ct.build="minimal";Ct.Writer=__();Ct.BufferWriter=wy();Ct.Reader=S_();Ct.BufferReader=Wy();Ct.util=yr();Ct.rpc=Lf();Ct.roots=yf();Ct.configure=Jy;function Jy(){Ct.util._configure(),Ct.Writer._configure(Ct.BufferWriter),Ct.Reader._configure(Ct.BufferReader)}Jy()});var eI=A((nMe,Zy)=>{"use strict";Zy.exports=If()});var rI=A((oMe,tI)=>{"use strict";var W=eI(),h=W.Reader,re=W.Writer,T=W.util,_=W.roots.default||(W.roots.default={});_.opentelemetry=function(){var o={};return o.proto=function(){var e={};return e.common=function(){var t={};return t.v1=function(){var i={};return i.AnyValue=function(){function a(n){if(n)for(var r=Object.keys(n),l=0;l>>3){case 1:{u.stringValue=r.string();break}case 2:{u.boolValue=r.bool();break}case 3:{u.intValue=r.int64();break}case 4:{u.doubleValue=r.double();break}case 5:{u.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.decode(r,r.uint32());break}case 6:{u.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.decode(r,r.uint32());break}case 7:{u.bytesValue=r.bytes();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.stringValue!=null&&r.hasOwnProperty("stringValue")&&(l.value=1,!T.isString(r.stringValue)))return"stringValue: string expected";if(r.boolValue!=null&&r.hasOwnProperty("boolValue")){if(l.value===1)return"value: multiple values";if(l.value=1,typeof r.boolValue!="boolean")return"boolValue: boolean expected"}if(r.intValue!=null&&r.hasOwnProperty("intValue")){if(l.value===1)return"value: multiple values";if(l.value=1,!T.isInteger(r.intValue)&&!(r.intValue&&T.isInteger(r.intValue.low)&&T.isInteger(r.intValue.high)))return"intValue: integer|Long expected"}if(r.doubleValue!=null&&r.hasOwnProperty("doubleValue")){if(l.value===1)return"value: multiple values";if(l.value=1,typeof r.doubleValue!="number")return"doubleValue: number expected"}if(r.arrayValue!=null&&r.hasOwnProperty("arrayValue")){if(l.value===1)return"value: multiple values";l.value=1;{var c=_.opentelemetry.proto.common.v1.ArrayValue.verify(r.arrayValue);if(c)return"arrayValue."+c}}if(r.kvlistValue!=null&&r.hasOwnProperty("kvlistValue")){if(l.value===1)return"value: multiple values";l.value=1;{var c=_.opentelemetry.proto.common.v1.KeyValueList.verify(r.kvlistValue);if(c)return"kvlistValue."+c}}if(r.bytesValue!=null&&r.hasOwnProperty("bytesValue")){if(l.value===1)return"value: multiple values";if(l.value=1,!(r.bytesValue&&typeof r.bytesValue.length=="number"||T.isString(r.bytesValue)))return"bytesValue: buffer expected"}return null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.common.v1.AnyValue)return r;var l=new _.opentelemetry.proto.common.v1.AnyValue;if(r.stringValue!=null&&(l.stringValue=String(r.stringValue)),r.boolValue!=null&&(l.boolValue=!!r.boolValue),r.intValue!=null&&(T.Long?(l.intValue=T.Long.fromValue(r.intValue)).unsigned=!1:typeof r.intValue=="string"?l.intValue=parseInt(r.intValue,10):typeof r.intValue=="number"?l.intValue=r.intValue:typeof r.intValue=="object"&&(l.intValue=new T.LongBits(r.intValue.low>>>0,r.intValue.high>>>0).toNumber())),r.doubleValue!=null&&(l.doubleValue=Number(r.doubleValue)),r.arrayValue!=null){if(typeof r.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");l.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.fromObject(r.arrayValue)}if(r.kvlistValue!=null){if(typeof r.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");l.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.fromObject(r.kvlistValue)}return r.bytesValue!=null&&(typeof r.bytesValue=="string"?T.base64.decode(r.bytesValue,l.bytesValue=T.newBuffer(T.base64.length(r.bytesValue)),0):r.bytesValue.length>=0&&(l.bytesValue=r.bytesValue)),l},a.toObject=function(r,l){l||(l={});var c={};return r.stringValue!=null&&r.hasOwnProperty("stringValue")&&(c.stringValue=r.stringValue,l.oneofs&&(c.value="stringValue")),r.boolValue!=null&&r.hasOwnProperty("boolValue")&&(c.boolValue=r.boolValue,l.oneofs&&(c.value="boolValue")),r.intValue!=null&&r.hasOwnProperty("intValue")&&(typeof r.intValue=="number"?c.intValue=l.longs===String?String(r.intValue):r.intValue:c.intValue=l.longs===String?T.Long.prototype.toString.call(r.intValue):l.longs===Number?new T.LongBits(r.intValue.low>>>0,r.intValue.high>>>0).toNumber():r.intValue,l.oneofs&&(c.value="intValue")),r.doubleValue!=null&&r.hasOwnProperty("doubleValue")&&(c.doubleValue=l.json&&!isFinite(r.doubleValue)?String(r.doubleValue):r.doubleValue,l.oneofs&&(c.value="doubleValue")),r.arrayValue!=null&&r.hasOwnProperty("arrayValue")&&(c.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.toObject(r.arrayValue,l),l.oneofs&&(c.value="arrayValue")),r.kvlistValue!=null&&r.hasOwnProperty("kvlistValue")&&(c.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.toObject(r.kvlistValue,l),l.oneofs&&(c.value="kvlistValue")),r.bytesValue!=null&&r.hasOwnProperty("bytesValue")&&(c.bytesValue=l.bytes===String?T.base64.encode(r.bytesValue,0,r.bytesValue.length):l.bytes===Array?Array.prototype.slice.call(r.bytesValue):r.bytesValue,l.oneofs&&(c.value="bytesValue")),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.common.v1.AnyValue"},a}(),i.ArrayValue=function(){function a(s){if(this.values=[],s)for(var n=Object.keys(s),r=0;r>>3){case 1:{c.values&&c.values.length||(c.values=[]),c.values.push(_.opentelemetry.proto.common.v1.AnyValue.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.values!=null&&n.hasOwnProperty("values")){if(!Array.isArray(n.values))return"values: array expected";for(var r=0;r>>3){case 1:{c.values&&c.values.length||(c.values=[]),c.values.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.values!=null&&n.hasOwnProperty("values")){if(!Array.isArray(n.values))return"values: array expected";for(var r=0;r>>3){case 1:{c.key=n.string();break}case 2:{c.value=_.opentelemetry.proto.common.v1.AnyValue.decode(n,n.uint32());break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.key!=null&&n.hasOwnProperty("key")&&!T.isString(n.key))return"key: string expected";if(n.value!=null&&n.hasOwnProperty("value")){var r=_.opentelemetry.proto.common.v1.AnyValue.verify(n.value);if(r)return"value."+r}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.common.v1.KeyValue)return n;var r=new _.opentelemetry.proto.common.v1.KeyValue;if(n.key!=null&&(r.key=String(n.key)),n.value!=null){if(typeof n.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");r.value=_.opentelemetry.proto.common.v1.AnyValue.fromObject(n.value)}return r},a.toObject=function(n,r){r||(r={});var l={};return r.defaults&&(l.key="",l.value=null),n.key!=null&&n.hasOwnProperty("key")&&(l.key=n.key),n.value!=null&&n.hasOwnProperty("value")&&(l.value=_.opentelemetry.proto.common.v1.AnyValue.toObject(n.value,r)),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.common.v1.KeyValue"},a}(),i.InstrumentationScope=function(){function a(s){if(this.attributes=[],s)for(var n=Object.keys(s),r=0;r>>3){case 1:{c.name=n.string();break}case 2:{c.version=n.string();break}case 3:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 4:{c.droppedAttributesCount=n.uint32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.name!=null&&n.hasOwnProperty("name")&&!T.isString(n.name))return"name: string expected";if(n.version!=null&&n.hasOwnProperty("version")&&!T.isString(n.version))return"version: string expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r>>0),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[]),r.defaults&&(l.name="",l.version="",l.droppedAttributesCount=0),n.name!=null&&n.hasOwnProperty("name")&&(l.name=n.name),n.version!=null&&n.hasOwnProperty("version")&&(l.version=n.version),n.attributes&&n.attributes.length){l.attributes=[];for(var c=0;c>>3){case 1:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{c.droppedAttributesCount=n.uint32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r>>0),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[]),r.defaults&&(l.droppedAttributesCount=0),n.attributes&&n.attributes.length){l.attributes=[];for(var c=0;c>>3){case 1:{c.resourceSpans&&c.resourceSpans.length||(c.resourceSpans=[]),c.resourceSpans.push(_.opentelemetry.proto.trace.v1.ResourceSpans.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resourceSpans!=null&&n.hasOwnProperty("resourceSpans")){if(!Array.isArray(n.resourceSpans))return"resourceSpans: array expected";for(var r=0;r>>3){case 1:{c.resource=_.opentelemetry.proto.resource.v1.Resource.decode(n,n.uint32());break}case 2:{c.scopeSpans&&c.scopeSpans.length||(c.scopeSpans=[]),c.scopeSpans.push(_.opentelemetry.proto.trace.v1.ScopeSpans.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resource!=null&&n.hasOwnProperty("resource")){var r=_.opentelemetry.proto.resource.v1.Resource.verify(n.resource);if(r)return"resource."+r}if(n.scopeSpans!=null&&n.hasOwnProperty("scopeSpans")){if(!Array.isArray(n.scopeSpans))return"scopeSpans: array expected";for(var l=0;l>>3){case 1:{c.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(n,n.uint32());break}case 2:{c.spans&&c.spans.length||(c.spans=[]),c.spans.push(_.opentelemetry.proto.trace.v1.Span.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.scope!=null&&n.hasOwnProperty("scope")){var r=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(n.scope);if(r)return"scope."+r}if(n.spans!=null&&n.hasOwnProperty("spans")){if(!Array.isArray(n.spans))return"spans: array expected";for(var l=0;l>>3){case 1:{c.traceId=n.bytes();break}case 2:{c.spanId=n.bytes();break}case 3:{c.traceState=n.string();break}case 4:{c.parentSpanId=n.bytes();break}case 5:{c.name=n.string();break}case 6:{c.kind=n.int32();break}case 7:{c.startTimeUnixNano=n.fixed64();break}case 8:{c.endTimeUnixNano=n.fixed64();break}case 9:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 10:{c.droppedAttributesCount=n.uint32();break}case 11:{c.events&&c.events.length||(c.events=[]),c.events.push(_.opentelemetry.proto.trace.v1.Span.Event.decode(n,n.uint32()));break}case 12:{c.droppedEventsCount=n.uint32();break}case 13:{c.links&&c.links.length||(c.links=[]),c.links.push(_.opentelemetry.proto.trace.v1.Span.Link.decode(n,n.uint32()));break}case 14:{c.droppedLinksCount=n.uint32();break}case 15:{c.status=_.opentelemetry.proto.trace.v1.Status.decode(n,n.uint32());break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.traceId!=null&&n.hasOwnProperty("traceId")&&!(n.traceId&&typeof n.traceId.length=="number"||T.isString(n.traceId)))return"traceId: buffer expected";if(n.spanId!=null&&n.hasOwnProperty("spanId")&&!(n.spanId&&typeof n.spanId.length=="number"||T.isString(n.spanId)))return"spanId: buffer expected";if(n.traceState!=null&&n.hasOwnProperty("traceState")&&!T.isString(n.traceState))return"traceState: string expected";if(n.parentSpanId!=null&&n.hasOwnProperty("parentSpanId")&&!(n.parentSpanId&&typeof n.parentSpanId.length=="number"||T.isString(n.parentSpanId)))return"parentSpanId: buffer expected";if(n.name!=null&&n.hasOwnProperty("name")&&!T.isString(n.name))return"name: string expected";if(n.kind!=null&&n.hasOwnProperty("kind"))switch(n.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&!T.isInteger(n.startTimeUnixNano)&&!(n.startTimeUnixNano&&T.isInteger(n.startTimeUnixNano.low)&&T.isInteger(n.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(n.endTimeUnixNano!=null&&n.hasOwnProperty("endTimeUnixNano")&&!T.isInteger(n.endTimeUnixNano)&&!(n.endTimeUnixNano&&T.isInteger(n.endTimeUnixNano.low)&&T.isInteger(n.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r=0&&(r.traceId=n.traceId)),n.spanId!=null&&(typeof n.spanId=="string"?T.base64.decode(n.spanId,r.spanId=T.newBuffer(T.base64.length(n.spanId)),0):n.spanId.length>=0&&(r.spanId=n.spanId)),n.traceState!=null&&(r.traceState=String(n.traceState)),n.parentSpanId!=null&&(typeof n.parentSpanId=="string"?T.base64.decode(n.parentSpanId,r.parentSpanId=T.newBuffer(T.base64.length(n.parentSpanId)),0):n.parentSpanId.length>=0&&(r.parentSpanId=n.parentSpanId)),n.name!=null&&(r.name=String(n.name)),n.kind){default:if(typeof n.kind=="number"){r.kind=n.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:r.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:r.kind=1;break;case"SPAN_KIND_SERVER":case 2:r.kind=2;break;case"SPAN_KIND_CLIENT":case 3:r.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:r.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:r.kind=5;break}if(n.startTimeUnixNano!=null&&(T.Long?(r.startTimeUnixNano=T.Long.fromValue(n.startTimeUnixNano)).unsigned=!1:typeof n.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(n.startTimeUnixNano,10):typeof n.startTimeUnixNano=="number"?r.startTimeUnixNano=n.startTimeUnixNano:typeof n.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new T.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.endTimeUnixNano!=null&&(T.Long?(r.endTimeUnixNano=T.Long.fromValue(n.endTimeUnixNano)).unsigned=!1:typeof n.endTimeUnixNano=="string"?r.endTimeUnixNano=parseInt(n.endTimeUnixNano,10):typeof n.endTimeUnixNano=="number"?r.endTimeUnixNano=n.endTimeUnixNano:typeof n.endTimeUnixNano=="object"&&(r.endTimeUnixNano=new T.LongBits(n.endTimeUnixNano.low>>>0,n.endTimeUnixNano.high>>>0).toNumber())),n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");r.attributes=[];for(var l=0;l>>0),n.events){if(!Array.isArray(n.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");r.events=[];for(var l=0;l>>0),n.links){if(!Array.isArray(n.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");r.links=[];for(var l=0;l>>0),n.status!=null){if(typeof n.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");r.status=_.opentelemetry.proto.trace.v1.Status.fromObject(n.status)}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[],l.events=[],l.links=[]),r.defaults){if(r.bytes===String?l.traceId="":(l.traceId=[],r.bytes!==Array&&(l.traceId=T.newBuffer(l.traceId))),r.bytes===String?l.spanId="":(l.spanId=[],r.bytes!==Array&&(l.spanId=T.newBuffer(l.spanId))),l.traceState="",r.bytes===String?l.parentSpanId="":(l.parentSpanId=[],r.bytes!==Array&&(l.parentSpanId=T.newBuffer(l.parentSpanId))),l.name="",l.kind=r.enums===String?"SPAN_KIND_UNSPECIFIED":0,T.Long){var c=new T.Long(0,0,!1);l.startTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.startTimeUnixNano=r.longs===String?"0":0;if(T.Long){var c=new T.Long(0,0,!1);l.endTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.endTimeUnixNano=r.longs===String?"0":0;l.droppedAttributesCount=0,l.droppedEventsCount=0,l.droppedLinksCount=0,l.status=null}if(n.traceId!=null&&n.hasOwnProperty("traceId")&&(l.traceId=r.bytes===String?T.base64.encode(n.traceId,0,n.traceId.length):r.bytes===Array?Array.prototype.slice.call(n.traceId):n.traceId),n.spanId!=null&&n.hasOwnProperty("spanId")&&(l.spanId=r.bytes===String?T.base64.encode(n.spanId,0,n.spanId.length):r.bytes===Array?Array.prototype.slice.call(n.spanId):n.spanId),n.traceState!=null&&n.hasOwnProperty("traceState")&&(l.traceState=n.traceState),n.parentSpanId!=null&&n.hasOwnProperty("parentSpanId")&&(l.parentSpanId=r.bytes===String?T.base64.encode(n.parentSpanId,0,n.parentSpanId.length):r.bytes===Array?Array.prototype.slice.call(n.parentSpanId):n.parentSpanId),n.name!=null&&n.hasOwnProperty("name")&&(l.name=n.name),n.kind!=null&&n.hasOwnProperty("kind")&&(l.kind=r.enums===String?_.opentelemetry.proto.trace.v1.Span.SpanKind[n.kind]===void 0?n.kind:_.opentelemetry.proto.trace.v1.Span.SpanKind[n.kind]:n.kind),n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?l.startTimeUnixNano=r.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:l.startTimeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.startTimeUnixNano):r.longs===Number?new T.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.endTimeUnixNano!=null&&n.hasOwnProperty("endTimeUnixNano")&&(typeof n.endTimeUnixNano=="number"?l.endTimeUnixNano=r.longs===String?String(n.endTimeUnixNano):n.endTimeUnixNano:l.endTimeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.endTimeUnixNano):r.longs===Number?new T.LongBits(n.endTimeUnixNano.low>>>0,n.endTimeUnixNano.high>>>0).toNumber():n.endTimeUnixNano),n.attributes&&n.attributes.length){l.attributes=[];for(var u=0;u>>3){case 1:{u.timeUnixNano=r.fixed64();break}case 2:{u.name=r.string();break}case 3:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 4:{u.droppedAttributesCount=r.uint32();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!T.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&T.isInteger(r.timeUnixNano.low)&&T.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.name!=null&&r.hasOwnProperty("name")&&!T.isString(r.name))return"name: string expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var l=0;l>>0,r.timeUnixNano.high>>>0).toNumber())),r.name!=null&&(l.name=String(r.name)),r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");l.attributes=[];for(var c=0;c>>0),l},s.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.attributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;c.name="",c.droppedAttributesCount=0}if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.name!=null&&r.hasOwnProperty("name")&&(c.name=r.name),r.attributes&&r.attributes.length){c.attributes=[];for(var E=0;E>>3){case 1:{u.traceId=r.bytes();break}case 2:{u.spanId=r.bytes();break}case 3:{u.traceState=r.string();break}case 4:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 5:{u.droppedAttributesCount=r.uint32();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.traceId!=null&&r.hasOwnProperty("traceId")&&!(r.traceId&&typeof r.traceId.length=="number"||T.isString(r.traceId)))return"traceId: buffer expected";if(r.spanId!=null&&r.hasOwnProperty("spanId")&&!(r.spanId&&typeof r.spanId.length=="number"||T.isString(r.spanId)))return"spanId: buffer expected";if(r.traceState!=null&&r.hasOwnProperty("traceState")&&!T.isString(r.traceState))return"traceState: string expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var l=0;l=0&&(l.traceId=r.traceId)),r.spanId!=null&&(typeof r.spanId=="string"?T.base64.decode(r.spanId,l.spanId=T.newBuffer(T.base64.length(r.spanId)),0):r.spanId.length>=0&&(l.spanId=r.spanId)),r.traceState!=null&&(l.traceState=String(r.traceState)),r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");l.attributes=[];for(var c=0;c>>0),l},s.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.attributes=[]),l.defaults&&(l.bytes===String?c.traceId="":(c.traceId=[],l.bytes!==Array&&(c.traceId=T.newBuffer(c.traceId))),l.bytes===String?c.spanId="":(c.spanId=[],l.bytes!==Array&&(c.spanId=T.newBuffer(c.spanId))),c.traceState="",c.droppedAttributesCount=0),r.traceId!=null&&r.hasOwnProperty("traceId")&&(c.traceId=l.bytes===String?T.base64.encode(r.traceId,0,r.traceId.length):l.bytes===Array?Array.prototype.slice.call(r.traceId):r.traceId),r.spanId!=null&&r.hasOwnProperty("spanId")&&(c.spanId=l.bytes===String?T.base64.encode(r.spanId,0,r.spanId.length):l.bytes===Array?Array.prototype.slice.call(r.spanId):r.spanId),r.traceState!=null&&r.hasOwnProperty("traceState")&&(c.traceState=r.traceState),r.attributes&&r.attributes.length){c.attributes=[];for(var u=0;u>>3){case 2:{c.message=n.string();break}case 3:{c.code=n.int32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.message!=null&&n.hasOwnProperty("message")&&!T.isString(n.message))return"message: string expected";if(n.code!=null&&n.hasOwnProperty("code"))switch(n.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.trace.v1.Status)return n;var r=new _.opentelemetry.proto.trace.v1.Status;switch(n.message!=null&&(r.message=String(n.message)),n.code){default:if(typeof n.code=="number"){r.code=n.code;break}break;case"STATUS_CODE_UNSET":case 0:r.code=0;break;case"STATUS_CODE_OK":case 1:r.code=1;break;case"STATUS_CODE_ERROR":case 2:r.code=2;break}return r},a.toObject=function(n,r){r||(r={});var l={};return r.defaults&&(l.message="",l.code=r.enums===String?"STATUS_CODE_UNSET":0),n.message!=null&&n.hasOwnProperty("message")&&(l.message=n.message),n.code!=null&&n.hasOwnProperty("code")&&(l.code=r.enums===String?_.opentelemetry.proto.trace.v1.Status.StatusCode[n.code]===void 0?n.code:_.opentelemetry.proto.trace.v1.Status.StatusCode[n.code]:n.code),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.Status"},a.StatusCode=function(){var s={},n=Object.create(s);return n[s[0]="STATUS_CODE_UNSET"]=0,n[s[1]="STATUS_CODE_OK"]=1,n[s[2]="STATUS_CODE_ERROR"]=2,n}(),a}(),i}(),t}(),e.collector=function(){var t={};return t.trace=function(){var i={};return i.v1=function(){var a={};return a.TraceService=function(){function s(n,r,l){W.rpc.Service.call(this,n,r,l)}return(s.prototype=Object.create(W.rpc.Service.prototype)).constructor=s,s.create=function(r,l,c){return new this(r,l,c)},Object.defineProperty(s.prototype.export=function n(r,l){return this.rpcCall(n,_.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,_.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,r,l)},"name",{value:"Export"}),s}(),a.ExportTraceServiceRequest=function(){function s(n){if(this.resourceSpans=[],n)for(var r=Object.keys(n),l=0;l>>3){case 1:{u.resourceSpans&&u.resourceSpans.length||(u.resourceSpans=[]),u.resourceSpans.push(_.opentelemetry.proto.trace.v1.ResourceSpans.decode(r,r.uint32()));break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceSpans!=null&&r.hasOwnProperty("resourceSpans")){if(!Array.isArray(r.resourceSpans))return"resourceSpans: array expected";for(var l=0;l>>3){case 1:{u.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")){var l=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(r.partialSuccess);if(l)return"partialSuccess."+l}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return r;var l=new _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(r.partialSuccess!=null){if(typeof r.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");l.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(r.partialSuccess)}return l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")&&(c.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(r.partialSuccess,l)),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},s}(),a.ExportTracePartialSuccess=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l>>3){case 1:{u.rejectedSpans=r.int64();break}case 2:{u.errorMessage=r.string();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.rejectedSpans!=null&&r.hasOwnProperty("rejectedSpans")&&!T.isInteger(r.rejectedSpans)&&!(r.rejectedSpans&&T.isInteger(r.rejectedSpans.low)&&T.isInteger(r.rejectedSpans.high))?"rejectedSpans: integer|Long expected":r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&!T.isString(r.errorMessage)?"errorMessage: string expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return r;var l=new _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return r.rejectedSpans!=null&&(T.Long?(l.rejectedSpans=T.Long.fromValue(r.rejectedSpans)).unsigned=!1:typeof r.rejectedSpans=="string"?l.rejectedSpans=parseInt(r.rejectedSpans,10):typeof r.rejectedSpans=="number"?l.rejectedSpans=r.rejectedSpans:typeof r.rejectedSpans=="object"&&(l.rejectedSpans=new T.LongBits(r.rejectedSpans.low>>>0,r.rejectedSpans.high>>>0).toNumber())),r.errorMessage!=null&&(l.errorMessage=String(r.errorMessage)),l},s.toObject=function(r,l){l||(l={});var c={};if(l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.rejectedSpans=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.rejectedSpans=l.longs===String?"0":0;c.errorMessage=""}return r.rejectedSpans!=null&&r.hasOwnProperty("rejectedSpans")&&(typeof r.rejectedSpans=="number"?c.rejectedSpans=l.longs===String?String(r.rejectedSpans):r.rejectedSpans:c.rejectedSpans=l.longs===String?T.Long.prototype.toString.call(r.rejectedSpans):l.longs===Number?new T.LongBits(r.rejectedSpans.low>>>0,r.rejectedSpans.high>>>0).toNumber():r.rejectedSpans),r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&(c.errorMessage=r.errorMessage),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},s}(),a}(),i}(),t.metrics=function(){var i={};return i.v1=function(){var a={};return a.MetricsService=function(){function s(n,r,l){W.rpc.Service.call(this,n,r,l)}return(s.prototype=Object.create(W.rpc.Service.prototype)).constructor=s,s.create=function(r,l,c){return new this(r,l,c)},Object.defineProperty(s.prototype.export=function n(r,l){return this.rpcCall(n,_.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,_.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,r,l)},"name",{value:"Export"}),s}(),a.ExportMetricsServiceRequest=function(){function s(n){if(this.resourceMetrics=[],n)for(var r=Object.keys(n),l=0;l>>3){case 1:{u.resourceMetrics&&u.resourceMetrics.length||(u.resourceMetrics=[]),u.resourceMetrics.push(_.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(r,r.uint32()));break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceMetrics!=null&&r.hasOwnProperty("resourceMetrics")){if(!Array.isArray(r.resourceMetrics))return"resourceMetrics: array expected";for(var l=0;l>>3){case 1:{u.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")){var l=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(r.partialSuccess);if(l)return"partialSuccess."+l}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return r;var l=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(r.partialSuccess!=null){if(typeof r.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");l.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(r.partialSuccess)}return l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")&&(c.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(r.partialSuccess,l)),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},s}(),a.ExportMetricsPartialSuccess=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l>>3){case 1:{u.rejectedDataPoints=r.int64();break}case 2:{u.errorMessage=r.string();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.rejectedDataPoints!=null&&r.hasOwnProperty("rejectedDataPoints")&&!T.isInteger(r.rejectedDataPoints)&&!(r.rejectedDataPoints&&T.isInteger(r.rejectedDataPoints.low)&&T.isInteger(r.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&!T.isString(r.errorMessage)?"errorMessage: string expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return r;var l=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return r.rejectedDataPoints!=null&&(T.Long?(l.rejectedDataPoints=T.Long.fromValue(r.rejectedDataPoints)).unsigned=!1:typeof r.rejectedDataPoints=="string"?l.rejectedDataPoints=parseInt(r.rejectedDataPoints,10):typeof r.rejectedDataPoints=="number"?l.rejectedDataPoints=r.rejectedDataPoints:typeof r.rejectedDataPoints=="object"&&(l.rejectedDataPoints=new T.LongBits(r.rejectedDataPoints.low>>>0,r.rejectedDataPoints.high>>>0).toNumber())),r.errorMessage!=null&&(l.errorMessage=String(r.errorMessage)),l},s.toObject=function(r,l){l||(l={});var c={};if(l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.rejectedDataPoints=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.rejectedDataPoints=l.longs===String?"0":0;c.errorMessage=""}return r.rejectedDataPoints!=null&&r.hasOwnProperty("rejectedDataPoints")&&(typeof r.rejectedDataPoints=="number"?c.rejectedDataPoints=l.longs===String?String(r.rejectedDataPoints):r.rejectedDataPoints:c.rejectedDataPoints=l.longs===String?T.Long.prototype.toString.call(r.rejectedDataPoints):l.longs===Number?new T.LongBits(r.rejectedDataPoints.low>>>0,r.rejectedDataPoints.high>>>0).toNumber():r.rejectedDataPoints),r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&(c.errorMessage=r.errorMessage),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},s}(),a}(),i}(),t.logs=function(){var i={};return i.v1=function(){var a={};return a.LogsService=function(){function s(n,r,l){W.rpc.Service.call(this,n,r,l)}return(s.prototype=Object.create(W.rpc.Service.prototype)).constructor=s,s.create=function(r,l,c){return new this(r,l,c)},Object.defineProperty(s.prototype.export=function n(r,l){return this.rpcCall(n,_.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,_.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,r,l)},"name",{value:"Export"}),s}(),a.ExportLogsServiceRequest=function(){function s(n){if(this.resourceLogs=[],n)for(var r=Object.keys(n),l=0;l>>3){case 1:{u.resourceLogs&&u.resourceLogs.length||(u.resourceLogs=[]),u.resourceLogs.push(_.opentelemetry.proto.logs.v1.ResourceLogs.decode(r,r.uint32()));break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceLogs!=null&&r.hasOwnProperty("resourceLogs")){if(!Array.isArray(r.resourceLogs))return"resourceLogs: array expected";for(var l=0;l>>3){case 1:{u.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")){var l=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(r.partialSuccess);if(l)return"partialSuccess."+l}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return r;var l=new _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(r.partialSuccess!=null){if(typeof r.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");l.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(r.partialSuccess)}return l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")&&(c.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(r.partialSuccess,l)),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},s}(),a.ExportLogsPartialSuccess=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l>>3){case 1:{u.rejectedLogRecords=r.int64();break}case 2:{u.errorMessage=r.string();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.rejectedLogRecords!=null&&r.hasOwnProperty("rejectedLogRecords")&&!T.isInteger(r.rejectedLogRecords)&&!(r.rejectedLogRecords&&T.isInteger(r.rejectedLogRecords.low)&&T.isInteger(r.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&!T.isString(r.errorMessage)?"errorMessage: string expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return r;var l=new _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return r.rejectedLogRecords!=null&&(T.Long?(l.rejectedLogRecords=T.Long.fromValue(r.rejectedLogRecords)).unsigned=!1:typeof r.rejectedLogRecords=="string"?l.rejectedLogRecords=parseInt(r.rejectedLogRecords,10):typeof r.rejectedLogRecords=="number"?l.rejectedLogRecords=r.rejectedLogRecords:typeof r.rejectedLogRecords=="object"&&(l.rejectedLogRecords=new T.LongBits(r.rejectedLogRecords.low>>>0,r.rejectedLogRecords.high>>>0).toNumber())),r.errorMessage!=null&&(l.errorMessage=String(r.errorMessage)),l},s.toObject=function(r,l){l||(l={});var c={};if(l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.rejectedLogRecords=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.rejectedLogRecords=l.longs===String?"0":0;c.errorMessage=""}return r.rejectedLogRecords!=null&&r.hasOwnProperty("rejectedLogRecords")&&(typeof r.rejectedLogRecords=="number"?c.rejectedLogRecords=l.longs===String?String(r.rejectedLogRecords):r.rejectedLogRecords:c.rejectedLogRecords=l.longs===String?T.Long.prototype.toString.call(r.rejectedLogRecords):l.longs===Number?new T.LongBits(r.rejectedLogRecords.low>>>0,r.rejectedLogRecords.high>>>0).toNumber():r.rejectedLogRecords),r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&(c.errorMessage=r.errorMessage),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},s}(),a}(),i}(),t}(),e.metrics=function(){var t={};return t.v1=function(){var i={};return i.MetricsData=function(){function a(s){if(this.resourceMetrics=[],s)for(var n=Object.keys(s),r=0;r>>3){case 1:{c.resourceMetrics&&c.resourceMetrics.length||(c.resourceMetrics=[]),c.resourceMetrics.push(_.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resourceMetrics!=null&&n.hasOwnProperty("resourceMetrics")){if(!Array.isArray(n.resourceMetrics))return"resourceMetrics: array expected";for(var r=0;r>>3){case 1:{c.resource=_.opentelemetry.proto.resource.v1.Resource.decode(n,n.uint32());break}case 2:{c.scopeMetrics&&c.scopeMetrics.length||(c.scopeMetrics=[]),c.scopeMetrics.push(_.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resource!=null&&n.hasOwnProperty("resource")){var r=_.opentelemetry.proto.resource.v1.Resource.verify(n.resource);if(r)return"resource."+r}if(n.scopeMetrics!=null&&n.hasOwnProperty("scopeMetrics")){if(!Array.isArray(n.scopeMetrics))return"scopeMetrics: array expected";for(var l=0;l>>3){case 1:{c.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(n,n.uint32());break}case 2:{c.metrics&&c.metrics.length||(c.metrics=[]),c.metrics.push(_.opentelemetry.proto.metrics.v1.Metric.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.scope!=null&&n.hasOwnProperty("scope")){var r=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(n.scope);if(r)return"scope."+r}if(n.metrics!=null&&n.hasOwnProperty("metrics")){if(!Array.isArray(n.metrics))return"metrics: array expected";for(var l=0;l>>3){case 1:{u.name=r.string();break}case 2:{u.description=r.string();break}case 3:{u.unit=r.string();break}case 5:{u.gauge=_.opentelemetry.proto.metrics.v1.Gauge.decode(r,r.uint32());break}case 7:{u.sum=_.opentelemetry.proto.metrics.v1.Sum.decode(r,r.uint32());break}case 9:{u.histogram=_.opentelemetry.proto.metrics.v1.Histogram.decode(r,r.uint32());break}case 10:{u.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(r,r.uint32());break}case 11:{u.summary=_.opentelemetry.proto.metrics.v1.Summary.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.name!=null&&r.hasOwnProperty("name")&&!T.isString(r.name))return"name: string expected";if(r.description!=null&&r.hasOwnProperty("description")&&!T.isString(r.description))return"description: string expected";if(r.unit!=null&&r.hasOwnProperty("unit")&&!T.isString(r.unit))return"unit: string expected";if(r.gauge!=null&&r.hasOwnProperty("gauge")){l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Gauge.verify(r.gauge);if(c)return"gauge."+c}}if(r.sum!=null&&r.hasOwnProperty("sum")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Sum.verify(r.sum);if(c)return"sum."+c}}if(r.histogram!=null&&r.hasOwnProperty("histogram")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Histogram.verify(r.histogram);if(c)return"histogram."+c}}if(r.exponentialHistogram!=null&&r.hasOwnProperty("exponentialHistogram")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(r.exponentialHistogram);if(c)return"exponentialHistogram."+c}}if(r.summary!=null&&r.hasOwnProperty("summary")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Summary.verify(r.summary);if(c)return"summary."+c}}return null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.Metric)return r;var l=new _.opentelemetry.proto.metrics.v1.Metric;if(r.name!=null&&(l.name=String(r.name)),r.description!=null&&(l.description=String(r.description)),r.unit!=null&&(l.unit=String(r.unit)),r.gauge!=null){if(typeof r.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");l.gauge=_.opentelemetry.proto.metrics.v1.Gauge.fromObject(r.gauge)}if(r.sum!=null){if(typeof r.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");l.sum=_.opentelemetry.proto.metrics.v1.Sum.fromObject(r.sum)}if(r.histogram!=null){if(typeof r.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");l.histogram=_.opentelemetry.proto.metrics.v1.Histogram.fromObject(r.histogram)}if(r.exponentialHistogram!=null){if(typeof r.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");l.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(r.exponentialHistogram)}if(r.summary!=null){if(typeof r.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");l.summary=_.opentelemetry.proto.metrics.v1.Summary.fromObject(r.summary)}return l},a.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.name="",c.description="",c.unit=""),r.name!=null&&r.hasOwnProperty("name")&&(c.name=r.name),r.description!=null&&r.hasOwnProperty("description")&&(c.description=r.description),r.unit!=null&&r.hasOwnProperty("unit")&&(c.unit=r.unit),r.gauge!=null&&r.hasOwnProperty("gauge")&&(c.gauge=_.opentelemetry.proto.metrics.v1.Gauge.toObject(r.gauge,l),l.oneofs&&(c.data="gauge")),r.sum!=null&&r.hasOwnProperty("sum")&&(c.sum=_.opentelemetry.proto.metrics.v1.Sum.toObject(r.sum,l),l.oneofs&&(c.data="sum")),r.histogram!=null&&r.hasOwnProperty("histogram")&&(c.histogram=_.opentelemetry.proto.metrics.v1.Histogram.toObject(r.histogram,l),l.oneofs&&(c.data="histogram")),r.exponentialHistogram!=null&&r.hasOwnProperty("exponentialHistogram")&&(c.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(r.exponentialHistogram,l),l.oneofs&&(c.data="exponentialHistogram")),r.summary!=null&&r.hasOwnProperty("summary")&&(c.summary=_.opentelemetry.proto.metrics.v1.Summary.toObject(r.summary,l),l.oneofs&&(c.data="summary")),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.Metric"},a}(),i.Gauge=function(){function a(s){if(this.dataPoints=[],s)for(var n=Object.keys(s),r=0;r>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(n,n.uint32()));break}case 2:{c.aggregationTemporality=n.int32();break}case 3:{c.isMonotonic=n.bool();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(n,n.uint32()));break}case 2:{c.aggregationTemporality=n.int32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(n,n.uint32()));break}case 2:{c.aggregationTemporality=n.int32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r>>3){case 7:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.startTimeUnixNano=r.fixed64();break}case 3:{u.timeUnixNano=r.fixed64();break}case 4:{u.asDouble=r.double();break}case 6:{u.asInt=r.sfixed64();break}case 5:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(r,r.uint32()));break}case 8:{u.flags=r.uint32();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var c=0;c>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.asDouble!=null&&(l.asDouble=Number(r.asDouble)),r.asInt!=null&&(T.Long?(l.asInt=T.Long.fromValue(r.asInt)).unsigned=!1:typeof r.asInt=="string"?l.asInt=parseInt(r.asInt,10):typeof r.asInt=="number"?l.asInt=r.asInt:typeof r.asInt=="object"&&(l.asInt=new T.LongBits(r.asInt.low>>>0,r.asInt.high>>>0).toNumber())),r.exemplars){if(!Array.isArray(r.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");l.exemplars=[];for(var c=0;c>>0),l},a.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.exemplars=[],c.attributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.startTimeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.startTimeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;c.flags=0}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&(typeof r.startTimeUnixNano=="number"?c.startTimeUnixNano=l.longs===String?String(r.startTimeUnixNano):r.startTimeUnixNano:c.startTimeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.startTimeUnixNano):l.longs===Number?new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.asDouble!=null&&r.hasOwnProperty("asDouble")&&(c.asDouble=l.json&&!isFinite(r.asDouble)?String(r.asDouble):r.asDouble,l.oneofs&&(c.value="asDouble")),r.exemplars&&r.exemplars.length){c.exemplars=[];for(var E=0;E>>0,r.asInt.high>>>0).toNumber():r.asInt,l.oneofs&&(c.value="asInt")),r.attributes&&r.attributes.length){c.attributes=[];for(var E=0;E>>3){case 9:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.startTimeUnixNano=r.fixed64();break}case 3:{u.timeUnixNano=r.fixed64();break}case 4:{u.count=r.fixed64();break}case 5:{u.sum=r.double();break}case 6:{if(u.bucketCounts&&u.bucketCounts.length||(u.bucketCounts=[]),(E&7)===2)for(var d=r.uint32()+r.pos;r.pos>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.count!=null&&(T.Long?(l.count=T.Long.fromValue(r.count)).unsigned=!1:typeof r.count=="string"?l.count=parseInt(r.count,10):typeof r.count=="number"?l.count=r.count:typeof r.count=="object"&&(l.count=new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber())),r.sum!=null&&(l.sum=Number(r.sum)),r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");l.bucketCounts=[];for(var c=0;c>>0,r.bucketCounts[c].high>>>0).toNumber())}if(r.explicitBounds){if(!Array.isArray(r.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");l.explicitBounds=[];for(var c=0;c>>0),r.min!=null&&(l.min=Number(r.min)),r.max!=null&&(l.max=Number(r.max)),l},a.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.bucketCounts=[],c.explicitBounds=[],c.exemplars=[],c.attributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.startTimeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.startTimeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.count=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.count=l.longs===String?"0":0;c.flags=0}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&(typeof r.startTimeUnixNano=="number"?c.startTimeUnixNano=l.longs===String?String(r.startTimeUnixNano):r.startTimeUnixNano:c.startTimeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.startTimeUnixNano):l.longs===Number?new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.count!=null&&r.hasOwnProperty("count")&&(typeof r.count=="number"?c.count=l.longs===String?String(r.count):r.count:c.count=l.longs===String?T.Long.prototype.toString.call(r.count):l.longs===Number?new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber():r.count),r.sum!=null&&r.hasOwnProperty("sum")&&(c.sum=l.json&&!isFinite(r.sum)?String(r.sum):r.sum,l.oneofs&&(c._sum="sum")),r.bucketCounts&&r.bucketCounts.length){c.bucketCounts=[];for(var E=0;E>>0,r.bucketCounts[E].high>>>0).toNumber():r.bucketCounts[E]}if(r.explicitBounds&&r.explicitBounds.length){c.explicitBounds=[];for(var E=0;E>>3){case 1:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.startTimeUnixNano=r.fixed64();break}case 3:{u.timeUnixNano=r.fixed64();break}case 4:{u.count=r.fixed64();break}case 5:{u.sum=r.double();break}case 6:{u.scale=r.sint32();break}case 7:{u.zeroCount=r.fixed64();break}case 8:{u.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(r,r.uint32());break}case 9:{u.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(r,r.uint32());break}case 10:{u.flags=r.uint32();break}case 11:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(r,r.uint32()));break}case 12:{u.min=r.double();break}case 13:{u.max=r.double();break}case 14:{u.zeroThreshold=r.double();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var c=0;c>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.count!=null&&(T.Long?(l.count=T.Long.fromValue(r.count)).unsigned=!1:typeof r.count=="string"?l.count=parseInt(r.count,10):typeof r.count=="number"?l.count=r.count:typeof r.count=="object"&&(l.count=new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber())),r.sum!=null&&(l.sum=Number(r.sum)),r.scale!=null&&(l.scale=r.scale|0),r.zeroCount!=null&&(T.Long?(l.zeroCount=T.Long.fromValue(r.zeroCount)).unsigned=!1:typeof r.zeroCount=="string"?l.zeroCount=parseInt(r.zeroCount,10):typeof r.zeroCount=="number"?l.zeroCount=r.zeroCount:typeof r.zeroCount=="object"&&(l.zeroCount=new T.LongBits(r.zeroCount.low>>>0,r.zeroCount.high>>>0).toNumber())),r.positive!=null){if(typeof r.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");l.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(r.positive)}if(r.negative!=null){if(typeof r.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");l.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(r.negative)}if(r.flags!=null&&(l.flags=r.flags>>>0),r.exemplars){if(!Array.isArray(r.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");l.exemplars=[];for(var c=0;c>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.count!=null&&r.hasOwnProperty("count")&&(typeof r.count=="number"?c.count=l.longs===String?String(r.count):r.count:c.count=l.longs===String?T.Long.prototype.toString.call(r.count):l.longs===Number?new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber():r.count),r.sum!=null&&r.hasOwnProperty("sum")&&(c.sum=l.json&&!isFinite(r.sum)?String(r.sum):r.sum,l.oneofs&&(c._sum="sum")),r.scale!=null&&r.hasOwnProperty("scale")&&(c.scale=r.scale),r.zeroCount!=null&&r.hasOwnProperty("zeroCount")&&(typeof r.zeroCount=="number"?c.zeroCount=l.longs===String?String(r.zeroCount):r.zeroCount:c.zeroCount=l.longs===String?T.Long.prototype.toString.call(r.zeroCount):l.longs===Number?new T.LongBits(r.zeroCount.low>>>0,r.zeroCount.high>>>0).toNumber():r.zeroCount),r.positive!=null&&r.hasOwnProperty("positive")&&(c.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(r.positive,l)),r.negative!=null&&r.hasOwnProperty("negative")&&(c.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(r.negative,l)),r.flags!=null&&r.hasOwnProperty("flags")&&(c.flags=r.flags),r.exemplars&&r.exemplars.length){c.exemplars=[];for(var E=0;E>>3){case 1:{E.offset=l.sint32();break}case 2:{if(E.bucketCounts&&E.bucketCounts.length||(E.bucketCounts=[]),(d&7)===2)for(var f=l.uint32()+l.pos;l.pos>>0,l.bucketCounts[u].high>>>0).toNumber(!0))}return c},n.toObject=function(l,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.bucketCounts=[]),c.defaults&&(u.offset=0),l.offset!=null&&l.hasOwnProperty("offset")&&(u.offset=l.offset),l.bucketCounts&&l.bucketCounts.length){u.bucketCounts=[];for(var E=0;E>>0,l.bucketCounts[E].high>>>0).toNumber(!0):l.bucketCounts[E]}return u},n.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},n.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},n}(),a}(),i.SummaryDataPoint=function(){function a(s){if(this.attributes=[],this.quantileValues=[],s)for(var n=Object.keys(s),r=0;r>>3){case 7:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{c.startTimeUnixNano=n.fixed64();break}case 3:{c.timeUnixNano=n.fixed64();break}case 4:{c.count=n.fixed64();break}case 5:{c.sum=n.double();break}case 6:{c.quantileValues&&c.quantileValues.length||(c.quantileValues=[]),c.quantileValues.push(_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(n,n.uint32()));break}case 8:{c.flags=n.uint32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(T.Long?(r.timeUnixNano=T.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?r.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?r.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(r.timeUnixNano=new T.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.count!=null&&(T.Long?(r.count=T.Long.fromValue(n.count)).unsigned=!1:typeof n.count=="string"?r.count=parseInt(n.count,10):typeof n.count=="number"?r.count=n.count:typeof n.count=="object"&&(r.count=new T.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber())),n.sum!=null&&(r.sum=Number(n.sum)),n.quantileValues){if(!Array.isArray(n.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");r.quantileValues=[];for(var l=0;l>>0),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.quantileValues=[],l.attributes=[]),r.defaults){if(T.Long){var c=new T.Long(0,0,!1);l.startTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.startTimeUnixNano=r.longs===String?"0":0;if(T.Long){var c=new T.Long(0,0,!1);l.timeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.timeUnixNano=r.longs===String?"0":0;if(T.Long){var c=new T.Long(0,0,!1);l.count=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.count=r.longs===String?"0":0;l.sum=0,l.flags=0}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?l.startTimeUnixNano=r.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:l.startTimeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.startTimeUnixNano):r.longs===Number?new T.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?l.timeUnixNano=r.longs===String?String(n.timeUnixNano):n.timeUnixNano:l.timeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.timeUnixNano):r.longs===Number?new T.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.count!=null&&n.hasOwnProperty("count")&&(typeof n.count=="number"?l.count=r.longs===String?String(n.count):n.count:l.count=r.longs===String?T.Long.prototype.toString.call(n.count):r.longs===Number?new T.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber():n.count),n.sum!=null&&n.hasOwnProperty("sum")&&(l.sum=r.json&&!isFinite(n.sum)?String(n.sum):n.sum),n.quantileValues&&n.quantileValues.length){l.quantileValues=[];for(var u=0;u>>3){case 1:{u.quantile=r.double();break}case 2:{u.value=r.double();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.quantile!=null&&r.hasOwnProperty("quantile")&&typeof r.quantile!="number"?"quantile: number expected":r.value!=null&&r.hasOwnProperty("value")&&typeof r.value!="number"?"value: number expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return r;var l=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return r.quantile!=null&&(l.quantile=Number(r.quantile)),r.value!=null&&(l.value=Number(r.value)),l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.quantile=0,c.value=0),r.quantile!=null&&r.hasOwnProperty("quantile")&&(c.quantile=l.json&&!isFinite(r.quantile)?String(r.quantile):r.quantile),r.value!=null&&r.hasOwnProperty("value")&&(c.value=l.json&&!isFinite(r.value)?String(r.value):r.value),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},s}(),a}(),i.Exemplar=function(){function a(n){if(this.filteredAttributes=[],n)for(var r=Object.keys(n),l=0;l>>3){case 7:{u.filteredAttributes&&u.filteredAttributes.length||(u.filteredAttributes=[]),u.filteredAttributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.timeUnixNano=r.fixed64();break}case 3:{u.asDouble=r.double();break}case 6:{u.asInt=r.sfixed64();break}case 4:{u.spanId=r.bytes();break}case 5:{u.traceId=r.bytes();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.filteredAttributes!=null&&r.hasOwnProperty("filteredAttributes")){if(!Array.isArray(r.filteredAttributes))return"filteredAttributes: array expected";for(var c=0;c>>0,r.timeUnixNano.high>>>0).toNumber())),r.asDouble!=null&&(l.asDouble=Number(r.asDouble)),r.asInt!=null&&(T.Long?(l.asInt=T.Long.fromValue(r.asInt)).unsigned=!1:typeof r.asInt=="string"?l.asInt=parseInt(r.asInt,10):typeof r.asInt=="number"?l.asInt=r.asInt:typeof r.asInt=="object"&&(l.asInt=new T.LongBits(r.asInt.low>>>0,r.asInt.high>>>0).toNumber())),r.spanId!=null&&(typeof r.spanId=="string"?T.base64.decode(r.spanId,l.spanId=T.newBuffer(T.base64.length(r.spanId)),0):r.spanId.length>=0&&(l.spanId=r.spanId)),r.traceId!=null&&(typeof r.traceId=="string"?T.base64.decode(r.traceId,l.traceId=T.newBuffer(T.base64.length(r.traceId)),0):r.traceId.length>=0&&(l.traceId=r.traceId)),l},a.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.filteredAttributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;l.bytes===String?c.spanId="":(c.spanId=[],l.bytes!==Array&&(c.spanId=T.newBuffer(c.spanId))),l.bytes===String?c.traceId="":(c.traceId=[],l.bytes!==Array&&(c.traceId=T.newBuffer(c.traceId)))}if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.asDouble!=null&&r.hasOwnProperty("asDouble")&&(c.asDouble=l.json&&!isFinite(r.asDouble)?String(r.asDouble):r.asDouble,l.oneofs&&(c.value="asDouble")),r.spanId!=null&&r.hasOwnProperty("spanId")&&(c.spanId=l.bytes===String?T.base64.encode(r.spanId,0,r.spanId.length):l.bytes===Array?Array.prototype.slice.call(r.spanId):r.spanId),r.traceId!=null&&r.hasOwnProperty("traceId")&&(c.traceId=l.bytes===String?T.base64.encode(r.traceId,0,r.traceId.length):l.bytes===Array?Array.prototype.slice.call(r.traceId):r.traceId),r.asInt!=null&&r.hasOwnProperty("asInt")&&(typeof r.asInt=="number"?c.asInt=l.longs===String?String(r.asInt):r.asInt:c.asInt=l.longs===String?T.Long.prototype.toString.call(r.asInt):l.longs===Number?new T.LongBits(r.asInt.low>>>0,r.asInt.high>>>0).toNumber():r.asInt,l.oneofs&&(c.value="asInt")),r.filteredAttributes&&r.filteredAttributes.length){c.filteredAttributes=[];for(var E=0;E>>3){case 1:{c.resourceLogs&&c.resourceLogs.length||(c.resourceLogs=[]),c.resourceLogs.push(_.opentelemetry.proto.logs.v1.ResourceLogs.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resourceLogs!=null&&n.hasOwnProperty("resourceLogs")){if(!Array.isArray(n.resourceLogs))return"resourceLogs: array expected";for(var r=0;r>>3){case 1:{c.resource=_.opentelemetry.proto.resource.v1.Resource.decode(n,n.uint32());break}case 2:{c.scopeLogs&&c.scopeLogs.length||(c.scopeLogs=[]),c.scopeLogs.push(_.opentelemetry.proto.logs.v1.ScopeLogs.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resource!=null&&n.hasOwnProperty("resource")){var r=_.opentelemetry.proto.resource.v1.Resource.verify(n.resource);if(r)return"resource."+r}if(n.scopeLogs!=null&&n.hasOwnProperty("scopeLogs")){if(!Array.isArray(n.scopeLogs))return"scopeLogs: array expected";for(var l=0;l>>3){case 1:{c.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(n,n.uint32());break}case 2:{c.logRecords&&c.logRecords.length||(c.logRecords=[]),c.logRecords.push(_.opentelemetry.proto.logs.v1.LogRecord.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.scope!=null&&n.hasOwnProperty("scope")){var r=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(n.scope);if(r)return"scope."+r}if(n.logRecords!=null&&n.hasOwnProperty("logRecords")){if(!Array.isArray(n.logRecords))return"logRecords: array expected";for(var l=0;l>>3){case 1:{c.timeUnixNano=n.fixed64();break}case 11:{c.observedTimeUnixNano=n.fixed64();break}case 2:{c.severityNumber=n.int32();break}case 3:{c.severityText=n.string();break}case 5:{c.body=_.opentelemetry.proto.common.v1.AnyValue.decode(n,n.uint32());break}case 6:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 7:{c.droppedAttributesCount=n.uint32();break}case 8:{c.flags=n.fixed32();break}case 9:{c.traceId=n.bytes();break}case 10:{c.spanId=n.bytes();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&!T.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&T.isInteger(n.timeUnixNano.low)&&T.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.observedTimeUnixNano!=null&&n.hasOwnProperty("observedTimeUnixNano")&&!T.isInteger(n.observedTimeUnixNano)&&!(n.observedTimeUnixNano&&T.isInteger(n.observedTimeUnixNano.low)&&T.isInteger(n.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(n.severityNumber!=null&&n.hasOwnProperty("severityNumber"))switch(n.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(n.severityText!=null&&n.hasOwnProperty("severityText")&&!T.isString(n.severityText))return"severityText: string expected";if(n.body!=null&&n.hasOwnProperty("body")){var r=_.opentelemetry.proto.common.v1.AnyValue.verify(n.body);if(r)return"body."+r}if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var l=0;l>>0,n.timeUnixNano.high>>>0).toNumber())),n.observedTimeUnixNano!=null&&(T.Long?(r.observedTimeUnixNano=T.Long.fromValue(n.observedTimeUnixNano)).unsigned=!1:typeof n.observedTimeUnixNano=="string"?r.observedTimeUnixNano=parseInt(n.observedTimeUnixNano,10):typeof n.observedTimeUnixNano=="number"?r.observedTimeUnixNano=n.observedTimeUnixNano:typeof n.observedTimeUnixNano=="object"&&(r.observedTimeUnixNano=new T.LongBits(n.observedTimeUnixNano.low>>>0,n.observedTimeUnixNano.high>>>0).toNumber())),n.severityNumber){default:if(typeof n.severityNumber=="number"){r.severityNumber=n.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:r.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:r.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:r.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:r.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:r.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:r.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:r.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:r.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:r.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:r.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:r.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:r.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:r.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:r.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:r.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:r.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:r.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:r.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:r.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:r.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:r.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:r.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:r.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:r.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:r.severityNumber=24;break}if(n.severityText!=null&&(r.severityText=String(n.severityText)),n.body!=null){if(typeof n.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");r.body=_.opentelemetry.proto.common.v1.AnyValue.fromObject(n.body)}if(n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");r.attributes=[];for(var l=0;l>>0),n.flags!=null&&(r.flags=n.flags>>>0),n.traceId!=null&&(typeof n.traceId=="string"?T.base64.decode(n.traceId,r.traceId=T.newBuffer(T.base64.length(n.traceId)),0):n.traceId.length>=0&&(r.traceId=n.traceId)),n.spanId!=null&&(typeof n.spanId=="string"?T.base64.decode(n.spanId,r.spanId=T.newBuffer(T.base64.length(n.spanId)),0):n.spanId.length>=0&&(r.spanId=n.spanId)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[]),r.defaults){if(T.Long){var c=new T.Long(0,0,!1);l.timeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.timeUnixNano=r.longs===String?"0":0;if(l.severityNumber=r.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,l.severityText="",l.body=null,l.droppedAttributesCount=0,l.flags=0,r.bytes===String?l.traceId="":(l.traceId=[],r.bytes!==Array&&(l.traceId=T.newBuffer(l.traceId))),r.bytes===String?l.spanId="":(l.spanId=[],r.bytes!==Array&&(l.spanId=T.newBuffer(l.spanId))),T.Long){var c=new T.Long(0,0,!1);l.observedTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.observedTimeUnixNano=r.longs===String?"0":0}if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?l.timeUnixNano=r.longs===String?String(n.timeUnixNano):n.timeUnixNano:l.timeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.timeUnixNano):r.longs===Number?new T.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.severityNumber!=null&&n.hasOwnProperty("severityNumber")&&(l.severityNumber=r.enums===String?_.opentelemetry.proto.logs.v1.SeverityNumber[n.severityNumber]===void 0?n.severityNumber:_.opentelemetry.proto.logs.v1.SeverityNumber[n.severityNumber]:n.severityNumber),n.severityText!=null&&n.hasOwnProperty("severityText")&&(l.severityText=n.severityText),n.body!=null&&n.hasOwnProperty("body")&&(l.body=_.opentelemetry.proto.common.v1.AnyValue.toObject(n.body,r)),n.attributes&&n.attributes.length){l.attributes=[];for(var u=0;u>>0,n.observedTimeUnixNano.high>>>0).toNumber():n.observedTimeUnixNano),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,W.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.logs.v1.LogRecord"},a}(),i}(),t}(),e}(),o}();tI.exports=_});var wo,k6,Y6,F6,K6,q6,W6,p_,nI,d_,oI=S(()=>{wo=fn(rI());a_();s_();l_();k6=wo.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,Y6=wo.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,F6=wo.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,K6=wo.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,q6=wo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,W6=wo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,p_={serializeRequest:o=>{let e=_a(o);return Y6.encode(e).finish()},deserializeResponse:o=>k6.decode(o)},nI={serializeRequest:o=>{let e=Ea([o]);return K6.encode(e).finish()},deserializeResponse:o=>F6.decode(o)},d_={serializeRequest:o=>{let e=Gn(o);return W6.encode(e).finish()},deserializeResponse:o=>q6.decode(o)}});var f_,iI,A_,aI=S(()=>{a_();s_();l_();f_={serializeRequest:o=>{let e=Gn(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:o=>{let e=new TextDecoder;return JSON.parse(e.decode(o))}},iI={serializeRequest:o=>{let e=Ea([o],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:o=>{let e=new TextDecoder;return JSON.parse(e.decode(o))}},A_={serializeRequest:o=>{let e=_a(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:o=>{let e=new TextDecoder;return JSON.parse(e.decode(o))}}});var Df={};Me(Df,{ESpanKind:()=>r_,JsonLogsSerializer:()=>A_,JsonMetricsSerializer:()=>iI,JsonTraceSerializer:()=>f_,ProtobufLogsSerializer:()=>p_,ProtobufMetricsSerializer:()=>nI,ProtobufTraceSerializer:()=>d_,createExportLogsServiceRequest:()=>_a,createExportMetricsServiceRequest:()=>Ea,createExportTraceServiceRequest:()=>Gn,encodeAsLongBits:()=>t_,encodeAsString:()=>pf,getOtlpEncoder:()=>Bn,hrTimeToNanos:()=>e_,toLongBits:()=>Sf});var Yn=S(()=>{Rl();ny();a_();s_();l_();oI();aI()});var sI,lI=S(()=>{sI="0.56.0"});function cI(o){var e=[429,502,503,504];return e.includes(o)}function uI(o){if(o!=null){var e=Number.parseInt(o,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var t=new Date(o).getTime()-Date.now();return t>=0?t:0}}var EI=S(()=>{});var SI={};Me(SI,{compressAndSend:()=>TI,createHttpAgent:()=>X6,sendWithHttp:()=>z6});import*as h_ from"http";import*as v_ from"https";import*as _I from"zlib";import{Readable as j6}from"stream";function z6(o,e,t,i,a){var s=new URL(o.url),n=Number(process.versions.node.split(".")[0]),r={hostname:s.hostname,port:s.port,path:s.pathname,method:"POST",headers:xf({},o.headers()),agent:e},l=s.protocol==="http:"?h_.request:v_.request,c=l(r,function(E){var d=[];E.on("data",function(f){return d.push(f)}),E.on("end",function(){if(E.statusCode&&E.statusCode<299)i({status:"success",data:Buffer.concat(d)});else if(E.statusCode&&cI(E.statusCode))i({status:"retryable",retryInMillis:uI(E.headers["retry-after"])});else{var f=new Uo(E.statusMessage,E.statusCode,Buffer.concat(d).toString());i({status:"failure",error:f})}})});c.setTimeout(a,function(){c.destroy(),i({status:"failure",error:new Error("Request Timeout")})}),c.on("error",function(E){i({status:"failure",error:E})});var u=n>=14?"close":"abort";c.on(u,function(){i({status:"failure",error:new Error("Request timed out")})}),TI(c,o.compression,t,function(E){i({status:"failure",error:E})})}function TI(o,e,t,i){var a=$6(t);e==="gzip"&&(o.setHeader("Content-Encoding","gzip"),a=a.on("error",i).pipe(_I.createGzip()).on("error",i)),a.pipe(o).on("error",i)}function $6(o){var e=new j6;return e.push(o),e.push(null),e}function X6(o,e){var t=new URL(o),i=t.protocol==="http:"?h_.Agent:v_.Agent;return new i(e)}var xf,pI=S(()=>{EI();jE();xf=function(){return xf=Object.assign||function(o){for(var e,t=1,i=arguments.length;t{J6=function(o,e,t,i){function a(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function r(u){try{c(i.next(u))}catch(E){n(E)}}function l(u){try{c(i.throw(u))}catch(E){n(E)}}function c(u){u.done?s(u.value):a(u.value).then(r,l)}c((i=i.apply(o,e||[])).next())})},Q6=function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,n;return n={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function r(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,a&&(s=c[0]&2?a.return:c[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,c[1])).done)return s;switch(a=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,a=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]{ej=function(o,e,t,i){function a(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function r(u){try{c(i.next(u))}catch(E){n(E)}}function l(u){try{c(i.throw(u))}catch(E){n(E)}}function c(u){u.done?s(u.value):a(u.value).then(r,l)}c((i=i.apply(o,e||[])).next())})},tj=function(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,n;return n={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function r(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,a&&(s=c[0]&2?a.return:c[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,c[1])).done)return s;switch(a=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,a=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0?(n--,l=Math.max(Math.min(r,oj)+aj(),0),r=r*ij,c=(i=s.retryInMillis)!==null&&i!==void 0?i:l,u=a-Date.now(),c>u?[2,s]:[4,this.retry(e,u,c)]):[3,4];case 3:return s=E.sent(),[3,2];case 4:return[2,s]}})})},o.prototype.shutdown=function(){return this._transport.shutdown()},o}()});function Dr(o,e){return ZE({transport:hI({transport:dI(o)}),serializer:e,promiseHandler:QE(o)},{timeout:o.timeoutMillis})}var RI=S(()=>{Tf();fI();_f();vI()});function mI(o){var e,t=(e=process.env[o])===null||e===void 0?void 0:e.trim();if(t!=null&&t!==""){var i=Number(t);if(!Number.isNaN(i)&&Number.isFinite(i)&&i>0)return i;m.warn("Configuration: "+o+" is invalid, expected number greater than 0 (actual: "+t+")")}}function lj(o){var e=mI("OTEL_EXPORTER_OTLP_"+o+"_TIMEOUT"),t=mI("OTEL_EXPORTER_OTLP_TIMEOUT");return e??t}function OI(o){var e,t=(e=process.env[o])===null||e===void 0?void 0:e.trim();if(t!==""){if(t==null||t==="none"||t==="gzip")return t;m.warn("Configuration: "+o+" is invalid, expected 'none' or 'gzip' (actual: '"+t+"')")}}function cj(o){var e=OI("OTEL_EXPORTER_OTLP_"+o+"_COMPRESSION"),t=OI("OTEL_EXPORTER_OTLP_COMPRESSION");return e??t}function R_(o){return{timeoutMillis:lj(o),compression:cj(o)}}var Uf=S(()=>{x()});function NI(o){return function(){var e,t={};return Object.entries((e=o==null?void 0:o())!==null&&e!==void 0?e:{}).forEach(function(i){var a=uj(i,2),s=a[0],n=a[1];typeof n<"u"?t[s]=String(n):m.warn('Header "'+s+'" has invalid value ('+n+") and will be ignored")}),t}}var uj,MI=S(()=>{x();uj=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s}});function Ej(o,e,t){var i=Bo({},t()),a={};return function(){return e!=null&&Object.assign(a,e()),o!=null&&Object.assign(a,o()),Object.assign(a,i)}}function _j(o){if(o!=null)try{return new URL(o),o}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+o+"'")}}function CI(o,e,t){var i,a,s,n;return Bo(Bo({},$E(o,e,t)),{headers:Ej(NI(o.headers),e.headers,t.headers),url:(a=(i=_j(o.url))!==null&&i!==void 0?i:e.url)!==null&&a!==void 0?a:t.url,agentOptions:(n=(s=o.agentOptions)!==null&&s!==void 0?s:e.agentOptions)!==null&&n!==void 0?n:t.agentOptions})}function PI(o,e){return Bo(Bo({},XE()),{headers:function(){return o},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}var Bo,gI=S(()=>{hl();MI();Bo=function(){return Bo=Object.assign||function(o){for(var e,t=1,i=arguments.length;t{ee();x();Uf();hl();m_=function(){return m_=Object.assign||function(o){for(var e,t=1,i=arguments.length;t{gI();yI();x();hl()});var DI={};Me(DI,{convertLegacyHttpOptions:()=>xr,createOtlpHttpExportDelegate:()=>Dr,getSharedConfigurationFromEnvironment:()=>R_});var Sa=S(()=>{RI();Uf();II()});var pa,xI=S(()=>{an();Yn();lI();Sa();pa=class extends gr{constructor(e={}){super(Dr(xr(e,"LOGS","v1/logs",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${sI}`,"Content-Type":"application/json"}),A_))}}});var UI=S(()=>{xI()});var bI=S(()=>{UI()});var VI={};Me(VI,{OTLPLogExporter:()=>pa});var wI=S(()=>{bI()});var fe=A(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=zt.DEFAULT_MAX_SEND_MESSAGE_LENGTH=zt.Propagate=zt.LogVerbosity=zt.Status=void 0;var BI;(function(o){o[o.OK=0]="OK",o[o.CANCELLED=1]="CANCELLED",o[o.UNKNOWN=2]="UNKNOWN",o[o.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",o[o.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",o[o.NOT_FOUND=5]="NOT_FOUND",o[o.ALREADY_EXISTS=6]="ALREADY_EXISTS",o[o.PERMISSION_DENIED=7]="PERMISSION_DENIED",o[o.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",o[o.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",o[o.ABORTED=10]="ABORTED",o[o.OUT_OF_RANGE=11]="OUT_OF_RANGE",o[o.UNIMPLEMENTED=12]="UNIMPLEMENTED",o[o.INTERNAL=13]="INTERNAL",o[o.UNAVAILABLE=14]="UNAVAILABLE",o[o.DATA_LOSS=15]="DATA_LOSS",o[o.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(BI||(zt.Status=BI={}));var GI;(function(o){o[o.DEBUG=0]="DEBUG",o[o.INFO=1]="INFO",o[o.ERROR=2]="ERROR",o[o.NONE=3]="NONE"})(GI||(zt.LogVerbosity=GI={}));var HI;(function(o){o[o.DEADLINE=1]="DEADLINE",o[o.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",o[o.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",o[o.CANCELLATION=8]="CANCELLATION",o[o.DEFAULTS=65535]="DEFAULTS"})(HI||(zt.Propagate=HI={}));zt.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;zt.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4*1024*1024});var bf=A((cCe,hj)=>{hj.exports={name:"@grpc/grpc-js",version:"1.10.9",description:"gRPC Library for Node - pure JS implementation",homepage:"https://grpc.io/",repository:"https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",main:"build/src/index.js",engines:{node:">=12.10.0"},keywords:[],author:{name:"Google Inc."},types:"build/src/index.d.ts",license:"Apache-2.0",devDependencies:{"@types/gulp":"^4.0.17","@types/gulp-mocha":"0.0.37","@types/lodash":"^4.14.202","@types/mocha":"^10.0.6","@types/ncp":"^2.0.8","@types/node":">=20.11.20","@types/pify":"^5.0.4","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/typescript-estree":"^7.1.0","clang-format":"^1.8.0",eslint:"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1",execa:"^2.0.3",gulp:"^4.0.2","gulp-mocha":"^6.0.0",lodash:"^4.17.21",madge:"^5.0.1","mocha-jenkins-reporter":"^0.4.1",ncp:"^2.0.0",pify:"^4.0.1",prettier:"^2.8.8",rimraf:"^3.0.2",semver:"^7.6.0","ts-node":"^10.9.2",typescript:"^5.3.3"},contributors:[{name:"Google Inc."}],scripts:{build:"npm run compile",clean:"rimraf ./build",compile:"tsc -p .",format:'clang-format -i -style="{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}" src/*.ts test/*.ts',lint:"eslint src/*.ts test/*.ts",prepare:"npm run generate-types && npm run compile",test:"gulp test",check:"npm run lint",fix:"eslint --fix src/*.ts test/*.ts",pretest:"npm run generate-types && npm run generate-test-types && npm run compile",posttest:"npm run check && madge -c ./build/src","generate-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs test/fixtures/ -O src/generated/ --grpcLib ../index channelz.proto","generate-test-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto"},dependencies:{"@grpc/proto-loader":"^0.7.13","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/*.proto","LICENSE","deps/envoy-api/envoy/api/v2/**/*.proto","deps/envoy-api/envoy/config/**/*.proto","deps/envoy-api/envoy/service/**/*.proto","deps/envoy-api/envoy/type/**/*.proto","deps/udpa/udpa/**/*.proto","deps/googleapis/google/api/*.proto","deps/googleapis/google/rpc/*.proto","deps/protoc-gen-validate/validate/**/*.proto"]}});var Ie=A(At=>{"use strict";var Vf,wf,Bf,Gf;Object.defineProperty(At,"__esModule",{value:!0});At.isTracerEnabled=At.trace=At.log=At.setLoggerVerbosity=At.setLogger=At.getLogger=void 0;var Fn=fe(),vj=H("process"),Rj=bf().version,mj={error:(o,...e)=>{console.error("E "+o,...e)},info:(o,...e)=>{console.error("I "+o,...e)},debug:(o,...e)=>{console.error("D "+o,...e)}},Go=mj,da=Fn.LogVerbosity.ERROR,Oj=(wf=(Vf=process.env.GRPC_NODE_VERBOSITY)!==null&&Vf!==void 0?Vf:process.env.GRPC_VERBOSITY)!==null&&wf!==void 0?wf:"";switch(Oj.toUpperCase()){case"DEBUG":da=Fn.LogVerbosity.DEBUG;break;case"INFO":da=Fn.LogVerbosity.INFO;break;case"ERROR":da=Fn.LogVerbosity.ERROR;break;case"NONE":da=Fn.LogVerbosity.NONE;break;default:}var Nj=()=>Go;At.getLogger=Nj;var Mj=o=>{Go=o};At.setLogger=Mj;var Cj=o=>{da=o};At.setLoggerVerbosity=Cj;var Pj=(o,...e)=>{let t;if(o>=da){switch(o){case Fn.LogVerbosity.DEBUG:t=Go.debug;break;case Fn.LogVerbosity.INFO:t=Go.info;break;case Fn.LogVerbosity.ERROR:t=Go.error;break}t||(t=Go.error),t&&t.bind(Go)(...e)}};At.log=Pj;var gj=(Gf=(Bf=process.env.GRPC_NODE_TRACE)!==null&&Bf!==void 0?Bf:process.env.GRPC_TRACE)!==null&&Gf!==void 0?Gf:"",Hf=new Set,kI=new Set;for(let o of gj.split(","))o.startsWith("-")?kI.add(o.substring(1)):Hf.add(o);var Lj=Hf.has("all");function yj(o,e,t){YI(e)&&(0,At.log)(o,new Date().toISOString()+" | v"+Rj+" "+vj.pid+" | "+e+" | "+t)}At.trace=yj;function YI(o){return!kI.has(o)&&(Lj||Hf.has(o))}At.isTracerEnabled=YI});var O_=A(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.getErrorCode=fa.getErrorMessage=void 0;function Ij(o){return o instanceof Error?o.message:String(o)}fa.getErrorMessage=Ij;function Dj(o){return typeof o=="object"&&o!==null&&"code"in o&&typeof o.code=="number"?o.code:null}fa.getErrorCode=Dj});var ht=A(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.Metadata=void 0;var xj=Ie(),Uj=fe(),bj=O_(),Vj=/^[0-9a-z_.-]+$/,wj=/^[ -~]*$/;function Bj(o){return Vj.test(o)}function Gj(o){return wj.test(o)}function KI(o){return o.endsWith("-bin")}function Hj(o){return!o.startsWith("grpc-")}function N_(o){return o.toLowerCase()}function FI(o,e){if(!Bj(o))throw new Error('Metadata key "'+o+'" contains illegal characters');if(e!=null)if(KI(o)){if(!Buffer.isBuffer(e))throw new Error("keys that end with '-bin' must have Buffer values")}else{if(Buffer.isBuffer(e))throw new Error("keys that don't end with '-bin' must have String values");if(!Gj(e))throw new Error('Metadata string value "'+e+'" contains illegal characters')}}var kf=class o{constructor(e={}){this.internalRepr=new Map,this.options=e}set(e,t){e=N_(e),FI(e,t),this.internalRepr.set(e,[t])}add(e,t){e=N_(e),FI(e,t);let i=this.internalRepr.get(e);i===void 0?this.internalRepr.set(e,[t]):i.push(t)}remove(e){e=N_(e),this.internalRepr.delete(e)}get(e){return e=N_(e),this.internalRepr.get(e)||[]}getMap(){let e={};for(let[t,i]of this.internalRepr)if(i.length>0){let a=i[0];e[t]=Buffer.isBuffer(a)?Buffer.from(a):a}return e}clone(){let e=new o(this.options),t=e.internalRepr;for(let[i,a]of this.internalRepr){let s=a.map(n=>Buffer.isBuffer(n)?Buffer.from(n):n);t.set(i,s)}return e}merge(e){for(let[t,i]of e.internalRepr){let a=(this.internalRepr.get(t)||[]).concat(i);this.internalRepr.set(t,a)}}setOptions(e){this.options=e}getOptions(){return this.options}toHttp2Headers(){let e={};for(let[t,i]of this.internalRepr)e[t]=i.map(kj);return e}toJSON(){let e={};for(let[t,i]of this.internalRepr)e[t]=i;return e}static fromHttp2Headers(e){let t=new o;for(let i of Object.keys(e)){if(i.charAt(0)===":")continue;let a=e[i];try{KI(i)?Array.isArray(a)?a.forEach(s=>{t.add(i,Buffer.from(s,"base64"))}):a!==void 0&&(Hj(i)?a.split(",").forEach(s=>{t.add(i,Buffer.from(s.trim(),"base64"))}):t.add(i,Buffer.from(a,"base64"))):Array.isArray(a)?a.forEach(s=>{t.add(i,s)}):a!==void 0&&t.add(i,a)}catch(s){let n=`Failed to add metadata entry ${i}: ${a}. ${(0,bj.getErrorMessage)(s)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,xj.log)(Uj.LogVerbosity.ERROR,n)}}return t}};M_.Metadata=kf;var kj=o=>Buffer.isBuffer(o)?o.toString("base64"):o});var Wf=A(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});C_.CallCredentials=void 0;var qf=ht();function Yj(o){return"getRequestHeaders"in o&&typeof o.getRequestHeaders=="function"}var Aa=class o{static createFromMetadataGenerator(e){return new Ff(e)}static createFromGoogleCredential(e){return o.createFromMetadataGenerator((t,i)=>{let a;Yj(e)?a=e.getRequestHeaders(t.service_url):a=new Promise((s,n)=>{e.getRequestMetadata(t.service_url,(r,l)=>{if(r){n(r);return}if(!l){n(new Error("Headers not set by metadata plugin"));return}s(l)})}),a.then(s=>{let n=new qf.Metadata;for(let r of Object.keys(s))n.add(r,s[r]);i(null,n)},s=>{i(s)})})}static createEmpty(){return new Kf}};C_.CallCredentials=Aa;var Yf=class o extends Aa{constructor(e){super(),this.creds=e}async generateMetadata(e){let t=new qf.Metadata,i=await Promise.all(this.creds.map(a=>a.generateMetadata(e)));for(let a of i)t.merge(a);return t}compose(e){return new o(this.creds.concat([e]))}_equals(e){return this===e?!0:e instanceof o?this.creds.every((t,i)=>t._equals(e.creds[i])):!1}},Ff=class o extends Aa{constructor(e){super(),this.metadataGenerator=e}generateMetadata(e){return new Promise((t,i)=>{this.metadataGenerator(e,(a,s)=>{s!==void 0?t(s):i(a)})})}compose(e){return new Yf([this,e])}_equals(e){return this===e?!0:e instanceof o?this.metadataGenerator===e.metadataGenerator:!1}},Kf=class o extends Aa{generateMetadata(e){return Promise.resolve(new qf.Metadata)}compose(e){return e}_equals(e){return e instanceof o}}});var zf=A(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.getDefaultRootsData=ha.CIPHER_SUITES=void 0;var Fj=H("fs");ha.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var qI=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,jf=null;function Kj(){return qI?(jf===null&&(jf=Fj.readFileSync(qI)),jf):null}ha.getDefaultRootsData=Kj});var L_=A(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});g_.ChannelCredentials=void 0;var qj=H("tls"),Wj=Wf(),WI=zf();function $f(o,e){if(o&&!(o instanceof Buffer))throw new TypeError(`${e}, if provided, must be a Buffer.`)}var va=class{constructor(e){this.callCredentials=e||Wj.CallCredentials.createEmpty()}_getCallCredentials(){return this.callCredentials}static createSsl(e,t,i,a){var s;if($f(e,"Root certificate"),$f(t,"Private key"),$f(i,"Certificate chain"),t&&!i)throw new Error("Private key must be given with accompanying certificate chain");if(!t&&i)throw new Error("Certificate chain must be given with accompanying private key");let n=(0,qj.createSecureContext)({ca:(s=e??(0,WI.getDefaultRootsData)())!==null&&s!==void 0?s:void 0,key:t??void 0,cert:i??void 0,ciphers:WI.CIPHER_SUITES});return new P_(n,a??{})}static createFromSecureContext(e,t){return new P_(e,t??{})}static createInsecure(){return new Xf}};g_.ChannelCredentials=va;var Xf=class o extends va{constructor(){super()}compose(e){throw new Error("Cannot compose insecure credentials")}_getConnectionOptions(){return null}_isSecure(){return!1}_equals(e){return e instanceof o}},P_=class o extends va{constructor(e,t){super(),this.secureContext=e,this.verifyOptions=t,this.connectionOptions={secureContext:e},t!=null&&t.checkServerIdentity&&(this.connectionOptions.checkServerIdentity=t.checkServerIdentity)}compose(e){let t=this.callCredentials.compose(e);return new Jf(this,t)}_getConnectionOptions(){return Object.assign({},this.connectionOptions)}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof o?this.secureContext===e.secureContext&&this.verifyOptions.checkServerIdentity===e.verifyOptions.checkServerIdentity:!1}},Jf=class o extends va{constructor(e,t){super(t),this.channelCredentials=e}compose(e){let t=this.callCredentials.compose(e);return new o(this.channelCredentials,t)}_getConnectionOptions(){return this.channelCredentials._getConnectionOptions()}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof o?this.channelCredentials._equals(e.channelCredentials)&&this.callCredentials._equals(e.callCredentials):!1}}});var Ho=A($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.selectLbConfigFromList=$e.getDefaultConfig=$e.parseLoadBalancingConfig=$e.isLoadBalancerNameRegistered=$e.createLoadBalancer=$e.registerDefaultLoadBalancerType=$e.registerLoadBalancerType=$e.createChildChannelControlHelper=void 0;var jj=Ie(),zj=fe();function $j(o,e){var t,i,a,s,n,r,l,c,u,E;return{createSubchannel:(i=(t=e.createSubchannel)===null||t===void 0?void 0:t.bind(e))!==null&&i!==void 0?i:o.createSubchannel.bind(o),updateState:(s=(a=e.updateState)===null||a===void 0?void 0:a.bind(e))!==null&&s!==void 0?s:o.updateState.bind(o),requestReresolution:(r=(n=e.requestReresolution)===null||n===void 0?void 0:n.bind(e))!==null&&r!==void 0?r:o.requestReresolution.bind(o),addChannelzChild:(c=(l=e.addChannelzChild)===null||l===void 0?void 0:l.bind(e))!==null&&c!==void 0?c:o.addChannelzChild.bind(o),removeChannelzChild:(E=(u=e.removeChannelzChild)===null||u===void 0?void 0:u.bind(e))!==null&&E!==void 0?E:o.removeChannelzChild.bind(o)}}$e.createChildChannelControlHelper=$j;var Kn={},Ml=null;function Xj(o,e,t){Kn[o]={LoadBalancer:e,LoadBalancingConfig:t}}$e.registerLoadBalancerType=Xj;function Jj(o){Ml=o}$e.registerDefaultLoadBalancerType=Jj;function Qj(o,e,t){let i=o.getLoadBalancerName();return i in Kn?new Kn[i].LoadBalancer(e,t):null}$e.createLoadBalancer=Qj;function Zj(o){return o in Kn}$e.isLoadBalancerNameRegistered=Zj;function jI(o){let e=Object.keys(o);if(e.length!==1)throw new Error("Provided load balancing config has multiple conflicting entries");let t=e[0];if(t in Kn)try{return Kn[t].LoadBalancingConfig.createFromJson(o[t])}catch(i){throw new Error(`${t}: ${i.message}`)}else throw new Error(`Unrecognized load balancing config name ${t}`)}$e.parseLoadBalancingConfig=jI;function e8(){if(!Ml)throw new Error("No default load balancer type registered");return new Kn[Ml].LoadBalancingConfig}$e.getDefaultConfig=e8;function t8(o,e=!1){for(let t of o)try{return jI(t)}catch(i){(0,jj.log)(zj.LogVerbosity.DEBUG,"Config parsing failed with error",i.message);continue}return e&&Ml?new Kn[Ml].LoadBalancingConfig:null}$e.selectLbConfigFromList=t8});var Qf=A(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.extractAndSelectServiceConfig=qn.validateServiceConfig=qn.validateRetryThrottling=void 0;var r8=H("os"),y_=fe(),I_=/^\d+(\.\d{1,9})?s$/,n8="node";function o8(o){if("service"in o&&o.service!==""){if(typeof o.service!="string")throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof o.service}`);if("method"in o&&o.method!==""){if(typeof o.method!="string")throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof o.service}`);return{service:o.service,method:o.method}}else return{service:o.service}}else{if("method"in o&&o.method!==void 0)throw new Error("Invalid method config name: method set with empty or unset service");return{}}}function i8(o){if(!("maxAttempts"in o)||!Number.isInteger(o.maxAttempts)||o.maxAttempts<2)throw new Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in o)||typeof o.initialBackoff!="string"||!I_.test(o.initialBackoff))throw new Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer followed by s");if(!("maxBackoff"in o)||typeof o.maxBackoff!="string"||!I_.test(o.maxBackoff))throw new Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer followed by s");if(!("backoffMultiplier"in o)||typeof o.backoffMultiplier!="number"||o.backoffMultiplier<=0)throw new Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!("retryableStatusCodes"in o&&Array.isArray(o.retryableStatusCodes)))throw new Error("Invalid method config retry policy: retryableStatusCodes is required");if(o.retryableStatusCodes.length===0)throw new Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let e of o.retryableStatusCodes)if(typeof e=="number"){if(!Object.values(y_.Status).includes(e))throw new Error("Invalid method config retry policy: retryableStatusCodes value not in status code range")}else if(typeof e=="string"){if(!Object.values(y_.Status).includes(e.toUpperCase()))throw new Error("Invalid method config retry policy: retryableStatusCodes value not a status code name")}else throw new Error("Invalid method config retry policy: retryableStatusCodes value must be a string or number");return{maxAttempts:o.maxAttempts,initialBackoff:o.initialBackoff,maxBackoff:o.maxBackoff,backoffMultiplier:o.backoffMultiplier,retryableStatusCodes:o.retryableStatusCodes}}function a8(o){if(!("maxAttempts"in o)||!Number.isInteger(o.maxAttempts)||o.maxAttempts<2)throw new Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in o&&(typeof o.hedgingDelay!="string"||!I_.test(o.hedgingDelay)))throw new Error("Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s");if("nonFatalStatusCodes"in o&&Array.isArray(o.nonFatalStatusCodes))for(let t of o.nonFatalStatusCodes)if(typeof t=="number"){if(!Object.values(y_.Status).includes(t))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof t=="string"){if(!Object.values(y_.Status).includes(t.toUpperCase()))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value must be a string or number");let e={maxAttempts:o.maxAttempts};return o.hedgingDelay&&(e.hedgingDelay=o.hedgingDelay),o.nonFatalStatusCodes&&(e.nonFatalStatusCodes=o.nonFatalStatusCodes),e}function s8(o){var e;let t={name:[]};if(!("name"in o)||!Array.isArray(o.name))throw new Error("Invalid method config: invalid name array");for(let i of o.name)t.name.push(o8(i));if("waitForReady"in o){if(typeof o.waitForReady!="boolean")throw new Error("Invalid method config: invalid waitForReady");t.waitForReady=o.waitForReady}if("timeout"in o)if(typeof o.timeout=="object"){if(!("seconds"in o.timeout)||typeof o.timeout.seconds!="number")throw new Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in o.timeout)||typeof o.timeout.nanos!="number")throw new Error("Invalid method config: invalid timeout.nanos");t.timeout=o.timeout}else if(typeof o.timeout=="string"&&I_.test(o.timeout)){let i=o.timeout.substring(0,o.timeout.length-1).split(".");t.timeout={seconds:i[0]|0,nanos:((e=i[1])!==null&&e!==void 0?e:0)|0}}else throw new Error("Invalid method config: invalid timeout");if("maxRequestBytes"in o){if(typeof o.maxRequestBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");t.maxRequestBytes=o.maxRequestBytes}if("maxResponseBytes"in o){if(typeof o.maxResponseBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");t.maxResponseBytes=o.maxResponseBytes}if("retryPolicy"in o){if("hedgingPolicy"in o)throw new Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");t.retryPolicy=i8(o.retryPolicy)}else"hedgingPolicy"in o&&(t.hedgingPolicy=a8(o.hedgingPolicy));return t}function zI(o){if(!("maxTokens"in o)||typeof o.maxTokens!="number"||o.maxTokens<=0||o.maxTokens>1e3)throw new Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in o)||typeof o.tokenRatio!="number"||o.tokenRatio<=0)throw new Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+o.maxTokens.toFixed(3),tokenRatio:+o.tokenRatio.toFixed(3)}}qn.validateRetryThrottling=zI;function l8(o){if(!(typeof o=="object"&&o!==null))throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof o}`);let e=Object.keys(o);if(e.length>1)throw new Error(`Invalid loadBalancingConfig: unexpected multiple keys ${e}`);if(e.length===0)throw new Error("Invalid loadBalancingConfig: load balancing policy name required");return{[e[0]]:o[e[0]]}}function $I(o){let e={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in o)if(typeof o.loadBalancingPolicy=="string")e.loadBalancingPolicy=o.loadBalancingPolicy;else throw new Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in o)if(Array.isArray(o.loadBalancingConfig))for(let i of o.loadBalancingConfig)e.loadBalancingConfig.push(l8(i));else throw new Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in o&&Array.isArray(o.methodConfig))for(let i of o.methodConfig)e.methodConfig.push(s8(i));"retryThrottling"in o&&(e.retryThrottling=zI(o.retryThrottling));let t=[];for(let i of e.methodConfig)for(let a of i.name){for(let s of t)if(a.service===s.service&&a.method===s.method)throw new Error(`Invalid service config: duplicate name ${a.service}/${a.method}`);t.push(a)}return e}qn.validateServiceConfig=$I;function c8(o){if(!("serviceConfig"in o))throw new Error("Invalid service config choice: missing service config");let e={serviceConfig:$I(o.serviceConfig)};if("clientLanguage"in o)if(Array.isArray(o.clientLanguage)){e.clientLanguage=[];for(let i of o.clientLanguage)if(typeof i=="string")e.clientLanguage.push(i);else throw new Error("Invalid service config choice: invalid clientLanguage")}else throw new Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in o)if(Array.isArray(o.clientHostname)){e.clientHostname=[];for(let i of o.clientHostname)if(typeof i=="string")e.clientHostname.push(i);else throw new Error("Invalid service config choice: invalid clientHostname")}else throw new Error("Invalid service config choice: invalid clientHostname");if("percentage"in o)if(typeof o.percentage=="number"&&0<=o.percentage&&o.percentage<=100)e.percentage=o.percentage;else throw new Error("Invalid service config choice: invalid percentage");let t=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let i in o)if(!t.includes(i))throw new Error(`Invalid service config choice: unexpected field ${i}`);return e}function u8(o,e){if(!Array.isArray(o))throw new Error("Invalid service config list");for(let t of o){let i=c8(t);if(!(typeof i.percentage=="number"&&e>i.percentage)){if(Array.isArray(i.clientHostname)){let a=!1;for(let s of i.clientHostname)s===r8.hostname()&&(a=!0);if(!a)continue}if(Array.isArray(i.clientLanguage)){let a=!1;for(let s of i.clientLanguage)s===n8&&(a=!0);if(!a)continue}return i.serviceConfig}}throw new Error("No matching service config found")}function E8(o,e){for(let t of o)if(t.length>0&&t[0].startsWith("grpc_config=")){let i=t.join("").substring(12),a=JSON.parse(i);return u8(a,e)}return null}qn.extractAndSelectServiceConfig=E8});var $t=A(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});D_.ConnectivityState=void 0;var XI;(function(o){o[o.IDLE=0]="IDLE",o[o.CONNECTING=1]="CONNECTING",o[o.READY=2]="READY",o[o.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",o[o.SHUTDOWN=4]="SHUTDOWN"})(XI||(D_.ConnectivityState=XI={}))});var Ut=A(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.uriToString=Ur.combineHostPort=Ur.splitHostPort=Ur.parseUri=void 0;var _8=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function T8(o){let e=_8.exec(o);return e===null?null:{scheme:e[1],authority:e[2],path:e[3]}}Ur.parseUri=T8;var JI=/^\d+$/;function S8(o){if(o.startsWith("[")){let e=o.indexOf("]");if(e===-1)return null;let t=o.substring(1,e);if(t.indexOf(":")===-1)return null;if(o.length>e+1)if(o[e+1]===":"){let i=o.substring(e+2);return JI.test(i)?{host:t,port:+i}:null}else return null;else return{host:t}}else{let e=o.split(":");return e.length===2?JI.test(e[1])?{host:e[0],port:+e[1]}:null:{host:o}}}Ur.splitHostPort=S8;function p8(o){return o.port===void 0?o.host:o.host.includes(":")?`[${o.host}]:${o.port}`:`${o.host}:${o.port}`}Ur.combineHostPort=p8;function d8(o){let e="";return o.scheme!==void 0&&(e+=o.scheme+":"),o.authority!==void 0&&(e+="//"+o.authority+"/"),e+=o.path,e}Ur.uriToString=d8});var br=A(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.mapUriDefaultScheme=Xt.getDefaultAuthority=Xt.createResolver=Xt.registerDefaultScheme=Xt.registerResolver=void 0;var eA=Ut(),Ra={},Zf=null;function f8(o,e){Ra[o]=e}Xt.registerResolver=f8;function A8(o){Zf=o}Xt.registerDefaultScheme=A8;function h8(o,e,t){if(o.scheme!==void 0&&o.scheme in Ra)return new Ra[o.scheme](o,e,t);throw new Error(`No resolver could be created for target ${(0,eA.uriToString)(o)}`)}Xt.createResolver=h8;function v8(o){if(o.scheme!==void 0&&o.scheme in Ra)return Ra[o.scheme].getDefaultAuthority(o);throw new Error(`Invalid target ${(0,eA.uriToString)(o)}`)}Xt.getDefaultAuthority=v8;function R8(o){return o.scheme===void 0||!(o.scheme in Ra)?Zf!==null?{scheme:Zf,authority:void 0,path:(0,eA.uriToString)(o)}:null:o}Xt.mapUriDefaultScheme=R8});var jn=A(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.QueuePicker=Wn.UnavailablePicker=Wn.PickResultType=void 0;var m8=ht(),O8=fe(),x_;(function(o){o[o.COMPLETE=0]="COMPLETE",o[o.QUEUE=1]="QUEUE",o[o.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",o[o.DROP=3]="DROP"})(x_||(Wn.PickResultType=x_={}));var tA=class{constructor(e){this.status=Object.assign({code:O8.Status.UNAVAILABLE,details:"No connection established",metadata:new m8.Metadata},e)}pick(e){return{pickResultType:x_.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}};Wn.UnavailablePicker=tA;var rA=class{constructor(e,t){this.loadBalancer=e,this.childPicker=t,this.calledExitIdle=!1}pick(e){return this.calledExitIdle||(process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0),this.childPicker?this.childPicker.pick(e):{pickResultType:x_.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}};Wn.QueuePicker=rA});var Cl=A(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.BackoffTimeout=void 0;var N8=1e3,M8=1.6,C8=12e4,P8=.2;function g8(o,e){return Math.random()*(e-o)+o}var nA=class{constructor(e,t){this.callback=e,this.initialDelay=N8,this.multiplier=M8,this.maxDelay=C8,this.jitter=P8,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,t&&(t.initialDelay&&(this.initialDelay=t.initialDelay),t.multiplier&&(this.multiplier=t.multiplier),t.jitter&&(this.jitter=t.jitter),t.maxDelay&&(this.maxDelay=t.maxDelay)),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}runTimer(e){var t,i;this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.callback(),this.running=!1},e),this.hasRef||(i=(t=this.timerId).unref)===null||i===void 0||i.call(t)}runOnce(){this.running=!0,this.startTime=new Date,this.runTimer(this.nextDelay);let e=Math.min(this.nextDelay*this.multiplier,this.maxDelay),t=e*this.jitter;this.nextDelay=e+g8(-t,t)}stop(){clearTimeout(this.timerId),this.running=!1}reset(){if(this.nextDelay=this.initialDelay,this.running){let e=new Date,t=this.startTime;t.setMilliseconds(t.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),e{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.ChildLoadBalancerHandler=void 0;var L8=Ho(),y8=$t(),I8="child_load_balancer_helper",oA=class{constructor(e,t){this.channelControlHelper=e,this.options=t,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(i){this.parent=i,this.child=null}createSubchannel(i,a){return this.parent.channelControlHelper.createSubchannel(i,a)}updateState(i,a){var s;if(this.calledByPendingChild()){if(i===y8.ConnectivityState.CONNECTING)return;(s=this.parent.currentChild)===null||s===void 0||s.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(i,a)}requestReresolution(){var i;let a=(i=this.parent.pendingChild)!==null&&i!==void 0?i:this.parent.currentChild;this.child===a&&this.parent.channelControlHelper.requestReresolution()}setChild(i){this.child=i}addChannelzChild(i){this.parent.channelControlHelper.addChannelzChild(i)}removeChannelzChild(i){this.parent.channelControlHelper.removeChannelzChild(i)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(e,t){return e.getLoadBalancerName()!==t.getLoadBalancerName()}updateAddressList(e,t,i){let a;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,t)){let s=new this.ChildPolicyHelper(this),n=(0,L8.createLoadBalancer)(t,s,this.options);s.setChild(n),this.currentChild===null?(this.currentChild=n,a=this.currentChild):(this.pendingChild&&this.pendingChild.destroy(),this.pendingChild=n,a=this.pendingChild)}else this.pendingChild===null?a=this.currentChild:a=this.pendingChild;this.latestConfig=t,a.updateAddressList(e,t,i)}exitIdle(){this.currentChild&&(this.currentChild.exitIdle(),this.pendingChild&&this.pendingChild.exitIdle())}resetBackoff(){this.currentChild&&(this.currentChild.resetBackoff(),this.pendingChild&&this.pendingChild.resetBackoff())}destroy(){this.currentChild&&(this.currentChild.destroy(),this.currentChild=null),this.pendingChild&&(this.pendingChild.destroy(),this.pendingChild=null)}getTypeName(){return I8}};b_.ChildLoadBalancerHandler=oA});var ZI=A(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});w_.ResolvingLoadBalancer=void 0;var D8=Ho(),x8=Qf(),Pt=$t(),U8=br(),Pl=jn(),b8=Cl(),iA=fe(),V8=ht(),w8=Ie(),B8=fe(),G8=Ut(),H8=V_(),k8="resolving_load_balancer";function QI(o){w8.trace(B8.LogVerbosity.DEBUG,k8,o)}var Y8=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function F8(o,e,t,i){for(let a of t.name)switch(i){case"EMPTY":if(!a.service&&!a.method)return!0;break;case"SERVICE":if(a.service===o&&!a.method)return!0;break;case"SERVICE_AND_METHOD":if(a.service===o&&a.method===e)return!0}return!1}function K8(o,e,t,i){for(let a of t)if(F8(o,e,a,i))return a;return null}function q8(o){return function(t,i){var a,s;let n=t.split("/").filter(c=>c.length>0),r=(a=n[0])!==null&&a!==void 0?a:"",l=(s=n[1])!==null&&s!==void 0?s:"";if(o&&o.methodConfig)for(let c of Y8){let u=K8(r,l,o.methodConfig,c);if(u)return{methodConfig:u,pickInformation:{},status:iA.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:iA.Status.OK,dynamicFilterFactories:[]}}}var aA=class{constructor(e,t,i,a,s){this.target=e,this.channelControlHelper=t,this.onSuccessfulResolution=a,this.onFailedResolution=s,this.latestChildState=Pt.ConnectivityState.IDLE,this.latestChildPicker=new Pl.QueuePicker(this),this.currentState=Pt.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,i["grpc.service_config"]?this.defaultServiceConfig=(0,x8.validateServiceConfig)(JSON.parse(i["grpc.service_config"])):this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]},this.updateState(Pt.ConnectivityState.IDLE,new Pl.QueuePicker(this)),this.childLoadBalancer=new H8.ChildLoadBalancerHandler({createSubchannel:t.createSubchannel.bind(t),requestReresolution:()=>{this.backoffTimeout.isRunning()?(QI("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0):this.updateResolution()},updateState:(r,l)=>{this.latestChildState=r,this.latestChildPicker=l,this.updateState(r,l)},addChannelzChild:t.addChannelzChild.bind(t),removeChannelzChild:t.removeChannelzChild.bind(t)},i),this.innerResolver=(0,U8.createResolver)(e,{onSuccessfulResolution:(r,l,c,u,E)=>{var d;this.backoffTimeout.stop(),this.backoffTimeout.reset();let f=null;l===null?c===null?(this.previousServiceConfig=null,f=this.defaultServiceConfig):this.previousServiceConfig===null?this.handleResolutionFailure(c):f=this.previousServiceConfig:(f=l,this.previousServiceConfig=l);let O=(d=f==null?void 0:f.loadBalancingConfig)!==null&&d!==void 0?d:[],v=(0,D8.selectLbConfigFromList)(O,!0);if(v===null){this.handleResolutionFailure({code:iA.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new V8.Metadata});return}this.childLoadBalancer.updateAddressList(r,v,E);let M=f??this.defaultServiceConfig;this.onSuccessfulResolution(M,u??q8(M))},onError:r=>{this.handleResolutionFailure(r)}},i);let n={initialDelay:i["grpc.initial_reconnect_backoff_ms"],maxDelay:i["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new b8.BackoffTimeout(()=>{this.continueResolving?(this.updateResolution(),this.continueResolving=!1):this.updateState(this.latestChildState,this.latestChildPicker)},n),this.backoffTimeout.unref()}updateResolution(){this.innerResolver.updateResolution(),this.currentState===Pt.ConnectivityState.IDLE&&this.updateState(Pt.ConnectivityState.CONNECTING,this.latestChildPicker),this.backoffTimeout.runOnce()}updateState(e,t){QI((0,G8.uriToString)(this.target)+" "+Pt.ConnectivityState[this.currentState]+" -> "+Pt.ConnectivityState[e]),e===Pt.ConnectivityState.IDLE&&(t=new Pl.QueuePicker(this,t)),this.currentState=e,this.channelControlHelper.updateState(e,t)}handleResolutionFailure(e){this.latestChildState===Pt.ConnectivityState.IDLE&&(this.updateState(Pt.ConnectivityState.TRANSIENT_FAILURE,new Pl.UnavailablePicker(e)),this.onFailedResolution(e))}exitIdle(){(this.currentState===Pt.ConnectivityState.IDLE||this.currentState===Pt.ConnectivityState.TRANSIENT_FAILURE)&&(this.backoffTimeout.isRunning()?this.continueResolving=!0:this.updateResolution()),this.childLoadBalancer.exitIdle()}updateAddressList(e,t){throw new Error("updateAddressList not supported on ResolvingLoadBalancer")}resetBackoff(){this.backoffTimeout.reset(),this.childLoadBalancer.resetBackoff()}destroy(){this.childLoadBalancer.destroy(),this.innerResolver.destroy(),this.backoffTimeout.reset(),this.backoffTimeout.stop(),this.latestChildState=Pt.ConnectivityState.IDLE,this.latestChildPicker=new Pl.QueuePicker(this),this.currentState=Pt.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}};w_.ResolvingLoadBalancer=aA});var eD=A(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.channelOptionsEqual=ma.recognizedOptions=void 0;ma.recognizedOptions={"grpc.ssl_target_name_override":!0,"grpc.primary_user_agent":!0,"grpc.secondary_user_agent":!0,"grpc.default_authority":!0,"grpc.keepalive_time_ms":!0,"grpc.keepalive_timeout_ms":!0,"grpc.keepalive_permit_without_calls":!0,"grpc.service_config":!0,"grpc.max_concurrent_streams":!0,"grpc.initial_reconnect_backoff_ms":!0,"grpc.max_reconnect_backoff_ms":!0,"grpc.use_local_subchannel_pool":!0,"grpc.max_send_message_length":!0,"grpc.max_receive_message_length":!0,"grpc.enable_http_proxy":!0,"grpc.enable_channelz":!0,"grpc.dns_min_time_between_resolutions_ms":!0,"grpc.enable_retries":!0,"grpc.per_rpc_retry_buffer_size":!0,"grpc.retry_buffer_size":!0,"grpc.max_connection_age_ms":!0,"grpc.max_connection_age_grace_ms":!0,"grpc-node.max_session_memory":!0,"grpc.service_config_disable_resolution":!0,"grpc.client_idle_timeout_ms":!0,"grpc-node.tls_enable_trace":!0,"grpc.lb.ring_hash.ring_size_cap":!0};function W8(o,e){let t=Object.keys(o).sort(),i=Object.keys(e).sort();if(t.length!==i.length)return!1;for(let a=0;a{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.EndpointMap=Xe.endpointHasAddress=Xe.endpointToString=Xe.endpointEqual=Xe.stringToSubchannelAddress=Xe.subchannelAddressToString=Xe.subchannelAddressEqual=Xe.isTcpSubchannelAddress=void 0;var tD=H("net");function Ll(o){return"port"in o}Xe.isTcpSubchannelAddress=Ll;function B_(o,e){return!o&&!e?!0:!o||!e?!1:Ll(o)?Ll(e)&&o.host===e.host&&o.port===e.port:!Ll(e)&&o.path===e.path}Xe.subchannelAddressEqual=B_;function rD(o){return Ll(o)?(0,tD.isIPv6)(o.host)?"["+o.host+"]:"+o.port:o.host+":"+o.port:o.path}Xe.subchannelAddressToString=rD;var j8=443;function z8(o,e){return(0,tD.isIP)(o)?{host:o,port:e??j8}:{path:o}}Xe.stringToSubchannelAddress=z8;function $8(o,e){if(o.addresses.length!==e.addresses.length)return!1;for(let t=0;toz});function Oa(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");lA(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function J8(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,n;return n={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function r(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,c[0]&&(t=0)),t;)try{if(i=1,a&&(s=c[0]&2?a.return:c[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,c[1])).done)return s;switch(a=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,a=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]{lA=function(o,e){return lA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])},lA(o,e)};oD=function(){function o(e,t,i){i===void 0&&(i=1),this.t=void 0,this.i=void 0,this.h=void 0,this.u=e,this.o=t,this.l=i}return o.prototype.v=function(){var e=this,t=e.h.h===e;if(t&&e.l===1)e=e.i;else if(e.t)for(e=e.t;e.i;)e=e.i;else{if(t)return e.h;for(var i=e.h;i.t===e;)e=i,i=e.h;e=i}return e},o.prototype.p=function(){var e=this;if(e.i){for(e=e.i;e.t;)e=e.t;return e}else{for(var t=e.h;t.i===e;)e=t,t=e.h;return e.i!==t?t:e}},o.prototype.T=function(){var e=this.h,t=this.i,i=t.t;return e.h===this?e.h=t:e.t===this?e.t=t:e.i=t,t.h=e,t.t=this,this.h=t,this.i=i,i&&(i.h=this),t},o.prototype.I=function(){var e=this.h,t=this.t,i=t.i;return e.h===this?e.h=t:e.t===this?e.t=t:e.i=t,t.h=e,t.i=this,this.h=t,this.t=i,i&&(i.h=this),t},o}(),Q8=function(o){Oa(e,o);function e(){var t=o!==null&&o.apply(this,arguments)||this;return t.O=1,t}return e.prototype.T=function(){var t=o.prototype.T.call(this);return this.M(),t.M(),t},e.prototype.I=function(){var t=o.prototype.I.call(this);return this.M(),t.M(),t},e.prototype.M=function(){this.O=1,this.t&&(this.O+=this.t.O),this.i&&(this.O+=this.i.O)},e}(oD),Z8=function(){function o(e){e===void 0&&(e=0),this.iteratorType=e}return o.prototype.equals=function(e){return this.C===e.C},o}(),ez=function(){function o(){this._=0}return Object.defineProperty(o.prototype,"length",{get:function(){return this._},enumerable:!1,configurable:!0}),o.prototype.size=function(){return this._},o.prototype.empty=function(){return this._===0},o}(),tz=function(o){Oa(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(ez);rz=function(o){Oa(e,o);function e(t,i){t===void 0&&(t=function(s,n){return sn?1:0}),i===void 0&&(i=!1);var a=o.call(this)||this;return a.N=void 0,a.g=t,a.enableIndex=i,a.S=i?Q8:oD,a.A=new a.S,a}return e.prototype.m=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);if(s<0)t=t.i;else if(s>0)a=t,t=t.t;else return t}return a},e.prototype.B=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);s<=0?t=t.i:(a=t,t=t.t)}return a},e.prototype.j=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);if(s<0)a=t,t=t.i;else if(s>0)t=t.t;else return t}return a},e.prototype.k=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);s<0?(a=t,t=t.i):t=t.t}return a},e.prototype.R=function(t){for(;;){var i=t.h;if(i===this.A)return;if(t.l===1){t.l=0;return}if(t===i.t){var a=i.i;if(a.l===1)a.l=0,i.l=1,i===this.N?this.N=i.T():i.T();else if(a.i&&a.i.l===1){a.l=i.l,i.l=0,a.i.l=0,i===this.N?this.N=i.T():i.T();return}else a.t&&a.t.l===1?(a.l=1,a.t.l=0,a.I()):(a.l=1,t=i)}else{var a=i.t;if(a.l===1)a.l=0,i.l=1,i===this.N?this.N=i.I():i.I();else if(a.t&&a.t.l===1){a.l=i.l,i.l=0,a.t.l=0,i===this.N?this.N=i.I():i.I();return}else a.i&&a.i.l===1?(a.l=1,a.i.l=0,a.T()):(a.l=1,t=i)}}},e.prototype.G=function(t){if(this._===1){this.clear();return}for(var i=t;i.t||i.i;){if(i.i)for(i=i.i;i.t;)i=i.t;else i=i.t;var a=t.u;t.u=i.u,i.u=a;var s=t.o;t.o=i.o,i.o=s,t=i}this.A.t===i?this.A.t=i.h:this.A.i===i&&(this.A.i=i.h),this.R(i);var n=i.h;if(i===n.t?n.t=void 0:n.i=void 0,this._-=1,this.N.l=0,this.enableIndex)for(;n!==this.A;)n.O-=1,n=n.h},e.prototype.P=function(t){for(var i=typeof t=="number"?t:void 0,a=typeof t=="function"?t:void 0,s=typeof t>"u"?[]:void 0,n=0,r=this.N,l=[];l.length||r;)if(r)l.push(r),r=r.t;else{if(r=l.pop(),n===i)return r;s&&s.push(r),a&&a(r,n,this),n+=1,r=r.i}return s},e.prototype.q=function(t){for(;;){var i=t.h;if(i.l===0)return;var a=i.h;if(i===a.t){var s=a.i;if(s&&s.l===1){if(s.l=i.l=0,a===this.N)return;a.l=1,t=a;continue}else if(t===i.i){if(t.l=0,t.t&&(t.t.h=i),t.i&&(t.i.h=a),i.i=t.t,a.t=t.i,t.t=i,t.i=a,a===this.N)this.N=t,this.A.h=t;else{var n=a.h;n.t===a?n.t=t:n.i=t}t.h=a.h,i.h=t,a.h=t,a.l=1}else{i.l=0,a===this.N?this.N=a.I():a.I(),a.l=1;return}}else{var s=a.t;if(s&&s.l===1){if(s.l=i.l=0,a===this.N)return;a.l=1,t=a;continue}else if(t===i.t){if(t.l=0,t.t&&(t.t.h=a),t.i&&(t.i.h=i),a.i=t.t,i.t=t.i,t.t=a,t.i=i,a===this.N)this.N=t,this.A.h=t;else{var n=a.h;n.t===a?n.t=t:n.i=t}t.h=a.h,i.h=t,a.h=t,a.l=1}else{i.l=0,a===this.N?this.N=a.T():a.T(),a.l=1;return}}this.enableIndex&&(i.M(),a.M(),t.M());return}},e.prototype.D=function(t,i,a){if(this.N===void 0)return this._+=1,this.N=new this.S(t,i,0),this.N.h=this.A,this.A.h=this.A.t=this.A.i=this.N,this._;var s,n=this.A.t,r=this.g(n.u,t);if(r===0)return n.o=i,this._;if(r>0)n.t=new this.S(t,i),n.t.h=n,s=n.t,this.A.t=s;else{var l=this.A.i,c=this.g(l.u,t);if(c===0)return l.o=i,this._;if(c<0)l.i=new this.S(t,i),l.i.h=l,s=l.i,this.A.i=s;else{if(a!==void 0){var u=a.C;if(u!==this.A){var E=this.g(u.u,t);if(E===0)return u.o=i,this._;if(E>0){var d=u.v(),f=this.g(d.u,t);if(f===0)return d.o=i,this._;f<0&&(s=new this.S(t,i),d.i===void 0?(d.i=s,s.h=d):(u.t=s,s.h=u))}}}if(s===void 0)for(s=this.N;;){var O=this.g(s.u,t);if(O>0){if(s.t===void 0){s.t=new this.S(t,i),s.t.h=s,s=s.t;break}s=s.t}else if(O<0){if(s.i===void 0){s.i=new this.S(t,i),s.i.h=s,s=s.i;break}s=s.i}else return s.o=i,this._}}}if(this.enableIndex)for(var v=s.h;v!==this.A;)v.O+=1,v=v.h;return this.q(s),this._+=1,this._},e.prototype.F=function(t,i){for(;t;){var a=this.g(t.u,i);if(a<0)t=t.i;else if(a>0)t=t.t;else return t}return t||this.A},e.prototype.clear=function(){this._=0,this.N=void 0,this.A.h=void 0,this.A.t=this.A.i=void 0},e.prototype.updateKeyByIterator=function(t,i){var a=t.C;if(a===this.A&&ko(),this._===1)return a.u=i,!0;var s=a.p().u;if(a===this.A.t)return this.g(s,i)>0?(a.u=i,!0):!1;var n=a.v().u;return a===this.A.i?this.g(n,i)<0?(a.u=i,!0):!1:this.g(n,i)>=0||this.g(s,i)<=0?!1:(a.u=i,!0)},e.prototype.eraseElementByPos=function(t){if(t<0||t>this._-1)throw new RangeError;var i=this.P(t);return this.G(i),this._},e.prototype.eraseElementByKey=function(t){if(this._===0)return!1;var i=this.F(this.N,t);return i===this.A?!1:(this.G(i),!0)},e.prototype.eraseElementByIterator=function(t){var i=t.C;i===this.A&&ko();var a=i.i===void 0,s=t.iteratorType===0;return s?a&&t.next():(!a||i.t===void 0)&&t.next(),this.G(i),t},e.prototype.getHeight=function(){if(this._===0)return 0;function t(i){return i?Math.max(t(i.t),t(i.i))+1:0}return t(this.N)},e}(tz),nz=function(o){Oa(e,o);function e(t,i,a){var s=o.call(this,a)||this;return s.C=t,s.A=i,s.iteratorType===0?(s.pre=function(){return this.C===this.A.t&&ko(),this.C=this.C.v(),this},s.next=function(){return this.C===this.A&&ko(),this.C=this.C.p(),this}):(s.pre=function(){return this.C===this.A.i&&ko(),this.C=this.C.p(),this},s.next=function(){return this.C===this.A&&ko(),this.C=this.C.v(),this}),s}return Object.defineProperty(e.prototype,"index",{get:function(){var t=this.C,i=this.A.h;if(t===this.A)return i?i.O-1:0;var a=0;for(t.t&&(a+=t.t.O);t!==i;){var s=t.h;t===s.i&&(a+=1,s.t&&(a+=s.t.O)),t=s}return a},enumerable:!1,configurable:!0}),e.prototype.isAccessible=function(){return this.C!==this.A},e}(Z8),sn=function(o){Oa(e,o);function e(t,i,a,s){var n=o.call(this,t,i,s)||this;return n.container=a,n}return Object.defineProperty(e.prototype,"pointer",{get:function(){this.C===this.A&&ko();var t=this;return new Proxy([],{get:function(i,a){return a==="0"?t.C.u:a==="1"?t.C.o:(i[0]=t.C.u,i[1]=t.C.o,i[a])},set:function(i,a,s){if(a!=="1")throw new TypeError("prop must be 1");return t.C.o=s,!0}})},enumerable:!1,configurable:!0}),e.prototype.copy=function(){return new e(this.C,this.A,this.container,this.iteratorType)},e}(nz),oz=function(o){Oa(e,o);function e(t,i,a){t===void 0&&(t=[]);var s=o.call(this,i,a)||this,n=s;return t.forEach(function(r){n.setElement(r[0],r[1])}),s}return e.prototype.begin=function(){return new sn(this.A.t||this.A,this.A,this)},e.prototype.end=function(){return new sn(this.A,this.A,this)},e.prototype.rBegin=function(){return new sn(this.A.i||this.A,this.A,this,1)},e.prototype.rEnd=function(){return new sn(this.A,this.A,this,1)},e.prototype.front=function(){if(this._!==0){var t=this.A.t;return[t.u,t.o]}},e.prototype.back=function(){if(this._!==0){var t=this.A.i;return[t.u,t.o]}},e.prototype.lowerBound=function(t){var i=this.m(this.N,t);return new sn(i,this.A,this)},e.prototype.upperBound=function(t){var i=this.B(this.N,t);return new sn(i,this.A,this)},e.prototype.reverseLowerBound=function(t){var i=this.j(this.N,t);return new sn(i,this.A,this)},e.prototype.reverseUpperBound=function(t){var i=this.k(this.N,t);return new sn(i,this.A,this)},e.prototype.forEach=function(t){this.P(function(i,a,s){t([i.u,i.o],a,s)})},e.prototype.setElement=function(t,i,a){return this.D(t,i,a)},e.prototype.getElementByPos=function(t){if(t<0||t>this._-1)throw new RangeError;var i=this.P(t);return[i.u,i.o]},e.prototype.find=function(t){var i=this.F(this.N,t);return new sn(i,this.A,this)},e.prototype.getElementByKey=function(t){var i=this.F(this.N,t);return i.o},e.prototype.union=function(t){var i=this;return t.forEach(function(a){i.setElement(a[0],a[1])}),this._},e.prototype[Symbol.iterator]=function(){var t,i,a,s;return J8(this,function(n){switch(n.label){case 0:t=this._,i=this.P(),a=0,n.label=1;case 1:return a{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.addAdminServicesToServer=Na.registerAdminService=void 0;var sD=[];function iz(o,e){sD.push({getServiceDefinition:o,getHandlers:e})}Na.registerAdminService=iz;function az(o){for(let{getServiceDefinition:e,getHandlers:t}of sD)o.addService(e(),t())}Na.addAdminServicesToServer=az});var lD=A(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.ClientDuplexStreamImpl=Jt.ClientWritableStreamImpl=Jt.ClientReadableStreamImpl=Jt.ClientUnaryCallImpl=Jt.callErrorFromStatus=void 0;var sz=H("events"),TA=H("stream"),yl=fe();function lz(o,e){let t=`${o.code} ${yl.Status[o.code]}: ${o.details}`,a=`${new Error(t).stack} for call at ${e}`;return Object.assign(new Error(t),o,{stack:a})}Jt.callErrorFromStatus=lz;var cA=class extends sz.EventEmitter{constructor(){super()}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(yl.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}};Jt.ClientUnaryCallImpl=cA;var uA=class extends TA.Readable{constructor(e){super({objectMode:!0}),this.deserialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(yl.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}_read(e){var t;(t=this.call)===null||t===void 0||t.startRead()}};Jt.ClientReadableStreamImpl=uA;var EA=class extends TA.Writable{constructor(e){super({objectMode:!0}),this.serialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(yl.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}_write(e,t,i){var a;let s={callback:i},n=Number(t);Number.isNaN(n)||(s.flags=n),(a=this.call)===null||a===void 0||a.sendMessageWithContext(s,e)}_final(e){var t;(t=this.call)===null||t===void 0||t.halfClose(),e()}};Jt.ClientWritableStreamImpl=EA;var _A=class extends TA.Duplex{constructor(e,t){super({objectMode:!0}),this.serialize=e,this.deserialize=t}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(yl.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}_read(e){var t;(t=this.call)===null||t===void 0||t.startRead()}_write(e,t,i){var a;let s={callback:i},n=Number(t);Number.isNaN(n)||(s.flags=n),(a=this.call)===null||a===void 0||a.sendMessageWithContext(s,e)}_final(e){var t;(t=this.call)===null||t===void 0||t.halfClose(),e()}};Jt.ClientDuplexStreamImpl=_A});var cD=A(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.InterceptingListenerImpl=Ma.isInterceptingListener=void 0;function cz(o){return o.onReceiveMetadata!==void 0&&o.onReceiveMetadata.length===1}Ma.isInterceptingListener=cz;var SA=class{constructor(e,t){this.listener=e,this.nextListener=t,this.processingMetadata=!1,this.hasPendingMessage=!1,this.processingMessage=!1,this.pendingStatus=null}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingStatus(){this.pendingStatus&&this.nextListener.onReceiveStatus(this.pendingStatus)}onReceiveMetadata(e){this.processingMetadata=!0,this.listener.onReceiveMetadata(e,t=>{this.processingMetadata=!1,this.nextListener.onReceiveMetadata(t),this.processPendingMessage(),this.processPendingStatus()})}onReceiveMessage(e){this.processingMessage=!0,this.listener.onReceiveMessage(e,t=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=t,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(t),this.processPendingStatus())})}onReceiveStatus(e){this.listener.onReceiveStatus(e,t=>{this.processingMetadata||this.processingMessage?this.pendingStatus=t:this.nextListener.onReceiveStatus(t)})}};Ma.InterceptingListenerImpl=SA});var RA=A(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.getInterceptingCall=Qt.InterceptingCall=Qt.RequesterBuilder=Qt.ListenerBuilder=Qt.InterceptorConfigurationError=void 0;var uz=ht(),uD=cD(),ED=fe(),_D=O_(),Dl=class o extends Error{constructor(e){super(e),this.name="InterceptorConfigurationError",Error.captureStackTrace(this,o)}};Qt.InterceptorConfigurationError=Dl;var dA=class{constructor(){this.metadata=void 0,this.message=void 0,this.status=void 0}withOnReceiveMetadata(e){return this.metadata=e,this}withOnReceiveMessage(e){return this.message=e,this}withOnReceiveStatus(e){return this.status=e,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveStatus:this.status}}};Qt.ListenerBuilder=dA;var fA=class{constructor(){this.start=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withStart(e){return this.start=e,this}withSendMessage(e){return this.message=e,this}withHalfClose(e){return this.halfClose=e,this}withCancel(e){return this.cancel=e,this}build(){return{start:this.start,sendMessage:this.message,halfClose:this.halfClose,cancel:this.cancel}}};Qt.RequesterBuilder=fA;var pA={onReceiveMetadata:(o,e)=>{e(o)},onReceiveMessage:(o,e)=>{e(o)},onReceiveStatus:(o,e)=>{e(o)}},Il={start:(o,e,t)=>{t(o,e)},sendMessage:(o,e)=>{e(o)},halfClose:o=>{o()},cancel:o=>{o()}},AA=class{constructor(e,t){var i,a,s,n;this.nextCall=e,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,t?this.requester={start:(i=t.start)!==null&&i!==void 0?i:Il.start,sendMessage:(a=t.sendMessage)!==null&&a!==void 0?a:Il.sendMessage,halfClose:(s=t.halfClose)!==null&&s!==void 0?s:Il.halfClose,cancel:(n=t.cancel)!==null&&n!==void 0?n:Il.cancel}:this.requester=Il}cancelWithStatus(e,t){this.requester.cancel(()=>{this.nextCall.cancelWithStatus(e,t)})}getPeer(){return this.nextCall.getPeer()}processPendingMessage(){this.pendingMessageContext&&(this.nextCall.sendMessageWithContext(this.pendingMessageContext,this.pendingMessage),this.pendingMessageContext=null,this.pendingMessage=null)}processPendingHalfClose(){this.pendingHalfClose&&this.nextCall.halfClose()}start(e,t){var i,a,s,n,r,l;let c={onReceiveMetadata:(a=(i=t==null?void 0:t.onReceiveMetadata)===null||i===void 0?void 0:i.bind(t))!==null&&a!==void 0?a:u=>{},onReceiveMessage:(n=(s=t==null?void 0:t.onReceiveMessage)===null||s===void 0?void 0:s.bind(t))!==null&&n!==void 0?n:u=>{},onReceiveStatus:(l=(r=t==null?void 0:t.onReceiveStatus)===null||r===void 0?void 0:r.bind(t))!==null&&l!==void 0?l:u=>{}};this.processingMetadata=!0,this.requester.start(e,c,(u,E)=>{var d,f,O;this.processingMetadata=!1;let v;if((0,uD.isInterceptingListener)(E))v=E;else{let M={onReceiveMetadata:(d=E.onReceiveMetadata)!==null&&d!==void 0?d:pA.onReceiveMetadata,onReceiveMessage:(f=E.onReceiveMessage)!==null&&f!==void 0?f:pA.onReceiveMessage,onReceiveStatus:(O=E.onReceiveStatus)!==null&&O!==void 0?O:pA.onReceiveStatus};v=new uD.InterceptingListenerImpl(M,c)}this.nextCall.start(u,v),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(e,t){this.processingMessage=!0,this.requester.sendMessage(t,i=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessageContext=e,this.pendingMessage=t):(this.nextCall.sendMessageWithContext(e,i),this.processPendingHalfClose())})}sendMessage(e){this.sendMessageWithContext({},e)}startRead(){this.nextCall.startRead()}halfClose(){this.requester.halfClose(()=>{this.processingMetadata||this.processingMessage?this.pendingHalfClose=!0:this.nextCall.halfClose()})}};Qt.InterceptingCall=AA;function Ez(o,e,t){var i,a;let s=(i=t.deadline)!==null&&i!==void 0?i:1/0,n=t.host,r=(a=t.parent)!==null&&a!==void 0?a:null,l=t.propagate_flags,c=t.credentials,u=o.createCall(e,s,n,r,l);return c&&u.setCredentials(c),u}var H_=class{constructor(e,t){this.call=e,this.methodDefinition=t}cancelWithStatus(e,t){this.call.cancelWithStatus(e,t)}getPeer(){return this.call.getPeer()}sendMessageWithContext(e,t){let i;try{i=this.methodDefinition.requestSerialize(t)}catch(a){this.call.cancelWithStatus(ED.Status.INTERNAL,`Request message serialization failure: ${(0,_D.getErrorMessage)(a)}`);return}this.call.sendMessageWithContext(e,i)}sendMessage(e){this.sendMessageWithContext({},e)}start(e,t){let i=null;this.call.start(e,{onReceiveMetadata:a=>{var s;(s=t==null?void 0:t.onReceiveMetadata)===null||s===void 0||s.call(t,a)},onReceiveMessage:a=>{var s;let n;try{n=this.methodDefinition.responseDeserialize(a)}catch(r){i={code:ED.Status.INTERNAL,details:`Response message parsing error: ${(0,_D.getErrorMessage)(r)}`,metadata:new uz.Metadata},this.call.cancelWithStatus(i.code,i.details);return}(s=t==null?void 0:t.onReceiveMessage)===null||s===void 0||s.call(t,n)},onReceiveStatus:a=>{var s,n;i?(s=t==null?void 0:t.onReceiveStatus)===null||s===void 0||s.call(t,i):(n=t==null?void 0:t.onReceiveStatus)===null||n===void 0||n.call(t,a)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}},hA=class extends H_{constructor(e,t){super(e,t)}start(e,t){var i,a;let s=!1,n={onReceiveMetadata:(a=(i=t==null?void 0:t.onReceiveMetadata)===null||i===void 0?void 0:i.bind(t))!==null&&a!==void 0?a:r=>{},onReceiveMessage:r=>{var l;s=!0,(l=t==null?void 0:t.onReceiveMessage)===null||l===void 0||l.call(t,r)},onReceiveStatus:r=>{var l,c;s||(l=t==null?void 0:t.onReceiveMessage)===null||l===void 0||l.call(t,null),(c=t==null?void 0:t.onReceiveStatus)===null||c===void 0||c.call(t,r)}};super.start(e,n),this.call.startRead()}},vA=class extends H_{};function _z(o,e,t){let i=Ez(o,t.path,e);return t.responseStream?new vA(i,t):new hA(i,t)}function Tz(o,e,t,i){if(o.clientInterceptors.length>0&&o.clientInterceptorProviders.length>0)throw new Dl("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(o.callInterceptors.length>0&&o.callInterceptorProviders.length>0)throw new Dl("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let a=[];o.callInterceptors.length>0||o.callInterceptorProviders.length>0?a=[].concat(o.callInterceptors,o.callInterceptorProviders.map(r=>r(e))).filter(r=>r):a=[].concat(o.clientInterceptors,o.clientInterceptorProviders.map(r=>r(e))).filter(r=>r);let s=Object.assign({},t,{method_definition:e});return a.reduceRight((r,l)=>c=>l(c,r),r=>_z(i,r,e))(s)}Qt.getInterceptingCall=Tz});var NA=A(Y_=>{"use strict";Object.defineProperty(Y_,"__esModule",{value:!0});Y_.Client=void 0;var Vr=lD(),Sz=MA(),pz=$t(),zn=fe(),Ca=ht(),k_=RA(),pr=Symbol(),Pa=Symbol(),ga=Symbol(),ln=Symbol();function mA(o){return typeof o=="function"}function La(o){var e;return((e=o.stack)===null||e===void 0?void 0:e.split(` `).slice(1).join(` `))||"no stack trace available"}var OA=class{constructor(e,t,i={}){var a,s;if(i=Object.assign({},i),this[Pa]=(a=i.interceptors)!==null&&a!==void 0?a:[],delete i.interceptors,this[ga]=(s=i.interceptor_providers)!==null&&s!==void 0?s:[],delete i.interceptor_providers,this[Pa].length>0&&this[ga].length>0)throw new Error("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(this[ln]=i.callInvocationTransformer,delete i.callInvocationTransformer,i.channelOverride)this[pr]=i.channelOverride;else if(i.channelFactoryOverride){let n=i.channelFactoryOverride;delete i.channelFactoryOverride,this[pr]=n(e,t,i)}else this[pr]=new Sz.ChannelImplementation(e,t,i)}close(){this[pr].close()}getChannel(){return this[pr]}waitForReady(e,t){let i=a=>{if(a){t(new Error("Failed to connect before the deadline"));return}let s;try{s=this[pr].getConnectivityState(!0)}catch{t(new Error("The channel has been closed"));return}if(s===pz.ConnectivityState.READY)t();else try{this[pr].watchConnectivityState(s,e,i)}catch{t(new Error("The channel has been closed"))}};setImmediate(i)}checkOptionalUnaryResponseArguments(e,t,i){if(mA(e))return{metadata:new Ca.Metadata,options:{},callback:e};if(mA(t))return e instanceof Ca.Metadata?{metadata:e,options:{},callback:t}:{metadata:new Ca.Metadata,options:e,callback:t};if(!(e instanceof Ca.Metadata&&t instanceof Object&&mA(i)))throw new Error("Incorrect arguments passed");return{metadata:e,options:t,callback:i}}makeUnaryRequest(e,t,i,a,s,n,r){var l,c;let u=this.checkOptionalUnaryResponseArguments(s,n,r),E={path:e,requestStream:!1,responseStream:!1,requestSerialize:t,responseDeserialize:i},d={argument:a,metadata:u.metadata,call:new Vr.ClientUnaryCallImpl,channel:this[pr],methodDefinition:E,callOptions:u.options,callback:u.callback};this[ln]&&(d=this[ln](d));let f=d.call,O={clientInterceptors:this[Pa],clientInterceptorProviders:this[ga],callInterceptors:(l=d.callOptions.interceptors)!==null&&l!==void 0?l:[],callInterceptorProviders:(c=d.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},v=(0,k_.getInterceptingCall)(O,d.methodDefinition,d.callOptions,d.channel);f.call=v;let M=null,C=!1,P=new Error;return v.start(d.metadata,{onReceiveMetadata:b=>{f.emit("metadata",b)},onReceiveMessage(b){M!==null&&v.cancelWithStatus(zn.Status.INTERNAL,"Too many responses received"),M=b},onReceiveStatus(b){if(!C){if(C=!0,b.code===zn.Status.OK)if(M===null){let I=La(P);d.callback((0,Vr.callErrorFromStatus)({code:zn.Status.INTERNAL,details:"No message received",metadata:b.metadata},I))}else d.callback(null,M);else{let I=La(P);d.callback((0,Vr.callErrorFromStatus)(b,I))}P=null,f.emit("status",b)}}}),v.sendMessage(a),v.halfClose(),f}makeClientStreamRequest(e,t,i,a,s,n){var r,l;let c=this.checkOptionalUnaryResponseArguments(a,s,n),u={path:e,requestStream:!0,responseStream:!1,requestSerialize:t,responseDeserialize:i},E={metadata:c.metadata,call:new Vr.ClientWritableStreamImpl(t),channel:this[pr],methodDefinition:u,callOptions:c.options,callback:c.callback};this[ln]&&(E=this[ln](E));let d=E.call,f={clientInterceptors:this[Pa],clientInterceptorProviders:this[ga],callInterceptors:(r=E.callOptions.interceptors)!==null&&r!==void 0?r:[],callInterceptorProviders:(l=E.callOptions.interceptor_providers)!==null&&l!==void 0?l:[]},O=(0,k_.getInterceptingCall)(f,E.methodDefinition,E.callOptions,E.channel);d.call=O;let v=null,M=!1,C=new Error;return O.start(E.metadata,{onReceiveMetadata:P=>{d.emit("metadata",P)},onReceiveMessage(P){v!==null&&O.cancelWithStatus(zn.Status.INTERNAL,"Too many responses received"),v=P},onReceiveStatus(P){if(!M){if(M=!0,P.code===zn.Status.OK)if(v===null){let b=La(C);E.callback((0,Vr.callErrorFromStatus)({code:zn.Status.INTERNAL,details:"No message received",metadata:P.metadata},b))}else E.callback(null,v);else{let b=La(C);E.callback((0,Vr.callErrorFromStatus)(P,b))}C=null,d.emit("status",P)}}}),d}checkMetadataAndOptions(e,t){let i,a;return e instanceof Ca.Metadata?(i=e,t?a=t:a={}):(e?a=e:a={},i=new Ca.Metadata),{metadata:i,options:a}}makeServerStreamRequest(e,t,i,a,s,n){var r,l;let c=this.checkMetadataAndOptions(s,n),u={path:e,requestStream:!1,responseStream:!0,requestSerialize:t,responseDeserialize:i},E={argument:a,metadata:c.metadata,call:new Vr.ClientReadableStreamImpl(i),channel:this[pr],methodDefinition:u,callOptions:c.options};this[ln]&&(E=this[ln](E));let d=E.call,f={clientInterceptors:this[Pa],clientInterceptorProviders:this[ga],callInterceptors:(r=E.callOptions.interceptors)!==null&&r!==void 0?r:[],callInterceptorProviders:(l=E.callOptions.interceptor_providers)!==null&&l!==void 0?l:[]},O=(0,k_.getInterceptingCall)(f,E.methodDefinition,E.callOptions,E.channel);d.call=O;let v=!1,M=new Error;return O.start(E.metadata,{onReceiveMetadata(C){d.emit("metadata",C)},onReceiveMessage(C){d.push(C)},onReceiveStatus(C){if(!v){if(v=!0,d.push(null),C.code!==zn.Status.OK){let P=La(M);d.emit("error",(0,Vr.callErrorFromStatus)(C,P))}M=null,d.emit("status",C)}}}),O.sendMessage(a),O.halfClose(),d}makeBidiStreamRequest(e,t,i,a,s){var n,r;let l=this.checkMetadataAndOptions(a,s),c={path:e,requestStream:!0,responseStream:!0,requestSerialize:t,responseDeserialize:i},u={metadata:l.metadata,call:new Vr.ClientDuplexStreamImpl(t,i),channel:this[pr],methodDefinition:c,callOptions:l.options};this[ln]&&(u=this[ln](u));let E=u.call,d={clientInterceptors:this[Pa],clientInterceptorProviders:this[ga],callInterceptors:(n=u.callOptions.interceptors)!==null&&n!==void 0?n:[],callInterceptorProviders:(r=u.callOptions.interceptor_providers)!==null&&r!==void 0?r:[]},f=(0,k_.getInterceptingCall)(d,u.methodDefinition,u.callOptions,u.channel);E.call=f;let O=!1,v=new Error;return f.start(u.metadata,{onReceiveMetadata(M){E.emit("metadata",M)},onReceiveMessage(M){E.push(M)},onReceiveStatus(M){if(!O){if(O=!0,E.push(null),M.code!==zn.Status.OK){let C=La(v);E.emit("error",(0,Vr.callErrorFromStatus)(M,C))}v=null,E.emit("status",M)}}}),E}};Y_.Client=OA});var PA=A(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.loadPackageDefinition=ya.makeClientConstructor=void 0;var xl=NA(),dz={unary:xl.Client.prototype.makeUnaryRequest,server_stream:xl.Client.prototype.makeServerStreamRequest,client_stream:xl.Client.prototype.makeClientStreamRequest,bidi:xl.Client.prototype.makeBidiStreamRequest};function CA(o){return["__proto__","prototype","constructor"].includes(o)}function TD(o,e,t){t||(t={});class i extends xl.Client{}return Object.keys(o).forEach(a=>{if(CA(a))return;let s=o[a],n;if(typeof a=="string"&&a.charAt(0)==="$")throw new Error("Method names cannot start with $");s.requestStream?s.responseStream?n="bidi":n="client_stream":s.responseStream?n="server_stream":n="unary";let r=s.requestSerialize,l=s.responseDeserialize,c=fz(dz[n],s.path,r,l);i.prototype[a]=c,Object.assign(i.prototype[a],s),s.originalName&&!CA(s.originalName)&&(i.prototype[s.originalName]=i.prototype[a])}),i.service=o,i.serviceName=e,i}ya.makeClientConstructor=TD;function fz(o,e,t,i){return function(...a){return o.call(this,e,t,i,...a)}}function Az(o){return"format"in o}function hz(o){let e={};for(let t in o)if(Object.prototype.hasOwnProperty.call(o,t)){let i=o[t],a=t.split(".");if(a.some(r=>CA(r)))continue;let s=a[a.length-1],n=e;for(let r of a.slice(0,-1))n[r]||(n[r]={}),n=n[r];Az(i)?n[s]=i:n[s]=TD(i,s,{})}return e}ya.loadPackageDefinition=hz});var BD=A((UCe,wD)=>{var vz=1/0,Rz="[object Symbol]",mz=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Oz=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,K_="\\ud800-\\udfff",RD="\\u0300-\\u036f\\ufe20-\\ufe23",mD="\\u20d0-\\u20f0",OD="\\u2700-\\u27bf",ND="a-z\\xdf-\\xf6\\xf8-\\xff",Nz="\\xac\\xb1\\xd7\\xf7",Mz="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cz="\\u2000-\\u206f",Pz=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",MD="A-Z\\xc0-\\xd6\\xd8-\\xde",CD="\\ufe0e\\ufe0f",PD=Nz+Mz+Cz+Pz,LA="['\u2019]",gz="["+K_+"]",SD="["+PD+"]",F_="["+RD+mD+"]",gD="\\d+",Lz="["+OD+"]",LD="["+ND+"]",yD="[^"+K_+PD+gD+OD+ND+MD+"]",gA="\\ud83c[\\udffb-\\udfff]",yz="(?:"+F_+"|"+gA+")",ID="[^"+K_+"]",yA="(?:\\ud83c[\\udde6-\\uddff]){2}",IA="[\\ud800-\\udbff][\\udc00-\\udfff]",Ia="["+MD+"]",DD="\\u200d",pD="(?:"+LD+"|"+yD+")",Iz="(?:"+Ia+"|"+yD+")",dD="(?:"+LA+"(?:d|ll|m|re|s|t|ve))?",fD="(?:"+LA+"(?:D|LL|M|RE|S|T|VE))?",xD=yz+"?",UD="["+CD+"]?",Dz="(?:"+DD+"(?:"+[ID,yA,IA].join("|")+")"+UD+xD+")*",bD=UD+xD+Dz,xz="(?:"+[Lz,yA,IA].join("|")+")"+bD,Uz="(?:"+[ID+F_+"?",F_,yA,IA,gz].join("|")+")",bz=RegExp(LA,"g"),Vz=RegExp(F_,"g"),wz=RegExp(gA+"(?="+gA+")|"+Uz+bD,"g"),Bz=RegExp([Ia+"?"+LD+"+"+dD+"(?="+[SD,Ia,"$"].join("|")+")",Iz+"+"+fD+"(?="+[SD,Ia+pD,"$"].join("|")+")",Ia+"?"+pD+"+"+dD,Ia+"+"+fD,gD,xz].join("|"),"g"),Gz=RegExp("["+DD+K_+RD+mD+CD+"]"),Hz=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kz={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},Yz=typeof global=="object"&&global&&global.Object===Object&&global,Fz=typeof self=="object"&&self&&self.Object===Object&&self,Kz=Yz||Fz||Function("return this")();function qz(o,e,t,i){var a=-1,s=o?o.length:0;for(i&&s&&(t=o[++a]);++aa?0:a+e),t=t>a?a:t,t<0&&(t+=a),a=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(a);++i=i?o:r$(o,e,t)}function i$(o){return function(e){e=q_(e);var t=VD(e)?Jz(e):void 0,i=t?t[0]:e.charAt(0),a=t?o$(t,1).join(""):e.slice(1);return i[o]()+a}}function a$(o){return function(e){return qz(T$(E$(e).replace(bz,"")),o,"")}}function s$(o){return!!o&&typeof o=="object"}function l$(o){return typeof o=="symbol"||s$(o)&&t$.call(o)==Rz}function q_(o){return o==null?"":n$(o)}var c$=a$(function(o,e,t){return e=e.toLowerCase(),o+(t?u$(e):e)});function u$(o){return _$(q_(o).toLowerCase())}function E$(o){return o=q_(o),o&&o.replace(Oz,$z).replace(Vz,"")}var _$=i$("toUpperCase");function T$(o,e,t){return o=q_(o),e=t?void 0:e,e===void 0?Xz(o)?Zz(o):jz(o):o.match(e)||[]}wD.exports=c$});var HD=A((bCe,GD)=>{"use strict";GD.exports=DA;function DA(o,e){typeof o=="string"&&(e=o,o=void 0);var t=[];function i(s){if(typeof s!="string"){var n=a();if(DA.verbose&&console.log("codegen: "+n),n="return "+n,s){for(var r=Object.keys(s),l=new Array(r.length+1),c=new Array(r.length),u=0;u{"use strict";kD.exports=Ul;var S$=df(),p$=ff(),xA=p$("fs");function Ul(o,e,t){return typeof e=="function"?(t=e,e={}):e||(e={}),t?!e.xhr&&xA&&xA.readFile?xA.readFile(o,function(a,s){return a&&typeof XMLHttpRequest<"u"?Ul.xhr(o,e,t):a?t(a):t(null,e.binary?s:s.toString("utf8"))}):Ul.xhr(o,e,t):S$(Ul,this,o,e)}Ul.xhr=function(e,t,i){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState===4){if(a.status!==0&&a.status!==200)return i(Error("status "+a.status));if(t.binary){var n=a.response;if(!n){n=[];for(var r=0;r{"use strict";var bA=KD,FD=bA.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},UA=bA.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),i=FD(e),a="";i&&(a=t.shift()+"/");for(var s=0;s0&&t[s-1]!==".."?t.splice(--s,2):i?t.splice(s,1):++s:t[s]==="."?t.splice(s,1):++s;return a+t.join("/")};bA.resolve=function(e,t,i){return i||(t=UA(t)),FD(t)?t:(i||(e=UA(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?UA(e+"/"+t):t)}});var Yo=A(WD=>{"use strict";var bl=WD,d$=Je(),f$=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function Vl(o,e){var t=0,i={};for(e|=0;t{"use strict";$D.exports=Zt;var W_=Fo();((Zt.prototype=Object.create(W_.prototype)).constructor=Zt).className="Field";var jD=dr(),zD=Yo(),He=Je(),VA,A$=/^required|optional|repeated$/;Zt.fromJSON=function(e,t){return new Zt(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)};function Zt(o,e,t,i,a,s,n){if(He.isObject(i)?(n=a,s=i,i=a=void 0):He.isObject(a)&&(n=s,s=a,a=void 0),W_.call(this,o,s),!He.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!He.isString(t))throw TypeError("type must be a string");if(i!==void 0&&!A$.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(a!==void 0&&!He.isString(a))throw TypeError("extend must be a string");i==="proto3_optional"&&(i="optional"),this.rule=i&&i!=="optional"?i:void 0,this.type=t,this.id=e,this.extend=a||void 0,this.required=i==="required",this.optional=!this.required,this.repeated=i==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=He.Long?zD.long[t]!==void 0:!1,this.bytes=t==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=n}Object.defineProperty(Zt.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}});Zt.prototype.setOption=function(e,t,i){return e==="packed"&&(this._packed=null),W_.prototype.setOption.call(this,e,t,i)};Zt.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return He.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])};Zt.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=zD.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof VA?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof jD&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof jD))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=He.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var e;He.base64.test(this.typeDefault)?He.base64.decode(this.typeDefault,e=He.newBuffer(He.base64.length(this.typeDefault)),0):He.utf8.write(this.typeDefault,e=He.newBuffer(He.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=He.emptyObject:this.repeated?this.defaultValue=He.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof VA&&(this.parent.ctor.prototype[this.name]=this.defaultValue),W_.prototype.resolve.call(this)};Zt.d=function(e,t,i,a){return typeof t=="function"?t=He.decorateType(t).name:t&&typeof t=="object"&&(t=He.decorateEnum(t).name),function(n,r){He.decorateType(n.constructor).add(new Zt(r,e,t,i,{default:a}))}};Zt._configure=function(e){VA=e}});var Da=A((HCe,QD)=>{"use strict";QD.exports=er;var z_=Fo();((er.prototype=Object.create(z_.prototype)).constructor=er).className="OneOf";var XD=$n(),j_=Je();function er(o,e,t,i){if(Array.isArray(e)||(t=e,e=void 0),z_.call(this,o,t),!(e===void 0||Array.isArray(e)))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=i}er.fromJSON=function(e,t){return new er(e,t.oneof,t.options,t.comment)};er.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return j_.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])};function JD(o){if(o.parent)for(var e=0;e-1&&this.oneof.splice(t,1),e.partOf=null,this};er.prototype.onAdd=function(e){z_.prototype.onAdd.call(this,e);for(var t=this,i=0;i{"use strict";rx.exports=Ae;var wA=Fo();((Ae.prototype=Object.create(wA.prototype)).constructor=Ae).className="Namespace";var ZD=$n(),$_=Je(),h$=Da(),xa,wl,Ua;Ae.fromJSON=function(e,t){return new Ae(e,t.options).addJSON(t.nested)};function ex(o,e){if(o&&o.length){for(var t={},i=0;it)return!0}return!1};Ae.isReservedName=function(e,t){if(e){for(var i=0;i0;){var a=e.shift();if(i.nested&&i.nested[a]){if(i=i.nested[a],!(i instanceof Ae))throw Error("path conflicts with non-namespace objects")}else i.add(i=new Ae(a))}return t&&i.addJSON(t),i};Ae.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t-1)return a}else if(a instanceof Ae&&(a=a.lookup(e.slice(1),t,!0)))return a}else for(var s=0;s{"use strict";nx.exports=cn;var BA=$n();((cn.prototype=Object.create(BA.prototype)).constructor=cn).className="MapField";var v$=Yo(),Bl=Je();function cn(o,e,t,i,a,s){if(BA.call(this,o,e,i,void 0,void 0,a,s),!Bl.isString(t))throw TypeError("keyType must be a string");this.keyType=t,this.resolvedKeyType=null,this.map=!0}cn.fromJSON=function(e,t){return new cn(e,t.id,t.keyType,t.type,t.options,t.comment)};cn.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return Bl.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])};cn.prototype.resolve=function(){if(this.resolved)return this;if(v$.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return BA.prototype.resolve.call(this)};cn.d=function(e,t,i){return typeof i=="function"?i=Bl.decorateType(i).name:i&&typeof i=="object"&&(i=Bl.decorateEnum(i).name),function(s,n){Bl.decorateType(s.constructor).add(new cn(n,e,t,i))}}});var J_=A((FCe,ox)=>{"use strict";ox.exports=Ko;var GA=Fo();((Ko.prototype=Object.create(GA.prototype)).constructor=Ko).className="Method";var Va=Je();function Ko(o,e,t,i,a,s,n,r,l){if(Va.isObject(a)?(n=a,a=s=void 0):Va.isObject(s)&&(n=s,s=void 0),!(e===void 0||Va.isString(e)))throw TypeError("type must be a string");if(!Va.isString(t))throw TypeError("requestType must be a string");if(!Va.isString(i))throw TypeError("responseType must be a string");GA.call(this,o,n),this.type=e||"rpc",this.requestType=t,this.requestStream=a?!0:void 0,this.responseType=i,this.responseStream=s?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=r,this.parsedOptions=l}Ko.fromJSON=function(e,t){return new Ko(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)};Ko.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return Va.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])};Ko.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),GA.prototype.resolve.call(this))}});var Q_=A((KCe,ax)=>{"use strict";ax.exports=tr;var Xn=ba();((tr.prototype=Object.create(Xn.prototype)).constructor=tr).className="Service";var HA=J_(),Gl=Je(),R$=Lf();function tr(o,e){Xn.call(this,o,e),this.methods={},this._methodsArray=null}tr.fromJSON=function(e,t){var i=new tr(e,t.options);if(t.methods)for(var a=Object.keys(t.methods),s=0;s{"use strict";sx.exports=wr;var m$=yr();function wr(o){if(o)for(var e=Object.keys(o),t=0;t{"use strict";cx.exports=M$;var O$=dr(),un=Yo(),lx=Je();function N$(o){return"missing required '"+o.name+"'"}function M$(o){var e=lx.codegen(["r","l"],o.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(o.fieldsArray.filter(function(r){return r.map}).length?",k,value":""))("while(r.pos>>3){");for(var t=0;t>>3){")("case 1: k=r.%s(); break",i.keyType)("case 2:"),un.basic[a]===void 0?e("value=types[%i].decode(r,r.uint32())",t):e("value=r.%s()",a),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),un.long[i.keyType]!==void 0?e('%s[typeof k==="object"?util.longToHash(k):k]=value',s):e("%s[k]=value",s)):i.repeated?(e("if(!(%s&&%s.length))",s,s)("%s=[]",s),un.packed[a]!==void 0&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos{"use strict";ux.exports=g$;var C$=dr(),YA=Je();function rr(o,e){return o.name+": "+e+(o.repeated&&e!=="array"?"[]":o.map&&e!=="object"?"{k:"+o.keyType+"}":"")+" expected"}function FA(o,e,t,i){if(e.resolvedType)if(e.resolvedType instanceof C$){o("switch(%s){",i)("default:")("return%j",rr(e,"enum value"));for(var a=Object.keys(e.resolvedType.values),s=0;s{"use strict";var Ex=_x,Hl=dr(),Br=Je();function qA(o,e,t,i){var a=!1;if(e.resolvedType)if(e.resolvedType instanceof Hl){o("switch(d%s){",i);for(var s=e.resolvedType.values,n=Object.keys(s),r=0;r>>0",i,i);break;case"int32":case"sint32":case"sfixed32":o("m%s=d%s|0",i,i);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":o("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",i,i,l)('else if(typeof d%s==="string")',i)("m%s=parseInt(d%s,10)",i,i)('else if(typeof d%s==="number")',i)("m%s=d%s",i,i)('else if(typeof d%s==="object")',i)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",i,i,i,l?"true":"");break;case"bytes":o('if(typeof d%s==="string")',i)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",i,i,i)("else if(d%s.length >= 0)",i)("m%s=d%s",i,i);break;case"string":o("m%s=String(d%s)",i,i);break;case"bool":o("m%s=Boolean(d%s)",i,i);break}}return o}Ex.fromObject=function(e){var t=e.fieldsArray,i=Br.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return i("return new this.ctor");i("var m=new this.ctor");for(var a=0;a>>0,m%s.high>>>0).toNumber(%s):m%s",i,i,i,i,a?"true":"",i);break;case"bytes":o("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",i,i,i,i,i);break;default:o("d%s=m%s",i,i);break}}return o}Ex.toObject=function(e){var t=e.fieldsArray.slice().sort(Br.compareFieldsById);if(!t.length)return Br.codegen()("return {}");for(var i=Br.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),a=[],s=[],n=[],r=0;r{"use strict";var L$=Tx,y$=Z_();L$[".google.protobuf.Any"]={fromObject:function(o){if(o&&o["@type"]){var e=o["@type"].substring(o["@type"].lastIndexOf("/")+1),t=this.lookup(e);if(t){var i=o["@type"].charAt(0)==="."?o["@type"].slice(1):o["@type"];return i.indexOf("/")===-1&&(i="/"+i),this.create({type_url:i,value:t.encode(t.fromObject(o)).finish()})}}return this.fromObject(o)},toObject:function(o,e){var t="type.googleapis.com/",i="",a="";if(e&&e.json&&o.type_url&&o.value){a=o.type_url.substring(o.type_url.lastIndexOf("/")+1),i=o.type_url.substring(0,o.type_url.lastIndexOf("/")+1);var s=this.lookup(a);s&&(o=s.decode(o.value))}if(!(o instanceof this.ctor)&&o instanceof y$){var n=o.$type.toObject(o,e),r=o.$type.fullName[0]==="."?o.$type.fullName.slice(1):o.$type.fullName;return i===""&&(i=t),a=i+r,n["@type"]=a,n}return this.toObject(o,e)}}});var rT=A((XCe,px)=>{"use strict";px.exports=Ce;var fr=ba();((Ce.prototype=Object.create(fr.prototype)).constructor=Ce).className="Type";var I$=dr(),JA=Da(),eT=$n(),D$=X_(),x$=Q_(),$A=Z_(),XA=S_(),U$=__(),_t=Je(),b$=QA(),V$=kA(),w$=KA(),Sx=jA(),B$=zA();function Ce(o,e){fr.call(this,o,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(Ce.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var o=Object.keys(this.fields),e=0;e{"use strict";vx.exports=bt;var oT=ba();((bt.prototype=Object.create(oT.prototype)).constructor=bt).className="Root";var eh=$n(),fx=dr(),G$=Da(),Jn=Je(),Ax,ZA,kl;function bt(o){oT.call(this,"",o),this.deferred=[],this.files=[]}bt.fromJSON=function(e,t){return t||(t=new bt),e.options&&t.setOptions(e.options),t.addJSON(e.nested)};bt.prototype.resolvePath=Jn.path.resolve;bt.prototype.fetch=Jn.fetch;function hx(){}bt.prototype.load=function o(e,t,i){typeof t=="function"&&(i=t,t=void 0);var a=this;if(!i)return Jn.asPromise(o,a,e,t);var s=i===hx;function n(f,O){if(i){if(s)throw f;var v=i;i=null,v(f,O)}}function r(f){var O=f.lastIndexOf("google/protobuf/");if(O>-1){var v=f.substring(O);if(v in kl)return v}return null}function l(f,O){try{if(Jn.isString(O)&&O.charAt(0)==="{"&&(O=JSON.parse(O)),!Jn.isString(O))a.setOptions(O.options).addJSON(O.nested);else{ZA.filename=f;var v=ZA(O,a,t),M,C=0;if(v.imports)for(;C-1)){if(a.files.push(f),f in kl){s?l(f,kl[f]):(++u,setTimeout(function(){--u,l(f,kl[f])}));return}if(s){var v;try{v=Jn.fs.readFileSync(f).toString("utf8")}catch(M){O||n(M);return}l(f,v)}else++u,a.fetch(f,function(M,C){if(--u,!!i){if(M){O?u||n(null,a):n(M);return}l(f,C)}})}}var u=0;Jn.isString(e)&&(e=[e]);for(var E=0,d;E-1&&this.deferred.splice(t,1)}}else if(e instanceof fx)nT.test(e.name)&&delete e.parent[e.name];else if(e instanceof oT){for(var i=0;i{"use strict";var we=mx.exports=yr(),Rx=yf(),th,rh;we.codegen=HD();we.fetch=YD();we.path=qD();we.fs=we.inquire("fs");we.toArray=function(e){if(e){for(var t=Object.keys(e),i=new Array(t.length),a=0;a0)s[l]=a(s[l]||{},n,r);else{var c=s[l];c&&(r=[].concat(c).concat(r)),s[l]=r}return s}if(typeof e!="object")throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return t=t.split("."),a(e,t,i)};Object.defineProperty(we,"decorateRoot",{get:function(){return Rx.decorated||(Rx.decorated=new(iT()))}})});var Fo=A((ZCe,Ox)=>{"use strict";Ox.exports=Vt;Vt.className="ReflectionObject";var aT=Je(),sT;function Vt(o,e){if(!aT.isString(o))throw TypeError("name must be a string");if(e&&!aT.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=o,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(Vt.prototype,{root:{get:function(){for(var o=this;o.parent!==null;)o=o.parent;return o}},fullName:{get:function(){for(var o=[this.name],e=this.parent;e;)o.unshift(e.name),e=e.parent;return o.join(".")}}});Vt.prototype.toJSON=function(){throw Error()};Vt.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof sT&&t._handleAdd(this)};Vt.prototype.onRemove=function(e){var t=e.root;t instanceof sT&&t._handleRemove(this),this.parent=null,this.resolved=!1};Vt.prototype.resolve=function(){return this.resolved?this:(this.root instanceof sT&&(this.resolved=!0),this)};Vt.prototype.getOption=function(e){if(this.options)return this.options[e]};Vt.prototype.setOption=function(e,t,i){return(!i||!this.options||this.options[e]===void 0)&&((this.options||(this.options={}))[e]=t),this};Vt.prototype.setParsedOption=function(e,t,i){this.parsedOptions||(this.parsedOptions=[]);var a=this.parsedOptions;if(i){var s=a.find(function(l){return Object.prototype.hasOwnProperty.call(l,e)});if(s){var n=s[e];aT.setProperty(n,i,t)}else s={},s[e]=aT.setProperty({},i,t),a.push(s)}else{var r={};r[e]=t,a.push(r)}return this};Vt.prototype.setOptions=function(e,t){if(e)for(var i=Object.keys(e),a=0;a{"use strict";Cx.exports=Gr;var Nx=Fo();((Gr.prototype=Object.create(Nx.prototype)).constructor=Gr).className="Enum";var Mx=ba(),lT=Je();function Gr(o,e,t,i,a,s){if(Nx.call(this,o,t),e&&typeof e!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=a||{},this.valuesOptions=s,this.reserved=void 0,e)for(var n=Object.keys(e),r=0;r{"use strict";gx.exports=q$;var K$=dr(),nh=Yo(),oh=Je();function Px(o,e,t,i){return e.resolvedType.group?o("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",t,i,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):o("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",t,i,(e.id<<3|2)>>>0)}function q$(o){for(var e=oh.codegen(["m","w"],o.name+"$encode")("if(!w)")("w=Writer.create()"),t,i,a=o.fieldsArray.slice().sort(oh.compareFieldsById),t=0;t>>0,8|nh.mapKey[s.keyType],s.keyType),l===void 0?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",n,i):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|l,r,i),e("}")("}")):s.repeated?(e("if(%s!=null&&%s.length){",i,i),s.packed&&nh.packed[r]!==void 0?e("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",r,i)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",i),l===void 0?Px(e,s,n,i+"[i]"):e("w.uint32(%i).%s(%s[i])",(s.id<<3|l)>>>0,r,i)),e("}")):(s.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),l===void 0?Px(e,s,n,i):e("w.uint32(%i).%s(%s)",(s.id<<3|l)>>>0,r,i))}return e("return w")}});var yx=A((rPe,Lx)=>{"use strict";var Te=Lx.exports=If();Te.build="light";function W$(o,e,t){return typeof e=="function"?(t=e,e=new Te.Root):e||(e=new Te.Root),e.load(o,t)}Te.load=W$;function j$(o,e){return e||(e=new Te.Root),e.loadSync(o)}Te.loadSync=j$;Te.encoder=QA();Te.decoder=kA();Te.verifier=KA();Te.converter=jA();Te.ReflectionObject=Fo();Te.Namespace=ba();Te.Root=iT();Te.Enum=dr();Te.Type=rT();Te.Field=$n();Te.OneOf=Da();Te.MapField=X_();Te.Service=Q_();Te.Method=J_();Te.Message=Z_();Te.wrappers=zA();Te.types=Yo();Te.util=Je();Te.ReflectionObject._configure(Te.Root);Te.Namespace._configure(Te.Type,Te.Service,Te.Enum);Te.Root._configure(Te.Type);Te.Field._configure(Te.Type)});var ah=A((nPe,xx)=>{"use strict";xx.exports=Dx;var ih=/[\s{}=;:[\],'"()<>]/g,z$=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,$$=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,X$=/^ *[*/]+ */,J$=/^\s*\*?\/*/,Q$=/\n/g,Z$=/\s/,eX=/\\(.?)/g,tX={0:"\0",r:"\r",n:` `,t:" "};function Ix(o){return o.replace(eX,function(e,t){switch(t){case"\\":case"":return t;default:return tX[t]||""}})}Dx.unescape=Ix;function Dx(o,e){o=o.toString();var t=0,i=o.length,a=1,s=0,n={},r=[],l=null;function c(I){return Error("illegal "+I+" (line "+a+")")}function u(){var I=l==="'"?$$:z$;I.lastIndex=t-1;var q=I.exec(o);if(!q)throw c("string");return t=I.lastIndex,M(l),l=null,Ix(q[1])}function E(I){return o.charAt(I)}function d(I,q,K){var k={type:o.charAt(I++),lineEmpty:!1,leading:K},oe;e?oe=2:oe=3;var Z=I-oe,se;do if(--Z<0||(se=o.charAt(Z))===` `){k.lineEmpty=!0;break}while(se===" "||se===" ");for(var R=o.substring(I,q).split(Q$),B=0;B0)return r.shift();if(l)return u();var I,q,K,k,oe,Z=t===0;do{if(t===i)return null;for(I=!1;Z$.test(K=E(t));)if(K===` `&&(Z=!0,++a),++t===i)return null;if(E(t)==="/"){if(++t===i)throw c("comment");if(E(t)==="/")if(e){if(k=t,oe=!1,f(t-1)){oe=!0;do if(t=O(t),t===i||(t++,!Z))break;while(f(t))}else t=Math.min(i,O(t)+1);oe&&(d(k,t,Z),Z=!0),a++,I=!0}else{for(oe=E(k=t+1)==="/";E(++t)!==` `;)if(t===i)return null;++t,oe&&(d(k,t-1,Z),Z=!0),++a,I=!0}else if((K=E(t))==="*"){k=t+1,oe=e||E(k)==="*";do{if(K===` `&&++a,++t===i)throw c("comment");q=K,K=E(t)}while(q!=="*"||K!=="/");++t,oe&&(d(k,t-2,Z),Z=!0),I=!0}else return"/"}}while(I);var se=t;ih.lastIndex=0;var R=ih.test(E(se++));if(!R)for(;se{"use strict";Bx.exports=En;En.filename=null;En.defaults={keepCase:!1};var rX=ah(),Ux=iT(),bx=rT(),Vx=$n(),nX=X_(),wx=Da(),oX=dr(),iX=Q_(),aX=J_(),sh=Yo(),lh=Je(),sX=/^[1-9][0-9]*$/,lX=/^-?[1-9][0-9]*$/,cX=/^0[x][0-9a-fA-F]+$/,uX=/^-?0[x][0-9a-fA-F]+$/,EX=/^0[0-7]+$/,_X=/^-?0[0-7]+$/,TX=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,Hr=/^[a-zA-Z_][a-zA-Z_0-9]*$/,kr=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,SX=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function En(o,e,t){e instanceof Ux||(t=e,e=new Ux),t||(t=En.defaults);var i=t.preferTrailingComment||!1,a=rX(o,t.alternateCommentMode||!1),s=a.next,n=a.push,r=a.peek,l=a.skip,c=a.cmnt,u=!0,E,d,f,O,v=!1,M=e,C=t.keepCase?function(L){return L}:lh.camelCase;function P(L,g,D){var F=En.filename;return D||(En.filename=null),Error("illegal "+(g||"token")+" '"+L+"' ("+(F?F+", ":"")+"line "+a.line+")")}function b(){var L=[],g;do{if((g=s())!=='"'&&g!=="'")throw P(g);L.push(s()),l(g),g=r()}while(g==='"'||g==="'");return L.join("")}function I(L){var g=s();switch(g){case"'":case'"':return n(g),b();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return K(g,!0)}catch{if(L&&kr.test(g))return g;throw P(g,"value")}}function q(L,g){var D,F;do g&&((D=r())==='"'||D==="'")?L.push(b()):L.push([F=k(s()),l("to",!0)?k(s()):F]);while(l(",",!0));var G={options:void 0};G.setOption=function(ne,ye){this.options===void 0&&(this.options={}),this.options[ne]=ye},B(G,function(ye){if(ye==="option")ue(G,ye),l(";");else throw P(ye)},function(){De(G)})}function K(L,g){var D=1;switch(L.charAt(0)==="-"&&(D=-1,L=L.substring(1)),L){case"inf":case"INF":case"Inf":return D*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(sX.test(L))return D*parseInt(L,10);if(cX.test(L))return D*parseInt(L,16);if(EX.test(L))return D*parseInt(L,8);if(TX.test(L))return D*parseFloat(L);throw P(L,"number",g)}function k(L,g){switch(L){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!g&&L.charAt(0)==="-")throw P(L,"id");if(lX.test(L))return parseInt(L,10);if(uX.test(L))return parseInt(L,16);if(_X.test(L))return parseInt(L,8);throw P(L,"id")}function oe(){if(E!==void 0)throw P("package");if(E=s(),!kr.test(E))throw P(E,"name");M=M.define(E),l(";")}function Z(){var L=r(),g;switch(L){case"weak":g=f||(f=[]),s();break;case"public":s();default:g=d||(d=[]);break}L=b(),l(";"),g.push(L)}function se(){if(l("="),O=b(),v=O==="proto3",!v&&O!=="proto2")throw P(O,"syntax");l(";")}function R(L,g){switch(g){case"option":return ue(L,g),l(";"),!0;case"message":return N(L,g),!0;case"enum":return z(L,g),!0;case"service":return Re(L,g),!0;case"extend":return it(L,g),!0}return!1}function B(L,g,D){var F=a.line;if(L&&(typeof L.comment!="string"&&(L.comment=c()),L.filename=En.filename),l("{",!0)){for(var G;(G=s())!=="}";)g(G);l(";",!0)}else D&&D(),l(";"),L&&(typeof L.comment!="string"||i)&&(L.comment=c(F)||L.comment)}function N(L,g){if(!Hr.test(g=s()))throw P(g,"type name");var D=new bx(g);B(D,function(G){if(!R(D,G))switch(G){case"map":J(D,G);break;case"required":case"repeated":p(D,G);break;case"optional":v?p(D,"proto3_optional"):p(D,"optional");break;case"oneof":Q(D,G);break;case"extensions":q(D.extensions||(D.extensions=[]));break;case"reserved":q(D.reserved||(D.reserved=[]),!0);break;default:if(!v||!kr.test(G))throw P(G);n(G),p(D,"optional");break}}),L.add(D)}function p(L,g,D){var F=s();if(F==="group"){y(L,g);return}for(;F.endsWith(".")||r().startsWith(".");)F+=s();if(!kr.test(F))throw P(F,"type");var G=s();if(!Hr.test(G))throw P(G,"name");G=C(G),l("=");var ne=new Vx(G,k(s()),F,g,D);if(B(ne,function(yt){if(yt==="option")ue(ne,yt),l(";");else throw P(yt)},function(){De(ne)}),g==="proto3_optional"){var ye=new wx("_"+G);ne.setOption("proto3_optional",!0),ye.add(ne),L.add(ye)}else L.add(ne);!v&&ne.repeated&&(sh.packed[F]!==void 0||sh.basic[F]===void 0)&&ne.setOption("packed",!1,!0)}function y(L,g){var D=s();if(!Hr.test(D))throw P(D,"name");var F=lh.lcFirst(D);D===F&&(D=lh.ucFirst(D)),l("=");var G=k(s()),ne=new bx(D);ne.group=!0;var ye=new Vx(F,G,D,g);ye.filename=En.filename,B(ne,function(yt){switch(yt){case"option":ue(ne,yt),l(";");break;case"required":case"repeated":p(ne,yt);break;case"optional":v?p(ne,"proto3_optional"):p(ne,"optional");break;case"message":N(ne,yt);break;case"enum":z(ne,yt);break;default:throw P(yt)}}),L.add(ne).add(ye)}function J(L){l("<");var g=s();if(sh.mapKey[g]===void 0)throw P(g,"type");l(",");var D=s();if(!kr.test(D))throw P(D,"type");l(">");var F=s();if(!Hr.test(F))throw P(F,"name");l("=");var G=new nX(C(F),k(s()),g,D);B(G,function(ye){if(ye==="option")ue(G,ye),l(";");else throw P(ye)},function(){De(G)}),L.add(G)}function Q(L,g){if(!Hr.test(g=s()))throw P(g,"name");var D=new wx(C(g));B(D,function(G){G==="option"?(ue(D,G),l(";")):(n(G),p(D,"optional"))}),L.add(D)}function z(L,g){if(!Hr.test(g=s()))throw P(g,"name");var D=new oX(g);B(D,function(G){switch(G){case"option":ue(D,G),l(";");break;case"reserved":q(D.reserved||(D.reserved=[]),!0);break;default:ce(D,G)}}),L.add(D)}function ce(L,g){if(!Hr.test(g))throw P(g,"name");l("=");var D=k(s(),!0),F={options:void 0};F.setOption=function(G,ne){this.options===void 0&&(this.options={}),this.options[G]=ne},B(F,function(ne){if(ne==="option")ue(F,ne),l(";");else throw P(ne)},function(){De(F)}),L.add(g,D,F.comment,F.options)}function ue(L,g){var D=l("(",!0);if(!kr.test(g=s()))throw P(g,"name");var F=g,G=F,ne;D&&(l(")"),F="("+F+")",G=F,g=r(),SX.test(g)&&(ne=g.slice(1),F+=g,s())),l("=");var ye=Le(L,F);ie(L,G,ye,ne)}function Le(L,g){if(l("{",!0)){for(var D={};!l("}",!0);){if(!Hr.test(be=s()))throw P(be,"name");if(be===null)throw P(be,"end of input");var F,G=be;if(l(":",!0),r()==="{")F=Le(L,g+"."+be);else if(r()==="["){F=[];var ne;if(l("[",!0)){do ne=I(!0),F.push(ne);while(l(",",!0));l("]"),typeof ne<"u"&&he(L,g+"."+be,ne)}}else F=I(!0),he(L,g+"."+be,F);var ye=D[G];ye&&(F=[].concat(ye).concat(F)),D[G]=F,l(",",!0),l(";",!0)}return D}var dn=I(!0);return he(L,g,dn),dn}function he(L,g,D){L.setOption&&L.setOption(g,D)}function ie(L,g,D,F){L.setParsedOption&&L.setParsedOption(g,D,F)}function De(L){if(l("[",!0)){do ue(L,"option");while(l(",",!0));l("]")}return L}function Re(L,g){if(!Hr.test(g=s()))throw P(g,"service name");var D=new iX(g);B(D,function(G){if(!R(D,G))if(G==="rpc")xe(D,G);else throw P(G)}),L.add(D)}function xe(L,g){var D=c(),F=g;if(!Hr.test(g=s()))throw P(g,"name");var G=g,ne,ye,dn,yt;if(l("("),l("stream",!0)&&(ye=!0),!kr.test(g=s())||(ne=g,l(")"),l("returns"),l("("),l("stream",!0)&&(yt=!0),!kr.test(g=s())))throw P(g);dn=g,l(")");var Ec=new aX(G,F,ne,dn,ye,yt);Ec.comment=D,B(Ec,function(OS){if(OS==="option")ue(Ec,OS),l(";");else throw P(OS)}),L.add(Ec)}function it(L,g){if(!kr.test(g=s()))throw P(g,"reference");var D=g;B(null,function(G){switch(G){case"required":case"repeated":p(L,G,D);break;case"optional":v?p(L,"proto3_optional",D):p(L,"optional",D);break;default:if(!v||!kr.test(G))throw P(G);n(G),p(L,"optional",D);break}})}for(var be;(be=s())!==null;)switch(be){case"package":if(!u)throw P(be);oe();break;case"import":if(!u)throw P(be);Z();break;case"syntax":if(!u)throw P(be);se();break;case"option":ue(M,be),l(";");break;default:if(R(M,be)){u=!1;continue}throw P(be)}return En.filename=null,{package:E,imports:d,weakImports:f,syntax:O,root:e}}});var Yx=A((iPe,kx)=>{"use strict";kx.exports=Ar;var pX=/\/|\./;function Ar(o,e){pX.test(o)||(o="google/protobuf/"+o+".proto",e={nested:{google:{nested:{protobuf:{nested:e}}}}}),Ar[o]=e}Ar("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var Hx;Ar("duration",{Duration:Hx={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});Ar("timestamp",{Timestamp:Hx});Ar("empty",{Empty:{fields:{}}});Ar("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});Ar("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});Ar("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});Ar.get=function(e){return Ar[e]||null}});var Kx=A((aPe,Fx)=>{"use strict";var Qn=Fx.exports=yx();Qn.build="full";Qn.tokenize=ah();Qn.parse=Gx();Qn.common=Yx();Qn.Root._configure(Qn.Type,Qn.parse,Qn.common)});var cT=A((sPe,qx)=>{"use strict";qx.exports=Kx()});var ch=A((lPe,dX)=>{dX.exports={nested:{google:{nested:{protobuf:{nested:{FileDescriptorSet:{fields:{file:{rule:"repeated",type:"FileDescriptorProto",id:1}}},FileDescriptorProto:{fields:{name:{type:"string",id:1},package:{type:"string",id:2},dependency:{rule:"repeated",type:"string",id:3},publicDependency:{rule:"repeated",type:"int32",id:10,options:{packed:!1}},weakDependency:{rule:"repeated",type:"int32",id:11,options:{packed:!1}},messageType:{rule:"repeated",type:"DescriptorProto",id:4},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:5},service:{rule:"repeated",type:"ServiceDescriptorProto",id:6},extension:{rule:"repeated",type:"FieldDescriptorProto",id:7},options:{type:"FileOptions",id:8},sourceCodeInfo:{type:"SourceCodeInfo",id:9},syntax:{type:"string",id:12}}},DescriptorProto:{fields:{name:{type:"string",id:1},field:{rule:"repeated",type:"FieldDescriptorProto",id:2},extension:{rule:"repeated",type:"FieldDescriptorProto",id:6},nestedType:{rule:"repeated",type:"DescriptorProto",id:3},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:4},extensionRange:{rule:"repeated",type:"ExtensionRange",id:5},oneofDecl:{rule:"repeated",type:"OneofDescriptorProto",id:8},options:{type:"MessageOptions",id:7},reservedRange:{rule:"repeated",type:"ReservedRange",id:9},reservedName:{rule:"repeated",type:"string",id:10}},nested:{ExtensionRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}},ReservedRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}}}},FieldDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:3},label:{type:"Label",id:4},type:{type:"Type",id:5},typeName:{type:"string",id:6},extendee:{type:"string",id:2},defaultValue:{type:"string",id:7},oneofIndex:{type:"int32",id:9},jsonName:{type:"string",id:10},options:{type:"FieldOptions",id:8}},nested:{Type:{values:{TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Label:{values:{LABEL_OPTIONAL:1,LABEL_REQUIRED:2,LABEL_REPEATED:3}}}},OneofDescriptorProto:{fields:{name:{type:"string",id:1},options:{type:"OneofOptions",id:2}}},EnumDescriptorProto:{fields:{name:{type:"string",id:1},value:{rule:"repeated",type:"EnumValueDescriptorProto",id:2},options:{type:"EnumOptions",id:3}}},EnumValueDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{type:"EnumValueOptions",id:3}}},ServiceDescriptorProto:{fields:{name:{type:"string",id:1},method:{rule:"repeated",type:"MethodDescriptorProto",id:2},options:{type:"ServiceOptions",id:3}}},MethodDescriptorProto:{fields:{name:{type:"string",id:1},inputType:{type:"string",id:2},outputType:{type:"string",id:3},options:{type:"MethodOptions",id:4},clientStreaming:{type:"bool",id:5},serverStreaming:{type:"bool",id:6}}},FileOptions:{fields:{javaPackage:{type:"string",id:1},javaOuterClassname:{type:"string",id:8},javaMultipleFiles:{type:"bool",id:10},javaGenerateEqualsAndHash:{type:"bool",id:20,options:{deprecated:!0}},javaStringCheckUtf8:{type:"bool",id:27},optimizeFor:{type:"OptimizeMode",id:9,options:{default:"SPEED"}},goPackage:{type:"string",id:11},ccGenericServices:{type:"bool",id:16},javaGenericServices:{type:"bool",id:17},pyGenericServices:{type:"bool",id:18},deprecated:{type:"bool",id:23},ccEnableArenas:{type:"bool",id:31},objcClassPrefix:{type:"string",id:36},csharpNamespace:{type:"string",id:37},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[38,38]],nested:{OptimizeMode:{values:{SPEED:1,CODE_SIZE:2,LITE_RUNTIME:3}}}},MessageOptions:{fields:{messageSetWireFormat:{type:"bool",id:1},noStandardDescriptorAccessor:{type:"bool",id:2},deprecated:{type:"bool",id:3},mapEntry:{type:"bool",id:7},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[8,8]]},FieldOptions:{fields:{ctype:{type:"CType",id:1,options:{default:"STRING"}},packed:{type:"bool",id:2},jstype:{type:"JSType",id:6,options:{default:"JS_NORMAL"}},lazy:{type:"bool",id:5},deprecated:{type:"bool",id:3},weak:{type:"bool",id:10},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[4,4]],nested:{CType:{values:{STRING:0,CORD:1,STRING_PIECE:2}},JSType:{values:{JS_NORMAL:0,JS_STRING:1,JS_NUMBER:2}}}},OneofOptions:{fields:{uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumOptions:{fields:{allowAlias:{type:"bool",id:2},deprecated:{type:"bool",id:3},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumValueOptions:{fields:{deprecated:{type:"bool",id:1},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},ServiceOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},MethodOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},UninterpretedOption:{fields:{name:{rule:"repeated",type:"NamePart",id:2},identifierValue:{type:"string",id:3},positiveIntValue:{type:"uint64",id:4},negativeIntValue:{type:"int64",id:5},doubleValue:{type:"double",id:6},stringValue:{type:"bytes",id:7},aggregateValue:{type:"string",id:8}},nested:{NamePart:{fields:{namePart:{rule:"required",type:"string",id:1},isExtension:{rule:"required",type:"bool",id:2}}}}},SourceCodeInfo:{fields:{location:{rule:"repeated",type:"Location",id:1}},nested:{Location:{fields:{path:{rule:"repeated",type:"int32",id:1},span:{rule:"repeated",type:"int32",id:2},leadingComments:{type:"string",id:3},trailingComments:{type:"string",id:4},leadingDetachedComments:{rule:"repeated",type:"string",id:6}}}}},GeneratedCodeInfo:{fields:{annotation:{rule:"repeated",type:"Annotation",id:1}},nested:{Annotation:{fields:{path:{rule:"repeated",type:"int32",id:1},sourceFile:{type:"string",id:2},begin:{type:"int32",id:3},end:{type:"int32",id:4}}}}}}}}}}}});var Xx=A((ae,$x)=>{"use strict";var vt=cT();$x.exports=ae=vt.descriptor=vt.Root.fromJSON(ch()).lookup(".google.protobuf");var Wx=vt.Namespace,Yl=vt.Root,_n=vt.Enum,Zn=vt.Type,eo=vt.Field,fX=vt.MapField,uT=vt.OneOf,Fl=vt.Service,ET=vt.Method;Yl.fromDescriptor=function(e){typeof e.length=="number"&&(e=ae.FileDescriptorSet.decode(e));var t=new Yl;if(e.file)for(var i,a,s=0,n;s{PX.exports={nested:{google:{nested:{protobuf:{nested:{Api:{fields:{name:{type:"string",id:1},methods:{rule:"repeated",type:"Method",id:2},options:{rule:"repeated",type:"Option",id:3},version:{type:"string",id:4},sourceContext:{type:"SourceContext",id:5},mixins:{rule:"repeated",type:"Mixin",id:6},syntax:{type:"Syntax",id:7}}},Method:{fields:{name:{type:"string",id:1},requestTypeUrl:{type:"string",id:2},requestStreaming:{type:"bool",id:3},responseTypeUrl:{type:"string",id:4},responseStreaming:{type:"bool",id:5},options:{rule:"repeated",type:"Option",id:6},syntax:{type:"Syntax",id:7}}},Mixin:{fields:{name:{type:"string",id:1},root:{type:"string",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}}}}}}}}});var Qx=A((uPe,gX)=>{gX.exports={nested:{google:{nested:{protobuf:{nested:{SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var Zx=A((EPe,LX)=>{LX.exports={nested:{google:{nested:{protobuf:{nested:{Type:{fields:{name:{type:"string",id:1},fields:{rule:"repeated",type:"Field",id:2},oneofs:{rule:"repeated",type:"string",id:3},options:{rule:"repeated",type:"Option",id:4},sourceContext:{type:"SourceContext",id:5},syntax:{type:"Syntax",id:6}}},Field:{fields:{kind:{type:"Kind",id:1},cardinality:{type:"Cardinality",id:2},number:{type:"int32",id:3},name:{type:"string",id:4},typeUrl:{type:"string",id:6},oneofIndex:{type:"int32",id:7},packed:{type:"bool",id:8},options:{rule:"repeated",type:"Option",id:9},jsonName:{type:"string",id:10},defaultValue:{type:"string",id:11}},nested:{Kind:{values:{TYPE_UNKNOWN:0,TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Cardinality:{values:{CARDINALITY_UNKNOWN:0,CARDINALITY_OPTIONAL:1,CARDINALITY_REQUIRED:2,CARDINALITY_REPEATED:3}}}},Enum:{fields:{name:{type:"string",id:1},enumvalue:{rule:"repeated",type:"EnumValue",id:2},options:{rule:"repeated",type:"Option",id:3},sourceContext:{type:"SourceContext",id:4},syntax:{type:"Syntax",id:5}}},EnumValue:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{rule:"repeated",type:"Option",id:3}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}},Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var nU=A(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.addCommonProtos=to.loadProtosWithOptionsSync=to.loadProtosWithOptions=void 0;var eU=H("fs"),tU=H("path"),Ga=cT();function rU(o,e){let t=o.resolvePath;o.resolvePath=(i,a)=>{if(tU.isAbsolute(a))return a;for(let s of e){let n=tU.join(s,a);try{return eU.accessSync(n,eU.constants.R_OK),n}catch{continue}}return process.emitWarning(`${a} not found in any of the include paths ${e}`),t(i,a)}}async function yX(o,e){let t=new Ga.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))return Promise.reject(new Error("The includeDirs option must be an array"));rU(t,e.includeDirs)}let i=await t.load(o,e);return i.resolveAll(),i}to.loadProtosWithOptions=yX;function IX(o,e){let t=new Ga.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))throw new Error("The includeDirs option must be an array");rU(t,e.includeDirs)}let i=t.loadSync(o,e);return i.resolveAll(),i}to.loadProtosWithOptionsSync=IX;function DX(){let o=Jx(),e=ch(),t=Qx(),i=Zx();Ga.common("api",o.nested.google.nested.protobuf.nested),Ga.common("descriptor",e.nested.google.nested.protobuf.nested),Ga.common("source_context",t.nested.google.nested.protobuf.nested),Ga.common("type",i.nested.google.nested.protobuf.nested)}to.addCommonProtos=DX});var aU=A((iU,Eh)=>{var oU=function(o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var e=null;try{e=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 t(N,p,y){this.low=N|0,this.high=p|0,this.unsigned=!!y}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0});function i(N){return(N&&N.__isLong__)===!0}function a(N){var p=Math.clz32(N&-N);return N?31-p:p}t.isLong=i;var s={},n={};function r(N,p){var y,J,Q;return p?(N>>>=0,(Q=0<=N&&N<256)&&(J=n[N],J)?J:(y=c(N,0,!0),Q&&(n[N]=y),y)):(N|=0,(Q=-128<=N&&N<128)&&(J=s[N],J)?J:(y=c(N,N<0?-1:0,!1),Q&&(s[N]=y),y))}t.fromInt=r;function l(N,p){if(isNaN(N))return p?I:b;if(p){if(N<0)return I;if(N>=M)return Z}else{if(N<=-C)return se;if(N+1>=C)return oe}return N<0?l(-N,p).neg():c(N%v|0,N/v|0,p)}t.fromNumber=l;function c(N,p,y){return new t(N,p,y)}t.fromBits=c;var u=Math.pow;function E(N,p,y){if(N.length===0)throw Error("empty string");if(typeof p=="number"?(y=p,p=!1):p=!!p,N==="NaN"||N==="Infinity"||N==="+Infinity"||N==="-Infinity")return p?I:b;if(y=y||10,y<2||360)throw Error("interior hyphen");if(J===0)return E(N.substring(1),p,y).neg();for(var Q=l(u(y,8)),z=b,ce=0;ce>>0:this.low},R.toNumber=function(){return this.unsigned?(this.high>>>0)*v+(this.low>>>0):this.high*v+(this.low>>>0)},R.toString=function(p){if(p=p||10,p<2||36>>0,ie=he.toString(p);if(ce=Le,ce.isZero())return ie+ue;for(;ie.length<6;)ie="0"+ie;ue=""+ie+ue}},R.getHighBits=function(){return this.high},R.getHighBitsUnsigned=function(){return this.high>>>0},R.getLowBits=function(){return this.low},R.getLowBitsUnsigned=function(){return this.low>>>0},R.getNumBitsAbs=function(){if(this.isNegative())return this.eq(se)?64:this.neg().getNumBitsAbs();for(var p=this.high!=0?this.high:this.low,y=31;y>0&&!(p&1<=0},R.isOdd=function(){return(this.low&1)===1},R.isEven=function(){return(this.low&1)===0},R.equals=function(p){return i(p)||(p=d(p)),this.unsigned!==p.unsigned&&this.high>>>31===1&&p.high>>>31===1?!1:this.high===p.high&&this.low===p.low},R.eq=R.equals,R.notEquals=function(p){return!this.eq(p)},R.neq=R.notEquals,R.ne=R.notEquals,R.lessThan=function(p){return this.comp(p)<0},R.lt=R.lessThan,R.lessThanOrEqual=function(p){return this.comp(p)<=0},R.lte=R.lessThanOrEqual,R.le=R.lessThanOrEqual,R.greaterThan=function(p){return this.comp(p)>0},R.gt=R.greaterThan,R.greaterThanOrEqual=function(p){return this.comp(p)>=0},R.gte=R.greaterThanOrEqual,R.ge=R.greaterThanOrEqual,R.compare=function(p){if(i(p)||(p=d(p)),this.eq(p))return 0;var y=this.isNegative(),J=p.isNegative();return y&&!J?-1:!y&&J?1:this.unsigned?p.high>>>0>this.high>>>0||p.high===this.high&&p.low>>>0>this.low>>>0?-1:1:this.sub(p).isNegative()?-1:1},R.comp=R.compare,R.negate=function(){return!this.unsigned&&this.eq(se)?se:this.not().add(q)},R.neg=R.negate,R.add=function(p){i(p)||(p=d(p));var y=this.high>>>16,J=this.high&65535,Q=this.low>>>16,z=this.low&65535,ce=p.high>>>16,ue=p.high&65535,Le=p.low>>>16,he=p.low&65535,ie=0,De=0,Re=0,xe=0;return xe+=z+he,Re+=xe>>>16,xe&=65535,Re+=Q+Le,De+=Re>>>16,Re&=65535,De+=J+ue,ie+=De>>>16,De&=65535,ie+=y+ce,ie&=65535,c(Re<<16|xe,ie<<16|De,this.unsigned)},R.subtract=function(p){return i(p)||(p=d(p)),this.add(p.neg())},R.sub=R.subtract,R.multiply=function(p){if(this.isZero())return this;if(i(p)||(p=d(p)),e){var y=e.mul(this.low,this.high,p.low,p.high);return c(y,e.get_high(),this.unsigned)}if(p.isZero())return this.unsigned?I:b;if(this.eq(se))return p.isOdd()?se:b;if(p.eq(se))return this.isOdd()?se:b;if(this.isNegative())return p.isNegative()?this.neg().mul(p.neg()):this.neg().mul(p).neg();if(p.isNegative())return this.mul(p.neg()).neg();if(this.lt(P)&&p.lt(P))return l(this.toNumber()*p.toNumber(),this.unsigned);var J=this.high>>>16,Q=this.high&65535,z=this.low>>>16,ce=this.low&65535,ue=p.high>>>16,Le=p.high&65535,he=p.low>>>16,ie=p.low&65535,De=0,Re=0,xe=0,it=0;return it+=ce*ie,xe+=it>>>16,it&=65535,xe+=z*ie,Re+=xe>>>16,xe&=65535,xe+=ce*he,Re+=xe>>>16,xe&=65535,Re+=Q*ie,De+=Re>>>16,Re&=65535,Re+=z*he,De+=Re>>>16,Re&=65535,Re+=ce*Le,De+=Re>>>16,Re&=65535,De+=J*ie+Q*he+z*Le+ce*ue,De&=65535,c(xe<<16|it,De<<16|Re,this.unsigned)},R.mul=R.multiply,R.divide=function(p){if(i(p)||(p=d(p)),p.isZero())throw Error("division by zero");if(e){if(!this.unsigned&&this.high===-2147483648&&p.low===-1&&p.high===-1)return this;var y=(this.unsigned?e.div_u:e.div_s)(this.low,this.high,p.low,p.high);return c(y,e.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?I:b;var J,Q,z;if(this.unsigned){if(p.unsigned||(p=p.toUnsigned()),p.gt(this))return I;if(p.gt(this.shru(1)))return K;z=I}else{if(this.eq(se)){if(p.eq(q)||p.eq(k))return se;if(p.eq(se))return q;var ce=this.shr(1);return J=ce.div(p).shl(1),J.eq(b)?p.isNegative()?q:k:(Q=this.sub(p.mul(J)),z=J.add(Q.div(p)),z)}else if(p.eq(se))return this.unsigned?I:b;if(this.isNegative())return p.isNegative()?this.neg().div(p.neg()):this.neg().div(p).neg();if(p.isNegative())return this.div(p.neg()).neg();z=b}for(Q=this;Q.gte(p);){J=Math.max(1,Math.floor(Q.toNumber()/p.toNumber()));for(var ue=Math.ceil(Math.log(J)/Math.LN2),Le=ue<=48?1:u(2,ue-48),he=l(J),ie=he.mul(p);ie.isNegative()||ie.gt(Q);)J-=Le,he=l(J,this.unsigned),ie=he.mul(p);he.isZero()&&(he=q),z=z.add(he),Q=Q.sub(ie)}return z},R.div=R.divide,R.modulo=function(p){if(i(p)||(p=d(p)),e){var y=(this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,p.low,p.high);return c(y,e.get_high(),this.unsigned)}return this.sub(this.div(p).mul(p))},R.mod=R.modulo,R.rem=R.modulo,R.not=function(){return c(~this.low,~this.high,this.unsigned)},R.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},R.clz=R.countLeadingZeros,R.countTrailingZeros=function(){return this.low?a(this.low):a(this.high)+32},R.ctz=R.countTrailingZeros,R.and=function(p){return i(p)||(p=d(p)),c(this.low&p.low,this.high&p.high,this.unsigned)},R.or=function(p){return i(p)||(p=d(p)),c(this.low|p.low,this.high|p.high,this.unsigned)},R.xor=function(p){return i(p)||(p=d(p)),c(this.low^p.low,this.high^p.high,this.unsigned)},R.shiftLeft=function(p){return i(p)&&(p=p.toInt()),(p&=63)===0?this:p<32?c(this.low<>>32-p,this.unsigned):c(0,this.low<>>p|this.high<<32-p,this.high>>p,this.unsigned):c(this.high>>p-32,this.high>=0?0:-1,this.unsigned)},R.shr=R.shiftRight,R.shiftRightUnsigned=function(p){return i(p)&&(p=p.toInt()),(p&=63)===0?this:p<32?c(this.low>>>p|this.high<<32-p,this.high>>>p,this.unsigned):p===32?c(this.high,0,this.unsigned):c(this.high>>>p-32,0,this.unsigned)},R.shru=R.shiftRightUnsigned,R.shr_u=R.shiftRightUnsigned,R.rotateLeft=function(p){var y;return i(p)&&(p=p.toInt()),(p&=63)===0?this:p===32?c(this.high,this.low,this.unsigned):p<32?(y=32-p,c(this.low<>>y,this.high<>>y,this.unsigned)):(p-=32,y=32-p,c(this.high<>>y,this.low<>>y,this.unsigned))},R.rotl=R.rotateLeft,R.rotateRight=function(p){var y;return i(p)&&(p=p.toInt()),(p&=63)===0?this:p===32?c(this.high,this.low,this.unsigned):p<32?(y=32-p,c(this.high<>>p,this.low<>>p,this.unsigned)):(p-=32,y=32-p,c(this.low<>>p,this.high<>>p,this.unsigned))},R.rotr=R.rotateRight,R.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},R.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},R.toBytes=function(p){return p?this.toBytesLE():this.toBytesBE()},R.toBytesLE=function(){var p=this.high,y=this.low;return[y&255,y>>>8&255,y>>>16&255,y>>>24,p&255,p>>>8&255,p>>>16&255,p>>>24]},R.toBytesBE=function(){var p=this.high,y=this.low;return[p>>>24,p>>>16&255,p>>>8&255,p&255,y>>>24,y>>>16&255,y>>>8&255,y&255]},t.fromBytes=function(p,y,J){return J?t.fromBytesLE(p,y):t.fromBytesBE(p,y)},t.fromBytesLE=function(p,y){return new t(p[0]|p[1]<<8|p[2]<<16|p[3]<<24,p[4]|p[5]<<8|p[6]<<16|p[7]<<24,y)},t.fromBytesBE=function(p,y){return new t(p[4]<<24|p[5]<<16|p[6]<<8|p[7],p[0]<<24|p[1]<<16|p[2]<<8|p[3],y)};var B=t;return o.default=B,"default"in o?o.default:o}({});typeof define=="function"&&define.amd?define([],function(){return oU}):typeof Eh=="object"&&typeof iU=="object"&&(Eh.exports=oU)});var TU=A(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.loadFileDescriptorSetFromObject=Fe.loadFileDescriptorSetFromBuffer=Fe.fromJSON=Fe.loadSync=Fe.load=Fe.IdempotencyLevel=Fe.isAnyExtension=Fe.Long=void 0;var xX=BD(),Yr=cT(),Th=Xx(),Sh=nU(),UX=aU();Fe.Long=UX;function bX(o){return"@type"in o&&typeof o["@type"]=="string"}Fe.isAnyExtension=bX;var cU;(function(o){o.IDEMPOTENCY_UNKNOWN="IDEMPOTENCY_UNKNOWN",o.NO_SIDE_EFFECTS="NO_SIDE_EFFECTS",o.IDEMPOTENT="IDEMPOTENT"})(cU=Fe.IdempotencyLevel||(Fe.IdempotencyLevel={}));var uU={longs:String,enums:String,bytes:String,defaults:!0,oneofs:!0,json:!0};function VX(o,e){return o===""?e:o+"."+e}function wX(o){return o instanceof Yr.Service||o instanceof Yr.Type||o instanceof Yr.Enum}function BX(o){return o instanceof Yr.Namespace||o instanceof Yr.Root}function EU(o,e){let t=VX(e,o.name);return wX(o)?[[t,o]]:BX(o)&&typeof o.nested<"u"?Object.keys(o.nested).map(i=>EU(o.nested[i],t)).reduce((i,a)=>i.concat(a),[]):[]}function sU(o,e){return function(i){return o.toObject(o.decode(i),e)}}function lU(o){return function(t){if(Array.isArray(t))throw new Error(`Failed to serialize message: expected object with ${o.name} structure, got array instead`);let i=o.fromObject(t);return o.encode(i).finish()}}function GX(o){return(o||[]).reduce((e,t)=>{for(let[i,a]of Object.entries(t))switch(i){case"uninterpreted_option":e.uninterpreted_option.push(t.uninterpreted_option);break;default:e[i]=a}return e},{deprecated:!1,idempotency_level:cU.IDEMPOTENCY_UNKNOWN,uninterpreted_option:[]})}function HX(o,e,t,i){let a=o.resolvedRequestType,s=o.resolvedResponseType;return{path:"/"+e+"/"+o.name,requestStream:!!o.requestStream,responseStream:!!o.responseStream,requestSerialize:lU(a),requestDeserialize:sU(a,t),responseSerialize:lU(s),responseDeserialize:sU(s,t),originalName:xX(o.name),requestType:_h(a,i),responseType:_h(s,i),options:GX(o.parsedOptions)}}function kX(o,e,t,i){let a={};for(let s of o.methodsArray)a[s.name]=HX(s,e,t,i);return a}function _h(o,e){let t=o.toDescriptor("proto3");return{format:"Protocol Buffer 3 DescriptorProto",type:t.$type.toObject(t,uU),fileDescriptorProtos:e}}function YX(o,e){let t=o.toDescriptor("proto3");return{format:"Protocol Buffer 3 EnumDescriptorProto",type:t.$type.toObject(t,uU),fileDescriptorProtos:e}}function FX(o,e,t,i){if(o instanceof Yr.Service)return kX(o,e,t,i);if(o instanceof Yr.Type)return _h(o,i);if(o instanceof Yr.Enum)return YX(o,i);throw new Error("Type mismatch in reflection object handling")}function _T(o,e){let t={};o.resolveAll();let a=o.toDescriptor("proto3").file.map(s=>Buffer.from(Th.FileDescriptorProto.encode(s).finish()));for(let[s,n]of EU(o,""))t[s]=FX(n,s,e,a);return t}function _U(o,e){e=e||{};let t=Yr.Root.fromDescriptor(o);return t.resolveAll(),_T(t,e)}function KX(o,e){return(0,Sh.loadProtosWithOptions)(o,e).then(t=>_T(t,e))}Fe.load=KX;function qX(o,e){let t=(0,Sh.loadProtosWithOptionsSync)(o,e);return _T(t,e)}Fe.loadSync=qX;function WX(o,e){e=e||{};let t=Yr.Root.fromJSON(o);return t.resolveAll(),_T(t,e)}Fe.fromJSON=WX;function jX(o,e){let t=Th.FileDescriptorSet.decode(o);return _U(t,e)}Fe.loadFileDescriptorSetFromBuffer=jX;function zX(o,e){let t=Th.FileDescriptorSet.fromObject(o);return _U(t,e)}Fe.loadFileDescriptorSetFromObject=zX;(0,Sh.addCommonProtos)()});var Wo=A(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.setup=ve.getChannelzServiceDefinition=ve.getChannelzHandlers=ve.unregisterChannelzRef=ve.registerChannelzSocket=ve.registerChannelzServer=ve.registerChannelzSubchannel=ve.registerChannelzChannel=ve.ChannelzCallTrackerStub=ve.ChannelzCallTracker=ve.ChannelzChildrenTrackerStub=ve.ChannelzChildrenTracker=ve.ChannelzTrace=ve.ChannelzTraceStub=void 0;var SU=H("net"),qo=(aD(),$(iD)),Kl=$t(),ql=fe(),$X=Sr(),XX=G_(),JX=PA();function ph(o){return{channel_id:o.id,name:o.name}}function vh(o){return{subchannel_id:o.id,name:o.name}}function QX(o){return{server_id:o.id}}function dT(o){return{socket_id:o.id,name:o.name}}var pU=32,Rh=100,dh=class{constructor(){this.events=[],this.creationTimestamp=new Date,this.eventsLogged=0}addTrace(){}getTraceMessage(){return{creation_timestamp:Fr(this.creationTimestamp),num_events_logged:this.eventsLogged,events:[]}}};ve.ChannelzTraceStub=dh;var fh=class{constructor(){this.events=[],this.eventsLogged=0,this.creationTimestamp=new Date}addTrace(e,t,i){let a=new Date;this.events.push({description:t,severity:e,timestamp:a,childChannel:(i==null?void 0:i.kind)==="channel"?i:void 0,childSubchannel:(i==null?void 0:i.kind)==="subchannel"?i:void 0}),this.events.length>=pU*2&&(this.events=this.events.slice(pU)),this.eventsLogged+=1}getTraceMessage(){return{creation_timestamp:Fr(this.creationTimestamp),num_events_logged:this.eventsLogged,events:this.events.map(e=>({description:e.description,severity:e.severity,timestamp:Fr(e.timestamp),channel_ref:e.childChannel?ph(e.childChannel):null,subchannel_ref:e.childSubchannel?vh(e.childSubchannel):null}))}}};ve.ChannelzTrace=fh;var ST=class{constructor(){this.channelChildren=new qo.OrderedMap,this.subchannelChildren=new qo.OrderedMap,this.socketChildren=new qo.OrderedMap,this.trackerMap={channel:this.channelChildren,subchannel:this.subchannelChildren,socket:this.socketChildren}}refChild(e){let t=this.trackerMap[e.kind],i=t.find(e.id);i.equals(t.end())?t.setElement(e.id,{ref:e,count:1},i):i.pointer[1].count+=1}unrefChild(e){let t=this.trackerMap[e.kind],i=t.getElementByKey(e.id);i!==void 0&&(i.count-=1,i.count===0&&t.eraseElementByKey(e.id))}getChildLists(){return{channels:this.channelChildren,subchannels:this.subchannelChildren,sockets:this.socketChildren}}};ve.ChannelzChildrenTracker=ST;var Ah=class extends ST{refChild(){}unrefChild(){}};ve.ChannelzChildrenTrackerStub=Ah;var pT=class{constructor(){this.callsStarted=0,this.callsSucceeded=0,this.callsFailed=0,this.lastCallStartedTimestamp=null}addCallStarted(){this.callsStarted+=1,this.lastCallStartedTimestamp=new Date}addCallSucceeded(){this.callsSucceeded+=1}addCallFailed(){this.callsFailed+=1}};ve.ChannelzCallTracker=pT;var hh=class extends pT{addCallStarted(){}addCallSucceeded(){}addCallFailed(){}};ve.ChannelzCallTrackerStub=hh;var Tn={channel:new qo.OrderedMap,subchannel:new qo.OrderedMap,server:new qo.OrderedMap,socket:new qo.OrderedMap},fT=o=>{let e=1;function t(){return e++}let i=Tn[o];return(a,s,n)=>{let r=t(),l={id:r,name:a,kind:o};return n&&i.setElement(r,{ref:l,getInfo:s}),l}};ve.registerChannelzChannel=fT("channel");ve.registerChannelzSubchannel=fT("subchannel");ve.registerChannelzServer=fT("server");ve.registerChannelzSocket=fT("socket");function ZX(o){Tn[o.kind].eraseElementByKey(o.id)}ve.unregisterChannelzRef=ZX;function e5(o){let e=Number.parseInt(o,16);return[e/256|0,e%256]}function dU(o){if(o==="")return[];let e=o.split(":").map(i=>e5(i));return[].concat(...e)}function t5(o){if((0,SU.isIPv4)(o))return Buffer.from(Uint8Array.from(o.split(".").map(e=>Number.parseInt(e))));if((0,SU.isIPv6)(o)){let e,t,i=o.indexOf("::");i===-1?(e=o,t=""):(e=o.substring(0,i),t=o.substring(i+2));let a=Buffer.from(dU(e)),s=Buffer.from(dU(t)),n=Buffer.alloc(16-a.length-s.length,0);return Buffer.concat([a,n,s])}else return null}function AU(o){switch(o){case Kl.ConnectivityState.CONNECTING:return{state:"CONNECTING"};case Kl.ConnectivityState.IDLE:return{state:"IDLE"};case Kl.ConnectivityState.READY:return{state:"READY"};case Kl.ConnectivityState.SHUTDOWN:return{state:"SHUTDOWN"};case Kl.ConnectivityState.TRANSIENT_FAILURE:return{state:"TRANSIENT_FAILURE"};default:return{state:"UNKNOWN"}}}function Fr(o){if(!o)return null;let e=o.getTime();return{seconds:e/1e3|0,nanos:e%1e3*1e6}}function hU(o){let e=o.getInfo(),t=[],i=[];return e.children.channels.forEach(a=>{t.push(ph(a[1].ref))}),e.children.subchannels.forEach(a=>{i.push(vh(a[1].ref))}),{ref:ph(o.ref),data:{target:e.target,state:AU(e.state),calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:Fr(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},channel_ref:t,subchannel_ref:i}}function r5(o,e){let t=parseInt(o.request.channel_id,10),i=Tn.channel.getElementByKey(t);if(i===void 0){e({code:ql.Status.NOT_FOUND,details:"No channel data found for id "+t});return}e(null,{channel:hU(i)})}function n5(o,e){let t=parseInt(o.request.max_results,10)||Rh,i=[],a=parseInt(o.request.start_channel_id,10),s=Tn.channel,n;for(n=s.lowerBound(a);!n.equals(s.end())&&i.length{t.push(dT(i[1].ref))}),{ref:QX(o.ref),data:{calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:Fr(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},listen_socket:t}}function o5(o,e){let t=parseInt(o.request.server_id,10),a=Tn.server.getElementByKey(t);if(a===void 0){e({code:ql.Status.NOT_FOUND,details:"No server data found for id "+t});return}e(null,{server:vU(a)})}function i5(o,e){let t=parseInt(o.request.max_results,10)||Rh,i=parseInt(o.request.start_server_id,10),a=Tn.server,s=[],n;for(n=a.lowerBound(i);!n.equals(a.end())&&s.length{s.push(dT(r[1].ref))});let n={ref:vh(i.ref),data:{target:a.target,state:AU(a.state),calls_started:a.callTracker.callsStarted,calls_succeeded:a.callTracker.callsSucceeded,calls_failed:a.callTracker.callsFailed,last_call_started_timestamp:Fr(a.callTracker.lastCallStartedTimestamp),trace:a.trace.getTraceMessage()},socket_ref:s};e(null,{subchannel:n})}function fU(o){var e;return(0,$X.isTcpSubchannelAddress)(o)?{address:"tcpip_address",tcpip_address:{ip_address:(e=t5(o.host))!==null&&e!==void 0?e:void 0,port:o.port}}:{address:"uds_address",uds_address:{filename:o.path}}}function s5(o,e){var t,i,a,s,n;let r=parseInt(o.request.socket_id,10),l=Tn.socket.getElementByKey(r);if(l===void 0){e({code:ql.Status.NOT_FOUND,details:"No socket data found for id "+r});return}let c=l.getInfo(),u=c.security?{model:"tls",tls:{cipher_suite:c.security.cipherSuiteStandardName?"standard_name":"other_name",standard_name:(t=c.security.cipherSuiteStandardName)!==null&&t!==void 0?t:void 0,other_name:(i=c.security.cipherSuiteOtherName)!==null&&i!==void 0?i:void 0,local_certificate:(a=c.security.localCertificate)!==null&&a!==void 0?a:void 0,remote_certificate:(s=c.security.remoteCertificate)!==null&&s!==void 0?s:void 0}}:null,E={ref:dT(l.ref),local:c.localAddress?fU(c.localAddress):null,remote:c.remoteAddress?fU(c.remoteAddress):null,remote_name:(n=c.remoteName)!==null&&n!==void 0?n:void 0,security:u,data:{keep_alives_sent:c.keepAlivesSent,streams_started:c.streamsStarted,streams_succeeded:c.streamsSucceeded,streams_failed:c.streamsFailed,last_local_stream_created_timestamp:Fr(c.lastLocalStreamCreatedTimestamp),last_remote_stream_created_timestamp:Fr(c.lastRemoteStreamCreatedTimestamp),messages_received:c.messagesReceived,messages_sent:c.messagesSent,last_message_received_timestamp:Fr(c.lastMessageReceivedTimestamp),last_message_sent_timestamp:Fr(c.lastMessageSentTimestamp),local_flow_control_window:c.localFlowControlWindow?{value:c.localFlowControlWindow}:null,remote_flow_control_window:c.remoteFlowControlWindow?{value:c.remoteFlowControlWindow}:null}};e(null,{socket:E})}function l5(o,e){let t=parseInt(o.request.server_id,10),i=Tn.server.getElementByKey(t);if(i===void 0){e({code:ql.Status.NOT_FOUND,details:"No server data found for id "+t});return}let a=parseInt(o.request.start_socket_id,10),s=parseInt(o.request.max_results,10)||Rh,r=i.getInfo().sessionChildren.sockets,l=[],c;for(c=r.lowerBound(a);!c.equals(r.end())&&l.length{"use strict";Object.defineProperty(hT,"__esModule",{value:!0});hT.Subchannel=void 0;var Pe=$t(),u5=Cl(),mh=Ie(),AT=fe(),E5=Ut(),_5=Sr(),Kr=Wo(),T5="subchannel",S5=~(1<<31),Oh=class{constructor(e,t,i,a,s){var n;this.channelTarget=e,this.subchannelAddress=t,this.options=i,this.credentials=a,this.connector=s,this.connectivityState=Pe.ConnectivityState.IDLE,this.transport=null,this.continueConnecting=!1,this.stateListeners=new Set,this.refcount=0,this.channelzEnabled=!0;let r={initialDelay:i["grpc.initial_reconnect_backoff_ms"],maxDelay:i["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new u5.BackoffTimeout(()=>{this.handleBackoffTimer()},r),this.backoffTimeout.unref(),this.subchannelAddressString=(0,_5.subchannelAddressToString)(t),this.keepaliveTime=(n=i["grpc.keepalive_time_ms"])!==null&&n!==void 0?n:-1,i["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new Kr.ChannelzTraceStub,this.callTracker=new Kr.ChannelzCallTrackerStub,this.childrenTracker=new Kr.ChannelzChildrenTrackerStub,this.streamTracker=new Kr.ChannelzCallTrackerStub):(this.channelzTrace=new Kr.ChannelzTrace,this.callTracker=new Kr.ChannelzCallTracker,this.childrenTracker=new Kr.ChannelzChildrenTracker,this.streamTracker=new Kr.ChannelzCallTracker),this.channelzRef=(0,Kr.registerChannelzSubchannel)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Subchannel created"),this.trace("Subchannel constructed with options "+JSON.stringify(i,void 0,2))}getChannelzInfo(){return{state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists(),target:this.subchannelAddressString}}trace(e){mh.trace(AT.LogVerbosity.DEBUG,T5,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}refTrace(e){mh.trace(AT.LogVerbosity.DEBUG,"subchannel_refcount","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}handleBackoffTimer(){this.continueConnecting?this.transitionToState([Pe.ConnectivityState.TRANSIENT_FAILURE],Pe.ConnectivityState.CONNECTING):this.transitionToState([Pe.ConnectivityState.TRANSIENT_FAILURE],Pe.ConnectivityState.IDLE)}startBackoff(){this.backoffTimeout.runOnce()}stopBackoff(){this.backoffTimeout.stop(),this.backoffTimeout.reset()}startConnectingInternal(){let e=this.options;if(e["grpc.keepalive_time_ms"]){let t=Math.min(this.keepaliveTime,S5);e=Object.assign(Object.assign({},e),{"grpc.keepalive_time_ms":t})}this.connector.connect(this.subchannelAddress,this.credentials,e).then(t=>{this.transitionToState([Pe.ConnectivityState.CONNECTING],Pe.ConnectivityState.READY)?(this.transport=t,this.channelzEnabled&&this.childrenTracker.refChild(t.getChannelzRef()),t.addDisconnectListener(i=>{this.transitionToState([Pe.ConnectivityState.READY],Pe.ConnectivityState.IDLE),i&&this.keepaliveTime>0&&(this.keepaliveTime*=2,mh.log(AT.LogVerbosity.ERROR,`Connection to ${(0,E5.uriToString)(this.channelTarget)} at ${this.subchannelAddressString} rejected by server because of excess pings. Increasing ping interval to ${this.keepaliveTime} ms`))})):t.shutdown()},t=>{this.transitionToState([Pe.ConnectivityState.CONNECTING],Pe.ConnectivityState.TRANSIENT_FAILURE,`${t}`)})}transitionToState(e,t,i){var a,s;if(e.indexOf(this.connectivityState)===-1)return!1;this.trace(Pe.ConnectivityState[this.connectivityState]+" -> "+Pe.ConnectivityState[t]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+Pe.ConnectivityState[t]);let n=this.connectivityState;switch(this.connectivityState=t,t){case Pe.ConnectivityState.READY:this.stopBackoff();break;case Pe.ConnectivityState.CONNECTING:this.startBackoff(),this.startConnectingInternal(),this.continueConnecting=!1;break;case Pe.ConnectivityState.TRANSIENT_FAILURE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(a=this.transport)===null||a===void 0||a.shutdown(),this.transport=null,this.backoffTimeout.isRunning()||process.nextTick(()=>{this.handleBackoffTimer()});break;case Pe.ConnectivityState.IDLE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(s=this.transport)===null||s===void 0||s.shutdown(),this.transport=null;break;default:throw new Error(`Invalid state: unknown ConnectivityState ${t}`)}for(let r of this.stateListeners)r(this,n,t,this.keepaliveTime,i);return!0}ref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount+1)),this.refcount+=1}unref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount-1)),this.refcount-=1,this.refcount===0&&(this.channelzTrace.addTrace("CT_INFO","Shutting down"),(0,Kr.unregisterChannelzRef)(this.channelzRef),process.nextTick(()=>{this.transitionToState([Pe.ConnectivityState.CONNECTING,Pe.ConnectivityState.READY],Pe.ConnectivityState.IDLE)}))}unrefIfOneRef(){return this.refcount===1?(this.unref(),!0):!1}createCall(e,t,i,a){if(!this.transport)throw new Error("Cannot create call, subchannel not READY");let s;return this.channelzEnabled?(this.callTracker.addCallStarted(),this.streamTracker.addCallStarted(),s={onCallEnd:n=>{n.code===AT.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()}}):s={},this.transport.createCall(e,t,i,a,s)}startConnecting(){process.nextTick(()=>{this.transitionToState([Pe.ConnectivityState.IDLE],Pe.ConnectivityState.CONNECTING)||this.connectivityState===Pe.ConnectivityState.TRANSIENT_FAILURE&&(this.continueConnecting=!0)})}getConnectivityState(){return this.connectivityState}addConnectivityStateListener(e){this.stateListeners.add(e)}removeConnectivityStateListener(e){this.stateListeners.delete(e)}resetBackoff(){process.nextTick(()=>{this.backoffTimeout.reset(),this.transitionToState([Pe.ConnectivityState.TRANSIENT_FAILURE],Pe.ConnectivityState.CONNECTING)})}getAddress(){return this.subchannelAddressString}getChannelzRef(){return this.channelzRef}isHealthy(){return!0}addHealthStateWatcher(e){}removeHealthStateWatcher(e){}getRealSubchannel(){return this}realSubchannelEquals(e){return e.getRealSubchannel()===this}throttleKeepalive(e){e>this.keepaliveTime&&(this.keepaliveTime=e)}};hT.Subchannel=Oh});var Ph=A(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.setup=oo.DEFAULT_PORT=void 0;var NU=br(),CU=H("dns"),PU=H("util"),p5=Qf(),Nh=fe(),Mh=ht(),d5=Ie(),f5=fe(),ro=Ut(),MU=H("net"),A5=Cl(),h5="dns_resolver";function no(o){d5.trace(f5.LogVerbosity.DEBUG,h5,o)}oo.DEFAULT_PORT=443;var v5=3e4,R5=PU.promisify(CU.resolveTxt),m5=PU.promisify(CU.lookup),Ch=class{constructor(e,t,i){var a,s,n;this.target=e,this.listener=t,this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.continueResolving=!1,this.isNextResolutionTimerRunning=!1,this.isServiceConfigEnabled=!0,this.returnedIpResult=!1,no("Resolver constructed for target "+(0,ro.uriToString)(e));let r=(0,ro.splitHostPort)(e.path);r===null?(this.ipResult=null,this.dnsHostname=null,this.port=null):(0,MU.isIPv4)(r.host)||(0,MU.isIPv6)(r.host)?(this.ipResult=[{addresses:[{host:r.host,port:(a=r.port)!==null&&a!==void 0?a:oo.DEFAULT_PORT}]}],this.dnsHostname=null,this.port=null):(this.ipResult=null,this.dnsHostname=r.host,this.port=(s=r.port)!==null&&s!==void 0?s:oo.DEFAULT_PORT),this.percentage=Math.random()*100,i["grpc.service_config_disable_resolution"]===1&&(this.isServiceConfigEnabled=!1),this.defaultResolutionError={code:Nh.Status.UNAVAILABLE,details:`Name resolution failed for target ${(0,ro.uriToString)(this.target)}`,metadata:new Mh.Metadata};let l={initialDelay:i["grpc.initial_reconnect_backoff_ms"],maxDelay:i["grpc.max_reconnect_backoff_ms"]};this.backoff=new A5.BackoffTimeout(()=>{this.continueResolving&&this.startResolutionWithBackoff()},l),this.backoff.unref(),this.minTimeBetweenResolutionsMs=(n=i["grpc.dns_min_time_between_resolutions_ms"])!==null&&n!==void 0?n:v5,this.nextResolutionTimer=setTimeout(()=>{},0),clearTimeout(this.nextResolutionTimer)}startResolution(){if(this.ipResult!==null){this.returnedIpResult||(no("Returning IP address for target "+(0,ro.uriToString)(this.target)),setImmediate(()=>{this.listener.onSuccessfulResolution(this.ipResult,null,null,null,{})}),this.returnedIpResult=!0),this.backoff.stop(),this.backoff.reset(),this.stopNextResolutionTimer();return}if(this.dnsHostname===null)no("Failed to parse DNS address "+(0,ro.uriToString)(this.target)),setImmediate(()=>{this.listener.onError({code:Nh.Status.UNAVAILABLE,details:`Failed to parse DNS address ${(0,ro.uriToString)(this.target)}`,metadata:new Mh.Metadata})}),this.stopNextResolutionTimer();else{if(this.pendingLookupPromise!==null)return;no("Looking up DNS hostname "+this.dnsHostname),this.latestLookupResult=null;let e=this.dnsHostname;this.pendingLookupPromise=m5(e,{all:!0}),this.pendingLookupPromise.then(t=>{if(this.pendingLookupPromise===null)return;this.pendingLookupPromise=null,this.backoff.reset(),this.backoff.stop();let i=t.map(s=>({host:s.address,port:+this.port}));this.latestLookupResult=i.map(s=>({addresses:[s]}));let a="["+i.map(s=>s.host+":"+s.port).join(",")+"]";if(no("Resolved addresses for target "+(0,ro.uriToString)(this.target)+": "+a),this.latestLookupResult.length===0){this.listener.onError(this.defaultResolutionError);return}this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})},t=>{this.pendingLookupPromise!==null&&(no("Resolution error for target "+(0,ro.uriToString)(this.target)+": "+t.message),this.pendingLookupPromise=null,this.stopNextResolutionTimer(),this.listener.onError(this.defaultResolutionError))}),this.isServiceConfigEnabled&&this.pendingTxtPromise===null&&(this.pendingTxtPromise=R5(e),this.pendingTxtPromise.then(t=>{if(this.pendingTxtPromise!==null){this.pendingTxtPromise=null;try{this.latestServiceConfig=(0,p5.extractAndSelectServiceConfig)(t,this.percentage)}catch(i){this.latestServiceConfigError={code:Nh.Status.UNAVAILABLE,details:`Parsing service config failed with error ${i.message}`,metadata:new Mh.Metadata}}this.latestLookupResult!==null&&this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})}},t=>{}))}}startNextResolutionTimer(){var e,t;clearTimeout(this.nextResolutionTimer),this.nextResolutionTimer=setTimeout(()=>{this.stopNextResolutionTimer(),this.continueResolving&&this.startResolutionWithBackoff()},this.minTimeBetweenResolutionsMs),(t=(e=this.nextResolutionTimer).unref)===null||t===void 0||t.call(e),this.isNextResolutionTimerRunning=!0}stopNextResolutionTimer(){clearTimeout(this.nextResolutionTimer),this.isNextResolutionTimerRunning=!1}startResolutionWithBackoff(){this.pendingLookupPromise===null&&(this.continueResolving=!1,this.backoff.runOnce(),this.startNextResolutionTimer(),this.startResolution())}updateResolution(){this.pendingLookupPromise===null&&(this.isNextResolutionTimerRunning||this.backoff.isRunning()?(this.isNextResolutionTimerRunning?no('resolution update delayed by "min time between resolutions" rate limit'):no("resolution update delayed by backoff timer until "+this.backoff.getEndTime().toISOString()),this.continueResolving=!0):this.startResolutionWithBackoff())}destroy(){this.continueResolving=!1,this.backoff.reset(),this.backoff.stop(),this.stopNextResolutionTimer(),this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.returnedIpResult=!1}static getDefaultAuthority(e){return e.path}};function O5(){(0,NU.registerResolver)("dns",Ch),(0,NU.registerDefaultScheme)("dns")}oo.setup=O5});var gh=A(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.getProxiedConnection=Ya.mapProxyName=void 0;var Wl=Ie(),Ha=fe(),N5=br(),M5=H("http"),C5=H("tls"),P5=Ie(),gU=Sr(),ka=Ut(),g5=H("url"),L5=Ph(),y5="proxy";function io(o){P5.trace(Ha.LogVerbosity.DEBUG,y5,o)}function I5(){let o="",e="";if(process.env.grpc_proxy)e="grpc_proxy",o=process.env.grpc_proxy;else if(process.env.https_proxy)e="https_proxy",o=process.env.https_proxy;else if(process.env.http_proxy)e="http_proxy",o=process.env.http_proxy;else return{};let t;try{t=new g5.URL(o)}catch{return(0,Wl.log)(Ha.LogVerbosity.ERROR,`cannot parse value of "${e}" env var`),{}}if(t.protocol!=="http:")return(0,Wl.log)(Ha.LogVerbosity.ERROR,`"${t.protocol}" scheme not supported in proxy URI`),{};let i=null;t.username&&(t.password?((0,Wl.log)(Ha.LogVerbosity.INFO,"userinfo found in proxy URI"),i=`${t.username}:${t.password}`):i=t.username);let a=t.hostname,s=t.port;s===""&&(s="80");let n={address:`${a}:${s}`};return i&&(n.creds=i),io("Proxy server "+n.address+" set by environment variable "+e),n}function D5(){let o=process.env.no_grpc_proxy,e="no_grpc_proxy";return o||(o=process.env.no_proxy,e="no_proxy"),o?(io("No proxy server list set by environment variable "+e),o.split(",")):[]}function x5(o,e){var t;let i={target:o,extraOptions:{}};if(((t=e["grpc.enable_http_proxy"])!==null&&t!==void 0?t:1)===0||o.scheme==="unix")return i;let a=I5();if(!a.address)return i;let s=(0,ka.splitHostPort)(o.path);if(!s)return i;let n=s.host;for(let l of D5())if(l===n)return io("Not using proxy for target in no_proxy list: "+(0,ka.uriToString)(o)),i;let r={"grpc.http_connect_target":(0,ka.uriToString)(o)};return a.creds&&(r["grpc.http_connect_creds"]=a.creds),{target:{scheme:"dns",path:a.address},extraOptions:r}}Ya.mapProxyName=x5;function U5(o,e,t){var i;if(!("grpc.http_connect_target"in e))return Promise.resolve({});let a=e["grpc.http_connect_target"],s=(0,ka.parseUri)(a);if(s===null)return Promise.resolve({});let n=(0,ka.splitHostPort)(s.path);if(n===null)return Promise.resolve({});let r=`${n.host}:${(i=n.port)!==null&&i!==void 0?i:L5.DEFAULT_PORT}`,l={method:"CONNECT",path:r},c={Host:r};(0,gU.isTcpSubchannelAddress)(o)?(l.host=o.host,l.port=o.port):l.socketPath=o.path,"grpc.http_connect_creds"in e&&(c["Proxy-Authorization"]="Basic "+Buffer.from(e["grpc.http_connect_creds"]).toString("base64")),l.headers=c;let u=(0,gU.subchannelAddressToString)(o);return io("Using proxy "+u+" to connect to "+l.path),new Promise((E,d)=>{let f=M5.request(l);f.once("connect",(O,v,M)=>{var C;if(f.removeAllListeners(),v.removeAllListeners(),O.statusCode===200)if(io("Successfully connected to "+l.path+" through proxy "+u),"secureContext"in t){let P=(0,N5.getDefaultAuthority)(s),b=(0,ka.splitHostPort)(P),I=(C=b==null?void 0:b.host)!==null&&C!==void 0?C:P,q=C5.connect(Object.assign({host:I,servername:I,socket:v},t),()=>{io("Successfully established a TLS connection to "+l.path+" through proxy "+u),E({socket:q,realTarget:s})});q.on("error",K=>{io("Failed to establish a TLS connection to "+l.path+" through proxy "+u+" with error "+K.message),d()})}else io("Successfully established a plaintext connection to "+l.path+" through proxy "+u),E({socket:v,realTarget:s});else(0,Wl.log)(Ha.LogVerbosity.ERROR,"Failed to connect to "+l.path+" through proxy "+u+" with status "+O.statusCode),d()}),f.once("error",O=>{f.removeAllListeners(),(0,Wl.log)(Ha.LogVerbosity.ERROR,"Failed to connect to proxy "+u+" with error "+O.message),d()}),f.end()})}Ya.getProxiedConnection=U5});var yh=A(vT=>{"use strict";Object.defineProperty(vT,"__esModule",{value:!0});vT.StreamDecoder=void 0;var qr;(function(o){o[o.NO_DATA=0]="NO_DATA",o[o.READING_SIZE=1]="READING_SIZE",o[o.READING_MESSAGE=2]="READING_MESSAGE"})(qr||(qr={}));var Lh=class{constructor(e){this.maxReadMessageLength=e,this.readState=qr.NO_DATA,this.readCompressFlag=Buffer.alloc(1),this.readPartialSize=Buffer.alloc(4),this.readSizeRemaining=4,this.readMessageSize=0,this.readPartialMessage=[],this.readMessageRemaining=0}write(e){let t=0,i,a=[];for(;tthis.maxReadMessageLength)throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`);if(this.readMessageRemaining=this.readMessageSize,this.readMessageRemaining>0)this.readState=qr.READING_MESSAGE;else{let s=Buffer.concat([this.readCompressFlag,this.readPartialSize],5);this.readState=qr.NO_DATA,a.push(s)}}break;case qr.READING_MESSAGE:if(i=Math.min(e.length-t,this.readMessageRemaining),this.readPartialMessage.push(e.slice(t,t+i)),this.readMessageRemaining-=i,t+=i,this.readMessageRemaining===0){let s=[this.readCompressFlag,this.readPartialSize].concat(this.readPartialMessage),n=Buffer.concat(s,this.readMessageSize+5);this.readState=qr.NO_DATA,a.push(n)}break;default:throw new Error("Unexpected read state")}return a}};vT.StreamDecoder=Lh});var yU=A(RT=>{"use strict";Object.defineProperty(RT,"__esModule",{value:!0});RT.Http2SubchannelCall=void 0;var Sn=H("http2"),b5=H("os"),Ne=fe(),pn=ht(),V5=yh(),w5=Ie(),B5=fe(),G5="subchannel_call";function H5(o){for(let[e,t]of Object.entries(b5.constants.errno))if(t===o)return e;return"Unknown system error "+o}function LU(o){let e=`Received HTTP status code ${o}`,t;switch(o){case 400:t=Ne.Status.INTERNAL;break;case 401:t=Ne.Status.UNAUTHENTICATED;break;case 403:t=Ne.Status.PERMISSION_DENIED;break;case 404:t=Ne.Status.UNIMPLEMENTED;break;case 429:case 502:case 503:case 504:t=Ne.Status.UNAVAILABLE;break;default:t=Ne.Status.UNKNOWN}return{code:t,details:e,metadata:new pn.Metadata}}var Ih=class{constructor(e,t,i,a,s){var n;this.http2Stream=e,this.callEventTracker=t,this.listener=i,this.transport=a,this.callId=s,this.isReadFilterPending=!1,this.isPushPending=!1,this.canPush=!1,this.readsClosed=!1,this.statusOutput=!1,this.unpushedReadMessages=[],this.finalStatus=null,this.internalError=null,this.serverEndedCall=!1;let r=(n=a.getOptions()["grpc.max_receive_message_length"])!==null&&n!==void 0?n:Ne.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;this.decoder=new V5.StreamDecoder(r),e.on("response",(l,c)=>{let u="";for(let E of Object.keys(l))u+=" "+E+": "+l[E]+` `;if(this.trace(`Received server headers: `+u),this.httpStatusCode=l[":status"],c&Sn.constants.NGHTTP2_FLAG_END_STREAM)this.handleTrailers(l);else{let E;try{E=pn.Metadata.fromHttp2Headers(l)}catch(d){this.endCall({code:Ne.Status.UNKNOWN,details:d.message,metadata:new pn.Metadata});return}this.listener.onReceiveMetadata(E)}}),e.on("trailers",l=>{this.handleTrailers(l)}),e.on("data",l=>{if(this.statusOutput)return;this.trace("receive HTTP/2 data frame of length "+l.length);let c;try{c=this.decoder.write(l)}catch(u){this.cancelWithStatus(Ne.Status.RESOURCE_EXHAUSTED,u.message);return}for(let u of c)this.trace("parsed message of length "+u.length),this.callEventTracker.addMessageReceived(),this.tryPush(u)}),e.on("end",()=>{this.readsClosed=!0,this.maybeOutputStatus()}),e.on("close",()=>{this.serverEndedCall=!0,process.nextTick(()=>{var l;if(this.trace("HTTP/2 stream closed with code "+e.rstCode),((l=this.finalStatus)===null||l===void 0?void 0:l.code)===Ne.Status.OK)return;let c,u="";switch(e.rstCode){case Sn.constants.NGHTTP2_NO_ERROR:if(this.finalStatus!==null)return;if(this.httpStatusCode&&this.httpStatusCode!==200){let E=LU(this.httpStatusCode);c=E.code,u=E.details}else c=Ne.Status.INTERNAL,u=`Received RST_STREAM with code ${e.rstCode} (Call ended without gRPC status)`;break;case Sn.constants.NGHTTP2_REFUSED_STREAM:c=Ne.Status.UNAVAILABLE,u="Stream refused by server";break;case Sn.constants.NGHTTP2_CANCEL:c=Ne.Status.CANCELLED,u="Call cancelled";break;case Sn.constants.NGHTTP2_ENHANCE_YOUR_CALM:c=Ne.Status.RESOURCE_EXHAUSTED,u="Bandwidth exhausted or memory limit exceeded";break;case Sn.constants.NGHTTP2_INADEQUATE_SECURITY:c=Ne.Status.PERMISSION_DENIED,u="Protocol not secure enough";break;case Sn.constants.NGHTTP2_INTERNAL_ERROR:c=Ne.Status.INTERNAL,this.internalError===null?u=`Received RST_STREAM with code ${e.rstCode} (Internal server error)`:this.internalError.code==="ECONNRESET"||this.internalError.code==="ETIMEDOUT"?(c=Ne.Status.UNAVAILABLE,u=this.internalError.message):u=`Received RST_STREAM with code ${e.rstCode} triggered by internal client error: ${this.internalError.message}`;break;default:c=Ne.Status.INTERNAL,u=`Received RST_STREAM with code ${e.rstCode}`}this.endCall({code:c,details:u,metadata:new pn.Metadata,rstCode:e.rstCode})})}),e.on("error",l=>{l.code!=="ERR_HTTP2_STREAM_ERROR"&&(this.trace("Node error event: message="+l.message+" code="+l.code+" errno="+H5(l.errno)+" syscall="+l.syscall),this.internalError=l),this.callEventTracker.onStreamEnd(!1)})}getDeadlineInfo(){return[`remote_addr=${this.getPeer()}`]}onDisconnect(){this.endCall({code:Ne.Status.UNAVAILABLE,details:"Connection dropped",metadata:new pn.Metadata})}outputStatus(){this.statusOutput||(this.statusOutput=!0,this.trace("ended with status: code="+this.finalStatus.code+' details="'+this.finalStatus.details+'"'),this.callEventTracker.onCallEnd(this.finalStatus),process.nextTick(()=>{this.listener.onReceiveStatus(this.finalStatus)}),this.http2Stream.resume())}trace(e){w5.trace(B5.LogVerbosity.DEBUG,G5,"["+this.callId+"] "+e)}endCall(e){(this.finalStatus===null||this.finalStatus.code===Ne.Status.OK)&&(this.finalStatus=e,this.maybeOutputStatus()),this.destroyHttp2Stream()}maybeOutputStatus(){this.finalStatus!==null&&(this.finalStatus.code!==Ne.Status.OK||this.readsClosed&&this.unpushedReadMessages.length===0&&!this.isReadFilterPending&&!this.isPushPending)&&this.outputStatus()}push(e){this.trace("pushing to reader message of length "+(e instanceof Buffer?e.length:null)),this.canPush=!1,this.isPushPending=!0,process.nextTick(()=>{this.isPushPending=!1,!this.statusOutput&&(this.listener.onReceiveMessage(e),this.maybeOutputStatus())})}tryPush(e){this.canPush?(this.http2Stream.pause(),this.push(e)):(this.trace("unpushedReadMessages.push message of length "+e.length),this.unpushedReadMessages.push(e))}handleTrailers(e){this.serverEndedCall=!0,this.callEventTracker.onStreamEnd(!0);let t="";for(let n of Object.keys(e))t+=" "+n+": "+e[n]+` `;this.trace(`Received server trailers: `+t);let i;try{i=pn.Metadata.fromHttp2Headers(e)}catch{i=new pn.Metadata}let a=i.getMap(),s;if(typeof a["grpc-status"]=="string"){let n=Number(a["grpc-status"]);this.trace("received status code "+n+" from server"),i.remove("grpc-status");let r="";if(typeof a["grpc-message"]=="string"){try{r=decodeURI(a["grpc-message"])}catch{r=a["grpc-message"]}i.remove("grpc-message"),this.trace('received status details string "'+r+'" from server')}s={code:n,details:r,metadata:i}}else this.httpStatusCode?(s=LU(this.httpStatusCode),s.metadata=i):s={code:Ne.Status.UNKNOWN,details:"No status information received",metadata:i};this.endCall(s)}destroyHttp2Stream(){var e;if(!this.http2Stream.destroyed)if(this.serverEndedCall)this.http2Stream.end();else{let t;((e=this.finalStatus)===null||e===void 0?void 0:e.code)===Ne.Status.OK?t=Sn.constants.NGHTTP2_NO_ERROR:t=Sn.constants.NGHTTP2_CANCEL,this.trace("close http2 stream with code "+t),this.http2Stream.close(t)}}cancelWithStatus(e,t){this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),this.endCall({code:e,details:t,metadata:new pn.Metadata})}getStatus(){return this.finalStatus}getPeer(){return this.transport.getPeerName()}getCallNumber(){return this.callId}startRead(){if(this.finalStatus!==null&&this.finalStatus.code!==Ne.Status.OK){this.readsClosed=!0,this.maybeOutputStatus();return}if(this.canPush=!0,this.unpushedReadMessages.length>0){let e=this.unpushedReadMessages.shift();this.push(e);return}this.http2Stream.resume()}sendMessageWithContext(e,t){this.trace("write() called with message of length "+t.length);let i=a=>{process.nextTick(()=>{var s;let n=Ne.Status.UNAVAILABLE;(a==null?void 0:a.code)==="ERR_STREAM_WRITE_AFTER_END"&&(n=Ne.Status.INTERNAL),a&&this.cancelWithStatus(n,`Write error: ${a.message}`),(s=e.callback)===null||s===void 0||s.call(e)})};this.trace("sending data chunk of length "+t.length),this.callEventTracker.addMessageSent();try{this.http2Stream.write(t,i)}catch(a){this.endCall({code:Ne.Status.UNAVAILABLE,details:`Write failed with error ${a.message}`,metadata:new pn.Metadata})}}halfClose(){this.trace("end() called"),this.trace("calling end() on HTTP/2 stream"),this.http2Stream.end()}};RT.Http2SubchannelCall=Ih});var Dh=A(mT=>{"use strict";Object.defineProperty(mT,"__esModule",{value:!0});mT.getNextCallNumber=void 0;var k5=0;function Y5(){return k5++}mT.getNextCallNumber=Y5});var xU=A(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.Http2SubchannelConnector=void 0;var Vh=H("http2"),IU=H("tls"),OT=Wo(),jl=fe(),F5=gh(),Ka=Ie(),DU=br(),NT=Sr(),Fa=Ut(),K5=H("net"),q5=yU(),W5=Dh(),xh="transport",j5="transport_flowctrl",z5=bf().version,{HTTP2_HEADER_AUTHORITY:$5,HTTP2_HEADER_CONTENT_TYPE:X5,HTTP2_HEADER_METHOD:J5,HTTP2_HEADER_PATH:Q5,HTTP2_HEADER_TE:Z5,HTTP2_HEADER_USER_AGENT:eJ}=Vh.constants,tJ=2e4,rJ=Buffer.from("too_many_pings","ascii"),Uh=class{constructor(e,t,i,a){this.session=e,this.options=i,this.remoteName=a,this.keepaliveTimeMs=-1,this.keepaliveTimeoutMs=tJ,this.keepaliveTimerId=null,this.pendingSendKeepalivePing=!1,this.keepaliveTimeoutId=null,this.keepaliveWithoutCalls=!1,this.activeCalls=new Set,this.disconnectListeners=[],this.disconnectHandled=!1,this.channelzEnabled=!0,this.keepalivesSent=0,this.messagesSent=0,this.messagesReceived=0,this.lastMessageSentTimestamp=null,this.lastMessageReceivedTimestamp=null,this.subchannelAddressString=(0,NT.subchannelAddressToString)(t),i["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.streamTracker=new OT.ChannelzCallTrackerStub):this.streamTracker=new OT.ChannelzCallTracker,this.channelzRef=(0,OT.registerChannelzSocket)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.userAgent=[i["grpc.primary_user_agent"],`grpc-node-js/${z5}`,i["grpc.secondary_user_agent"]].filter(s=>s).join(" "),"grpc.keepalive_time_ms"in i&&(this.keepaliveTimeMs=i["grpc.keepalive_time_ms"]),"grpc.keepalive_timeout_ms"in i&&(this.keepaliveTimeoutMs=i["grpc.keepalive_timeout_ms"]),"grpc.keepalive_permit_without_calls"in i?this.keepaliveWithoutCalls=i["grpc.keepalive_permit_without_calls"]===1:this.keepaliveWithoutCalls=!1,e.once("close",()=>{this.trace("session closed"),this.stopKeepalivePings(),this.handleDisconnect()}),e.once("goaway",(s,n,r)=>{let l=!1;s===Vh.constants.NGHTTP2_ENHANCE_YOUR_CALM&&r&&r.equals(rJ)&&(l=!0),this.trace("connection closed by GOAWAY with code "+s+" and data "+(r==null?void 0:r.toString())),this.reportDisconnectToOwner(l)}),e.once("error",s=>{this.trace("connection closed with error "+s.message)}),Ka.isTracerEnabled(xh)&&(e.on("remoteSettings",s=>{this.trace("new settings received"+(this.session!==e?" on the old connection":"")+": "+JSON.stringify(s))}),e.on("localSettings",s=>{this.trace("local settings acknowledged by remote"+(this.session!==e?" on the old connection":"")+": "+JSON.stringify(s))})),this.keepaliveWithoutCalls&&this.maybeStartKeepalivePingTimer()}getChannelzInfo(){var e,t,i;let a=this.session.socket,s=a.remoteAddress?(0,NT.stringToSubchannelAddress)(a.remoteAddress,a.remotePort):null,n=a.localAddress?(0,NT.stringToSubchannelAddress)(a.localAddress,a.localPort):null,r;if(this.session.encrypted){let c=a,u=c.getCipher(),E=c.getCertificate(),d=c.getPeerCertificate();r={cipherSuiteStandardName:(e=u.standardName)!==null&&e!==void 0?e:null,cipherSuiteOtherName:u.standardName?null:u.name,localCertificate:E&&"raw"in E?E.raw:null,remoteCertificate:d&&"raw"in d?d.raw:null}}else r=null;return{remoteAddress:s,localAddress:n,security:r,remoteName:this.remoteName,streamsStarted:this.streamTracker.callsStarted,streamsSucceeded:this.streamTracker.callsSucceeded,streamsFailed:this.streamTracker.callsFailed,messagesSent:this.messagesSent,messagesReceived:this.messagesReceived,keepAlivesSent:this.keepalivesSent,lastLocalStreamCreatedTimestamp:this.streamTracker.lastCallStartedTimestamp,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:this.lastMessageSentTimestamp,lastMessageReceivedTimestamp:this.lastMessageReceivedTimestamp,localFlowControlWindow:(t=this.session.state.localWindowSize)!==null&&t!==void 0?t:null,remoteFlowControlWindow:(i=this.session.state.remoteWindowSize)!==null&&i!==void 0?i:null}}trace(e){Ka.trace(jl.LogVerbosity.DEBUG,xh,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}keepaliveTrace(e){Ka.trace(jl.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}flowControlTrace(e){Ka.trace(jl.LogVerbosity.DEBUG,j5,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}internalsTrace(e){Ka.trace(jl.LogVerbosity.DEBUG,"transport_internals","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}reportDisconnectToOwner(e){this.disconnectHandled||(this.disconnectHandled=!0,this.disconnectListeners.forEach(t=>t(e)))}handleDisconnect(){this.reportDisconnectToOwner(!1),setImmediate(()=>{for(let e of this.activeCalls)e.onDisconnect()})}addDisconnectListener(e){this.disconnectListeners.push(e)}clearKeepaliveTimer(){this.keepaliveTimerId&&(clearTimeout(this.keepaliveTimerId),this.keepaliveTimerId=null)}clearKeepaliveTimeout(){this.keepaliveTimeoutId&&(clearTimeout(this.keepaliveTimeoutId),this.keepaliveTimeoutId=null)}canSendPing(){return this.keepaliveTimeMs>0&&(this.keepaliveWithoutCalls||this.activeCalls.size>0)}maybeSendPing(){var e,t;if(this.clearKeepaliveTimer(),!this.canSendPing()){this.pendingSendKeepalivePing=!0;return}this.channelzEnabled&&(this.keepalivesSent+=1),this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms"),this.keepaliveTimeoutId||(this.keepaliveTimeoutId=setTimeout(()=>{this.keepaliveTrace("Ping timeout passed without response"),this.handleDisconnect()},this.keepaliveTimeoutMs),(t=(e=this.keepaliveTimeoutId).unref)===null||t===void 0||t.call(e));try{this.session.ping((i,a,s)=>{i&&(this.keepaliveTrace("Ping failed with error "+i.message),this.handleDisconnect()),this.keepaliveTrace("Received ping response"),this.clearKeepaliveTimeout(),this.maybeStartKeepalivePingTimer()})}catch{this.handleDisconnect()}}maybeStartKeepalivePingTimer(){var e,t;this.canSendPing()&&(this.pendingSendKeepalivePing?(this.pendingSendKeepalivePing=!1,this.maybeSendPing()):!this.keepaliveTimerId&&!this.keepaliveTimeoutId&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),this.keepaliveTimerId=setTimeout(()=>{this.maybeSendPing()},this.keepaliveTimeMs),(t=(e=this.keepaliveTimerId).unref)===null||t===void 0||t.call(e)))}stopKeepalivePings(){this.keepaliveTimerId&&(clearTimeout(this.keepaliveTimerId),this.keepaliveTimerId=null),this.clearKeepaliveTimeout()}removeActiveCall(e){this.activeCalls.delete(e),this.activeCalls.size===0&&this.session.unref()}addActiveCall(e){this.activeCalls.add(e),this.activeCalls.size===1&&(this.session.ref(),this.keepaliveWithoutCalls||this.maybeStartKeepalivePingTimer())}createCall(e,t,i,a,s){let n=e.toHttp2Headers();n[$5]=t,n[eJ]=this.userAgent,n[X5]="application/grpc",n[J5]="POST",n[Q5]=i,n[Z5]="trailers";let r;try{r=this.session.request(n)}catch(u){throw this.handleDisconnect(),u}this.flowControlTrace("local window size: "+this.session.state.localWindowSize+" remote window size: "+this.session.state.remoteWindowSize),this.internalsTrace("session.closed="+this.session.closed+" session.destroyed="+this.session.destroyed+" session.socket.destroyed="+this.session.socket.destroyed);let l,c;return this.channelzEnabled?(this.streamTracker.addCallStarted(),l={addMessageSent:()=>{var u;this.messagesSent+=1,this.lastMessageSentTimestamp=new Date,(u=s.addMessageSent)===null||u===void 0||u.call(s)},addMessageReceived:()=>{var u;this.messagesReceived+=1,this.lastMessageReceivedTimestamp=new Date,(u=s.addMessageReceived)===null||u===void 0||u.call(s)},onCallEnd:u=>{var E;(E=s.onCallEnd)===null||E===void 0||E.call(s,u),this.removeActiveCall(c)},onStreamEnd:u=>{var E;u?this.streamTracker.addCallSucceeded():this.streamTracker.addCallFailed(),(E=s.onStreamEnd)===null||E===void 0||E.call(s,u)}}):l={addMessageSent:()=>{var u;(u=s.addMessageSent)===null||u===void 0||u.call(s)},addMessageReceived:()=>{var u;(u=s.addMessageReceived)===null||u===void 0||u.call(s)},onCallEnd:u=>{var E;(E=s.onCallEnd)===null||E===void 0||E.call(s,u),this.removeActiveCall(c)},onStreamEnd:u=>{var E;(E=s.onStreamEnd)===null||E===void 0||E.call(s,u)}},c=new q5.Http2SubchannelCall(r,l,a,this,(0,W5.getNextCallNumber)()),this.addActiveCall(c),c}getChannelzRef(){return this.channelzRef}getPeerName(){return this.subchannelAddressString}getOptions(){return this.options}shutdown(){this.session.close(),(0,OT.unregisterChannelzRef)(this.channelzRef)}},bh=class{constructor(e){this.channelTarget=e,this.session=null,this.isShutdown=!1}trace(e){Ka.trace(jl.LogVerbosity.DEBUG,xh,(0,Fa.uriToString)(this.channelTarget)+" "+e)}createSession(e,t,i,a){return this.isShutdown?Promise.reject():new Promise((s,n)=>{var r,l,c,u;let E;a.realTarget?(E=(0,Fa.uriToString)(a.realTarget),this.trace("creating HTTP/2 session through proxy to "+(0,Fa.uriToString)(a.realTarget))):(E=null,this.trace("creating HTTP/2 session to "+(0,NT.subchannelAddressToString)(e)));let d=(0,DU.getDefaultAuthority)((r=a.realTarget)!==null&&r!==void 0?r:this.channelTarget),f=t._getConnectionOptions()||{};f.maxSendHeaderBlockLength=Number.MAX_SAFE_INTEGER,"grpc-node.max_session_memory"in i?f.maxSessionMemory=i["grpc-node.max_session_memory"]:f.maxSessionMemory=Number.MAX_SAFE_INTEGER;let O="http://";if("secureContext"in f){if(O="https://",i["grpc.ssl_target_name_override"]){let C=i["grpc.ssl_target_name_override"],P=(l=f.checkServerIdentity)!==null&&l!==void 0?l:IU.checkServerIdentity;f.checkServerIdentity=(b,I)=>P(C,I),f.servername=C}else{let C=(u=(c=(0,Fa.splitHostPort)(d))===null||c===void 0?void 0:c.host)!==null&&u!==void 0?u:"localhost";f.servername=C}a.socket&&(f.createConnection=(C,P)=>a.socket)}else f.createConnection=(C,P)=>a.socket?a.socket:K5.connect(e);f=Object.assign(Object.assign(Object.assign({},f),e),{enableTrace:i["grpc-node.tls_enable_trace"]===1});let v=Vh.connect(O+d,f);this.session=v;let M="Failed to connect";v.unref(),v.once("connect",()=>{v.removeAllListeners(),s(new Uh(v,e,i,E)),this.session=null}),v.once("close",()=>{this.session=null,setImmediate(()=>{n(`${M} (${new Date().toISOString()})`)})}),v.once("error",C=>{M=C.message,this.trace("connection failed with error "+M)})})}connect(e,t,i){var a,s,n;if(this.isShutdown)return Promise.reject();let r=t._getConnectionOptions()||{};if("secureContext"in r){if(r.ALPNProtocols=["h2"],i["grpc.ssl_target_name_override"]){let l=i["grpc.ssl_target_name_override"],c=(a=r.checkServerIdentity)!==null&&a!==void 0?a:IU.checkServerIdentity;r.checkServerIdentity=(u,E)=>c(l,E),r.servername=l}else if("grpc.http_connect_target"in i){let l=(0,DU.getDefaultAuthority)((s=(0,Fa.parseUri)(i["grpc.http_connect_target"]))!==null&&s!==void 0?s:{path:"localhost"}),c=(0,Fa.splitHostPort)(l);r.servername=(n=c==null?void 0:c.host)!==null&&n!==void 0?n:l}i["grpc-node.tls_enable_trace"]&&(r.enableTrace=!0)}return(0,F5.getProxiedConnection)(e,i,r).then(l=>this.createSession(e,t,i,l))}shutdown(){var e;this.isShutdown=!0,(e=this.session)===null||e===void 0||e.close(),this.session=null}};MT.Http2SubchannelConnector=bh});var UU=A(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.getSubchannelPool=qa.SubchannelPool=void 0;var nJ=eD(),oJ=OU(),iJ=Sr(),aJ=Ut(),sJ=xU(),lJ=1e4,zl=class{constructor(){this.pool=Object.create(null),this.cleanupTimer=null}unrefUnusedSubchannels(){let e=!0;for(let t in this.pool){let a=this.pool[t].filter(s=>!s.subchannel.unrefIfOneRef());a.length>0&&(e=!1),this.pool[t]=a}e&&this.cleanupTimer!==null&&(clearInterval(this.cleanupTimer),this.cleanupTimer=null)}ensureCleanupTask(){var e,t;this.cleanupTimer===null&&(this.cleanupTimer=setInterval(()=>{this.unrefUnusedSubchannels()},lJ),(t=(e=this.cleanupTimer).unref)===null||t===void 0||t.call(e))}getOrCreateSubchannel(e,t,i,a){this.ensureCleanupTask();let s=(0,aJ.uriToString)(e);if(s in this.pool){let r=this.pool[s];for(let l of r)if((0,iJ.subchannelAddressEqual)(t,l.subchannelAddress)&&(0,nJ.channelOptionsEqual)(i,l.channelArguments)&&a._equals(l.channelCredentials))return l.subchannel}let n=new oJ.Subchannel(e,t,i,a,new sJ.Http2SubchannelConnector(e));return s in this.pool||(this.pool[s]=[]),this.pool[s].push({subchannelAddress:t,channelArguments:i,channelCredentials:a,subchannel:n}),n.ref(),n}};qa.SubchannelPool=zl;var cJ=new zl;function uJ(o){return o?cJ:new zl}qa.getSubchannelPool=uJ});var Bh=A(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.FilterStackFactory=Wa.FilterStack=void 0;var CT=class{constructor(e){this.filters=e}sendMetadata(e){let t=e;for(let i=0;i=0;i--)t=this.filters[i].receiveMetadata(t);return t}sendMessage(e){let t=e;for(let i=0;i=0;i--)t=this.filters[i].receiveMessage(t);return t}receiveTrailers(e){let t=e;for(let i=this.filters.length-1;i>=0;i--)t=this.filters[i].receiveTrailers(t);return t}push(e){this.filters.unshift(...e)}getFilters(){return this.filters}};Wa.FilterStack=CT;var wh=class o{constructor(e){this.factories=e}push(e){this.factories.unshift(...e)}clone(){return new o([...this.factories])}createFilter(){return new CT(this.factories.map(e=>e.createFilter()))}};Wa.FilterStackFactory=wh});var Gh=A(PT=>{"use strict";Object.defineProperty(PT,"__esModule",{value:!0});PT.CompressionAlgorithms=void 0;var bU;(function(o){o[o.identity=0]="identity",o[o.deflate=1]="deflate",o[o.gzip=2]="gzip"})(bU||(PT.CompressionAlgorithms=bU={}))});var kh=A(gT=>{"use strict";Object.defineProperty(gT,"__esModule",{value:!0});gT.BaseFilter=void 0;var Hh=class{async sendMetadata(e){return e}receiveMetadata(e){return e}async sendMessage(e){return e}async receiveMessage(e){return e}receiveTrailers(e){return e}};gT.BaseFilter=Hh});var BU=A(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.CompressionFilterFactory=za.CompressionFilter=void 0;var LT=H("zlib"),wU=Gh(),yT=fe(),EJ=kh(),_J=Ie(),TJ=o=>typeof o=="number"&&typeof wU.CompressionAlgorithms[o]=="string",ja=class{async writeMessage(e,t){let i=e;t&&(i=await this.compressMessage(i));let a=Buffer.allocUnsafe(i.length+5);return a.writeUInt8(t?1:0,0),a.writeUInt32BE(i.length,1),i.copy(a,5),a}async readMessage(e){let t=e.readUInt8(0)===1,i=e.slice(5);return t&&(i=await this.decompressMessage(i)),i}},jo=class extends ja{async compressMessage(e){return e}async writeMessage(e,t){let i=Buffer.allocUnsafe(e.length+5);return i.writeUInt8(0,0),i.writeUInt32BE(e.length,1),e.copy(i,5),i}decompressMessage(e){return Promise.reject(new Error('Received compressed message but "grpc-encoding" header was identity'))}},Yh=class extends ja{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((t,i)=>{LT.deflate(e,(a,s)=>{a?i(a):t(s)})})}decompressMessage(e){return new Promise((t,i)=>{let a=0,s=[],n=LT.createInflate();n.on("data",r=>{s.push(r),a+=r.byteLength,this.maxRecvMessageLength!==-1&&a>this.maxRecvMessageLength&&(n.destroy(),i({code:yT.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),n.on("end",()=>{t(Buffer.concat(s))}),n.write(e),n.end()})}},Fh=class extends ja{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((t,i)=>{LT.gzip(e,(a,s)=>{a?i(a):t(s)})})}decompressMessage(e){return new Promise((t,i)=>{let a=0,s=[],n=LT.createGunzip();n.on("data",r=>{s.push(r),a+=r.byteLength,this.maxRecvMessageLength!==-1&&a>this.maxRecvMessageLength&&(n.destroy(),i({code:yT.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),n.on("end",()=>{t(Buffer.concat(s))}),n.write(e),n.end()})}},Kh=class extends ja{constructor(e){super(),this.compressionName=e}compressMessage(e){return Promise.reject(new Error(`Received message compressed with unsupported compression method ${this.compressionName}`))}decompressMessage(e){return Promise.reject(new Error(`Compression method not supported: ${this.compressionName}`))}};function VU(o,e){switch(o){case"identity":return new jo;case"deflate":return new Yh(e);case"gzip":return new Fh(e);default:return new Kh(o)}}var IT=class extends EJ.BaseFilter{constructor(e,t){var i,a;super(),this.sharedFilterConfig=t,this.sendCompression=new jo,this.receiveCompression=new jo,this.currentCompressionAlgorithm="identity";let s=e["grpc.default_compression_algorithm"];if(this.maxReceiveMessageLength=(i=e["grpc.max_receive_message_length"])!==null&&i!==void 0?i:yT.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,s!==void 0)if(TJ(s)){let n=wU.CompressionAlgorithms[s],r=(a=t.serverSupportedEncodingHeader)===null||a===void 0?void 0:a.split(",");(!r||r.includes(n))&&(this.currentCompressionAlgorithm=n,this.sendCompression=VU(this.currentCompressionAlgorithm,-1))}else _J.log(yT.LogVerbosity.ERROR,`Invalid value provided for grpc.default_compression_algorithm option: ${s}`)}async sendMetadata(e){let t=await e;return t.set("grpc-accept-encoding","identity,deflate,gzip"),t.set("accept-encoding","identity"),this.currentCompressionAlgorithm==="identity"?t.remove("grpc-encoding"):t.set("grpc-encoding",this.currentCompressionAlgorithm),t}receiveMetadata(e){let t=e.get("grpc-encoding");if(t.length>0){let a=t[0];typeof a=="string"&&(this.receiveCompression=VU(a,this.maxReceiveMessageLength))}e.remove("grpc-encoding");let i=e.get("grpc-accept-encoding")[0];return i&&(this.sharedFilterConfig.serverSupportedEncodingHeader=i,i.split(",").includes(this.currentCompressionAlgorithm)||(this.sendCompression=new jo,this.currentCompressionAlgorithm="identity")),e.remove("grpc-accept-encoding"),e}async sendMessage(e){var t;let i=await e,a;return this.sendCompression instanceof jo?a=!1:a=(((t=i.flags)!==null&&t!==void 0?t:0)&2)===0,{message:await this.sendCompression.writeMessage(i.message,a),flags:i.flags}}async receiveMessage(e){return this.receiveCompression.readMessage(await e)}};za.CompressionFilter=IT;var qh=class{constructor(e,t){this.options=t,this.sharedFilterConfig={}}createFilter(){return new IT(this.options,this.sharedFilterConfig)}};za.CompressionFilterFactory=qh});var $l=A(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.formatDateDifference=nr.deadlineToString=nr.getRelativeTimeout=nr.getDeadlineTimeoutString=nr.minDeadline=void 0;function SJ(...o){let e=1/0;for(let t of o){let i=t instanceof Date?t.getTime():t;ifJ?1/0:i}nr.getRelativeTimeout=AJ;function hJ(o){if(o instanceof Date)return o.toISOString();{let e=new Date(o);return Number.isNaN(e.getTime())?""+o:e.toISOString()}}nr.deadlineToString=hJ;function vJ(o,e){return((e.getTime()-o.getTime())/1e3).toFixed(3)+"s"}nr.formatDateDifference=vJ});var xT=A(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.restrictControlPlaneStatusCode=void 0;var Wr=fe(),RJ=[Wr.Status.OK,Wr.Status.INVALID_ARGUMENT,Wr.Status.NOT_FOUND,Wr.Status.ALREADY_EXISTS,Wr.Status.FAILED_PRECONDITION,Wr.Status.ABORTED,Wr.Status.OUT_OF_RANGE,Wr.Status.DATA_LOSS];function mJ(o,e){return RJ.includes(o)?{code:Wr.Status.INTERNAL,details:`Invalid status from control plane: ${o} ${Wr.Status[o]} ${e}`}:{code:o,details:e}}DT.restrictControlPlaneStatusCode=mJ});var kU=A(VT=>{"use strict";Object.defineProperty(VT,"__esModule",{value:!0});VT.LoadBalancingCall=void 0;var GU=$t(),UT=fe(),HU=$l(),bT=ht(),Xl=jn(),OJ=Ut(),NJ=Ie(),Wh=xT(),MJ=H("http2"),CJ="load_balancing_call",jh=class{constructor(e,t,i,a,s,n,r){var l,c;this.channel=e,this.callConfig=t,this.methodName=i,this.host=a,this.credentials=s,this.deadline=n,this.callNumber=r,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.metadata=null,this.listener=null,this.onCallEnded=null,this.childStartTime=null;let u=this.methodName.split("/"),E="";u.length>=2&&(E=u[1]);let d=(c=(l=(0,OJ.splitHostPort)(this.host))===null||l===void 0?void 0:l.host)!==null&&c!==void 0?c:"localhost";this.serviceUrl=`https://${d}/${E}`,this.startTime=new Date}getDeadlineInfo(){var e,t;let i=[];return this.childStartTime?(this.childStartTime>this.startTime&&(!((e=this.metadata)===null||e===void 0)&&e.getOptions().waitForReady&&i.push("wait_for_ready"),i.push(`LB pick: ${(0,HU.formatDateDifference)(this.startTime,this.childStartTime)}`)),i.push(...this.child.getDeadlineInfo()),i):(!((t=this.metadata)===null||t===void 0)&&t.getOptions().waitForReady&&i.push("wait_for_ready"),i.push("Waiting for LB pick"),i)}trace(e){NJ.trace(UT.LogVerbosity.DEBUG,CJ,"["+this.callNumber+"] "+e)}outputStatus(e,t){var i,a;if(!this.ended){this.ended=!0,this.trace("ended with status: code="+e.code+' details="'+e.details+'" start time='+this.startTime.toISOString());let s=Object.assign(Object.assign({},e),{progress:t});(i=this.listener)===null||i===void 0||i.onReceiveStatus(s),(a=this.onCallEnded)===null||a===void 0||a.call(this,s.code)}}doPick(){var e,t;if(this.ended)return;if(!this.metadata)throw new Error("doPick called before start");this.trace("Pick called");let i=this.metadata.clone(),a=this.channel.doPick(i,this.callConfig.pickInformation),s=a.subchannel?"("+a.subchannel.getChannelzRef().id+") "+a.subchannel.getAddress():""+a.subchannel;switch(this.trace("Pick result: "+Xl.PickResultType[a.pickResultType]+" subchannel: "+s+" status: "+((e=a.status)===null||e===void 0?void 0:e.code)+" "+((t=a.status)===null||t===void 0?void 0:t.details)),a.pickResultType){case Xl.PickResultType.COMPLETE:this.credentials.generateMetadata({service_url:this.serviceUrl}).then(l=>{var c,u,E;if(this.ended){this.trace("Credentials metadata generation finished after call ended");return}if(i.merge(l),i.get("authorization").length>1&&this.outputStatus({code:UT.Status.INTERNAL,details:'"authorization" metadata cannot have multiple values',metadata:new bT.Metadata},"PROCESSED"),a.subchannel.getConnectivityState()!==GU.ConnectivityState.READY){this.trace("Picked subchannel "+s+" has state "+GU.ConnectivityState[a.subchannel.getConnectivityState()]+" after getting credentials metadata. Retrying pick"),this.doPick();return}this.deadline!==1/0&&i.set("grpc-timeout",(0,HU.getDeadlineTimeoutString)(this.deadline));try{this.child=a.subchannel.getRealSubchannel().createCall(i,this.host,this.methodName,{onReceiveMetadata:d=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(d)},onReceiveMessage:d=>{this.trace("Received message"),this.listener.onReceiveMessage(d)},onReceiveStatus:d=>{this.trace("Received status"),d.rstCode===MJ.constants.NGHTTP2_REFUSED_STREAM?this.outputStatus(d,"REFUSED"):this.outputStatus(d,"PROCESSED")}}),this.childStartTime=new Date}catch(d){this.trace("Failed to start call on picked subchannel "+s+" with error "+d.message),this.outputStatus({code:UT.Status.INTERNAL,details:"Failed to start HTTP/2 stream with error "+d.message,metadata:new bT.Metadata},"NOT_STARTED");return}(u=(c=this.callConfig).onCommitted)===null||u===void 0||u.call(c),(E=a.onCallStarted)===null||E===void 0||E.call(a),this.onCallEnded=a.onCallEnded,this.trace("Created child call ["+this.child.getCallNumber()+"]"),this.readPending&&this.child.startRead(),this.pendingMessage&&this.child.sendMessageWithContext(this.pendingMessage.context,this.pendingMessage.message),this.pendingHalfClose&&this.child.halfClose()},l=>{let{code:c,details:u}=(0,Wh.restrictControlPlaneStatusCode)(typeof l.code=="number"?l.code:UT.Status.UNKNOWN,`Getting metadata from plugin failed with error: ${l.message}`);this.outputStatus({code:c,details:u,metadata:new bT.Metadata},"PROCESSED")});break;case Xl.PickResultType.DROP:let{code:n,details:r}=(0,Wh.restrictControlPlaneStatusCode)(a.status.code,a.status.details);setImmediate(()=>{this.outputStatus({code:n,details:r,metadata:a.status.metadata},"DROP")});break;case Xl.PickResultType.TRANSIENT_FAILURE:if(this.metadata.getOptions().waitForReady)this.channel.queueCallForPick(this);else{let{code:l,details:c}=(0,Wh.restrictControlPlaneStatusCode)(a.status.code,a.status.details);setImmediate(()=>{this.outputStatus({code:l,details:c,metadata:a.status.metadata},"PROCESSED")})}break;case Xl.PickResultType.QUEUE:this.channel.queueCallForPick(this)}}cancelWithStatus(e,t){var i;this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),(i=this.child)===null||i===void 0||i.cancelWithStatus(e,t),this.outputStatus({code:e,details:t,metadata:new bT.Metadata},"PROCESSED")}getPeer(){var e,t;return(t=(e=this.child)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:this.channel.getTarget()}start(e,t){this.trace("start called"),this.listener=t,this.metadata=e,this.doPick()}sendMessageWithContext(e,t){this.trace("write() called with message of length "+t.length),this.child?this.child.sendMessageWithContext(e,t):this.pendingMessage={context:e,message:t}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(e){throw new Error("Method not implemented.")}getCallNumber(){return this.callNumber}};VT.LoadBalancingCall=jh});var FU=A(wT=>{"use strict";Object.defineProperty(wT,"__esModule",{value:!0});wT.ResolvingCall=void 0;var zo=fe(),$o=$l(),YU=ht(),PJ=Ie(),gJ=xT(),LJ="resolving_call",zh=class{constructor(e,t,i,a,s,n){this.channel=e,this.method=t,this.filterStackFactory=a,this.credentials=s,this.callNumber=n,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.readFilterPending=!1,this.writeFilterPending=!1,this.pendingChildStatus=null,this.metadata=null,this.listener=null,this.statusWatchers=[],this.deadlineTimer=setTimeout(()=>{},0),this.filterStack=null,this.deadlineStartTime=null,this.configReceivedTime=null,this.childStartTime=null,this.deadline=i.deadline,this.host=i.host,i.parentCall&&(i.flags&zo.Propagate.CANCELLATION&&i.parentCall.on("cancelled",()=>{this.cancelWithStatus(zo.Status.CANCELLED,"Cancelled by parent call")}),i.flags&zo.Propagate.DEADLINE&&(this.trace("Propagating deadline from parent: "+i.parentCall.getDeadline()),this.deadline=(0,$o.minDeadline)(this.deadline,i.parentCall.getDeadline()))),this.trace("Created"),this.runDeadlineTimer()}trace(e){PJ.trace(zo.LogVerbosity.DEBUG,LJ,"["+this.callNumber+"] "+e)}runDeadlineTimer(){clearTimeout(this.deadlineTimer),this.deadlineStartTime=new Date,this.trace("Deadline: "+(0,$o.deadlineToString)(this.deadline));let e=(0,$o.getRelativeTimeout)(this.deadline);if(e!==1/0){this.trace("Deadline will be reached in "+e+"ms");let t=()=>{if(!this.deadlineStartTime){this.cancelWithStatus(zo.Status.DEADLINE_EXCEEDED,"Deadline exceeded");return}let i=[],a=new Date;i.push(`Deadline exceeded after ${(0,$o.formatDateDifference)(this.deadlineStartTime,a)}`),this.configReceivedTime?(this.configReceivedTime>this.deadlineStartTime&&i.push(`name resolution: ${(0,$o.formatDateDifference)(this.deadlineStartTime,this.configReceivedTime)}`),this.childStartTime?this.childStartTime>this.configReceivedTime&&i.push(`metadata filters: ${(0,$o.formatDateDifference)(this.configReceivedTime,this.childStartTime)}`):i.push("waiting for metadata filters")):i.push("waiting for name resolution"),this.child&&i.push(...this.child.getDeadlineInfo()),this.cancelWithStatus(zo.Status.DEADLINE_EXCEEDED,i.join(","))};e<=0?process.nextTick(t):this.deadlineTimer=setTimeout(t,e)}}outputStatus(e){if(!this.ended){this.ended=!0,this.filterStack||(this.filterStack=this.filterStackFactory.createFilter()),clearTimeout(this.deadlineTimer);let t=this.filterStack.receiveTrailers(e);this.trace("ended with status: code="+t.code+' details="'+t.details+'"'),this.statusWatchers.forEach(i=>i(t)),process.nextTick(()=>{var i;(i=this.listener)===null||i===void 0||i.onReceiveStatus(t)})}}sendMessageOnChild(e,t){if(!this.child)throw new Error("sendMessageonChild called with child not populated");let i=this.child;this.writeFilterPending=!0,this.filterStack.sendMessage(Promise.resolve({message:t,flags:e.flags})).then(a=>{this.writeFilterPending=!1,i.sendMessageWithContext(e,a.message),this.pendingHalfClose&&i.halfClose()},a=>{this.cancelWithStatus(a.code,a.details)})}getConfig(){if(this.ended)return;if(!this.metadata||!this.listener)throw new Error("getConfig called before start");let e=this.channel.getConfig(this.method,this.metadata);if(e.type==="NONE"){this.channel.queueCallForConfig(this);return}else if(e.type==="ERROR"){this.metadata.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(e.error);return}this.configReceivedTime=new Date;let t=e.config;if(t.status!==zo.Status.OK){let{code:i,details:a}=(0,gJ.restrictControlPlaneStatusCode)(t.status,"Failed to route call to method "+this.method);this.outputStatus({code:i,details:a,metadata:new YU.Metadata});return}if(t.methodConfig.timeout){let i=new Date;i.setSeconds(i.getSeconds()+t.methodConfig.timeout.seconds),i.setMilliseconds(i.getMilliseconds()+t.methodConfig.timeout.nanos/1e6),this.deadline=(0,$o.minDeadline)(this.deadline,i),this.runDeadlineTimer()}this.filterStackFactory.push(t.dynamicFilterFactories),this.filterStack=this.filterStackFactory.createFilter(),this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(i=>{this.child=this.channel.createInnerCall(t,this.method,this.host,this.credentials,this.deadline),this.trace("Created child ["+this.child.getCallNumber()+"]"),this.childStartTime=new Date,this.child.start(i,{onReceiveMetadata:a=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(this.filterStack.receiveMetadata(a))},onReceiveMessage:a=>{this.trace("Received message"),this.readFilterPending=!0,this.filterStack.receiveMessage(a).then(s=>{this.trace("Finished filtering received message"),this.readFilterPending=!1,this.listener.onReceiveMessage(s),this.pendingChildStatus&&this.outputStatus(this.pendingChildStatus)},s=>{this.cancelWithStatus(s.code,s.details)})},onReceiveStatus:a=>{this.trace("Received status"),this.readFilterPending?this.pendingChildStatus=a:this.outputStatus(a)}}),this.readPending&&this.child.startRead(),this.pendingMessage?this.sendMessageOnChild(this.pendingMessage.context,this.pendingMessage.message):this.pendingHalfClose&&this.child.halfClose()},i=>{this.outputStatus(i)})}reportResolverError(e){var t;!((t=this.metadata)===null||t===void 0)&&t.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(e)}cancelWithStatus(e,t){var i;this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),(i=this.child)===null||i===void 0||i.cancelWithStatus(e,t),this.outputStatus({code:e,details:t,metadata:new YU.Metadata})}getPeer(){var e,t;return(t=(e=this.child)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:this.channel.getTarget()}start(e,t){this.trace("start called"),this.metadata=e.clone(),this.listener=t,this.getConfig()}sendMessageWithContext(e,t){this.trace("write() called with message of length "+t.length),this.child?this.sendMessageOnChild(e,t):this.pendingMessage={context:e,message:t}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child&&!this.writeFilterPending?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(e){this.credentials=this.credentials.compose(e)}addStatusWatcher(e){this.statusWatchers.push(e)}getCallNumber(){return this.callNumber}};wT.ResolvingCall=zh});var KU=A(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.RetryingCall=ao.MessageBufferTracker=ao.RetryThrottler=void 0;var BT=fe(),yJ=$l(),IJ=ht(),DJ=Ie(),xJ="retrying_call",Xh=class{constructor(e,t,i){this.maxTokens=e,this.tokenRatio=t,i?this.tokens=i.tokens*(e/i.maxTokens):this.tokens=e}addCallSucceeded(){this.tokens=Math.max(this.tokens+this.tokenRatio,this.maxTokens)}addCallFailed(){this.tokens=Math.min(this.tokens-1,0)}canRetryCall(){return this.tokens>this.maxTokens/2}};ao.RetryThrottler=Xh;var Jh=class{constructor(e,t){this.totalLimit=e,this.limitPerCall=t,this.totalAllocated=0,this.allocatedPerCall=new Map}allocate(e,t){var i;let a=(i=this.allocatedPerCall.get(t))!==null&&i!==void 0?i:0;return this.limitPerCall-a total allocated ${this.totalAllocated}`);this.totalAllocated-=e;let a=(i=this.allocatedPerCall.get(t))!==null&&i!==void 0?i:0;if(a allocated for call ${a}`);this.allocatedPerCall.set(t,a-e)}freeAll(e){var t;let i=(t=this.allocatedPerCall.get(e))!==null&&t!==void 0?t:0;if(this.totalAllocated total allocated ${this.totalAllocated}`);this.totalAllocated-=i,this.allocatedPerCall.delete(e)}};ao.MessageBufferTracker=Jh;var $h="grpc-previous-rpc-attempts",Qh=class{constructor(e,t,i,a,s,n,r,l,c){if(this.channel=e,this.callConfig=t,this.methodName=i,this.host=a,this.credentials=s,this.deadline=n,this.callNumber=r,this.bufferTracker=l,this.retryThrottler=c,this.listener=null,this.initialMetadata=null,this.underlyingCalls=[],this.writeBuffer=[],this.writeBufferOffset=0,this.readStarted=!1,this.transparentRetryUsed=!1,this.attempts=0,this.hedgingTimer=null,this.committedCallIndex=null,this.initialRetryBackoffSec=0,this.nextRetryBackoffSec=0,t.methodConfig.retryPolicy){this.state="RETRY";let u=t.methodConfig.retryPolicy;this.nextRetryBackoffSec=this.initialRetryBackoffSec=Number(u.initialBackoff.substring(0,u.initialBackoff.length-1))}else t.methodConfig.hedgingPolicy?this.state="HEDGING":this.state="TRANSPARENT_ONLY";this.startTime=new Date}getDeadlineInfo(){if(this.underlyingCalls.length===0)return[];let e=[],t=this.underlyingCalls[this.underlyingCalls.length-1];return this.underlyingCalls.length>1&&e.push(`previous attempts: ${this.underlyingCalls.length-1}`),t.startTime>this.startTime&&e.push(`time to current attempt start: ${(0,yJ.formatDateDifference)(this.startTime,t.startTime)}`),e.push(...t.call.getDeadlineInfo()),e}getCallNumber(){return this.callNumber}trace(e){DJ.trace(BT.LogVerbosity.DEBUG,xJ,"["+this.callNumber+"] "+e)}reportStatus(e){this.trace("ended with status: code="+e.code+' details="'+e.details+'" start time='+this.startTime.toISOString()),this.bufferTracker.freeAll(this.callNumber),this.writeBufferOffset=this.writeBufferOffset+this.writeBuffer.length,this.writeBuffer=[],process.nextTick(()=>{var t;(t=this.listener)===null||t===void 0||t.onReceiveStatus({code:e.code,details:e.details,metadata:e.metadata})})}cancelWithStatus(e,t){this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),this.reportStatus({code:e,details:t,metadata:new IJ.Metadata});for(let{call:i}of this.underlyingCalls)i.cancelWithStatus(e,t)}getPeer(){return this.committedCallIndex!==null?this.underlyingCalls[this.committedCallIndex].call.getPeer():"unknown"}getBufferEntry(e){var t;return(t=this.writeBuffer[e-this.writeBufferOffset])!==null&&t!==void 0?t:{entryType:"FREED",allocated:!1}}getNextBufferIndex(){return this.writeBufferOffset+this.writeBuffer.length}clearSentMessages(){if(this.state!=="COMMITTED")return;let e=this.underlyingCalls[this.committedCallIndex].nextMessageToSend;for(let t=this.writeBufferOffset;te&&(e=a.nextMessageToSend,t=i);t===-1?this.state="TRANSPARENT_ONLY":this.commitCall(t)}isStatusCodeInList(e,t){return e.some(i=>i===t||i.toString().toLowerCase()===BT.Status[t].toLowerCase())}getNextRetryBackoffMs(){var e;let t=(e=this.callConfig)===null||e===void 0?void 0:e.methodConfig.retryPolicy;if(!t)return 0;let i=Math.random()*this.nextRetryBackoffSec*1e3,a=Number(t.maxBackoff.substring(0,t.maxBackoff.length-1));return this.nextRetryBackoffSec=Math.min(this.nextRetryBackoffSec*t.backoffMultiplier,a),i}maybeRetryCall(e,t){if(this.state!=="RETRY"){t(!1);return}let i=this.callConfig.methodConfig.retryPolicy;if(this.attempts>=Math.min(i.maxAttempts,5)){t(!1);return}let a;if(e===null)a=this.getNextRetryBackoffMs();else if(e<0){this.state="TRANSPARENT_ONLY",t(!1);return}else a=e,this.nextRetryBackoffSec=this.initialRetryBackoffSec;setTimeout(()=>{var s,n;if(this.state!=="RETRY"){t(!1);return}(!((n=(s=this.retryThrottler)===null||s===void 0?void 0:s.canRetryCall())!==null&&n!==void 0)||n)&&(t(!0),this.attempts+=1,this.startNewAttempt())},a)}countActiveCalls(){let e=0;for(let t of this.underlyingCalls)(t==null?void 0:t.state)==="ACTIVE"&&(e+=1);return e}handleProcessedStatus(e,t,i){var a,s,n;switch(this.state){case"COMMITTED":case"TRANSPARENT_ONLY":this.commitCall(t),this.reportStatus(e);break;case"HEDGING":if(this.isStatusCodeInList((a=this.callConfig.methodConfig.hedgingPolicy.nonFatalStatusCodes)!==null&&a!==void 0?a:[],e.code)){(s=this.retryThrottler)===null||s===void 0||s.addCallFailed();let r;if(i===null)r=0;else if(i<0){this.state="TRANSPARENT_ONLY",this.commitCall(t),this.reportStatus(e);return}else r=i;setTimeout(()=>{this.maybeStartHedgingAttempt(),this.countActiveCalls()===0&&(this.commitCall(t),this.reportStatus(e))},r)}else this.commitCall(t),this.reportStatus(e);break;case"RETRY":this.isStatusCodeInList(this.callConfig.methodConfig.retryPolicy.retryableStatusCodes,e.code)?((n=this.retryThrottler)===null||n===void 0||n.addCallFailed(),this.maybeRetryCall(i,r=>{r||(this.commitCall(t),this.reportStatus(e))})):(this.commitCall(t),this.reportStatus(e));break}}getPushback(e){let t=e.get("grpc-retry-pushback-ms");if(t.length===0)return null;try{return parseInt(t[0])}catch{return-1}}handleChildStatus(e,t){var i;if(this.underlyingCalls[t].state==="COMPLETED")return;if(this.trace("state="+this.state+" handling status with progress "+e.progress+" from child ["+this.underlyingCalls[t].call.getCallNumber()+"] in state "+this.underlyingCalls[t].state),this.underlyingCalls[t].state="COMPLETED",e.code===BT.Status.OK){(i=this.retryThrottler)===null||i===void 0||i.addCallSucceeded(),this.commitCall(t),this.reportStatus(e);return}if(this.state==="COMMITTED"){this.reportStatus(e);return}let a=this.getPushback(e.metadata);switch(e.progress){case"NOT_STARTED":this.startNewAttempt();break;case"REFUSED":this.transparentRetryUsed?this.handleProcessedStatus(e,t,a):(this.transparentRetryUsed=!0,this.startNewAttempt());break;case"DROP":this.commitCall(t),this.reportStatus(e);break;case"PROCESSED":this.handleProcessedStatus(e,t,a);break}}maybeStartHedgingAttempt(){if(this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let e=this.callConfig.methodConfig.hedgingPolicy;this.attempts>=Math.min(e.maxAttempts,5)||(this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer())}maybeStartHedgingTimer(){var e,t,i;if(this.hedgingTimer&&clearTimeout(this.hedgingTimer),this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let a=this.callConfig.methodConfig.hedgingPolicy;if(this.attempts>=Math.min(a.maxAttempts,5))return;let s=(e=a.hedgingDelay)!==null&&e!==void 0?e:"0s",n=Number(s.substring(0,s.length-1));this.hedgingTimer=setTimeout(()=>{this.maybeStartHedgingAttempt()},n*1e3),(i=(t=this.hedgingTimer).unref)===null||i===void 0||i.call(t)}startNewAttempt(){let e=this.channel.createLoadBalancingCall(this.callConfig,this.methodName,this.host,this.credentials,this.deadline);this.trace("Created child call ["+e.getCallNumber()+"] for attempt "+this.attempts);let t=this.underlyingCalls.length;this.underlyingCalls.push({state:"ACTIVE",call:e,nextMessageToSend:0,startTime:new Date});let i=this.attempts-1,a=this.initialMetadata.clone();i>0&&a.set($h,`${i}`);let s=!1;e.start(a,{onReceiveMetadata:n=>{this.trace("Received metadata from child ["+e.getCallNumber()+"]"),this.commitCall(t),s=!0,i>0&&n.set($h,`${i}`),this.underlyingCalls[t].state==="ACTIVE"&&this.listener.onReceiveMetadata(n)},onReceiveMessage:n=>{this.trace("Received message from child ["+e.getCallNumber()+"]"),this.commitCall(t),this.underlyingCalls[t].state==="ACTIVE"&&this.listener.onReceiveMessage(n)},onReceiveStatus:n=>{this.trace("Received status from child ["+e.getCallNumber()+"]"),!s&&i>0&&n.metadata.set($h,`${i}`),this.handleChildStatus(n,t)}}),this.sendNextChildMessage(t),this.readStarted&&e.startRead()}start(e,t){this.trace("start called"),this.listener=t,this.initialMetadata=e,this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer()}handleChildWriteCompleted(e){var t,i;let a=this.underlyingCalls[e],s=a.nextMessageToSend;(i=(t=this.getBufferEntry(s)).callback)===null||i===void 0||i.call(t),this.clearSentMessages(),a.nextMessageToSend+=1,this.sendNextChildMessage(e)}sendNextChildMessage(e){let t=this.underlyingCalls[e];if(t.state!=="COMPLETED"&&this.getBufferEntry(t.nextMessageToSend)){let i=this.getBufferEntry(t.nextMessageToSend);switch(i.entryType){case"MESSAGE":t.call.sendMessageWithContext({callback:a=>{this.handleChildWriteCompleted(e)}},i.message.message);break;case"HALF_CLOSE":t.nextMessageToSend+=1,t.call.halfClose();break;case"FREED":break}}}sendMessageWithContext(e,t){var i;this.trace("write() called with message of length "+t.length);let a={message:t,flags:e.flags},s=this.getNextBufferIndex(),n={entryType:"MESSAGE",message:a,allocated:this.bufferTracker.allocate(t.length,this.callNumber)};if(this.writeBuffer.push(n),n.allocated){(i=e.callback)===null||i===void 0||i.call(e);for(let[r,l]of this.underlyingCalls.entries())l.state==="ACTIVE"&&l.nextMessageToSend===s&&l.call.sendMessageWithContext({callback:c=>{this.handleChildWriteCompleted(r)}},t)}else{if(this.commitCallWithMostMessages(),this.committedCallIndex===null)return;let r=this.underlyingCalls[this.committedCallIndex];n.callback=e.callback,r.state==="ACTIVE"&&r.nextMessageToSend===s&&r.call.sendMessageWithContext({callback:l=>{this.handleChildWriteCompleted(this.committedCallIndex)}},t)}}startRead(){this.trace("startRead called"),this.readStarted=!0;for(let e of this.underlyingCalls)(e==null?void 0:e.state)==="ACTIVE"&&e.call.startRead()}halfClose(){this.trace("halfClose called");let e=this.getNextBufferIndex();this.writeBuffer.push({entryType:"HALF_CLOSE",allocated:!1});for(let t of this.underlyingCalls)(t==null?void 0:t.state)==="ACTIVE"&&t.nextMessageToSend===e&&(t.nextMessageToSend+=1,t.call.halfClose())}setCredentials(e){throw new Error("Method not implemented.")}getMethod(){return this.methodName}getHost(){return this.host}};ao.RetryingCall=Qh});var HT=A(GT=>{"use strict";Object.defineProperty(GT,"__esModule",{value:!0});GT.BaseSubchannelWrapper=void 0;var Zh=class{constructor(e){this.child=e,this.healthy=!0,this.healthListeners=new Set,e.addHealthStateWatcher(t=>{this.healthy&&this.updateHealthListeners()})}updateHealthListeners(){for(let e of this.healthListeners)e(this.isHealthy())}getConnectivityState(){return this.child.getConnectivityState()}addConnectivityStateListener(e){this.child.addConnectivityStateListener(e)}removeConnectivityStateListener(e){this.child.removeConnectivityStateListener(e)}startConnecting(){this.child.startConnecting()}getAddress(){return this.child.getAddress()}throttleKeepalive(e){this.child.throttleKeepalive(e)}ref(){this.child.ref()}unref(){this.child.unref()}getChannelzRef(){return this.child.getChannelzRef()}isHealthy(){return this.healthy&&this.child.isHealthy()}addHealthStateWatcher(e){this.healthListeners.add(e)}removeHealthStateWatcher(e){this.healthListeners.delete(e)}setHealthy(e){e!==this.healthy&&(this.healthy=e,this.child.isHealthy()&&this.updateHealthListeners())}getRealSubchannel(){return this.child.getRealSubchannel()}realSubchannelEquals(e){return this.getRealSubchannel()===e.getRealSubchannel()}};GT.BaseSubchannelWrapper=Zh});var jU=A(FT=>{"use strict";Object.defineProperty(FT,"__esModule",{value:!0});FT.InternalChannel=void 0;var UJ=L_(),bJ=ZI(),VJ=UU(),qU=jn(),Jl=fe(),wJ=Bh(),BJ=BU(),WU=br(),ev=Ie(),GJ=gh(),kT=Ut(),jr=$t(),Ql=Wo(),HJ=kU(),kJ=$l(),YJ=FU(),tv=Dh(),FJ=xT(),rv=KU(),KJ=HT(),qJ=2147483647,WJ=1e3,jJ=30*60*1e3,YT=new Map,zJ=1<<24,$J=1<<20,nv=class extends KJ.BaseSubchannelWrapper{constructor(e,t){super(e),this.channel=t,this.refCount=0,this.subchannelStateListener=(i,a,s,n)=>{t.throttleKeepalive(n)},e.addConnectivityStateListener(this.subchannelStateListener)}ref(){this.child.ref(),this.refCount+=1}unref(){this.child.unref(),this.refCount-=1,this.refCount<=0&&(this.child.removeConnectivityStateListener(this.subchannelStateListener),this.channel.removeWrappedSubchannel(this))}},ov=class{constructor(e,t,i){var a,s,n,r,l,c,u,E;if(this.credentials=t,this.options=i,this.connectivityState=jr.ConnectivityState.IDLE,this.currentPicker=new qU.UnavailablePicker,this.configSelectionQueue=[],this.pickQueue=[],this.connectivityStateWatchers=[],this.configSelector=null,this.currentResolutionError=null,this.wrappedSubchannels=new Set,this.callCount=0,this.idleTimer=null,this.channelzEnabled=!0,this.callTracker=new Ql.ChannelzCallTracker,this.childrenTracker=new Ql.ChannelzChildrenTracker,this.randomChannelId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),typeof e!="string")throw new TypeError("Channel target must be a string");if(!(t instanceof UJ.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(i&&typeof i!="object")throw new TypeError("Channel options must be an object");this.originalTarget=e;let d=(0,kT.parseUri)(e);if(d===null)throw new Error(`Could not parse target name "${e}"`);let f=(0,WU.mapUriDefaultScheme)(d);if(f===null)throw new Error(`Could not find a default scheme for target name "${e}"`);this.callRefTimer=setInterval(()=>{},qJ),(s=(a=this.callRefTimer).unref)===null||s===void 0||s.call(a),this.options["grpc.enable_channelz"]===0&&(this.channelzEnabled=!1),this.channelzTrace=new Ql.ChannelzTrace,this.channelzRef=(0,Ql.registerChannelzChannel)(e,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Channel created"),this.options["grpc.default_authority"]?this.defaultAuthority=this.options["grpc.default_authority"]:this.defaultAuthority=(0,WU.getDefaultAuthority)(f);let O=(0,GJ.mapProxyName)(f,i);this.target=O.target,this.options=Object.assign({},this.options,O.extraOptions),this.subchannelPool=(0,VJ.getSubchannelPool)(((n=i["grpc.use_local_subchannel_pool"])!==null&&n!==void 0?n:0)===0),this.retryBufferTracker=new rv.MessageBufferTracker((r=i["grpc.retry_buffer_size"])!==null&&r!==void 0?r:zJ,(l=i["grpc.per_rpc_retry_buffer_size"])!==null&&l!==void 0?l:$J),this.keepaliveTime=(c=i["grpc.keepalive_time_ms"])!==null&&c!==void 0?c:-1,this.idleTimeoutMs=Math.max((u=i["grpc.client_idle_timeout_ms"])!==null&&u!==void 0?u:jJ,WJ);let v={createSubchannel:(C,P)=>{let b=this.subchannelPool.getOrCreateSubchannel(this.target,C,Object.assign({},this.options,P),this.credentials);b.throttleKeepalive(this.keepaliveTime),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Created subchannel or used existing subchannel",b.getChannelzRef());let I=new nv(b,this);return this.wrappedSubchannels.add(I),I},updateState:(C,P)=>{this.currentPicker=P;let b=this.pickQueue.slice();this.pickQueue=[],b.length>0&&this.callRefTimerUnref();for(let I of b)I.doPick();this.updateState(C)},requestReresolution:()=>{throw new Error("Resolving load balancer should never call requestReresolution")},addChannelzChild:C=>{this.channelzEnabled&&this.childrenTracker.refChild(C)},removeChannelzChild:C=>{this.channelzEnabled&&this.childrenTracker.unrefChild(C)}};this.resolvingLoadBalancer=new bJ.ResolvingLoadBalancer(this.target,v,i,(C,P)=>{C.retryThrottling?YT.set(this.getTarget(),new rv.RetryThrottler(C.retryThrottling.maxTokens,C.retryThrottling.tokenRatio,YT.get(this.getTarget()))):YT.delete(this.getTarget()),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Address resolution succeeded"),this.configSelector=P,this.currentResolutionError=null,process.nextTick(()=>{let b=this.configSelectionQueue;this.configSelectionQueue=[],b.length>0&&this.callRefTimerUnref();for(let I of b)I.getConfig()})},C=>{this.channelzEnabled&&this.channelzTrace.addTrace("CT_WARNING","Address resolution failed with code "+C.code+' and details "'+C.details+'"'),this.configSelectionQueue.length>0&&this.trace("Name resolution failed with calls queued for config selection"),this.configSelector===null&&(this.currentResolutionError=Object.assign(Object.assign({},(0,FJ.restrictControlPlaneStatusCode)(C.code,C.details)),{metadata:C.metadata}));let P=this.configSelectionQueue;this.configSelectionQueue=[],P.length>0&&this.callRefTimerUnref();for(let b of P)b.reportResolverError(C)}),this.filterStackFactory=new wJ.FilterStackFactory([new BJ.CompressionFilterFactory(this,this.options)]),this.trace("Channel constructed with options "+JSON.stringify(i,void 0,2));let M=new Error;(0,ev.trace)(Jl.LogVerbosity.DEBUG,"channel_stacktrace","("+this.channelzRef.id+`) Channel constructed `+((E=M.stack)===null||E===void 0?void 0:E.substring(M.stack.indexOf(` `)+1))),this.lastActivityTimestamp=new Date}getChannelzInfo(){return{target:this.originalTarget,state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()}}trace(e,t){(0,ev.trace)(t??Jl.LogVerbosity.DEBUG,"channel","("+this.channelzRef.id+") "+(0,kT.uriToString)(this.target)+" "+e)}callRefTimerRef(){var e,t,i,a;!((t=(e=this.callRefTimer).hasRef)===null||t===void 0)&&t.call(e)||(this.trace("callRefTimer.ref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(a=(i=this.callRefTimer).ref)===null||a===void 0||a.call(i))}callRefTimerUnref(){var e,t;(!this.callRefTimer.hasRef||this.callRefTimer.hasRef())&&(this.trace("callRefTimer.unref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(t=(e=this.callRefTimer).unref)===null||t===void 0||t.call(e))}removeConnectivityStateWatcher(e){let t=this.connectivityStateWatchers.findIndex(i=>i===e);t>=0&&this.connectivityStateWatchers.splice(t,1)}updateState(e){(0,ev.trace)(Jl.LogVerbosity.DEBUG,"connectivity_state","("+this.channelzRef.id+") "+(0,kT.uriToString)(this.target)+" "+jr.ConnectivityState[this.connectivityState]+" -> "+jr.ConnectivityState[e]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+jr.ConnectivityState[e]),this.connectivityState=e;let t=this.connectivityStateWatchers.slice();for(let i of t)e!==i.currentState&&(i.timer&&clearTimeout(i.timer),this.removeConnectivityStateWatcher(i),i.callback());e!==jr.ConnectivityState.TRANSIENT_FAILURE&&(this.currentResolutionError=null)}throttleKeepalive(e){if(e>this.keepaliveTime){this.keepaliveTime=e;for(let t of this.wrappedSubchannels)t.throttleKeepalive(e)}}removeWrappedSubchannel(e){this.wrappedSubchannels.delete(e)}doPick(e,t){return this.currentPicker.pick({metadata:e,extraPickInfo:t})}queueCallForPick(e){this.pickQueue.push(e),this.callRefTimerRef()}getConfig(e,t){return this.resolvingLoadBalancer.exitIdle(),this.configSelector?{type:"SUCCESS",config:this.configSelector(e,t,this.randomChannelId)}:this.currentResolutionError?{type:"ERROR",error:this.currentResolutionError}:{type:"NONE"}}queueCallForConfig(e){this.configSelectionQueue.push(e),this.callRefTimerRef()}enterIdle(){this.resolvingLoadBalancer.destroy(),this.updateState(jr.ConnectivityState.IDLE),this.currentPicker=new qU.QueuePicker(this.resolvingLoadBalancer),this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}startIdleTimeout(e){var t,i;this.idleTimer=setTimeout(()=>{if(this.callCount>0){this.startIdleTimeout(this.idleTimeoutMs);return}let s=new Date().valueOf()-this.lastActivityTimestamp.valueOf();s>=this.idleTimeoutMs?(this.trace("Idle timer triggered after "+this.idleTimeoutMs+"ms of inactivity"),this.enterIdle()):this.startIdleTimeout(this.idleTimeoutMs-s)},e),(i=(t=this.idleTimer).unref)===null||i===void 0||i.call(t)}maybeStartIdleTimer(){this.connectivityState!==jr.ConnectivityState.SHUTDOWN&&!this.idleTimer&&this.startIdleTimeout(this.idleTimeoutMs)}onCallStart(){this.channelzEnabled&&this.callTracker.addCallStarted(),this.callCount+=1}onCallEnd(e){this.channelzEnabled&&(e.code===Jl.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()),this.callCount-=1,this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()}createLoadBalancingCall(e,t,i,a,s){let n=(0,tv.getNextCallNumber)();return this.trace("createLoadBalancingCall ["+n+'] method="'+t+'"'),new HJ.LoadBalancingCall(this,e,t,i,a,s,n)}createRetryingCall(e,t,i,a,s){let n=(0,tv.getNextCallNumber)();return this.trace("createRetryingCall ["+n+'] method="'+t+'"'),new rv.RetryingCall(this,e,t,i,a,s,n,this.retryBufferTracker,YT.get(this.getTarget()))}createInnerCall(e,t,i,a,s){return this.options["grpc.enable_retries"]===0?this.createLoadBalancingCall(e,t,i,a,s):this.createRetryingCall(e,t,i,a,s)}createResolvingCall(e,t,i,a,s){let n=(0,tv.getNextCallNumber)();this.trace("createResolvingCall ["+n+'] method="'+e+'", deadline='+(0,kJ.deadlineToString)(t));let r={deadline:t,flags:s??Jl.Propagate.DEFAULTS,host:i??this.defaultAuthority,parentCall:a},l=new YJ.ResolvingCall(this,e,r,this.filterStackFactory.clone(),this.credentials._getCallCredentials(),n);return this.onCallStart(),l.addStatusWatcher(c=>{this.onCallEnd(c)}),l}close(){this.resolvingLoadBalancer.destroy(),this.updateState(jr.ConnectivityState.SHUTDOWN),clearInterval(this.callRefTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.channelzEnabled&&(0,Ql.unregisterChannelzRef)(this.channelzRef),this.subchannelPool.unrefUnusedSubchannels()}getTarget(){return(0,kT.uriToString)(this.target)}getConnectivityState(e){let t=this.connectivityState;return e&&(this.resolvingLoadBalancer.exitIdle(),this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()),t}watchConnectivityState(e,t,i){if(this.connectivityState===jr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");let a=null;if(t!==1/0){let n=t instanceof Date?t:new Date(t),r=new Date;if(t===-1/0||n<=r){process.nextTick(i,new Error("Deadline passed without connectivity state change"));return}a=setTimeout(()=>{this.removeConnectivityStateWatcher(s),i(new Error("Deadline passed without connectivity state change"))},n.getTime()-r.getTime())}let s={currentState:e,callback:i,timer:a};this.connectivityStateWatchers.push(s)}getChannelzRef(){return this.channelzRef}createCall(e,t,i,a,s){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof t=="number"||t instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");if(this.connectivityState===jr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");return this.createResolvingCall(e,t,i,a,s)}};FT.InternalChannel=ov});var MA=A(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.ChannelImplementation=void 0;var XJ=L_(),JJ=jU(),iv=class{constructor(e,t,i){if(typeof e!="string")throw new TypeError("Channel target must be a string");if(!(t instanceof XJ.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(i&&typeof i!="object")throw new TypeError("Channel options must be an object");this.internalChannel=new JJ.InternalChannel(e,t,i)}close(){this.internalChannel.close()}getTarget(){return this.internalChannel.getTarget()}getConnectivityState(e){return this.internalChannel.getConnectivityState(e)}watchConnectivityState(e,t,i){this.internalChannel.watchConnectivityState(e,t,i)}getChannelzRef(){return this.internalChannel.getChannelzRef()}createCall(e,t,i,a,s){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof t=="number"||t instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");return this.internalChannel.createCall(e,t,i,a,s)}};KT.ChannelImplementation=iv});var $U=A(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.ServerDuplexStreamImpl=or.ServerWritableStreamImpl=or.ServerReadableStreamImpl=or.ServerUnaryCallImpl=or.serverErrorToStatus=void 0;var QJ=H("events"),uv=H("stream"),Ev=fe(),zU=ht();function _v(o,e){var t;let i={code:Ev.Status.UNKNOWN,details:"message"in o?o.message:"Unknown Error",metadata:(t=e??o.metadata)!==null&&t!==void 0?t:null};return"code"in o&&typeof o.code=="number"&&Number.isInteger(o.code)&&(i.code=o.code,"details"in o&&typeof o.details=="string"&&(i.details=o.details)),i}or.serverErrorToStatus=_v;var av=class extends QJ.EventEmitter{constructor(e,t,i,a){super(),this.path=e,this.call=t,this.metadata=i,this.request=a,this.cancelled=!1}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};or.ServerUnaryCallImpl=av;var sv=class extends uv.Readable{constructor(e,t,i){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=i,this.cancelled=!1}_read(e){this.call.startRead()}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};or.ServerReadableStreamImpl=sv;var lv=class extends uv.Writable{constructor(e,t,i,a){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=i,this.request=a,this.pendingStatus={code:Ev.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new zU.Metadata,this.on("error",s=>{this.pendingStatus=_v(s),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_write(e,t,i){this.call.sendMessage(e,i)}_final(e){var t;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(t=this.pendingStatus.metadata)!==null&&t!==void 0?t:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};or.ServerWritableStreamImpl=lv;var cv=class extends uv.Duplex{constructor(e,t,i){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=i,this.pendingStatus={code:Ev.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new zU.Metadata,this.on("error",a=>{this.pendingStatus=_v(a),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_read(e){this.call.startRead()}_write(e,t,i){this.call.sendMessage(e,i)}_final(e){var t;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(t=this.pendingStatus.metadata)!==null&&t!==void 0?t:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};or.ServerDuplexStreamImpl=cv});var pv=A(qT=>{"use strict";Object.defineProperty(qT,"__esModule",{value:!0});qT.ServerCredentials=void 0;var XU=zf(),Zl=class{static createInsecure(){return new Tv}static createSsl(e,t,i=!1){var a;if(e!==null&&!Buffer.isBuffer(e))throw new TypeError("rootCerts must be null or a Buffer");if(!Array.isArray(t))throw new TypeError("keyCertPairs must be an array");if(typeof i!="boolean")throw new TypeError("checkClientCertificate must be a boolean");let s=[],n=[];for(let r=0;r{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.getServerInterceptingCall=Lt.BaseServerInterceptingCall=Lt.ServerInterceptingCall=Lt.ResponderBuilder=Lt.isInterceptingServerListener=Lt.ServerListenerBuilder=void 0;var JU=ht(),gt=fe(),$a=H("http2"),QU=O_(),ZU=H("zlib"),ZJ=yh(),nb=Ie(),ob="server_call";function Xo(o){nb.trace(gt.LogVerbosity.DEBUG,ob,o)}var fv=class{constructor(){this.metadata=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withOnReceiveMetadata(e){return this.metadata=e,this}withOnReceiveMessage(e){return this.message=e,this}withOnReceiveHalfClose(e){return this.halfClose=e,this}withOnCancel(e){return this.cancel=e,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveHalfClose:this.halfClose,onCancel:this.cancel}}};Lt.ServerListenerBuilder=fv;function eQ(o){return o.onReceiveMetadata!==void 0&&o.onReceiveMetadata.length===1}Lt.isInterceptingServerListener=eQ;var Av=class{constructor(e,t){this.listener=e,this.nextListener=t,this.cancelled=!1,this.processingMetadata=!1,this.hasPendingMessage=!1,this.pendingMessage=null,this.processingMessage=!1,this.hasPendingHalfClose=!1}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingHalfClose(){this.hasPendingHalfClose&&(this.nextListener.onReceiveHalfClose(),this.hasPendingHalfClose=!1)}onReceiveMetadata(e){this.cancelled||(this.processingMetadata=!0,this.listener.onReceiveMetadata(e,t=>{this.processingMetadata=!1,!this.cancelled&&(this.nextListener.onReceiveMetadata(t),this.processPendingMessage(),this.processPendingHalfClose())}))}onReceiveMessage(e){this.cancelled||(this.processingMessage=!0,this.listener.onReceiveMessage(e,t=>{this.processingMessage=!1,!this.cancelled&&(this.processingMetadata?(this.pendingMessage=t,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(t),this.processPendingHalfClose()))}))}onReceiveHalfClose(){this.cancelled||this.listener.onReceiveHalfClose(()=>{this.cancelled||(this.processingMetadata||this.processingMessage?this.hasPendingHalfClose=!0:this.nextListener.onReceiveHalfClose())})}onCancel(){this.cancelled=!0,this.listener.onCancel(),this.nextListener.onCancel()}},hv=class{constructor(){this.start=void 0,this.metadata=void 0,this.message=void 0,this.status=void 0}withStart(e){return this.start=e,this}withSendMetadata(e){return this.metadata=e,this}withSendMessage(e){return this.message=e,this}withSendStatus(e){return this.status=e,this}build(){return{start:this.start,sendMetadata:this.metadata,sendMessage:this.message,sendStatus:this.status}}};Lt.ResponderBuilder=hv;var WT={onReceiveMetadata:(o,e)=>{e(o)},onReceiveMessage:(o,e)=>{e(o)},onReceiveHalfClose:o=>{o()},onCancel:()=>{}},jT={start:o=>{o()},sendMetadata:(o,e)=>{e(o)},sendMessage:(o,e)=>{e(o)},sendStatus:(o,e)=>{e(o)}},vv=class{constructor(e,t){var i,a,s,n;this.nextCall=e,this.processingMetadata=!1,this.processingMessage=!1,this.pendingMessage=null,this.pendingMessageCallback=null,this.pendingStatus=null,this.responder={start:(i=t==null?void 0:t.start)!==null&&i!==void 0?i:jT.start,sendMetadata:(a=t==null?void 0:t.sendMetadata)!==null&&a!==void 0?a:jT.sendMetadata,sendMessage:(s=t==null?void 0:t.sendMessage)!==null&&s!==void 0?s:jT.sendMessage,sendStatus:(n=t==null?void 0:t.sendStatus)!==null&&n!==void 0?n:jT.sendStatus}}processPendingMessage(){this.pendingMessageCallback&&(this.nextCall.sendMessage(this.pendingMessage,this.pendingMessageCallback),this.pendingMessage=null,this.pendingMessageCallback=null)}processPendingStatus(){this.pendingStatus&&(this.nextCall.sendStatus(this.pendingStatus),this.pendingStatus=null)}start(e){this.responder.start(t=>{var i,a,s,n;let r={onReceiveMetadata:(i=t==null?void 0:t.onReceiveMetadata)!==null&&i!==void 0?i:WT.onReceiveMetadata,onReceiveMessage:(a=t==null?void 0:t.onReceiveMessage)!==null&&a!==void 0?a:WT.onReceiveMessage,onReceiveHalfClose:(s=t==null?void 0:t.onReceiveHalfClose)!==null&&s!==void 0?s:WT.onReceiveHalfClose,onCancel:(n=t==null?void 0:t.onCancel)!==null&&n!==void 0?n:WT.onCancel},l=new Av(r,e);this.nextCall.start(l)})}sendMetadata(e){this.processingMetadata=!0,this.responder.sendMetadata(e,t=>{this.processingMetadata=!1,this.nextCall.sendMetadata(t),this.processPendingMessage(),this.processPendingStatus()})}sendMessage(e,t){this.processingMessage=!0,this.responder.sendMessage(e,i=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=i,this.pendingMessageCallback=t):this.nextCall.sendMessage(i,t)})}sendStatus(e){this.responder.sendStatus(e,t=>{this.processingMetadata||this.processingMessage?this.pendingStatus=t:this.nextCall.sendStatus(t)})}startRead(){this.nextCall.startRead()}getPeer(){return this.nextCall.getPeer()}getDeadline(){return this.nextCall.getDeadline()}};Lt.ServerInterceptingCall=vv;var ib="grpc-accept-encoding",Rv="grpc-encoding",eb="grpc-message",tb="grpc-status",dv="grpc-timeout",tQ=/(\d{1,8})\s*([HMSmun])/,rQ={H:36e5,M:6e4,S:1e3,m:1,u:.001,n:1e-6},nQ={[ib]:"identity,deflate,gzip",[Rv]:"identity"},rb={[$a.constants.HTTP2_HEADER_STATUS]:$a.constants.HTTP_STATUS_OK,[$a.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},oQ={waitForTrailers:!0},zT=class{constructor(e,t,i,a,s){this.stream=e,this.callEventTracker=i,this.handler=a,this.listener=null,this.deadlineTimer=null,this.deadline=1/0,this.maxSendMessageSize=gt.DEFAULT_MAX_SEND_MESSAGE_LENGTH,this.maxReceiveMessageSize=gt.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.cancelled=!1,this.metadataSent=!1,this.wantTrailers=!1,this.cancelNotified=!1,this.incomingEncoding="identity",this.readQueue=[],this.isReadPending=!1,this.receivedHalfClose=!1,this.streamEnded=!1,this.stream.once("error",c=>{}),this.stream.once("close",()=>{var c;Xo("Request to method "+((c=this.handler)===null||c===void 0?void 0:c.path)+" stream closed with rstCode "+this.stream.rstCode),this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!1),this.callEventTracker.onCallEnd({code:gt.Status.CANCELLED,details:"Stream closed before sending status",metadata:null})),this.notifyOnCancel()}),this.stream.on("data",c=>{this.handleDataFrame(c)}),this.stream.pause(),this.stream.on("end",()=>{this.handleEndEvent()}),"grpc.max_send_message_length"in s&&(this.maxSendMessageSize=s["grpc.max_send_message_length"]),"grpc.max_receive_message_length"in s&&(this.maxReceiveMessageSize=s["grpc.max_receive_message_length"]),this.decoder=new ZJ.StreamDecoder(this.maxReceiveMessageSize);let n=JU.Metadata.fromHttp2Headers(t);nb.isTracerEnabled(ob)&&Xo("Request to "+this.handler.path+" received headers "+JSON.stringify(n.toJSON()));let r=n.get(dv);r.length>0&&this.handleTimeoutHeader(r[0]);let l=n.get(Rv);l.length>0&&(this.incomingEncoding=l[0]),n.remove(dv),n.remove(Rv),n.remove(ib),n.remove($a.constants.HTTP2_HEADER_ACCEPT_ENCODING),n.remove($a.constants.HTTP2_HEADER_TE),n.remove($a.constants.HTTP2_HEADER_CONTENT_TYPE),this.metadata=n}handleTimeoutHeader(e){let t=e.toString().match(tQ);if(t===null){let s={code:gt.Status.INTERNAL,details:`Invalid ${dv} value "${e}"`,metadata:null};process.nextTick(()=>{this.sendStatus(s)});return}let i=+t[1]*rQ[t[2]]|0,a=new Date;this.deadline=a.setMilliseconds(a.getMilliseconds()+i),this.deadlineTimer=setTimeout(()=>{let s={code:gt.Status.DEADLINE_EXCEEDED,details:"Deadline exceeded",metadata:null};this.sendStatus(s)},i)}checkCancelled(){return!this.cancelled&&(this.stream.destroyed||this.stream.closed)&&(this.notifyOnCancel(),this.cancelled=!0),this.cancelled}notifyOnCancel(){this.cancelNotified||(this.cancelNotified=!0,this.cancelled=!0,process.nextTick(()=>{var e;(e=this.listener)===null||e===void 0||e.onCancel()}),this.deadlineTimer&&clearTimeout(this.deadlineTimer),this.stream.resume())}maybeSendMetadata(){this.metadataSent||this.sendMetadata(new JU.Metadata)}serializeMessage(e){let t=this.handler.serialize(e),i=t.byteLength,a=Buffer.allocUnsafe(i+5);return a.writeUInt8(0,0),a.writeUInt32BE(i,1),t.copy(a,5),a}decompressMessage(e,t){let i=e.subarray(5);if(t==="identity")return i;if(t==="deflate"||t==="gzip"){let a;return t==="deflate"?a=ZU.createInflate():a=ZU.createGunzip(),new Promise((s,n)=>{let r=0,l=[];a.on("data",c=>{l.push(c),r+=c.byteLength,this.maxReceiveMessageSize!==-1&&r>this.maxReceiveMessageSize&&(a.destroy(),n({code:gt.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}`}))}),a.on("end",()=>{s(Buffer.concat(l))}),a.write(i),a.end()})}else return Promise.reject({code:gt.Status.UNIMPLEMENTED,details:`Received message compressed with unsupported encoding "${t}"`})}async decompressAndMaybePush(e){if(e.type!=="COMPRESSED")throw new Error(`Invalid queue entry type: ${e.type}`);let i=e.compressedMessage.readUInt8(0)===1?this.incomingEncoding:"identity",a;try{a=await this.decompressMessage(e.compressedMessage,i)}catch(s){this.sendStatus(s);return}try{e.parsedMessage=this.handler.deserialize(a)}catch(s){this.sendStatus({code:gt.Status.INTERNAL,details:`Error deserializing request: ${s.message}`});return}e.type="READABLE",this.maybePushNextMessage()}maybePushNextMessage(){if(this.listener&&this.isReadPending&&this.readQueue.length>0&&this.readQueue[0].type!=="COMPRESSED"){this.isReadPending=!1;let e=this.readQueue.shift();e.type==="READABLE"?this.listener.onReceiveMessage(e.parsedMessage):this.listener.onReceiveHalfClose()}}handleDataFrame(e){var t;if(this.checkCancelled())return;Xo("Request to "+this.handler.path+" received data frame of size "+e.length);let i;try{i=this.decoder.write(e)}catch(a){this.sendStatus({code:gt.Status.RESOURCE_EXHAUSTED,details:a.message});return}for(let a of i){this.stream.pause();let s={type:"COMPRESSED",compressedMessage:a,parsedMessage:null};this.readQueue.push(s),this.decompressAndMaybePush(s),(t=this.callEventTracker)===null||t===void 0||t.addMessageReceived()}}handleEndEvent(){this.readQueue.push({type:"HALF_CLOSE",compressedMessage:null,parsedMessage:null}),this.receivedHalfClose=!0,this.maybePushNextMessage()}start(e){Xo("Request to "+this.handler.path+" start called"),!this.checkCancelled()&&(this.listener=e,e.onReceiveMetadata(this.metadata))}sendMetadata(e){if(this.checkCancelled()||this.metadataSent)return;this.metadataSent=!0;let t=e?e.toHttp2Headers():null,i=Object.assign(Object.assign(Object.assign({},rb),nQ),t);this.stream.respond(i,oQ)}sendMessage(e,t){if(this.checkCancelled())return;let i;try{i=this.serializeMessage(e)}catch(a){this.sendStatus({code:gt.Status.INTERNAL,details:`Error serializing response: ${(0,QU.getErrorMessage)(a)}`,metadata:null});return}if(this.maxSendMessageSize!==-1&&i.length-5>this.maxSendMessageSize){this.sendStatus({code:gt.Status.RESOURCE_EXHAUSTED,details:`Sent message larger than max (${i.length} vs. ${this.maxSendMessageSize})`,metadata:null});return}this.maybeSendMetadata(),Xo("Request to "+this.handler.path+" sent data frame of size "+i.length),this.stream.write(i,a=>{var s;if(a){this.sendStatus({code:gt.Status.INTERNAL,details:`Error writing message: ${(0,QU.getErrorMessage)(a)}`,metadata:null});return}(s=this.callEventTracker)===null||s===void 0||s.addMessageSent(),t()})}sendStatus(e){var t,i;if(!this.checkCancelled())if(Xo("Request to method "+((t=this.handler)===null||t===void 0?void 0:t.path)+" ended with status code: "+gt.Status[e.code]+" details: "+e.details),this.metadataSent)this.wantTrailers?this.notifyOnCancel():(this.wantTrailers=!0,this.stream.once("wantTrailers",()=>{var a;this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let s=Object.assign({[tb]:e.code,[eb]:encodeURI(e.details)},(a=e.metadata)===null||a===void 0?void 0:a.toHttp2Headers());this.stream.sendTrailers(s),this.notifyOnCancel()}),this.stream.end());else{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let a=Object.assign(Object.assign({[tb]:e.code,[eb]:encodeURI(e.details)},rb),(i=e.metadata)===null||i===void 0?void 0:i.toHttp2Headers());this.stream.respond(a,{endStream:!0}),this.notifyOnCancel()}}startRead(){Xo("Request to "+this.handler.path+" startRead called"),!this.checkCancelled()&&(this.isReadPending=!0,this.readQueue.length===0?this.receivedHalfClose||this.stream.resume():this.maybePushNextMessage())}getPeer(){var e;let t=(e=this.stream.session)===null||e===void 0?void 0:e.socket;return t!=null&&t.remoteAddress?t.remotePort?`${t.remoteAddress}:${t.remotePort}`:t.remoteAddress:"unknown"}getDeadline(){return this.deadline}};Lt.BaseServerInterceptingCall=zT;function iQ(o,e,t,i,a,s){let n={path:a.path,requestStream:a.type==="clientStream"||a.type==="bidi",responseStream:a.type==="serverStream"||a.type==="bidi",requestDeserialize:a.deserialize,responseSerialize:a.serialize},r=new zT(e,t,i,a,s);return o.reduce((l,c)=>c(n,l),r)}Lt.getServerInterceptingCall=iQ});var Eb=A(lo=>{"use strict";var aQ=lo&&lo.__runInitializers||function(o,e,t){for(var i=arguments.length>2,a=0;a=0;f--){var O={};for(var v in i)O[v]=v==="access"?{}:i[v];for(var v in i.access)O.access[v]=i.access[v];O.addInitializer=function(C){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(C||null))};var M=(0,t[f])(r==="accessor"?{get:u.get,set:u.set}:u[l],O);if(r==="accessor"){if(M===void 0)continue;if(M===null||typeof M!="object")throw new TypeError("Object expected");(E=n(M.get))&&(u.get=E),(E=n(M.set))&&(u.set=E),(E=n(M.init))&&a.unshift(E)}else(E=n(M))&&(r==="field"?a.unshift(E):u[l]=E)}c&&Object.defineProperty(c,i.name,u),d=!0};Object.defineProperty(lo,"__esModule",{value:!0});lo.Server=void 0;var wt=H("http2"),lQ=H("util"),Qe=fe(),Ja=$U(),cQ=pv(),ab=br(),Ov=Ie(),so=Sr(),hr=Ut(),nt=Wo(),sb=mv(),Xa=~(1<<31),Nv=~(1<<31),uQ=2e4,lb=~(1<<31),{HTTP2_HEADER_PATH:cb}=wt.constants,EQ="server",ub=Buffer.from("max_age");function _Q(){}function TQ(o){return function(e,t){return lQ.deprecate(e,o)}}function Mv(o){return{code:Qe.Status.UNIMPLEMENTED,details:`The server does not implement the method ${o}`}}function SQ(o,e){let t=Mv(e);switch(o){case"unary":return(i,a)=>{a(t,null)};case"clientStream":return(i,a)=>{a(t,null)};case"serverStream":return i=>{i.emit("error",t)};case"bidi":return i=>{i.emit("error",t)};default:throw new Error(`Invalid handlerType ${o}`)}}var pQ=(()=>{var o;let e=[],t;return o=class{constructor(a){var s,n,r,l,c,u;this.boundPorts=(aQ(this,e),new Map),this.http2Servers=new Map,this.sessionIdleTimeouts=new Map,this.handlers=new Map,this.sessions=new Map,this.started=!1,this.shutdown=!1,this.serverAddressString="null",this.channelzEnabled=!0,this.options=a??{},this.options["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new nt.ChannelzTraceStub,this.callTracker=new nt.ChannelzCallTrackerStub,this.listenerChildrenTracker=new nt.ChannelzChildrenTrackerStub,this.sessionChildrenTracker=new nt.ChannelzChildrenTrackerStub):(this.channelzTrace=new nt.ChannelzTrace,this.callTracker=new nt.ChannelzCallTracker,this.listenerChildrenTracker=new nt.ChannelzChildrenTracker,this.sessionChildrenTracker=new nt.ChannelzChildrenTracker),this.channelzRef=(0,nt.registerChannelzServer)("server",()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Server created"),this.maxConnectionAgeMs=(s=this.options["grpc.max_connection_age_ms"])!==null&&s!==void 0?s:Xa,this.maxConnectionAgeGraceMs=(n=this.options["grpc.max_connection_age_grace_ms"])!==null&&n!==void 0?n:Xa,this.keepaliveTimeMs=(r=this.options["grpc.keepalive_time_ms"])!==null&&r!==void 0?r:Nv,this.keepaliveTimeoutMs=(l=this.options["grpc.keepalive_timeout_ms"])!==null&&l!==void 0?l:uQ,this.sessionIdleTimeout=(c=this.options["grpc.max_connection_idle_ms"])!==null&&c!==void 0?c:lb,this.commonServerOptions={maxSendHeaderBlockLength:Number.MAX_SAFE_INTEGER},"grpc-node.max_session_memory"in this.options?this.commonServerOptions.maxSessionMemory=this.options["grpc-node.max_session_memory"]:this.commonServerOptions.maxSessionMemory=Number.MAX_SAFE_INTEGER,"grpc.max_concurrent_streams"in this.options&&(this.commonServerOptions.settings={maxConcurrentStreams:this.options["grpc.max_concurrent_streams"]}),this.interceptors=(u=this.options.interceptors)!==null&&u!==void 0?u:[],this.trace("Server constructed")}getChannelzInfo(){return{trace:this.channelzTrace,callTracker:this.callTracker,listenerChildren:this.listenerChildrenTracker.getChildLists(),sessionChildren:this.sessionChildrenTracker.getChildLists()}}getChannelzSessionInfo(a){var s,n,r;let l=this.sessions.get(a),c=a.socket,u=c.remoteAddress?(0,so.stringToSubchannelAddress)(c.remoteAddress,c.remotePort):null,E=c.localAddress?(0,so.stringToSubchannelAddress)(c.localAddress,c.localPort):null,d;if(a.encrypted){let O=c,v=O.getCipher(),M=O.getCertificate(),C=O.getPeerCertificate();d={cipherSuiteStandardName:(s=v.standardName)!==null&&s!==void 0?s:null,cipherSuiteOtherName:v.standardName?null:v.name,localCertificate:M&&"raw"in M?M.raw:null,remoteCertificate:C&&"raw"in C?C.raw:null}}else d=null;return{remoteAddress:u,localAddress:E,security:d,remoteName:null,streamsStarted:l.streamTracker.callsStarted,streamsSucceeded:l.streamTracker.callsSucceeded,streamsFailed:l.streamTracker.callsFailed,messagesSent:l.messagesSent,messagesReceived:l.messagesReceived,keepAlivesSent:l.keepAlivesSent,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:l.streamTracker.lastCallStartedTimestamp,lastMessageSentTimestamp:l.lastMessageSentTimestamp,lastMessageReceivedTimestamp:l.lastMessageReceivedTimestamp,localFlowControlWindow:(n=a.state.localWindowSize)!==null&&n!==void 0?n:null,remoteFlowControlWindow:(r=a.state.remoteWindowSize)!==null&&r!==void 0?r:null}}trace(a){Ov.trace(Qe.LogVerbosity.DEBUG,EQ,"("+this.channelzRef.id+") "+a)}addProtoService(){throw new Error("Not implemented. Use addService() instead")}addService(a,s){if(a===null||typeof a!="object"||s===null||typeof s!="object")throw new Error("addService() requires two objects as arguments");let n=Object.keys(a);if(n.length===0)throw new Error("Cannot add an empty service to a server");n.forEach(r=>{let l=a[r],c;l.requestStream?l.responseStream?c="bidi":c="clientStream":l.responseStream?c="serverStream":c="unary";let u=s[r],E;if(u===void 0&&typeof l.originalName=="string"&&(u=s[l.originalName]),u!==void 0?E=u.bind(s):E=SQ(c,r),this.register(l.path,E,l.responseSerialize,l.requestDeserialize,c)===!1)throw new Error(`Method handler for ${l.path} already provided.`)})}removeService(a){if(a===null||typeof a!="object")throw new Error("removeService() requires object as argument");Object.keys(a).forEach(n=>{let r=a[n];this.unregister(r.path)})}bind(a,s){throw new Error("Not implemented. Use bindAsync() instead")}registerListenerToChannelz(a){return(0,nt.registerChannelzSocket)((0,so.subchannelAddressToString)(a),()=>({localAddress:a,remoteAddress:null,security:null,remoteName:null,streamsStarted:0,streamsSucceeded:0,streamsFailed:0,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null,localFlowControlWindow:null,remoteFlowControlWindow:null}),this.channelzEnabled)}createHttp2Server(a){let s;if(a._isSecure()){let n=Object.assign(this.commonServerOptions,a._getSettings());n.enableTrace=this.options["grpc-node.tls_enable_trace"]===1,s=wt.createSecureServer(n),s.on("secureConnection",r=>{r.on("error",l=>{this.trace("An incoming TLS connection closed with error: "+l.message)})})}else s=wt.createServer(this.commonServerOptions);return s.setTimeout(0,_Q),this._setupHandlers(s),s}bindOneAddress(a,s){this.trace("Attempting to bind "+(0,so.subchannelAddressToString)(a));let n=this.createHttp2Server(s.credentials);return new Promise((r,l)=>{let c=u=>{this.trace("Failed to bind "+(0,so.subchannelAddressToString)(a)+" with error "+u.message),r({port:"port"in a?a.port:1,error:u.message})};n.once("error",c),n.listen(a,()=>{let u=n.address(),E;typeof u=="string"?E={path:u}:E={host:u.address,port:u.port};let d=this.registerListenerToChannelz(E);this.listenerChildrenTracker.refChild(d),this.http2Servers.set(n,{channelzRef:d,sessions:new Set}),s.listeningServers.add(n),this.trace("Successfully bound "+(0,so.subchannelAddressToString)(E)),r({port:"port"in E?E.port:1}),n.removeListener("error",c)})})}async bindManyPorts(a,s){if(a.length===0)return{count:0,port:0,errors:[]};if((0,so.isTcpSubchannelAddress)(a[0])&&a[0].port===0){let n=await this.bindOneAddress(a[0],s);if(n.error){let r=await this.bindManyPorts(a.slice(1),s);return Object.assign(Object.assign({},r),{errors:[n.error,...r.errors]})}else{let r=a.slice(1).map(u=>(0,so.isTcpSubchannelAddress)(u)?{host:u.host,port:n.port}:u),l=await Promise.all(r.map(u=>this.bindOneAddress(u,s))),c=[n,...l];return{count:c.filter(u=>u.error===void 0).length,port:n.port,errors:c.filter(u=>u.error).map(u=>u.error)}}}else{let n=await Promise.all(a.map(r=>this.bindOneAddress(r,s)));return{count:n.filter(r=>r.error===void 0).length,port:n[0].port,errors:n.filter(r=>r.error).map(r=>r.error)}}}async bindAddressList(a,s){let n=await this.bindManyPorts(a,s);if(n.count>0)return n.count{let r={onSuccessfulResolution:(c,u,E)=>{r.onSuccessfulResolution=()=>{};let d=[].concat(...c.map(f=>f.addresses));if(d.length===0){n(new Error(`No addresses resolved for port ${a}`));return}s(d)},onError:c=>{n(new Error(c.details))}};(0,ab.createResolver)(a,r,this.options).updateResolution()})}async bindPort(a,s){let n=await this.resolvePort(a);if(s.cancelled)throw this.completeUnbind(s),new Error("bindAsync operation cancelled by unbind call");let r=await this.bindAddressList(n,s);if(s.cancelled)throw this.completeUnbind(s),new Error("bindAsync operation cancelled by unbind call");return r}normalizePort(a){let s=(0,hr.parseUri)(a);if(s===null)throw new Error(`Could not parse port "${a}"`);let n=(0,ab.mapUriDefaultScheme)(s);if(n===null)throw new Error(`Could not get a default scheme for port "${a}"`);return n}bindAsync(a,s,n){if(this.shutdown)throw new Error("bindAsync called after shutdown");if(typeof a!="string")throw new TypeError("port must be a string");if(s===null||!(s instanceof cQ.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");if(typeof n!="function")throw new TypeError("callback must be a function");this.trace("bindAsync port="+a);let r=this.normalizePort(a),l=(d,f)=>{process.nextTick(()=>n(d,f))},c=this.boundPorts.get((0,hr.uriToString)(r));if(c){if(!s._equals(c.credentials)){l(new Error(`${a} already bound with incompatible credentials`),0);return}c.cancelled=!1,c.completionPromise?c.completionPromise.then(d=>n(null,d),d=>n(d,0)):l(null,c.portNumber);return}c={mapKey:(0,hr.uriToString)(r),originalUri:r,completionPromise:null,cancelled:!1,portNumber:0,credentials:s,listeningServers:new Set};let u=(0,hr.splitHostPort)(r.path),E=this.bindPort(r,c);c.completionPromise=E,(u==null?void 0:u.port)===0?E.then(d=>{let f={scheme:r.scheme,authority:r.authority,path:(0,hr.combineHostPort)({host:u.host,port:d})};c.mapKey=(0,hr.uriToString)(f),c.completionPromise=null,c.portNumber=d,this.boundPorts.set(c.mapKey,c),n(null,d)},d=>{n(d,0)}):(this.boundPorts.set(c.mapKey,c),E.then(d=>{c.completionPromise=null,c.portNumber=d,n(null,d)},d=>{n(d,0)}))}closeServer(a,s){this.trace("Closing server with address "+JSON.stringify(a.address()));let n=this.http2Servers.get(a);a.close(()=>{n&&(this.listenerChildrenTracker.unrefChild(n.channelzRef),(0,nt.unregisterChannelzRef)(n.channelzRef)),this.http2Servers.delete(a),s==null||s()})}closeSession(a,s){var n;this.trace("Closing session initiated by "+((n=a.socket)===null||n===void 0?void 0:n.remoteAddress));let r=this.sessions.get(a),l=()=>{r&&(this.sessionChildrenTracker.unrefChild(r.ref),(0,nt.unregisterChannelzRef)(r.ref)),s==null||s()};a.closed?queueMicrotask(l):a.close(l)}completeUnbind(a){for(let s of a.listeningServers){let n=this.http2Servers.get(s);if(this.closeServer(s,()=>{a.listeningServers.delete(s)}),n)for(let r of n.sessions)this.closeSession(r)}this.boundPorts.delete(a.mapKey)}unbind(a){this.trace("unbind port="+a);let s=this.normalizePort(a),n=(0,hr.splitHostPort)(s.path);if((n==null?void 0:n.port)===0)throw new Error("Cannot unbind port 0");let r=this.boundPorts.get((0,hr.uriToString)(s));r&&(this.trace("unbinding "+r.mapKey+" originally bound as "+(0,hr.uriToString)(r.originalUri)),r.completionPromise?r.cancelled=!0:this.completeUnbind(r))}drain(a,s){var n,r;this.trace("drain port="+a+" graceTimeMs="+s);let l=this.normalizePort(a),c=(0,hr.splitHostPort)(l.path);if((c==null?void 0:c.port)===0)throw new Error("Cannot drain port 0");let u=this.boundPorts.get((0,hr.uriToString)(l));if(!u)return;let E=new Set;for(let d of u.listeningServers){let f=this.http2Servers.get(d);if(f)for(let O of f.sessions)E.add(O),this.closeSession(O,()=>{E.delete(O)})}(r=(n=setTimeout(()=>{for(let d of E)d.destroy(wt.constants.NGHTTP2_CANCEL)},s)).unref)===null||r===void 0||r.call(n)}forceShutdown(){for(let a of this.boundPorts.values())a.cancelled=!0;this.boundPorts.clear();for(let a of this.http2Servers.keys())this.closeServer(a);this.sessions.forEach((a,s)=>{this.closeSession(s),s.destroy(wt.constants.NGHTTP2_CANCEL)}),this.sessions.clear(),(0,nt.unregisterChannelzRef)(this.channelzRef),this.shutdown=!0}register(a,s,n,r,l){return this.handlers.has(a)?!1:(this.handlers.set(a,{func:s,serialize:n,deserialize:r,type:l,path:a}),!0)}unregister(a){return this.handlers.delete(a)}start(){if(this.http2Servers.size===0||[...this.http2Servers.keys()].every(a=>!a.listening))throw new Error("server must be bound in order to start");if(this.started===!0)throw new Error("server is already started");this.started=!0}tryShutdown(a){var s;let n=c=>{(0,nt.unregisterChannelzRef)(this.channelzRef),a(c)},r=0;function l(){r--,r===0&&n()}this.shutdown=!0;for(let[c,u]of this.http2Servers.entries()){r++;let E=u.channelzRef.name;this.trace("Waiting for server "+E+" to close"),this.closeServer(c,()=>{this.trace("Server "+E+" finished closing"),l()});for(let d of u.sessions.keys()){r++;let f=(s=d.socket)===null||s===void 0?void 0:s.remoteAddress;this.trace("Waiting for session "+f+" to close"),this.closeSession(d,()=>{this.trace("Session "+f+" finished closing"),l()})}}r===0&&n()}addHttp2Port(){throw new Error("Not yet implemented")}getChannelzRef(){return this.channelzRef}_verifyContentType(a,s){let n=s[wt.constants.HTTP2_HEADER_CONTENT_TYPE];return typeof n!="string"||!n.startsWith("application/grpc")?(a.respond({[wt.constants.HTTP2_HEADER_STATUS]:wt.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE},{endStream:!0}),!1):!0}_retrieveHandler(a){this.trace("Received call to method "+a+" at address "+this.serverAddressString);let s=this.handlers.get(a);return s===void 0?(this.trace("No handler registered for method "+a+". Sending UNIMPLEMENTED status."),null):s}_respondWithError(a,s,n=null){var r,l;let c=Object.assign({"grpc-status":(r=a.code)!==null&&r!==void 0?r:Qe.Status.INTERNAL,"grpc-message":a.details,[wt.constants.HTTP2_HEADER_STATUS]:wt.constants.HTTP_STATUS_OK,[wt.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},(l=a.metadata)===null||l===void 0?void 0:l.toHttp2Headers());s.respond(c,{endStream:!0}),this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed()}_channelzHandler(a,s){this.onStreamOpened(a);let n=this.sessions.get(a.session);if(this.callTracker.addCallStarted(),n==null||n.streamTracker.addCallStarted(),!this._verifyContentType(a,s)){this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed();return}let r=s[cb],l=this._retrieveHandler(r);if(!l){this._respondWithError(Mv(r),a,n);return}let c={addMessageSent:()=>{n&&(n.messagesSent+=1,n.lastMessageSentTimestamp=new Date)},addMessageReceived:()=>{n&&(n.messagesReceived+=1,n.lastMessageReceivedTimestamp=new Date)},onCallEnd:E=>{E.code===Qe.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()},onStreamEnd:E=>{n&&(E?n.streamTracker.addCallSucceeded():n.streamTracker.addCallFailed())}},u=(0,sb.getServerInterceptingCall)(this.interceptors,a,s,c,l,this.options);this._runHandlerForCall(u,l)||(this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed(),u.sendStatus({code:Qe.Status.INTERNAL,details:`Unknown handler type: ${l.type}`}))}_streamHandler(a,s){if(this.onStreamOpened(a),this._verifyContentType(a,s)!==!0)return;let n=s[cb],r=this._retrieveHandler(n);if(!r){this._respondWithError(Mv(n),a,null);return}let l=(0,sb.getServerInterceptingCall)(this.interceptors,a,s,null,r,this.options);this._runHandlerForCall(l,r)||l.sendStatus({code:Qe.Status.INTERNAL,details:`Unknown handler type: ${r.type}`})}_runHandlerForCall(a,s){let{type:n}=s;if(n==="unary")dQ(a,s);else if(n==="clientStream")fQ(a,s);else if(n==="serverStream")AQ(a,s);else if(n==="bidi")hQ(a,s);else return!1;return!0}_setupHandlers(a){if(a===null)return;let s=a.address(),n="null";s&&(typeof s=="string"?n=s:n=s.address+":"+s.port),this.serverAddressString=n;let r=this.channelzEnabled?this._channelzHandler:this._streamHandler,l=this.channelzEnabled?this._channelzSessionHandler(a):this._sessionHandler(a);a.on("stream",r.bind(this)),a.on("session",l)}_sessionHandler(a){return s=>{var n,r,l;(n=this.http2Servers.get(a))===null||n===void 0||n.sessions.add(s);let c=null,u=null,E=null,d=null,f=!1,O=this.enableIdleTimeout(s);if(this.maxConnectionAgeMs!==Xa){let v=this.maxConnectionAgeMs/10,M=Math.random()*v*2-v;c=setTimeout(()=>{var C,P;f=!0,this.trace("Connection dropped by max connection age: "+((C=s.socket)===null||C===void 0?void 0:C.remoteAddress));try{s.goaway(wt.constants.NGHTTP2_NO_ERROR,~(1<<31),ub)}catch{s.destroy();return}s.close(),this.maxConnectionAgeGraceMs!==Xa&&(u=setTimeout(()=>{s.destroy()},this.maxConnectionAgeGraceMs),(P=u.unref)===null||P===void 0||P.call(u))},this.maxConnectionAgeMs+M),(r=c.unref)===null||r===void 0||r.call(c)}this.keepaliveTimeMs{var v;d=setTimeout(()=>{f=!0,s.close()},this.keepaliveTimeoutMs),(v=d.unref)===null||v===void 0||v.call(d);try{s.ping((M,C,P)=>{d&&clearTimeout(d),M&&(f=!0,this.trace("Connection dropped due to error of a ping frame "+M.message+" return in "+C),s.close())})}catch{clearTimeout(d),s.destroy()}},this.keepaliveTimeMs),(l=E.unref)===null||l===void 0||l.call(E)),s.on("close",()=>{var v,M;f||this.trace(`Connection dropped by client ${(v=s.socket)===null||v===void 0?void 0:v.remoteAddress}`),c&&clearTimeout(c),u&&clearTimeout(u),E&&(clearInterval(E),d&&clearTimeout(d)),O!==null&&(clearTimeout(O.timeout),this.sessionIdleTimeouts.delete(s)),(M=this.http2Servers.get(a))===null||M===void 0||M.sessions.delete(s)})}}_channelzSessionHandler(a){return s=>{var n,r,l,c,u;let E=(0,nt.registerChannelzSocket)((r=(n=s.socket)===null||n===void 0?void 0:n.remoteAddress)!==null&&r!==void 0?r:"unknown",this.getChannelzSessionInfo.bind(this,s),this.channelzEnabled),d={ref:E,streamTracker:new nt.ChannelzCallTracker,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null};(l=this.http2Servers.get(a))===null||l===void 0||l.sessions.add(s),this.sessions.set(s,d);let f=`${s.socket.remoteAddress}:${s.socket.remotePort}`;this.channelzTrace.addTrace("CT_INFO","Connection established by client "+f),this.trace("Connection established by client "+f),this.sessionChildrenTracker.refChild(E);let O=null,v=null,M=null,C=null,P=!1,b=this.enableIdleTimeout(s);if(this.maxConnectionAgeMs!==Xa){let I=this.maxConnectionAgeMs/10,q=Math.random()*I*2-I;O=setTimeout(()=>{var K;P=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by max connection age from "+f);try{s.goaway(wt.constants.NGHTTP2_NO_ERROR,~(1<<31),ub)}catch{s.destroy();return}s.close(),this.maxConnectionAgeGraceMs!==Xa&&(v=setTimeout(()=>{s.destroy()},this.maxConnectionAgeGraceMs),(K=v.unref)===null||K===void 0||K.call(v))},this.maxConnectionAgeMs+q),(c=O.unref)===null||c===void 0||c.call(O)}this.keepaliveTimeMs{var I;C=setTimeout(()=>{P=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by keepalive timeout from "+f),s.close()},this.keepaliveTimeoutMs),(I=C.unref)===null||I===void 0||I.call(C);try{s.ping((q,K,k)=>{C&&clearTimeout(C),q&&(P=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped due to error of a ping frame "+q.message+" return in "+K),s.close())}),d.keepAlivesSent+=1}catch{clearTimeout(C),s.destroy()}},this.keepaliveTimeMs),(u=M.unref)===null||u===void 0||u.call(M)),s.on("close",()=>{var I;P||this.channelzTrace.addTrace("CT_INFO","Connection dropped by client "+f),this.sessionChildrenTracker.unrefChild(E),(0,nt.unregisterChannelzRef)(E),O&&clearTimeout(O),v&&clearTimeout(v),M&&(clearInterval(M),C&&clearTimeout(C)),b!==null&&(clearTimeout(b.timeout),this.sessionIdleTimeouts.delete(s)),(I=this.http2Servers.get(a))===null||I===void 0||I.sessions.delete(s),this.sessions.delete(s)})}}enableIdleTimeout(a){var s,n;if(this.sessionIdleTimeout>=lb)return null;let r={activeStreams:0,lastIdle:Date.now(),onClose:this.onStreamClose.bind(this,a),timeout:setTimeout(this.onIdleTimeout,this.sessionIdleTimeout,this,a)};(n=(s=r.timeout).unref)===null||n===void 0||n.call(s),this.sessionIdleTimeouts.set(a,r);let{socket:l}=a;return this.trace("Enable idle timeout for "+l.remoteAddress+":"+l.remotePort),r}onIdleTimeout(a,s){let{socket:n}=s,r=a.sessionIdleTimeouts.get(s);r!==void 0&&r.activeStreams===0&&Date.now()-r.lastIdle>=a.sessionIdleTimeout&&(a.trace("Session idle timeout triggered for "+(n==null?void 0:n.remoteAddress)+":"+(n==null?void 0:n.remotePort)+" last idle at "+r.lastIdle),a.closeSession(s))}onStreamOpened(a){let s=a.session,n=this.sessionIdleTimeouts.get(s);n&&(n.activeStreams+=1,a.once("close",n.onClose))}onStreamClose(a){var s,n;let r=this.sessionIdleTimeouts.get(a);r&&(r.activeStreams-=1,r.activeStreams===0&&(r.lastIdle=Date.now(),r.timeout.refresh(),this.trace("Session onStreamClose"+((s=a.socket)===null||s===void 0?void 0:s.remoteAddress)+":"+((n=a.socket)===null||n===void 0?void 0:n.remotePort)+" at "+r.lastIdle)))}},(()=>{let i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[TQ("Calling start() is no longer necessary. It can be safely omitted.")],sQ(o,null,t,{kind:"method",name:"start",static:!1,private:!1,access:{has:a=>"start"in a,get:a=>a.start},metadata:i},null,e),i&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),o})();lo.Server=pQ;async function dQ(o,e){let t;function i(n,r,l,c){if(n){o.sendStatus((0,Ja.serverErrorToStatus)(n,l));return}o.sendMessage(r,()=>{o.sendStatus({code:Qe.Status.OK,details:"OK",metadata:l??null})})}let a,s=null;o.start({onReceiveMetadata(n){a=n,o.startRead()},onReceiveMessage(n){if(s){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}s=n,o.startRead()},onReceiveHalfClose(){if(!s){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Ja.ServerWritableStreamImpl(e.path,o,a,s);try{e.func(t,i)}catch(n){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${n.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"))}})}function fQ(o,e){let t;function i(a,s,n,r){if(a){o.sendStatus((0,Ja.serverErrorToStatus)(a,n));return}o.sendMessage(s,()=>{o.sendStatus({code:Qe.Status.OK,details:"OK",metadata:n??null})})}o.start({onReceiveMetadata(a){t=new Ja.ServerDuplexStreamImpl(e.path,o,a);try{e.func(t,i)}catch(s){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onReceiveMessage(a){t.push(a)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function AQ(o,e){let t,i,a=null;o.start({onReceiveMetadata(s){i=s,o.startRead()},onReceiveMessage(s){if(a){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}a=s,o.startRead()},onReceiveHalfClose(){if(!a){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Ja.ServerWritableStreamImpl(e.path,o,i,a);try{e.func(t)}catch(s){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function hQ(o,e){let t;o.start({onReceiveMetadata(i){t=new Ja.ServerDuplexStreamImpl(e.path,o,i);try{e.func(t)}catch(a){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onReceiveMessage(i){t.push(i)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}});var _b=A($T=>{"use strict";Object.defineProperty($T,"__esModule",{value:!0});$T.StatusBuilder=void 0;var Cv=class{constructor(){this.code=null,this.details=null,this.metadata=null}withCode(e){return this.code=e,this}withDetails(e){return this.details=e,this}withMetadata(e){return this.metadata=e,this}build(){let e={};return this.code!==null&&(e.code=this.code),this.details!==null&&(e.details=this.details),this.metadata!==null&&(e.metadata=this.metadata),e}};$T.StatusBuilder=Cv});var Pv=A(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.isDuration=co.durationToMs=co.msToDuration=void 0;function vQ(o){return{seconds:o/1e3|0,nanos:o%1e3*1e6|0}}co.msToDuration=vQ;function RQ(o){return o.seconds*1e3+o.nanos/1e6|0}co.durationToMs=RQ;function mQ(o){return typeof o.seconds=="number"&&typeof o.nanos=="number"}co.isDuration=mQ});var XT=A(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.setup=ir.LeafLoadBalancer=ir.PickFirstLoadBalancer=ir.shuffled=ir.PickFirstLoadBalancingConfig=void 0;var Lv=Ho(),Ke=$t(),Qa=jn(),OQ=Ie(),NQ=fe(),Tb=Sr(),Sb=H("net"),MQ="pick_first";function gv(o){OQ.trace(NQ.LogVerbosity.DEBUG,MQ,o)}var ec="pick_first",CQ=250,Za=class o{constructor(e){this.shuffleAddressList=e}getLoadBalancerName(){return ec}toJsonObject(){return{[ec]:{shuffleAddressList:this.shuffleAddressList}}}getShuffleAddressList(){return this.shuffleAddressList}static createFromJson(e){if("shuffleAddressList"in e&&typeof e.shuffleAddressList!="boolean")throw new Error("pick_first config field shuffleAddressList must be a boolean if provided");return new o(e.shuffleAddressList===!0)}};ir.PickFirstLoadBalancingConfig=Za;var yv=class{constructor(e){this.subchannel=e}pick(e){return{pickResultType:Qa.PickResultType.COMPLETE,subchannel:this.subchannel,status:null,onCallStarted:null,onCallEnded:null}}};function pb(o){let e=o.slice();for(let t=e.length-1;t>1;t--){let i=Math.floor(Math.random()*(t+1)),a=e[t];e[t]=e[i],e[i]=a}return e}ir.shuffled=pb;function PQ(o){let e=[],t=[],i=[],a=(0,Tb.isTcpSubchannelAddress)(o[0])&&(0,Sb.isIPv6)(o[0].host);for(let r of o)(0,Tb.isTcpSubchannelAddress)(r)&&(0,Sb.isIPv6)(r.host)?t.push(r):i.push(r);let s=a?t:i,n=a?i:t;for(let r=0;r{this.onSubchannelStateUpdate(i,a,s,r)},this.pickedSubchannelHealthListener=()=>this.calculateAndReportNewState(),this.triedAllSubchannels=!1,this.stickyTransientFailureMode=!1,this.requestedResolutionSinceLastUpdate=!1,this.lastError=null,this.latestAddressList=null,this.connectionDelayTimeout=setTimeout(()=>{},0),clearTimeout(this.connectionDelayTimeout),this.reportHealthStatus=t[db]}allChildrenHaveReportedTF(){return this.children.every(e=>e.hasReportedTransientFailure)}calculateAndReportNewState(){this.currentPick?this.reportHealthStatus&&!this.currentPick.isHealthy()?this.updateState(Ke.ConnectivityState.TRANSIENT_FAILURE,new Qa.UnavailablePicker({details:`Picked subchannel ${this.currentPick.getAddress()} is unhealthy`})):this.updateState(Ke.ConnectivityState.READY,new yv(this.currentPick)):this.children.length===0?this.updateState(Ke.ConnectivityState.IDLE,new Qa.QueuePicker(this)):this.stickyTransientFailureMode?this.updateState(Ke.ConnectivityState.TRANSIENT_FAILURE,new Qa.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(Ke.ConnectivityState.CONNECTING,new Qa.QueuePicker(this))}requestReresolution(){this.requestedResolutionSinceLastUpdate=!0,this.channelControlHelper.requestReresolution()}maybeEnterStickyTransientFailureMode(){if(this.allChildrenHaveReportedTF()&&(this.requestedResolutionSinceLastUpdate||this.requestReresolution(),!this.stickyTransientFailureMode)){this.stickyTransientFailureMode=!0;for(let{subchannel:e}of this.children)e.startConnecting();this.calculateAndReportNewState()}}removeCurrentPick(){if(this.currentPick!==null){let e=this.currentPick;this.currentPick=null,e.unref(),e.removeConnectivityStateListener(this.subchannelStateListener),this.channelControlHelper.removeChannelzChild(e.getChannelzRef()),this.reportHealthStatus&&e.removeHealthStateWatcher(this.pickedSubchannelHealthListener)}}onSubchannelStateUpdate(e,t,i,a){var s;if(!((s=this.currentPick)===null||s===void 0)&&s.realSubchannelEquals(e)){i!==Ke.ConnectivityState.READY&&(this.removeCurrentPick(),this.calculateAndReportNewState(),this.requestReresolution());return}for(let[n,r]of this.children.entries())if(e.realSubchannelEquals(r.subchannel)){i===Ke.ConnectivityState.READY&&this.pickSubchannel(r.subchannel),i===Ke.ConnectivityState.TRANSIENT_FAILURE&&(r.hasReportedTransientFailure=!0,a&&(this.lastError=a),this.maybeEnterStickyTransientFailureMode(),n===this.currentSubchannelIndex&&this.startNextSubchannelConnecting(n+1)),r.subchannel.startConnecting();return}}startNextSubchannelConnecting(e){if(clearTimeout(this.connectionDelayTimeout),!this.triedAllSubchannels){for(let[t,i]of this.children.entries())if(t>=e){let a=i.subchannel.getConnectivityState();if(a===Ke.ConnectivityState.IDLE||a===Ke.ConnectivityState.CONNECTING){this.startConnecting(t);return}}this.triedAllSubchannels=!0,this.maybeEnterStickyTransientFailureMode()}}startConnecting(e){var t,i;clearTimeout(this.connectionDelayTimeout),this.currentSubchannelIndex=e,this.children[e].subchannel.getConnectivityState()===Ke.ConnectivityState.IDLE&&(gv("Start connecting to subchannel with address "+this.children[e].subchannel.getAddress()),process.nextTick(()=>{var a;(a=this.children[e])===null||a===void 0||a.subchannel.startConnecting()})),this.connectionDelayTimeout=setTimeout(()=>{this.startNextSubchannelConnecting(e+1)},CQ),(i=(t=this.connectionDelayTimeout).unref)===null||i===void 0||i.call(t)}pickSubchannel(e){this.currentPick&&e.realSubchannelEquals(this.currentPick)||(gv("Pick subchannel with address "+e.getAddress()),this.stickyTransientFailureMode=!1,this.removeCurrentPick(),this.currentPick=e,e.ref(),this.reportHealthStatus&&e.addHealthStateWatcher(this.pickedSubchannelHealthListener),this.channelControlHelper.addChannelzChild(e.getChannelzRef()),this.resetSubchannelList(),clearTimeout(this.connectionDelayTimeout),this.calculateAndReportNewState())}updateState(e,t){gv(Ke.ConnectivityState[this.currentState]+" -> "+Ke.ConnectivityState[e]),this.currentState=e,this.channelControlHelper.updateState(e,t)}resetSubchannelList(){for(let e of this.children)this.currentPick&&e.subchannel.realSubchannelEquals(this.currentPick)||e.subchannel.removeConnectivityStateListener(this.subchannelStateListener),e.subchannel.unref(),this.channelControlHelper.removeChannelzChild(e.subchannel.getChannelzRef());this.currentSubchannelIndex=0,this.children=[],this.triedAllSubchannels=!1,this.requestedResolutionSinceLastUpdate=!1}connectToAddressList(e){let t=e.map(i=>({subchannel:this.channelControlHelper.createSubchannel(i,{}),hasReportedTransientFailure:!1}));for(let{subchannel:i}of t)i.ref(),this.channelControlHelper.addChannelzChild(i.getChannelzRef());this.resetSubchannelList(),this.children=t;for(let{subchannel:i}of this.children)if(i.addConnectivityStateListener(this.subchannelStateListener),i.getConnectivityState()===Ke.ConnectivityState.READY){this.pickSubchannel(i);return}for(let i of this.children)i.subchannel.getConnectivityState()===Ke.ConnectivityState.TRANSIENT_FAILURE&&(i.hasReportedTransientFailure=!0);this.startNextSubchannelConnecting(0),this.calculateAndReportNewState()}updateAddressList(e,t){if(!(t instanceof Za))return;t.getShuffleAddressList()&&(e=pb(e));let i=[].concat(...e.map(s=>s.addresses));if(i.length===0)throw new Error("No addresses in endpoint list passed to pick_first");let a=PQ(i);this.latestAddressList=a,this.connectToAddressList(a)}exitIdle(){this.currentState===Ke.ConnectivityState.IDLE&&this.latestAddressList&&this.connectToAddressList(this.latestAddressList)}resetBackoff(){}destroy(){this.resetSubchannelList(),this.removeCurrentPick()}getTypeName(){return ec}};ir.PickFirstLoadBalancer=tc;var gQ=new Za(!1),Iv=class{constructor(e,t,i){this.endpoint=e,this.latestState=Ke.ConnectivityState.IDLE;let a=(0,Lv.createChildChannelControlHelper)(t,{updateState:(s,n)=>{this.latestState=s,this.latestPicker=n,t.updateState(s,n)}});this.pickFirstBalancer=new tc(a,Object.assign(Object.assign({},i),{[db]:!0})),this.latestPicker=new Qa.QueuePicker(this.pickFirstBalancer)}startConnecting(){this.pickFirstBalancer.updateAddressList([this.endpoint],gQ)}updateEndpoint(e){this.endpoint=e,this.latestState!==Ke.ConnectivityState.IDLE&&this.startConnecting()}getConnectivityState(){return this.latestState}getPicker(){return this.latestPicker}getEndpoint(){return this.endpoint}exitIdle(){this.pickFirstBalancer.exitIdle()}destroy(){this.pickFirstBalancer.destroy()}};ir.LeafLoadBalancer=Iv;function LQ(){(0,Lv.registerLoadBalancerType)(ec,tc,Za),(0,Lv.registerDefaultLoadBalancerType)(ec)}ir.setup=LQ});var xv=A(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.BaseSubchannelWrapper=j.registerAdminService=j.FilterStackFactory=j.BaseFilter=j.PickResultType=j.QueuePicker=j.UnavailablePicker=j.ChildLoadBalancerHandler=j.EndpointMap=j.endpointHasAddress=j.endpointToString=j.subchannelAddressToString=j.LeafLoadBalancer=j.isLoadBalancerNameRegistered=j.parseLoadBalancingConfig=j.selectLbConfigFromList=j.registerLoadBalancerType=j.createChildChannelControlHelper=j.BackoffTimeout=j.durationToMs=j.uriToString=j.createResolver=j.registerResolver=j.log=j.trace=void 0;var fb=Ie();Object.defineProperty(j,"trace",{enumerable:!0,get:function(){return fb.trace}});Object.defineProperty(j,"log",{enumerable:!0,get:function(){return fb.log}});var Ab=br();Object.defineProperty(j,"registerResolver",{enumerable:!0,get:function(){return Ab.registerResolver}});Object.defineProperty(j,"createResolver",{enumerable:!0,get:function(){return Ab.createResolver}});var yQ=Ut();Object.defineProperty(j,"uriToString",{enumerable:!0,get:function(){return yQ.uriToString}});var IQ=Pv();Object.defineProperty(j,"durationToMs",{enumerable:!0,get:function(){return IQ.durationToMs}});var DQ=Cl();Object.defineProperty(j,"BackoffTimeout",{enumerable:!0,get:function(){return DQ.BackoffTimeout}});var rc=Ho();Object.defineProperty(j,"createChildChannelControlHelper",{enumerable:!0,get:function(){return rc.createChildChannelControlHelper}});Object.defineProperty(j,"registerLoadBalancerType",{enumerable:!0,get:function(){return rc.registerLoadBalancerType}});Object.defineProperty(j,"selectLbConfigFromList",{enumerable:!0,get:function(){return rc.selectLbConfigFromList}});Object.defineProperty(j,"parseLoadBalancingConfig",{enumerable:!0,get:function(){return rc.parseLoadBalancingConfig}});Object.defineProperty(j,"isLoadBalancerNameRegistered",{enumerable:!0,get:function(){return rc.isLoadBalancerNameRegistered}});var xQ=XT();Object.defineProperty(j,"LeafLoadBalancer",{enumerable:!0,get:function(){return xQ.LeafLoadBalancer}});var JT=Sr();Object.defineProperty(j,"subchannelAddressToString",{enumerable:!0,get:function(){return JT.subchannelAddressToString}});Object.defineProperty(j,"endpointToString",{enumerable:!0,get:function(){return JT.endpointToString}});Object.defineProperty(j,"endpointHasAddress",{enumerable:!0,get:function(){return JT.endpointHasAddress}});Object.defineProperty(j,"EndpointMap",{enumerable:!0,get:function(){return JT.EndpointMap}});var UQ=V_();Object.defineProperty(j,"ChildLoadBalancerHandler",{enumerable:!0,get:function(){return UQ.ChildLoadBalancerHandler}});var Dv=jn();Object.defineProperty(j,"UnavailablePicker",{enumerable:!0,get:function(){return Dv.UnavailablePicker}});Object.defineProperty(j,"QueuePicker",{enumerable:!0,get:function(){return Dv.QueuePicker}});Object.defineProperty(j,"PickResultType",{enumerable:!0,get:function(){return Dv.PickResultType}});var bQ=kh();Object.defineProperty(j,"BaseFilter",{enumerable:!0,get:function(){return bQ.BaseFilter}});var VQ=Bh();Object.defineProperty(j,"FilterStackFactory",{enumerable:!0,get:function(){return VQ.FilterStackFactory}});var wQ=G_();Object.defineProperty(j,"registerAdminService",{enumerable:!0,get:function(){return wQ.registerAdminService}});var BQ=HT();Object.defineProperty(j,"BaseSubchannelWrapper",{enumerable:!0,get:function(){return BQ.BaseSubchannelWrapper}})});var hb=A(QT=>{"use strict";Object.defineProperty(QT,"__esModule",{value:!0});QT.setup=void 0;var GQ=br(),Uv=class{constructor(e,t,i){this.listener=t,this.hasReturnedResult=!1,this.endpoints=[];let a;e.authority===""?a="/"+e.path:a=e.path,this.endpoints=[{addresses:[{path:a}]}]}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(this.listener.onSuccessfulResolution,this.endpoints,null,null,null,{}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return"localhost"}};function HQ(){(0,GQ.registerResolver)("unix",Uv)}QT.setup=HQ});var Nb=A(tS=>{"use strict";Object.defineProperty(tS,"__esModule",{value:!0});tS.setup=void 0;var vb=H("net"),ZT=fe(),bv=ht(),Rb=br(),mb=Ut(),kQ=Ie(),YQ="ip_resolver";function Ob(o){kQ.trace(ZT.LogVerbosity.DEBUG,YQ,o)}var Vv="ipv4",wv="ipv6",FQ=443,eS=class{constructor(e,t,i){var a;this.listener=t,this.endpoints=[],this.error=null,this.hasReturnedResult=!1,Ob("Resolver constructed for target "+(0,mb.uriToString)(e));let s=[];if(!(e.scheme===Vv||e.scheme===wv)){this.error={code:ZT.Status.UNAVAILABLE,details:`Unrecognized scheme ${e.scheme} in IP resolver`,metadata:new bv.Metadata};return}let n=e.path.split(",");for(let r of n){let l=(0,mb.splitHostPort)(r);if(l===null){this.error={code:ZT.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${r}`,metadata:new bv.Metadata};return}if(e.scheme===Vv&&!(0,vb.isIPv4)(l.host)||e.scheme===wv&&!(0,vb.isIPv6)(l.host)){this.error={code:ZT.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${r}`,metadata:new bv.Metadata};return}s.push({host:l.host,port:(a=l.port)!==null&&a!==void 0?a:FQ})}this.endpoints=s.map(r=>({addresses:[r]})),Ob("Parsed "+e.scheme+" address list "+s)}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(()=>{this.error?this.listener.onError(this.error):this.listener.onSuccessfulResolution(this.endpoints,null,null,null,{})}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return e.path.split(",")[0]}};function KQ(){(0,Rb.registerResolver)(Vv,eS),(0,Rb.registerResolver)(wv,eS)}tS.setup=KQ});var gb=A(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.setup=es.RoundRobinLoadBalancer=void 0;var Pb=Ho(),Bt=$t(),Bv=jn(),qQ=Ie(),WQ=fe(),Mb=Sr(),jQ=XT(),zQ="round_robin";function Cb(o){qQ.trace(WQ.LogVerbosity.DEBUG,zQ,o)}var rS="round_robin",Gv=class o{getLoadBalancerName(){return rS}constructor(){}toJsonObject(){return{[rS]:{}}}static createFromJson(e){return new o}},Hv=class{constructor(e,t=0){this.children=e,this.nextIndex=t}pick(e){let t=this.children[this.nextIndex].picker;return this.nextIndex=(this.nextIndex+1)%this.children.length,t.pick(e)}peekNextEndpoint(){return this.children[this.nextIndex].endpoint}},nS=class{constructor(e,t){this.channelControlHelper=e,this.options=t,this.children=[],this.currentState=Bt.ConnectivityState.IDLE,this.currentReadyPicker=null,this.updatesPaused=!1,this.lastError=null,this.childChannelControlHelper=(0,Pb.createChildChannelControlHelper)(e,{updateState:(i,a)=>{this.calculateAndUpdateState()}})}countChildrenWithState(e){return this.children.filter(t=>t.getConnectivityState()===e).length}calculateAndUpdateState(){if(!this.updatesPaused){if(this.countChildrenWithState(Bt.ConnectivityState.READY)>0){let e=this.children.filter(i=>i.getConnectivityState()===Bt.ConnectivityState.READY),t=0;if(this.currentReadyPicker!==null){let i=this.currentReadyPicker.peekNextEndpoint();t=e.findIndex(a=>(0,Mb.endpointEqual)(a.getEndpoint(),i)),t<0&&(t=0)}this.updateState(Bt.ConnectivityState.READY,new Hv(e.map(i=>({endpoint:i.getEndpoint(),picker:i.getPicker()})),t))}else this.countChildrenWithState(Bt.ConnectivityState.CONNECTING)>0?this.updateState(Bt.ConnectivityState.CONNECTING,new Bv.QueuePicker(this)):this.countChildrenWithState(Bt.ConnectivityState.TRANSIENT_FAILURE)>0?this.updateState(Bt.ConnectivityState.TRANSIENT_FAILURE,new Bv.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(Bt.ConnectivityState.IDLE,new Bv.QueuePicker(this));for(let e of this.children)e.getConnectivityState()===Bt.ConnectivityState.IDLE&&e.exitIdle()}}updateState(e,t){Cb(Bt.ConnectivityState[this.currentState]+" -> "+Bt.ConnectivityState[e]),e===Bt.ConnectivityState.READY?this.currentReadyPicker=t:this.currentReadyPicker=null,this.currentState=e,this.channelControlHelper.updateState(e,t)}resetSubchannelList(){for(let e of this.children)e.destroy()}updateAddressList(e,t){this.resetSubchannelList(),Cb("Connect to endpoint list "+e.map(Mb.endpointToString)),this.updatesPaused=!0,this.children=e.map(i=>new jQ.LeafLoadBalancer(i,this.childChannelControlHelper,this.options));for(let i of this.children)i.startConnecting();this.updatesPaused=!1,this.calculateAndUpdateState()}exitIdle(){}resetBackoff(){}destroy(){this.resetSubchannelList()}getTypeName(){return rS}};es.RoundRobinLoadBalancer=nS;function $Q(){(0,Pb.registerLoadBalancerType)(rS,nS,Gv)}es.setup=$Q});var Ib=A(uo=>{"use strict";var kv;Object.defineProperty(uo,"__esModule",{value:!0});uo.setup=uo.OutlierDetectionLoadBalancer=uo.OutlierDetectionLoadBalancingConfig=void 0;var XQ=$t(),Lb=fe(),Jo=Pv(),yb=xv(),JQ=Ho(),QQ=V_(),ZQ=jn(),Yv=Sr(),e7=HT(),t7=Ie(),r7="outlier_detection";function ot(o){t7.trace(Lb.LogVerbosity.DEBUG,r7,o)}var zv="outlier_detection",n7=((kv=process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION)!==null&&kv!==void 0?kv:"true")==="true",o7={stdev_factor:1900,enforcement_percentage:100,minimum_hosts:5,request_volume:100},i7={threshold:85,enforcement_percentage:100,minimum_hosts:5,request_volume:50};function ts(o,e,t,i){if(e in o&&o[e]!==void 0&&typeof o[e]!==t){let a=i?`${i}.${e}`:e;throw new Error(`outlier detection config ${a} parse error: expected ${t}, got ${typeof o[e]}`)}}function Fv(o,e,t){let i=t?`${t}.${e}`:e;if(e in o&&o[e]!==void 0){if(!(0,Jo.isDuration)(o[e]))throw new Error(`outlier detection config ${i} parse error: expected Duration, got ${typeof o[e]}`);if(!(o[e].seconds>=0&&o[e].seconds<=315576e6&&o[e].nanos>=0&&o[e].nanos<=999999999))throw new Error(`outlier detection config ${i} parse error: values out of range for non-negative Duaration`)}}function oS(o,e,t){let i=t?`${t}.${e}`:e;if(ts(o,e,"number",t),e in o&&o[e]!==void 0&&!(o[e]>=0&&o[e]<=100))throw new Error(`outlier detection config ${i} parse error: value out of range for percentage (0-100)`)}var nc=class o{constructor(e,t,i,a,s,n,r){if(this.childPolicy=r,r.getLoadBalancerName()==="pick_first")throw new Error("outlier_detection LB policy cannot have a pick_first child policy");this.intervalMs=e??1e4,this.baseEjectionTimeMs=t??3e4,this.maxEjectionTimeMs=i??3e5,this.maxEjectionPercent=a??10,this.successRateEjection=s?Object.assign(Object.assign({},o7),s):null,this.failurePercentageEjection=n?Object.assign(Object.assign({},i7),n):null}getLoadBalancerName(){return zv}toJsonObject(){var e,t;return{outlier_detection:{interval:(0,Jo.msToDuration)(this.intervalMs),base_ejection_time:(0,Jo.msToDuration)(this.baseEjectionTimeMs),max_ejection_time:(0,Jo.msToDuration)(this.maxEjectionTimeMs),max_ejection_percent:this.maxEjectionPercent,success_rate_ejection:(e=this.successRateEjection)!==null&&e!==void 0?e:void 0,failure_percentage_ejection:(t=this.failurePercentageEjection)!==null&&t!==void 0?t:void 0,child_policy:[this.childPolicy.toJsonObject()]}}}getIntervalMs(){return this.intervalMs}getBaseEjectionTimeMs(){return this.baseEjectionTimeMs}getMaxEjectionTimeMs(){return this.maxEjectionTimeMs}getMaxEjectionPercent(){return this.maxEjectionPercent}getSuccessRateEjectionConfig(){return this.successRateEjection}getFailurePercentageEjectionConfig(){return this.failurePercentageEjection}getChildPolicy(){return this.childPolicy}static createFromJson(e){var t;if(Fv(e,"interval"),Fv(e,"base_ejection_time"),Fv(e,"max_ejection_time"),oS(e,"max_ejection_percent"),"success_rate_ejection"in e&&e.success_rate_ejection!==void 0){if(typeof e.success_rate_ejection!="object")throw new Error("outlier detection config success_rate_ejection must be an object");ts(e.success_rate_ejection,"stdev_factor","number","success_rate_ejection"),oS(e.success_rate_ejection,"enforcement_percentage","success_rate_ejection"),ts(e.success_rate_ejection,"minimum_hosts","number","success_rate_ejection"),ts(e.success_rate_ejection,"request_volume","number","success_rate_ejection")}if("failure_percentage_ejection"in e&&e.failure_percentage_ejection!==void 0){if(typeof e.failure_percentage_ejection!="object")throw new Error("outlier detection config failure_percentage_ejection must be an object");oS(e.failure_percentage_ejection,"threshold","failure_percentage_ejection"),oS(e.failure_percentage_ejection,"enforcement_percentage","failure_percentage_ejection"),ts(e.failure_percentage_ejection,"minimum_hosts","number","failure_percentage_ejection"),ts(e.failure_percentage_ejection,"request_volume","number","failure_percentage_ejection")}if(!("child_policy"in e)||!Array.isArray(e.child_policy))throw new Error("outlier detection config child_policy must be an array");let i=(0,JQ.selectLbConfigFromList)(e.child_policy);if(!i)throw new Error("outlier detection config child_policy: no valid recognized policy found");return new o(e.interval?(0,Jo.durationToMs)(e.interval):null,e.base_ejection_time?(0,Jo.durationToMs)(e.base_ejection_time):null,e.max_ejection_time?(0,Jo.durationToMs)(e.max_ejection_time):null,(t=e.max_ejection_percent)!==null&&t!==void 0?t:null,e.success_rate_ejection,e.failure_percentage_ejection,i)}};uo.OutlierDetectionLoadBalancingConfig=nc;var qv=class extends e7.BaseSubchannelWrapper{constructor(e,t){super(e),this.mapEntry=t,this.refCount=0}ref(){this.child.ref(),this.refCount+=1}unref(){if(this.child.unref(),this.refCount-=1,this.refCount<=0&&this.mapEntry){let e=this.mapEntry.subchannelWrappers.indexOf(this);e>=0&&this.mapEntry.subchannelWrappers.splice(e,1)}}eject(){this.setHealthy(!1)}uneject(){this.setHealthy(!0)}getMapEntry(){return this.mapEntry}getWrappedSubchannel(){return this.child}};function Kv(){return{success:0,failure:0}}var Wv=class{constructor(){this.activeBucket=Kv(),this.inactiveBucket=Kv()}addSuccess(){this.activeBucket.success+=1}addFailure(){this.activeBucket.failure+=1}switchBuckets(){this.inactiveBucket=this.activeBucket,this.activeBucket=Kv()}getLastSuccesses(){return this.inactiveBucket.success}getLastFailures(){return this.inactiveBucket.failure}},jv=class{constructor(e,t){this.wrappedPicker=e,this.countCalls=t}pick(e){let t=this.wrappedPicker.pick(e);if(t.pickResultType===ZQ.PickResultType.COMPLETE){let i=t.subchannel,a=i.getMapEntry();if(a){let s=t.onCallEnded;return this.countCalls&&(s=n=>{var r;n===Lb.Status.OK?a.counter.addSuccess():a.counter.addFailure(),(r=t.onCallEnded)===null||r===void 0||r.call(t,n)}),Object.assign(Object.assign({},t),{subchannel:i.getWrappedSubchannel(),onCallEnded:s})}else return Object.assign(Object.assign({},t),{subchannel:i.getWrappedSubchannel()})}else return t}},iS=class{constructor(e,t){this.entryMap=new Yv.EndpointMap,this.latestConfig=null,this.timerStartTime=null,this.childBalancer=new QQ.ChildLoadBalancerHandler((0,yb.createChildChannelControlHelper)(e,{createSubchannel:(i,a)=>{let s=e.createSubchannel(i,a),n=this.entryMap.getForSubchannelAddress(i),r=new qv(s,n);return(n==null?void 0:n.currentEjectionTimestamp)!==null&&r.eject(),n==null||n.subchannelWrappers.push(r),r},updateState:(i,a)=>{i===XQ.ConnectivityState.READY?e.updateState(i,new jv(a,this.isCountingEnabled())):e.updateState(i,a)}}),t),this.ejectionTimer=setInterval(()=>{},0),clearInterval(this.ejectionTimer)}isCountingEnabled(){return this.latestConfig!==null&&(this.latestConfig.getSuccessRateEjectionConfig()!==null||this.latestConfig.getFailurePercentageEjectionConfig()!==null)}getCurrentEjectionPercent(){let e=0;for(let t of this.entryMap.values())t.currentEjectionTimestamp!==null&&(e+=1);return e*100/this.entryMap.size}runSuccessRateCheck(e){if(!this.latestConfig)return;let t=this.latestConfig.getSuccessRateEjectionConfig();if(!t)return;ot("Running success rate check");let i=t.request_volume,a=0,s=[];for(let[E,d]of this.entryMap.entries()){let f=d.counter.getLastSuccesses(),O=d.counter.getLastFailures();ot("Stats for "+(0,Yv.endpointToString)(E)+": successes="+f+" failures="+O+" targetRequestVolume="+i),f+O>=i&&(a+=1,s.push(f/(f+O)))}if(ot("Found "+a+" success rate candidates; currentEjectionPercent="+this.getCurrentEjectionPercent()+" successRates=["+s+"]"),aE+d)/s.length,r=0;for(let E of s){let d=E-n;r+=d*d}let l=r/s.length,c=Math.sqrt(l),u=n-c*(t.stdev_factor/1e3);ot("stdev="+c+" ejectionThreshold="+u);for(let[E,d]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let f=d.counter.getLastSuccesses(),O=d.counter.getLastFailures();if(f+Othis.runChecks(),e),(i=(t=this.ejectionTimer).unref)===null||i===void 0||i.call(t)}runChecks(){let e=new Date;if(ot("Ejection timer running"),this.switchAllBuckets(),!!this.latestConfig){this.timerStartTime=e,this.startTimer(this.latestConfig.getIntervalMs()),this.runSuccessRateCheck(e),this.runFailurePercentageCheck(e);for(let[t,i]of this.entryMap.entries())if(i.currentEjectionTimestamp===null)i.ejectionTimeMultiplier>0&&(i.ejectionTimeMultiplier-=1);else{let a=this.latestConfig.getBaseEjectionTimeMs(),s=this.latestConfig.getMaxEjectionTimeMs(),n=new Date(i.currentEjectionTimestamp.getTime());n.setMilliseconds(n.getMilliseconds()+Math.min(a*i.ejectionTimeMultiplier,Math.max(a,s))),n{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.experimental=U.ServerInterceptingCall=U.ResponderBuilder=U.ServerListenerBuilder=U.addAdminServicesToServer=U.getChannelzHandlers=U.getChannelzServiceDefinition=U.InterceptorConfigurationError=U.InterceptingCall=U.RequesterBuilder=U.ListenerBuilder=U.StatusBuilder=U.getClientChannel=U.ServerCredentials=U.Server=U.setLogVerbosity=U.setLogger=U.load=U.loadObject=U.CallCredentials=U.ChannelCredentials=U.waitForClientReady=U.closeClient=U.Channel=U.makeGenericClientConstructor=U.makeClientConstructor=U.loadPackageDefinition=U.Client=U.compressionAlgorithms=U.propagate=U.connectivityState=U.status=U.logVerbosity=U.Metadata=U.credentials=void 0;var aS=Wf();Object.defineProperty(U,"CallCredentials",{enumerable:!0,get:function(){return aS.CallCredentials}});var s7=MA();Object.defineProperty(U,"Channel",{enumerable:!0,get:function(){return s7.ChannelImplementation}});var l7=Gh();Object.defineProperty(U,"compressionAlgorithms",{enumerable:!0,get:function(){return l7.CompressionAlgorithms}});var c7=$t();Object.defineProperty(U,"connectivityState",{enumerable:!0,get:function(){return c7.ConnectivityState}});var sS=L_();Object.defineProperty(U,"ChannelCredentials",{enumerable:!0,get:function(){return sS.ChannelCredentials}});var Db=NA();Object.defineProperty(U,"Client",{enumerable:!0,get:function(){return Db.Client}});var $v=fe();Object.defineProperty(U,"logVerbosity",{enumerable:!0,get:function(){return $v.LogVerbosity}});Object.defineProperty(U,"status",{enumerable:!0,get:function(){return $v.Status}});Object.defineProperty(U,"propagate",{enumerable:!0,get:function(){return $v.Propagate}});var xb=Ie(),Xv=PA();Object.defineProperty(U,"loadPackageDefinition",{enumerable:!0,get:function(){return Xv.loadPackageDefinition}});Object.defineProperty(U,"makeClientConstructor",{enumerable:!0,get:function(){return Xv.makeClientConstructor}});Object.defineProperty(U,"makeGenericClientConstructor",{enumerable:!0,get:function(){return Xv.makeClientConstructor}});var u7=ht();Object.defineProperty(U,"Metadata",{enumerable:!0,get:function(){return u7.Metadata}});var E7=Eb();Object.defineProperty(U,"Server",{enumerable:!0,get:function(){return E7.Server}});var _7=pv();Object.defineProperty(U,"ServerCredentials",{enumerable:!0,get:function(){return _7.ServerCredentials}});var T7=_b();Object.defineProperty(U,"StatusBuilder",{enumerable:!0,get:function(){return T7.StatusBuilder}});U.credentials={combineChannelCredentials:(o,...e)=>e.reduce((t,i)=>t.compose(i),o),combineCallCredentials:(o,...e)=>e.reduce((t,i)=>t.compose(i),o),createInsecure:sS.ChannelCredentials.createInsecure,createSsl:sS.ChannelCredentials.createSsl,createFromSecureContext:sS.ChannelCredentials.createFromSecureContext,createFromMetadataGenerator:aS.CallCredentials.createFromMetadataGenerator,createFromGoogleCredential:aS.CallCredentials.createFromGoogleCredential,createEmpty:aS.CallCredentials.createEmpty};var S7=o=>o.close();U.closeClient=S7;var p7=(o,e,t)=>o.waitForReady(e,t);U.waitForClientReady=p7;var d7=(o,e)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};U.loadObject=d7;var f7=(o,e,t)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};U.load=f7;var A7=o=>{xb.setLogger(o)};U.setLogger=A7;var h7=o=>{xb.setLoggerVerbosity(o)};U.setLogVerbosity=h7;var v7=o=>Db.Client.prototype.getChannel.call(o);U.getClientChannel=v7;var lS=RA();Object.defineProperty(U,"ListenerBuilder",{enumerable:!0,get:function(){return lS.ListenerBuilder}});Object.defineProperty(U,"RequesterBuilder",{enumerable:!0,get:function(){return lS.RequesterBuilder}});Object.defineProperty(U,"InterceptingCall",{enumerable:!0,get:function(){return lS.InterceptingCall}});Object.defineProperty(U,"InterceptorConfigurationError",{enumerable:!0,get:function(){return lS.InterceptorConfigurationError}});var Ub=Wo();Object.defineProperty(U,"getChannelzServiceDefinition",{enumerable:!0,get:function(){return Ub.getChannelzServiceDefinition}});Object.defineProperty(U,"getChannelzHandlers",{enumerable:!0,get:function(){return Ub.getChannelzHandlers}});var R7=G_();Object.defineProperty(U,"addAdminServicesToServer",{enumerable:!0,get:function(){return R7.addAdminServicesToServer}});var Jv=mv();Object.defineProperty(U,"ServerListenerBuilder",{enumerable:!0,get:function(){return Jv.ServerListenerBuilder}});Object.defineProperty(U,"ResponderBuilder",{enumerable:!0,get:function(){return Jv.ResponderBuilder}});Object.defineProperty(U,"ServerInterceptingCall",{enumerable:!0,get:function(){return Jv.ServerInterceptingCall}});var m7=xv();U.experimental=m7;var O7=Ph(),N7=hb(),M7=Nb(),C7=XT(),P7=gb(),g7=Ib(),L7=Wo();O7.setup(),N7.setup(),M7.setup(),C7.setup(),P7.setup(),g7.setup(),L7.setup()});var bb=A(cS=>{"use strict";Object.defineProperty(cS,"__esModule",{value:!0});cS.createServiceClientConstructor=void 0;var y7=oc();function I7(o,e){let t={export:{path:o,requestStream:!1,responseStream:!1,requestSerialize:i=>i,requestDeserialize:i=>i,responseSerialize:i=>i,responseDeserialize:i=>i}};return y7.makeGenericClientConstructor(t,e)}cS.createServiceClientConstructor=I7});var ic=A(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.createOtlpGrpcExporterTransport=ar.GrpcExporterTransport=ar.createEmptyMetadata=ar.createSslCredentials=ar.createInsecureCredentials=void 0;var D7=0,x7=2;function U7(o){return o==="gzip"?x7:D7}function b7(){let{credentials:o}=oc();return o.createInsecure()}ar.createInsecureCredentials=b7;function V7(o,e,t){let{credentials:i}=oc();return i.createSsl(o,e,t)}ar.createSslCredentials=V7;function w7(){let{Metadata:o}=oc();return new o}ar.createEmptyMetadata=w7;var uS=class{constructor(e){this._parameters=e}shutdown(){var e;(e=this._client)===null||e===void 0||e.close()}send(e,t){let i=Buffer.from(e);if(this._client==null){let{createServiceClientConstructor:a}=bb();try{this._metadata=this._parameters.metadata()}catch(n){return Promise.resolve({status:"failure",error:n})}let s=a(this._parameters.grpcPath,this._parameters.grpcName);try{this._client=new s(this._parameters.address,this._parameters.credentials(),{"grpc.default_compression_algorithm":U7(this._parameters.compression)})}catch(n){return Promise.resolve({status:"failure",error:n})}}return new Promise(a=>{let s=Date.now()+t;if(this._metadata==null)return a({error:new Error("metadata was null"),status:"failure"});this._client.export(i,this._metadata,{deadline:s},(n,r)=>{a(n?{status:"failure",error:n}:{data:r,status:"success"})})})}};ar.GrpcExporterTransport=uS;function B7(o){return new uS(o)}ar.createOtlpGrpcExporterTransport=B7});var Vb=A(ES=>{"use strict";Object.defineProperty(ES,"__esModule",{value:!0});ES.VERSION=void 0;ES.VERSION="0.56.0"});var kb=A(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.getOtlpGrpcDefaultConfiguration=Eo.mergeOtlpGrpcConfigurationWithDefaults=Eo.validateAndNormalizeUrl=void 0;var Gb=(an(),$(vl)),ac=ic(),G7=Vb(),H7=H("url"),wb=(x(),$(Ze));function Hb(o){var e;o=o.trim(),o.match(/^([\w]{1,8}):\/\//)||(o=`https://${o}`);let i=new H7.URL(o);return i.protocol==="unix:"?o:(i.pathname&&i.pathname!=="/"&&wb.diag.warn("URL path should not be set when using grpc, the path part of the URL will be ignored."),i.protocol!==""&&!(!((e=i.protocol)===null||e===void 0)&&e.match(/^(http)s?:$/))&&wb.diag.warn("URL protocol should be http(s)://. Using http://."),i.host)}Eo.validateAndNormalizeUrl=Hb;function Bb(o,e){for(let[t,i]of Object.entries(e.getMap()))o.get(t).length<1&&o.set(t,i)}function k7(o,e,t){var i,a,s,n,r;let l=(a=(i=o.url)!==null&&i!==void 0?i:e.url)!==null&&a!==void 0?a:t.url;return Object.assign(Object.assign({},(0,Gb.mergeOtlpSharedConfigurationWithDefaults)(o,e,t)),{metadata:()=>{var c,u,E,d;let f=t.metadata();return Bb(f,(u=(c=o.metadata)===null||c===void 0?void 0:c.call(o).clone())!==null&&u!==void 0?u:(0,ac.createEmptyMetadata)()),Bb(f,(d=(E=e.metadata)===null||E===void 0?void 0:E.call(e))!==null&&d!==void 0?d:(0,ac.createEmptyMetadata)()),f},url:Hb(l),credentials:(r=(s=o.credentials)!==null&&s!==void 0?s:(n=e.credentials)===null||n===void 0?void 0:n.call(e,l))!==null&&r!==void 0?r:t.credentials(l)})}Eo.mergeOtlpGrpcConfigurationWithDefaults=k7;function Y7(){return Object.assign(Object.assign({},(0,Gb.getSharedConfigurationDefaults)()),{metadata:()=>{let o=(0,ac.createEmptyMetadata)();return o.set("User-Agent",`OTel-OTLP-Exporter-JavaScript/${G7.VERSION}`),o},url:"http://localhost:4317",credentials:o=>o.startsWith("http://")?()=>(0,ac.createInsecureCredentials)():()=>(0,ac.createSslCredentials)()})}Eo.getOtlpGrpcDefaultConfiguration=Y7});var Wb=A(_S=>{"use strict";Object.defineProperty(_S,"__esModule",{value:!0});_S.getOtlpGrpcConfigurationFromEnv=void 0;var Yb=(ee(),$(gs)),sc=ic(),F7=(Sa(),$(DI)),K7=H("fs"),q7=H("path"),Kb=(x(),$(Ze));function Qv(o,e){if(o!=null&&o!=="")return o;if(e!=null&&e!=="")return e}function W7(o){var e,t;let i=(e=process.env[`OTEL_EXPORTER_OTLP_${o}_HEADERS`])===null||e===void 0?void 0:e.trim(),a=(t=process.env.OTEL_EXPORTER_OTLP_HEADERS)===null||t===void 0?void 0:t.trim(),s=Yb.baggageUtils.parseKeyPairsIntoRecord(i),n=Yb.baggageUtils.parseKeyPairsIntoRecord(a);if(Object.keys(s).length===0&&Object.keys(n).length===0)return;let r=Object.assign({},n,s),l=(0,sc.createEmptyMetadata)();for(let[c,u]of Object.entries(r))l.set(c,u);return l}function j7(o){let e=W7(o);if(e!=null)return()=>e}function z7(o){var e,t;let i=(e=process.env[`OTEL_EXPORTER_OTLP_${o}_ENDPOINT`])===null||e===void 0?void 0:e.trim(),a=(t=process.env.OTEL_EXPORTER_OTLP_ENDPOINT)===null||t===void 0?void 0:t.trim();return Qv(i,a)}function $7(o){var e,t;let i=(e=process.env[`OTEL_EXPORTER_OTLP_${o}_INSECURE`])===null||e===void 0?void 0:e.toLowerCase().trim(),a=(t=process.env.OTEL_EXPORTER_OTLP_INSECURE)===null||t===void 0?void 0:t.toLowerCase().trim();return Qv(i,a)==="true"}function Zv(o,e,t){var i,a;let s=(i=process.env[o])===null||i===void 0?void 0:i.trim(),n=(a=process.env[e])===null||a===void 0?void 0:a.trim(),r=Qv(s,n);if(r!=null)try{return K7.readFileSync(q7.resolve(process.cwd(),r))}catch{Kb.diag.warn(t);return}else return}function X7(o){return Zv(`OTEL_EXPORTER_OTLP_${o}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function J7(o){return Zv(`OTEL_EXPORTER_OTLP_${o}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function Fb(o){return Zv(`OTEL_EXPORTER_OTLP_${o}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function qb(o){let e=J7(o),t=X7(o),i=Fb(o),a=e!=null&&t!=null;return i!=null&&!a?(Kb.diag.warn("Client key and certificate must both be provided, but one was missing - attempting to create credentials from just the root certificate"),(0,sc.createSslCredentials)(Fb(o))):(0,sc.createSslCredentials)(i,e,t)}function Q7(o){return $7(o)?(0,sc.createInsecureCredentials)():qb(o)}function Z7(o){return Object.assign(Object.assign({},(0,F7.getSharedConfigurationFromEnvironment)(o)),{metadata:j7(o),url:z7(o),credentials:e=>e.startsWith("http://")?()=>(0,sc.createInsecureCredentials)():e.startsWith("https://")?()=>qb(o):()=>Q7(o)})}_S.getOtlpGrpcConfigurationFromEnv=Z7});var zb=A(TS=>{"use strict";Object.defineProperty(TS,"__esModule",{value:!0});TS.convertLegacyOtlpGrpcOptions=void 0;var e9=(x(),$(Ze)),jb=kb(),t9=ic(),r9=Wb();function n9(o,e){o.headers&&e9.diag.warn("Headers cannot be set when using grpc");let t=o.credentials;return(0,jb.mergeOtlpGrpcConfigurationWithDefaults)({url:o.url,metadata:()=>{var i;return(i=o.metadata)!==null&&i!==void 0?i:(0,t9.createEmptyMetadata)()},compression:o.compression,timeoutMillis:o.timeoutMillis,concurrencyLimit:o.concurrencyLimit,credentials:t!=null?()=>t:void 0},(0,r9.getOtlpGrpcConfigurationFromEnv)(e),(0,jb.getOtlpGrpcDefaultConfiguration)())}TS.convertLegacyOtlpGrpcOptions=n9});var $b=A(SS=>{"use strict";Object.defineProperty(SS,"__esModule",{value:!0});SS.createOtlpGrpcExportDelegate=void 0;var o9=(an(),$(vl)),i9=ic();function a9(o,e,t,i){return(0,o9.createOtlpNetworkExportDelegate)(o,e,(0,i9.createOtlpGrpcExporterTransport)({address:o.url,compression:o.compression,credentials:o.credentials,metadata:o.metadata,grpcName:t,grpcPath:i}))}SS.createOtlpGrpcExportDelegate=a9});var eR=A(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.createOtlpGrpcExportDelegate=rs.convertLegacyOtlpGrpcOptions=void 0;var s9=zb();Object.defineProperty(rs,"convertLegacyOtlpGrpcOptions",{enumerable:!0,get:function(){return s9.convertLegacyOtlpGrpcOptions}});var l9=$b();Object.defineProperty(rs,"createOtlpGrpcExportDelegate",{enumerable:!0,get:function(){return l9.createOtlpGrpcExportDelegate}})});var Jb=A(pS=>{"use strict";Object.defineProperty(pS,"__esModule",{value:!0});pS.OTLPLogExporter=void 0;var Xb=eR(),c9=(Yn(),$(Df)),u9=(an(),$(vl)),tR=class extends u9.OTLPExporterBase{constructor(e={}){super((0,Xb.createOtlpGrpcExportDelegate)((0,Xb.convertLegacyOtlpGrpcOptions)(e,"LOGS"),c9.ProtobufLogsSerializer,"LogsExportService","/opentelemetry.proto.collector.logs.v1.LogsService/Export"))}};pS.OTLPLogExporter=tR});var Qb=A(Qo=>{"use strict";var E9=Qo&&Qo.__createBinding||(Object.create?function(o,e,t,i){i===void 0&&(i=t),Object.defineProperty(o,i,{enumerable:!0,get:function(){return e[t]}})}:function(o,e,t,i){i===void 0&&(i=t),o[i]=e[t]}),_9=Qo&&Qo.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&E9(e,o,t)};Object.defineProperty(Qo,"__esModule",{value:!0});_9(Jb(),Qo)});var Zb,e0=S(()=>{Zb="0.56.0"});var ns,t0=S(()=>{an();Yn();Sa();e0();ns=class extends gr{constructor(e={}){super(Dr(xr(e,"LOGS","v1/logs",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${Zb}`,"Content-Type":"application/x-protobuf"}),p_))}}});var r0=S(()=>{t0()});var n0=S(()=>{r0()});var o0={};Me(o0,{OTLPLogExporter:()=>ns});var i0=S(()=>{n0()});function Be(o){for(var e={},t=o.length,i=0;i{});var a0,s0,l0,c0,u0,E0,_0,T0,S0,p0,d0,f0,A0,h0,v0,R0,m0,O0,N0,M0,C0,P0,g0,L0,y0,I0,D0,x0,U0,b0,V0,w0,B0,G0,H0,k0,Y0,F0,K0,q0,W0,j0,z0,$0,X0,J0,Q0,Z0,eV,tV,rV,nV,oV,iV,aV,sV,lV,cV,uV,EV,_V,TV,SV,pV,dV,fV,AV,hV,vV,RV,mV,OV,NV,MV,CV,PV,gV,LV,yV,IV,DV,xV,UV,bV,VV,wV,BV,GV,HV,kV,YV,FV,KV,qV,WV,jV,zV,$V,XV,JV,QV,ZV,ew,tw,rw,nw,ow,iw,aw,sw,lw,cw,uw,Ew,_w,Tw,Sw,pw,dw,fw,Aw,hw,vw,Rw,mw,Ow,Nw,Mw,T9,S9,p9,d9,f9,A9,h9,v9,R9,m9,O9,N9,M9,C9,P9,g9,L9,y9,I9,D9,x9,U9,b9,V9,w9,B9,G9,H9,k9,Y9,F9,K9,q9,W9,j9,z9,$9,X9,J9,Q9,Z9,eZ,tZ,rZ,nZ,oZ,iZ,aZ,sZ,lZ,cZ,uZ,EZ,_Z,TZ,SZ,pZ,dZ,fZ,AZ,hZ,vZ,RZ,mZ,OZ,NZ,MZ,CZ,PZ,gZ,LZ,yZ,IZ,DZ,xZ,UZ,bZ,VZ,wZ,BZ,GZ,HZ,kZ,YZ,FZ,KZ,qZ,WZ,jZ,zZ,$Z,XZ,JZ,QZ,ZZ,eee,tee,ree,nee,oee,iee,aee,see,lee,cee,uee,Eee,_ee,Tee,See,pee,dee,fee,Aee,hee,vee,Ree,mee,Oee,Nee,Mee,Cee,Pee,gee,Lee,yee,Iee,Dee,xee,Cw,Pw,gw,Lw,yw,Iw,Dw,xw,Uw,bw,Vw,ww,Bw,Gw,Hw,kw,Yw,Fw,Kw,qw,Ww,jw,zw,$w,Xw,Jw,Qw,Zw,e1,t1,r1,n1,o1,i1,a1,s1,l1,c1,u1,E1,_1,T1,S1,p1,d1,f1,A1,Uee,bee,Vee,wee,Bee,Gee,Hee,kee,Yee,Fee,Kee,qee,Wee,jee,zee,$ee,Xee,Jee,Qee,Zee,ete,tte,rte,nte,ote,ite,ate,ste,lte,cte,ute,Ete,_te,Tte,Ste,pte,dte,fte,Ate,hte,vte,Rte,mte,Ote,Nte,Mte,Cte,Pte,h1,v1,R1,m1,O1,N1,M1,C1,P1,g1,L1,gte,Lte,yte,Ite,Dte,xte,Ute,bte,Vte,wte,Bte,Gte,y1,I1,D1,x1,U1,Hte,kte,Yte,Fte,Kte,qte,b1,V1,w1,Wte,jte,zte,$te,B1,G1,H1,k1,Xte,Jte,Qte,Zte,ere,Y1,F1,K1,q1,W1,j1,z1,tre,rre,nre,ore,ire,are,sre,lre,$1,X1,J1,Q1,Z1,cre,ure,Ere,_re,Tre,Sre,eB,tB,rB,nB,oB,iB,aB,sB,lB,cB,uB,EB,_B,TB,SB,pB,dB,fB,AB,hB,vB,pre,dre,fre,Are,hre,vre,Rre,mre,Ore,Nre,Mre,Cre,Pre,gre,Lre,yre,Ire,Dre,xre,Ure,bre,Vre,RB,mB,OB,NB,MB,wre,Bre,Gre,Hre,kre,Yre,CB,PB,Fre,Kre,qre,gB,LB,Wre,jre,zre,yB,IB,DB,xB,UB,bB,VB,wB,BB,GB,HB,kB,YB,FB,KB,qB,WB,$re,Xre,Jre,Qre,Zre,ene,tne,rne,nne,one,ine,ane,sne,lne,cne,une,Ene,_ne,jB,zB,Tne,Sne,pne,$B=S(()=>{rR();a0="aws.lambda.invoked_arn",s0="db.system",l0="db.connection_string",c0="db.user",u0="db.jdbc.driver_classname",E0="db.name",_0="db.statement",T0="db.operation",S0="db.mssql.instance_name",p0="db.cassandra.keyspace",d0="db.cassandra.page_size",f0="db.cassandra.consistency_level",A0="db.cassandra.table",h0="db.cassandra.idempotence",v0="db.cassandra.speculative_execution_count",R0="db.cassandra.coordinator.id",m0="db.cassandra.coordinator.dc",O0="db.hbase.namespace",N0="db.redis.database_index",M0="db.mongodb.collection",C0="db.sql.table",P0="exception.type",g0="exception.message",L0="exception.stacktrace",y0="exception.escaped",I0="faas.trigger",D0="faas.execution",x0="faas.document.collection",U0="faas.document.operation",b0="faas.document.time",V0="faas.document.name",w0="faas.time",B0="faas.cron",G0="faas.coldstart",H0="faas.invoked_name",k0="faas.invoked_provider",Y0="faas.invoked_region",F0="net.transport",K0="net.peer.ip",q0="net.peer.port",W0="net.peer.name",j0="net.host.ip",z0="net.host.port",$0="net.host.name",X0="net.host.connection.type",J0="net.host.connection.subtype",Q0="net.host.carrier.name",Z0="net.host.carrier.mcc",eV="net.host.carrier.mnc",tV="net.host.carrier.icc",rV="peer.service",nV="enduser.id",oV="enduser.role",iV="enduser.scope",aV="thread.id",sV="thread.name",lV="code.function",cV="code.namespace",uV="code.filepath",EV="code.lineno",_V="http.method",TV="http.url",SV="http.target",pV="http.host",dV="http.scheme",fV="http.status_code",AV="http.flavor",hV="http.user_agent",vV="http.request_content_length",RV="http.request_content_length_uncompressed",mV="http.response_content_length",OV="http.response_content_length_uncompressed",NV="http.server_name",MV="http.route",CV="http.client_ip",PV="aws.dynamodb.table_names",gV="aws.dynamodb.consumed_capacity",LV="aws.dynamodb.item_collection_metrics",yV="aws.dynamodb.provisioned_read_capacity",IV="aws.dynamodb.provisioned_write_capacity",DV="aws.dynamodb.consistent_read",xV="aws.dynamodb.projection",UV="aws.dynamodb.limit",bV="aws.dynamodb.attributes_to_get",VV="aws.dynamodb.index_name",wV="aws.dynamodb.select",BV="aws.dynamodb.global_secondary_indexes",GV="aws.dynamodb.local_secondary_indexes",HV="aws.dynamodb.exclusive_start_table",kV="aws.dynamodb.table_count",YV="aws.dynamodb.scan_forward",FV="aws.dynamodb.segment",KV="aws.dynamodb.total_segments",qV="aws.dynamodb.count",WV="aws.dynamodb.scanned_count",jV="aws.dynamodb.attribute_definitions",zV="aws.dynamodb.global_secondary_index_updates",$V="messaging.system",XV="messaging.destination",JV="messaging.destination_kind",QV="messaging.temp_destination",ZV="messaging.protocol",ew="messaging.protocol_version",tw="messaging.url",rw="messaging.message_id",nw="messaging.conversation_id",ow="messaging.message_payload_size_bytes",iw="messaging.message_payload_compressed_size_bytes",aw="messaging.operation",sw="messaging.consumer_id",lw="messaging.rabbitmq.routing_key",cw="messaging.kafka.message_key",uw="messaging.kafka.consumer_group",Ew="messaging.kafka.client_id",_w="messaging.kafka.partition",Tw="messaging.kafka.tombstone",Sw="rpc.system",pw="rpc.service",dw="rpc.method",fw="rpc.grpc.status_code",Aw="rpc.jsonrpc.version",hw="rpc.jsonrpc.request_id",vw="rpc.jsonrpc.error_code",Rw="rpc.jsonrpc.error_message",mw="message.type",Ow="message.id",Nw="message.compressed_size",Mw="message.uncompressed_size",T9=a0,S9=s0,p9=l0,d9=c0,f9=u0,A9=E0,h9=_0,v9=T0,R9=S0,m9=p0,O9=d0,N9=f0,M9=A0,C9=h0,P9=v0,g9=R0,L9=m0,y9=O0,I9=N0,D9=M0,x9=C0,U9=P0,b9=g0,V9=L0,w9=y0,B9=I0,G9=D0,H9=x0,k9=U0,Y9=b0,F9=V0,K9=w0,q9=B0,W9=G0,j9=H0,z9=k0,$9=Y0,X9=F0,J9=K0,Q9=q0,Z9=W0,eZ=j0,tZ=z0,rZ=$0,nZ=X0,oZ=J0,iZ=Q0,aZ=Z0,sZ=eV,lZ=tV,cZ=rV,uZ=nV,EZ=oV,_Z=iV,TZ=aV,SZ=sV,pZ=lV,dZ=cV,fZ=uV,AZ=EV,hZ=_V,vZ=TV,RZ=SV,mZ=pV,OZ=dV,NZ=fV,MZ=AV,CZ=hV,PZ=vV,gZ=RV,LZ=mV,yZ=OV,IZ=NV,DZ=MV,xZ=CV,UZ=PV,bZ=gV,VZ=LV,wZ=yV,BZ=IV,GZ=DV,HZ=xV,kZ=UV,YZ=bV,FZ=VV,KZ=wV,qZ=BV,WZ=GV,jZ=HV,zZ=kV,$Z=YV,XZ=FV,JZ=KV,QZ=qV,ZZ=WV,eee=jV,tee=zV,ree=$V,nee=XV,oee=JV,iee=QV,aee=ZV,see=ew,lee=tw,cee=rw,uee=nw,Eee=ow,_ee=iw,Tee=aw,See=sw,pee=lw,dee=cw,fee=uw,Aee=Ew,hee=_w,vee=Tw,Ree=Sw,mee=pw,Oee=dw,Nee=fw,Mee=Aw,Cee=hw,Pee=vw,gee=Rw,Lee=mw,yee=Ow,Iee=Nw,Dee=Mw,xee=Be([a0,s0,l0,c0,u0,E0,_0,T0,S0,p0,d0,f0,A0,h0,v0,R0,m0,O0,N0,M0,C0,P0,g0,L0,y0,I0,D0,x0,U0,b0,V0,w0,B0,G0,H0,k0,Y0,F0,K0,q0,W0,j0,z0,$0,X0,J0,Q0,Z0,eV,tV,rV,nV,oV,iV,aV,sV,lV,cV,uV,EV,_V,TV,SV,pV,dV,fV,AV,hV,vV,RV,mV,OV,NV,MV,CV,PV,gV,LV,yV,IV,DV,xV,UV,bV,VV,wV,BV,GV,HV,kV,YV,FV,KV,qV,WV,jV,zV,$V,XV,JV,QV,ZV,ew,tw,rw,nw,ow,iw,aw,sw,lw,cw,uw,Ew,_w,Tw,Sw,pw,dw,fw,Aw,hw,vw,Rw,mw,Ow,Nw,Mw]),Cw="other_sql",Pw="mssql",gw="mysql",Lw="oracle",yw="db2",Iw="postgresql",Dw="redshift",xw="hive",Uw="cloudscape",bw="hsqldb",Vw="progress",ww="maxdb",Bw="hanadb",Gw="ingres",Hw="firstsql",kw="edb",Yw="cache",Fw="adabas",Kw="firebird",qw="derby",Ww="filemaker",jw="informix",zw="instantdb",$w="interbase",Xw="mariadb",Jw="netezza",Qw="pervasive",Zw="pointbase",e1="sqlite",t1="sybase",r1="teradata",n1="vertica",o1="h2",i1="coldfusion",a1="cassandra",s1="hbase",l1="mongodb",c1="redis",u1="couchbase",E1="couchdb",_1="cosmosdb",T1="dynamodb",S1="neo4j",p1="geode",d1="elasticsearch",f1="memcached",A1="cockroachdb",Uee=Cw,bee=Pw,Vee=gw,wee=Lw,Bee=yw,Gee=Iw,Hee=Dw,kee=xw,Yee=Uw,Fee=bw,Kee=Vw,qee=ww,Wee=Bw,jee=Gw,zee=Hw,$ee=kw,Xee=Yw,Jee=Fw,Qee=Kw,Zee=qw,ete=Ww,tte=jw,rte=zw,nte=$w,ote=Xw,ite=Jw,ate=Qw,ste=Zw,lte=e1,cte=t1,ute=r1,Ete=n1,_te=o1,Tte=i1,Ste=a1,pte=s1,dte=l1,fte=c1,Ate=u1,hte=E1,vte=_1,Rte=T1,mte=S1,Ote=p1,Nte=d1,Mte=f1,Cte=A1,Pte=Be([Cw,Pw,gw,Lw,yw,Iw,Dw,xw,Uw,bw,Vw,ww,Bw,Gw,Hw,kw,Yw,Fw,Kw,qw,Ww,jw,zw,$w,Xw,Jw,Qw,Zw,e1,t1,r1,n1,o1,i1,a1,s1,l1,c1,u1,E1,_1,T1,S1,p1,d1,f1,A1]),h1="all",v1="each_quorum",R1="quorum",m1="local_quorum",O1="one",N1="two",M1="three",C1="local_one",P1="any",g1="serial",L1="local_serial",gte=h1,Lte=v1,yte=R1,Ite=m1,Dte=O1,xte=N1,Ute=M1,bte=C1,Vte=P1,wte=g1,Bte=L1,Gte=Be([h1,v1,R1,m1,O1,N1,M1,C1,P1,g1,L1]),y1="datasource",I1="http",D1="pubsub",x1="timer",U1="other",Hte=y1,kte=I1,Yte=D1,Fte=x1,Kte=U1,qte=Be([y1,I1,D1,x1,U1]),b1="insert",V1="edit",w1="delete",Wte=b1,jte=V1,zte=w1,$te=Be([b1,V1,w1]),B1="alibaba_cloud",G1="aws",H1="azure",k1="gcp",Xte=B1,Jte=G1,Qte=H1,Zte=k1,ere=Be([B1,G1,H1,k1]),Y1="ip_tcp",F1="ip_udp",K1="ip",q1="unix",W1="pipe",j1="inproc",z1="other",tre=Y1,rre=F1,nre=K1,ore=q1,ire=W1,are=j1,sre=z1,lre=Be([Y1,F1,K1,q1,W1,j1,z1]),$1="wifi",X1="wired",J1="cell",Q1="unavailable",Z1="unknown",cre=$1,ure=X1,Ere=J1,_re=Q1,Tre=Z1,Sre=Be([$1,X1,J1,Q1,Z1]),eB="gprs",tB="edge",rB="umts",nB="cdma",oB="evdo_0",iB="evdo_a",aB="cdma2000_1xrtt",sB="hsdpa",lB="hsupa",cB="hspa",uB="iden",EB="evdo_b",_B="lte",TB="ehrpd",SB="hspap",pB="gsm",dB="td_scdma",fB="iwlan",AB="nr",hB="nrnsa",vB="lte_ca",pre=eB,dre=tB,fre=rB,Are=nB,hre=oB,vre=iB,Rre=aB,mre=sB,Ore=lB,Nre=cB,Mre=uB,Cre=EB,Pre=_B,gre=TB,Lre=SB,yre=pB,Ire=dB,Dre=fB,xre=AB,Ure=hB,bre=vB,Vre=Be([eB,tB,rB,nB,oB,iB,aB,sB,lB,cB,uB,EB,_B,TB,SB,pB,dB,fB,AB,hB,vB]),RB="1.0",mB="1.1",OB="2.0",NB="SPDY",MB="QUIC",wre=RB,Bre=mB,Gre=OB,Hre=NB,kre=MB,Yre={HTTP_1_0:RB,HTTP_1_1:mB,HTTP_2_0:OB,SPDY:NB,QUIC:MB},CB="queue",PB="topic",Fre=CB,Kre=PB,qre=Be([CB,PB]),gB="receive",LB="process",Wre=gB,jre=LB,zre=Be([gB,LB]),yB=0,IB=1,DB=2,xB=3,UB=4,bB=5,VB=6,wB=7,BB=8,GB=9,HB=10,kB=11,YB=12,FB=13,KB=14,qB=15,WB=16,$re=yB,Xre=IB,Jre=DB,Qre=xB,Zre=UB,ene=bB,tne=VB,rne=wB,nne=BB,one=GB,ine=HB,ane=kB,sne=YB,lne=FB,cne=KB,une=qB,Ene=WB,_ne={OK:yB,CANCELLED:IB,UNKNOWN:DB,INVALID_ARGUMENT:xB,DEADLINE_EXCEEDED:UB,NOT_FOUND:bB,ALREADY_EXISTS:VB,PERMISSION_DENIED:wB,RESOURCE_EXHAUSTED:BB,FAILED_PRECONDITION:GB,ABORTED:HB,OUT_OF_RANGE:kB,UNIMPLEMENTED:YB,INTERNAL:FB,UNAVAILABLE:KB,DATA_LOSS:qB,UNAUTHENTICATED:WB},jB="SENT",zB="RECEIVED",Tne=jB,Sne=zB,pne=Be([jB,zB])});var XB=S(()=>{$B()});var JB,QB,ZB,eG,tG,rG,nG,oG,iG,aG,sG,lG,cG,uG,EG,_G,TG,SG,pG,dG,fG,AG,hG,vG,RG,mG,OG,NG,MG,CG,PG,gG,LG,yG,IG,DG,xG,UG,bG,VG,wG,BG,GG,HG,kG,YG,FG,KG,qG,WG,jG,zG,$G,XG,JG,QG,ZG,eH,tH,rH,nH,oH,iH,aH,sH,lH,cH,uH,EH,_H,TH,SH,pH,dH,fH,AH,hH,vH,RH,mH,OH,dne,fne,Ane,hne,vne,Rne,mne,One,Nne,Mne,Cne,Pne,gne,Lne,yne,Ine,Dne,xne,Une,bne,Vne,wne,Bne,Gne,Hne,kne,Yne,Fne,Kne,qne,Wne,jne,zne,$ne,Xne,Jne,Qne,Zne,eoe,toe,roe,noe,ooe,ioe,aoe,soe,loe,coe,uoe,Eoe,_oe,Toe,Soe,poe,doe,foe,Aoe,hoe,voe,Roe,moe,Ooe,Noe,Moe,Coe,Poe,goe,Loe,yoe,Ioe,Doe,xoe,Uoe,boe,Voe,woe,Boe,Goe,Hoe,koe,Yoe,Foe,NH,MH,CH,PH,Koe,qoe,Woe,joe,zoe,gH,LH,yH,IH,DH,xH,UH,bH,VH,wH,BH,GH,HH,kH,YH,FH,KH,$oe,Xoe,Joe,Qoe,Zoe,eie,tie,rie,nie,oie,iie,aie,sie,lie,cie,uie,Eie,_ie,qH,WH,Tie,Sie,pie,jH,zH,$H,XH,JH,QH,ZH,die,fie,Aie,hie,vie,Rie,mie,Oie,ek,tk,rk,nk,ok,ik,ak,sk,lk,ck,uk,Nie,Mie,Cie,Pie,gie,Lie,yie,Iie,Die,xie,Uie,bie,Ek,_k,Tk,Sk,pk,dk,fk,Ak,hk,vk,Vie,wie,Bie,Gie,Hie,kie,Yie,Fie,Kie,qie,Wie,Rk=S(()=>{rR();JB="cloud.provider",QB="cloud.account.id",ZB="cloud.region",eG="cloud.availability_zone",tG="cloud.platform",rG="aws.ecs.container.arn",nG="aws.ecs.cluster.arn",oG="aws.ecs.launchtype",iG="aws.ecs.task.arn",aG="aws.ecs.task.family",sG="aws.ecs.task.revision",lG="aws.eks.cluster.arn",cG="aws.log.group.names",uG="aws.log.group.arns",EG="aws.log.stream.names",_G="aws.log.stream.arns",TG="container.name",SG="container.id",pG="container.runtime",dG="container.image.name",fG="container.image.tag",AG="deployment.environment",hG="device.id",vG="device.model.identifier",RG="device.model.name",mG="faas.name",OG="faas.id",NG="faas.version",MG="faas.instance",CG="faas.max_memory",PG="host.id",gG="host.name",LG="host.type",yG="host.arch",IG="host.image.name",DG="host.image.id",xG="host.image.version",UG="k8s.cluster.name",bG="k8s.node.name",VG="k8s.node.uid",wG="k8s.namespace.name",BG="k8s.pod.uid",GG="k8s.pod.name",HG="k8s.container.name",kG="k8s.replicaset.uid",YG="k8s.replicaset.name",FG="k8s.deployment.uid",KG="k8s.deployment.name",qG="k8s.statefulset.uid",WG="k8s.statefulset.name",jG="k8s.daemonset.uid",zG="k8s.daemonset.name",$G="k8s.job.uid",XG="k8s.job.name",JG="k8s.cronjob.uid",QG="k8s.cronjob.name",ZG="os.type",eH="os.description",tH="os.name",rH="os.version",nH="process.pid",oH="process.executable.name",iH="process.executable.path",aH="process.command",sH="process.command_line",lH="process.command_args",cH="process.owner",uH="process.runtime.name",EH="process.runtime.version",_H="process.runtime.description",TH="service.name",SH="service.namespace",pH="service.instance.id",dH="service.version",fH="telemetry.sdk.name",AH="telemetry.sdk.language",hH="telemetry.sdk.version",vH="telemetry.auto.version",RH="webengine.name",mH="webengine.version",OH="webengine.description",dne=JB,fne=QB,Ane=ZB,hne=eG,vne=tG,Rne=rG,mne=nG,One=oG,Nne=iG,Mne=aG,Cne=sG,Pne=lG,gne=cG,Lne=uG,yne=EG,Ine=_G,Dne=TG,xne=SG,Une=pG,bne=dG,Vne=fG,wne=AG,Bne=hG,Gne=vG,Hne=RG,kne=mG,Yne=OG,Fne=NG,Kne=MG,qne=CG,Wne=PG,jne=gG,zne=LG,$ne=yG,Xne=IG,Jne=DG,Qne=xG,Zne=UG,eoe=bG,toe=VG,roe=wG,noe=BG,ooe=GG,ioe=HG,aoe=kG,soe=YG,loe=FG,coe=KG,uoe=qG,Eoe=WG,_oe=jG,Toe=zG,Soe=$G,poe=XG,doe=JG,foe=QG,Aoe=ZG,hoe=eH,voe=tH,Roe=rH,moe=nH,Ooe=oH,Noe=iH,Moe=aH,Coe=sH,Poe=lH,goe=cH,Loe=uH,yoe=EH,Ioe=_H,Doe=TH,xoe=SH,Uoe=pH,boe=dH,Voe=fH,woe=AH,Boe=hH,Goe=vH,Hoe=RH,koe=mH,Yoe=OH,Foe=Be([JB,QB,ZB,eG,tG,rG,nG,oG,iG,aG,sG,lG,cG,uG,EG,_G,TG,SG,pG,dG,fG,AG,hG,vG,RG,mG,OG,NG,MG,CG,PG,gG,LG,yG,IG,DG,xG,UG,bG,VG,wG,BG,GG,HG,kG,YG,FG,KG,qG,WG,jG,zG,$G,XG,JG,QG,ZG,eH,tH,rH,nH,oH,iH,aH,sH,lH,cH,uH,EH,_H,TH,SH,pH,dH,fH,AH,hH,vH,RH,mH,OH]),NH="alibaba_cloud",MH="aws",CH="azure",PH="gcp",Koe=NH,qoe=MH,Woe=CH,joe=PH,zoe=Be([NH,MH,CH,PH]),gH="alibaba_cloud_ecs",LH="alibaba_cloud_fc",yH="aws_ec2",IH="aws_ecs",DH="aws_eks",xH="aws_lambda",UH="aws_elastic_beanstalk",bH="azure_vm",VH="azure_container_instances",wH="azure_aks",BH="azure_functions",GH="azure_app_service",HH="gcp_compute_engine",kH="gcp_cloud_run",YH="gcp_kubernetes_engine",FH="gcp_cloud_functions",KH="gcp_app_engine",$oe=gH,Xoe=LH,Joe=yH,Qoe=IH,Zoe=DH,eie=xH,tie=UH,rie=bH,nie=VH,oie=wH,iie=BH,aie=GH,sie=HH,lie=kH,cie=YH,uie=FH,Eie=KH,_ie=Be([gH,LH,yH,IH,DH,xH,UH,bH,VH,wH,BH,GH,HH,kH,YH,FH,KH]),qH="ec2",WH="fargate",Tie=qH,Sie=WH,pie=Be([qH,WH]),jH="amd64",zH="arm32",$H="arm64",XH="ia64",JH="ppc32",QH="ppc64",ZH="x86",die=jH,fie=zH,Aie=$H,hie=XH,vie=JH,Rie=QH,mie=ZH,Oie=Be([jH,zH,$H,XH,JH,QH,ZH]),ek="windows",tk="linux",rk="darwin",nk="freebsd",ok="netbsd",ik="openbsd",ak="dragonflybsd",sk="hpux",lk="aix",ck="solaris",uk="z_os",Nie=ek,Mie=tk,Cie=rk,Pie=nk,gie=ok,Lie=ik,yie=ak,Iie=sk,Die=lk,xie=ck,Uie=uk,bie=Be([ek,tk,rk,nk,ok,ik,ak,sk,lk,ck,uk]),Ek="cpp",_k="dotnet",Tk="erlang",Sk="go",pk="java",dk="nodejs",fk="php",Ak="python",hk="ruby",vk="webjs",Vie=Ek,wie=_k,Bie=Tk,Gie=Sk,Hie=pk,kie=dk,Yie=fk,Fie=Ak,Kie=hk,qie=vk,Wie=Be([Ek,_k,Tk,Sk,pk,dk,fk,Ak,hk,vk])});var mk=S(()=>{Rk()});var jie,zie,$ie,Xie,Jie,Qie,Zie,eae,tae,rae,nae,oae,iae,aae,sae,lae,cae,uae,Eae,_ae,Tae,Sae,pae,dae,fae,Aae,hae,vae,Rae,mae,Oae,Nae,Mae,Cae,Pae,gae,Lae,yae,Iae,Dae,xae,Uae,bae,Vae,wae,Bae,Gae,Hae,kae,Yae,Fae,Kae,qae,Wae,jae,zae,$ae,Xae,Jae,Qae,Zae,ese,tse,rse,nse,ose,ise,ase,sse,lse,cse,use,Ese,_se,Tse,Sse,pse,dse,fse,Ase,hse,vse,Rse,mse,Ose,Nse,Mse,Cse,Pse,gse,Lse,yse,Ise,Dse,xse,Use,bse,Vse,wse,Bse,Gse,Hse,kse,Yse,Fse,Kse,qse,Wse,jse,zse,Ok=S(()=>{jie="aspnetcore.rate_limiting.result",zie="acquired",$ie="endpoint_limiter",Xie="global_limiter",Jie="request_canceled",Qie="telemetry.sdk.language",Zie="cpp",eae="dotnet",tae="erlang",rae="go",nae="java",oae="nodejs",iae="php",aae="python",sae="ruby",lae="rust",cae="swift",uae="webjs",Eae="telemetry.sdk.name",_ae="telemetry.sdk.version",Tae="aspnetcore.diagnostics.handler.type",Sae="aspnetcore.diagnostics.exception.result",pae="aborted",dae="handled",fae="skipped",Aae="unhandled",hae="aspnetcore.rate_limiting.policy",vae="aspnetcore.request.is_unhandled",Rae="aspnetcore.routing.is_fallback",mae="aspnetcore.routing.match_status",Oae="failure",Nae="success",Mae="client.address",Cae="client.port",Pae="error.type",gae="_OTHER",Lae="exception.escaped",yae="exception.message",Iae="exception.stacktrace",Dae="exception.type",xae=function(o){return"http.request.header."+o},Uae="http.request.method",bae="_OTHER",Vae="CONNECT",wae="DELETE",Bae="GET",Gae="HEAD",Hae="OPTIONS",kae="PATCH",Yae="POST",Fae="PUT",Kae="TRACE",qae="http.request.method_original",Wae="http.request.resend_count",jae=function(o){return"http.response.header."+o},zae="http.response.status_code",$ae="http.route",Xae="jvm.gc.action",Jae="jvm.gc.name",Qae="jvm.memory.pool.name",Zae="jvm.memory.type",ese="heap",tse="non_heap",rse="jvm.thread.daemon",nse="jvm.thread.state",ose="blocked",ise="new",ase="runnable",sse="terminated",lse="timed_waiting",cse="waiting",use="network.local.address",Ese="network.local.port",_se="network.peer.address",Tse="network.peer.port",Sse="network.protocol.name",pse="network.protocol.version",dse="network.transport",fse="pipe",Ase="quic",hse="tcp",vse="udp",Rse="unix",mse="network.type",Ose="ipv4",Nse="ipv6",Mse="otel.scope.name",Cse="otel.scope.version",Pse="otel.status_code",gse="ERROR",Lse="OK",yse="otel.status_description",Ise="server.address",Dse="server.port",xse="service.name",Use="service.version",bse="signalr.connection.status",Vse="app_shutdown",wse="normal_closure",Bse="timeout",Gse="signalr.transport",Hse="long_polling",kse="server_sent_events",Yse="web_sockets",Fse="url.fragment",Kse="url.full",qse="url.path",Wse="url.query",jse="url.scheme",zse="user_agent.original"});var $se,Xse,Jse,Qse,Zse,ele,tle,rle,nle,ole,ile,ale,sle,lle,cle,ule,Ele,_le,Tle,Sle,ple,dle,fle,Ale,hle,vle,Rle,mle,Ole,Nle,Mle,Nk=S(()=>{$se="aspnetcore.diagnostics.exceptions",Xse="aspnetcore.rate_limiting.active_request_leases",Jse="aspnetcore.rate_limiting.queued_requests",Qse="aspnetcore.rate_limiting.request.time_in_queue",Zse="aspnetcore.rate_limiting.request_lease.duration",ele="aspnetcore.rate_limiting.requests",tle="aspnetcore.routing.match_attempts",rle="http.client.request.duration",nle="http.server.request.duration",ole="jvm.class.count",ile="jvm.class.loaded",ale="jvm.class.unloaded",sle="jvm.cpu.count",lle="jvm.cpu.recent_utilization",cle="jvm.cpu.time",ule="jvm.gc.duration",Ele="jvm.memory.committed",_le="jvm.memory.limit",Tle="jvm.memory.used",Sle="jvm.memory.used_after_last_gc",ple="jvm.thread.count",dle="kestrel.active_connections",fle="kestrel.active_tls_handshakes",Ale="kestrel.connection.duration",hle="kestrel.queued_connections",vle="kestrel.queued_requests",Rle="kestrel.rejected_connections",mle="kestrel.tls_handshake.duration",Ole="kestrel.upgraded_connections",Nle="signalr.server.active_connections",Mle="signalr.server.connection.duration"});var Mk={};Me(Mk,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>pae,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>dae,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>fae,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Aae,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>zie,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>$ie,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Xie,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Jie,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Oae,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Nae,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Sae,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Tae,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>hae,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>jie,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>vae,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Rae,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>mae,ATTR_CLIENT_ADDRESS:()=>Mae,ATTR_CLIENT_PORT:()=>Cae,ATTR_ERROR_TYPE:()=>Pae,ATTR_EXCEPTION_ESCAPED:()=>Lae,ATTR_EXCEPTION_MESSAGE:()=>yae,ATTR_EXCEPTION_STACKTRACE:()=>Iae,ATTR_EXCEPTION_TYPE:()=>Dae,ATTR_HTTP_REQUEST_HEADER:()=>xae,ATTR_HTTP_REQUEST_METHOD:()=>Uae,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>qae,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Wae,ATTR_HTTP_RESPONSE_HEADER:()=>jae,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>zae,ATTR_HTTP_ROUTE:()=>$ae,ATTR_JVM_GC_ACTION:()=>Xae,ATTR_JVM_GC_NAME:()=>Jae,ATTR_JVM_MEMORY_POOL_NAME:()=>Qae,ATTR_JVM_MEMORY_TYPE:()=>Zae,ATTR_JVM_THREAD_DAEMON:()=>rse,ATTR_JVM_THREAD_STATE:()=>nse,ATTR_NETWORK_LOCAL_ADDRESS:()=>use,ATTR_NETWORK_LOCAL_PORT:()=>Ese,ATTR_NETWORK_PEER_ADDRESS:()=>_se,ATTR_NETWORK_PEER_PORT:()=>Tse,ATTR_NETWORK_PROTOCOL_NAME:()=>Sse,ATTR_NETWORK_PROTOCOL_VERSION:()=>pse,ATTR_NETWORK_TRANSPORT:()=>dse,ATTR_NETWORK_TYPE:()=>mse,ATTR_OTEL_SCOPE_NAME:()=>Mse,ATTR_OTEL_SCOPE_VERSION:()=>Cse,ATTR_OTEL_STATUS_CODE:()=>Pse,ATTR_OTEL_STATUS_DESCRIPTION:()=>yse,ATTR_SERVER_ADDRESS:()=>Ise,ATTR_SERVER_PORT:()=>Dse,ATTR_SERVICE_NAME:()=>xse,ATTR_SERVICE_VERSION:()=>Use,ATTR_SIGNALR_CONNECTION_STATUS:()=>bse,ATTR_SIGNALR_TRANSPORT:()=>Gse,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Qie,ATTR_TELEMETRY_SDK_NAME:()=>Eae,ATTR_TELEMETRY_SDK_VERSION:()=>_ae,ATTR_URL_FRAGMENT:()=>Fse,ATTR_URL_FULL:()=>Kse,ATTR_URL_PATH:()=>qse,ATTR_URL_QUERY:()=>Wse,ATTR_URL_SCHEME:()=>jse,ATTR_USER_AGENT_ORIGINAL:()=>zse,AWSECSLAUNCHTYPEVALUES_EC2:()=>Tie,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Sie,AwsEcsLaunchtypeValues:()=>pie,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>$oe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Xoe,CLOUDPLATFORMVALUES_AWS_EC2:()=>Joe,CLOUDPLATFORMVALUES_AWS_ECS:()=>Qoe,CLOUDPLATFORMVALUES_AWS_EKS:()=>Zoe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>tie,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>eie,CLOUDPLATFORMVALUES_AZURE_AKS:()=>oie,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>aie,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>nie,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>iie,CLOUDPLATFORMVALUES_AZURE_VM:()=>rie,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Eie,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>uie,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>lie,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>sie,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>cie,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Koe,CLOUDPROVIDERVALUES_AWS:()=>qoe,CLOUDPROVIDERVALUES_AZURE:()=>Woe,CLOUDPROVIDERVALUES_GCP:()=>joe,CloudPlatformValues:()=>_ie,CloudProviderValues:()=>zoe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>gte,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Vte,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Lte,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>bte,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Ite,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Bte,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Dte,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>yte,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>wte,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Ute,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>xte,DBSYSTEMVALUES_ADABAS:()=>Jee,DBSYSTEMVALUES_CACHE:()=>Xee,DBSYSTEMVALUES_CASSANDRA:()=>Ste,DBSYSTEMVALUES_CLOUDSCAPE:()=>Yee,DBSYSTEMVALUES_COCKROACHDB:()=>Cte,DBSYSTEMVALUES_COLDFUSION:()=>Tte,DBSYSTEMVALUES_COSMOSDB:()=>vte,DBSYSTEMVALUES_COUCHBASE:()=>Ate,DBSYSTEMVALUES_COUCHDB:()=>hte,DBSYSTEMVALUES_DB2:()=>Bee,DBSYSTEMVALUES_DERBY:()=>Zee,DBSYSTEMVALUES_DYNAMODB:()=>Rte,DBSYSTEMVALUES_EDB:()=>$ee,DBSYSTEMVALUES_ELASTICSEARCH:()=>Nte,DBSYSTEMVALUES_FILEMAKER:()=>ete,DBSYSTEMVALUES_FIREBIRD:()=>Qee,DBSYSTEMVALUES_FIRSTSQL:()=>zee,DBSYSTEMVALUES_GEODE:()=>Ote,DBSYSTEMVALUES_H2:()=>_te,DBSYSTEMVALUES_HANADB:()=>Wee,DBSYSTEMVALUES_HBASE:()=>pte,DBSYSTEMVALUES_HIVE:()=>kee,DBSYSTEMVALUES_HSQLDB:()=>Fee,DBSYSTEMVALUES_INFORMIX:()=>tte,DBSYSTEMVALUES_INGRES:()=>jee,DBSYSTEMVALUES_INSTANTDB:()=>rte,DBSYSTEMVALUES_INTERBASE:()=>nte,DBSYSTEMVALUES_MARIADB:()=>ote,DBSYSTEMVALUES_MAXDB:()=>qee,DBSYSTEMVALUES_MEMCACHED:()=>Mte,DBSYSTEMVALUES_MONGODB:()=>dte,DBSYSTEMVALUES_MSSQL:()=>bee,DBSYSTEMVALUES_MYSQL:()=>Vee,DBSYSTEMVALUES_NEO4J:()=>mte,DBSYSTEMVALUES_NETEZZA:()=>ite,DBSYSTEMVALUES_ORACLE:()=>wee,DBSYSTEMVALUES_OTHER_SQL:()=>Uee,DBSYSTEMVALUES_PERVASIVE:()=>ate,DBSYSTEMVALUES_POINTBASE:()=>ste,DBSYSTEMVALUES_POSTGRESQL:()=>Gee,DBSYSTEMVALUES_PROGRESS:()=>Kee,DBSYSTEMVALUES_REDIS:()=>fte,DBSYSTEMVALUES_REDSHIFT:()=>Hee,DBSYSTEMVALUES_SQLITE:()=>lte,DBSYSTEMVALUES_SYBASE:()=>cte,DBSYSTEMVALUES_TERADATA:()=>ute,DBSYSTEMVALUES_VERTICA:()=>Ete,DbCassandraConsistencyLevelValues:()=>Gte,DbSystemValues:()=>Pte,ERROR_TYPE_VALUE_OTHER:()=>gae,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>zte,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>jte,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Wte,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Xte,FAASINVOKEDPROVIDERVALUES_AWS:()=>Jte,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Qte,FAASINVOKEDPROVIDERVALUES_GCP:()=>Zte,FAASTRIGGERVALUES_DATASOURCE:()=>Hte,FAASTRIGGERVALUES_HTTP:()=>kte,FAASTRIGGERVALUES_OTHER:()=>Kte,FAASTRIGGERVALUES_PUBSUB:()=>Yte,FAASTRIGGERVALUES_TIMER:()=>Fte,FaasDocumentOperationValues:()=>$te,FaasInvokedProviderValues:()=>ere,FaasTriggerValues:()=>qte,HOSTARCHVALUES_AMD64:()=>die,HOSTARCHVALUES_ARM32:()=>fie,HOSTARCHVALUES_ARM64:()=>Aie,HOSTARCHVALUES_IA64:()=>hie,HOSTARCHVALUES_PPC32:()=>vie,HOSTARCHVALUES_PPC64:()=>Rie,HOSTARCHVALUES_X86:()=>mie,HTTPFLAVORVALUES_HTTP_1_0:()=>wre,HTTPFLAVORVALUES_HTTP_1_1:()=>Bre,HTTPFLAVORVALUES_HTTP_2_0:()=>Gre,HTTPFLAVORVALUES_QUIC:()=>kre,HTTPFLAVORVALUES_SPDY:()=>Hre,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Vae,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>wae,HTTP_REQUEST_METHOD_VALUE_GET:()=>Bae,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Gae,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Hae,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>bae,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>kae,HTTP_REQUEST_METHOD_VALUE_POST:()=>Yae,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Fae,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Kae,HostArchValues:()=>Oie,HttpFlavorValues:()=>Yre,JVM_MEMORY_TYPE_VALUE_HEAP:()=>ese,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>tse,JVM_THREAD_STATE_VALUE_BLOCKED:()=>ose,JVM_THREAD_STATE_VALUE_NEW:()=>ise,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>ase,JVM_THREAD_STATE_VALUE_TERMINATED:()=>sse,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>lse,JVM_THREAD_STATE_VALUE_WAITING:()=>cse,MESSAGETYPEVALUES_RECEIVED:()=>Sne,MESSAGETYPEVALUES_SENT:()=>Tne,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Fre,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>Kre,MESSAGINGOPERATIONVALUES_PROCESS:()=>jre,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Wre,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>$se,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Xse,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Jse,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>ele,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Zse,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Qse,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>tle,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>rle,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>nle,METRIC_JVM_CLASS_COUNT:()=>ole,METRIC_JVM_CLASS_LOADED:()=>ile,METRIC_JVM_CLASS_UNLOADED:()=>ale,METRIC_JVM_CPU_COUNT:()=>sle,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>lle,METRIC_JVM_CPU_TIME:()=>cle,METRIC_JVM_GC_DURATION:()=>ule,METRIC_JVM_MEMORY_COMMITTED:()=>Ele,METRIC_JVM_MEMORY_LIMIT:()=>_le,METRIC_JVM_MEMORY_USED:()=>Tle,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Sle,METRIC_JVM_THREAD_COUNT:()=>ple,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>dle,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>fle,METRIC_KESTREL_CONNECTION_DURATION:()=>Ale,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>hle,METRIC_KESTREL_QUEUED_REQUESTS:()=>vle,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Rle,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>mle,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Ole,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Nle,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Mle,MessageTypeValues:()=>pne,MessagingDestinationKindValues:()=>qre,MessagingOperationValues:()=>zre,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>Are,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>Rre,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>dre,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>gre,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>hre,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>vre,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Cre,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>pre,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>yre,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>mre,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Nre,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Lre,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Ore,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Mre,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Dre,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Pre,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>bre,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>xre,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Ure,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Ire,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>fre,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Ere,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>_re,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Tre,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>cre,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>ure,NETTRANSPORTVALUES_INPROC:()=>are,NETTRANSPORTVALUES_IP:()=>nre,NETTRANSPORTVALUES_IP_TCP:()=>tre,NETTRANSPORTVALUES_IP_UDP:()=>rre,NETTRANSPORTVALUES_OTHER:()=>sre,NETTRANSPORTVALUES_PIPE:()=>ire,NETTRANSPORTVALUES_UNIX:()=>ore,NETWORK_TRANSPORT_VALUE_PIPE:()=>fse,NETWORK_TRANSPORT_VALUE_QUIC:()=>Ase,NETWORK_TRANSPORT_VALUE_TCP:()=>hse,NETWORK_TRANSPORT_VALUE_UDP:()=>vse,NETWORK_TRANSPORT_VALUE_UNIX:()=>Rse,NETWORK_TYPE_VALUE_IPV4:()=>Ose,NETWORK_TYPE_VALUE_IPV6:()=>Nse,NetHostConnectionSubtypeValues:()=>Vre,NetHostConnectionTypeValues:()=>Sre,NetTransportValues:()=>lre,OSTYPEVALUES_AIX:()=>Die,OSTYPEVALUES_DARWIN:()=>Cie,OSTYPEVALUES_DRAGONFLYBSD:()=>yie,OSTYPEVALUES_FREEBSD:()=>Pie,OSTYPEVALUES_HPUX:()=>Iie,OSTYPEVALUES_LINUX:()=>Mie,OSTYPEVALUES_NETBSD:()=>gie,OSTYPEVALUES_OPENBSD:()=>Lie,OSTYPEVALUES_SOLARIS:()=>xie,OSTYPEVALUES_WINDOWS:()=>Nie,OSTYPEVALUES_Z_OS:()=>Uie,OTEL_STATUS_CODE_VALUE_ERROR:()=>gse,OTEL_STATUS_CODE_VALUE_OK:()=>Lse,OsTypeValues:()=>bie,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>ine,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>tne,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Xre,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>une,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Zre,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>one,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>lne,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Qre,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>ene,RPCGRPCSTATUSCODEVALUES_OK:()=>$re,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>ane,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>rne,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>nne,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Ene,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>cne,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>sne,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Jre,RpcGrpcStatusCodeValues:()=>_ne,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>YZ,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>eee,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>GZ,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>bZ,SEMATTRS_AWS_DYNAMODB_COUNT:()=>QZ,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>jZ,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>qZ,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>tee,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>FZ,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>VZ,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>kZ,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>WZ,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>HZ,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>wZ,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>BZ,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>ZZ,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>$Z,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>XZ,SEMATTRS_AWS_DYNAMODB_SELECT:()=>KZ,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>zZ,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>UZ,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>JZ,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>T9,SEMATTRS_CODE_FILEPATH:()=>fZ,SEMATTRS_CODE_FUNCTION:()=>pZ,SEMATTRS_CODE_LINENO:()=>AZ,SEMATTRS_CODE_NAMESPACE:()=>dZ,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>N9,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>L9,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>g9,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>C9,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>m9,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>O9,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>P9,SEMATTRS_DB_CASSANDRA_TABLE:()=>M9,SEMATTRS_DB_CONNECTION_STRING:()=>p9,SEMATTRS_DB_HBASE_NAMESPACE:()=>y9,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>f9,SEMATTRS_DB_MONGODB_COLLECTION:()=>D9,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>R9,SEMATTRS_DB_NAME:()=>A9,SEMATTRS_DB_OPERATION:()=>v9,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>I9,SEMATTRS_DB_SQL_TABLE:()=>x9,SEMATTRS_DB_STATEMENT:()=>h9,SEMATTRS_DB_SYSTEM:()=>S9,SEMATTRS_DB_USER:()=>d9,SEMATTRS_ENDUSER_ID:()=>uZ,SEMATTRS_ENDUSER_ROLE:()=>EZ,SEMATTRS_ENDUSER_SCOPE:()=>_Z,SEMATTRS_EXCEPTION_ESCAPED:()=>w9,SEMATTRS_EXCEPTION_MESSAGE:()=>b9,SEMATTRS_EXCEPTION_STACKTRACE:()=>V9,SEMATTRS_EXCEPTION_TYPE:()=>U9,SEMATTRS_FAAS_COLDSTART:()=>W9,SEMATTRS_FAAS_CRON:()=>q9,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>H9,SEMATTRS_FAAS_DOCUMENT_NAME:()=>F9,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>k9,SEMATTRS_FAAS_DOCUMENT_TIME:()=>Y9,SEMATTRS_FAAS_EXECUTION:()=>G9,SEMATTRS_FAAS_INVOKED_NAME:()=>j9,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>z9,SEMATTRS_FAAS_INVOKED_REGION:()=>$9,SEMATTRS_FAAS_TIME:()=>K9,SEMATTRS_FAAS_TRIGGER:()=>B9,SEMATTRS_HTTP_CLIENT_IP:()=>xZ,SEMATTRS_HTTP_FLAVOR:()=>MZ,SEMATTRS_HTTP_HOST:()=>mZ,SEMATTRS_HTTP_METHOD:()=>hZ,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>PZ,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>gZ,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>LZ,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>yZ,SEMATTRS_HTTP_ROUTE:()=>DZ,SEMATTRS_HTTP_SCHEME:()=>OZ,SEMATTRS_HTTP_SERVER_NAME:()=>IZ,SEMATTRS_HTTP_STATUS_CODE:()=>NZ,SEMATTRS_HTTP_TARGET:()=>RZ,SEMATTRS_HTTP_URL:()=>vZ,SEMATTRS_HTTP_USER_AGENT:()=>CZ,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>Iee,SEMATTRS_MESSAGE_ID:()=>yee,SEMATTRS_MESSAGE_TYPE:()=>Lee,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>Dee,SEMATTRS_MESSAGING_CONSUMER_ID:()=>See,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>uee,SEMATTRS_MESSAGING_DESTINATION:()=>nee,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>oee,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Aee,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>fee,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>dee,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>hee,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>vee,SEMATTRS_MESSAGING_MESSAGE_ID:()=>cee,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>_ee,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>Eee,SEMATTRS_MESSAGING_OPERATION:()=>Tee,SEMATTRS_MESSAGING_PROTOCOL:()=>aee,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>see,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>pee,SEMATTRS_MESSAGING_SYSTEM:()=>ree,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>iee,SEMATTRS_MESSAGING_URL:()=>lee,SEMATTRS_NET_HOST_CARRIER_ICC:()=>lZ,SEMATTRS_NET_HOST_CARRIER_MCC:()=>aZ,SEMATTRS_NET_HOST_CARRIER_MNC:()=>sZ,SEMATTRS_NET_HOST_CARRIER_NAME:()=>iZ,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>oZ,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>nZ,SEMATTRS_NET_HOST_IP:()=>eZ,SEMATTRS_NET_HOST_NAME:()=>rZ,SEMATTRS_NET_HOST_PORT:()=>tZ,SEMATTRS_NET_PEER_IP:()=>J9,SEMATTRS_NET_PEER_NAME:()=>Z9,SEMATTRS_NET_PEER_PORT:()=>Q9,SEMATTRS_NET_TRANSPORT:()=>X9,SEMATTRS_PEER_SERVICE:()=>cZ,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>Nee,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>Pee,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>gee,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Cee,SEMATTRS_RPC_JSONRPC_VERSION:()=>Mee,SEMATTRS_RPC_METHOD:()=>Oee,SEMATTRS_RPC_SERVICE:()=>mee,SEMATTRS_RPC_SYSTEM:()=>Ree,SEMATTRS_THREAD_ID:()=>TZ,SEMATTRS_THREAD_NAME:()=>SZ,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>mne,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Rne,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>One,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Nne,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Mne,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Cne,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Pne,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Lne,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>gne,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Ine,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>yne,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>fne,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>hne,SEMRESATTRS_CLOUD_PLATFORM:()=>vne,SEMRESATTRS_CLOUD_PROVIDER:()=>dne,SEMRESATTRS_CLOUD_REGION:()=>Ane,SEMRESATTRS_CONTAINER_ID:()=>xne,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>bne,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Vne,SEMRESATTRS_CONTAINER_NAME:()=>Dne,SEMRESATTRS_CONTAINER_RUNTIME:()=>Une,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>wne,SEMRESATTRS_DEVICE_ID:()=>Bne,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Gne,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Hne,SEMRESATTRS_FAAS_ID:()=>Yne,SEMRESATTRS_FAAS_INSTANCE:()=>Kne,SEMRESATTRS_FAAS_MAX_MEMORY:()=>qne,SEMRESATTRS_FAAS_NAME:()=>kne,SEMRESATTRS_FAAS_VERSION:()=>Fne,SEMRESATTRS_HOST_ARCH:()=>$ne,SEMRESATTRS_HOST_ID:()=>Wne,SEMRESATTRS_HOST_IMAGE_ID:()=>Jne,SEMRESATTRS_HOST_IMAGE_NAME:()=>Xne,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Qne,SEMRESATTRS_HOST_NAME:()=>jne,SEMRESATTRS_HOST_TYPE:()=>zne,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Zne,SEMRESATTRS_K8S_CONTAINER_NAME:()=>ioe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>foe,SEMRESATTRS_K8S_CRONJOB_UID:()=>doe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Toe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>_oe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>coe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>loe,SEMRESATTRS_K8S_JOB_NAME:()=>poe,SEMRESATTRS_K8S_JOB_UID:()=>Soe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>roe,SEMRESATTRS_K8S_NODE_NAME:()=>eoe,SEMRESATTRS_K8S_NODE_UID:()=>toe,SEMRESATTRS_K8S_POD_NAME:()=>ooe,SEMRESATTRS_K8S_POD_UID:()=>noe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>soe,SEMRESATTRS_K8S_REPLICASET_UID:()=>aoe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Eoe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>uoe,SEMRESATTRS_OS_DESCRIPTION:()=>hoe,SEMRESATTRS_OS_NAME:()=>voe,SEMRESATTRS_OS_TYPE:()=>Aoe,SEMRESATTRS_OS_VERSION:()=>Roe,SEMRESATTRS_PROCESS_COMMAND:()=>Moe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Poe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Coe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Ooe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Noe,SEMRESATTRS_PROCESS_OWNER:()=>goe,SEMRESATTRS_PROCESS_PID:()=>moe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Ioe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Loe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>yoe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Uoe,SEMRESATTRS_SERVICE_NAME:()=>Doe,SEMRESATTRS_SERVICE_NAMESPACE:()=>xoe,SEMRESATTRS_SERVICE_VERSION:()=>boe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Goe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>woe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Voe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Boe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Yoe,SEMRESATTRS_WEBENGINE_NAME:()=>Hoe,SEMRESATTRS_WEBENGINE_VERSION:()=>koe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Vse,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>wse,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Bse,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Hse,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>kse,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Yse,SemanticAttributes:()=>xee,SemanticResourceAttributes:()=>Foe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Vie,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>wie,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Bie,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Gie,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Hie,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>kie,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Yie,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Fie,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Kie,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>qie,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Zie,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>eae,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>tae,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>rae,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>nae,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>oae,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>iae,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>aae,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>sae,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>lae,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>cae,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>uae,TelemetrySdkLanguageValues:()=>Wie});var Ck=S(()=>{XB();mk();Ok();Nk()});var Pk,gk=S(()=>{Pk="0.56.0"});var os,Lk=S(()=>{an();Yn();gk();Sa();os=class extends gr{constructor(e={}){super(Dr(xr(e,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${Pk}`,"Content-Type":"application/x-protobuf"}),d_))}}});var yk=S(()=>{Lk()});var Ik=S(()=>{yk()});var Dk={};Me(Dk,{OTLPTraceExporter:()=>os});var xk=S(()=>{Ik()});var Uk,bk=S(()=>{Uk="0.56.0"});var nR,Vk=S(()=>{an();bk();Yn();Sa();nR=class extends gr{constructor(e={}){super(Dr(xr(e,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${Uk}`,"Content-Type":"application/json"}),f_))}}});var wk=S(()=>{Vk()});var Bk=S(()=>{wk()});var Gk={};Me(Gk,{OTLPTraceExporter:()=>nR});var Hk=S(()=>{Bk()});var Yk=A(dS=>{"use strict";Object.defineProperty(dS,"__esModule",{value:!0});dS.OTLPTraceExporter=void 0;var kk=eR(),Cle=(Yn(),$(Df)),Ple=(an(),$(vl)),oR=class extends Ple.OTLPExporterBase{constructor(e={}){super((0,kk.createOtlpGrpcExportDelegate)((0,kk.convertLegacyOtlpGrpcOptions)(e,"TRACES"),Cle.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};dS.OTLPTraceExporter=oR});var Fk=A(Zo=>{"use strict";var gle=Zo&&Zo.__createBinding||(Object.create?function(o,e,t,i){i===void 0&&(i=t),Object.defineProperty(o,i,{enumerable:!0,get:function(){return e[t]}})}:function(o,e,t,i){i===void 0&&(i=t),o[i]=e[t]}),Lle=Zo&&Zo.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&gle(e,o,t)};Object.defineProperty(Zo,"__esModule",{value:!0});Lle(Yk(),Zo)});import*as yle from"http";import*as Ile from"https";import*as Kk from"url";function ei(o,e){let t=Kk.parse(o),i=Object.assign({method:"POST",headers:Object.assign({"Content-Type":"application/json"},e)},t);return function(s,n){if(s.length===0)return m.debug("Zipkin send with empty spans"),n({code:X.SUCCESS});let{request:r}=i.protocol==="http:"?yle:Ile,l=r(i,u=>{let E="";u.on("data",d=>{E+=d}),u.on("end",()=>{let d=u.statusCode||0;return m.debug(`Zipkin response status code: ${d}, body: ${E}`),d<400?n({code:X.SUCCESS}):n({code:X.FAILED,error:new Error(`Got unexpected status code from zipkin: ${d}`)})})});l.on("error",u=>n({code:X.FAILED,error:u}));let c=JSON.stringify(s);m.debug(`Zipkin request payload: ${c}`),l.write(c,"utf8"),l.end()}}var qk=S(()=>{x();ee()});var Wk=S(()=>{qk()});var iR=S(()=>{Wk()});var ti,jk=S(()=>{(function(o){o.CLIENT="CLIENT",o.SERVER="SERVER",o.CONSUMER="CONSUMER",o.PRODUCER="PRODUCER"})(ti||(ti={}))});function Xk(o,e,t,i){return{traceId:o.spanContext().traceId,parentId:o.parentSpanId,name:o.name,id:o.spanContext().spanId,kind:xle[o.kind],timestamp:lt(o.startTime),duration:Math.round(lt(o.duration)),localEndpoint:{serviceName:e},tags:Ule(o,t,i),annotations:o.events.length?ble(o.events):void 0}}function Ule({attributes:o,resource:e,status:t,droppedAttributesCount:i,droppedEventsCount:a,droppedLinksCount:s},n,r){let l={};for(let c of Object.keys(o))l[c]=String(o[c]);return t.code!==mr.UNSET&&(l[n]=String(mr[t.code])),t.code===mr.ERROR&&t.message&&(l[r]=t.message),i&&(l["otel.dropped_attributes_count"]=String(i)),a&&(l["otel.dropped_events_count"]=String(a)),s&&(l["otel.dropped_links_count"]=String(s)),Object.keys(e.attributes).forEach(c=>l[c]=String(e.attributes[c])),l}function ble(o){return o.map(e=>({timestamp:Math.round(lt(e.time)),value:e.name}))}var xle,zk,$k,Jk=S(()=>{x();ee();jk();xle={[Ht.CLIENT]:ti.CLIENT,[Ht.SERVER]:ti.SERVER,[Ht.CONSUMER]:ti.CONSUMER,[Ht.PRODUCER]:ti.PRODUCER,[Ht.INTERNAL]:void 0},zk="otel.status_code",$k="error"});var Qk=S(()=>{});var Zk=S(()=>{Qk()});var Vle,fS,eY=S(()=>{Vle="service.name",fS=Vle});var tY=S(()=>{eY()});var rY=S(()=>{});var nY=S(()=>{});var oY=S(()=>{Zk();tY();rY();nY()});function iY(o){return function(){return o()}}var aY=S(()=>{});var AS,sY=S(()=>{x();ee();iR();Jk();oY();aY();AS=class{constructor(e={}){this.DEFAULT_SERVICE_NAME="OpenTelemetry Service",this._sendingPromises=[],this._urlStr=e.url||Ue().OTEL_EXPORTER_ZIPKIN_ENDPOINT,this._send=ei(this._urlStr,e.headers),this._serviceName=e.serviceName,this._statusCodeTagName=e.statusCodeTagName||zk,this._statusDescriptionTagName=e.statusDescriptionTagName||$k,this._isShutdown=!1,typeof e.getExportRequestHeaders=="function"?this._getHeaders=iY(e.getExportRequestHeaders):this._beforeSend=function(){}}export(e,t){let i=String(this._serviceName||e[0].resource.attributes[fS]||this.DEFAULT_SERVICE_NAME);if(m.debug("Zipkin exporter export"),this._isShutdown){setTimeout(()=>t({code:X.FAILED,error:new Error("Exporter has been shutdown")}));return}let a=new Promise(n=>{this._sendSpans(e,i,r=>{n(),t(r)})});this._sendingPromises.push(a);let s=()=>{let n=this._sendingPromises.indexOf(a);this._sendingPromises.splice(n,1)};a.then(s,s)}shutdown(){return m.debug("Zipkin exporter shutdown"),this._isShutdown=!0,this.forceFlush()}forceFlush(){return new Promise((e,t)=>{Promise.all(this._sendingPromises).then(()=>{e()},t)})}_beforeSend(){this._getHeaders&&(this._send=ei(this._urlStr,this._getHeaders()))}_sendSpans(e,t,i){let a=e.map(s=>Xk(s,String(s.attributes[fS]||s.resource.attributes[fS]||t),this._statusCodeTagName,this._statusDescriptionTagName));return this._beforeSend(),this._send(a,s=>{if(i)return i(s)})}}});var lY={};Me(lY,{ZipkinExporter:()=>AS,prepareSend:()=>ei});var cY=S(()=>{iR();sY()});var TY=A(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.getSpanProcessorsFromEnv=zr.getOtlpProtocolFromEnv=zr.filterBlanksAndNulls=zr.getResourceDetectorsFromEnv=void 0;var ri=(x(),$(Ze)),vS=(ee(),$(gs)),uY=(xk(),$(Dk)),wle=(Hk(),$(Gk)),Ble=Fk(),Gle=(cY(),$(lY)),lc=(Pn(),$(Qc)),hS=(Lo(),$(ea)),Hle="env",kle="host",Yle="os",Fle="process",Kle="serviceinstance";function qle(){var o,e;let t=new Map([[Hle,lc.envDetectorSync],[kle,lc.hostDetectorSync],[Yle,lc.osDetectorSync],[Kle,lc.serviceInstanceIdDetectorSync],[Fle,lc.processDetectorSync]]),i=(e=(o=process.env.OTEL_NODE_RESOURCE_DETECTORS)===null||o===void 0?void 0:o.split(","))!==null&&e!==void 0?e:["all"];return i.includes("all")?[...t.values()].flat():i.includes("none")?[]:i.flatMap(a=>{let s=t.get(a);return s||ri.diag.warn(`Invalid resource detector "${a}" specified in the environment variable OTEL_NODE_RESOURCE_DETECTORS`),s||[]})}zr.getResourceDetectorsFromEnv=qle;function EY(o){return o.map(e=>e.trim()).filter(e=>e!=="null"&&e!=="")}zr.filterBlanksAndNulls=EY;function _Y(){var o,e,t;let i=(0,vS.getEnvWithoutDefaults)();return(t=(e=(o=i.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL)!==null&&o!==void 0?o:i.OTEL_EXPORTER_OTLP_PROTOCOL)!==null&&e!==void 0?e:(0,vS.getEnv)().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL)!==null&&t!==void 0?t:(0,vS.getEnv)().OTEL_EXPORTER_OTLP_PROTOCOL}zr.getOtlpProtocolFromEnv=_Y;function Wle(){let o=_Y();switch(o){case"grpc":return new Ble.OTLPTraceExporter;case"http/json":return new wle.OTLPTraceExporter;case"http/protobuf":return new uY.OTLPTraceExporter;default:return ri.diag.warn(`Unsupported OTLP traces protocol: ${o}. Using http/protobuf.`),new uY.OTLPTraceExporter}}function jle(){try{let{JaegerExporter:o}=H("@opentelemetry/exporter-jaeger");return new o}catch(o){throw new Error(`Could not instantiate JaegerExporter. This could be due to the JaegerExporter's lack of support for bundling. If possible, use @opentelemetry/exporter-trace-otlp-proto instead. Original Error: ${o}`)}}function zle(){var o;let e=new Map([["otlp",()=>Wle()],["zipkin",()=>new Gle.ZipkinExporter],["console",()=>new hS.ConsoleSpanExporter],["jaeger",()=>jle()]]),t=[],i=[],a=EY(Array.from(new Set((0,vS.getEnv)().OTEL_TRACES_EXPORTER.split(","))));if(a[0]==="none")return ri.diag.warn('OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.'),[];a.length===0?(ri.diag.warn("OTEL_TRACES_EXPORTER is empty. Using default otlp exporter."),a=["otlp"]):a.length>1&&a.includes("none")&&(ri.diag.warn('OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.'),a=["otlp"]);for(let s of a){let n=(o=e.get(s))===null||o===void 0?void 0:o();n?t.push(n):ri.diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${s}.`)}for(let s of t)s instanceof hS.ConsoleSpanExporter?i.push(new hS.SimpleSpanProcessor(s)):i.push(new hS.BatchSpanProcessor(s));return t.length===0&&ri.diag.warn("Unable to set up trace exporter(s) due to invalid exporter and/or protocol values."),i}zr.getSpanProcessorsFromEnv=zle});var pY=A(RS=>{"use strict";Object.defineProperty(RS,"__esModule",{value:!0});RS.NodeSDK=void 0;var $r=(x(),$(Ze)),$le=(Bs(),$(xN)),Xle=(zL(),$(jL)),is=(Pn(),$(Qc)),cc=(Yp(),$(kp)),Jle=(wI(),$(VI)),Qle=Qb(),aR=(i0(),$(o0)),Zle=(Qu(),$(ad)),ece=(Lo(),$(ea)),tce=Hd(),rce=(Ck(),$(Mk)),SY=(ee(),$(gs)),sR=TY(),lR=class{constructor(e={}){var t,i,a,s,n,r,l;let c=(0,SY.getEnv)(),u=(0,SY.getEnvWithoutDefaults)();if(c.OTEL_SDK_DISABLED&&(this._disabled=!0),u.OTEL_LOG_LEVEL&&$r.diag.setLogger(new $r.DiagConsoleLogger,{logLevel:u.OTEL_LOG_LEVEL}),this._configuration=e,this._resource=(t=e.resource)!==null&&t!==void 0?t:new is.Resource({}),this._mergeResourceWithDefaults=(i=e.mergeResourceWithDefaults)!==null&&i!==void 0?i:!0,this._autoDetectResources=(a=e.autoDetectResources)!==null&&a!==void 0?a:!0,this._autoDetectResources?e.resourceDetectors!=null?this._resourceDetectors=e.resourceDetectors:process.env.OTEL_NODE_RESOURCE_DETECTORS!=null?this._resourceDetectors=(0,sR.getResourceDetectorsFromEnv)():this._resourceDetectors=[is.envDetector,is.processDetector,is.hostDetector]:this._resourceDetectors=[],this._serviceName=e.serviceName,e.traceExporter||e.spanProcessor||e.spanProcessors){let E={};e.sampler&&(E.sampler=e.sampler),e.spanLimits&&(E.spanLimits=e.spanLimits),e.idGenerator&&(E.idGenerator=e.idGenerator),e.spanProcessor&&$r.diag.warn("The 'spanProcessor' option is deprecated. Please use 'spanProcessors' instead.");let d=(s=e.spanProcessor)!==null&&s!==void 0?s:new ece.BatchSpanProcessor(e.traceExporter),f=(n=e.spanProcessors)!==null&&n!==void 0?n:[d];this._tracerProviderConfig={tracerConfig:E,spanProcessors:f,contextManager:e.contextManager,textMapPropagator:e.textMapPropagator}}if(e.logRecordProcessors?this._loggerProviderConfig={logRecordProcessors:e.logRecordProcessors}:e.logRecordProcessor?(this._loggerProviderConfig={logRecordProcessors:[e.logRecordProcessor]},$r.diag.warn("The 'logRecordProcessor' option is deprecated. Please use 'logRecordProcessors' instead.")):this.configureLoggerProviderFromEnv(),e.metricReader||e.views){let E={};e.metricReader&&(E.reader=e.metricReader),e.views&&(E.views=e.views),this._meterProviderConfig=E}this._instrumentations=(l=(r=e.instrumentations)===null||r===void 0?void 0:r.flat())!==null&&l!==void 0?l:[]}start(){var e,t,i,a,s,n;if(this._disabled)return;if((0,Xle.registerInstrumentations)({instrumentations:this._instrumentations}),this._autoDetectResources){let l={detectors:this._resourceDetectors};this._resource=this._resource.merge((0,is.detectResourcesSync)(l))}this._resource=this._serviceName===void 0?this._resource:this._resource.merge(new is.Resource({[rce.SEMRESATTRS_SERVICE_NAME]:this._serviceName}));let r=this._tracerProviderConfig?this._tracerProviderConfig.spanProcessors:(0,sR.getSpanProcessorsFromEnv)();if(this._tracerProvider=new tce.NodeTracerProvider(Object.assign(Object.assign({},this._configuration),{resource:this._resource,mergeResourceWithDefaults:this._mergeResourceWithDefaults,spanProcessors:r})),r.length>0&&this._tracerProvider.register({contextManager:(t=(e=this._tracerProviderConfig)===null||e===void 0?void 0:e.contextManager)!==null&&t!==void 0?t:(i=this._configuration)===null||i===void 0?void 0:i.contextManager,propagator:(a=this._tracerProviderConfig)===null||a===void 0?void 0:a.textMapPropagator}),this._loggerProviderConfig){let l=new cc.LoggerProvider({resource:this._resource,mergeResourceWithDefaults:this._mergeResourceWithDefaults});for(let c of this._loggerProviderConfig.logRecordProcessors)l.addLogRecordProcessor(c);this._loggerProvider=l,$le.logs.setGlobalLoggerProvider(l)}if(this._meterProviderConfig){let l=[];this._meterProviderConfig.reader&&l.push(this._meterProviderConfig.reader);let c=new Zle.MeterProvider({resource:this._resource,views:(n=(s=this._meterProviderConfig)===null||s===void 0?void 0:s.views)!==null&&n!==void 0?n:[],readers:l,mergeResourceWithDefaults:this._mergeResourceWithDefaults});this._meterProvider=c,$r.metrics.setGlobalMeterProvider(c);for(let u of this._instrumentations)u.setMeterProvider($r.metrics.getMeterProvider())}}shutdown(){let e=[];return this._tracerProvider&&e.push(this._tracerProvider.shutdown()),this._loggerProvider&&e.push(this._loggerProvider.shutdown()),this._meterProvider&&e.push(this._meterProvider.shutdown()),Promise.all(e).then(()=>{})}configureLoggerProviderFromEnv(){var e;let t=(e=process.env.OTEL_LOGS_EXPORTER)!==null&&e!==void 0?e:"",i=(0,sR.filterBlanksAndNulls)(t.split(","));if(i.length===0&&($r.diag.info("OTEL_LOGS_EXPORTER is empty. Using default otlp exporter."),i.push("otlp")),i.includes("none")){$r.diag.info('OTEL_LOGS_EXPORTER contains "none". Logger provider will not be initialized.');return}let a=[];i.forEach(s=>{var n,r;if(s==="otlp"){let l=(r=(n=process.env.OTEL_EXPORTER_OTLP_LOGS_PROTOCOL)!==null&&n!==void 0?n:process.env.OTEL_EXPORTER_OTLP_PROTOCOL)===null||r===void 0?void 0:r.trim();switch(l){case"grpc":a.push(new Qle.OTLPLogExporter);break;case"http/json":a.push(new Jle.OTLPLogExporter);break;case"http/protobuf":a.push(new aR.OTLPLogExporter);break;case void 0:case"":a.push(new aR.OTLPLogExporter);break;default:$r.diag.warn(`Unsupported OTLP logs protocol: "${l}". Using http/protobuf.`),a.push(new aR.OTLPLogExporter)}}else s==="console"?a.push(new cc.ConsoleLogRecordExporter):$r.diag.warn(`Unsupported OTEL_LOGS_EXPORTER value: "${s}". Supported values are: otlp, console, none.`)}),a.length>0&&(this._loggerProviderConfig={logRecordProcessors:a.map(s=>s instanceof cc.ConsoleLogRecordExporter?new cc.SimpleLogRecordProcessor(s):new cc.BatchLogRecordProcessor(s))})}};RS.NodeSDK=lR});var dY=A(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.NodeSDK=ke.tracing=ke.resources=ke.node=ke.metrics=ke.logs=ke.core=ke.contextBase=ke.api=void 0;ke.api=(x(),$(Ze));ke.contextBase=(x(),$(Ze));ke.core=(ee(),$(gs));ke.logs=(Yp(),$(kp));ke.metrics=(Qu(),$(ad));ke.node=Hd();ke.resources=(Pn(),$(Qc));ke.tracing=(Lo(),$(ea));var nce=pY();Object.defineProperty(ke,"NodeSDK",{enumerable:!0,get:function(){return nce.NodeSDK}})});x();Pn();var AY=fn(dY(),1);import{env as uc,version as oce}from"node:process";x();ee();Yn();var mS=class{#t;#e;constructor(){this.#t=new ct(this.#r,this),this.#e=m.createComponentLogger({namespace:"netlify-span-exporter"})}convert(e){return Gn(e,{useHex:!0,useLongBits:!1})}export(e,t){if(this.#e.debug(`export ${e.length} spans`),this.#t.isCalled){t({code:X.FAILED,error:new Error("Exporter has been shutdown")});return}return this.#n(e,t)}shutdown(){return this.#e.debug("Shutting down"),this.#t.call()}forceFlush(){return this.#e.debug("force flush"),Promise.resolve()}#r(){return this.forceFlush()}#n(e,t){if(console.log("__nfOTLPTrace",JSON.stringify(this.convert(e))),t)return t({code:X.SUCCESS})}};uc.NETLIFY_DEBUG_OPENTELEMETRY&&m.setLogger(new dc,{logLevel:me.ALL,suppressOverrideMessage:!0});var fY,ice=new le({"service.name":SERVICE_NAME??"lambda-function","service.version":SERVICE_VERSION,"process.runtime.name":"nodejs","process.runtime.version":oce.slice(1),"deployment.environment":(fY=uc.URL)!=null&&fY.includes("netlifystg.com")?"staging":"production","http.url":uc.URL,"netlify.site.id":uc.SITE_ID,"netlify.site.name":uc.SITE_NAME}),ace=new AY.default.NodeSDK({resource:ice,traceExporter:new mS});ace.start(); /*! Bundled license information: @grpc/proto-loader/build/src/util.js: (** * @license * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *) long/umd/index.js: (** * @license * Copyright 2009 The Closure Library Authors * Copyright 2020 Daniel Wirtz / The long.js Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * SPDX-License-Identifier: Apache-2.0 *) @grpc/proto-loader/build/src/index.js: (** * @license * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *) */