@sentio/runtime 2.47.0-rc.4 → 2.47.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,7 +56,7 @@ ${o}
56
56
  ${r}`.trim()}_serializeSingularDataPoint(e,n,i){let a="";e=Ed(e,n);let{value:s,attributes:o}=i,r=(0,xI.hrTimeToMilliseconds)(i.endTime);return a+=Fu(e,o,s,this._appendTimestamp?r:void 0,void 0),a}_serializeHistogramDataPoint(e,n,i){let a="";e=Ed(e,n);let s=i.attributes,o=i.value,r=(0,xI.hrTimeToMilliseconds)(i.endTime);for(let p of["count","sum"]){let _=o[p];_!=null&&(a+=Fu(e+"_"+p,s,_,this._appendTimestamp?r:void 0,void 0))}let u=0,l=o.buckets.counts.entries(),c=!1;for(let[p,_]of l){u+=_;let f=o.buckets.boundaries[p];if(f===void 0&&c)break;f===1/0&&(c=!0),a+=Fu(e+"_bucket",s,u,this._appendTimestamp?r:void 0,{le:f===void 0||f===1/0?"+Inf":String(f)})}return a}_serializeResource(e){let n="target_info",i=`# HELP ${n} Target metadata`,a=`# TYPE ${n} gauge`,s=Fu(n,e.attributes,1).trim();return`${i}
57
57
  ${a}
58
58
  ${s}
59
- `}};qu.PrometheusSerializer=Sd});var II=h($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.PrometheusExporter=void 0;var mi=(b(),Y(Re)),Pz=(K(),Y(Is)),Td=(xn(),Y(Yp)),bz=L("http"),Mz=hd(),xz=L("url"),ju=class t extends Td.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>Td.Aggregation.Default(),aggregationTemporalitySelector:i=>Td.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new xz.URL(i.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=i=>{i.statusCode=200,i.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:s,errors:o}=a;o.length&&mi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(s))},a=>{i.end(`# failed to export metrics: ${a}`)})},this._notFound=i=>{i.statusCode=404,i.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||t.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||t.DEFAULT_OPTIONS.port,this._prefix=e.prefix||t.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:t.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,bz.createServer)(this._requestHandler).unref(),this._serializer=new Mz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,Pz.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};$u.PrometheusExporter=ju;ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var CI=h(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.PrometheusSerializer=Gn.PrometheusExporter=void 0;var Lz=II();Object.defineProperty(Gn,"PrometheusExporter",{enumerable:!0,get:function(){return Lz.PrometheusExporter}});var Iz=hd();Object.defineProperty(Gn,"PrometheusSerializer",{enumerable:!0,get:function(){return Iz.PrometheusSerializer}})});var md=h(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.AbstractAsyncHooksContextManager=void 0;var Cz=L("events"),wz=["addListener","on","once","prependListener","prependOnceListener"],vd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Cz.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...s){return i.with(e,()=>n.apply(this,s))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),a}_bindEventEmitter(e,n){return this._getPatchMap(n)!==void 0||(this._createPatchMap(n),wz.forEach(a=>{n[a]!==void 0&&(n[a]=this._patchAddListener(n,n[a],e))}),typeof n.removeListener=="function"&&(n.removeListener=this._patchRemoveListener(n,n.removeListener)),typeof n.off=="function"&&(n.off=this._patchRemoveListener(n,n.off)),typeof n.removeAllListeners=="function"&&(n.removeAllListeners=this._patchRemoveAllListeners(n,n.removeAllListeners))),n}_patchRemoveListener(e,n){let i=this;return function(a,s){var o;let r=(o=i._getPatchMap(e))===null||o===void 0?void 0:o[a];if(r===void 0)return n.call(this,a,s);let u=r.get(s);return n.call(this,a,u||s)}}_patchRemoveAllListeners(e,n){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]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(s,o){if(a._wrapped)return n.call(this,s,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let u=r[s];u===void 0&&(u=new WeakMap,r[s]=u);let l=a.bind(i,o);u.set(o,l),a._wrapped=!0;try{return n.call(this,s,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Ku.AbstractAsyncHooksContextManager=vd});var wI=h(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.AsyncHooksContextManager=void 0;var Uz=(b(),Y(Re)),Dz=L("async_hooks"),Vz=md(),yd=class extends Vz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=Dz.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:Uz.ROOT_CONTEXT}with(e,n,i,...a){this._enterContext(e);try{return n.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,n){if(n==="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 n=this._contexts.get(e);n!==void 0&&this._enterContext(n)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};Wu.AsyncHooksContextManager=yd});var UI=h(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.AsyncLocalStorageContextManager=void 0;var Bz=(b(),Y(Re)),Gz=L("async_hooks"),kz=md(),Ad=class extends kz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Gz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Bz.ROOT_CONTEXT}with(e,n,i,...a){let s=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};zu.AsyncLocalStorageContextManager=Ad});var DI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.AsyncLocalStorageContextManager=kn.AsyncHooksContextManager=void 0;var Hz=wI();Object.defineProperty(kn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Hz.AsyncHooksContextManager}});var Fz=UI();Object.defineProperty(kn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Fz.AsyncLocalStorageContextManager}})});var Hn,Od=m(()=>{"use strict";b();Hn=$r("OpenTelemetry Context Key B3 Debug Flag")});var Er,Fn,Yn,qn,Xu,jn,yi=m(()=>{"use strict";Er="b3",Fn="x-b3-traceid",Yn="x-b3-spanid",qn="x-b3-sampled",Xu="x-b3-parentspanid",jn="x-b3-flags"});function jz(t){return t===J.SAMPLED||t===J.NONE}function $z(t){return Array.isArray(t)?t[0]:t}function Ju(t,e,n){var i=e.get(t,n);return $z(i)}function Kz(t,e){var n=Ju(t,e,Fn);return typeof n=="string"?n.padStart(32,"0"):""}function Wz(t,e){var n=Ju(t,e,Yn);return typeof n=="string"?n:""}function VI(t,e){var n=Ju(t,e,jn);return n==="1"?"1":void 0}function zz(t,e){var n=Ju(t,e,qn),i=VI(t,e);if(i==="1"||Yz.has(n))return J.SAMPLED;if(n===void 0||qz.has(n))return J.NONE}var Yz,qz,BI,GI=m(()=>{"use strict";b();K();Od();yi();Yz=new Set([!0,"true","True","1",1]),qz=new Set([!1,"false","False","0",0]);BI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn);i.set(n,Fn,a.traceId),i.set(n,Yn,a.spanId),s==="1"?i.set(n,jn,s):a.traceFlags!==void 0&&i.set(n,qn,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=Kz(n,i),s=Wz(n,i),o=zz(n,i),r=VI(n,i);return Gt(a)&&Ii(s)&&jz(o)?(e=e.setValue(Hn,r),X.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Fn,Yn,jn,qn,Xu]},t}()});function tX(t){return t.length===32?t:""+Qz+t}function rX(t){return t&&Zz.has(t)?J.SAMPLED:J.NONE}var Xz,Jz,Qz,Zz,eX,kI,HI=m(()=>{"use strict";b();K();Od();yi();Xz=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Jz=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,Qz="0".repeat(16),Zz=new Set(["d","1"]),eX="d";kI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,Er,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(Jz);if(!o)return e;var r=Xz(o,4),u=r[1],l=r[2],c=r[3],p=tX(u);if(!Gt(p)||!Ii(l))return e;var _=rX(c);return c===eX&&(e=e.setValue(Hn,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[Er]},t}()});var $n,gd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})($n||($n={}))});var FI,YI=m(()=>{"use strict";K();GI();HI();yi();gd();FI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new BI,this._b3SinglePropagator=new kI,e.injectEncoding===$n.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){be(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;return s?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var qI={};nt(qI,{B3InjectEncoding:()=>$n,B3Propagator:()=>FI,B3_CONTEXT_HEADER:()=>Er,X_B3_FLAGS:()=>jn,X_B3_PARENT_SPAN_ID:()=>Xu,X_B3_SAMPLED:()=>qn,X_B3_SPAN_ID:()=>Yn,X_B3_TRACE_ID:()=>Fn});var jI=m(()=>{"use strict";YI();yi();gd()});var $I,KI=m(()=>{"use strict";$I="exception"});var Nd,nX,WI,oX,Qu,Rd=m(()=>{"use strict";b();K();jo();KI();Nd=function(){return Nd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Nd.apply(this,arguments)},nX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},WI=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},oX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},Qu=function(){function t(e,n,i,a,s,o,r,u,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:pE.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=s,this.links=r;var p=Date.now();this._performanceStartTime=Ze.now(),this._performanceOffset=p-(this._performanceStartTime+yn()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Wo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=nX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=WI(s.value,2),r=o[0],u=o[1];this.setAttribute(r,u)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return g.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&g.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Qo(n)&&(Qo(i)||(i=n),n=void 0);var a=or(n);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,oX([],WI(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Nd({},e),this.status.message!=null&&typeof e.message!="string"&&(g.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){g.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=Os(this.startTime,this.endTime),this._duration[0]<0&&(g.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&&g.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<Ze.now())return Jo(e+this._performanceOffset);if(typeof e=="number")return Oe(e);if(e instanceof Date)return Oe(e.getTime());if(An(e))return e;if(this._startTimeProvided)return Oe(Date.now());var n=Ze.now()-this._performanceStartTime;return Zo(this.startTime,Oe(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[ls]=e:e&&(e.code?i[us]=e.code.toString():e.name&&(i[us]=e.name),e.message&&(i[ls]=e.message),e.stack&&(i[u0]=e.stack)),i[us]||i[ls]?this.addEvent($I,i,n):g.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substr(0,n)},t.prototype._truncateToSize=function(e){var n=this,i=this._attributeValueLengthLimit;return i<=0?(g.warn("Attribute value limit must be positive, got "+i),e):typeof e=="string"?this._truncateToLimitUtil(e,i):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,i):a}):e},t}()});var ft,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}))});var _r,Zu=m(()=>{"use strict";Ai();_r=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Mt,el=m(()=>{"use strict";Ai();Mt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Kn,Pd=m(()=>{"use strict";b();K();Zu();el();Kn=function(){function t(e){var n,i,a,s;this._root=e.root,this._root||(he(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Mt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Mt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new _r,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Mt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new _r}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&J.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,s,o):this._localParentNotSampled.shouldSample(e,n,i,a,s,o)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var Oi,bd=m(()=>{"use strict";b();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Gt(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,i=0;i<e.length/8;i++){var a=i*8,s=parseInt(e.slice(a,a+8),16);n=(n^s)>>>0}return n},t}()});function tl(){var t=Ae();return{sampler:Md(iX),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Md(t){switch(t===void 0&&(t=Ae()),t.OTEL_TRACES_SAMPLER){case je.AlwaysOn:return new Mt;case je.AlwaysOff:return new _r;case je.ParentBasedAlwaysOn:return new Kn({root:new Mt});case je.ParentBasedAlwaysOff:return new Kn({root:new _r});case je.TraceIdRatio:return new Oi(zI(t));case je.ParentBasedTraceIdRatio:return new Kn({root:new Oi(zI(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+aX+'".'),new Mt}}function zI(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Wn+"."),Wn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Wn+"."),Wn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Wn+"."),Wn):e}var iX,aX,Wn,xd=m(()=>{"use strict";b();K();Zu();el();Pd();bd();iX=Ae(),aX=je.AlwaysOn,Wn=1});function XI(t){var e={sampler:Md()},n=tl(),i=Object.assign({},n,e,t);return i.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),i.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),i}function JI(t){var e,n,i,a,s,o,r,u,l,c,p,_,f=Object.assign({},t.spanLimits),S=vn();return f.attributeCountLimit=(o=(s=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(i=t.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Ur,f.attributeValueLengthLimit=(_=(p=(c=(u=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&u!==void 0?u:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:wr,Object.assign({},t,{spanLimits:f})}var Ld=m(()=>{"use strict";xd();K()});var QI,ZI=m(()=>{"use strict";b();K();QI=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Ae();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new ur(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(g.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&J.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&g.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(g.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,i){for(var a=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=s;o<r;o++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(i)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,i){var a=setTimeout(function(){i(new Error("Timeout"))},e._exportTimeoutMillis);He.with(hn(He.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(s,function(p){var _;clearTimeout(a),p.code===ee.SUCCESS?n():i((_=p.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,u=0,l=s.length;u<l;u++){var c=s[u];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(p){he(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,he(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),sr(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var sX,Sr,eC=m(()=>{"use strict";ZI();sX=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),Sr=function(t){sX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(QI)});function tC(t){return function(){for(var n=0;n<t/4;n++)rl.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(rl[n]>0);n++)n===t-1&&(rl[t-1]=1);return rl.toString("hex",0,t)}}var uX,rC,zn,rl,nC=m(()=>{"use strict";uX=8,rC=16,zn=function(){function t(){this.generateTraceId=tC(rC),this.generateSpanId=tC(uX)}return t}(),rl=Buffer.allocUnsafe(rC)});var oC=m(()=>{"use strict";eC();nC()});var nl=m(()=>{"use strict";oC()});var ol,iC=m(()=>{"use strict";b();K();Rd();Ld();nl();ol=function(){function t(e,n,i){this._tracerProvider=i;var a=XI(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new zn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,o;n===void 0&&(n={}),i===void 0&&(i=He.active()),n.root&&(i=X.deleteSpan(i));var r=X.getSpan(i);if(be(i)){g.debug("Instrumentation suppressed, returning Noop Span");var u=X.wrapSpanContext(lE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:fE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===Et.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===Et.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=X.wrapSpanContext(N);return u}var D=or(Object.assign(T,A.attributes)),G=new Qu(this,i,e,N,S,f,v,n.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,n,i,a){var s,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(s=n,r=i):(s=n,o=i,r=a);var u=o??He.active(),l=this.startSpan(e,s,u),c=X.setSpan(u,l);return He.with(c,r,void 0,l)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}()});var il,aC,sC=m(()=>{"use strict";K();il=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},aC=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(i).then(function(){r()}).catch(function(u){he(u||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var s=il(this._spanProcessors),o=s.next();!o.done;o=s.next()){var r=o.value;r.onStart(e,n)}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,u){Promise.all(i).then(function(){r()},u)})},t}()});var al,Id=m(()=>{"use strict";al=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}()});var Vt,uC,lC=m(()=>{"use strict";b();K();Us();gi();xd();sC();Id();nl();Ld();(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Vt||(Vt={}));uC=function(){function t(e){e===void 0&&(e={});var n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Ls({},tl(),JI(e));this.resource=(n=i.resource)!==null&&n!==void 0?n:Ut.empty(),this.resource=Ut.default().merge(this.resource),this._config=Object.assign({},i,{resource:this.resource});var a=this._buildExporterFromEnv();if(a!==void 0){var s=new Sr(a);this.activeSpanProcessor=s}else this.activeSpanProcessor=new al}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new ol({name:e,version:n,schemaUrl:i?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return g.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new aC(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),X.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&He.setGlobalContextManager(e.contextManager),e.propagator&&it.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(i){return new Promise(function(a){var s,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Vt.timeout&&(s=Vt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(s){return a([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Ae().OTEL_PROPAGATORS)),i=n.map(function(s){var o=e._getPropagator(s);return o||g.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(s,o){return o&&s.push(o),s},[]);if(a.length!==0)return n.length===1?a[0]:new Ns({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Ae().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Ps}],["baggage",function(){return new _s}]]),t._registeredExporters=new Map,t}()});var lX,cC,fC=m(()=>{"use strict";K();lX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Ot(e.startTime),duration:Ot(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var i,a;try{for(var s=lX(e),o=s.next();!o.done;o=s.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n)return n({code:ee.SUCCESS})},t}()});var cX,fX,pC,dC=m(()=>{"use strict";K();cX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},fX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},pC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,fX([],cX(e),!1)),setTimeout(function(){return n({code:ee.SUCCESS})},0)},t.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.reset=function(){this._finishedSpans=[]},t.prototype.getFinishedSpans=function(){return this._finishedSpans},t}()});var pX,dX,EC,_C=m(()=>{"use strict";b();K();pX=function(t,e,n,i){function a(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function r(c){try{l(i.next(c))}catch(p){o(p)}}function u(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},dX=function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(l){return function(c){return u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=l[0]&2?a.return:l[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,l[1])).done)return s;switch(a=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,a=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},EC=function(){function t(e){this._exporter=e,this._shutdownOnce=new ur(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return pX(this,void 0,void 0,function(){return dX(this,function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){var n=this,i,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&J.SAMPLED){var s=function(){return oi._export(n._exporter,[e]).then(function(r){var u;r.code!==ee.SUCCESS&&he((u=r.error)!==null&&u!==void 0?u:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){he(r)})};if(e.resource.asyncAttributesPending){var o=(a=(i=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(i).then(function(){return o!=null&&n._unresolvedExports.delete(o),s()},function(r){return he(r)});o!=null&&this._unresolvedExports.add(o)}else s()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var Cd={};nt(Cd,{AlwaysOffSampler:()=>_r,AlwaysOnSampler:()=>Mt,BasicTracerProvider:()=>uC,BatchSpanProcessor:()=>Sr,ConsoleSpanExporter:()=>cC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>pC,NoopSpanProcessor:()=>al,ParentBasedSampler:()=>Kn,RandomIdGenerator:()=>zn,SamplingDecision:()=>ft,SimpleSpanProcessor:()=>EC,Span:()=>Qu,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>ol});var gi=m(()=>{"use strict";iC();lC();nl();fC();dC();_C();Id();Zu();el();Pd();bd();Ai();Rd()});var Ni=h((zce,SC)=>{"use strict";var EX="2.0.0",_X=Number.MAX_SAFE_INTEGER||9007199254740991,SX=16,hX=250,TX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];SC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:SX,MAX_SAFE_BUILD_LENGTH:hX,MAX_SAFE_INTEGER:_X,RELEASE_TYPES:TX,SEMVER_SPEC_VERSION:EX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Xce,hC)=>{"use strict";var vX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};hC.exports=vX});var Xn=h((Bt,TC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:wd,MAX_SAFE_BUILD_LENGTH:mX,MAX_LENGTH:yX}=Ni(),AX=Ri();Bt=TC.exports={};var OX=Bt.re=[],gX=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},NX=0,Ud="[a-zA-Z0-9-]",RX=[["\\s",1],["\\d",yX],[Ud,mX]],PX=t=>{for(let[e,n]of RX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=PX(e),a=NX++;AX(t,a,e),P[t]=a,R[a]=e,OX[a]=new RegExp(e,n?"g":void 0),gX[a]=new RegExp(i,n?"g":void 0)};U("NUMERICIDENTIFIER","0|[1-9]\\d*");U("NUMERICIDENTIFIERLOOSE","\\d+");U("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ud}*`);U("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);U("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);U("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);U("BUILDIDENTIFIER",`${Ud}+`);U("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);U("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);U("FULL",`^${R[P.FULLPLAIN]}$`);U("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);U("LOOSE",`^${R[P.LOOSEPLAIN]}$`);U("GTLT","((?:<|>)?=?)");U("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);U("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);U("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);U("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);U("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);U("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);U("COERCEPLAIN",`(^|[^\\d])(\\d{1,${wd}})(?:\\.(\\d{1,${wd}}))?(?:\\.(\\d{1,${wd}}))?`);U("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);U("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);U("COERCERTL",R[P.COERCE],!0);U("COERCERTLFULL",R[P.COERCEFULL],!0);U("LONETILDE","(?:~>?)");U("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";U("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);U("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);U("LONECARET","(?:\\^)");U("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";U("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);U("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);U("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);U("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);U("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";U("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);U("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);U("STAR","(<|>)?=?\\s*\\*");U("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");U("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var sl=h((Jce,vC)=>{"use strict";var bX=Object.freeze({loose:!0}),MX=Object.freeze({}),xX=t=>t?typeof t!="object"?bX:t:MX;vC.exports=xX});var Dd=h((Qce,AC)=>{"use strict";var mC=/^[0-9]+$/,yC=(t,e)=>{let n=mC.test(t),i=mC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},LX=(t,e)=>yC(e,t);AC.exports={compareIdentifiers:yC,rcompareIdentifiers:LX}});var Me=h((Zce,RC)=>{"use strict";var ul=Ri(),{MAX_LENGTH:OC,MAX_SAFE_INTEGER:ll}=Ni(),{safeRe:gC,t:NC}=Xn(),IX=sl(),{compareIdentifiers:Jn}=Dd(),Vd=class t{constructor(e,n){if(n=IX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.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>OC)throw new TypeError(`version is longer than ${OC} characters`);ul("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?gC[NC.LOOSE]:gC[NC.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>ll||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ll||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ll||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<ll)return s}return a}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ul("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Jn(this.major,e.major)||Jn(this.minor,e.minor)||Jn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(ul("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(ul("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let s=[n,a];i===!1&&(s=[n]),Jn(this.prerelease[0],n)===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}};RC.exports=Vd});var Yr=h((efe,bC)=>{"use strict";var PC=Me(),CX=(t,e,n=!1)=>{if(t instanceof PC)return t;try{return new PC(t,e)}catch(i){if(!n)return null;throw i}};bC.exports=CX});var xC=h((tfe,MC)=>{"use strict";var wX=Yr(),UX=(t,e)=>{let n=wX(t,e);return n?n.version:null};MC.exports=UX});var IC=h((rfe,LC)=>{"use strict";var DX=Yr(),VX=(t,e)=>{let n=DX(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};LC.exports=VX});var UC=h((nfe,wC)=>{"use strict";var CC=Me(),BX=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new CC(t instanceof CC?t.version:t,n).inc(e,i,a).version}catch{return null}};wC.exports=BX});var BC=h((ofe,VC)=>{"use strict";var DC=Yr(),GX=(t,e)=>{let n=DC(t,null,!0),i=DC(e,null,!0),a=n.compare(i);if(a===0)return null;let s=a>0,o=s?n:i,r=s?i:n,u=!!o.prerelease.length;if(!!r.prerelease.length&&!u)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=u?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};VC.exports=GX});var kC=h((ife,GC)=>{"use strict";var kX=Me(),HX=(t,e)=>new kX(t,e).major;GC.exports=HX});var FC=h((afe,HC)=>{"use strict";var FX=Me(),YX=(t,e)=>new FX(t,e).minor;HC.exports=YX});var qC=h((sfe,YC)=>{"use strict";var qX=Me(),jX=(t,e)=>new qX(t,e).patch;YC.exports=jX});var $C=h((ufe,jC)=>{"use strict";var $X=Yr(),KX=(t,e)=>{let n=$X(t,e);return n&&n.prerelease.length?n.prerelease:null};jC.exports=KX});var tt=h((lfe,WC)=>{"use strict";var KC=Me(),WX=(t,e,n)=>new KC(t,n).compare(new KC(e,n));WC.exports=WX});var XC=h((cfe,zC)=>{"use strict";var zX=tt(),XX=(t,e,n)=>zX(e,t,n);zC.exports=XX});var QC=h((ffe,JC)=>{"use strict";var JX=tt(),QX=(t,e)=>JX(t,e,!0);JC.exports=QX});var cl=h((pfe,ew)=>{"use strict";var ZC=Me(),ZX=(t,e,n)=>{let i=new ZC(t,n),a=new ZC(e,n);return i.compare(a)||i.compareBuild(a)};ew.exports=ZX});var rw=h((dfe,tw)=>{"use strict";var eJ=cl(),tJ=(t,e)=>t.sort((n,i)=>eJ(n,i,e));tw.exports=tJ});var ow=h((Efe,nw)=>{"use strict";var rJ=cl(),nJ=(t,e)=>t.sort((n,i)=>rJ(i,n,e));nw.exports=nJ});var Pi=h((_fe,iw)=>{"use strict";var oJ=tt(),iJ=(t,e,n)=>oJ(t,e,n)>0;iw.exports=iJ});var fl=h((Sfe,aw)=>{"use strict";var aJ=tt(),sJ=(t,e,n)=>aJ(t,e,n)<0;aw.exports=sJ});var Bd=h((hfe,sw)=>{"use strict";var uJ=tt(),lJ=(t,e,n)=>uJ(t,e,n)===0;sw.exports=lJ});var Gd=h((Tfe,uw)=>{"use strict";var cJ=tt(),fJ=(t,e,n)=>cJ(t,e,n)!==0;uw.exports=fJ});var pl=h((vfe,lw)=>{"use strict";var pJ=tt(),dJ=(t,e,n)=>pJ(t,e,n)>=0;lw.exports=dJ});var dl=h((mfe,cw)=>{"use strict";var EJ=tt(),_J=(t,e,n)=>EJ(t,e,n)<=0;cw.exports=_J});var kd=h((yfe,fw)=>{"use strict";var SJ=Bd(),hJ=Gd(),TJ=Pi(),vJ=pl(),mJ=fl(),yJ=dl(),AJ=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return SJ(t,n,i);case"!=":return hJ(t,n,i);case">":return TJ(t,n,i);case">=":return vJ(t,n,i);case"<":return mJ(t,n,i);case"<=":return yJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};fw.exports=AJ});var dw=h((Afe,pw)=>{"use strict";var OJ=Me(),gJ=Yr(),{safeRe:El,t:_l}=Xn(),NJ=(t,e)=>{if(t instanceof OJ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?El[_l.COERCEFULL]:El[_l.COERCE]);else{let u=e.includePrerelease?El[_l.COERCERTLFULL]:El[_l.COERCERTL],l;for(;(l=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",s=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return gJ(`${i}.${a}.${s}${o}${r}`,e)};pw.exports=NJ});var _w=h((Ofe,Ew)=>{"use strict";var Hd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,n)}return this}};Ew.exports=Hd});var rt=h((gfe,vw)=>{"use strict";var Fd=class t{constructor(e,n){if(n=PJ(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Yd)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),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=>!hw(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&&wJ(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&IJ)|(this.options.loose&&CJ))+":"+e,a=Sw.get(i);if(a)return a;let s=this.options.loose,o=s?$e[Ve.HYPHENRANGELOOSE]:$e[Ve.HYPHENRANGE];e=e.replace(o,qJ(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace($e[Ve.COMPARATORTRIM],MJ),te("comparator trim",e),e=e.replace($e[Ve.TILDETRIM],xJ),te("tilde trim",e),e=e.replace($e[Ve.CARETTRIM],LJ),te("caret trim",e);let r=e.split(" ").map(p=>UJ(p,this.options)).join(" ").split(/\s+/).map(p=>YJ(p,this.options));s&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match($e[Ve.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(p=>new Yd(p,this.options));for(let p of l){if(hw(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return Sw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>Tw(i,n)&&e.set.some(a=>Tw(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new bJ(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(jJ(this.set[n],e,this.options))return!0;return!1}};vw.exports=Fd;var RJ=_w(),Sw=new RJ,PJ=sl(),Yd=bi(),te=Ri(),bJ=Me(),{safeRe:$e,t:Ve,comparatorTrimReplace:MJ,tildeTrimReplace:xJ,caretTrimReplace:LJ}=Xn(),{FLAG_INCLUDE_PRERELEASE:IJ,FLAG_LOOSE:CJ}=Ni(),hw=t=>t.value==="<0.0.0-0",wJ=t=>t.value==="",Tw=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(s=>a.intersects(s,e)),a=i.pop();return n},UJ=(t,e)=>(te("comp",t,e),t=BJ(t,e),te("caret",t),t=DJ(t,e),te("tildes",t),t=kJ(t,e),te("xrange",t),t=FJ(t,e),te("stars",t),t),Be=t=>!t||t.toLowerCase()==="x"||t==="*",DJ=(t,e)=>t.trim().split(/\s+/).map(n=>VJ(n,e)).join(" "),VJ=(t,e)=>{let n=e.loose?$e[Ve.TILDELOOSE]:$e[Ve.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return Be(a)?u="":Be(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:Be(o)?u=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(te("replaceTilde pr",r),u=`>=${a}.${s}.${o}-${r} <${a}.${+s+1}.0-0`):u=`>=${a}.${s}.${o} <${a}.${+s+1}.0-0`,te("tilde return",u),u})},BJ=(t,e)=>t.trim().split(/\s+/).map(n=>GJ(n,e)).join(" "),GJ=(t,e)=>{te("caret",t,e);let n=e.loose?$e[Ve.CARETLOOSE]:$e[Ve.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return Be(s)?l="":Be(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Be(r)?s==="0"?l=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:u?(te("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${r}-${u} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r}-${u} <${+s+1}.0.0-0`):(te("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${r}${i} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r} <${+s+1}.0.0-0`),te("caret return",l),l})},kJ=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>HJ(n,e)).join(" ")),HJ=(t,e)=>{t=t.trim();let n=e.loose?$e[Ve.XRANGELOOSE]:$e[Ve.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=Be(s),c=l||Be(o),p=c||Be(r),_=p;return a==="="&&_&&(a=""),u=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(s=+s+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?s=+s+1:o=+o+1),a==="<"&&(u="-0"),i=`${a+s}.${o}.${r}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},FJ=(t,e)=>(te("replaceStars",t,e),t.trim().replace($e[Ve.STAR],"")),YJ=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace($e[e.includePrerelease?Ve.GTE0PRE:Ve.GTE0],"")),qJ=t=>(e,n,i,a,s,o,r,u,l,c,p,_)=>(Be(i)?n="":Be(a)?n=`>=${i}.0.0${t?"-0":""}`:Be(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Be(l)?u="":Be(c)?u=`<${+l+1}.0.0-0`:Be(p)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${p}-${_}`:t?u=`<${l}.${c}.${+p+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),jJ=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==Yd.ANY&&t[i].semver.prerelease.length>0){let a=t[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var bi=h((Nfe,Nw)=>{"use strict";var Mi=Symbol("SemVer ANY"),$d=class t{static get ANY(){return Mi}constructor(e,n){if(n=mw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),jd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Mi?this.value="":this.value=this.operator+this.semver.version,jd("comp",this)}parse(e){let n=this.options.loose?yw[Aw.COMPARATORLOOSE]:yw[Aw.COMPARATOR],i=e.match(n);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 Ow(i[2],this.options.loose):this.semver=Mi}toString(){return this.value}test(e){if(jd("Comparator.test",e,this.options.loose),this.semver===Mi||e===Mi)return!0;if(typeof e=="string")try{e=new Ow(e,this.options)}catch{return!1}return qd(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new gw(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new gw(this.value,n).test(e.semver):(n=mw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.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("=")||qd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||qd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Nw.exports=$d;var mw=sl(),{safeRe:yw,t:Aw}=Xn(),qd=kd(),jd=Ri(),Ow=Me(),gw=rt()});var xi=h((Rfe,Rw)=>{"use strict";var $J=rt(),KJ=(t,e,n)=>{try{e=new $J(e,n)}catch{return!1}return e.test(t)};Rw.exports=KJ});var bw=h((Pfe,Pw)=>{"use strict";var WJ=rt(),zJ=(t,e)=>new WJ(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Pw.exports=zJ});var xw=h((bfe,Mw)=>{"use strict";var XJ=Me(),JJ=rt(),QJ=(t,e,n)=>{let i=null,a=null,s=null;try{s=new JJ(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new XJ(i,n))}),i};Mw.exports=QJ});var Iw=h((Mfe,Lw)=>{"use strict";var ZJ=Me(),e9=rt(),t9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new e9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new ZJ(i,n))}),i};Lw.exports=t9});var Uw=h((xfe,ww)=>{"use strict";var Kd=Me(),r9=rt(),Cw=Pi(),n9=(t,e)=>{t=new r9(t,e);let n=new Kd("0.0.0");if(t.test(n)||(n=new Kd("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let a=t.set[i],s=null;a.forEach(o=>{let r=new Kd(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||Cw(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||Cw(n,s))&&(n=s)}return n&&t.test(n)?n:null};ww.exports=n9});var Vw=h((Lfe,Dw)=>{"use strict";var o9=rt(),i9=(t,e)=>{try{return new o9(t,e).range||"*"}catch{return null}};Dw.exports=i9});var Sl=h((Ife,Hw)=>{"use strict";var a9=Me(),kw=bi(),{ANY:s9}=kw,u9=rt(),l9=xi(),Bw=Pi(),Gw=fl(),c9=dl(),f9=pl(),p9=(t,e,n,i)=>{t=new a9(t,i),e=new u9(e,i);let a,s,o,r,u;switch(n){case">":a=Bw,s=c9,o=Gw,r=">",u=">=";break;case"<":a=Gw,s=f9,o=Bw,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===s9&&(f=new kw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};Hw.exports=p9});var Yw=h((Cfe,Fw)=>{"use strict";var d9=Sl(),E9=(t,e,n)=>d9(t,e,">",n);Fw.exports=E9});var jw=h((wfe,qw)=>{"use strict";var _9=Sl(),S9=(t,e,n)=>_9(t,e,"<",n);qw.exports=S9});var Ww=h((Ufe,Kw)=>{"use strict";var $w=rt(),h9=(t,e,n)=>(t=new $w(t,n),e=new $w(e,n),t.intersects(e,n));Kw.exports=h9});var Xw=h((Dfe,zw)=>{"use strict";var T9=xi(),v9=tt();zw.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,p)=>v9(c,p,n));for(let c of o)T9(c,e,n)?(s=c,a||(a=c)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var rU=h((Vfe,tU)=>{"use strict";var Jw=rt(),zd=bi(),{ANY:Wd}=zd,Li=xi(),Xd=tt(),m9=(t,e,n={})=>{if(t===e)return!0;t=new Jw(t,n),e=new Jw(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=A9(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},y9=[new zd(">=0.0.0-0")],Qw=[new zd(">=0.0.0")],A9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Wd){if(e.length===1&&e[0].semver===Wd)return!0;n.includePrerelease?t=y9:t=Qw}if(e.length===1&&e[0].semver===Wd){if(n.includePrerelease)return!0;e=Qw}let i=new Set,a,s;for(let f of t)f.operator===">"||f.operator===">="?a=Zw(a,f,n):f.operator==="<"||f.operator==="<="?s=eU(s,f,n):i.add(f.semver);if(i.size>1)return null;let o;if(a&&s){if(o=Xd(a.semver,s.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let f of i){if(a&&!Li(f,String(a),n)||s&&!Li(f,String(s),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,u,l,c,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=Zw(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(s){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(u=eU(s,f,n),u===f&&u!==s)return!1}else if(s.operator==="<="&&!Li(s.semver,String(f),n))return!1}if(!f.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||p)},Zw=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},eU=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};tU.exports=m9});var aU=h((Bfe,iU)=>{"use strict";var Jd=Xn(),nU=Ni(),O9=Me(),oU=Dd(),g9=Yr(),N9=xC(),R9=IC(),P9=UC(),b9=BC(),M9=kC(),x9=FC(),L9=qC(),I9=$C(),C9=tt(),w9=XC(),U9=QC(),D9=cl(),V9=rw(),B9=ow(),G9=Pi(),k9=fl(),H9=Bd(),F9=Gd(),Y9=pl(),q9=dl(),j9=kd(),$9=dw(),K9=bi(),W9=rt(),z9=xi(),X9=bw(),J9=xw(),Q9=Iw(),Z9=Uw(),e7=Vw(),t7=Sl(),r7=Yw(),n7=jw(),o7=Ww(),i7=Xw(),a7=rU();iU.exports={parse:g9,valid:N9,clean:R9,inc:P9,diff:b9,major:M9,minor:x9,patch:L9,prerelease:I9,compare:C9,rcompare:w9,compareLoose:U9,compareBuild:D9,sort:V9,rsort:B9,gt:G9,lt:k9,eq:H9,neq:F9,gte:Y9,lte:q9,cmp:j9,coerce:$9,Comparator:K9,Range:W9,satisfies:z9,toComparators:X9,maxSatisfying:J9,minSatisfying:Q9,minVersion:Z9,validRange:e7,outside:t7,gtr:r7,ltr:n7,intersects:o7,simplifyRange:i7,subset:a7,SemVer:O9,re:Jd.re,src:Jd.src,tokens:Jd.t,SEMVER_SPEC_VERSION:nU.SEMVER_SPEC_VERSION,RELEASE_TYPES:nU.RELEASE_TYPES,compareIdentifiers:oU.compareIdentifiers,rcompareIdentifiers:oU.rcompareIdentifiers}});function u7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=uU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=s7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var sU,uU,Qd,hl,lU,s7,cU=m(()=>{"use strict";b();K();sU=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uU=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Qd="uber-trace-id",hl="uberctx",lU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=hl):(this._jaegerTraceHeader=e?.customTraceHeader||Qd,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||hl)}return t.prototype.inject=function(e,n,i){var a,s,o=X.getSpanContext(e),r=it.getBaggage(e);if(o&&be(e)===!1){var u="0"+(o.traceFlags||J.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=sU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=uU(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,s,o=this,r,u=i.get(n,this._jaegerTraceHeader),l=Array.isArray(u)?u[0]:u,c=i.keys(n).filter(function(A){return A.startsWith(o._jaegerBaggageHeaderPrefix+"-")}).map(function(A){var O=i.get(n,A);return{key:A.substring(o._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(O)?O[0]:O}}),p=e;if(typeof l=="string"){var _=u7(l);_&&(p=X.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=it.getBaggage(e))!==null&&r!==void 0?r:it.createBaggage();try{for(var S=sU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return p=it.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),s7=/^[0-9a-f]{1,2}$/i});var fU={};nt(fU,{JaegerPropagator:()=>lU,UBER_BAGGAGE_HEADER_PREFIX:()=>hl,UBER_TRACE_ID_HEADER:()=>Qd});var pU=m(()=>{"use strict";cU()});var _U=h(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.NodeTracerProvider=void 0;var dU=DI(),Tl=(jI(),Y(qI)),EU=(gi(),Y(Cd)),l7=aU(),c7=(pU(),Y(fU)),vl=class extends EU.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=l7.gte(process.version,"14.8.0")?dU.AsyncLocalStorageContextManager:dU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};ml.NodeTracerProvider=vl;vl._registeredPropagators=new Map([...EU.BasicTracerProvider._registeredPropagators,["b3",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new c7.JaegerPropagator]])});var SU=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Tracer=q.TraceIdRatioBasedSampler=q.Span=q.SimpleSpanProcessor=q.SamplingDecision=q.RandomIdGenerator=q.ParentBasedSampler=q.NoopSpanProcessor=q.InMemorySpanExporter=q.ForceFlushState=q.ConsoleSpanExporter=q.BatchSpanProcessor=q.BasicTracerProvider=q.AlwaysOnSampler=q.AlwaysOffSampler=q.NodeTracerProvider=void 0;var f7=_U();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return f7.NodeTracerProvider}});var Ge=(gi(),Y(Cd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return Ge.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return Ge.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return Ge.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return Ge.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return Ge.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return Ge.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return Ge.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return Ge.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return Ge.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return Ge.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return Ge.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return Ge.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return Ge.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return Ge.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return Ge.Tracer}})});var hU=h(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.OTLPTraceExporter=void 0;var p7=fd(),d7=(Cu(),Y(id)),Zd=class extends p7.OTLPGRPCExporterNodeBase{constructor(e={}){super(e,d7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export","TRACES")}};yl.OTLPTraceExporter=Zd});var TU=h(qr=>{"use strict";var E7=qr&&qr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),_7=qr&&qr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&E7(e,t,n)};Object.defineProperty(qr,"__esModule",{value:!0});_7(hU(),qr)});var gU=Ke(kl(),1),NU=Ke(Zn(),1),RU=Ke(_S(),1),PU=Ke(CU(),1),bU=Ke(wU(),1),MU=Ke(YO(),1);import h7 from"path";import T7 from"http";import{Session as v7}from"node:inspector/promises";import{createRequire as rY}from"module";var nc=Ke(kl(),1);import Qi from"path";import rc from"os";var nY=rY(import.meta.url);function qO(t){let e=nY.resolve(t),n=Qi.dirname(e);for(;!nc.default.existsSync(Qi.join(n,"package.json"));)n=Qi.dirname(n);let i=nc.default.readFileSync(Qi.join(n,"package.json"),"utf-8");return JSON.parse(i)}var Zi=class{constructor(e){this.instance=e;let n=qO("@sentio/sdk"),i=qO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=rE.fromPartial(Nl.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Nl.execution.sequential&&(e.bindings=e.bindings.sort(oY));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===rc.constants.errno.ECONNRESET||i.code===rc.constants.errno.ECONNREFUSED||i.code===rc.constants.errno.ECONNABORTED)&&process.exit(1),i}}async*processBindingsStream(e,n){yield*this.instance.processBindingsStream(e,n)}async*preprocessBindingsStream(e,n){yield*this.instance.preprocessBindingsStream(e,n)}adjustResult(e){}adjustDataBinding(e){switch(e.handlerType){case 6:e.data?.aptEvent;break;case 2:e.data?.ethBlock?.block&&(e.data.ethBlock.block.transactions=[]);break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function oY(t,e){let n=jO(t)||new Date(0),i=jO(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:$O(t)-$O(e)}function jO(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function $O(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var At=Ke(a0(),1);function s0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(JSON.stringify(a.message)):s.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let u=o[r];typeof u=="object"?s.push(JSON.stringify(u)):s.push(u)}return a.message=s.join(" "),a}},i=(0,At.createLogger)({format:At.format.combine(At.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,At.format.errors({stack:!0}),t?At.format.json():At.format.simple()),level:e?"debug":"info",transports:[new At.transports.Console]});console.log=(...a)=>i.info.call(i,...a),console.info=(...a)=>i.info.call(i,...a),console.warn=(...a)=>i.warn.call(i,...a),console.error=(...a)=>i.error.call(i,...a),console.debug=(...a)=>i.debug.call(i,...a)}import("node:process").then(t=>t.stdout.write(""));Us();xn();var vU=Ke(MI(),1),mU=Ke(CI(),1),eE=Ke(SU(),1),yU=Ke(TU(),1);gi();b();async function AU(t){t&&g.setLogger(new sE,ot.DEBUG);let e=await ws.detect(),n=new pi({resource:e,readers:[new Js({exporter:new vU.OTLPMetricExporter}),new mU.PrometheusExporter({port:4041})]}),i=new eE.NodeTracerProvider({resource:e}),a=new yU.OTLPTraceExporter,s=new Sr(a);i.addSpanProcessor(s),i.register(),Ci.setGlobalMeterProvider(n),X.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>S7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function S7(){let t=X.getTracerProvider();if(t instanceof cE){let n=t.getDelegate();n instanceof eE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var Al=class{constructor(e){this.loader=e}async listen(e){let n=Ol.INSTANCE;await this.loader(),await n.configure(tE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){Ol.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var m7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],ke=(0,RU.default)(m7,{partial:!0}),y7=process.env.LOG_LEVEL?.toUpperCase();s0(ke["log-format"]==="json",y7==="debug"?!0:ke.debug);console.debug("Starting with",ke.target);await AU(ke.debug);Error.stackTraceLimit=20;var A7=h7.resolve(ke["chains-config"]),O7=gU.default.readJsonSync(A7),g7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,N7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;hr.INSTANCE.concurrency=g7??ke.concurrency;hr.INSTANCE.batchCount=N7??ke["batch-count"];hr.INSTANCE.chainQueryAPI=ke["chainquery-server"];hr.INSTANCE.priceFeedAPI=ke["pricefeed-server"];for(let[t,e]of Object.entries(O7)){let n=e;if(n.ChainServer)hr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?hr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",ke);var jr,Qn,OU=async()=>{let t=await import(ke.target);return console.debug("Module loaded",t),t};if(ke["start-action-server"])jr=new Al(OU),jr.listen(ke.port);else{jr=(0,PU.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":NU.compressionAlgorithms.gzip}).use((0,MU.openTelemetryServerMiddleware)()).use(bU.errorDetailsServerMiddleware),Qn=new dE(OU,jr.shutdown);let t=new Zi(Qn);jr.add(nE,t),jr.listen("0.0.0.0:"+ke.port),console.log("Processor Server Started at:",ke.port)}var xU=4040,R7=T7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),i=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(i.get("t")||"1000",10)||1e3,s=new v7;s.connect(),await s.post("Profiler.enable"),await s.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await s.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),s.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(xU);console.log("Metric Server Started at:",xU);process.on("SIGINT",function(){P7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Qn&&(Qn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Qn&&(Qn.unhandled=t))});function P7(t){jr?.forceShutdown(),console.log("RPC server shut down"),R7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
59
+ `}};qu.PrometheusSerializer=Sd});var II=h($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.PrometheusExporter=void 0;var mi=(b(),Y(Re)),Pz=(K(),Y(Is)),Td=(xn(),Y(Yp)),bz=L("http"),Mz=hd(),xz=L("url"),ju=class t extends Td.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>Td.Aggregation.Default(),aggregationTemporalitySelector:i=>Td.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new xz.URL(i.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=i=>{i.statusCode=200,i.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:s,errors:o}=a;o.length&&mi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(s))},a=>{i.end(`# failed to export metrics: ${a}`)})},this._notFound=i=>{i.statusCode=404,i.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||t.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||t.DEFAULT_OPTIONS.port,this._prefix=e.prefix||t.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:t.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,bz.createServer)(this._requestHandler).unref(),this._serializer=new Mz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,Pz.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};$u.PrometheusExporter=ju;ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var CI=h(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.PrometheusSerializer=Gn.PrometheusExporter=void 0;var Lz=II();Object.defineProperty(Gn,"PrometheusExporter",{enumerable:!0,get:function(){return Lz.PrometheusExporter}});var Iz=hd();Object.defineProperty(Gn,"PrometheusSerializer",{enumerable:!0,get:function(){return Iz.PrometheusSerializer}})});var md=h(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.AbstractAsyncHooksContextManager=void 0;var Cz=L("events"),wz=["addListener","on","once","prependListener","prependOnceListener"],vd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Cz.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...s){return i.with(e,()=>n.apply(this,s))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),a}_bindEventEmitter(e,n){return this._getPatchMap(n)!==void 0||(this._createPatchMap(n),wz.forEach(a=>{n[a]!==void 0&&(n[a]=this._patchAddListener(n,n[a],e))}),typeof n.removeListener=="function"&&(n.removeListener=this._patchRemoveListener(n,n.removeListener)),typeof n.off=="function"&&(n.off=this._patchRemoveListener(n,n.off)),typeof n.removeAllListeners=="function"&&(n.removeAllListeners=this._patchRemoveAllListeners(n,n.removeAllListeners))),n}_patchRemoveListener(e,n){let i=this;return function(a,s){var o;let r=(o=i._getPatchMap(e))===null||o===void 0?void 0:o[a];if(r===void 0)return n.call(this,a,s);let u=r.get(s);return n.call(this,a,u||s)}}_patchRemoveAllListeners(e,n){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]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(s,o){if(a._wrapped)return n.call(this,s,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let u=r[s];u===void 0&&(u=new WeakMap,r[s]=u);let l=a.bind(i,o);u.set(o,l),a._wrapped=!0;try{return n.call(this,s,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Ku.AbstractAsyncHooksContextManager=vd});var wI=h(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.AsyncHooksContextManager=void 0;var Uz=(b(),Y(Re)),Dz=L("async_hooks"),Vz=md(),yd=class extends Vz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=Dz.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:Uz.ROOT_CONTEXT}with(e,n,i,...a){this._enterContext(e);try{return n.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,n){if(n==="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 n=this._contexts.get(e);n!==void 0&&this._enterContext(n)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};Wu.AsyncHooksContextManager=yd});var UI=h(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.AsyncLocalStorageContextManager=void 0;var Bz=(b(),Y(Re)),Gz=L("async_hooks"),kz=md(),Ad=class extends kz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Gz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Bz.ROOT_CONTEXT}with(e,n,i,...a){let s=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};zu.AsyncLocalStorageContextManager=Ad});var DI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.AsyncLocalStorageContextManager=kn.AsyncHooksContextManager=void 0;var Hz=wI();Object.defineProperty(kn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Hz.AsyncHooksContextManager}});var Fz=UI();Object.defineProperty(kn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Fz.AsyncLocalStorageContextManager}})});var Hn,Od=m(()=>{"use strict";b();Hn=$r("OpenTelemetry Context Key B3 Debug Flag")});var Er,Fn,Yn,qn,Xu,jn,yi=m(()=>{"use strict";Er="b3",Fn="x-b3-traceid",Yn="x-b3-spanid",qn="x-b3-sampled",Xu="x-b3-parentspanid",jn="x-b3-flags"});function jz(t){return t===J.SAMPLED||t===J.NONE}function $z(t){return Array.isArray(t)?t[0]:t}function Ju(t,e,n){var i=e.get(t,n);return $z(i)}function Kz(t,e){var n=Ju(t,e,Fn);return typeof n=="string"?n.padStart(32,"0"):""}function Wz(t,e){var n=Ju(t,e,Yn);return typeof n=="string"?n:""}function VI(t,e){var n=Ju(t,e,jn);return n==="1"?"1":void 0}function zz(t,e){var n=Ju(t,e,qn),i=VI(t,e);if(i==="1"||Yz.has(n))return J.SAMPLED;if(n===void 0||qz.has(n))return J.NONE}var Yz,qz,BI,GI=m(()=>{"use strict";b();K();Od();yi();Yz=new Set([!0,"true","True","1",1]),qz=new Set([!1,"false","False","0",0]);BI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn);i.set(n,Fn,a.traceId),i.set(n,Yn,a.spanId),s==="1"?i.set(n,jn,s):a.traceFlags!==void 0&&i.set(n,qn,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=Kz(n,i),s=Wz(n,i),o=zz(n,i),r=VI(n,i);return Gt(a)&&Ii(s)&&jz(o)?(e=e.setValue(Hn,r),X.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Fn,Yn,jn,qn,Xu]},t}()});function tX(t){return t.length===32?t:""+Qz+t}function rX(t){return t&&Zz.has(t)?J.SAMPLED:J.NONE}var Xz,Jz,Qz,Zz,eX,kI,HI=m(()=>{"use strict";b();K();Od();yi();Xz=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Jz=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,Qz="0".repeat(16),Zz=new Set(["d","1"]),eX="d";kI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||be(e))){var s=e.getValue(Hn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,Er,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(Jz);if(!o)return e;var r=Xz(o,4),u=r[1],l=r[2],c=r[3],p=tX(u);if(!Gt(p)||!Ii(l))return e;var _=rX(c);return c===eX&&(e=e.setValue(Hn,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[Er]},t}()});var $n,gd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})($n||($n={}))});var FI,YI=m(()=>{"use strict";K();GI();HI();yi();gd();FI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new BI,this._b3SinglePropagator=new kI,e.injectEncoding===$n.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){be(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,Er),s=Array.isArray(a)?a[0]:a;return s?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var qI={};nt(qI,{B3InjectEncoding:()=>$n,B3Propagator:()=>FI,B3_CONTEXT_HEADER:()=>Er,X_B3_FLAGS:()=>jn,X_B3_PARENT_SPAN_ID:()=>Xu,X_B3_SAMPLED:()=>qn,X_B3_SPAN_ID:()=>Yn,X_B3_TRACE_ID:()=>Fn});var jI=m(()=>{"use strict";YI();yi();gd()});var $I,KI=m(()=>{"use strict";$I="exception"});var Nd,nX,WI,oX,Qu,Rd=m(()=>{"use strict";b();K();jo();KI();Nd=function(){return Nd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Nd.apply(this,arguments)},nX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},WI=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},oX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},Qu=function(){function t(e,n,i,a,s,o,r,u,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:pE.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=s,this.links=r;var p=Date.now();this._performanceStartTime=Ze.now(),this._performanceOffset=p-(this._performanceStartTime+yn()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Wo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=nX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=WI(s.value,2),r=o[0],u=o[1];this.setAttribute(r,u)}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return g.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&g.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Qo(n)&&(Qo(i)||(i=n),n=void 0);var a=or(n);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,oX([],WI(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Nd({},e),this.status.message!=null&&typeof e.message!="string"&&(g.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){g.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=Os(this.startTime,this.endTime),this._duration[0]<0&&(g.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&&g.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<Ze.now())return Jo(e+this._performanceOffset);if(typeof e=="number")return Oe(e);if(e instanceof Date)return Oe(e.getTime());if(An(e))return e;if(this._startTimeProvided)return Oe(Date.now());var n=Ze.now()-this._performanceStartTime;return Zo(this.startTime,Oe(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[ls]=e:e&&(e.code?i[us]=e.code.toString():e.name&&(i[us]=e.name),e.message&&(i[ls]=e.message),e.stack&&(i[u0]=e.stack)),i[us]||i[ls]?this.addEvent($I,i,n):g.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substr(0,n)},t.prototype._truncateToSize=function(e){var n=this,i=this._attributeValueLengthLimit;return i<=0?(g.warn("Attribute value limit must be positive, got "+i),e):typeof e=="string"?this._truncateToLimitUtil(e,i):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,i):a}):e},t}()});var ft,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}))});var _r,Zu=m(()=>{"use strict";Ai();_r=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Mt,el=m(()=>{"use strict";Ai();Mt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Kn,Pd=m(()=>{"use strict";b();K();Zu();el();Kn=function(){function t(e){var n,i,a,s;this._root=e.root,this._root||(he(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Mt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Mt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new _r,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Mt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new _r}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&J.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,s,o):this._localParentNotSampled.shouldSample(e,n,i,a,s,o)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var Oi,bd=m(()=>{"use strict";b();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Gt(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,i=0;i<e.length/8;i++){var a=i*8,s=parseInt(e.slice(a,a+8),16);n=(n^s)>>>0}return n},t}()});function tl(){var t=Ae();return{sampler:Md(iX),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Md(t){switch(t===void 0&&(t=Ae()),t.OTEL_TRACES_SAMPLER){case je.AlwaysOn:return new Mt;case je.AlwaysOff:return new _r;case je.ParentBasedAlwaysOn:return new Kn({root:new Mt});case je.ParentBasedAlwaysOff:return new Kn({root:new _r});case je.TraceIdRatio:return new Oi(zI(t));case je.ParentBasedTraceIdRatio:return new Kn({root:new Oi(zI(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+aX+'".'),new Mt}}function zI(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Wn+"."),Wn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Wn+"."),Wn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Wn+"."),Wn):e}var iX,aX,Wn,xd=m(()=>{"use strict";b();K();Zu();el();Pd();bd();iX=Ae(),aX=je.AlwaysOn,Wn=1});function XI(t){var e={sampler:Md()},n=tl(),i=Object.assign({},n,e,t);return i.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),i.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),i}function JI(t){var e,n,i,a,s,o,r,u,l,c,p,_,f=Object.assign({},t.spanLimits),S=vn();return f.attributeCountLimit=(o=(s=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(i=t.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Ur,f.attributeValueLengthLimit=(_=(p=(c=(u=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&u!==void 0?u:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:wr,Object.assign({},t,{spanLimits:f})}var Ld=m(()=>{"use strict";xd();K()});var QI,ZI=m(()=>{"use strict";b();K();QI=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Ae();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new ur(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(g.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&J.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&g.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(g.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,i){for(var a=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=s;o<r;o++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(i)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,i){var a=setTimeout(function(){i(new Error("Timeout"))},e._exportTimeoutMillis);He.with(hn(He.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(s,function(p){var _;clearTimeout(a),p.code===ee.SUCCESS?n():i((_=p.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,u=0,l=s.length;u<l;u++){var c=s[u];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(p){he(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,he(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),sr(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var sX,Sr,eC=m(()=>{"use strict";ZI();sX=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),Sr=function(t){sX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(QI)});function tC(t){return function(){for(var n=0;n<t/4;n++)rl.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(rl[n]>0);n++)n===t-1&&(rl[t-1]=1);return rl.toString("hex",0,t)}}var uX,rC,zn,rl,nC=m(()=>{"use strict";uX=8,rC=16,zn=function(){function t(){this.generateTraceId=tC(rC),this.generateSpanId=tC(uX)}return t}(),rl=Buffer.allocUnsafe(rC)});var oC=m(()=>{"use strict";eC();nC()});var nl=m(()=>{"use strict";oC()});var ol,iC=m(()=>{"use strict";b();K();Rd();Ld();nl();ol=function(){function t(e,n,i){this._tracerProvider=i;var a=XI(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new zn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,o;n===void 0&&(n={}),i===void 0&&(i=He.active()),n.root&&(i=X.deleteSpan(i));var r=X.getSpan(i);if(be(i)){g.debug("Instrumentation suppressed, returning Noop Span");var u=X.wrapSpanContext(lE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:fE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===Et.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===Et.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=X.wrapSpanContext(N);return u}var D=or(Object.assign(T,A.attributes)),G=new Qu(this,i,e,N,S,f,v,n.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,n,i,a){var s,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(s=n,r=i):(s=n,o=i,r=a);var u=o??He.active(),l=this.startSpan(e,s,u),c=X.setSpan(u,l);return He.with(c,r,void 0,l)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}()});var il,aC,sC=m(()=>{"use strict";K();il=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},aC=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(i).then(function(){r()}).catch(function(u){he(u||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var s=il(this._spanProcessors),o=s.next();!o.done;o=s.next()){var r=o.value;r.onStart(e,n)}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,i=[];try{for(var a=il(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,u){Promise.all(i).then(function(){r()},u)})},t}()});var al,Id=m(()=>{"use strict";al=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}()});var Vt,uC,lC=m(()=>{"use strict";b();K();Us();gi();xd();sC();Id();nl();Ld();(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Vt||(Vt={}));uC=function(){function t(e){e===void 0&&(e={});var n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Ls({},tl(),JI(e));this.resource=(n=i.resource)!==null&&n!==void 0?n:Ut.empty(),this.resource=Ut.default().merge(this.resource),this._config=Object.assign({},i,{resource:this.resource});var a=this._buildExporterFromEnv();if(a!==void 0){var s=new Sr(a);this.activeSpanProcessor=s}else this.activeSpanProcessor=new al}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new ol({name:e,version:n,schemaUrl:i?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return g.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new aC(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),X.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&He.setGlobalContextManager(e.contextManager),e.propagator&&it.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(i){return new Promise(function(a){var s,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Vt.timeout&&(s=Vt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(s){return a([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Ae().OTEL_PROPAGATORS)),i=n.map(function(s){var o=e._getPropagator(s);return o||g.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(s,o){return o&&s.push(o),s},[]);if(a.length!==0)return n.length===1?a[0]:new Ns({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Ae().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Ps}],["baggage",function(){return new _s}]]),t._registeredExporters=new Map,t}()});var lX,cC,fC=m(()=>{"use strict";K();lX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Ot(e.startTime),duration:Ot(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var i,a;try{for(var s=lX(e),o=s.next();!o.done;o=s.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n)return n({code:ee.SUCCESS})},t}()});var cX,fX,pC,dC=m(()=>{"use strict";K();cX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},fX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},pC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,fX([],cX(e),!1)),setTimeout(function(){return n({code:ee.SUCCESS})},0)},t.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.reset=function(){this._finishedSpans=[]},t.prototype.getFinishedSpans=function(){return this._finishedSpans},t}()});var pX,dX,EC,_C=m(()=>{"use strict";b();K();pX=function(t,e,n,i){function a(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function r(c){try{l(i.next(c))}catch(p){o(p)}}function u(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},dX=function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(l){return function(c){return u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=l[0]&2?a.return:l[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,l[1])).done)return s;switch(a=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,a=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},EC=function(){function t(e){this._exporter=e,this._shutdownOnce=new ur(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return pX(this,void 0,void 0,function(){return dX(this,function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){var n=this,i,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&J.SAMPLED){var s=function(){return oi._export(n._exporter,[e]).then(function(r){var u;r.code!==ee.SUCCESS&&he((u=r.error)!==null&&u!==void 0?u:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){he(r)})};if(e.resource.asyncAttributesPending){var o=(a=(i=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(i).then(function(){return o!=null&&n._unresolvedExports.delete(o),s()},function(r){return he(r)});o!=null&&this._unresolvedExports.add(o)}else s()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var Cd={};nt(Cd,{AlwaysOffSampler:()=>_r,AlwaysOnSampler:()=>Mt,BasicTracerProvider:()=>uC,BatchSpanProcessor:()=>Sr,ConsoleSpanExporter:()=>cC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>pC,NoopSpanProcessor:()=>al,ParentBasedSampler:()=>Kn,RandomIdGenerator:()=>zn,SamplingDecision:()=>ft,SimpleSpanProcessor:()=>EC,Span:()=>Qu,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>ol});var gi=m(()=>{"use strict";iC();lC();nl();fC();dC();_C();Id();Zu();el();Pd();bd();Ai();Rd()});var Ni=h((zce,SC)=>{"use strict";var EX="2.0.0",_X=Number.MAX_SAFE_INTEGER||9007199254740991,SX=16,hX=250,TX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];SC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:SX,MAX_SAFE_BUILD_LENGTH:hX,MAX_SAFE_INTEGER:_X,RELEASE_TYPES:TX,SEMVER_SPEC_VERSION:EX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Xce,hC)=>{"use strict";var vX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};hC.exports=vX});var Xn=h((Bt,TC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:wd,MAX_SAFE_BUILD_LENGTH:mX,MAX_LENGTH:yX}=Ni(),AX=Ri();Bt=TC.exports={};var OX=Bt.re=[],gX=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},NX=0,Ud="[a-zA-Z0-9-]",RX=[["\\s",1],["\\d",yX],[Ud,mX]],PX=t=>{for(let[e,n]of RX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=PX(e),a=NX++;AX(t,a,e),P[t]=a,R[a]=e,OX[a]=new RegExp(e,n?"g":void 0),gX[a]=new RegExp(i,n?"g":void 0)};U("NUMERICIDENTIFIER","0|[1-9]\\d*");U("NUMERICIDENTIFIERLOOSE","\\d+");U("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ud}*`);U("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);U("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);U("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);U("BUILDIDENTIFIER",`${Ud}+`);U("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);U("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);U("FULL",`^${R[P.FULLPLAIN]}$`);U("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);U("LOOSE",`^${R[P.LOOSEPLAIN]}$`);U("GTLT","((?:<|>)?=?)");U("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);U("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);U("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);U("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);U("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);U("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);U("COERCEPLAIN",`(^|[^\\d])(\\d{1,${wd}})(?:\\.(\\d{1,${wd}}))?(?:\\.(\\d{1,${wd}}))?`);U("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);U("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);U("COERCERTL",R[P.COERCE],!0);U("COERCERTLFULL",R[P.COERCEFULL],!0);U("LONETILDE","(?:~>?)");U("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";U("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);U("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);U("LONECARET","(?:\\^)");U("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";U("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);U("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);U("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);U("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);U("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";U("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);U("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);U("STAR","(<|>)?=?\\s*\\*");U("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");U("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var sl=h((Jce,vC)=>{"use strict";var bX=Object.freeze({loose:!0}),MX=Object.freeze({}),xX=t=>t?typeof t!="object"?bX:t:MX;vC.exports=xX});var Dd=h((Qce,AC)=>{"use strict";var mC=/^[0-9]+$/,yC=(t,e)=>{let n=mC.test(t),i=mC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},LX=(t,e)=>yC(e,t);AC.exports={compareIdentifiers:yC,rcompareIdentifiers:LX}});var Me=h((Zce,RC)=>{"use strict";var ul=Ri(),{MAX_LENGTH:OC,MAX_SAFE_INTEGER:ll}=Ni(),{safeRe:gC,t:NC}=Xn(),IX=sl(),{compareIdentifiers:Jn}=Dd(),Vd=class t{constructor(e,n){if(n=IX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.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>OC)throw new TypeError(`version is longer than ${OC} characters`);ul("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?gC[NC.LOOSE]:gC[NC.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>ll||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ll||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ll||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<ll)return s}return a}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(ul("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Jn(this.major,e.major)||Jn(this.minor,e.minor)||Jn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(ul("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(ul("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Jn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let s=[n,a];i===!1&&(s=[n]),Jn(this.prerelease[0],n)===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}};RC.exports=Vd});var Yr=h((efe,bC)=>{"use strict";var PC=Me(),CX=(t,e,n=!1)=>{if(t instanceof PC)return t;try{return new PC(t,e)}catch(i){if(!n)return null;throw i}};bC.exports=CX});var xC=h((tfe,MC)=>{"use strict";var wX=Yr(),UX=(t,e)=>{let n=wX(t,e);return n?n.version:null};MC.exports=UX});var IC=h((rfe,LC)=>{"use strict";var DX=Yr(),VX=(t,e)=>{let n=DX(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};LC.exports=VX});var UC=h((nfe,wC)=>{"use strict";var CC=Me(),BX=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new CC(t instanceof CC?t.version:t,n).inc(e,i,a).version}catch{return null}};wC.exports=BX});var BC=h((ofe,VC)=>{"use strict";var DC=Yr(),GX=(t,e)=>{let n=DC(t,null,!0),i=DC(e,null,!0),a=n.compare(i);if(a===0)return null;let s=a>0,o=s?n:i,r=s?i:n,u=!!o.prerelease.length;if(!!r.prerelease.length&&!u)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=u?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};VC.exports=GX});var kC=h((ife,GC)=>{"use strict";var kX=Me(),HX=(t,e)=>new kX(t,e).major;GC.exports=HX});var FC=h((afe,HC)=>{"use strict";var FX=Me(),YX=(t,e)=>new FX(t,e).minor;HC.exports=YX});var qC=h((sfe,YC)=>{"use strict";var qX=Me(),jX=(t,e)=>new qX(t,e).patch;YC.exports=jX});var $C=h((ufe,jC)=>{"use strict";var $X=Yr(),KX=(t,e)=>{let n=$X(t,e);return n&&n.prerelease.length?n.prerelease:null};jC.exports=KX});var tt=h((lfe,WC)=>{"use strict";var KC=Me(),WX=(t,e,n)=>new KC(t,n).compare(new KC(e,n));WC.exports=WX});var XC=h((cfe,zC)=>{"use strict";var zX=tt(),XX=(t,e,n)=>zX(e,t,n);zC.exports=XX});var QC=h((ffe,JC)=>{"use strict";var JX=tt(),QX=(t,e)=>JX(t,e,!0);JC.exports=QX});var cl=h((pfe,ew)=>{"use strict";var ZC=Me(),ZX=(t,e,n)=>{let i=new ZC(t,n),a=new ZC(e,n);return i.compare(a)||i.compareBuild(a)};ew.exports=ZX});var rw=h((dfe,tw)=>{"use strict";var eJ=cl(),tJ=(t,e)=>t.sort((n,i)=>eJ(n,i,e));tw.exports=tJ});var ow=h((Efe,nw)=>{"use strict";var rJ=cl(),nJ=(t,e)=>t.sort((n,i)=>rJ(i,n,e));nw.exports=nJ});var Pi=h((_fe,iw)=>{"use strict";var oJ=tt(),iJ=(t,e,n)=>oJ(t,e,n)>0;iw.exports=iJ});var fl=h((Sfe,aw)=>{"use strict";var aJ=tt(),sJ=(t,e,n)=>aJ(t,e,n)<0;aw.exports=sJ});var Bd=h((hfe,sw)=>{"use strict";var uJ=tt(),lJ=(t,e,n)=>uJ(t,e,n)===0;sw.exports=lJ});var Gd=h((Tfe,uw)=>{"use strict";var cJ=tt(),fJ=(t,e,n)=>cJ(t,e,n)!==0;uw.exports=fJ});var pl=h((vfe,lw)=>{"use strict";var pJ=tt(),dJ=(t,e,n)=>pJ(t,e,n)>=0;lw.exports=dJ});var dl=h((mfe,cw)=>{"use strict";var EJ=tt(),_J=(t,e,n)=>EJ(t,e,n)<=0;cw.exports=_J});var kd=h((yfe,fw)=>{"use strict";var SJ=Bd(),hJ=Gd(),TJ=Pi(),vJ=pl(),mJ=fl(),yJ=dl(),AJ=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return SJ(t,n,i);case"!=":return hJ(t,n,i);case">":return TJ(t,n,i);case">=":return vJ(t,n,i);case"<":return mJ(t,n,i);case"<=":return yJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};fw.exports=AJ});var dw=h((Afe,pw)=>{"use strict";var OJ=Me(),gJ=Yr(),{safeRe:El,t:_l}=Xn(),NJ=(t,e)=>{if(t instanceof OJ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?El[_l.COERCEFULL]:El[_l.COERCE]);else{let u=e.includePrerelease?El[_l.COERCERTLFULL]:El[_l.COERCERTL],l;for(;(l=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",s=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return gJ(`${i}.${a}.${s}${o}${r}`,e)};pw.exports=NJ});var _w=h((Ofe,Ew)=>{"use strict";var Hd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,n)}return this}};Ew.exports=Hd});var rt=h((gfe,vw)=>{"use strict";var Fd=class t{constructor(e,n){if(n=PJ(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Yd)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),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=>!hw(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&&wJ(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&IJ)|(this.options.loose&&CJ))+":"+e,a=Sw.get(i);if(a)return a;let s=this.options.loose,o=s?$e[Ve.HYPHENRANGELOOSE]:$e[Ve.HYPHENRANGE];e=e.replace(o,qJ(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace($e[Ve.COMPARATORTRIM],MJ),te("comparator trim",e),e=e.replace($e[Ve.TILDETRIM],xJ),te("tilde trim",e),e=e.replace($e[Ve.CARETTRIM],LJ),te("caret trim",e);let r=e.split(" ").map(p=>UJ(p,this.options)).join(" ").split(/\s+/).map(p=>YJ(p,this.options));s&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match($e[Ve.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(p=>new Yd(p,this.options));for(let p of l){if(hw(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return Sw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>Tw(i,n)&&e.set.some(a=>Tw(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new bJ(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(jJ(this.set[n],e,this.options))return!0;return!1}};vw.exports=Fd;var RJ=_w(),Sw=new RJ,PJ=sl(),Yd=bi(),te=Ri(),bJ=Me(),{safeRe:$e,t:Ve,comparatorTrimReplace:MJ,tildeTrimReplace:xJ,caretTrimReplace:LJ}=Xn(),{FLAG_INCLUDE_PRERELEASE:IJ,FLAG_LOOSE:CJ}=Ni(),hw=t=>t.value==="<0.0.0-0",wJ=t=>t.value==="",Tw=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(s=>a.intersects(s,e)),a=i.pop();return n},UJ=(t,e)=>(te("comp",t,e),t=BJ(t,e),te("caret",t),t=DJ(t,e),te("tildes",t),t=kJ(t,e),te("xrange",t),t=FJ(t,e),te("stars",t),t),Be=t=>!t||t.toLowerCase()==="x"||t==="*",DJ=(t,e)=>t.trim().split(/\s+/).map(n=>VJ(n,e)).join(" "),VJ=(t,e)=>{let n=e.loose?$e[Ve.TILDELOOSE]:$e[Ve.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return Be(a)?u="":Be(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:Be(o)?u=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(te("replaceTilde pr",r),u=`>=${a}.${s}.${o}-${r} <${a}.${+s+1}.0-0`):u=`>=${a}.${s}.${o} <${a}.${+s+1}.0-0`,te("tilde return",u),u})},BJ=(t,e)=>t.trim().split(/\s+/).map(n=>GJ(n,e)).join(" "),GJ=(t,e)=>{te("caret",t,e);let n=e.loose?$e[Ve.CARETLOOSE]:$e[Ve.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return Be(s)?l="":Be(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Be(r)?s==="0"?l=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:u?(te("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${r}-${u} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r}-${u} <${+s+1}.0.0-0`):(te("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${r}${i} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r} <${+s+1}.0.0-0`),te("caret return",l),l})},kJ=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>HJ(n,e)).join(" ")),HJ=(t,e)=>{t=t.trim();let n=e.loose?$e[Ve.XRANGELOOSE]:$e[Ve.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=Be(s),c=l||Be(o),p=c||Be(r),_=p;return a==="="&&_&&(a=""),u=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(s=+s+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?s=+s+1:o=+o+1),a==="<"&&(u="-0"),i=`${a+s}.${o}.${r}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:p&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},FJ=(t,e)=>(te("replaceStars",t,e),t.trim().replace($e[Ve.STAR],"")),YJ=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace($e[e.includePrerelease?Ve.GTE0PRE:Ve.GTE0],"")),qJ=t=>(e,n,i,a,s,o,r,u,l,c,p,_)=>(Be(i)?n="":Be(a)?n=`>=${i}.0.0${t?"-0":""}`:Be(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Be(l)?u="":Be(c)?u=`<${+l+1}.0.0-0`:Be(p)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${p}-${_}`:t?u=`<${l}.${c}.${+p+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),jJ=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==Yd.ANY&&t[i].semver.prerelease.length>0){let a=t[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var bi=h((Nfe,Nw)=>{"use strict";var Mi=Symbol("SemVer ANY"),$d=class t{static get ANY(){return Mi}constructor(e,n){if(n=mw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),jd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Mi?this.value="":this.value=this.operator+this.semver.version,jd("comp",this)}parse(e){let n=this.options.loose?yw[Aw.COMPARATORLOOSE]:yw[Aw.COMPARATOR],i=e.match(n);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 Ow(i[2],this.options.loose):this.semver=Mi}toString(){return this.value}test(e){if(jd("Comparator.test",e,this.options.loose),this.semver===Mi||e===Mi)return!0;if(typeof e=="string")try{e=new Ow(e,this.options)}catch{return!1}return qd(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new gw(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new gw(this.value,n).test(e.semver):(n=mw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.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("=")||qd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||qd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Nw.exports=$d;var mw=sl(),{safeRe:yw,t:Aw}=Xn(),qd=kd(),jd=Ri(),Ow=Me(),gw=rt()});var xi=h((Rfe,Rw)=>{"use strict";var $J=rt(),KJ=(t,e,n)=>{try{e=new $J(e,n)}catch{return!1}return e.test(t)};Rw.exports=KJ});var bw=h((Pfe,Pw)=>{"use strict";var WJ=rt(),zJ=(t,e)=>new WJ(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Pw.exports=zJ});var xw=h((bfe,Mw)=>{"use strict";var XJ=Me(),JJ=rt(),QJ=(t,e,n)=>{let i=null,a=null,s=null;try{s=new JJ(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new XJ(i,n))}),i};Mw.exports=QJ});var Iw=h((Mfe,Lw)=>{"use strict";var ZJ=Me(),e9=rt(),t9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new e9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new ZJ(i,n))}),i};Lw.exports=t9});var Uw=h((xfe,ww)=>{"use strict";var Kd=Me(),r9=rt(),Cw=Pi(),n9=(t,e)=>{t=new r9(t,e);let n=new Kd("0.0.0");if(t.test(n)||(n=new Kd("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let a=t.set[i],s=null;a.forEach(o=>{let r=new Kd(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||Cw(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||Cw(n,s))&&(n=s)}return n&&t.test(n)?n:null};ww.exports=n9});var Vw=h((Lfe,Dw)=>{"use strict";var o9=rt(),i9=(t,e)=>{try{return new o9(t,e).range||"*"}catch{return null}};Dw.exports=i9});var Sl=h((Ife,Hw)=>{"use strict";var a9=Me(),kw=bi(),{ANY:s9}=kw,u9=rt(),l9=xi(),Bw=Pi(),Gw=fl(),c9=dl(),f9=pl(),p9=(t,e,n,i)=>{t=new a9(t,i),e=new u9(e,i);let a,s,o,r,u;switch(n){case">":a=Bw,s=c9,o=Gw,r=">",u=">=";break;case"<":a=Gw,s=f9,o=Bw,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===s9&&(f=new kw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};Hw.exports=p9});var Yw=h((Cfe,Fw)=>{"use strict";var d9=Sl(),E9=(t,e,n)=>d9(t,e,">",n);Fw.exports=E9});var jw=h((wfe,qw)=>{"use strict";var _9=Sl(),S9=(t,e,n)=>_9(t,e,"<",n);qw.exports=S9});var Ww=h((Ufe,Kw)=>{"use strict";var $w=rt(),h9=(t,e,n)=>(t=new $w(t,n),e=new $w(e,n),t.intersects(e,n));Kw.exports=h9});var Xw=h((Dfe,zw)=>{"use strict";var T9=xi(),v9=tt();zw.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,p)=>v9(c,p,n));for(let c of o)T9(c,e,n)?(s=c,a||(a=c)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var rU=h((Vfe,tU)=>{"use strict";var Jw=rt(),zd=bi(),{ANY:Wd}=zd,Li=xi(),Xd=tt(),m9=(t,e,n={})=>{if(t===e)return!0;t=new Jw(t,n),e=new Jw(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=A9(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},y9=[new zd(">=0.0.0-0")],Qw=[new zd(">=0.0.0")],A9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Wd){if(e.length===1&&e[0].semver===Wd)return!0;n.includePrerelease?t=y9:t=Qw}if(e.length===1&&e[0].semver===Wd){if(n.includePrerelease)return!0;e=Qw}let i=new Set,a,s;for(let f of t)f.operator===">"||f.operator===">="?a=Zw(a,f,n):f.operator==="<"||f.operator==="<="?s=eU(s,f,n):i.add(f.semver);if(i.size>1)return null;let o;if(a&&s){if(o=Xd(a.semver,s.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let f of i){if(a&&!Li(f,String(a),n)||s&&!Li(f,String(s),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,u,l,c,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=Zw(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(s){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(u=eU(s,f,n),u===f&&u!==s)return!1}else if(s.operator==="<="&&!Li(s.semver,String(f),n))return!1}if(!f.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||p)},Zw=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},eU=(t,e,n)=>{if(!t)return e;let i=Xd(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};tU.exports=m9});var aU=h((Bfe,iU)=>{"use strict";var Jd=Xn(),nU=Ni(),O9=Me(),oU=Dd(),g9=Yr(),N9=xC(),R9=IC(),P9=UC(),b9=BC(),M9=kC(),x9=FC(),L9=qC(),I9=$C(),C9=tt(),w9=XC(),U9=QC(),D9=cl(),V9=rw(),B9=ow(),G9=Pi(),k9=fl(),H9=Bd(),F9=Gd(),Y9=pl(),q9=dl(),j9=kd(),$9=dw(),K9=bi(),W9=rt(),z9=xi(),X9=bw(),J9=xw(),Q9=Iw(),Z9=Uw(),e7=Vw(),t7=Sl(),r7=Yw(),n7=jw(),o7=Ww(),i7=Xw(),a7=rU();iU.exports={parse:g9,valid:N9,clean:R9,inc:P9,diff:b9,major:M9,minor:x9,patch:L9,prerelease:I9,compare:C9,rcompare:w9,compareLoose:U9,compareBuild:D9,sort:V9,rsort:B9,gt:G9,lt:k9,eq:H9,neq:F9,gte:Y9,lte:q9,cmp:j9,coerce:$9,Comparator:K9,Range:W9,satisfies:z9,toComparators:X9,maxSatisfying:J9,minSatisfying:Q9,minVersion:Z9,validRange:e7,outside:t7,gtr:r7,ltr:n7,intersects:o7,simplifyRange:i7,subset:a7,SemVer:O9,re:Jd.re,src:Jd.src,tokens:Jd.t,SEMVER_SPEC_VERSION:nU.SEMVER_SPEC_VERSION,RELEASE_TYPES:nU.RELEASE_TYPES,compareIdentifiers:oU.compareIdentifiers,rcompareIdentifiers:oU.rcompareIdentifiers}});function u7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=uU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=s7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var sU,uU,Qd,hl,lU,s7,cU=m(()=>{"use strict";b();K();sU=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uU=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},Qd="uber-trace-id",hl="uberctx",lU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=hl):(this._jaegerTraceHeader=e?.customTraceHeader||Qd,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||hl)}return t.prototype.inject=function(e,n,i){var a,s,o=X.getSpanContext(e),r=it.getBaggage(e);if(o&&be(e)===!1){var u="0"+(o.traceFlags||J.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=sU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=uU(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,s,o=this,r,u=i.get(n,this._jaegerTraceHeader),l=Array.isArray(u)?u[0]:u,c=i.keys(n).filter(function(A){return A.startsWith(o._jaegerBaggageHeaderPrefix+"-")}).map(function(A){var O=i.get(n,A);return{key:A.substring(o._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(O)?O[0]:O}}),p=e;if(typeof l=="string"){var _=u7(l);_&&(p=X.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=it.getBaggage(e))!==null&&r!==void 0?r:it.createBaggage();try{for(var S=sU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return p=it.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),s7=/^[0-9a-f]{1,2}$/i});var fU={};nt(fU,{JaegerPropagator:()=>lU,UBER_BAGGAGE_HEADER_PREFIX:()=>hl,UBER_TRACE_ID_HEADER:()=>Qd});var pU=m(()=>{"use strict";cU()});var _U=h(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.NodeTracerProvider=void 0;var dU=DI(),Tl=(jI(),Y(qI)),EU=(gi(),Y(Cd)),l7=aU(),c7=(pU(),Y(fU)),vl=class extends EU.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=l7.gte(process.version,"14.8.0")?dU.AsyncLocalStorageContextManager:dU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};ml.NodeTracerProvider=vl;vl._registeredPropagators=new Map([...EU.BasicTracerProvider._registeredPropagators,["b3",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new Tl.B3Propagator({injectEncoding:Tl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new c7.JaegerPropagator]])});var SU=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Tracer=q.TraceIdRatioBasedSampler=q.Span=q.SimpleSpanProcessor=q.SamplingDecision=q.RandomIdGenerator=q.ParentBasedSampler=q.NoopSpanProcessor=q.InMemorySpanExporter=q.ForceFlushState=q.ConsoleSpanExporter=q.BatchSpanProcessor=q.BasicTracerProvider=q.AlwaysOnSampler=q.AlwaysOffSampler=q.NodeTracerProvider=void 0;var f7=_U();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return f7.NodeTracerProvider}});var Ge=(gi(),Y(Cd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return Ge.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return Ge.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return Ge.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return Ge.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return Ge.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return Ge.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return Ge.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return Ge.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return Ge.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return Ge.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return Ge.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return Ge.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return Ge.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return Ge.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return Ge.Tracer}})});var hU=h(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.OTLPTraceExporter=void 0;var p7=fd(),d7=(Cu(),Y(id)),Zd=class extends p7.OTLPGRPCExporterNodeBase{constructor(e={}){super(e,d7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export","TRACES")}};yl.OTLPTraceExporter=Zd});var TU=h(qr=>{"use strict";var E7=qr&&qr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),_7=qr&&qr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&E7(e,t,n)};Object.defineProperty(qr,"__esModule",{value:!0});_7(hU(),qr)});var gU=Ke(kl(),1),NU=Ke(Zn(),1),RU=Ke(_S(),1),PU=Ke(CU(),1),bU=Ke(wU(),1),MU=Ke(YO(),1);import h7 from"path";import T7 from"http";import{Session as v7}from"node:inspector/promises";import{createRequire as rY}from"module";var nc=Ke(kl(),1);import Qi from"path";import rc from"os";var nY=rY(import.meta.url);function qO(t){let e=nY.resolve(t),n=Qi.dirname(e);for(;!nc.default.existsSync(Qi.join(n,"package.json"));)n=Qi.dirname(n);let i=nc.default.readFileSync(Qi.join(n,"package.json"),"utf-8");return JSON.parse(i)}var Zi=class{constructor(e){this.instance=e;let n=qO("@sentio/sdk"),i=qO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=rE.fromPartial(Nl.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Nl.execution.sequential&&(e.bindings=e.bindings.sort(oY));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===rc.constants.errno.ECONNRESET||i.code===rc.constants.errno.ECONNREFUSED||i.code===rc.constants.errno.ECONNABORTED)&&process.exit(1),i}}async*processBindingsStream(e,n){yield*this.instance.processBindingsStream(e,n)}async*preprocessBindingsStream(e,n){yield*this.instance.preprocessBindingsStream(e,n)}adjustResult(e){}adjustDataBinding(e){switch(e.handlerType){case 6:e.data?.aptEvent;break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function oY(t,e){let n=jO(t)||new Date(0),i=jO(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:$O(t)-$O(e)}function jO(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function $O(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var At=Ke(a0(),1);function s0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(JSON.stringify(a.message)):s.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let u=o[r];typeof u=="object"?s.push(JSON.stringify(u)):s.push(u)}return a.message=s.join(" "),a}},i=(0,At.createLogger)({format:At.format.combine(At.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,At.format.errors({stack:!0}),t?At.format.json():At.format.simple()),level:e?"debug":"info",transports:[new At.transports.Console]});console.log=(...a)=>i.info.call(i,...a),console.info=(...a)=>i.info.call(i,...a),console.warn=(...a)=>i.warn.call(i,...a),console.error=(...a)=>i.error.call(i,...a),console.debug=(...a)=>i.debug.call(i,...a)}import("node:process").then(t=>t.stdout.write(""));Us();xn();var vU=Ke(MI(),1),mU=Ke(CI(),1),eE=Ke(SU(),1),yU=Ke(TU(),1);gi();b();async function AU(t){t&&g.setLogger(new sE,ot.DEBUG);let e=await ws.detect(),n=new pi({resource:e,readers:[new Js({exporter:new vU.OTLPMetricExporter}),new mU.PrometheusExporter({port:4041})]}),i=new eE.NodeTracerProvider({resource:e}),a=new yU.OTLPTraceExporter,s=new Sr(a);i.addSpanProcessor(s),i.register(),Ci.setGlobalMeterProvider(n),X.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>S7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function S7(){let t=X.getTracerProvider();if(t instanceof cE){let n=t.getDelegate();n instanceof eE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var Al=class{constructor(e){this.loader=e}async listen(e){let n=Ol.INSTANCE;await this.loader(),await n.configure(tE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){Ol.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var m7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],ke=(0,RU.default)(m7,{partial:!0}),y7=process.env.LOG_LEVEL?.toUpperCase();s0(ke["log-format"]==="json",y7==="debug"?!0:ke.debug);console.debug("Starting with",ke.target);await AU(ke.debug);Error.stackTraceLimit=20;var A7=h7.resolve(ke["chains-config"]),O7=gU.default.readJsonSync(A7),g7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,N7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;hr.INSTANCE.concurrency=g7??ke.concurrency;hr.INSTANCE.batchCount=N7??ke["batch-count"];hr.INSTANCE.chainQueryAPI=ke["chainquery-server"];hr.INSTANCE.priceFeedAPI=ke["pricefeed-server"];for(let[t,e]of Object.entries(O7)){let n=e;if(n.ChainServer)hr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?hr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",ke);var jr,Qn,OU=async()=>{let t=await import(ke.target);return console.debug("Module loaded",t),t};if(ke["start-action-server"])jr=new Al(OU),jr.listen(ke.port);else{jr=(0,PU.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":NU.compressionAlgorithms.gzip}).use((0,MU.openTelemetryServerMiddleware)()).use(bU.errorDetailsServerMiddleware),Qn=new dE(OU,jr.shutdown);let t=new Zi(Qn);jr.add(nE,t),jr.listen("0.0.0.0:"+ke.port),console.log("Processor Server Started at:",ke.port)}var xU=4040,R7=T7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),i=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(i.get("t")||"1000",10)||1e3,s=new v7;s.connect(),await s.post("Profiler.enable"),await s.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await s.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),s.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(xU);console.log("Metric Server Started at:",xU);process.on("SIGINT",function(){P7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Qn&&(Qn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Qn&&(Qn.unhandled=t))});function P7(t){jr?.forceShutdown(),console.log("RPC server shut down"),R7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
60
60
  /*! Bundled license information:
61
61
 
62
62
  safe-buffer/index.js: