@sentio/runtime 2.44.1 → 2.44.2-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.
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
2
- import{V as N,W as C,X as V,Y as w,Z as O,_ as A,g as u,i as T,j as l,m,n as h,o as f,p as x,q as d,y as c}from"./chunk-6XTFFVM5.js";var r=class{stateMap=new Map;static reset(){r.INSTANCE=new r}},e=r;u(e,"INSTANCE",new r);var n=class{constructor(){}key(){return this.constructor.name}getOrRegister(){let t=e.INSTANCE.stateMap.get(this.key());return t||(t=this.initValue(),e.INSTANCE.stateMap.set(this.key(),t)),t}unregister(){let t=e.INSTANCE.stateMap.get(this.key());return e.INSTANCE.stateMap.delete(this.key()),t}},g=class extends n{initValue(){return new Map}getValue(t){return this.getOrRegister().get(t)}getValues(){let t=this.getOrRegister();return Array.from(t.values())}getOrSetValue(t,s){let o=this.getOrRegister(),a=o.get(t);return a?(console.warn(t,"has been registered twice, use the previous one"),a):(o.set(t,s),s)}},p=class extends n{initValue(){return[]}getValues(){return this.getOrRegister()}addValue(t){return this.getOrRegister().push(t),t}};process.stdout.write("");process.stdout.write("");process.stdout.write("");export{V as DummyProvider,d as Endpoints,c as GLOBAL_CONFIG,p as ListStateStorage,g as MapStateStorage,T as Plugin,l as PluginManager,A as ProcessorServiceImpl,O as QueuedStaticJsonRpcProvider,e as State,n as StateStorage,C as StoreContext,f as USER_PROCESSOR,h as errorString,w as getProvider,x as makeEthCallKey,m as mergeProcessResults,N as timeoutError};
2
+ import{V as N,W as C,X as V,Y as w,Z as O,_ as A,g as u,i as T,j as m,m as h,n as l,o as f,p as x,q as d,y as c}from"./chunk-OIJYNZ76.js";var s=class{stateMap=new Map;static reset(){s.INSTANCE=new s}},r=s;u(r,"INSTANCE",new s);var i=class{constructor(){}key(){return this.constructor.name}getOrRegister(){let t=r.INSTANCE.stateMap.get(this.key());return t||(t=this.initValue(),r.INSTANCE.stateMap.set(this.key(),t)),t}unregister(){let t=r.INSTANCE.stateMap.get(this.key());return r.INSTANCE.stateMap.delete(this.key()),t}},g=class extends i{initValue(){return new Map}getValue(t){return this.getOrRegister().get(t)}getValues(){let t=this.getOrRegister();return Array.from(t.values())}getOrSetValue(t,n){let o=this.getOrRegister(),a=o.get(t);return a?(console.warn(t,"has been registered twice, use the previous one"),a):(o.set(t,n),n)}},p=class extends i{initValue(){return[]}getValues(){return this.getOrRegister()}addValue(t){return this.getOrRegister().push(t),t}};import("process").then(e=>e.stdout.write(""));import("process").then(e=>e.stdout.write(""));import("process").then(e=>e.stdout.write(""));export{V as DummyProvider,d as Endpoints,c as GLOBAL_CONFIG,p as ListStateStorage,g as MapStateStorage,T as Plugin,m as PluginManager,A as ProcessorServiceImpl,O as QueuedStaticJsonRpcProvider,r as State,i as StateStorage,C as StoreContext,f as USER_PROCESSOR,l as errorString,w as getProvider,x as makeEthCallKey,h as mergeProcessResults,N as timeoutError};
3
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/state.ts","../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export class State {\n stateMap = new Map<string, any>()\n\n static INSTANCE = new State()\n\n static reset() {\n State.INSTANCE = new State()\n }\n}\n\nexport abstract class StateStorage<T> {\n // TODO learn how to define single instance for all subclasses\n\n protected constructor() {\n //\n }\n\n abstract initValue(): T\n\n key(): string {\n return this.constructor.name\n }\n\n getOrRegister(): T {\n let metricState: T = State.INSTANCE.stateMap.get(this.key())\n if (!metricState) {\n metricState = this.initValue()\n State.INSTANCE.stateMap.set(this.key(), metricState)\n }\n return metricState\n }\n\n unregister(): T {\n const value = State.INSTANCE.stateMap.get(this.key())\n State.INSTANCE.stateMap.delete(this.key())\n return value\n }\n}\n\nexport abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {\n initValue() {\n return new Map<string, T>()\n }\n\n getValue(key: string): T | undefined {\n const m = this.getOrRegister()\n return m.get(key)\n }\n\n getValues(): T[] {\n const m = this.getOrRegister()\n return Array.from(m.values())\n }\n\n getOrSetValue(key: string, value: T): T {\n const m = this.getOrRegister()\n const oldValue = m.get(key)\n if (oldValue) {\n console.warn(key, 'has been registered twice, use the previous one')\n return oldValue\n }\n m.set(key, value)\n return value\n }\n}\n\nexport abstract class ListStateStorage<T> extends StateStorage<T[]> {\n initValue() {\n return []\n }\n\n getValues(): T[] {\n return this.getOrRegister()\n }\n\n addValue(value: T): T {\n const m = this.getOrRegister()\n m.push(value)\n return value\n }\n}\n;process.stdout.write(\"\");","export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;process.stdout.write(\"\");","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\n;process.stdout.write(\"\");"],"mappings":";qIAAO,IAAMA,EAAN,KAAY,CACjB,SAAW,IAAI,IAIf,OAAO,OAAQ,CACbA,EAAM,SAAW,IAAIA,CACvB,CACF,EARaC,EAAND,EAGLE,EAHWD,EAGJ,WAAW,IAAID,GAOjB,IAAeG,EAAf,KAA+B,CAG1B,aAAc,CAExB,CAIA,KAAc,CACZ,OAAO,KAAK,YAAY,IAC1B,CAEA,eAAmB,CACjB,IAAIC,EAAiBH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EAC3D,OAAKG,IACHA,EAAc,KAAK,UAAU,EAC7BH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,EAAGG,CAAW,GAE9CA,CACT,CAEA,YAAgB,CACd,IAAMC,EAAQJ,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EACpD,OAAAA,EAAM,SAAS,SAAS,OAAO,KAAK,IAAI,CAAC,EAClCI,CACT,CACF,EAEsBC,EAAf,cAA0CH,CAA6B,CAC5E,WAAY,CACV,OAAO,IAAI,GACb,CAEA,SAASI,EAA4B,CAEnC,OADU,KAAK,cAAc,EACpB,IAAIA,CAAG,CAClB,CAEA,WAAiB,CACf,IAAMC,EAAI,KAAK,cAAc,EAC7B,OAAO,MAAM,KAAKA,EAAE,OAAO,CAAC,CAC9B,CAEA,cAAcD,EAAaF,EAAa,CACtC,IAAMG,EAAI,KAAK,cAAc,EACvBC,EAAWD,EAAE,IAAID,CAAG,EAC1B,OAAIE,GACF,QAAQ,KAAKF,EAAK,iDAAiD,EAC5DE,IAETD,EAAE,IAAID,EAAKF,CAAK,EACTA,EACT,CACF,EAEsBK,EAAf,cAA2CP,CAAkB,CAClE,WAAY,CACV,MAAO,CAAC,CACV,CAEA,WAAiB,CACf,OAAO,KAAK,cAAc,CAC5B,CAEA,SAASE,EAAa,CAEpB,OADU,KAAK,cAAc,EAC3B,KAAKA,CAAK,EACLA,CACT,CACF,EACC,QAAQ,OAAO,MAAM,EAAE,EC5EvB,QAAQ,OAAO,MAAM,EAAE,ECIvB,QAAQ,OAAO,MAAM,EAAE","names":["_State","State","__publicField","StateStorage","metricState","value","MapStateStorage","key","m","oldValue","ListStateStorage"]}
1
+ {"version":3,"sources":["../src/state.ts","../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export class State {\n stateMap = new Map<string, any>()\n\n static INSTANCE = new State()\n\n static reset() {\n State.INSTANCE = new State()\n }\n}\n\nexport abstract class StateStorage<T> {\n // TODO learn how to define single instance for all subclasses\n\n protected constructor() {\n //\n }\n\n abstract initValue(): T\n\n key(): string {\n return this.constructor.name\n }\n\n getOrRegister(): T {\n let metricState: T = State.INSTANCE.stateMap.get(this.key())\n if (!metricState) {\n metricState = this.initValue()\n State.INSTANCE.stateMap.set(this.key(), metricState)\n }\n return metricState\n }\n\n unregister(): T {\n const value = State.INSTANCE.stateMap.get(this.key())\n State.INSTANCE.stateMap.delete(this.key())\n return value\n }\n}\n\nexport abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {\n initValue() {\n return new Map<string, T>()\n }\n\n getValue(key: string): T | undefined {\n const m = this.getOrRegister()\n return m.get(key)\n }\n\n getValues(): T[] {\n const m = this.getOrRegister()\n return Array.from(m.values())\n }\n\n getOrSetValue(key: string, value: T): T {\n const m = this.getOrRegister()\n const oldValue = m.get(key)\n if (oldValue) {\n console.warn(key, 'has been registered twice, use the previous one')\n return oldValue\n }\n m.set(key, value)\n return value\n }\n}\n\nexport abstract class ListStateStorage<T> extends StateStorage<T[]> {\n initValue() {\n return []\n }\n\n getValues(): T[] {\n return this.getOrRegister()\n }\n\n addValue(value: T): T {\n const m = this.getOrRegister()\n m.push(value)\n return value\n }\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";0IAAO,IAAMA,EAAN,KAAY,CACjB,SAAW,IAAI,IAIf,OAAO,OAAQ,CACbA,EAAM,SAAW,IAAIA,CACvB,CACF,EARaC,EAAND,EAGLE,EAHWD,EAGJ,WAAW,IAAID,GAOjB,IAAeG,EAAf,KAA+B,CAG1B,aAAc,CAExB,CAIA,KAAc,CACZ,OAAO,KAAK,YAAY,IAC1B,CAEA,eAAmB,CACjB,IAAIC,EAAiBH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EAC3D,OAAKG,IACHA,EAAc,KAAK,UAAU,EAC7BH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,EAAGG,CAAW,GAE9CA,CACT,CAEA,YAAgB,CACd,IAAMC,EAAQJ,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EACpD,OAAAA,EAAM,SAAS,SAAS,OAAO,KAAK,IAAI,CAAC,EAClCI,CACT,CACF,EAEsBC,EAAf,cAA0CH,CAA6B,CAC5E,WAAY,CACV,OAAO,IAAI,GACb,CAEA,SAASI,EAA4B,CAEnC,OADU,KAAK,cAAc,EACpB,IAAIA,CAAG,CAClB,CAEA,WAAiB,CACf,IAAMC,EAAI,KAAK,cAAc,EAC7B,OAAO,MAAM,KAAKA,EAAE,OAAO,CAAC,CAC9B,CAEA,cAAcD,EAAaF,EAAa,CACtC,IAAMG,EAAI,KAAK,cAAc,EACvBC,EAAWD,EAAE,IAAID,CAAG,EAC1B,OAAIE,GACF,QAAQ,KAAKF,EAAK,iDAAiD,EAC5DE,IAETD,EAAE,IAAID,EAAKF,CAAK,EACTA,EACT,CACF,EAEsBK,EAAf,cAA2CP,CAAkB,CAClE,WAAY,CACV,MAAO,CAAC,CACV,CAEA,WAAiB,CACf,OAAO,KAAK,cAAc,CAC5B,CAEA,SAASE,EAAa,CAEpB,OADU,KAAK,cAAc,EAC3B,KAAKA,CAAK,EACLA,CACT,CACF,EACC,OAAO,SAAc,EAAE,KAAMM,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC,EC5ErD,OAAO,SAAc,EAAE,KAAMC,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC,ECIrD,OAAO,SAAc,EAAE,KAAMC,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC","names":["_State","State","__publicField","StateStorage","metricState","value","MapStateStorage","key","m","oldValue","ListStateStorage","p","p","p"]}
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
3
- import{A as th,B as Qr,C as rh,D as nh,E as pt,F as J,G as ih,H as Yt,I as Io,J as dt,K as oh,L as ht,M as ah,N as uh,O as ke,P as A,Q as Lo,R as at,S as X,T as Ne,U as w,_ as sh,a as M,b as E,c as y,d as it,e as je,f as Y,h as Q1,k as Jd,l as Qd,q as Sr,r as ul,s as Z1,t as Jn,u as Zd,v as eh,w as eC,x as tC,y as sl,z as ot}from"./chunk-6XTFFVM5.js";var he=y(ll=>{"use strict";ll.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((n,o)=>{e.push((a,u)=>a!=null?o(a):n(u)),t.apply(this,e)})},"name",{value:t.name})};ll.fromPromise=function(t){return Object.defineProperty(function(...e){let n=e[e.length-1];if(typeof n!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(o=>n(null,o),n)},"name",{value:t.name})}});var ch=y((P7,lh)=>{var $t=M("constants"),rC=process.cwd,Co=null,nC=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Co||(Co=rC.call(process)),Co};try{process.cwd()}catch{}typeof process.chdir=="function"&&(cl=process.chdir,process.chdir=function(t){Co=null,cl.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,cl));var cl;lh.exports=iC;function iC(t){$t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=u(t.chown),t.fchown=u(t.fchown),t.lchown=u(t.lchown),t.chmod=o(t.chmod),t.fchmod=o(t.fchmod),t.lchmod=o(t.lchmod),t.chownSync=i(t.chownSync),t.fchownSync=i(t.fchownSync),t.lchownSync=i(t.lchownSync),t.chmodSync=a(t.chmodSync),t.fchmodSync=a(t.fchmodSync),t.lchmodSync=a(t.lchmodSync),t.stat=r(t.stat),t.fstat=r(t.fstat),t.lstat=r(t.lstat),t.statSync=s(t.statSync),t.fstatSync=s(t.fstatSync),t.lstatSync=s(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,p,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,p,m,f){f&&process.nextTick(f)},t.lchownSync=function(){}),nC==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function p(m,f,v){var S=Date.now(),_=0;c(m,f,function O(g){if(g&&(g.code==="EACCES"||g.code==="EPERM"||g.code==="EBUSY")&&Date.now()-S<6e4){setTimeout(function(){t.stat(f,function(b,L){b&&b.code==="ENOENT"?c(m,f,O):v(g)})},_),_<100&&(_+=10);return}v&&v(g)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function p(m,f,v,S,_,O){var g;if(O&&typeof O=="function"){var b=0;g=function(L,B,j){if(L&&L.code==="EAGAIN"&&b<10)return b++,c.call(t,m,f,v,S,_,g);O.apply(this,arguments)}}return c.call(t,m,f,v,S,_,g)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(p,m,f,v,S){for(var _=0;;)try{return c.call(t,p,m,f,v,S)}catch(O){if(O.code==="EAGAIN"&&_<10){_++;continue}throw O}}}(t.readSync);function e(c){c.lchmod=function(p,m,f){c.open(p,$t.O_WRONLY|$t.O_SYMLINK,m,function(v,S){if(v){f&&f(v);return}c.fchmod(S,m,function(_){c.close(S,function(O){f&&f(_||O)})})})},c.lchmodSync=function(p,m){var f=c.openSync(p,$t.O_WRONLY|$t.O_SYMLINK,m),v=!0,S;try{S=c.fchmodSync(f,m),v=!1}finally{if(v)try{c.closeSync(f)}catch{}else c.closeSync(f)}return S}}function n(c){$t.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,m,f,v){c.open(p,$t.O_SYMLINK,function(S,_){if(S){v&&v(S);return}c.futimes(_,m,f,function(O){c.close(_,function(g){v&&v(O||g)})})})},c.lutimesSync=function(p,m,f){var v=c.openSync(p,$t.O_SYMLINK),S,_=!0;try{S=c.futimesSync(v,m,f),_=!1}finally{if(_)try{c.closeSync(v)}catch{}else c.closeSync(v)}return S}):c.futimes&&(c.lutimes=function(p,m,f,v){v&&process.nextTick(v)},c.lutimesSync=function(){})}function o(c){return c&&function(p,m,f){return c.call(t,p,m,function(v){l(v)&&(v=null),f&&f.apply(this,arguments)})}}function a(c){return c&&function(p,m){try{return c.call(t,p,m)}catch(f){if(!l(f))throw f}}}function u(c){return c&&function(p,m,f,v){return c.call(t,p,m,f,function(S){l(S)&&(S=null),v&&v.apply(this,arguments)})}}function i(c){return c&&function(p,m,f){try{return c.call(t,p,m,f)}catch(v){if(!l(v))throw v}}}function r(c){return c&&function(p,m,f){typeof m=="function"&&(f=m,m=null);function v(S,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),f&&f.apply(this,arguments)}return m?c.call(t,p,m,v):c.call(t,p,v)}}function s(c){return c&&function(p,m){var f=m?c.call(t,p,m):c.call(t,p);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function l(c){if(!c||c.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var dh=y((w7,ph)=>{var fh=M("stream").Stream;ph.exports=oC;function oC(t){return{ReadStream:e,WriteStream:n};function e(o,a){if(!(this instanceof e))return new e(o,a);fh.call(this);var u=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var i=Object.keys(a),r=0,s=i.length;r<s;r++){var l=i[r];this[l]=a[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){u._read()});return}t.open(this.path,this.flags,this.mode,function(c,p){if(c){u.emit("error",c),u.readable=!1;return}u.fd=p,u.emit("open",p),u._read()})}function n(o,a){if(!(this instanceof n))return new n(o,a);fh.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var u=Object.keys(a),i=0,r=u.length;i<r;i++){var s=u[i];this[s]=a[s]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var mh=y((M7,hh)=>{"use strict";hh.exports=uC;var aC=Object.getPrototypeOf||function(t){return t.__proto__};function uC(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:aC(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var en=y((I7,dl)=>{var oe=M("fs"),sC=ch(),lC=dh(),cC=mh(),Uo=M("util"),_e,Vo;typeof Symbol=="function"&&typeof Symbol.for=="function"?(_e=Symbol.for("graceful-fs.queue"),Vo=Symbol.for("graceful-fs.previous")):(_e="___graceful-fs.queue",Vo="___graceful-fs.previous");function fC(){}function _h(t,e){Object.defineProperty(t,_e,{get:function(){return e}})}var Er=fC;Uo.debuglog?Er=Uo.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Er=function(){var t=Uo.format.apply(Uo,arguments);t="GFS4: "+t.split(/\n/).join(`
3
+ import{A as th,B as Qr,C as rh,D as nh,E as pt,F as J,G as ih,H as Yt,I as Io,J as dt,K as oh,L as ht,M as ah,N as uh,O as ke,P as A,Q as Lo,R as at,S as X,T as Ne,U as w,_ as sh,a as M,b as E,c as y,d as it,e as je,f as Y,h as Q1,k as Jd,l as Qd,q as Sr,r as ul,s as Z1,t as Jn,u as Zd,v as eh,w as eC,x as tC,y as sl,z as ot}from"./chunk-OIJYNZ76.js";var he=y(ll=>{"use strict";ll.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((n,o)=>{e.push((a,u)=>a!=null?o(a):n(u)),t.apply(this,e)})},"name",{value:t.name})};ll.fromPromise=function(t){return Object.defineProperty(function(...e){let n=e[e.length-1];if(typeof n!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(o=>n(null,o),n)},"name",{value:t.name})}});var ch=y((P7,lh)=>{var $t=M("constants"),rC=process.cwd,Co=null,nC=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Co||(Co=rC.call(process)),Co};try{process.cwd()}catch{}typeof process.chdir=="function"&&(cl=process.chdir,process.chdir=function(t){Co=null,cl.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,cl));var cl;lh.exports=iC;function iC(t){$t.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=u(t.chown),t.fchown=u(t.fchown),t.lchown=u(t.lchown),t.chmod=o(t.chmod),t.fchmod=o(t.fchmod),t.lchmod=o(t.lchmod),t.chownSync=i(t.chownSync),t.fchownSync=i(t.fchownSync),t.lchownSync=i(t.lchownSync),t.chmodSync=a(t.chmodSync),t.fchmodSync=a(t.fchmodSync),t.lchmodSync=a(t.lchmodSync),t.stat=r(t.stat),t.fstat=r(t.fstat),t.lstat=r(t.lstat),t.statSync=s(t.statSync),t.fstatSync=s(t.fstatSync),t.lstatSync=s(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,p,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,p,m,f){f&&process.nextTick(f)},t.lchownSync=function(){}),nC==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function p(m,f,v){var S=Date.now(),_=0;c(m,f,function O(g){if(g&&(g.code==="EACCES"||g.code==="EPERM"||g.code==="EBUSY")&&Date.now()-S<6e4){setTimeout(function(){t.stat(f,function(b,L){b&&b.code==="ENOENT"?c(m,f,O):v(g)})},_),_<100&&(_+=10);return}v&&v(g)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function p(m,f,v,S,_,O){var g;if(O&&typeof O=="function"){var b=0;g=function(L,B,j){if(L&&L.code==="EAGAIN"&&b<10)return b++,c.call(t,m,f,v,S,_,g);O.apply(this,arguments)}}return c.call(t,m,f,v,S,_,g)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(p,m,f,v,S){for(var _=0;;)try{return c.call(t,p,m,f,v,S)}catch(O){if(O.code==="EAGAIN"&&_<10){_++;continue}throw O}}}(t.readSync);function e(c){c.lchmod=function(p,m,f){c.open(p,$t.O_WRONLY|$t.O_SYMLINK,m,function(v,S){if(v){f&&f(v);return}c.fchmod(S,m,function(_){c.close(S,function(O){f&&f(_||O)})})})},c.lchmodSync=function(p,m){var f=c.openSync(p,$t.O_WRONLY|$t.O_SYMLINK,m),v=!0,S;try{S=c.fchmodSync(f,m),v=!1}finally{if(v)try{c.closeSync(f)}catch{}else c.closeSync(f)}return S}}function n(c){$t.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,m,f,v){c.open(p,$t.O_SYMLINK,function(S,_){if(S){v&&v(S);return}c.futimes(_,m,f,function(O){c.close(_,function(g){v&&v(O||g)})})})},c.lutimesSync=function(p,m,f){var v=c.openSync(p,$t.O_SYMLINK),S,_=!0;try{S=c.futimesSync(v,m,f),_=!1}finally{if(_)try{c.closeSync(v)}catch{}else c.closeSync(v)}return S}):c.futimes&&(c.lutimes=function(p,m,f,v){v&&process.nextTick(v)},c.lutimesSync=function(){})}function o(c){return c&&function(p,m,f){return c.call(t,p,m,function(v){l(v)&&(v=null),f&&f.apply(this,arguments)})}}function a(c){return c&&function(p,m){try{return c.call(t,p,m)}catch(f){if(!l(f))throw f}}}function u(c){return c&&function(p,m,f,v){return c.call(t,p,m,f,function(S){l(S)&&(S=null),v&&v.apply(this,arguments)})}}function i(c){return c&&function(p,m,f){try{return c.call(t,p,m,f)}catch(v){if(!l(v))throw v}}}function r(c){return c&&function(p,m,f){typeof m=="function"&&(f=m,m=null);function v(S,_){_&&(_.uid<0&&(_.uid+=4294967296),_.gid<0&&(_.gid+=4294967296)),f&&f.apply(this,arguments)}return m?c.call(t,p,m,v):c.call(t,p,v)}}function s(c){return c&&function(p,m){var f=m?c.call(t,p,m):c.call(t,p);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function l(c){if(!c||c.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var dh=y((w7,ph)=>{var fh=M("stream").Stream;ph.exports=oC;function oC(t){return{ReadStream:e,WriteStream:n};function e(o,a){if(!(this instanceof e))return new e(o,a);fh.call(this);var u=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var i=Object.keys(a),r=0,s=i.length;r<s;r++){var l=i[r];this[l]=a[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){u._read()});return}t.open(this.path,this.flags,this.mode,function(c,p){if(c){u.emit("error",c),u.readable=!1;return}u.fd=p,u.emit("open",p),u._read()})}function n(o,a){if(!(this instanceof n))return new n(o,a);fh.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var u=Object.keys(a),i=0,r=u.length;i<r;i++){var s=u[i];this[s]=a[s]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var mh=y((M7,hh)=>{"use strict";hh.exports=uC;var aC=Object.getPrototypeOf||function(t){return t.__proto__};function uC(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:aC(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var en=y((I7,dl)=>{var oe=M("fs"),sC=ch(),lC=dh(),cC=mh(),Uo=M("util"),_e,Vo;typeof Symbol=="function"&&typeof Symbol.for=="function"?(_e=Symbol.for("graceful-fs.queue"),Vo=Symbol.for("graceful-fs.previous")):(_e="___graceful-fs.queue",Vo="___graceful-fs.previous");function fC(){}function _h(t,e){Object.defineProperty(t,_e,{get:function(){return e}})}var Er=fC;Uo.debuglog?Er=Uo.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Er=function(){var t=Uo.format.apply(Uo,arguments);t="GFS4: "+t.split(/\n/).join(`
4
4
  GFS4: `),console.error(t)});oe[_e]||(vh=global[_e]||[],_h(oe,vh),oe.close=function(t){function e(n,o){return t.call(oe,n,function(a){a||yh(),typeof o=="function"&&o.apply(this,arguments)})}return Object.defineProperty(e,Vo,{value:t}),e}(oe.close),oe.closeSync=function(t){function e(n){t.apply(oe,arguments),yh()}return Object.defineProperty(e,Vo,{value:t}),e}(oe.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Er(oe[_e]),M("assert").equal(oe[_e].length,0)}));var vh;global[_e]||_h(global,oe[_e]);dl.exports=fl(cC(oe));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!oe.__patched&&(dl.exports=fl(oe),oe.__patched=!0);function fl(t){sC(t),t.gracefulify=fl,t.createReadStream=B,t.createWriteStream=j;var e=t.readFile;t.readFile=n;function n(P,k,U){return typeof k=="function"&&(U=k,k=null),z(P,k,U);function z(W,ne,ie,ue){return e(W,ne,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Zr([z,[W,ne,ie],Z,ue||Date.now(),Date.now()]):typeof ie=="function"&&ie.apply(this,arguments)})}}var o=t.writeFile;t.writeFile=a;function a(P,k,U,z){return typeof U=="function"&&(z=U,U=null),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return o(ne,ie,ue,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var u=t.appendFile;u&&(t.appendFile=i);function i(P,k,U,z){return typeof U=="function"&&(z=U,U=null),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return u(ne,ie,ue,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var r=t.copyFile;r&&(t.copyFile=s);function s(P,k,U,z){return typeof U=="function"&&(z=U,U=0),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return r(ne,ie,ue,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var l=t.readdir;t.readdir=p;var c=/^v[0-5]\./;function p(P,k,U){typeof k=="function"&&(U=k,k=null);var z=c.test(process.version)?function(ie,ue,Z,ye){return l(ie,W(ie,ue,Z,ye))}:function(ie,ue,Z,ye){return l(ie,ue,W(ie,ue,Z,ye))};return z(P,k,U);function W(ne,ie,ue,Z){return function(ye,re){ye&&(ye.code==="EMFILE"||ye.code==="ENFILE")?Zr([z,[ne,ie,ue],ye,Z||Date.now(),Date.now()]):(re&&re.sort&&re.sort(),typeof ue=="function"&&ue.call(this,ye,re))}}}if(process.version.substr(0,4)==="v0.8"){var m=lC(t);O=m.ReadStream,b=m.WriteStream}var f=t.ReadStream;f&&(O.prototype=Object.create(f.prototype),O.prototype.open=g);var v=t.WriteStream;v&&(b.prototype=Object.create(v.prototype),b.prototype.open=L),Object.defineProperty(t,"ReadStream",{get:function(){return O},set:function(P){O=P},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return b},set:function(P){b=P},enumerable:!0,configurable:!0});var S=O;Object.defineProperty(t,"FileReadStream",{get:function(){return S},set:function(P){S=P},enumerable:!0,configurable:!0});var _=b;Object.defineProperty(t,"FileWriteStream",{get:function(){return _},set:function(P){_=P},enumerable:!0,configurable:!0});function O(P,k){return this instanceof O?(f.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function g(){var P=this;$(P.path,P.flags,P.mode,function(k,U){k?(P.autoClose&&P.destroy(),P.emit("error",k)):(P.fd=U,P.emit("open",U),P.read())})}function b(P,k){return this instanceof b?(v.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function L(){var P=this;$(P.path,P.flags,P.mode,function(k,U){k?(P.destroy(),P.emit("error",k)):(P.fd=U,P.emit("open",U))})}function B(P,k){return new t.ReadStream(P,k)}function j(P,k){return new t.WriteStream(P,k)}var ae=t.open;t.open=$;function $(P,k,U,z){return typeof U=="function"&&(z=U,U=null),W(P,k,U,z);function W(ne,ie,ue,Z,ye){return ae(ne,ie,ue,function(re,N7){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Zr([W,[ne,ie,ue,Z],re,ye||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return t}function Zr(t){Er("ENQUEUE",t[0].name,t[1]),oe[_e].push(t),pl()}var Do;function yh(){for(var t=Date.now(),e=0;e<oe[_e].length;++e)oe[_e][e].length>2&&(oe[_e][e][3]=t,oe[_e][e][4]=t);pl()}function pl(){if(clearTimeout(Do),Do=void 0,oe[_e].length!==0){var t=oe[_e].shift(),e=t[0],n=t[1],o=t[2],a=t[3],u=t[4];if(a===void 0)Er("RETRY",e.name,n),e.apply(null,n);else if(Date.now()-a>=6e4){Er("TIMEOUT",e.name,n);var i=n.pop();typeof i=="function"&&i.call(null,o)}else{var r=Date.now()-u,s=Math.max(u-a,1),l=Math.min(s*1.2,100);r>=l?(Er("RETRY",e.name,n),e.apply(null,n.concat([a]))):oe[_e].push(t)}Do===void 0&&(Do=setTimeout(pl,0))}}});var Pe=y(Mt=>{"use strict";var Sh=he().fromCallback,Re=en(),pC=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof Re[t]=="function");Object.assign(Mt,Re);pC.forEach(t=>{Mt[t]=Sh(Re[t])});Mt.exists=function(t,e){return typeof e=="function"?Re.exists(t,e):new Promise(n=>Re.exists(t,n))};Mt.read=function(t,e,n,o,a,u){return typeof u=="function"?Re.read(t,e,n,o,a,u):new Promise((i,r)=>{Re.read(t,e,n,o,a,(s,l,c)=>{if(s)return r(s);i({bytesRead:l,buffer:c})})})};Mt.write=function(t,e,...n){return typeof n[n.length-1]=="function"?Re.write(t,e,...n):new Promise((o,a)=>{Re.write(t,e,...n,(u,i,r)=>{if(u)return a(u);o({bytesWritten:i,buffer:r})})})};Mt.readv=function(t,e,...n){return typeof n[n.length-1]=="function"?Re.readv(t,e,...n):new Promise((o,a)=>{Re.readv(t,e,...n,(u,i,r)=>{if(u)return a(u);o({bytesRead:i,buffers:r})})})};Mt.writev=function(t,e,...n){return typeof n[n.length-1]=="function"?Re.writev(t,e,...n):new Promise((o,a)=>{Re.writev(t,e,...n,(u,i,r)=>{if(u)return a(u);o({bytesWritten:i,buffers:r})})})};typeof Re.realpath.native=="function"?Mt.realpath.native=Sh(Re.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Th=y((C7,Eh)=>{"use strict";var dC=M("path");Eh.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(dC.parse(e).root,""))){let o=new Error(`Path contains invalid characters: ${e}`);throw o.code="EINVAL",o}}});var bh=y((U7,hl)=>{"use strict";var gh=Pe(),{checkPath:Oh}=Th(),Ah=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};hl.exports.makeDir=async(t,e)=>(Oh(t),gh.mkdir(t,{mode:Ah(e),recursive:!0}));hl.exports.makeDirSync=(t,e)=>(Oh(t),gh.mkdirSync(t,{mode:Ah(e),recursive:!0}))});var ut=y((D7,xh)=>{"use strict";var hC=he().fromPromise,{makeDir:mC,makeDirSync:ml}=bh(),vl=hC(mC);xh.exports={mkdirs:vl,mkdirsSync:ml,mkdirp:vl,mkdirpSync:ml,ensureDir:vl,ensureDirSync:ml}});var Kt=y((V7,Rh)=>{"use strict";var vC=he().fromPromise,Nh=Pe();function yC(t){return Nh.access(t).then(()=>!0).catch(()=>!1)}Rh.exports={pathExists:vC(yC),pathExistsSync:Nh.existsSync}});var yl=y((k7,Ph)=>{"use strict";var tn=Pe(),_C=he().fromPromise;async function SC(t,e,n){let o=await tn.open(t,"r+"),a=null;try{await tn.futimes(o,e,n)}finally{try{await tn.close(o)}catch(u){a=u}}if(a)throw a}function EC(t,e,n){let o=tn.openSync(t,"r+");return tn.futimesSync(o,e,n),tn.closeSync(o)}Ph.exports={utimesMillis:_C(SC),utimesMillisSync:EC}});var Tr=y((B7,Lh)=>{"use strict";var rn=Pe(),me=M("path"),wh=he().fromPromise;function TC(t,e,n){let o=n.dereference?a=>rn.stat(a,{bigint:!0}):a=>rn.lstat(a,{bigint:!0});return Promise.all([o(t),o(e).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,u])=>({srcStat:a,destStat:u}))}function gC(t,e,n){let o,a=n.dereference?i=>rn.statSync(i,{bigint:!0}):i=>rn.lstatSync(i,{bigint:!0}),u=a(t);try{o=a(e)}catch(i){if(i.code==="ENOENT")return{srcStat:u,destStat:null};throw i}return{srcStat:u,destStat:o}}async function OC(t,e,n,o){let{srcStat:a,destStat:u}=await TC(t,e,o);if(u){if(Qn(a,u)){let i=me.basename(t),r=me.basename(e);if(n==="move"&&i!==r&&i.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&_l(t,e))throw new Error(ko(t,e,n));return{srcStat:a,destStat:u}}function AC(t,e,n,o){let{srcStat:a,destStat:u}=gC(t,e,o);if(u){if(Qn(a,u)){let i=me.basename(t),r=me.basename(e);if(n==="move"&&i!==r&&i.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&_l(t,e))throw new Error(ko(t,e,n));return{srcStat:a,destStat:u}}async function Mh(t,e,n,o){let a=me.resolve(me.dirname(t)),u=me.resolve(me.dirname(n));if(u===a||u===me.parse(u).root)return;let i;try{i=await rn.stat(u,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(Qn(e,i))throw new Error(ko(t,n,o));return Mh(t,e,u,o)}function Ih(t,e,n,o){let a=me.resolve(me.dirname(t)),u=me.resolve(me.dirname(n));if(u===a||u===me.parse(u).root)return;let i;try{i=rn.statSync(u,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(Qn(e,i))throw new Error(ko(t,n,o));return Ih(t,e,u,o)}function Qn(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function _l(t,e){let n=me.resolve(t).split(me.sep).filter(a=>a),o=me.resolve(e).split(me.sep).filter(a=>a);return n.every((a,u)=>o[u]===a)}function ko(t,e,n){return`Cannot ${n} '${t}' to a subdirectory of itself, '${e}'.`}Lh.exports={checkPaths:wh(OC),checkPathsSync:AC,checkParentPaths:wh(Mh),checkParentPathsSync:Ih,isSrcSubdir:_l,areIdentical:Qn}});var kh=y((G7,Vh)=>{"use strict";var Oe=Pe(),Zn=M("path"),{mkdirs:bC}=ut(),{pathExists:xC}=Kt(),{utimesMillis:NC}=yl(),ei=Tr();async function RC(t,e,n={}){typeof n=="function"&&(n={filter:n}),n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
5
5
 
6
6
  see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:o,destStat:a}=await ei.checkPaths(t,e,"copy",n);if(await ei.checkParentPaths(t,o,e,"copy"),!await Uh(t,e,n))return;let i=Zn.dirname(e);await xC(i)||await bC(i),await Dh(a,t,e,n)}async function Uh(t,e,n){return n.filter?n.filter(t,e):!0}async function Dh(t,e,n,o){let u=await(o.dereference?Oe.stat:Oe.lstat)(e);if(u.isDirectory())return IC(u,t,e,n,o);if(u.isFile()||u.isCharacterDevice()||u.isBlockDevice())return PC(u,t,e,n,o);if(u.isSymbolicLink())return LC(t,e,n,o);throw u.isSocket()?new Error(`Cannot copy a socket file: ${e}`):u.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}async function PC(t,e,n,o,a){if(!e)return Ch(t,n,o,a);if(a.overwrite)return await Oe.unlink(o),Ch(t,n,o,a);if(a.errorOnExist)throw new Error(`'${o}' already exists`)}async function Ch(t,e,n,o){if(await Oe.copyFile(e,n),o.preserveTimestamps){wC(t.mode)&&await MC(n,t.mode);let a=await Oe.stat(e);await NC(n,a.atime,a.mtime)}return Oe.chmod(n,t.mode)}function wC(t){return(t&128)===0}function MC(t,e){return Oe.chmod(t,e|128)}async function IC(t,e,n,o,a){e||await Oe.mkdir(o);let u=await Oe.readdir(n);await Promise.all(u.map(async i=>{let r=Zn.join(n,i),s=Zn.join(o,i);if(!await Uh(r,s,a))return;let{destStat:c}=await ei.checkPaths(r,s,"copy",a);return Dh(c,r,s,a)})),e||await Oe.chmod(o,t.mode)}async function LC(t,e,n,o){let a=await Oe.readlink(e);if(o.dereference&&(a=Zn.resolve(process.cwd(),a)),!t)return Oe.symlink(a,n);let u=null;try{u=await Oe.readlink(n)}catch(i){if(i.code==="EINVAL"||i.code==="UNKNOWN")return Oe.symlink(a,n);throw i}if(o.dereference&&(u=Zn.resolve(process.cwd(),u)),ei.isSrcSubdir(a,u))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${u}'.`);if(ei.isSrcSubdir(u,a))throw new Error(`Cannot overwrite '${u}' with '${a}'.`);return await Oe.unlink(n),Oe.symlink(a,n)}Vh.exports=RC});var Hh=y((q7,Fh)=>{"use strict";var we=en(),ti=M("path"),CC=ut().mkdirsSync,UC=yl().utimesMillisSync,ri=Tr();function DC(t,e,n){typeof n=="function"&&(n={filter:n}),n=n||{},n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
@@ -56,7 +56,7 @@ ${i}
56
56
  ${r}`.trim()}_serializeSingularDataPoint(e,n,o){let a="";e=ad(e,n);let{value:u,attributes:i}=o,r=(0,KM.hrTimeToMilliseconds)(o.endTime);return a+=Ps(e,i,u,this._appendTimestamp?r:void 0,void 0),a}_serializeHistogramDataPoint(e,n,o){let a="";e=ad(e,n);let u=o.attributes,i=o.value,r=(0,KM.hrTimeToMilliseconds)(o.endTime);for(let p of["count","sum"]){let m=i[p];m!=null&&(a+=Ps(e+"_"+p,u,m,this._appendTimestamp?r:void 0,void 0))}let s=0,l=i.buckets.counts.entries(),c=!1;for(let[p,m]of l){s+=m;let f=i.buckets.boundaries[p];if(f===void 0&&c)break;f===1/0&&(c=!0),a+=Ps(e+"_bucket",u,s,this._appendTimestamp?r:void 0,{le:f===void 0||f===1/0?"+Inf":String(f)})}return a}_serializeResource(e){let n="target_info",o=`# HELP ${n} Target metadata`,a=`# TYPE ${n} gauge`,u=Ps(n,e.attributes,1).trim();return`${o}
57
57
  ${a}
58
58
  ${u}
59
- `}};Ms.PrometheusSerializer=sd});var WM=y(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.PrometheusExporter=void 0;var ho=(w(),Y(Ne)),Sz=(F(),Y(Gr)),cd=(Cn(),Y(Up)),Ez=M("http"),Tz=ld(),gz=M("url"),Pt=class extends cd.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:o=>cd.Aggregation.Default(),aggregationTemporalitySelector:o=>cd.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(o,a)=>{o.url!=null&&new gz.URL(o.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=o=>{o.statusCode=200,o.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:u,errors:i}=a;i.length&&ho.diag.error("PrometheusExporter: metrics collection errors",...i),o.end(this._serializer.serialize(u))},a=>{o.end(`# failed to export metrics: ${a}`)})},this._notFound=o=>{o.statusCode=404,o.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||Pt.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||Pt.DEFAULT_OPTIONS.port,this._prefix=e.prefix||Pt.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:Pt.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,Ez.createServer)(this._requestHandler).unref(),this._serializer=new Tz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||Pt.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,o=>{ho.diag.error(o),n(o)}):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,Sz.globalErrorHandler)(n):ho.diag.debug("Prometheus exporter was stopped"),e()})}):(ho.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,o)=>{this._server.once("error",o),this._server.listen({port:this._port,host:this._host},()=>{ho.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};Is.PrometheusExporter=Pt;Pt.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var JM=y(XM=>{"use strict";Object.defineProperty(XM,"__esModule",{value:!0})});var QM=y(Ft=>{"use strict";var Oz=Ft&&Ft.__createBinding||(Object.create?function(t,e,n,o){o===void 0&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]}),fd=Ft&&Ft.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Oz(e,t,n)};Object.defineProperty(Ft,"__esModule",{value:!0});fd(WM(),Ft);fd(ld(),Ft);fd(JM(),Ft)});var dd=y(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.AbstractAsyncHooksContextManager=void 0;var Az=M("events"),bz=["addListener","on","once","prependListener","prependOnceListener"],pd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Az.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let o=this,a=function(...u){return o.with(e,()=>n.apply(this,u))};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),bz.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 o=this;return function(a,u){var i;let r=(i=o._getPatchMap(e))===null||i===void 0?void 0:i[a];if(r===void 0)return n.call(this,a,u);let s=r.get(u);return n.call(this,a,s||u)}}_patchRemoveAllListeners(e,n){let o=this;return function(a){let u=o._getPatchMap(e);return u!==void 0&&(arguments.length===0?o._createPatchMap(e):u[a]!==void 0&&delete u[a]),n.apply(this,arguments)}}_patchAddListener(e,n,o){let a=this;return function(u,i){if(a._wrapped)return n.call(this,u,i);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let s=r[u];s===void 0&&(s=new WeakMap,r[u]=s);let l=a.bind(o,i);s.set(i,l),a._wrapped=!0;try{return n.call(this,u,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Ls.AbstractAsyncHooksContextManager=pd});var ZM=y(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AsyncHooksContextManager=void 0;var xz=(w(),Y(Ne)),Nz=M("async_hooks"),Rz=dd(),hd=class extends Rz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=Nz.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:xz.ROOT_CONTEXT}with(e,n,o,...a){this._enterContext(e);try{return n.call(o,...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 o=this._stack[this._stack.length-1];o!==void 0&&this._contexts.set(e,o)}_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()}};Cs.AsyncHooksContextManager=hd});var eI=y(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.AsyncLocalStorageContextManager=void 0;var Pz=(w(),Y(Ne)),wz=M("async_hooks"),Mz=dd(),md=class extends Mz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new wz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Pz.ROOT_CONTEXT}with(e,n,o,...a){let u=o==null?n:n.bind(o);return this._asyncLocalStorage.run(e,u,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Us.AsyncLocalStorageContextManager=md});var tI=y(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.AsyncLocalStorageContextManager=Yn.AsyncHooksContextManager=void 0;var Iz=ZM();Object.defineProperty(Yn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Iz.AsyncHooksContextManager}});var Lz=eI();Object.defineProperty(Yn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Lz.AsyncLocalStorageContextManager}})});var $n,vd=E(()=>{w();$n=Qr("OpenTelemetry Context Key B3 Debug Flag")});var Kr,mo,vo,yo,yd,_o,So=E(()=>{Kr="b3",mo="x-b3-traceid",vo="x-b3-spanid",yo="x-b3-sampled",yd="x-b3-parentspanid",_o="x-b3-flags"});function Dz(t){return t===J.SAMPLED||t===J.NONE}function Vz(t){return Array.isArray(t)?t[0]:t}function Ds(t,e,n){var o=e.get(t,n);return Vz(o)}function kz(t,e){var n=Ds(t,e,mo);return typeof n=="string"?n.padStart(32,"0"):""}function Bz(t,e){var n=Ds(t,e,vo);return typeof n=="string"?n:""}function rI(t,e){var n=Ds(t,e,_o);return n==="1"?"1":void 0}function Gz(t,e){var n=Ds(t,e,yo),o=rI(t,e);if(o==="1"||Cz.has(n))return J.SAMPLED;if(n===void 0||Uz.has(n))return J.NONE}var Cz,Uz,nI,iI=E(()=>{w();F();vd();So();Cz=new Set([!0,"true","True","1",1]),Uz=new Set([!1,"false","False","0",0]);nI=function(){function t(){}return t.prototype.inject=function(e,n,o){var a=X.getSpanContext(e);if(!(!a||!dt(a)||Ce(e))){var u=e.getValue($n);o.set(n,mo,a.traceId),o.set(n,vo,a.spanId),u==="1"?o.set(n,_o,u):a.traceFlags!==void 0&&o.set(n,yo,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,o){var a=kz(n,o),u=Bz(n,o),i=Gz(n,o),r=rI(n,o);return Yt(a)&&Io(u)&&Dz(i)?(e=e.setValue($n,r),X.setSpanContext(e,{traceId:a,spanId:u,isRemote:!0,traceFlags:i})):e},t.prototype.fields=function(){return[mo,vo,_o,yo,yd]},t}()});function $z(t){return t.length===32?t:""+Hz+t}function Kz(t){return t&&jz.has(t)?J.SAMPLED:J.NONE}var qz,Fz,Hz,jz,Yz,oI,aI=E(()=>{w();F();vd();So();qz=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},Fz=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,Hz="0".repeat(16),jz=new Set(["d","1"]),Yz="d";oI=function(){function t(){}return t.prototype.inject=function(e,n,o){var a=X.getSpanContext(e);if(!(!a||!dt(a)||Ce(e))){var u=e.getValue($n)||a.traceFlags&1,i=a.traceId+"-"+a.spanId+"-"+u;o.set(n,Kr,i)}},t.prototype.extract=function(e,n,o){var a=o.get(n,Kr),u=Array.isArray(a)?a[0]:a;if(typeof u!="string")return e;var i=u.match(Fz);if(!i)return e;var r=qz(i,4),s=r[1],l=r[2],c=r[3],p=$z(s);if(!Yt(p)||!Io(l))return e;var m=Kz(c);return c===Yz&&(e=e.setValue($n,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:m})},t.prototype.fields=function(){return[Kr]},t}()});var Eo,_d=E(()=>{(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Eo||(Eo={}))});var zz,uI=E(()=>{F();iI();aI();So();_d();zz=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new nI,this._b3SinglePropagator=new oI,e.injectEncoding===Eo.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,o){Ce(e)||this._inject(e,n,o)},t.prototype.extract=function(e,n,o){var a=o.get(n,Kr),u=Array.isArray(a)?a[0]:a;return u?this._b3SinglePropagator.extract(e,n,o):this._b3MultiPropagator.extract(e,n,o)},t.prototype.fields=function(){return this._fields},t}()});var sI={};it(sI,{B3InjectEncoding:()=>Eo,B3Propagator:()=>zz,B3_CONTEXT_HEADER:()=>Kr,X_B3_FLAGS:()=>_o,X_B3_PARENT_SPAN_ID:()=>yd,X_B3_SAMPLED:()=>yo,X_B3_SPAN_ID:()=>vo,X_B3_TRACE_ID:()=>mo});var lI=E(()=>{uI();So();_d()});var cI,fI=E(()=>{cI="exception"});var Wz,pI,Xz,Sd,Ed=E(()=>{w();F();Ct();fI();Wz=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pI=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},Xz=function(t,e,n){if(n||arguments.length===2)for(var o=0,a=e.length,u;o<a;o++)(u||!(o in e))&&(u||(u=Array.prototype.slice.call(e,0,o)),u[o]=e[o]);return t.concat(u||Array.prototype.slice.call(e))},Sd=function(){function t(e,n,o,a,u,i,r,s,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:uh.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=o,this._spanContext=a,this.parentSpanId=i,this.kind=u,this.links=r;var p=Date.now();this._performanceStartTime=kt.now(),this._performanceOffset=p-(this._performanceStartTime+$i()),this._startTimeProvided=s!=null,this.startTime=this._getTime(s??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?(A.warn("Invalid attribute key: "+e),this):lu(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):(A.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,o;try{for(var a=Wz(Object.entries(e)),u=a.next();!u.done;u=a.next()){var i=pI(u.value,2),r=i[0],s=i[1];this.setAttribute(r,s)}}catch(l){n={error:l}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,o){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return A.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&A.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),vu(n)&&(vu(o)||(o=n),n=void 0);var a=Dr(n);return this.events.push({name:e,attributes:a,time:this._getTime(o),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,Xz([],pI(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=e,this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){A.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=Gf(this.startTime,this.endTime),this._duration[0]<0&&(A.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&&A.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<kt.now())return mu(e+this._performanceOffset);if(typeof e=="number")return be(e);if(e instanceof Date)return be(e.getTime());if(Ki(e))return e;if(this._startTimeProvided)return be(Date.now());var n=kt.now()-this._performanceStartTime;return yu(this.startTime,be(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var o={};typeof e=="string"?o[li]=e:e&&(e.code?o[si]=e.code.toString():e.name&&(o[si]=e.name),e.message&&(o[li]=e.message),e.stack&&(o[Ll]=e.stack)),o[si]||o[li]?this.addEvent(cI,o,n):A.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&&A.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,o=this._attributeValueLengthLimit;return o<=0?(A.warn("Attribute value limit must be positive, got "+o),e):typeof e=="string"?this._truncateToLimitUtil(e,o):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,o):a}):e},t}()});var wt,To=E(()=>{(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(wt||(wt={}))});var zr,Vs=E(()=>{To();zr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:wt.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Ht,ks=E(()=>{To();Ht=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:wt.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var go,Td=E(()=>{w();F();Vs();ks();go=function(){function t(e){var n,o,a,u;this._root=e.root,this._root||(Ae(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ht),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Ht,this._remoteParentNotSampled=(o=e.remoteParentNotSampled)!==null&&o!==void 0?o:new zr,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Ht,this._localParentNotSampled=(u=e.localParentNotSampled)!==null&&u!==void 0?u:new zr}return t.prototype.shouldSample=function(e,n,o,a,u,i){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,o,a,u,i):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,o,a,u,i):this._remoteParentNotSampled.shouldSample(e,n,o,a,u,i):r.traceFlags&J.SAMPLED?this._localParentSampled.shouldSample(e,n,o,a,u,i):this._localParentNotSampled.shouldSample(e,n,o,a,u,i)},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 Bs,gd=E(()=>{w();To();Bs=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:Yt(n)&&this._accumulate(n)<this._upperBound?wt.RECORD_AND_SAMPLED:wt.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,o=0;o<e.length/8;o++){var a=o*8,u=parseInt(e.slice(a,a+8),16);n=(n^u)>>>0}return n},t}()});function Gs(){return{sampler:Od(Jz),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:q().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:q().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:q().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:q().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:q().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:q().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:q().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:q().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Od(t){switch(t===void 0&&(t=q()),t.OTEL_TRACES_SAMPLER){case We.AlwaysOn:return new Ht;case We.AlwaysOff:return new zr;case We.ParentBasedAlwaysOn:return new go({root:new Ht});case We.ParentBasedAlwaysOff:return new go({root:new zr});case We.TraceIdRatio:return new Bs(dI(t));case We.ParentBasedTraceIdRatio:return new go({root:new Bs(dI(t))});default:return A.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Qz+'".'),new Ht}}function dI(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return A.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Kn+"."),Kn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(A.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Kn+"."),Kn):e<0||e>1?(A.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Kn+"."),Kn):e}var Jz,Qz,Kn,Ad=E(()=>{w();F();Vs();ks();Td();gd();Jz=q(),Qz=We.AlwaysOn,Kn=1});function hI(t){var e={sampler:Od()},n=Gs(),o=Object.assign({},n,e,t);return o.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),o.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),o}function mI(t){var e,n,o,a,u,i,r,s,l,c,p,m,f=Object.assign({},t.spanLimits),v=pu();return f.attributeCountLimit=(i=(u=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(o=t.generalLimits)===null||o===void 0?void 0:o.attributeCountLimit)!==null&&a!==void 0?a:v.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&u!==void 0?u:v.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:Rn,f.attributeValueLengthLimit=(m=(p=(c=(s=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&s!==void 0?s:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:v.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:v.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&m!==void 0?m:Nn,Object.assign({},t,{spanLimits:f})}var bd=E(()=>{Ad();F()});var vI,yI=E(()=>{w();F();vI=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var o=q();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:o.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:o.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:o.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:o.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Br(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(A.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&&A.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(A.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,o){for(var a=[],u=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),i=0,r=u;i<r;i++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(o)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,o){var a=setTimeout(function(){o(new Error("Timeout"))},e._exportTimeoutMillis);ke.with(Fi(ke.active()),function(){var u;e._finishedSpans.length<=e._maxExportBatchSize?(u=e._finishedSpans,e._finishedSpans=[]):u=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var i=function(){return e._exporter.export(u,function(p){var m;clearTimeout(a),p.code===ee.SUCCESS?n():o((m=p.error)!==null&&m!==void 0?m:new Error("BatchSpanProcessor: span export failed"))})},r=null,s=0,l=u.length;s<l;s++){var c=u[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?i():Promise.all(r).then(i,function(p){Ae(p),o(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(o){e._isExporting=!1,Ae(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),Yi(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var Zz,Oo,_I=E(()=>{yI();Zz=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u])},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 o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),Oo=function(t){Zz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(vI)});function SI(t){return function(){for(var n=0;n<t/4;n++)qs.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(qs[n]>0);n++)n===t-1&&(qs[t-1]=1);return qs.toString("hex",0,t)}}var eW,EI,xd,qs,TI=E(()=>{eW=8,EI=16,xd=function(){function t(){this.generateTraceId=SI(EI),this.generateSpanId=SI(eW)}return t}(),qs=Buffer.allocUnsafe(EI)});var gI=E(()=>{_I();TI()});var Fs=E(()=>{gI()});var Nd,OI=E(()=>{w();F();Ed();bd();Fs();Nd=function(){function t(e,n,o){this._tracerProvider=o;var a=hI(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new xd,this.resource=o.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,o){var a,u,i;n===void 0&&(n={}),o===void 0&&(o=ke.active()),n.root&&(o=X.deleteSpan(o));var r=X.getSpan(o);if(Ce(o)){A.debug("Instrumentation suppressed, returning Noop Span");var s=X.wrapSpanContext(ih);return s}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,m,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,m=l.traceState,f=l.spanId);var v=(a=n.kind)!==null&&a!==void 0?a:ah.INTERNAL,S=((u=n.links)!==null&&u!==void 0?u:[]).map(function(j){return{context:j.context,attributes:Dr(j.attributes)}}),_=Dr(n.attributes),O=this._sampler.shouldSample(o,p,e,v,_,S);m=(i=O.traceState)!==null&&i!==void 0?i:m;var g=O.decision===ht.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,b={traceId:p,spanId:c,traceFlags:g,traceState:m};if(O.decision===ht.NOT_RECORD){A.debug("Recording is off, propagating context in a non-recording span");var s=X.wrapSpanContext(b);return s}var L=Dr(Object.assign(_,O.attributes)),B=new Sd(this,o,e,b,v,f,S,n.startTime,void 0,L);return B},t.prototype.startActiveSpan=function(e,n,o,a){var u,i,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(u=n,r=o):(u=n,i=o,r=a);var s=i??ke.active(),l=this.startSpan(e,u,s),c=X.setSpan(s,l);return ke.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 Hs,AI,bI=E(()=>{F();Hs=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},AI=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,o=[];try{for(var a=Hs(this._spanProcessors),u=a.next();!u.done;u=a.next()){var i=u.value;o.push(i.forceFlush())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(o).then(function(){r()}).catch(function(s){Ae(s||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var o,a;try{for(var u=Hs(this._spanProcessors),i=u.next();!i.done;i=u.next()){var r=i.value;r.onStart(e,n)}}catch(s){o={error:s}}finally{try{i&&!i.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}},t.prototype.onEnd=function(e){var n,o;try{for(var a=Hs(this._spanProcessors),u=a.next();!u.done;u=a.next()){var i=u.value;i.onEnd(e)}}catch(r){n={error:r}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,o=[];try{for(var a=Hs(this._spanProcessors),u=a.next();!u.done;u=a.next()){var i=u.value;o.push(i.shutdown())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,s){Promise.all(o).then(function(){r()},s)})},t}()});var Rd,Pd=E(()=>{Rd=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 yr,tW,xI=E(()=>{w();F();bu();Ao();Ad();bI();Pd();Fs();bd();(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(yr||(yr={}));tW=function(){function t(e){e===void 0&&(e={});var n;this._registeredSpanProcessors=[],this._tracers=new Map;var o=Zf({},Gs(),mI(e));this.resource=(n=o.resource)!==null&&n!==void 0?n:Gt.empty(),this.resource=Gt.default().merge(this.resource),this._config=Object.assign({},o,{resource:this.resource});var a=this._buildExporterFromEnv();if(a!==void 0){var u=new Oo(a);this.activeSpanProcessor=u}else this.activeSpanProcessor=new Rd}return t.prototype.getTracer=function(e,n,o){var a=e+"@"+(n||"")+":"+(o?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new Nd({name:e,version:n,schemaUrl:o?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return A.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new AI(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&&ke.setGlobalContextManager(e.contextManager),e.propagator&&at.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(o){return new Promise(function(a){var u,i=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),u=yr.timeout},e);o.forceFlush().then(function(){clearTimeout(i),u!==yr.timeout&&(u=yr.resolved,a(u))}).catch(function(r){clearTimeout(i),u=yr.error,a(r)})})});return new Promise(function(o,a){Promise.all(n).then(function(u){var i=u.filter(function(r){return r!==yr.resolved});i.length>0?a(i):o()}).catch(function(u){return a([u])})})},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(q().OTEL_PROPAGATORS)),o=n.map(function(u){var i=e._getPropagator(u);return i||A.warn('Propagator "'+u+'" requested through environment variable is unavailable.'),i}),a=o.reduce(function(u,i){return i&&u.push(i),u},[]);if(a.length!==0)return n.length===1?a[0]:new Ff({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=q().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||A.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new $f}],["baggage",function(){return new wf}]]),t._registeredExporters=new Map,t}()});var rW,nW,NI=E(()=>{F();rW=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nW=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},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:Bt(e.startTime),duration:Bt(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var o,a;try{for(var u=rW(e),i=u.next();!i.done;i=u.next()){var r=i.value;console.dir(this._exportInfo(r),{depth:3})}}catch(s){o={error:s}}finally{try{i&&!i.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}if(n)return n({code:ee.SUCCESS})},t}()});var iW,oW,aW,RI=E(()=>{F();iW=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},oW=function(t,e,n){if(n||arguments.length===2)for(var o=0,a=e.length,u;o<a;o++)(u||!(o in e))&&(u||(u=Array.prototype.slice.call(e,0,o)),u[o]=e[o]);return t.concat(u||Array.prototype.slice.call(e))},aW=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var o;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(o=this._finishedSpans).push.apply(o,oW([],iW(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 PI=E(()=>{});var uW,sW,lW,wI=E(()=>{w();F();uW=function(t,e,n,o){function a(u){return u instanceof n?u:new n(function(i){i(u)})}return new(n||(n=Promise))(function(u,i){function r(c){try{l(o.next(c))}catch(p){i(p)}}function s(c){try{l(o.throw(c))}catch(p){i(p)}}function l(c){c.done?u(c.value):a(c.value).then(r,s)}l((o=o.apply(t,e||[])).next())})},sW=function(t,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,a,u,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(l){return function(c){return s([l,c])}}function s(l){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=1,a&&(u=l[0]&2?a.return:l[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,l[1])).done)return u;switch(a=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=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(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){n.label=l[1];break}if(l[0]===6&&n.label<u[1]){n.label=u[1],u=l;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(l);break}u[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{o=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},lW=function(){function t(e){this._exporter=e,this._shutdownOnce=new Br(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return uW(this,void 0,void 0,function(){return sW(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,o,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&J.SAMPLED){var u=function(){return Xi._export(n._exporter,[e]).then(function(r){var s;r.code!==ee.SUCCESS&&Ae((s=r.error)!==null&&s!==void 0?s:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){Ae(r)})};if(e.resource.asyncAttributesPending){var i=(a=(o=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(o).then(function(){return i!=null&&n._unresolvedExports.delete(i),u()},function(r){return Ae(r)});i!=null&&this._unresolvedExports.add(i)}else u()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var MI=E(()=>{});var II=E(()=>{});var LI=E(()=>{});var CI=E(()=>{});var UI=E(()=>{});var wd={};it(wd,{AlwaysOffSampler:()=>zr,AlwaysOnSampler:()=>Ht,BasicTracerProvider:()=>tW,BatchSpanProcessor:()=>Oo,ConsoleSpanExporter:()=>nW,ForceFlushState:()=>yr,InMemorySpanExporter:()=>aW,NoopSpanProcessor:()=>Rd,ParentBasedSampler:()=>go,RandomIdGenerator:()=>xd,SamplingDecision:()=>wt,SimpleSpanProcessor:()=>lW,Span:()=>Sd,TraceIdRatioBasedSampler:()=>Bs,Tracer:()=>Nd});var Ao=E(()=>{OI();xI();Fs();NI();RI();PI();wI();MI();Pd();Vs();ks();Td();gd();To();Ed();II();LI();CI();UI()});var bo=y((Rle,DI)=>{var cW="2.0.0",fW=Number.MAX_SAFE_INTEGER||9007199254740991,pW=16,dW=256-6,hW=["major","premajor","minor","preminor","patch","prepatch","prerelease"];DI.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:pW,MAX_SAFE_BUILD_LENGTH:dW,MAX_SAFE_INTEGER:fW,RELEASE_TYPES:hW,SEMVER_SPEC_VERSION:cW,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var xo=y((Ple,VI)=>{var mW=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};VI.exports=mW});var zn=y((jt,kI)=>{var{MAX_SAFE_COMPONENT_LENGTH:Md,MAX_SAFE_BUILD_LENGTH:vW,MAX_LENGTH:yW}=bo(),_W=xo();jt=kI.exports={};var SW=jt.re=[],EW=jt.safeRe=[],x=jt.src=[],N=jt.t={},TW=0,Id="[a-zA-Z0-9-]",gW=[["\\s",1],["\\d",yW],[Id,vW]],OW=t=>{for(let[e,n]of gW)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},D=(t,e,n)=>{let o=OW(e),a=TW++;_W(t,a,e),N[t]=a,x[a]=e,SW[a]=new RegExp(e,n?"g":void 0),EW[a]=new RegExp(o,n?"g":void 0)};D("NUMERICIDENTIFIER","0|[1-9]\\d*");D("NUMERICIDENTIFIERLOOSE","\\d+");D("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Id}*`);D("MAINVERSION",`(${x[N.NUMERICIDENTIFIER]})\\.(${x[N.NUMERICIDENTIFIER]})\\.(${x[N.NUMERICIDENTIFIER]})`);D("MAINVERSIONLOOSE",`(${x[N.NUMERICIDENTIFIERLOOSE]})\\.(${x[N.NUMERICIDENTIFIERLOOSE]})\\.(${x[N.NUMERICIDENTIFIERLOOSE]})`);D("PRERELEASEIDENTIFIER",`(?:${x[N.NUMERICIDENTIFIER]}|${x[N.NONNUMERICIDENTIFIER]})`);D("PRERELEASEIDENTIFIERLOOSE",`(?:${x[N.NUMERICIDENTIFIERLOOSE]}|${x[N.NONNUMERICIDENTIFIER]})`);D("PRERELEASE",`(?:-(${x[N.PRERELEASEIDENTIFIER]}(?:\\.${x[N.PRERELEASEIDENTIFIER]})*))`);D("PRERELEASELOOSE",`(?:-?(${x[N.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${x[N.PRERELEASEIDENTIFIERLOOSE]})*))`);D("BUILDIDENTIFIER",`${Id}+`);D("BUILD",`(?:\\+(${x[N.BUILDIDENTIFIER]}(?:\\.${x[N.BUILDIDENTIFIER]})*))`);D("FULLPLAIN",`v?${x[N.MAINVERSION]}${x[N.PRERELEASE]}?${x[N.BUILD]}?`);D("FULL",`^${x[N.FULLPLAIN]}$`);D("LOOSEPLAIN",`[v=\\s]*${x[N.MAINVERSIONLOOSE]}${x[N.PRERELEASELOOSE]}?${x[N.BUILD]}?`);D("LOOSE",`^${x[N.LOOSEPLAIN]}$`);D("GTLT","((?:<|>)?=?)");D("XRANGEIDENTIFIERLOOSE",`${x[N.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);D("XRANGEIDENTIFIER",`${x[N.NUMERICIDENTIFIER]}|x|X|\\*`);D("XRANGEPLAIN",`[v=\\s]*(${x[N.XRANGEIDENTIFIER]})(?:\\.(${x[N.XRANGEIDENTIFIER]})(?:\\.(${x[N.XRANGEIDENTIFIER]})(?:${x[N.PRERELEASE]})?${x[N.BUILD]}?)?)?`);D("XRANGEPLAINLOOSE",`[v=\\s]*(${x[N.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[N.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[N.XRANGEIDENTIFIERLOOSE]})(?:${x[N.PRERELEASELOOSE]})?${x[N.BUILD]}?)?)?`);D("XRANGE",`^${x[N.GTLT]}\\s*${x[N.XRANGEPLAIN]}$`);D("XRANGELOOSE",`^${x[N.GTLT]}\\s*${x[N.XRANGEPLAINLOOSE]}$`);D("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Md}})(?:\\.(\\d{1,${Md}}))?(?:\\.(\\d{1,${Md}}))?`);D("COERCE",`${x[N.COERCEPLAIN]}(?:$|[^\\d])`);D("COERCEFULL",x[N.COERCEPLAIN]+`(?:${x[N.PRERELEASE]})?(?:${x[N.BUILD]})?(?:$|[^\\d])`);D("COERCERTL",x[N.COERCE],!0);D("COERCERTLFULL",x[N.COERCEFULL],!0);D("LONETILDE","(?:~>?)");D("TILDETRIM",`(\\s*)${x[N.LONETILDE]}\\s+`,!0);jt.tildeTrimReplace="$1~";D("TILDE",`^${x[N.LONETILDE]}${x[N.XRANGEPLAIN]}$`);D("TILDELOOSE",`^${x[N.LONETILDE]}${x[N.XRANGEPLAINLOOSE]}$`);D("LONECARET","(?:\\^)");D("CARETTRIM",`(\\s*)${x[N.LONECARET]}\\s+`,!0);jt.caretTrimReplace="$1^";D("CARET",`^${x[N.LONECARET]}${x[N.XRANGEPLAIN]}$`);D("CARETLOOSE",`^${x[N.LONECARET]}${x[N.XRANGEPLAINLOOSE]}$`);D("COMPARATORLOOSE",`^${x[N.GTLT]}\\s*(${x[N.LOOSEPLAIN]})$|^$`);D("COMPARATOR",`^${x[N.GTLT]}\\s*(${x[N.FULLPLAIN]})$|^$`);D("COMPARATORTRIM",`(\\s*)${x[N.GTLT]}\\s*(${x[N.LOOSEPLAIN]}|${x[N.XRANGEPLAIN]})`,!0);jt.comparatorTrimReplace="$1$2$3";D("HYPHENRANGE",`^\\s*(${x[N.XRANGEPLAIN]})\\s+-\\s+(${x[N.XRANGEPLAIN]})\\s*$`);D("HYPHENRANGELOOSE",`^\\s*(${x[N.XRANGEPLAINLOOSE]})\\s+-\\s+(${x[N.XRANGEPLAINLOOSE]})\\s*$`);D("STAR","(<|>)?=?\\s*\\*");D("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");D("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var js=y((wle,BI)=>{var AW=Object.freeze({loose:!0}),bW=Object.freeze({}),xW=t=>t?typeof t!="object"?AW:t:bW;BI.exports=xW});var Ld=y((Mle,FI)=>{var GI=/^[0-9]+$/,qI=(t,e)=>{let n=GI.test(t),o=GI.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1},NW=(t,e)=>qI(e,t);FI.exports={compareIdentifiers:qI,rcompareIdentifiers:NW}});var xe=y((Ile,$I)=>{var Ys=xo(),{MAX_LENGTH:HI,MAX_SAFE_INTEGER:$s}=bo(),{safeRe:jI,t:YI}=zn(),RW=js(),{compareIdentifiers:Wn}=Ld(),Je=class{constructor(e,n){if(n=RW(n),e instanceof Je){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>HI)throw new TypeError(`version is longer than ${HI} characters`);Ys("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let o=e.trim().match(n.loose?jI[YI.LOOSE]:jI[YI.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>$s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>$s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>$s||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let u=+a;if(u>=0&&u<$s)return u}return a}):this.prerelease=[],this.build=o[5]?o[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(Ys("SemVer.compare",this.version,this.options,e),!(e instanceof Je)){if(typeof e=="string"&&e===this.version)return 0;e=new Je(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Je||(e=new Je(e,this.options)),Wn(this.major,e.major)||Wn(this.minor,e.minor)||Wn(this.patch,e.patch)}comparePre(e){if(e instanceof Je||(e=new Je(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 o=this.prerelease[n],a=e.prerelease[n];if(Ys("prerelease compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return Wn(o,a)}while(++n)}compareBuild(e){e instanceof Je||(e=new Je(e,this.options));let n=0;do{let o=this.build[n],a=e.build[n];if(Ys("build compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return Wn(o,a)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);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(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let u=[n,a];o===!1&&(u=[n]),Wn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};$I.exports=Je});var Wr=y((Lle,zI)=>{var KI=xe(),PW=(t,e,n=!1)=>{if(t instanceof KI)return t;try{return new KI(t,e)}catch(o){if(!n)return null;throw o}};zI.exports=PW});var XI=y((Cle,WI)=>{var wW=Wr(),MW=(t,e)=>{let n=wW(t,e);return n?n.version:null};WI.exports=MW});var QI=y((Ule,JI)=>{var IW=Wr(),LW=(t,e)=>{let n=IW(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};JI.exports=LW});var tL=y((Dle,eL)=>{var ZI=xe(),CW=(t,e,n,o,a)=>{typeof n=="string"&&(a=o,o=n,n=void 0);try{return new ZI(t instanceof ZI?t.version:t,n).inc(e,o,a).version}catch{return null}};eL.exports=CW});var iL=y((Vle,nL)=>{var rL=Wr(),UW=(t,e)=>{let n=rL(t,null,!0),o=rL(e,null,!0),a=n.compare(o);if(a===0)return null;let u=a>0,i=u?n:o,r=u?o:n,s=!!i.prerelease.length;if(!!r.prerelease.length&&!s)return!r.patch&&!r.minor?"major":i.patch?"patch":i.minor?"minor":"major";let c=s?"pre":"";return n.major!==o.major?c+"major":n.minor!==o.minor?c+"minor":n.patch!==o.patch?c+"patch":"prerelease"};nL.exports=UW});var aL=y((kle,oL)=>{var DW=xe(),VW=(t,e)=>new DW(t,e).major;oL.exports=VW});var sL=y((Ble,uL)=>{var kW=xe(),BW=(t,e)=>new kW(t,e).minor;uL.exports=BW});var cL=y((Gle,lL)=>{var GW=xe(),qW=(t,e)=>new GW(t,e).patch;lL.exports=qW});var pL=y((qle,fL)=>{var FW=Wr(),HW=(t,e)=>{let n=FW(t,e);return n&&n.prerelease.length?n.prerelease:null};fL.exports=HW});var rt=y((Fle,hL)=>{var dL=xe(),jW=(t,e,n)=>new dL(t,n).compare(new dL(e,n));hL.exports=jW});var vL=y((Hle,mL)=>{var YW=rt(),$W=(t,e,n)=>YW(e,t,n);mL.exports=$W});var _L=y((jle,yL)=>{var KW=rt(),zW=(t,e)=>KW(t,e,!0);yL.exports=zW});var Ks=y((Yle,EL)=>{var SL=xe(),WW=(t,e,n)=>{let o=new SL(t,n),a=new SL(e,n);return o.compare(a)||o.compareBuild(a)};EL.exports=WW});var gL=y(($le,TL)=>{var XW=Ks(),JW=(t,e)=>t.sort((n,o)=>XW(n,o,e));TL.exports=JW});var AL=y((Kle,OL)=>{var QW=Ks(),ZW=(t,e)=>t.sort((n,o)=>QW(o,n,e));OL.exports=ZW});var No=y((zle,bL)=>{var eX=rt(),tX=(t,e,n)=>eX(t,e,n)>0;bL.exports=tX});var zs=y((Wle,xL)=>{var rX=rt(),nX=(t,e,n)=>rX(t,e,n)<0;xL.exports=nX});var Cd=y((Xle,NL)=>{var iX=rt(),oX=(t,e,n)=>iX(t,e,n)===0;NL.exports=oX});var Ud=y((Jle,RL)=>{var aX=rt(),uX=(t,e,n)=>aX(t,e,n)!==0;RL.exports=uX});var Ws=y((Qle,PL)=>{var sX=rt(),lX=(t,e,n)=>sX(t,e,n)>=0;PL.exports=lX});var Xs=y((Zle,wL)=>{var cX=rt(),fX=(t,e,n)=>cX(t,e,n)<=0;wL.exports=fX});var Dd=y((ece,ML)=>{var pX=Cd(),dX=Ud(),hX=No(),mX=Ws(),vX=zs(),yX=Xs(),_X=(t,e,n,o)=>{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 pX(t,n,o);case"!=":return dX(t,n,o);case">":return hX(t,n,o);case">=":return mX(t,n,o);case"<":return vX(t,n,o);case"<=":return yX(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};ML.exports=_X});var LL=y((tce,IL)=>{var SX=xe(),EX=Wr(),{safeRe:Js,t:Qs}=zn(),TX=(t,e)=>{if(t instanceof SX)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?Js[Qs.COERCEFULL]:Js[Qs.COERCE]);else{let s=e.includePrerelease?Js[Qs.COERCERTLFULL]:Js[Qs.COERCERTL],l;for(;(l=s.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),s.lastIndex=l.index+l[1].length+l[2].length;s.lastIndex=-1}if(n===null)return null;let o=n[2],a=n[3]||"0",u=n[4]||"0",i=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return EX(`${o}.${a}.${u}${i}${r}`,e)};IL.exports=TX});var UL=y((rce,CL)=>{var Vd=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}};CL.exports=Vd});var nt=y((nce,BL)=>{var Xr=class{constructor(e,n){if(n=OX(n),e instanceof Xr)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new Xr(e.raw,n);if(e instanceof kd)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(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(a=>!VL(a[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&wX(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 o=((this.options.includePrerelease&&RX)|(this.options.loose&&PX))+":"+e,a=DL.get(o);if(a)return a;let u=this.options.loose,i=u?He[De.HYPHENRANGELOOSE]:He[De.HYPHENRANGE];e=e.replace(i,GX(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(He[De.COMPARATORTRIM],bX),te("comparator trim",e),e=e.replace(He[De.TILDETRIM],xX),te("tilde trim",e),e=e.replace(He[De.CARETTRIM],NX),te("caret trim",e);let r=e.split(" ").map(p=>MX(p,this.options)).join(" ").split(/\s+/).map(p=>BX(p,this.options));u&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match(He[De.COMPARATORLOOSE])))),te("range list",r);let s=new Map,l=r.map(p=>new kd(p,this.options));for(let p of l){if(VL(p))return[p];s.set(p.value,p)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return DL.set(o,c),c}intersects(e,n){if(!(e instanceof Xr))throw new TypeError("a Range is required");return this.set.some(o=>kL(o,n)&&e.set.some(a=>kL(a,n)&&o.every(u=>a.every(i=>u.intersects(i,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AX(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(qX(this.set[n],e,this.options))return!0;return!1}};BL.exports=Xr;var gX=UL(),DL=new gX,OX=js(),kd=Ro(),te=xo(),AX=xe(),{safeRe:He,t:De,comparatorTrimReplace:bX,tildeTrimReplace:xX,caretTrimReplace:NX}=zn(),{FLAG_INCLUDE_PRERELEASE:RX,FLAG_LOOSE:PX}=bo(),VL=t=>t.value==="<0.0.0-0",wX=t=>t.value==="",kL=(t,e)=>{let n=!0,o=t.slice(),a=o.pop();for(;n&&o.length;)n=o.every(u=>a.intersects(u,e)),a=o.pop();return n},MX=(t,e)=>(te("comp",t,e),t=CX(t,e),te("caret",t),t=IX(t,e),te("tildes",t),t=DX(t,e),te("xrange",t),t=kX(t,e),te("stars",t),t),Ve=t=>!t||t.toLowerCase()==="x"||t==="*",IX=(t,e)=>t.trim().split(/\s+/).map(n=>LX(n,e)).join(" "),LX=(t,e)=>{let n=e.loose?He[De.TILDELOOSE]:He[De.TILDE];return t.replace(n,(o,a,u,i,r)=>{te("tilde",t,o,a,u,i,r);let s;return Ve(a)?s="":Ve(u)?s=`>=${a}.0.0 <${+a+1}.0.0-0`:Ve(i)?s=`>=${a}.${u}.0 <${a}.${+u+1}.0-0`:r?(te("replaceTilde pr",r),s=`>=${a}.${u}.${i}-${r} <${a}.${+u+1}.0-0`):s=`>=${a}.${u}.${i} <${a}.${+u+1}.0-0`,te("tilde return",s),s})},CX=(t,e)=>t.trim().split(/\s+/).map(n=>UX(n,e)).join(" "),UX=(t,e)=>{te("caret",t,e);let n=e.loose?He[De.CARETLOOSE]:He[De.CARET],o=e.includePrerelease?"-0":"";return t.replace(n,(a,u,i,r,s)=>{te("caret",t,a,u,i,r,s);let l;return Ve(u)?l="":Ve(i)?l=`>=${u}.0.0${o} <${+u+1}.0.0-0`:Ve(r)?u==="0"?l=`>=${u}.${i}.0${o} <${u}.${+i+1}.0-0`:l=`>=${u}.${i}.0${o} <${+u+1}.0.0-0`:s?(te("replaceCaret pr",s),u==="0"?i==="0"?l=`>=${u}.${i}.${r}-${s} <${u}.${i}.${+r+1}-0`:l=`>=${u}.${i}.${r}-${s} <${u}.${+i+1}.0-0`:l=`>=${u}.${i}.${r}-${s} <${+u+1}.0.0-0`):(te("no pr"),u==="0"?i==="0"?l=`>=${u}.${i}.${r}${o} <${u}.${i}.${+r+1}-0`:l=`>=${u}.${i}.${r}${o} <${u}.${+i+1}.0-0`:l=`>=${u}.${i}.${r} <${+u+1}.0.0-0`),te("caret return",l),l})},DX=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>VX(n,e)).join(" ")),VX=(t,e)=>{t=t.trim();let n=e.loose?He[De.XRANGELOOSE]:He[De.XRANGE];return t.replace(n,(o,a,u,i,r,s)=>{te("xRange",t,o,a,u,i,r,s);let l=Ve(u),c=l||Ve(i),p=c||Ve(r),m=p;return a==="="&&m&&(a=""),s=e.includePrerelease?"-0":"",l?a===">"||a==="<"?o="<0.0.0-0":o="*":a&&m?(c&&(i=0),r=0,a===">"?(a=">=",c?(u=+u+1,i=0,r=0):(i=+i+1,r=0)):a==="<="&&(a="<",c?u=+u+1:i=+i+1),a==="<"&&(s="-0"),o=`${a+u}.${i}.${r}${s}`):c?o=`>=${u}.0.0${s} <${+u+1}.0.0-0`:p&&(o=`>=${u}.${i}.0${s} <${u}.${+i+1}.0-0`),te("xRange return",o),o})},kX=(t,e)=>(te("replaceStars",t,e),t.trim().replace(He[De.STAR],"")),BX=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(He[e.includePrerelease?De.GTE0PRE:De.GTE0],"")),GX=t=>(e,n,o,a,u,i,r,s,l,c,p,m)=>(Ve(o)?n="":Ve(a)?n=`>=${o}.0.0${t?"-0":""}`:Ve(u)?n=`>=${o}.${a}.0${t?"-0":""}`:i?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ve(l)?s="":Ve(c)?s=`<${+l+1}.0.0-0`:Ve(p)?s=`<${l}.${+c+1}.0-0`:m?s=`<=${l}.${c}.${p}-${m}`:t?s=`<${l}.${c}.${+p+1}-0`:s=`<=${s}`,`${n} ${s}`.trim()),qX=(t,e,n)=>{for(let o=0;o<t.length;o++)if(!t[o].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let o=0;o<t.length;o++)if(te(t[o].semver),t[o].semver!==kd.ANY&&t[o].semver.prerelease.length>0){let a=t[o].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var Ro=y((ice,YL)=>{var Po=Symbol("SemVer ANY"),Xn=class{static get ANY(){return Po}constructor(e,n){if(n=GL(n),e instanceof Xn){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Gd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Po?this.value="":this.value=this.operator+this.semver.version,Gd("comp",this)}parse(e){let n=this.options.loose?qL[FL.COMPARATORLOOSE]:qL[FL.COMPARATOR],o=e.match(n);if(!o)throw new TypeError(`Invalid comparator: ${e}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new HL(o[2],this.options.loose):this.semver=Po}toString(){return this.value}test(e){if(Gd("Comparator.test",e,this.options.loose),this.semver===Po||e===Po)return!0;if(typeof e=="string")try{e=new HL(e,this.options)}catch{return!1}return Bd(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof Xn))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new jL(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new jL(this.value,n).test(e.semver):(n=GL(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("=")||Bd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Bd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};YL.exports=Xn;var GL=js(),{safeRe:qL,t:FL}=zn(),Bd=Dd(),Gd=xo(),HL=xe(),jL=nt()});var wo=y((oce,$L)=>{var FX=nt(),HX=(t,e,n)=>{try{e=new FX(e,n)}catch{return!1}return e.test(t)};$L.exports=HX});var zL=y((ace,KL)=>{var jX=nt(),YX=(t,e)=>new jX(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));KL.exports=YX});var XL=y((uce,WL)=>{var $X=xe(),KX=nt(),zX=(t,e,n)=>{let o=null,a=null,u=null;try{u=new KX(e,n)}catch{return null}return t.forEach(i=>{u.test(i)&&(!o||a.compare(i)===-1)&&(o=i,a=new $X(o,n))}),o};WL.exports=zX});var QL=y((sce,JL)=>{var WX=xe(),XX=nt(),JX=(t,e,n)=>{let o=null,a=null,u=null;try{u=new XX(e,n)}catch{return null}return t.forEach(i=>{u.test(i)&&(!o||a.compare(i)===1)&&(o=i,a=new WX(o,n))}),o};JL.exports=JX});var t1=y((lce,e1)=>{var qd=xe(),QX=nt(),ZL=No(),ZX=(t,e)=>{t=new QX(t,e);let n=new qd("0.0.0");if(t.test(n)||(n=new qd("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){let a=t.set[o],u=null;a.forEach(i=>{let r=new qd(i.semver.version);switch(i.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!u||ZL(r,u))&&(u=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),u&&(!n||ZL(n,u))&&(n=u)}return n&&t.test(n)?n:null};e1.exports=ZX});var n1=y((cce,r1)=>{var e9=nt(),t9=(t,e)=>{try{return new e9(t,e).range||"*"}catch{return null}};r1.exports=t9});var Zs=y((fce,u1)=>{var r9=xe(),a1=Ro(),{ANY:n9}=a1,i9=nt(),o9=wo(),i1=No(),o1=zs(),a9=Xs(),u9=Ws(),s9=(t,e,n,o)=>{t=new r9(t,o),e=new i9(e,o);let a,u,i,r,s;switch(n){case">":a=i1,u=a9,i=o1,r=">",s=">=";break;case"<":a=o1,u=u9,i=i1,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o9(t,e,o))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,m=null;if(c.forEach(f=>{f.semver===n9&&(f=new a1(">=0.0.0")),p=p||f,m=m||f,a(f.semver,p.semver,o)?p=f:i(f.semver,m.semver,o)&&(m=f)}),p.operator===r||p.operator===s||(!m.operator||m.operator===r)&&u(t,m.semver))return!1;if(m.operator===s&&i(t,m.semver))return!1}return!0};u1.exports=s9});var l1=y((pce,s1)=>{var l9=Zs(),c9=(t,e,n)=>l9(t,e,">",n);s1.exports=c9});var f1=y((dce,c1)=>{var f9=Zs(),p9=(t,e,n)=>f9(t,e,"<",n);c1.exports=p9});var h1=y((hce,d1)=>{var p1=nt(),d9=(t,e,n)=>(t=new p1(t,n),e=new p1(e,n),t.intersects(e,n));d1.exports=d9});var v1=y((mce,m1)=>{var h9=wo(),m9=rt();m1.exports=(t,e,n)=>{let o=[],a=null,u=null,i=t.sort((c,p)=>m9(c,p,n));for(let c of i)h9(c,e,n)?(u=c,a||(a=c)):(u&&o.push([a,u]),u=null,a=null);a&&o.push([a,null]);let r=[];for(let[c,p]of o)c===p?r.push(c):!p&&c===i[0]?r.push("*"):p?c===i[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let s=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return s.length<l.length?s:e}});var g1=y((vce,T1)=>{var y1=nt(),Hd=Ro(),{ANY:Fd}=Hd,Mo=wo(),jd=rt(),v9=(t,e,n={})=>{if(t===e)return!0;t=new y1(t,n),e=new y1(e,n);let o=!1;e:for(let a of t.set){for(let u of e.set){let i=_9(a,u,n);if(o=o||i!==null,i)continue e}if(o)return!1}return!0},y9=[new Hd(">=0.0.0-0")],_1=[new Hd(">=0.0.0")],_9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Fd){if(e.length===1&&e[0].semver===Fd)return!0;n.includePrerelease?t=y9:t=_1}if(e.length===1&&e[0].semver===Fd){if(n.includePrerelease)return!0;e=_1}let o=new Set,a,u;for(let f of t)f.operator===">"||f.operator===">="?a=S1(a,f,n):f.operator==="<"||f.operator==="<="?u=E1(u,f,n):o.add(f.semver);if(o.size>1)return null;let i;if(a&&u){if(i=jd(a.semver,u.semver,n),i>0)return null;if(i===0&&(a.operator!==">="||u.operator!=="<="))return null}for(let f of o){if(a&&!Mo(f,String(a),n)||u&&!Mo(f,String(u),n))return null;for(let v of e)if(!Mo(f,String(v),n))return!1;return!0}let r,s,l,c,p=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,m=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&u.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(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(r=S1(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Mo(a.semver,String(f),n))return!1}if(u){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(s=E1(u,f,n),s===f&&s!==u)return!1}else if(u.operator==="<="&&!Mo(u.semver,String(f),n))return!1}if(!f.operator&&(u||a)&&i!==0)return!1}return!(a&&l&&!u&&i!==0||u&&c&&!a&&i!==0||m||p)},S1=(t,e,n)=>{if(!t)return e;let o=jd(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},E1=(t,e,n)=>{if(!t)return e;let o=jd(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};T1.exports=v9});var x1=y((yce,b1)=>{var Yd=zn(),O1=bo(),S9=xe(),A1=Ld(),E9=Wr(),T9=XI(),g9=QI(),O9=tL(),A9=iL(),b9=aL(),x9=sL(),N9=cL(),R9=pL(),P9=rt(),w9=vL(),M9=_L(),I9=Ks(),L9=gL(),C9=AL(),U9=No(),D9=zs(),V9=Cd(),k9=Ud(),B9=Ws(),G9=Xs(),q9=Dd(),F9=LL(),H9=Ro(),j9=nt(),Y9=wo(),$9=zL(),K9=XL(),z9=QL(),W9=t1(),X9=n1(),J9=Zs(),Q9=l1(),Z9=f1(),e7=h1(),t7=v1(),r7=g1();b1.exports={parse:E9,valid:T9,clean:g9,inc:O9,diff:A9,major:b9,minor:x9,patch:N9,prerelease:R9,compare:P9,rcompare:w9,compareLoose:M9,compareBuild:I9,sort:L9,rsort:C9,gt:U9,lt:D9,eq:V9,neq:k9,gte:B9,lte:G9,cmp:q9,coerce:F9,Comparator:H9,Range:j9,satisfies:Y9,toComparators:$9,maxSatisfying:K9,minSatisfying:z9,minVersion:W9,validRange:X9,outside:J9,gtr:Q9,ltr:Z9,intersects:e7,simplifyRange:t7,subset:r7,SemVer:S9,re:Yd.re,src:Yd.src,tokens:Yd.t,SEMVER_SPEC_VERSION:O1.SEMVER_SPEC_VERSION,RELEASE_TYPES:O1.RELEASE_TYPES,compareIdentifiers:A1.compareIdentifiers,rcompareIdentifiers:A1.rcompareIdentifiers}});function o7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=R1(e,4),o=n[0],a=n[1],u=n[3],i=o.padStart(32,"0"),r=a.padStart(16,"0"),s=i7.test(u)?parseInt(u,16)&1:1;return{traceId:i,spanId:r,isRemote:!0,traceFlags:s}}var N1,R1,P1,$d,n7,i7,w1=E(()=>{w();F();N1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},R1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},P1="uber-trace-id",$d="uberctx",n7=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=$d):(this._jaegerTraceHeader=e?.customTraceHeader||P1,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||$d)}return t.prototype.inject=function(e,n,o){var a,u,i=X.getSpanContext(e),r=at.getBaggage(e);if(i&&Ce(e)===!1){var s="0"+(i.traceFlags||J.NONE).toString(16);o.set(n,this._jaegerTraceHeader,i.traceId+":"+i.spanId+":0:"+s)}if(r)try{for(var l=N1(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=R1(c.value,2),m=p[0],f=p[1];o.set(n,this._jaegerBaggageHeaderPrefix+"-"+m,encodeURIComponent(f.value))}}catch(v){a={error:v}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,o){var a,u,i=this,r,s=o.get(n,this._jaegerTraceHeader),l=Array.isArray(s)?s[0]:s,c=o.keys(n).filter(function(O){return O.startsWith(i._jaegerBaggageHeaderPrefix+"-")}).map(function(O){var g=o.get(n,O);return{key:O.substring(i._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(g)?g[0]:g}}),p=e;if(typeof l=="string"){var m=o7(l);m&&(p=X.setSpanContext(p,m))}if(c.length===0)return p;var f=(r=at.getBaggage(e))!==null&&r!==void 0?r:at.createBaggage();try{for(var v=N1(c),S=v.next();!S.done;S=v.next()){var _=S.value;_.value!==void 0&&(f=f.setEntry(_.key,{value:decodeURIComponent(_.value)}))}}catch(O){a={error:O}}finally{try{S&&!S.done&&(u=v.return)&&u.call(v)}finally{if(a)throw a.error}}return p=at.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),i7=/^[0-9a-f]{1,2}$/i});var M1={};it(M1,{JaegerPropagator:()=>n7,UBER_BAGGAGE_HEADER_PREFIX:()=>$d,UBER_TRACE_ID_HEADER:()=>P1});var I1=E(()=>{w1()});var U1=y(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.NodeTracerProvider=void 0;var L1=tI(),el=(lI(),Y(sI)),C1=(Ao(),Y(wd)),a7=x1(),u7=(I1(),Y(M1)),tl=class extends C1.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=a7.gte(process.version,"14.8.0")?L1.AsyncLocalStorageContextManager:L1.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};rl.NodeTracerProvider=tl;tl._registeredPropagators=new Map([...C1.BasicTracerProvider._registeredPropagators,["b3",()=>new el.B3Propagator({injectEncoding:el.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new el.B3Propagator({injectEncoding:el.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new u7.JaegerPropagator]])});var V1=y(_r=>{"use strict";var s7=_r&&_r.__createBinding||(Object.create?function(t,e,n,o){o===void 0&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]}),D1=_r&&_r.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&s7(e,t,n)};Object.defineProperty(_r,"__esModule",{value:!0});D1(U1(),_r);D1((Ao(),Y(wd)),_r)});var k1=y(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.VERSION=void 0;nl.VERSION="0.52.1"});var B1=y(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.OTLPTraceExporter=void 0;var il=(F(),Y(Gr)),Kd=rd(),l7=(Os(),Y(zp)),c7=k1(),f7={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${c7.VERSION}`},zd=class extends Kd.OTLPGRPCExporterNodeBase{constructor(e={}){let n=Object.assign(Object.assign({},f7),il.baggageUtils.parseKeyPairsIntoRecord((0,il.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));super(e,n,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export",l7.ProtobufTraceSerializer)}getDefaultUrl(e){return(0,Kd.validateAndNormalizeUrl)(this.getUrlFromConfig(e))}getUrlFromConfig(e){return typeof e.url=="string"?e.url:(0,il.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||(0,il.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT||Kd.DEFAULT_COLLECTOR_URL}};ol.OTLPTraceExporter=zd});var G1=y(Jr=>{"use strict";var p7=Jr&&Jr.__createBinding||(Object.create?function(t,e,n,o){o===void 0&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]}),d7=Jr&&Jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&p7(e,t,n)};Object.defineProperty(Jr,"__esModule",{value:!0});d7(B1(),Jr)});var Y1=je(Ol(),1),$1=je(Jn(),1),K1=je(cv(),1),z1=je(eC(),1),W1=je(tC(),1),X1=je(kO(),1);import m7 from"path";import v7 from"http";import{Session as y7}from"inspector/promises";import{createRequire as hq}from"module";var Hl=je(Ol(),1);import Qo from"path";import Fl from"os";var mq=hq(import.meta.url);function BO(t){let e=mq.resolve(t),n=Qo.dirname(e);for(;!Hl.default.existsSync(Qo.join(n,"package.json"));)n=Qo.dirname(n);let o=Hl.default.readFileSync(Qo.join(n,"package.json"),"utf-8");return JSON.parse(o)}var Zo=class{constructor(e){this.instance=e;let n=BO("@sentio/sdk"),o=BO("@sentio/runtime");console.log("Runtime version:",o.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let o=await this.instance.getConfig(e,n);if(o.executionConfig=Jd.fromPartial(sl.execution),o.contractConfigs)for(let a of o.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return o}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){sl.execution.sequential&&(e.bindings=e.bindings.sort(vq));for(let o of e.bindings)this.adjustDataBinding(o);try{let o=await this.instance.processBindings(e,n);return this.adjustResult(o.result),!o.configUpdated&&o.result?.states?.configUpdated&&(o.configUpdated=o.result?.states?.configUpdated),o}catch(o){throw this.sdkMinorVersion<=16&&(o.code===Fl.constants.errno.ECONNRESET||o.code===Fl.constants.errno.ECONNREFUSED||o.code===Fl.constants.errno.ECONNABORTED)&&process.exit(1),o}}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 vq(t,e){let n=GO(t)||new Date(0),o=GO(e)||new Date(0),a=n.getTime()-o.getTime();return a!==0?a:qO(t)-qO(e)}function GO(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 qO(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}process.stdout.write("");var gt=je(tR(),1);function rR(t,e){let n={transform:a=>{let u=[];typeof a.message=="object"?u.push(JSON.stringify(a.message)):u.push(a.message);let i=a[Symbol.for("splat")];if(i)for(let r in i){let s=i[r];typeof s=="object"?u.push(JSON.stringify(s)):u.push(s)}return a.message=u.join(" "),a}},o=(0,gt.createLogger)({format:gt.format.combine(gt.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,gt.format.errors({stack:!0}),t?gt.format.json():gt.format.simple()),level:e?"debug":"info",transports:[new gt.transports.Console]});console.log=(...a)=>o.info.call(o,...a),console.info=(...a)=>o.info.call(o,...a),console.warn=(...a)=>o.warn.call(o,...a),console.error=(...a)=>o.error.call(o,...a),console.debug=(...a)=>o.debug.call(o,...a)}process.stdout.write("");bu();Cn();var q1=je($M(),1),F1=je(QM(),1),Wd=je(V1(),1),H1=je(G1(),1);Ao();w();async function j1(t){t&&A.setLogger(new rh,ot.DEBUG);let e=await Au.detect(),n=new oo({resource:e,readers:[new Vu({exporter:new q1.OTLPMetricExporter}),new F1.PrometheusExporter({port:4041})]}),o=new Wd.NodeTracerProvider({resource:e}),a=new H1.OTLPTraceExporter,u=new Oo(a);o.addSpanProcessor(u),o.register(),Lo.setGlobalMeterProvider(n),X.setGlobalTracerProvider(o),["SIGINT","SIGTERM"].forEach(i=>{process.on(i,()=>h7())}),Lo.getMeter("processor").createGauge("up").record(1)}async function h7(){let t=X.getTracerProvider();if(t instanceof oh){let n=t.getDelegate();n instanceof Wd.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Lo.getMeterProvider();e instanceof oo&&e.shutdown().catch(console.error)}process.stdout.write("");var _7=[{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}],Qe=(0,K1.default)(_7,{partial:!0}),S7=process.env.LOG_LEVEL?.toUpperCase();rR(Qe["log-format"]==="json",S7==="debug"?!0:Qe.debug);console.debug("Starting with",Qe.target);await j1(Qe.debug);Error.stackTraceLimit=20;var E7=m7.resolve(Qe["chains-config"]),T7=Y1.default.readJsonSync(E7),g7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,O7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;Sr.INSTANCE.concurrency=g7??Qe.concurrency;Sr.INSTANCE.batchCount=O7??Qe["batch-count"];Sr.INSTANCE.chainQueryAPI=Qe["chainquery-server"];Sr.INSTANCE.priceFeedAPI=Qe["pricefeed-server"];for(let[t,e]of Object.entries(T7)){let n=e;if(n.ChainServer)Sr.INSTANCE.chainServer.set(t,n.ChainServer);else{let o=n.Https?.[0];o?Sr.INSTANCE.chainServer.set(t,o):console.error("not valid config for chain",t)}}console.debug("Starting Server",Qe);var al=(0,z1.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":$1.compressionAlgorithms.gzip}).use((0,X1.openTelemetryServerMiddleware)()).use(W1.errorDetailsServerMiddleware),Xd=new sh(async()=>{let t=await import(Qe.target);return console.debug("Module loaded",t),t},al.shutdown),A7=new Zo(Xd);al.add(Qd,A7);al.listen("0.0.0.0:"+Qe.port);console.log("Processor Server Started at:",Qe.port);var J1=4040,b7=v7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),o=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(o.get("t")||"1000",10)||1e3,u=new y7;u.connect(),await u.post("Profiler.enable"),await u.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:i}=await u.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(i)),u.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(J1);console.log("Metric Server Started at:",J1);process.on("SIGINT",function(){x7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Xd.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),Xd.unhandled=t)});function x7(t){al.forceShutdown(),console.log("RPC server shut down"),b7.close(function(){console.log("Http server shut down"),process.exit(t)})}process.stdout.write("");
59
+ `}};Ms.PrometheusSerializer=sd});var WM=y(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.PrometheusExporter=void 0;var ho=(w(),Y(Ne)),Sz=(F(),Y(Gr)),cd=(Cn(),Y(Up)),Ez=M("http"),Tz=ld(),gz=M("url"),Pt=class extends cd.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:o=>cd.Aggregation.Default(),aggregationTemporalitySelector:o=>cd.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(o,a)=>{o.url!=null&&new gz.URL(o.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=o=>{o.statusCode=200,o.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:u,errors:i}=a;i.length&&ho.diag.error("PrometheusExporter: metrics collection errors",...i),o.end(this._serializer.serialize(u))},a=>{o.end(`# failed to export metrics: ${a}`)})},this._notFound=o=>{o.statusCode=404,o.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||Pt.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||Pt.DEFAULT_OPTIONS.port,this._prefix=e.prefix||Pt.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:Pt.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,Ez.createServer)(this._requestHandler).unref(),this._serializer=new Tz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||Pt.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,o=>{ho.diag.error(o),n(o)}):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,Sz.globalErrorHandler)(n):ho.diag.debug("Prometheus exporter was stopped"),e()})}):(ho.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,o)=>{this._server.once("error",o),this._server.listen({port:this._port,host:this._host},()=>{ho.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};Is.PrometheusExporter=Pt;Pt.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var JM=y(XM=>{"use strict";Object.defineProperty(XM,"__esModule",{value:!0})});var QM=y(Ft=>{"use strict";var Oz=Ft&&Ft.__createBinding||(Object.create?function(t,e,n,o){o===void 0&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]}),fd=Ft&&Ft.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Oz(e,t,n)};Object.defineProperty(Ft,"__esModule",{value:!0});fd(WM(),Ft);fd(ld(),Ft);fd(JM(),Ft)});var dd=y(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.AbstractAsyncHooksContextManager=void 0;var Az=M("events"),bz=["addListener","on","once","prependListener","prependOnceListener"],pd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Az.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let o=this,a=function(...u){return o.with(e,()=>n.apply(this,u))};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),bz.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 o=this;return function(a,u){var i;let r=(i=o._getPatchMap(e))===null||i===void 0?void 0:i[a];if(r===void 0)return n.call(this,a,u);let s=r.get(u);return n.call(this,a,s||u)}}_patchRemoveAllListeners(e,n){let o=this;return function(a){let u=o._getPatchMap(e);return u!==void 0&&(arguments.length===0?o._createPatchMap(e):u[a]!==void 0&&delete u[a]),n.apply(this,arguments)}}_patchAddListener(e,n,o){let a=this;return function(u,i){if(a._wrapped)return n.call(this,u,i);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let s=r[u];s===void 0&&(s=new WeakMap,r[u]=s);let l=a.bind(o,i);s.set(i,l),a._wrapped=!0;try{return n.call(this,u,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Ls.AbstractAsyncHooksContextManager=pd});var ZM=y(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AsyncHooksContextManager=void 0;var xz=(w(),Y(Ne)),Nz=M("async_hooks"),Rz=dd(),hd=class extends Rz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=Nz.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:xz.ROOT_CONTEXT}with(e,n,o,...a){this._enterContext(e);try{return n.call(o,...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 o=this._stack[this._stack.length-1];o!==void 0&&this._contexts.set(e,o)}_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()}};Cs.AsyncHooksContextManager=hd});var eI=y(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.AsyncLocalStorageContextManager=void 0;var Pz=(w(),Y(Ne)),wz=M("async_hooks"),Mz=dd(),md=class extends Mz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new wz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Pz.ROOT_CONTEXT}with(e,n,o,...a){let u=o==null?n:n.bind(o);return this._asyncLocalStorage.run(e,u,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Us.AsyncLocalStorageContextManager=md});var tI=y(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.AsyncLocalStorageContextManager=Yn.AsyncHooksContextManager=void 0;var Iz=ZM();Object.defineProperty(Yn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Iz.AsyncHooksContextManager}});var Lz=eI();Object.defineProperty(Yn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Lz.AsyncLocalStorageContextManager}})});var $n,vd=E(()=>{w();$n=Qr("OpenTelemetry Context Key B3 Debug Flag")});var Kr,mo,vo,yo,yd,_o,So=E(()=>{Kr="b3",mo="x-b3-traceid",vo="x-b3-spanid",yo="x-b3-sampled",yd="x-b3-parentspanid",_o="x-b3-flags"});function Dz(t){return t===J.SAMPLED||t===J.NONE}function Vz(t){return Array.isArray(t)?t[0]:t}function Ds(t,e,n){var o=e.get(t,n);return Vz(o)}function kz(t,e){var n=Ds(t,e,mo);return typeof n=="string"?n.padStart(32,"0"):""}function Bz(t,e){var n=Ds(t,e,vo);return typeof n=="string"?n:""}function rI(t,e){var n=Ds(t,e,_o);return n==="1"?"1":void 0}function Gz(t,e){var n=Ds(t,e,yo),o=rI(t,e);if(o==="1"||Cz.has(n))return J.SAMPLED;if(n===void 0||Uz.has(n))return J.NONE}var Cz,Uz,nI,iI=E(()=>{w();F();vd();So();Cz=new Set([!0,"true","True","1",1]),Uz=new Set([!1,"false","False","0",0]);nI=function(){function t(){}return t.prototype.inject=function(e,n,o){var a=X.getSpanContext(e);if(!(!a||!dt(a)||Ce(e))){var u=e.getValue($n);o.set(n,mo,a.traceId),o.set(n,vo,a.spanId),u==="1"?o.set(n,_o,u):a.traceFlags!==void 0&&o.set(n,yo,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,o){var a=kz(n,o),u=Bz(n,o),i=Gz(n,o),r=rI(n,o);return Yt(a)&&Io(u)&&Dz(i)?(e=e.setValue($n,r),X.setSpanContext(e,{traceId:a,spanId:u,isRemote:!0,traceFlags:i})):e},t.prototype.fields=function(){return[mo,vo,_o,yo,yd]},t}()});function $z(t){return t.length===32?t:""+Hz+t}function Kz(t){return t&&jz.has(t)?J.SAMPLED:J.NONE}var qz,Fz,Hz,jz,Yz,oI,aI=E(()=>{w();F();vd();So();qz=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},Fz=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,Hz="0".repeat(16),jz=new Set(["d","1"]),Yz="d";oI=function(){function t(){}return t.prototype.inject=function(e,n,o){var a=X.getSpanContext(e);if(!(!a||!dt(a)||Ce(e))){var u=e.getValue($n)||a.traceFlags&1,i=a.traceId+"-"+a.spanId+"-"+u;o.set(n,Kr,i)}},t.prototype.extract=function(e,n,o){var a=o.get(n,Kr),u=Array.isArray(a)?a[0]:a;if(typeof u!="string")return e;var i=u.match(Fz);if(!i)return e;var r=qz(i,4),s=r[1],l=r[2],c=r[3],p=$z(s);if(!Yt(p)||!Io(l))return e;var m=Kz(c);return c===Yz&&(e=e.setValue($n,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:m})},t.prototype.fields=function(){return[Kr]},t}()});var Eo,_d=E(()=>{(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Eo||(Eo={}))});var zz,uI=E(()=>{F();iI();aI();So();_d();zz=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new nI,this._b3SinglePropagator=new oI,e.injectEncoding===Eo.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,o){Ce(e)||this._inject(e,n,o)},t.prototype.extract=function(e,n,o){var a=o.get(n,Kr),u=Array.isArray(a)?a[0]:a;return u?this._b3SinglePropagator.extract(e,n,o):this._b3MultiPropagator.extract(e,n,o)},t.prototype.fields=function(){return this._fields},t}()});var sI={};it(sI,{B3InjectEncoding:()=>Eo,B3Propagator:()=>zz,B3_CONTEXT_HEADER:()=>Kr,X_B3_FLAGS:()=>_o,X_B3_PARENT_SPAN_ID:()=>yd,X_B3_SAMPLED:()=>yo,X_B3_SPAN_ID:()=>vo,X_B3_TRACE_ID:()=>mo});var lI=E(()=>{uI();So();_d()});var cI,fI=E(()=>{cI="exception"});var Wz,pI,Xz,Sd,Ed=E(()=>{w();F();Ct();fI();Wz=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},pI=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},Xz=function(t,e,n){if(n||arguments.length===2)for(var o=0,a=e.length,u;o<a;o++)(u||!(o in e))&&(u||(u=Array.prototype.slice.call(e,0,o)),u[o]=e[o]);return t.concat(u||Array.prototype.slice.call(e))},Sd=function(){function t(e,n,o,a,u,i,r,s,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:uh.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=o,this._spanContext=a,this.parentSpanId=i,this.kind=u,this.links=r;var p=Date.now();this._performanceStartTime=kt.now(),this._performanceOffset=p-(this._performanceStartTime+$i()),this._startTimeProvided=s!=null,this.startTime=this._getTime(s??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?(A.warn("Invalid attribute key: "+e),this):lu(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):(A.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,o;try{for(var a=Wz(Object.entries(e)),u=a.next();!u.done;u=a.next()){var i=pI(u.value,2),r=i[0],s=i[1];this.setAttribute(r,s)}}catch(l){n={error:l}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,o){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return A.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&A.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),vu(n)&&(vu(o)||(o=n),n=void 0);var a=Dr(n);return this.events.push({name:e,attributes:a,time:this._getTime(o),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,Xz([],pI(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=e,this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){A.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=Gf(this.startTime,this.endTime),this._duration[0]<0&&(A.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&&A.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<kt.now())return mu(e+this._performanceOffset);if(typeof e=="number")return be(e);if(e instanceof Date)return be(e.getTime());if(Ki(e))return e;if(this._startTimeProvided)return be(Date.now());var n=kt.now()-this._performanceStartTime;return yu(this.startTime,be(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var o={};typeof e=="string"?o[li]=e:e&&(e.code?o[si]=e.code.toString():e.name&&(o[si]=e.name),e.message&&(o[li]=e.message),e.stack&&(o[Ll]=e.stack)),o[si]||o[li]?this.addEvent(cI,o,n):A.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&&A.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,o=this._attributeValueLengthLimit;return o<=0?(A.warn("Attribute value limit must be positive, got "+o),e):typeof e=="string"?this._truncateToLimitUtil(e,o):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,o):a}):e},t}()});var wt,To=E(()=>{(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(wt||(wt={}))});var zr,Vs=E(()=>{To();zr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:wt.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Ht,ks=E(()=>{To();Ht=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:wt.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var go,Td=E(()=>{w();F();Vs();ks();go=function(){function t(e){var n,o,a,u;this._root=e.root,this._root||(Ae(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ht),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Ht,this._remoteParentNotSampled=(o=e.remoteParentNotSampled)!==null&&o!==void 0?o:new zr,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Ht,this._localParentNotSampled=(u=e.localParentNotSampled)!==null&&u!==void 0?u:new zr}return t.prototype.shouldSample=function(e,n,o,a,u,i){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,o,a,u,i):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,o,a,u,i):this._remoteParentNotSampled.shouldSample(e,n,o,a,u,i):r.traceFlags&J.SAMPLED?this._localParentSampled.shouldSample(e,n,o,a,u,i):this._localParentNotSampled.shouldSample(e,n,o,a,u,i)},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 Bs,gd=E(()=>{w();To();Bs=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:Yt(n)&&this._accumulate(n)<this._upperBound?wt.RECORD_AND_SAMPLED:wt.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,o=0;o<e.length/8;o++){var a=o*8,u=parseInt(e.slice(a,a+8),16);n=(n^u)>>>0}return n},t}()});function Gs(){return{sampler:Od(Jz),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:q().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:q().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:q().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:q().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:q().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:q().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:q().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:q().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Od(t){switch(t===void 0&&(t=q()),t.OTEL_TRACES_SAMPLER){case We.AlwaysOn:return new Ht;case We.AlwaysOff:return new zr;case We.ParentBasedAlwaysOn:return new go({root:new Ht});case We.ParentBasedAlwaysOff:return new go({root:new zr});case We.TraceIdRatio:return new Bs(dI(t));case We.ParentBasedTraceIdRatio:return new go({root:new Bs(dI(t))});default:return A.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Qz+'".'),new Ht}}function dI(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return A.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Kn+"."),Kn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(A.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Kn+"."),Kn):e<0||e>1?(A.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Kn+"."),Kn):e}var Jz,Qz,Kn,Ad=E(()=>{w();F();Vs();ks();Td();gd();Jz=q(),Qz=We.AlwaysOn,Kn=1});function hI(t){var e={sampler:Od()},n=Gs(),o=Object.assign({},n,e,t);return o.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),o.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),o}function mI(t){var e,n,o,a,u,i,r,s,l,c,p,m,f=Object.assign({},t.spanLimits),v=pu();return f.attributeCountLimit=(i=(u=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(o=t.generalLimits)===null||o===void 0?void 0:o.attributeCountLimit)!==null&&a!==void 0?a:v.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&u!==void 0?u:v.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:Rn,f.attributeValueLengthLimit=(m=(p=(c=(s=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&s!==void 0?s:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:v.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:v.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&m!==void 0?m:Nn,Object.assign({},t,{spanLimits:f})}var bd=E(()=>{Ad();F()});var vI,yI=E(()=>{w();F();vI=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var o=q();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:o.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:o.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:o.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:o.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Br(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(A.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&&A.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(A.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,o){for(var a=[],u=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),i=0,r=u;i<r;i++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(o)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,o){var a=setTimeout(function(){o(new Error("Timeout"))},e._exportTimeoutMillis);ke.with(Fi(ke.active()),function(){var u;e._finishedSpans.length<=e._maxExportBatchSize?(u=e._finishedSpans,e._finishedSpans=[]):u=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var i=function(){return e._exporter.export(u,function(p){var m;clearTimeout(a),p.code===ee.SUCCESS?n():o((m=p.error)!==null&&m!==void 0?m:new Error("BatchSpanProcessor: span export failed"))})},r=null,s=0,l=u.length;s<l;s++){var c=u[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?i():Promise.all(r).then(i,function(p){Ae(p),o(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(o){e._isExporting=!1,Ae(o)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),Yi(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var Zz,Oo,_I=E(()=>{yI();Zz=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(o[u]=a[u])},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 o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}}(),Oo=function(t){Zz(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(vI)});function SI(t){return function(){for(var n=0;n<t/4;n++)qs.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(qs[n]>0);n++)n===t-1&&(qs[t-1]=1);return qs.toString("hex",0,t)}}var eW,EI,xd,qs,TI=E(()=>{eW=8,EI=16,xd=function(){function t(){this.generateTraceId=SI(EI),this.generateSpanId=SI(eW)}return t}(),qs=Buffer.allocUnsafe(EI)});var gI=E(()=>{_I();TI()});var Fs=E(()=>{gI()});var Nd,OI=E(()=>{w();F();Ed();bd();Fs();Nd=function(){function t(e,n,o){this._tracerProvider=o;var a=hI(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new xd,this.resource=o.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,o){var a,u,i;n===void 0&&(n={}),o===void 0&&(o=ke.active()),n.root&&(o=X.deleteSpan(o));var r=X.getSpan(o);if(Ce(o)){A.debug("Instrumentation suppressed, returning Noop Span");var s=X.wrapSpanContext(ih);return s}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,m,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,m=l.traceState,f=l.spanId);var v=(a=n.kind)!==null&&a!==void 0?a:ah.INTERNAL,S=((u=n.links)!==null&&u!==void 0?u:[]).map(function(j){return{context:j.context,attributes:Dr(j.attributes)}}),_=Dr(n.attributes),O=this._sampler.shouldSample(o,p,e,v,_,S);m=(i=O.traceState)!==null&&i!==void 0?i:m;var g=O.decision===ht.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,b={traceId:p,spanId:c,traceFlags:g,traceState:m};if(O.decision===ht.NOT_RECORD){A.debug("Recording is off, propagating context in a non-recording span");var s=X.wrapSpanContext(b);return s}var L=Dr(Object.assign(_,O.attributes)),B=new Sd(this,o,e,b,v,f,S,n.startTime,void 0,L);return B},t.prototype.startActiveSpan=function(e,n,o,a){var u,i,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(u=n,r=o):(u=n,i=o,r=a);var s=i??ke.active(),l=this.startSpan(e,u,s),c=X.setSpan(s,l);return ke.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 Hs,AI,bI=E(()=>{F();Hs=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},AI=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,o=[];try{for(var a=Hs(this._spanProcessors),u=a.next();!u.done;u=a.next()){var i=u.value;o.push(i.forceFlush())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(o).then(function(){r()}).catch(function(s){Ae(s||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var o,a;try{for(var u=Hs(this._spanProcessors),i=u.next();!i.done;i=u.next()){var r=i.value;r.onStart(e,n)}}catch(s){o={error:s}}finally{try{i&&!i.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}},t.prototype.onEnd=function(e){var n,o;try{for(var a=Hs(this._spanProcessors),u=a.next();!u.done;u=a.next()){var i=u.value;i.onEnd(e)}}catch(r){n={error:r}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,o=[];try{for(var a=Hs(this._spanProcessors),u=a.next();!u.done;u=a.next()){var i=u.value;o.push(i.shutdown())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,s){Promise.all(o).then(function(){r()},s)})},t}()});var Rd,Pd=E(()=>{Rd=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 yr,tW,xI=E(()=>{w();F();bu();Ao();Ad();bI();Pd();Fs();bd();(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(yr||(yr={}));tW=function(){function t(e){e===void 0&&(e={});var n;this._registeredSpanProcessors=[],this._tracers=new Map;var o=Zf({},Gs(),mI(e));this.resource=(n=o.resource)!==null&&n!==void 0?n:Gt.empty(),this.resource=Gt.default().merge(this.resource),this._config=Object.assign({},o,{resource:this.resource});var a=this._buildExporterFromEnv();if(a!==void 0){var u=new Oo(a);this.activeSpanProcessor=u}else this.activeSpanProcessor=new Rd}return t.prototype.getTracer=function(e,n,o){var a=e+"@"+(n||"")+":"+(o?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new Nd({name:e,version:n,schemaUrl:o?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return A.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new AI(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&&ke.setGlobalContextManager(e.contextManager),e.propagator&&at.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(o){return new Promise(function(a){var u,i=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),u=yr.timeout},e);o.forceFlush().then(function(){clearTimeout(i),u!==yr.timeout&&(u=yr.resolved,a(u))}).catch(function(r){clearTimeout(i),u=yr.error,a(r)})})});return new Promise(function(o,a){Promise.all(n).then(function(u){var i=u.filter(function(r){return r!==yr.resolved});i.length>0?a(i):o()}).catch(function(u){return a([u])})})},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(q().OTEL_PROPAGATORS)),o=n.map(function(u){var i=e._getPropagator(u);return i||A.warn('Propagator "'+u+'" requested through environment variable is unavailable.'),i}),a=o.reduce(function(u,i){return i&&u.push(i),u},[]);if(a.length!==0)return n.length===1?a[0]:new Ff({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=q().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||A.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new $f}],["baggage",function(){return new wf}]]),t._registeredExporters=new Map,t}()});var rW,nW,NI=E(()=>{F();rW=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nW=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},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:Bt(e.startTime),duration:Bt(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var o,a;try{for(var u=rW(e),i=u.next();!i.done;i=u.next()){var r=i.value;console.dir(this._exportInfo(r),{depth:3})}}catch(s){o={error:s}}finally{try{i&&!i.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}if(n)return n({code:ee.SUCCESS})},t}()});var iW,oW,aW,RI=E(()=>{F();iW=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},oW=function(t,e,n){if(n||arguments.length===2)for(var o=0,a=e.length,u;o<a;o++)(u||!(o in e))&&(u||(u=Array.prototype.slice.call(e,0,o)),u[o]=e[o]);return t.concat(u||Array.prototype.slice.call(e))},aW=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var o;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(o=this._finishedSpans).push.apply(o,oW([],iW(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 PI=E(()=>{});var uW,sW,lW,wI=E(()=>{w();F();uW=function(t,e,n,o){function a(u){return u instanceof n?u:new n(function(i){i(u)})}return new(n||(n=Promise))(function(u,i){function r(c){try{l(o.next(c))}catch(p){i(p)}}function s(c){try{l(o.throw(c))}catch(p){i(p)}}function l(c){c.done?u(c.value):a(c.value).then(r,s)}l((o=o.apply(t,e||[])).next())})},sW=function(t,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},o,a,u,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(l){return function(c){return s([l,c])}}function s(l){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=1,a&&(u=l[0]&2?a.return:l[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,l[1])).done)return u;switch(a=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=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(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){n.label=l[1];break}if(l[0]===6&&n.label<u[1]){n.label=u[1],u=l;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(l);break}u[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{o=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},lW=function(){function t(e){this._exporter=e,this._shutdownOnce=new Br(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return uW(this,void 0,void 0,function(){return sW(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,o,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&J.SAMPLED){var u=function(){return Xi._export(n._exporter,[e]).then(function(r){var s;r.code!==ee.SUCCESS&&Ae((s=r.error)!==null&&s!==void 0?s:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){Ae(r)})};if(e.resource.asyncAttributesPending){var i=(a=(o=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(o).then(function(){return i!=null&&n._unresolvedExports.delete(i),u()},function(r){return Ae(r)});i!=null&&this._unresolvedExports.add(i)}else u()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var MI=E(()=>{});var II=E(()=>{});var LI=E(()=>{});var CI=E(()=>{});var UI=E(()=>{});var wd={};it(wd,{AlwaysOffSampler:()=>zr,AlwaysOnSampler:()=>Ht,BasicTracerProvider:()=>tW,BatchSpanProcessor:()=>Oo,ConsoleSpanExporter:()=>nW,ForceFlushState:()=>yr,InMemorySpanExporter:()=>aW,NoopSpanProcessor:()=>Rd,ParentBasedSampler:()=>go,RandomIdGenerator:()=>xd,SamplingDecision:()=>wt,SimpleSpanProcessor:()=>lW,Span:()=>Sd,TraceIdRatioBasedSampler:()=>Bs,Tracer:()=>Nd});var Ao=E(()=>{OI();xI();Fs();NI();RI();PI();wI();MI();Pd();Vs();ks();Td();gd();To();Ed();II();LI();CI();UI()});var bo=y((Rle,DI)=>{var cW="2.0.0",fW=Number.MAX_SAFE_INTEGER||9007199254740991,pW=16,dW=256-6,hW=["major","premajor","minor","preminor","patch","prepatch","prerelease"];DI.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:pW,MAX_SAFE_BUILD_LENGTH:dW,MAX_SAFE_INTEGER:fW,RELEASE_TYPES:hW,SEMVER_SPEC_VERSION:cW,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var xo=y((Ple,VI)=>{var mW=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};VI.exports=mW});var zn=y((jt,kI)=>{var{MAX_SAFE_COMPONENT_LENGTH:Md,MAX_SAFE_BUILD_LENGTH:vW,MAX_LENGTH:yW}=bo(),_W=xo();jt=kI.exports={};var SW=jt.re=[],EW=jt.safeRe=[],x=jt.src=[],N=jt.t={},TW=0,Id="[a-zA-Z0-9-]",gW=[["\\s",1],["\\d",yW],[Id,vW]],OW=t=>{for(let[e,n]of gW)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},D=(t,e,n)=>{let o=OW(e),a=TW++;_W(t,a,e),N[t]=a,x[a]=e,SW[a]=new RegExp(e,n?"g":void 0),EW[a]=new RegExp(o,n?"g":void 0)};D("NUMERICIDENTIFIER","0|[1-9]\\d*");D("NUMERICIDENTIFIERLOOSE","\\d+");D("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Id}*`);D("MAINVERSION",`(${x[N.NUMERICIDENTIFIER]})\\.(${x[N.NUMERICIDENTIFIER]})\\.(${x[N.NUMERICIDENTIFIER]})`);D("MAINVERSIONLOOSE",`(${x[N.NUMERICIDENTIFIERLOOSE]})\\.(${x[N.NUMERICIDENTIFIERLOOSE]})\\.(${x[N.NUMERICIDENTIFIERLOOSE]})`);D("PRERELEASEIDENTIFIER",`(?:${x[N.NUMERICIDENTIFIER]}|${x[N.NONNUMERICIDENTIFIER]})`);D("PRERELEASEIDENTIFIERLOOSE",`(?:${x[N.NUMERICIDENTIFIERLOOSE]}|${x[N.NONNUMERICIDENTIFIER]})`);D("PRERELEASE",`(?:-(${x[N.PRERELEASEIDENTIFIER]}(?:\\.${x[N.PRERELEASEIDENTIFIER]})*))`);D("PRERELEASELOOSE",`(?:-?(${x[N.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${x[N.PRERELEASEIDENTIFIERLOOSE]})*))`);D("BUILDIDENTIFIER",`${Id}+`);D("BUILD",`(?:\\+(${x[N.BUILDIDENTIFIER]}(?:\\.${x[N.BUILDIDENTIFIER]})*))`);D("FULLPLAIN",`v?${x[N.MAINVERSION]}${x[N.PRERELEASE]}?${x[N.BUILD]}?`);D("FULL",`^${x[N.FULLPLAIN]}$`);D("LOOSEPLAIN",`[v=\\s]*${x[N.MAINVERSIONLOOSE]}${x[N.PRERELEASELOOSE]}?${x[N.BUILD]}?`);D("LOOSE",`^${x[N.LOOSEPLAIN]}$`);D("GTLT","((?:<|>)?=?)");D("XRANGEIDENTIFIERLOOSE",`${x[N.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);D("XRANGEIDENTIFIER",`${x[N.NUMERICIDENTIFIER]}|x|X|\\*`);D("XRANGEPLAIN",`[v=\\s]*(${x[N.XRANGEIDENTIFIER]})(?:\\.(${x[N.XRANGEIDENTIFIER]})(?:\\.(${x[N.XRANGEIDENTIFIER]})(?:${x[N.PRERELEASE]})?${x[N.BUILD]}?)?)?`);D("XRANGEPLAINLOOSE",`[v=\\s]*(${x[N.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[N.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[N.XRANGEIDENTIFIERLOOSE]})(?:${x[N.PRERELEASELOOSE]})?${x[N.BUILD]}?)?)?`);D("XRANGE",`^${x[N.GTLT]}\\s*${x[N.XRANGEPLAIN]}$`);D("XRANGELOOSE",`^${x[N.GTLT]}\\s*${x[N.XRANGEPLAINLOOSE]}$`);D("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Md}})(?:\\.(\\d{1,${Md}}))?(?:\\.(\\d{1,${Md}}))?`);D("COERCE",`${x[N.COERCEPLAIN]}(?:$|[^\\d])`);D("COERCEFULL",x[N.COERCEPLAIN]+`(?:${x[N.PRERELEASE]})?(?:${x[N.BUILD]})?(?:$|[^\\d])`);D("COERCERTL",x[N.COERCE],!0);D("COERCERTLFULL",x[N.COERCEFULL],!0);D("LONETILDE","(?:~>?)");D("TILDETRIM",`(\\s*)${x[N.LONETILDE]}\\s+`,!0);jt.tildeTrimReplace="$1~";D("TILDE",`^${x[N.LONETILDE]}${x[N.XRANGEPLAIN]}$`);D("TILDELOOSE",`^${x[N.LONETILDE]}${x[N.XRANGEPLAINLOOSE]}$`);D("LONECARET","(?:\\^)");D("CARETTRIM",`(\\s*)${x[N.LONECARET]}\\s+`,!0);jt.caretTrimReplace="$1^";D("CARET",`^${x[N.LONECARET]}${x[N.XRANGEPLAIN]}$`);D("CARETLOOSE",`^${x[N.LONECARET]}${x[N.XRANGEPLAINLOOSE]}$`);D("COMPARATORLOOSE",`^${x[N.GTLT]}\\s*(${x[N.LOOSEPLAIN]})$|^$`);D("COMPARATOR",`^${x[N.GTLT]}\\s*(${x[N.FULLPLAIN]})$|^$`);D("COMPARATORTRIM",`(\\s*)${x[N.GTLT]}\\s*(${x[N.LOOSEPLAIN]}|${x[N.XRANGEPLAIN]})`,!0);jt.comparatorTrimReplace="$1$2$3";D("HYPHENRANGE",`^\\s*(${x[N.XRANGEPLAIN]})\\s+-\\s+(${x[N.XRANGEPLAIN]})\\s*$`);D("HYPHENRANGELOOSE",`^\\s*(${x[N.XRANGEPLAINLOOSE]})\\s+-\\s+(${x[N.XRANGEPLAINLOOSE]})\\s*$`);D("STAR","(<|>)?=?\\s*\\*");D("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");D("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var js=y((wle,BI)=>{var AW=Object.freeze({loose:!0}),bW=Object.freeze({}),xW=t=>t?typeof t!="object"?AW:t:bW;BI.exports=xW});var Ld=y((Mle,FI)=>{var GI=/^[0-9]+$/,qI=(t,e)=>{let n=GI.test(t),o=GI.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1},NW=(t,e)=>qI(e,t);FI.exports={compareIdentifiers:qI,rcompareIdentifiers:NW}});var xe=y((Ile,$I)=>{var Ys=xo(),{MAX_LENGTH:HI,MAX_SAFE_INTEGER:$s}=bo(),{safeRe:jI,t:YI}=zn(),RW=js(),{compareIdentifiers:Wn}=Ld(),Je=class{constructor(e,n){if(n=RW(n),e instanceof Je){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>HI)throw new TypeError(`version is longer than ${HI} characters`);Ys("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let o=e.trim().match(n.loose?jI[YI.LOOSE]:jI[YI.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>$s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>$s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>$s||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let u=+a;if(u>=0&&u<$s)return u}return a}):this.prerelease=[],this.build=o[5]?o[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(Ys("SemVer.compare",this.version,this.options,e),!(e instanceof Je)){if(typeof e=="string"&&e===this.version)return 0;e=new Je(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Je||(e=new Je(e,this.options)),Wn(this.major,e.major)||Wn(this.minor,e.minor)||Wn(this.patch,e.patch)}comparePre(e){if(e instanceof Je||(e=new Je(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 o=this.prerelease[n],a=e.prerelease[n];if(Ys("prerelease compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return Wn(o,a)}while(++n)}compareBuild(e){e instanceof Je||(e=new Je(e,this.options));let n=0;do{let o=this.build[n],a=e.build[n];if(Ys("build compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return Wn(o,a)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);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(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let u=[n,a];o===!1&&(u=[n]),Wn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};$I.exports=Je});var Wr=y((Lle,zI)=>{var KI=xe(),PW=(t,e,n=!1)=>{if(t instanceof KI)return t;try{return new KI(t,e)}catch(o){if(!n)return null;throw o}};zI.exports=PW});var XI=y((Cle,WI)=>{var wW=Wr(),MW=(t,e)=>{let n=wW(t,e);return n?n.version:null};WI.exports=MW});var QI=y((Ule,JI)=>{var IW=Wr(),LW=(t,e)=>{let n=IW(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};JI.exports=LW});var tL=y((Dle,eL)=>{var ZI=xe(),CW=(t,e,n,o,a)=>{typeof n=="string"&&(a=o,o=n,n=void 0);try{return new ZI(t instanceof ZI?t.version:t,n).inc(e,o,a).version}catch{return null}};eL.exports=CW});var iL=y((Vle,nL)=>{var rL=Wr(),UW=(t,e)=>{let n=rL(t,null,!0),o=rL(e,null,!0),a=n.compare(o);if(a===0)return null;let u=a>0,i=u?n:o,r=u?o:n,s=!!i.prerelease.length;if(!!r.prerelease.length&&!s)return!r.patch&&!r.minor?"major":i.patch?"patch":i.minor?"minor":"major";let c=s?"pre":"";return n.major!==o.major?c+"major":n.minor!==o.minor?c+"minor":n.patch!==o.patch?c+"patch":"prerelease"};nL.exports=UW});var aL=y((kle,oL)=>{var DW=xe(),VW=(t,e)=>new DW(t,e).major;oL.exports=VW});var sL=y((Ble,uL)=>{var kW=xe(),BW=(t,e)=>new kW(t,e).minor;uL.exports=BW});var cL=y((Gle,lL)=>{var GW=xe(),qW=(t,e)=>new GW(t,e).patch;lL.exports=qW});var pL=y((qle,fL)=>{var FW=Wr(),HW=(t,e)=>{let n=FW(t,e);return n&&n.prerelease.length?n.prerelease:null};fL.exports=HW});var rt=y((Fle,hL)=>{var dL=xe(),jW=(t,e,n)=>new dL(t,n).compare(new dL(e,n));hL.exports=jW});var vL=y((Hle,mL)=>{var YW=rt(),$W=(t,e,n)=>YW(e,t,n);mL.exports=$W});var _L=y((jle,yL)=>{var KW=rt(),zW=(t,e)=>KW(t,e,!0);yL.exports=zW});var Ks=y((Yle,EL)=>{var SL=xe(),WW=(t,e,n)=>{let o=new SL(t,n),a=new SL(e,n);return o.compare(a)||o.compareBuild(a)};EL.exports=WW});var gL=y(($le,TL)=>{var XW=Ks(),JW=(t,e)=>t.sort((n,o)=>XW(n,o,e));TL.exports=JW});var AL=y((Kle,OL)=>{var QW=Ks(),ZW=(t,e)=>t.sort((n,o)=>QW(o,n,e));OL.exports=ZW});var No=y((zle,bL)=>{var eX=rt(),tX=(t,e,n)=>eX(t,e,n)>0;bL.exports=tX});var zs=y((Wle,xL)=>{var rX=rt(),nX=(t,e,n)=>rX(t,e,n)<0;xL.exports=nX});var Cd=y((Xle,NL)=>{var iX=rt(),oX=(t,e,n)=>iX(t,e,n)===0;NL.exports=oX});var Ud=y((Jle,RL)=>{var aX=rt(),uX=(t,e,n)=>aX(t,e,n)!==0;RL.exports=uX});var Ws=y((Qle,PL)=>{var sX=rt(),lX=(t,e,n)=>sX(t,e,n)>=0;PL.exports=lX});var Xs=y((Zle,wL)=>{var cX=rt(),fX=(t,e,n)=>cX(t,e,n)<=0;wL.exports=fX});var Dd=y((ece,ML)=>{var pX=Cd(),dX=Ud(),hX=No(),mX=Ws(),vX=zs(),yX=Xs(),_X=(t,e,n,o)=>{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 pX(t,n,o);case"!=":return dX(t,n,o);case">":return hX(t,n,o);case">=":return mX(t,n,o);case"<":return vX(t,n,o);case"<=":return yX(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};ML.exports=_X});var LL=y((tce,IL)=>{var SX=xe(),EX=Wr(),{safeRe:Js,t:Qs}=zn(),TX=(t,e)=>{if(t instanceof SX)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?Js[Qs.COERCEFULL]:Js[Qs.COERCE]);else{let s=e.includePrerelease?Js[Qs.COERCERTLFULL]:Js[Qs.COERCERTL],l;for(;(l=s.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),s.lastIndex=l.index+l[1].length+l[2].length;s.lastIndex=-1}if(n===null)return null;let o=n[2],a=n[3]||"0",u=n[4]||"0",i=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return EX(`${o}.${a}.${u}${i}${r}`,e)};IL.exports=TX});var UL=y((rce,CL)=>{var Vd=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}};CL.exports=Vd});var nt=y((nce,BL)=>{var Xr=class{constructor(e,n){if(n=OX(n),e instanceof Xr)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new Xr(e.raw,n);if(e instanceof kd)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(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(a=>!VL(a[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&wX(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 o=((this.options.includePrerelease&&RX)|(this.options.loose&&PX))+":"+e,a=DL.get(o);if(a)return a;let u=this.options.loose,i=u?He[De.HYPHENRANGELOOSE]:He[De.HYPHENRANGE];e=e.replace(i,GX(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(He[De.COMPARATORTRIM],bX),te("comparator trim",e),e=e.replace(He[De.TILDETRIM],xX),te("tilde trim",e),e=e.replace(He[De.CARETTRIM],NX),te("caret trim",e);let r=e.split(" ").map(p=>MX(p,this.options)).join(" ").split(/\s+/).map(p=>BX(p,this.options));u&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match(He[De.COMPARATORLOOSE])))),te("range list",r);let s=new Map,l=r.map(p=>new kd(p,this.options));for(let p of l){if(VL(p))return[p];s.set(p.value,p)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return DL.set(o,c),c}intersects(e,n){if(!(e instanceof Xr))throw new TypeError("a Range is required");return this.set.some(o=>kL(o,n)&&e.set.some(a=>kL(a,n)&&o.every(u=>a.every(i=>u.intersects(i,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AX(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(qX(this.set[n],e,this.options))return!0;return!1}};BL.exports=Xr;var gX=UL(),DL=new gX,OX=js(),kd=Ro(),te=xo(),AX=xe(),{safeRe:He,t:De,comparatorTrimReplace:bX,tildeTrimReplace:xX,caretTrimReplace:NX}=zn(),{FLAG_INCLUDE_PRERELEASE:RX,FLAG_LOOSE:PX}=bo(),VL=t=>t.value==="<0.0.0-0",wX=t=>t.value==="",kL=(t,e)=>{let n=!0,o=t.slice(),a=o.pop();for(;n&&o.length;)n=o.every(u=>a.intersects(u,e)),a=o.pop();return n},MX=(t,e)=>(te("comp",t,e),t=CX(t,e),te("caret",t),t=IX(t,e),te("tildes",t),t=DX(t,e),te("xrange",t),t=kX(t,e),te("stars",t),t),Ve=t=>!t||t.toLowerCase()==="x"||t==="*",IX=(t,e)=>t.trim().split(/\s+/).map(n=>LX(n,e)).join(" "),LX=(t,e)=>{let n=e.loose?He[De.TILDELOOSE]:He[De.TILDE];return t.replace(n,(o,a,u,i,r)=>{te("tilde",t,o,a,u,i,r);let s;return Ve(a)?s="":Ve(u)?s=`>=${a}.0.0 <${+a+1}.0.0-0`:Ve(i)?s=`>=${a}.${u}.0 <${a}.${+u+1}.0-0`:r?(te("replaceTilde pr",r),s=`>=${a}.${u}.${i}-${r} <${a}.${+u+1}.0-0`):s=`>=${a}.${u}.${i} <${a}.${+u+1}.0-0`,te("tilde return",s),s})},CX=(t,e)=>t.trim().split(/\s+/).map(n=>UX(n,e)).join(" "),UX=(t,e)=>{te("caret",t,e);let n=e.loose?He[De.CARETLOOSE]:He[De.CARET],o=e.includePrerelease?"-0":"";return t.replace(n,(a,u,i,r,s)=>{te("caret",t,a,u,i,r,s);let l;return Ve(u)?l="":Ve(i)?l=`>=${u}.0.0${o} <${+u+1}.0.0-0`:Ve(r)?u==="0"?l=`>=${u}.${i}.0${o} <${u}.${+i+1}.0-0`:l=`>=${u}.${i}.0${o} <${+u+1}.0.0-0`:s?(te("replaceCaret pr",s),u==="0"?i==="0"?l=`>=${u}.${i}.${r}-${s} <${u}.${i}.${+r+1}-0`:l=`>=${u}.${i}.${r}-${s} <${u}.${+i+1}.0-0`:l=`>=${u}.${i}.${r}-${s} <${+u+1}.0.0-0`):(te("no pr"),u==="0"?i==="0"?l=`>=${u}.${i}.${r}${o} <${u}.${i}.${+r+1}-0`:l=`>=${u}.${i}.${r}${o} <${u}.${+i+1}.0-0`:l=`>=${u}.${i}.${r} <${+u+1}.0.0-0`),te("caret return",l),l})},DX=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>VX(n,e)).join(" ")),VX=(t,e)=>{t=t.trim();let n=e.loose?He[De.XRANGELOOSE]:He[De.XRANGE];return t.replace(n,(o,a,u,i,r,s)=>{te("xRange",t,o,a,u,i,r,s);let l=Ve(u),c=l||Ve(i),p=c||Ve(r),m=p;return a==="="&&m&&(a=""),s=e.includePrerelease?"-0":"",l?a===">"||a==="<"?o="<0.0.0-0":o="*":a&&m?(c&&(i=0),r=0,a===">"?(a=">=",c?(u=+u+1,i=0,r=0):(i=+i+1,r=0)):a==="<="&&(a="<",c?u=+u+1:i=+i+1),a==="<"&&(s="-0"),o=`${a+u}.${i}.${r}${s}`):c?o=`>=${u}.0.0${s} <${+u+1}.0.0-0`:p&&(o=`>=${u}.${i}.0${s} <${u}.${+i+1}.0-0`),te("xRange return",o),o})},kX=(t,e)=>(te("replaceStars",t,e),t.trim().replace(He[De.STAR],"")),BX=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(He[e.includePrerelease?De.GTE0PRE:De.GTE0],"")),GX=t=>(e,n,o,a,u,i,r,s,l,c,p,m)=>(Ve(o)?n="":Ve(a)?n=`>=${o}.0.0${t?"-0":""}`:Ve(u)?n=`>=${o}.${a}.0${t?"-0":""}`:i?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ve(l)?s="":Ve(c)?s=`<${+l+1}.0.0-0`:Ve(p)?s=`<${l}.${+c+1}.0-0`:m?s=`<=${l}.${c}.${p}-${m}`:t?s=`<${l}.${c}.${+p+1}-0`:s=`<=${s}`,`${n} ${s}`.trim()),qX=(t,e,n)=>{for(let o=0;o<t.length;o++)if(!t[o].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let o=0;o<t.length;o++)if(te(t[o].semver),t[o].semver!==kd.ANY&&t[o].semver.prerelease.length>0){let a=t[o].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var Ro=y((ice,YL)=>{var Po=Symbol("SemVer ANY"),Xn=class{static get ANY(){return Po}constructor(e,n){if(n=GL(n),e instanceof Xn){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Gd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Po?this.value="":this.value=this.operator+this.semver.version,Gd("comp",this)}parse(e){let n=this.options.loose?qL[FL.COMPARATORLOOSE]:qL[FL.COMPARATOR],o=e.match(n);if(!o)throw new TypeError(`Invalid comparator: ${e}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new HL(o[2],this.options.loose):this.semver=Po}toString(){return this.value}test(e){if(Gd("Comparator.test",e,this.options.loose),this.semver===Po||e===Po)return!0;if(typeof e=="string")try{e=new HL(e,this.options)}catch{return!1}return Bd(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof Xn))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new jL(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new jL(this.value,n).test(e.semver):(n=GL(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("=")||Bd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Bd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};YL.exports=Xn;var GL=js(),{safeRe:qL,t:FL}=zn(),Bd=Dd(),Gd=xo(),HL=xe(),jL=nt()});var wo=y((oce,$L)=>{var FX=nt(),HX=(t,e,n)=>{try{e=new FX(e,n)}catch{return!1}return e.test(t)};$L.exports=HX});var zL=y((ace,KL)=>{var jX=nt(),YX=(t,e)=>new jX(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));KL.exports=YX});var XL=y((uce,WL)=>{var $X=xe(),KX=nt(),zX=(t,e,n)=>{let o=null,a=null,u=null;try{u=new KX(e,n)}catch{return null}return t.forEach(i=>{u.test(i)&&(!o||a.compare(i)===-1)&&(o=i,a=new $X(o,n))}),o};WL.exports=zX});var QL=y((sce,JL)=>{var WX=xe(),XX=nt(),JX=(t,e,n)=>{let o=null,a=null,u=null;try{u=new XX(e,n)}catch{return null}return t.forEach(i=>{u.test(i)&&(!o||a.compare(i)===1)&&(o=i,a=new WX(o,n))}),o};JL.exports=JX});var t1=y((lce,e1)=>{var qd=xe(),QX=nt(),ZL=No(),ZX=(t,e)=>{t=new QX(t,e);let n=new qd("0.0.0");if(t.test(n)||(n=new qd("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){let a=t.set[o],u=null;a.forEach(i=>{let r=new qd(i.semver.version);switch(i.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!u||ZL(r,u))&&(u=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),u&&(!n||ZL(n,u))&&(n=u)}return n&&t.test(n)?n:null};e1.exports=ZX});var n1=y((cce,r1)=>{var e9=nt(),t9=(t,e)=>{try{return new e9(t,e).range||"*"}catch{return null}};r1.exports=t9});var Zs=y((fce,u1)=>{var r9=xe(),a1=Ro(),{ANY:n9}=a1,i9=nt(),o9=wo(),i1=No(),o1=zs(),a9=Xs(),u9=Ws(),s9=(t,e,n,o)=>{t=new r9(t,o),e=new i9(e,o);let a,u,i,r,s;switch(n){case">":a=i1,u=a9,i=o1,r=">",s=">=";break;case"<":a=o1,u=u9,i=i1,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o9(t,e,o))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,m=null;if(c.forEach(f=>{f.semver===n9&&(f=new a1(">=0.0.0")),p=p||f,m=m||f,a(f.semver,p.semver,o)?p=f:i(f.semver,m.semver,o)&&(m=f)}),p.operator===r||p.operator===s||(!m.operator||m.operator===r)&&u(t,m.semver))return!1;if(m.operator===s&&i(t,m.semver))return!1}return!0};u1.exports=s9});var l1=y((pce,s1)=>{var l9=Zs(),c9=(t,e,n)=>l9(t,e,">",n);s1.exports=c9});var f1=y((dce,c1)=>{var f9=Zs(),p9=(t,e,n)=>f9(t,e,"<",n);c1.exports=p9});var h1=y((hce,d1)=>{var p1=nt(),d9=(t,e,n)=>(t=new p1(t,n),e=new p1(e,n),t.intersects(e,n));d1.exports=d9});var v1=y((mce,m1)=>{var h9=wo(),m9=rt();m1.exports=(t,e,n)=>{let o=[],a=null,u=null,i=t.sort((c,p)=>m9(c,p,n));for(let c of i)h9(c,e,n)?(u=c,a||(a=c)):(u&&o.push([a,u]),u=null,a=null);a&&o.push([a,null]);let r=[];for(let[c,p]of o)c===p?r.push(c):!p&&c===i[0]?r.push("*"):p?c===i[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let s=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return s.length<l.length?s:e}});var g1=y((vce,T1)=>{var y1=nt(),Hd=Ro(),{ANY:Fd}=Hd,Mo=wo(),jd=rt(),v9=(t,e,n={})=>{if(t===e)return!0;t=new y1(t,n),e=new y1(e,n);let o=!1;e:for(let a of t.set){for(let u of e.set){let i=_9(a,u,n);if(o=o||i!==null,i)continue e}if(o)return!1}return!0},y9=[new Hd(">=0.0.0-0")],_1=[new Hd(">=0.0.0")],_9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Fd){if(e.length===1&&e[0].semver===Fd)return!0;n.includePrerelease?t=y9:t=_1}if(e.length===1&&e[0].semver===Fd){if(n.includePrerelease)return!0;e=_1}let o=new Set,a,u;for(let f of t)f.operator===">"||f.operator===">="?a=S1(a,f,n):f.operator==="<"||f.operator==="<="?u=E1(u,f,n):o.add(f.semver);if(o.size>1)return null;let i;if(a&&u){if(i=jd(a.semver,u.semver,n),i>0)return null;if(i===0&&(a.operator!==">="||u.operator!=="<="))return null}for(let f of o){if(a&&!Mo(f,String(a),n)||u&&!Mo(f,String(u),n))return null;for(let v of e)if(!Mo(f,String(v),n))return!1;return!0}let r,s,l,c,p=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,m=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&u.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(m&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===m.major&&f.semver.minor===m.minor&&f.semver.patch===m.patch&&(m=!1),f.operator===">"||f.operator===">="){if(r=S1(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Mo(a.semver,String(f),n))return!1}if(u){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(s=E1(u,f,n),s===f&&s!==u)return!1}else if(u.operator==="<="&&!Mo(u.semver,String(f),n))return!1}if(!f.operator&&(u||a)&&i!==0)return!1}return!(a&&l&&!u&&i!==0||u&&c&&!a&&i!==0||m||p)},S1=(t,e,n)=>{if(!t)return e;let o=jd(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},E1=(t,e,n)=>{if(!t)return e;let o=jd(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};T1.exports=v9});var x1=y((yce,b1)=>{var Yd=zn(),O1=bo(),S9=xe(),A1=Ld(),E9=Wr(),T9=XI(),g9=QI(),O9=tL(),A9=iL(),b9=aL(),x9=sL(),N9=cL(),R9=pL(),P9=rt(),w9=vL(),M9=_L(),I9=Ks(),L9=gL(),C9=AL(),U9=No(),D9=zs(),V9=Cd(),k9=Ud(),B9=Ws(),G9=Xs(),q9=Dd(),F9=LL(),H9=Ro(),j9=nt(),Y9=wo(),$9=zL(),K9=XL(),z9=QL(),W9=t1(),X9=n1(),J9=Zs(),Q9=l1(),Z9=f1(),e7=h1(),t7=v1(),r7=g1();b1.exports={parse:E9,valid:T9,clean:g9,inc:O9,diff:A9,major:b9,minor:x9,patch:N9,prerelease:R9,compare:P9,rcompare:w9,compareLoose:M9,compareBuild:I9,sort:L9,rsort:C9,gt:U9,lt:D9,eq:V9,neq:k9,gte:B9,lte:G9,cmp:q9,coerce:F9,Comparator:H9,Range:j9,satisfies:Y9,toComparators:$9,maxSatisfying:K9,minSatisfying:z9,minVersion:W9,validRange:X9,outside:J9,gtr:Q9,ltr:Z9,intersects:e7,simplifyRange:t7,subset:r7,SemVer:S9,re:Yd.re,src:Yd.src,tokens:Yd.t,SEMVER_SPEC_VERSION:O1.SEMVER_SPEC_VERSION,RELEASE_TYPES:O1.RELEASE_TYPES,compareIdentifiers:A1.compareIdentifiers,rcompareIdentifiers:A1.rcompareIdentifiers}});function o7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=R1(e,4),o=n[0],a=n[1],u=n[3],i=o.padStart(32,"0"),r=a.padStart(16,"0"),s=i7.test(u)?parseInt(u,16)&1:1;return{traceId:i,spanId:r,isRemote:!0,traceFlags:s}}var N1,R1,P1,$d,n7,i7,w1=E(()=>{w();F();N1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},R1=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),a,u=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)u.push(a.value)}catch(r){i={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},P1="uber-trace-id",$d="uberctx",n7=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=$d):(this._jaegerTraceHeader=e?.customTraceHeader||P1,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||$d)}return t.prototype.inject=function(e,n,o){var a,u,i=X.getSpanContext(e),r=at.getBaggage(e);if(i&&Ce(e)===!1){var s="0"+(i.traceFlags||J.NONE).toString(16);o.set(n,this._jaegerTraceHeader,i.traceId+":"+i.spanId+":0:"+s)}if(r)try{for(var l=N1(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=R1(c.value,2),m=p[0],f=p[1];o.set(n,this._jaegerBaggageHeaderPrefix+"-"+m,encodeURIComponent(f.value))}}catch(v){a={error:v}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,o){var a,u,i=this,r,s=o.get(n,this._jaegerTraceHeader),l=Array.isArray(s)?s[0]:s,c=o.keys(n).filter(function(O){return O.startsWith(i._jaegerBaggageHeaderPrefix+"-")}).map(function(O){var g=o.get(n,O);return{key:O.substring(i._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(g)?g[0]:g}}),p=e;if(typeof l=="string"){var m=o7(l);m&&(p=X.setSpanContext(p,m))}if(c.length===0)return p;var f=(r=at.getBaggage(e))!==null&&r!==void 0?r:at.createBaggage();try{for(var v=N1(c),S=v.next();!S.done;S=v.next()){var _=S.value;_.value!==void 0&&(f=f.setEntry(_.key,{value:decodeURIComponent(_.value)}))}}catch(O){a={error:O}}finally{try{S&&!S.done&&(u=v.return)&&u.call(v)}finally{if(a)throw a.error}}return p=at.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),i7=/^[0-9a-f]{1,2}$/i});var M1={};it(M1,{JaegerPropagator:()=>n7,UBER_BAGGAGE_HEADER_PREFIX:()=>$d,UBER_TRACE_ID_HEADER:()=>P1});var I1=E(()=>{w1()});var U1=y(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.NodeTracerProvider=void 0;var L1=tI(),el=(lI(),Y(sI)),C1=(Ao(),Y(wd)),a7=x1(),u7=(I1(),Y(M1)),tl=class extends C1.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=a7.gte(process.version,"14.8.0")?L1.AsyncLocalStorageContextManager:L1.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};rl.NodeTracerProvider=tl;tl._registeredPropagators=new Map([...C1.BasicTracerProvider._registeredPropagators,["b3",()=>new el.B3Propagator({injectEncoding:el.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new el.B3Propagator({injectEncoding:el.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new u7.JaegerPropagator]])});var V1=y(_r=>{"use strict";var s7=_r&&_r.__createBinding||(Object.create?function(t,e,n,o){o===void 0&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]}),D1=_r&&_r.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&s7(e,t,n)};Object.defineProperty(_r,"__esModule",{value:!0});D1(U1(),_r);D1((Ao(),Y(wd)),_r)});var k1=y(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.VERSION=void 0;nl.VERSION="0.52.1"});var B1=y(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.OTLPTraceExporter=void 0;var il=(F(),Y(Gr)),Kd=rd(),l7=(Os(),Y(zp)),c7=k1(),f7={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${c7.VERSION}`},zd=class extends Kd.OTLPGRPCExporterNodeBase{constructor(e={}){let n=Object.assign(Object.assign({},f7),il.baggageUtils.parseKeyPairsIntoRecord((0,il.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));super(e,n,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export",l7.ProtobufTraceSerializer)}getDefaultUrl(e){return(0,Kd.validateAndNormalizeUrl)(this.getUrlFromConfig(e))}getUrlFromConfig(e){return typeof e.url=="string"?e.url:(0,il.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||(0,il.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT||Kd.DEFAULT_COLLECTOR_URL}};ol.OTLPTraceExporter=zd});var G1=y(Jr=>{"use strict";var p7=Jr&&Jr.__createBinding||(Object.create?function(t,e,n,o){o===void 0&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){o===void 0&&(o=n),t[o]=e[n]}),d7=Jr&&Jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&p7(e,t,n)};Object.defineProperty(Jr,"__esModule",{value:!0});d7(B1(),Jr)});var Y1=je(Ol(),1),$1=je(Jn(),1),K1=je(cv(),1),z1=je(eC(),1),W1=je(tC(),1),X1=je(kO(),1);import m7 from"path";import v7 from"http";import{Session as y7}from"inspector/promises";import{createRequire as hq}from"module";var Hl=je(Ol(),1);import Qo from"path";import Fl from"os";var mq=hq(import.meta.url);function BO(t){let e=mq.resolve(t),n=Qo.dirname(e);for(;!Hl.default.existsSync(Qo.join(n,"package.json"));)n=Qo.dirname(n);let o=Hl.default.readFileSync(Qo.join(n,"package.json"),"utf-8");return JSON.parse(o)}var Zo=class{constructor(e){this.instance=e;let n=BO("@sentio/sdk"),o=BO("@sentio/runtime");console.log("Runtime version:",o.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let o=await this.instance.getConfig(e,n);if(o.executionConfig=Jd.fromPartial(sl.execution),o.contractConfigs)for(let a of o.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return o}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){sl.execution.sequential&&(e.bindings=e.bindings.sort(vq));for(let o of e.bindings)this.adjustDataBinding(o);try{let o=await this.instance.processBindings(e,n);return this.adjustResult(o.result),!o.configUpdated&&o.result?.states?.configUpdated&&(o.configUpdated=o.result?.states?.configUpdated),o}catch(o){throw this.sdkMinorVersion<=16&&(o.code===Fl.constants.errno.ECONNRESET||o.code===Fl.constants.errno.ECONNREFUSED||o.code===Fl.constants.errno.ECONNABORTED)&&process.exit(1),o}}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 vq(t,e){let n=GO(t)||new Date(0),o=GO(e)||new Date(0),a=n.getTime()-o.getTime();return a!==0?a:qO(t)-qO(e)}function GO(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 qO(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("process").then(t=>t.stdout.write(""));var gt=je(tR(),1);function rR(t,e){let n={transform:a=>{let u=[];typeof a.message=="object"?u.push(JSON.stringify(a.message)):u.push(a.message);let i=a[Symbol.for("splat")];if(i)for(let r in i){let s=i[r];typeof s=="object"?u.push(JSON.stringify(s)):u.push(s)}return a.message=u.join(" "),a}},o=(0,gt.createLogger)({format:gt.format.combine(gt.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,gt.format.errors({stack:!0}),t?gt.format.json():gt.format.simple()),level:e?"debug":"info",transports:[new gt.transports.Console]});console.log=(...a)=>o.info.call(o,...a),console.info=(...a)=>o.info.call(o,...a),console.warn=(...a)=>o.warn.call(o,...a),console.error=(...a)=>o.error.call(o,...a),console.debug=(...a)=>o.debug.call(o,...a)}import("process").then(t=>t.stdout.write(""));bu();Cn();var q1=je($M(),1),F1=je(QM(),1),Wd=je(V1(),1),H1=je(G1(),1);Ao();w();async function j1(t){t&&A.setLogger(new rh,ot.DEBUG);let e=await Au.detect(),n=new oo({resource:e,readers:[new Vu({exporter:new q1.OTLPMetricExporter}),new F1.PrometheusExporter({port:4041})]}),o=new Wd.NodeTracerProvider({resource:e}),a=new H1.OTLPTraceExporter,u=new Oo(a);o.addSpanProcessor(u),o.register(),Lo.setGlobalMeterProvider(n),X.setGlobalTracerProvider(o),["SIGINT","SIGTERM"].forEach(i=>{process.on(i,()=>h7())}),Lo.getMeter("processor").createGauge("up").record(1)}async function h7(){let t=X.getTracerProvider();if(t instanceof oh){let n=t.getDelegate();n instanceof Wd.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Lo.getMeterProvider();e instanceof oo&&e.shutdown().catch(console.error)}import("process").then(t=>t.stdout.write(""));var _7=[{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}],Qe=(0,K1.default)(_7,{partial:!0}),S7=process.env.LOG_LEVEL?.toUpperCase();rR(Qe["log-format"]==="json",S7==="debug"?!0:Qe.debug);console.debug("Starting with",Qe.target);await j1(Qe.debug);Error.stackTraceLimit=20;var E7=m7.resolve(Qe["chains-config"]),T7=Y1.default.readJsonSync(E7),g7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,O7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;Sr.INSTANCE.concurrency=g7??Qe.concurrency;Sr.INSTANCE.batchCount=O7??Qe["batch-count"];Sr.INSTANCE.chainQueryAPI=Qe["chainquery-server"];Sr.INSTANCE.priceFeedAPI=Qe["pricefeed-server"];for(let[t,e]of Object.entries(T7)){let n=e;if(n.ChainServer)Sr.INSTANCE.chainServer.set(t,n.ChainServer);else{let o=n.Https?.[0];o?Sr.INSTANCE.chainServer.set(t,o):console.error("not valid config for chain",t)}}console.debug("Starting Server",Qe);var al=(0,z1.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":$1.compressionAlgorithms.gzip}).use((0,X1.openTelemetryServerMiddleware)()).use(W1.errorDetailsServerMiddleware),Xd=new sh(async()=>{let t=await import(Qe.target);return console.debug("Module loaded",t),t},al.shutdown),A7=new Zo(Xd);al.add(Qd,A7);al.listen("0.0.0.0:"+Qe.port);console.log("Processor Server Started at:",Qe.port);var J1=4040,b7=v7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),o=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(o.get("t")||"1000",10)||1e3,u=new y7;u.connect(),await u.post("Profiler.enable"),await u.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:i}=await u.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(i)),u.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(J1);console.log("Metric Server Started at:",J1);process.on("SIGINT",function(){x7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Xd.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),Xd.unhandled=t)});function x7(t){al.forceShutdown(),console.log("RPC server shut down"),b7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("process").then(t=>t.stdout.write(""));
60
60
  /*! Bundled license information:
61
61
 
62
62
  safe-buffer/index.js: