@tanagram/lore 0.1.59 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
3
- var w5e=Object.create;var IM=Object.defineProperty;var M5e=Object.getOwnPropertyDescriptor;var P5e=Object.getOwnPropertyNames;var k5e=Object.getPrototypeOf,U5e=Object.prototype.hasOwnProperty;var Ue=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),es=(e,t)=>{for(var n in t)IM(e,n,{get:t[n],enumerable:!0})},bse=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P5e(t))!U5e.call(e,o)&&o!==n&&IM(e,o,{get:()=>t[o],enumerable:!(r=M5e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?w5e(k5e(e)):{},bse(t||!e||!e.__esModule?IM(n,"default",{value:e,enumerable:!0}):n,e)),we=e=>bse(IM({},"__esModule",{value:!0}),e);var A=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.59"}}catch{}})()});var ym,bH=O(()=>{A();ym="1.9.1"});function L5e(e){let t=new Set([e]),n=new Set,r=e.match(vse);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let m=d.match(vse);if(!m)return i(d);let h={major:+m[1],minor:+m[2],patch:+m[3],prerelease:m[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var vse,Rse,Dse=O(()=>{A();bH();vse=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Rse=L5e(ym)});function Pf(e,t,n,r=!1){var o;let i=Kx[Yx]=(o=Kx[Yx])!==null&&o!==void 0?o:{version:ym};if(!r&&i[e]){let a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(a.stack||a.message),!1}if(i.version!==ym){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${ym}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${ym}.`),!0}function il(e){var t,n;let r=(t=Kx[Yx])===null||t===void 0?void 0:t.version;if(!(!r||!Rse(r)))return(n=Kx[Yx])===null||n===void 0?void 0:n[e]}function kf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${ym}.`);let n=Kx[Yx];n&&delete n[e]}var Q5e,Yx,Kx,O0=O(()=>{A();bH();Dse();Q5e=ym.split(".")[0],Yx=Symbol.for(`opentelemetry.js.api.${Q5e}`),Kx=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Jx(e,t,n){let r=il("diag");if(r)return r[e](t,...n)}var CM,xse=O(()=>{A();O0();CM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return Jx("debug",this._namespace,t)}error(...t){return Jx("error",this._namespace,t)}info(...t){return Jx("info",this._namespace,t)}warn(...t){return Jx("warn",this._namespace,t)}verbose(...t){return Jx("verbose",this._namespace,t)}}});var oa,bM=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(oa||(oa={}))});function Bse(e,t){e<oa.NONE?e=oa.NONE:e>oa.ALL&&(e=oa.ALL),t=t||{};function n(r,o){let i=t[r];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return{error:n("error",oa.ERROR),warn:n("warn",oa.WARN),info:n("info",oa.INFO),debug:n("debug",oa.DEBUG),verbose:n("verbose",oa.VERBOSE)}}var Nse=O(()=>{A();bM()});var F5e,Ia,w0=O(()=>{A();xse();Nse();bM();O0();F5e="diag",Ia=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=il("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:oa.INFO})=>{var a,c,d;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=y.stack)!==null&&a!==void 0?a:y.message),!1}typeof i=="number"&&(i={logLevel:i});let m=il("diag"),h=Bse((c=i.logLevel)!==null&&c!==void 0?c:oa.INFO,o);if(m&&!i.suppressOverrideMessage){let y=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Pf("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{kf(F5e,n)},n.createComponentLogger=o=>new CM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var vM,Ose=O(()=>{A();vM=class e{constructor(t){this._entries=t?new Map(t):new Map}getEntry(t){let n=this._entries.get(t);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let r of t)n._entries.delete(r);return n}clear(){return new e}}});var wse,Mse=O(()=>{A();wse=Symbol("BaggageEntryMetadata")});function Pse(e={}){return new vM(new Map(Object.entries(e)))}function kse(e){return typeof e!="string"&&(G5e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:wse,toString(){return e}}}var G5e,vH=O(()=>{A();w0();Ose();Mse();G5e=Ia.instance()});function al(e){return Symbol.for(e)}var RH,HI,Zx=O(()=>{A();RH=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,o)=>{let i=new e(n._currentContext);return i._currentContext.set(r,o),i},n.deleteValue=r=>{let o=new e(n._currentContext);return o._currentContext.delete(r),o}}},HI=new RH});var DH,xH,RM,Use=O(()=>{A();DH=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],xH={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(xH[t]=console[t])}RM=class{constructor(){function t(n){return function(...r){let o=xH[n];if(typeof o!="function"&&(o=xH.log),typeof o!="function"&&console&&(o=console[n],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,r)}}for(let n=0;n<DH.length;n++)this[DH[n].n]=t(DH[n].c)}}});function Lse(){return LH}var BH,zI,NH,OH,wH,MH,Wx,PH,kH,UH,LH,j5e,H5e,z5e,$5e,V5e,q5e,Y5e,QH=O(()=>{A();BH=class{constructor(){}createGauge(t,n){return H5e}createHistogram(t,n){return z5e}createCounter(t,n){return j5e}createUpDownCounter(t,n){return $5e}createObservableGauge(t,n){return q5e}createObservableCounter(t,n){return V5e}createObservableUpDownCounter(t,n){return Y5e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},zI=class{},NH=class extends zI{add(t,n){}},OH=class extends zI{add(t,n){}},wH=class extends zI{record(t,n){}},MH=class extends zI{record(t,n){}},Wx=class{addCallback(t){}removeCallback(t){}},PH=class extends Wx{},kH=class extends Wx{},UH=class extends Wx{},LH=new BH,j5e=new NH,H5e=new wH,z5e=new MH,$5e=new OH,V5e=new PH,q5e=new kH,Y5e=new UH});var DM,Qse=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(DM||(DM={}))});var xM,BM,FH=O(()=>{A();xM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},BM={set(e,t,n){e!=null&&(e[t]=n)}}});var NM,Fse=O(()=>{A();Zx();NM=class{active(){return HI}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var GH,K5e,Uf,Xx=O(()=>{A();Fse();O0();w0();GH="context",K5e=new NM,Uf=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Pf(GH,t,Ia.instance())}active(){return this._getContextManager().active()}with(t,n,r,...o){return this._getContextManager().with(t,n,r,...o)}bind(t,n){return this._getContextManager().bind(t,n)}_getContextManager(){return il(GH)||K5e}disable(){this._getContextManager().disable(),kf(GH,Ia.instance())}}});var Ds,jH=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ds||(Ds={}))});var e1,M0,OM,wM=O(()=>{A();jH();e1="0000000000000000",M0="00000000000000000000000000000000",OM={traceId:M0,spanId:e1,traceFlags:Ds.NONE}});var Lf,MM=O(()=>{A();wM();Lf=class{constructor(t=OM){this._spanContext=t}spanContext(){return this._spanContext}setAttribute(t,n){return this}setAttributes(t){return this}addEvent(t,n){return this}addLink(t){return this}addLinks(t){return this}setStatus(t){return this}updateName(t){return this}end(t){}isRecording(){return!1}recordException(t,n){}}});function PM(e){return e.getValue(HH)||void 0}function Gse(){return PM(Uf.getInstance().active())}function t1(e,t){return e.setValue(HH,t)}function jse(e){return e.deleteValue(HH)}function Hse(e,t){return t1(e,new Lf(t))}function kM(e){var t;return(t=PM(e))===null||t===void 0?void 0:t.spanContext()}var HH,zH=O(()=>{A();Zx();MM();Xx();HH=al("OpenTelemetry Context Key SPAN")});function zse(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(UM[e.charCodeAt(r)]|0)+(UM[e.charCodeAt(r+1)]|0)+(UM[e.charCodeAt(r+2)]|0)+(UM[e.charCodeAt(r+3)]|0);return n===t}function $H(e){return zse(e,32)&&e!==M0}function VH(e){return zse(e,16)&&e!==e1}function Tm(e){return $H(e.traceId)&&VH(e.spanId)}function $se(e){return new Lf(e)}var UM,LM=O(()=>{A();wM();MM();UM=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])});function J5e(e){return e!==null&&typeof e=="object"&&"spanId"in e&&typeof e.spanId=="string"&&"traceId"in e&&typeof e.traceId=="string"&&"traceFlags"in e&&typeof e.traceFlags=="number"}var qH,$I,YH=O(()=>{A();Xx();zH();MM();LM();qH=Uf.getInstance(),$I=class{startSpan(t,n,r=qH.active()){if(!!n?.root)return new Lf;let i=r&&kM(r);return J5e(i)&&Tm(i)?new Lf(i):new Lf}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let d=a??qH.active(),m=this.startSpan(t,i,d),h=t1(d,m);return qH.with(h,c,void 0,m)}}});var Z5e,VI,KH=O(()=>{A();YH();Z5e=new $I,VI=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}startSpan(t,n,r){return this._getTracer().startSpan(t,n,r)}startActiveSpan(t,n,r,o){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Z5e}}});var QM,Vse=O(()=>{A();YH();QM=class{getTracer(t,n,r){return new $I}}});var W5e,P0,JH=O(()=>{A();KH();Vse();W5e=new QM,P0=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new VI(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:W5e}setDelegate(t){this._delegate=t}getDelegateTracer(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(t,n,r)}}});var FM,qse=O(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(FM||(FM={}))});var Wr,Yse=O(()=>{A();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Wr||(Wr={}))});var Xo,Kse=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Xo||(Xo={}))});function Jse(e){return t$e.test(e)}function Zse(e){return n$e.test(e)&&!r$e.test(e)}var ZH,X5e,e$e,t$e,n$e,r$e,Wse=O(()=>{A();ZH="[_0-9a-z-*/]",X5e=`[a-z]${ZH}{0,255}`,e$e=`[a-z0-9]${ZH}{0,240}@[a-z]${ZH}{0,13}`,t$e=new RegExp(`^(?:${X5e}|${e$e})$`),n$e=/^[ -~]{0,255}[!-~]$/,r$e=/,|=/});var Xse,o$e,eue,tue,GM,nue=O(()=>{A();Wse();Xse=32,o$e=512,eue=",",tue="=",GM=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+tue+this.get(n)),t),[]).join(eue)}_parse(t){t.length>o$e||(this._internalState=t.split(eue).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(tue);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Jse(a)&&Zse(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Xse&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Xse))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function rue(e){return new GM(e)}var oue=O(()=>{A();nue()});var qe,iue=O(()=>{A();Xx();qe=Uf.getInstance()});var sl,aue=O(()=>{A();w0();sl=Ia.instance()});var WH,sue,uue=O(()=>{A();QH();WH=class{getMeter(t,n,r){return LH}},sue=new WH});var XH,jM,cue=O(()=>{A();uue();O0();w0();XH="metrics",jM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Pf(XH,t,Ia.instance())}getMeterProvider(){return il(XH)||sue}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){kf(XH,Ia.instance())}}});var ez,lue=O(()=>{A();cue();ez=jM.getInstance()});var HM,due=O(()=>{A();HM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function nz(e){return e.getValue(tz)||void 0}function pue(){return nz(Uf.getInstance().active())}function fue(e,t){return e.setValue(tz,t)}function Aue(e){return e.deleteValue(tz)}var tz,mue=O(()=>{A();Xx();Zx();tz=al("OpenTelemetry Baggage Key")});var rz,i$e,zM,gue=O(()=>{A();O0();due();FH();mue();vH();w0();rz="propagation",i$e=new HM,zM=class e{constructor(){this.createBaggage=Pse,this.getBaggage=nz,this.getActiveBaggage=pue,this.setBaggage=fue,this.deleteBaggage=Aue}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Pf(rz,t,Ia.instance())}inject(t,n,r=BM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=xM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){kf(rz,Ia.instance())}_getGlobalPropagator(){return il(rz)||i$e}}});var vp,hue=O(()=>{A();gue();vp=zM.getInstance()});var oz,$M,_ue=O(()=>{A();O0();JH();LM();zH();w0();oz="trace",$M=class e{constructor(){this._proxyTracerProvider=new P0,this.wrapSpanContext=$se,this.isSpanContextValid=Tm,this.deleteSpan=jse,this.getSpan=PM,this.getActiveSpan=Gse,this.getSpanContext=kM,this.setSpan=t1,this.setSpanContext=Hse}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Pf(oz,this._proxyTracerProvider,Ia.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return il(oz)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){kf(oz,Ia.instance()),this._proxyTracerProvider=new P0}}});var Ft,Eue=O(()=>{A();_ue();Ft=$M.getInstance()});var Je={};es(Je,{DiagConsoleLogger:()=>RM,DiagLogLevel:()=>oa,INVALID_SPANID:()=>e1,INVALID_SPAN_CONTEXT:()=>OM,INVALID_TRACEID:()=>M0,ProxyTracer:()=>VI,ProxyTracerProvider:()=>P0,ROOT_CONTEXT:()=>HI,SamplingDecision:()=>FM,SpanKind:()=>Wr,SpanStatusCode:()=>Xo,TraceFlags:()=>Ds,ValueType:()=>DM,baggageEntryMetadataFromString:()=>kse,context:()=>qe,createContextKey:()=>al,createNoopMeter:()=>Lse,createTraceState:()=>rue,default:()=>a$e,defaultTextMapGetter:()=>xM,defaultTextMapSetter:()=>BM,diag:()=>sl,isSpanContextValid:()=>Tm,isValidSpanId:()=>VH,isValidTraceId:()=>$H,metrics:()=>ez,propagation:()=>vp,trace:()=>Ft});var a$e,Le=O(()=>{A();vH();Zx();Use();bM();QH();Qse();FH();KH();JH();qse();Yse();Kse();jH();oue();LM();wM();iue();aue();lue();hue();Eue();a$e={context:qe,diag:sl,metrics:ez,propagation:vp,trace:Ft}});var n1=Q(_h=>{"use strict";A();Object.defineProperty(_h,"__esModule",{value:!0});_h.isTracingSuppressed=_h.unsuppressTracing=_h.suppressTracing=void 0;var s$e=(Le(),we(Je)),iz=(0,s$e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function u$e(e){return e.setValue(iz,!0)}_h.suppressTracing=u$e;function c$e(e){return e.deleteValue(iz)}_h.unsuppressTracing=c$e;function l$e(e){return e.getValue(iz)===!0}_h.isTracingSuppressed=l$e});var az=Q(xs=>{"use strict";A();Object.defineProperty(xs,"__esModule",{value:!0});xs.BAGGAGE_MAX_TOTAL_LENGTH=xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=xs.BAGGAGE_HEADER=xs.BAGGAGE_ITEMS_SEPARATOR=xs.BAGGAGE_PROPERTIES_SEPARATOR=xs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;xs.BAGGAGE_KEY_PAIR_SEPARATOR="=";xs.BAGGAGE_PROPERTIES_SEPARATOR=";";xs.BAGGAGE_ITEMS_SEPARATOR=",";xs.BAGGAGE_HEADER="baggage";xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;xs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var sz=Q(Qf=>{"use strict";A();Object.defineProperty(Qf,"__esModule",{value:!0});Qf.parseKeyPairsIntoRecord=Qf.parsePairKeyValue=Qf.getKeyPairs=Qf.serializeKeyPairs=void 0;var d$e=(Le(),we(Je)),qI=az();function p$e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?qI.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>qI.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Qf.serializeKeyPairs=p$e;function f$e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=qI.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Qf.getKeyPairs=f$e;function Sue(e){if(!e)return;let t=e.indexOf(qI.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(qI.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let m=e.substring(t+1);d=(0,d$e.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}Qf.parsePairKeyValue=Sue;function A$e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(qI.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Sue(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Qf.parseKeyPairsIntoRecord=A$e});var yue=Q(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.W3CBaggagePropagator=void 0;var uz=(Le(),we(Je)),m$e=n1(),k0=az(),cz=sz(),lz=class{inject(t,n,r){let o=uz.propagation.getBaggage(t);if(!o||(0,m$e.isTracingSuppressed)(t))return;let i=(0,cz.getKeyPairs)(o).filter(c=>c.length<=k0.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,k0.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,cz.serializeKeyPairs)(i);a.length>0&&r.set(n,k0.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,k0.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(k0.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(k0.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let m=(0,cz.parsePairKeyValue)(d);if(m){let h={value:m.value};m.metadata&&(h.metadata=m.metadata),a[m.key]=h}}),Object.entries(a).length===0)?t:uz.propagation.setBaggage(t,uz.propagation.createBaggage(a))}fields(){return[k0.BAGGAGE_HEADER]}};VM.W3CBaggagePropagator=lz});var Tue=Q(qM=>{"use strict";A();Object.defineProperty(qM,"__esModule",{value:!0});qM.AnchoredClock=void 0;var dz=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(t,n){this._monotonicClock=n,this._epochMillis=t.now(),this._performanceMillis=n.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};qM.AnchoredClock=dz});var Rue=Q(Eh=>{"use strict";A();Object.defineProperty(Eh,"__esModule",{value:!0});Eh.isAttributeValue=Eh.isAttributeKey=Eh.sanitizeAttributes=void 0;var Iue=(Le(),we(Je));function g$e(e){let t={};if(typeof e!="object"||e==null)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!Cue(n)){Iue.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!bue(r)){Iue.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}Eh.sanitizeAttributes=g$e;function Cue(e){return typeof e=="string"&&e!==""}Eh.isAttributeKey=Cue;function bue(e){return e==null?!0:Array.isArray(e)?h$e(e):vue(typeof e)}Eh.isAttributeValue=bue;function h$e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(vue(r)){t=r;continue}return!1}return!1}}return!0}function vue(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var pz=Q(YM=>{"use strict";A();Object.defineProperty(YM,"__esModule",{value:!0});YM.loggingErrorHandler=void 0;var _$e=(Le(),we(Je));function E$e(){return e=>{_$e.diag.error(S$e(e))}}YM.loggingErrorHandler=E$e;function S$e(e){return typeof e=="string"?e:JSON.stringify(y$e(e))}function y$e(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r=>{if(t[r])return;let o=n[r];o&&(t[r]=String(o))}),n=Object.getPrototypeOf(n);return t}});var xue=Q(YI=>{"use strict";A();Object.defineProperty(YI,"__esModule",{value:!0});YI.globalErrorHandler=YI.setGlobalErrorHandler=void 0;var T$e=pz(),Due=(0,T$e.loggingErrorHandler)();function I$e(e){Due=e}YI.setGlobalErrorHandler=I$e;function C$e(e){try{Due(e)}catch{}}YI.globalErrorHandler=C$e});var wue=Q(Ff=>{"use strict";A();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.getStringListFromEnv=Ff.getBooleanFromEnv=Ff.getStringFromEnv=Ff.getNumberFromEnv=void 0;var Bue=(Le(),we(Je)),Nue=Ue("util");function b$e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Bue.diag.warn(`Unknown value ${(0,Nue.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Ff.getNumberFromEnv=b$e;function Oue(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Ff.getStringFromEnv=Oue;function v$e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Bue.diag.warn(`Unknown value ${(0,Nue.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Ff.getBooleanFromEnv=v$e;function R$e(e){return Oue(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Ff.getStringListFromEnv=R$e});var Mue=Q(KM=>{"use strict";A();Object.defineProperty(KM,"__esModule",{value:!0});KM._globalThis=void 0;KM._globalThis=globalThis});var Pue=Q(JM=>{"use strict";A();Object.defineProperty(JM,"__esModule",{value:!0});JM.VERSION=void 0;JM.VERSION="2.6.1"});function gi(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var fz=O(()=>{A()});var kue,Uue,Lue,Que,Fue,Gue,jue,Hue,zue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,Hce,zce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,Hle,zle,$le,Vle,qle,Yle,Kle,Jle,Zle,Wle,Xle,ede,tde,D$e,Az,x$e,B$e,N$e,O$e,mz,w$e,M$e,P$e,k$e,U$e,L$e,Q$e,F$e,G$e,j$e,H$e,z$e,$$e,V$e,q$e,Y$e,K$e,J$e,gz,Z$e,W$e,X$e,e9e,t9e,n9e,r9e,o9e,i9e,a9e,s9e,u9e,hz,c9e,l9e,_z,Ez,d9e,p9e,f9e,A9e,m9e,g9e,h9e,_9e,E9e,S9e,y9e,T9e,I9e,C9e,b9e,v9e,R9e,r1,KI,Sz,D9e,x9e,U0,B9e,N9e,O9e,w9e,yz,Tz,M9e,Iz,P9e,k9e,U9e,L9e,Q9e,F9e,G9e,j9e,H9e,z9e,$9e,V9e,q9e,Y9e,K9e,J9e,Z9e,W9e,X9e,eVe,tVe,nVe,rVe,Cz,oVe,iVe,aVe,sVe,uVe,cVe,lVe,dVe,pVe,fVe,AVe,mVe,gVe,hVe,_Ve,EVe,SVe,yVe,TVe,bz,IVe,vz,CVe,bVe,vVe,RVe,DVe,xVe,BVe,NVe,OVe,nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde,wVe,MVe,PVe,kVe,UVe,LVe,QVe,FVe,GVe,jVe,HVe,zVe,$Ve,VVe,qVe,YVe,KVe,JVe,ZVe,WVe,XVe,eqe,tqe,nqe,rqe,oqe,iqe,aqe,sqe,uqe,cqe,lqe,dqe,pqe,fqe,Aqe,mqe,gqe,hqe,_qe,Eqe,Sqe,yqe,Tqe,Iqe,Cqe,bqe,vqe,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,Rqe,Dqe,xqe,Bqe,Nqe,Oqe,wqe,Mqe,Pqe,kqe,Uqe,Lqe,ape,spe,upe,cpe,lpe,Qqe,Fqe,Gqe,jqe,Hqe,zqe,dpe,ppe,fpe,$qe,Vqe,qqe,Yqe,Ape,mpe,gpe,hpe,Kqe,Jqe,Zqe,Wqe,Xqe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,e7e,t7e,n7e,r7e,o7e,i7e,a7e,s7e,bpe,vpe,Rpe,Dpe,xpe,u7e,c7e,l7e,d7e,p7e,f7e,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,A7e,m7e,g7e,h7e,_7e,E7e,S7e,y7e,T7e,I7e,C7e,b7e,v7e,R7e,D7e,x7e,B7e,N7e,O7e,w7e,M7e,P7e,Zpe,Wpe,Xpe,efe,tfe,k7e,U7e,L7e,Q7e,F7e,G7e,nfe,rfe,j7e,H7e,z7e,ofe,ife,$7e,V7e,q7e,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Y7e,K7e,J7e,Z7e,W7e,X7e,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,Ife,Cfe,pYe,fYe,AYe,bfe=O(()=>{A();fz();kue="aws.lambda.invoked_arn",Uue="db.system",Lue="db.connection_string",Que="db.user",Fue="db.jdbc.driver_classname",Gue="db.name",jue="db.statement",Hue="db.operation",zue="db.mssql.instance_name",$ue="db.cassandra.keyspace",Vue="db.cassandra.page_size",que="db.cassandra.consistency_level",Yue="db.cassandra.table",Kue="db.cassandra.idempotence",Jue="db.cassandra.speculative_execution_count",Zue="db.cassandra.coordinator.id",Wue="db.cassandra.coordinator.dc",Xue="db.hbase.namespace",ece="db.redis.database_index",tce="db.mongodb.collection",nce="db.sql.table",rce="exception.type",oce="exception.message",ice="exception.stacktrace",ace="exception.escaped",sce="faas.trigger",uce="faas.execution",cce="faas.document.collection",lce="faas.document.operation",dce="faas.document.time",pce="faas.document.name",fce="faas.time",Ace="faas.cron",mce="faas.coldstart",gce="faas.invoked_name",hce="faas.invoked_provider",_ce="faas.invoked_region",Ece="net.transport",Sce="net.peer.ip",yce="net.peer.port",Tce="net.peer.name",Ice="net.host.ip",Cce="net.host.port",bce="net.host.name",vce="net.host.connection.type",Rce="net.host.connection.subtype",Dce="net.host.carrier.name",xce="net.host.carrier.mcc",Bce="net.host.carrier.mnc",Nce="net.host.carrier.icc",Oce="peer.service",wce="enduser.id",Mce="enduser.role",Pce="enduser.scope",kce="thread.id",Uce="thread.name",Lce="code.function",Qce="code.namespace",Fce="code.filepath",Gce="code.lineno",jce="http.method",Hce="http.url",zce="http.target",$ce="http.host",Vce="http.scheme",qce="http.status_code",Yce="http.flavor",Kce="http.user_agent",Jce="http.request_content_length",Zce="http.request_content_length_uncompressed",Wce="http.response_content_length",Xce="http.response_content_length_uncompressed",ele="http.server_name",tle="http.route",nle="http.client_ip",rle="aws.dynamodb.table_names",ole="aws.dynamodb.consumed_capacity",ile="aws.dynamodb.item_collection_metrics",ale="aws.dynamodb.provisioned_read_capacity",sle="aws.dynamodb.provisioned_write_capacity",ule="aws.dynamodb.consistent_read",cle="aws.dynamodb.projection",lle="aws.dynamodb.limit",dle="aws.dynamodb.attributes_to_get",ple="aws.dynamodb.index_name",fle="aws.dynamodb.select",Ale="aws.dynamodb.global_secondary_indexes",mle="aws.dynamodb.local_secondary_indexes",gle="aws.dynamodb.exclusive_start_table",hle="aws.dynamodb.table_count",_le="aws.dynamodb.scan_forward",Ele="aws.dynamodb.segment",Sle="aws.dynamodb.total_segments",yle="aws.dynamodb.count",Tle="aws.dynamodb.scanned_count",Ile="aws.dynamodb.attribute_definitions",Cle="aws.dynamodb.global_secondary_index_updates",ble="messaging.system",vle="messaging.destination",Rle="messaging.destination_kind",Dle="messaging.temp_destination",xle="messaging.protocol",Ble="messaging.protocol_version",Nle="messaging.url",Ole="messaging.message_id",wle="messaging.conversation_id",Mle="messaging.message_payload_size_bytes",Ple="messaging.message_payload_compressed_size_bytes",kle="messaging.operation",Ule="messaging.consumer_id",Lle="messaging.rabbitmq.routing_key",Qle="messaging.kafka.message_key",Fle="messaging.kafka.consumer_group",Gle="messaging.kafka.client_id",jle="messaging.kafka.partition",Hle="messaging.kafka.tombstone",zle="rpc.system",$le="rpc.service",Vle="rpc.method",qle="rpc.grpc.status_code",Yle="rpc.jsonrpc.version",Kle="rpc.jsonrpc.request_id",Jle="rpc.jsonrpc.error_code",Zle="rpc.jsonrpc.error_message",Wle="message.type",Xle="message.id",ede="message.compressed_size",tde="message.uncompressed_size",D$e=kue,Az=Uue,x$e=Lue,B$e=Que,N$e=Fue,O$e=Gue,mz=jue,w$e=Hue,M$e=zue,P$e=$ue,k$e=Vue,U$e=que,L$e=Yue,Q$e=Kue,F$e=Jue,G$e=Zue,j$e=Wue,H$e=Xue,z$e=ece,$$e=tce,V$e=nce,q$e=rce,Y$e=oce,K$e=ice,J$e=ace,gz=sce,Z$e=uce,W$e=cce,X$e=lce,e9e=dce,t9e=pce,n9e=fce,r9e=Ace,o9e=mce,i9e=gce,a9e=hce,s9e=_ce,u9e=Ece,hz=Sce,c9e=yce,l9e=Tce,_z=Ice,Ez=Cce,d9e=bce,p9e=vce,f9e=Rce,A9e=Dce,m9e=xce,g9e=Bce,h9e=Nce,_9e=Oce,E9e=wce,S9e=Mce,y9e=Pce,T9e=kce,I9e=Uce,C9e=Lce,b9e=Qce,v9e=Fce,R9e=Gce,r1=jce,KI=Hce,Sz=zce,D9e=$ce,x9e=Vce,U0=qce,B9e=Yce,N9e=Kce,O9e=Jce,w9e=Zce,yz=Wce,Tz=Xce,M9e=ele,Iz=tle,P9e=nle,k9e=rle,U9e=ole,L9e=ile,Q9e=ale,F9e=sle,G9e=ule,j9e=cle,H9e=lle,z9e=dle,$9e=ple,V9e=fle,q9e=Ale,Y9e=mle,K9e=gle,J9e=hle,Z9e=_le,W9e=Ele,X9e=Sle,eVe=yle,tVe=Tle,nVe=Ile,rVe=Cle,Cz=ble,oVe=vle,iVe=Rle,aVe=Dle,sVe=xle,uVe=Ble,cVe=Nle,lVe=Ole,dVe=wle,pVe=Mle,fVe=Ple,AVe=kle,mVe=Ule,gVe=Lle,hVe=Qle,_Ve=Fle,EVe=Gle,SVe=jle,yVe=Hle,TVe=zle,bz=$le,IVe=Vle,vz=qle,CVe=Yle,bVe=Kle,vVe=Jle,RVe=Zle,DVe=Wle,xVe=Xle,BVe=ede,NVe=tde,OVe=gi([kue,Uue,Lue,Que,Fue,Gue,jue,Hue,zue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,Hce,zce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,Hle,zle,$le,Vle,qle,Yle,Kle,Jle,Zle,Wle,Xle,ede,tde]),nde="other_sql",rde="mssql",ode="mysql",ide="oracle",ade="db2",sde="postgresql",ude="redshift",cde="hive",lde="cloudscape",dde="hsqldb",pde="progress",fde="maxdb",Ade="hanadb",mde="ingres",gde="firstsql",hde="edb",_de="cache",Ede="adabas",Sde="firebird",yde="derby",Tde="filemaker",Ide="informix",Cde="instantdb",bde="interbase",vde="mariadb",Rde="netezza",Dde="pervasive",xde="pointbase",Bde="sqlite",Nde="sybase",Ode="teradata",wde="vertica",Mde="h2",Pde="coldfusion",kde="cassandra",Ude="hbase",Lde="mongodb",Qde="redis",Fde="couchbase",Gde="couchdb",jde="cosmosdb",Hde="dynamodb",zde="neo4j",$de="geode",Vde="elasticsearch",qde="memcached",Yde="cockroachdb",wVe=nde,MVe=rde,PVe=ode,kVe=ide,UVe=ade,LVe=sde,QVe=ude,FVe=cde,GVe=lde,jVe=dde,HVe=pde,zVe=fde,$Ve=Ade,VVe=mde,qVe=gde,YVe=hde,KVe=_de,JVe=Ede,ZVe=Sde,WVe=yde,XVe=Tde,eqe=Ide,tqe=Cde,nqe=bde,rqe=vde,oqe=Rde,iqe=Dde,aqe=xde,sqe=Bde,uqe=Nde,cqe=Ode,lqe=wde,dqe=Mde,pqe=Pde,fqe=kde,Aqe=Ude,mqe=Lde,gqe=Qde,hqe=Fde,_qe=Gde,Eqe=jde,Sqe=Hde,yqe=zde,Tqe=$de,Iqe=Vde,Cqe=qde,bqe=Yde,vqe=gi([nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde]),Kde="all",Jde="each_quorum",Zde="quorum",Wde="local_quorum",Xde="one",epe="two",tpe="three",npe="local_one",rpe="any",ope="serial",ipe="local_serial",Rqe=Kde,Dqe=Jde,xqe=Zde,Bqe=Wde,Nqe=Xde,Oqe=epe,wqe=tpe,Mqe=npe,Pqe=rpe,kqe=ope,Uqe=ipe,Lqe=gi([Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe]),ape="datasource",spe="http",upe="pubsub",cpe="timer",lpe="other",Qqe=ape,Fqe=spe,Gqe=upe,jqe=cpe,Hqe=lpe,zqe=gi([ape,spe,upe,cpe,lpe]),dpe="insert",ppe="edit",fpe="delete",$qe=dpe,Vqe=ppe,qqe=fpe,Yqe=gi([dpe,ppe,fpe]),Ape="alibaba_cloud",mpe="aws",gpe="azure",hpe="gcp",Kqe=Ape,Jqe=mpe,Zqe=gpe,Wqe=hpe,Xqe=gi([Ape,mpe,gpe,hpe]),_pe="ip_tcp",Epe="ip_udp",Spe="ip",ype="unix",Tpe="pipe",Ipe="inproc",Cpe="other",e7e=_pe,t7e=Epe,n7e=Spe,r7e=ype,o7e=Tpe,i7e=Ipe,a7e=Cpe,s7e=gi([_pe,Epe,Spe,ype,Tpe,Ipe,Cpe]),bpe="wifi",vpe="wired",Rpe="cell",Dpe="unavailable",xpe="unknown",u7e=bpe,c7e=vpe,l7e=Rpe,d7e=Dpe,p7e=xpe,f7e=gi([bpe,vpe,Rpe,Dpe,xpe]),Bpe="gprs",Npe="edge",Ope="umts",wpe="cdma",Mpe="evdo_0",Ppe="evdo_a",kpe="cdma2000_1xrtt",Upe="hsdpa",Lpe="hsupa",Qpe="hspa",Fpe="iden",Gpe="evdo_b",jpe="lte",Hpe="ehrpd",zpe="hspap",$pe="gsm",Vpe="td_scdma",qpe="iwlan",Ype="nr",Kpe="nrnsa",Jpe="lte_ca",A7e=Bpe,m7e=Npe,g7e=Ope,h7e=wpe,_7e=Mpe,E7e=Ppe,S7e=kpe,y7e=Upe,T7e=Lpe,I7e=Qpe,C7e=Fpe,b7e=Gpe,v7e=jpe,R7e=Hpe,D7e=zpe,x7e=$pe,B7e=Vpe,N7e=qpe,O7e=Ype,w7e=Kpe,M7e=Jpe,P7e=gi([Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe]),Zpe="1.0",Wpe="1.1",Xpe="2.0",efe="SPDY",tfe="QUIC",k7e=Zpe,U7e=Wpe,L7e=Xpe,Q7e=efe,F7e=tfe,G7e={HTTP_1_0:Zpe,HTTP_1_1:Wpe,HTTP_2_0:Xpe,SPDY:efe,QUIC:tfe},nfe="queue",rfe="topic",j7e=nfe,H7e=rfe,z7e=gi([nfe,rfe]),ofe="receive",ife="process",$7e=ofe,V7e=ife,q7e=gi([ofe,ife]),afe=0,sfe=1,ufe=2,cfe=3,lfe=4,dfe=5,pfe=6,ffe=7,Afe=8,mfe=9,gfe=10,hfe=11,_fe=12,Efe=13,Sfe=14,yfe=15,Tfe=16,Y7e=afe,K7e=sfe,J7e=ufe,Z7e=cfe,W7e=lfe,X7e=dfe,eYe=pfe,tYe=ffe,nYe=Afe,rYe=mfe,oYe=gfe,iYe=hfe,aYe=_fe,sYe=Efe,uYe=Sfe,cYe=yfe,lYe=Tfe,dYe={OK:afe,CANCELLED:sfe,UNKNOWN:ufe,INVALID_ARGUMENT:cfe,DEADLINE_EXCEEDED:lfe,NOT_FOUND:dfe,ALREADY_EXISTS:pfe,PERMISSION_DENIED:ffe,RESOURCE_EXHAUSTED:Afe,FAILED_PRECONDITION:mfe,ABORTED:gfe,OUT_OF_RANGE:hfe,UNIMPLEMENTED:_fe,INTERNAL:Efe,UNAVAILABLE:Sfe,DATA_LOSS:yfe,UNAUTHENTICATED:Tfe},Ife="SENT",Cfe="RECEIVED",pYe=Ife,fYe=Cfe,AYe=gi([Ife,Cfe])});var vfe=O(()=>{A();bfe()});var Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,DYe,xYe,BYe,NYe,OYe,wYe,MYe,PYe,kYe,UYe,LYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,DKe,xKe,BKe,NKe,Rz,OKe,wKe,MKe,PKe,kKe,UKe,LKe,QKe,FKe,GKe,eme,tme,nme,rme,jKe,HKe,zKe,$Ke,VKe,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,yme,Tme,dJe,pJe,fJe,Ime,Cme,bme,vme,Rme,Dme,xme,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,Bme,Nme,Ome,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,TJe,IJe,CJe,bJe,vJe,RJe,DJe,xJe,BJe,NJe,OJe,wJe,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,MJe,PJe,kJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,Zme=O(()=>{A();fz();Rfe="cloud.provider",Dfe="cloud.account.id",xfe="cloud.region",Bfe="cloud.availability_zone",Nfe="cloud.platform",Ofe="aws.ecs.container.arn",wfe="aws.ecs.cluster.arn",Mfe="aws.ecs.launchtype",Pfe="aws.ecs.task.arn",kfe="aws.ecs.task.family",Ufe="aws.ecs.task.revision",Lfe="aws.eks.cluster.arn",Qfe="aws.log.group.names",Ffe="aws.log.group.arns",Gfe="aws.log.stream.names",jfe="aws.log.stream.arns",Hfe="container.name",zfe="container.id",$fe="container.runtime",Vfe="container.image.name",qfe="container.image.tag",Yfe="deployment.environment",Kfe="device.id",Jfe="device.model.identifier",Zfe="device.model.name",Wfe="faas.name",Xfe="faas.id",eAe="faas.version",tAe="faas.instance",nAe="faas.max_memory",rAe="host.id",oAe="host.name",iAe="host.type",aAe="host.arch",sAe="host.image.name",uAe="host.image.id",cAe="host.image.version",lAe="k8s.cluster.name",dAe="k8s.node.name",pAe="k8s.node.uid",fAe="k8s.namespace.name",AAe="k8s.pod.uid",mAe="k8s.pod.name",gAe="k8s.container.name",hAe="k8s.replicaset.uid",_Ae="k8s.replicaset.name",EAe="k8s.deployment.uid",SAe="k8s.deployment.name",yAe="k8s.statefulset.uid",TAe="k8s.statefulset.name",IAe="k8s.daemonset.uid",CAe="k8s.daemonset.name",bAe="k8s.job.uid",vAe="k8s.job.name",RAe="k8s.cronjob.uid",DAe="k8s.cronjob.name",xAe="os.type",BAe="os.description",NAe="os.name",OAe="os.version",wAe="process.pid",MAe="process.executable.name",PAe="process.executable.path",kAe="process.command",UAe="process.command_line",LAe="process.command_args",QAe="process.owner",FAe="process.runtime.name",GAe="process.runtime.version",jAe="process.runtime.description",HAe="service.name",zAe="service.namespace",$Ae="service.instance.id",VAe="service.version",qAe="telemetry.sdk.name",YAe="telemetry.sdk.language",KAe="telemetry.sdk.version",JAe="telemetry.auto.version",ZAe="webengine.name",WAe="webengine.version",XAe="webengine.description",mYe=Rfe,gYe=Dfe,hYe=xfe,_Ye=Bfe,EYe=Nfe,SYe=Ofe,yYe=wfe,TYe=Mfe,IYe=Pfe,CYe=kfe,bYe=Ufe,vYe=Lfe,RYe=Qfe,DYe=Ffe,xYe=Gfe,BYe=jfe,NYe=Hfe,OYe=zfe,wYe=$fe,MYe=Vfe,PYe=qfe,kYe=Yfe,UYe=Kfe,LYe=Jfe,QYe=Zfe,FYe=Wfe,GYe=Xfe,jYe=eAe,HYe=tAe,zYe=nAe,$Ye=rAe,VYe=oAe,qYe=iAe,YYe=aAe,KYe=sAe,JYe=uAe,ZYe=cAe,WYe=lAe,XYe=dAe,eKe=pAe,tKe=fAe,nKe=AAe,rKe=mAe,oKe=gAe,iKe=hAe,aKe=_Ae,sKe=EAe,uKe=SAe,cKe=yAe,lKe=TAe,dKe=IAe,pKe=CAe,fKe=bAe,AKe=vAe,mKe=RAe,gKe=DAe,hKe=xAe,_Ke=BAe,EKe=NAe,SKe=OAe,yKe=wAe,TKe=MAe,IKe=PAe,CKe=kAe,bKe=UAe,vKe=LAe,RKe=QAe,DKe=FAe,xKe=GAe,BKe=jAe,NKe=HAe,Rz=zAe,OKe=$Ae,wKe=VAe,MKe=qAe,PKe=YAe,kKe=KAe,UKe=JAe,LKe=ZAe,QKe=WAe,FKe=XAe,GKe=gi([Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe]),eme="alibaba_cloud",tme="aws",nme="azure",rme="gcp",jKe=eme,HKe=tme,zKe=nme,$Ke=rme,VKe=gi([eme,tme,nme,rme]),ome="alibaba_cloud_ecs",ime="alibaba_cloud_fc",ame="aws_ec2",sme="aws_ecs",ume="aws_eks",cme="aws_lambda",lme="aws_elastic_beanstalk",dme="azure_vm",pme="azure_container_instances",fme="azure_aks",Ame="azure_functions",mme="azure_app_service",gme="gcp_compute_engine",hme="gcp_cloud_run",_me="gcp_kubernetes_engine",Eme="gcp_cloud_functions",Sme="gcp_app_engine",qKe=ome,YKe=ime,KKe=ame,JKe=sme,ZKe=ume,WKe=cme,XKe=lme,eJe=dme,tJe=pme,nJe=fme,rJe=Ame,oJe=mme,iJe=gme,aJe=hme,sJe=_me,uJe=Eme,cJe=Sme,lJe=gi([ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme]),yme="ec2",Tme="fargate",dJe=yme,pJe=Tme,fJe=gi([yme,Tme]),Ime="amd64",Cme="arm32",bme="arm64",vme="ia64",Rme="ppc32",Dme="ppc64",xme="x86",AJe=Ime,mJe=Cme,gJe=bme,hJe=vme,_Je=Rme,EJe=Dme,SJe=xme,yJe=gi([Ime,Cme,bme,vme,Rme,Dme,xme]),Bme="windows",Nme="linux",Ome="darwin",wme="freebsd",Mme="netbsd",Pme="openbsd",kme="dragonflybsd",Ume="hpux",Lme="aix",Qme="solaris",Fme="z_os",TJe=Bme,IJe=Nme,CJe=Ome,bJe=wme,vJe=Mme,RJe=Pme,DJe=kme,xJe=Ume,BJe=Lme,NJe=Qme,OJe=Fme,wJe=gi([Bme,Nme,Ome,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme]),Gme="cpp",jme="dotnet",Hme="erlang",zme="go",$me="java",Vme="nodejs",qme="php",Yme="python",Kme="ruby",Jme="webjs",MJe=Gme,PJe=jme,kJe=Hme,UJe=zme,LJe=$me,QJe=Vme,FJe=qme,GJe=Yme,jJe=Kme,HJe=Jme,zJe=gi([Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme])});var Wme=O(()=>{A();Zme()});var $Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,Dz,xz,gZe,JI,hZe,Bz,Nz,_Ze,L0,EZe,SZe,yZe,TZe,IZe,CZe,bZe,vZe,RZe,DZe,Oz,xZe,BZe,NZe,OZe,wZe,MZe,Q0,PZe,kZe,UZe,LZe,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,Im,Cm,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,wz,Mz,lWe,Pz,kz,dWe,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,Uz,Lz,bWe,Qz,vWe,Fz,RWe,DWe,xWe,BWe,NWe,OWe,wWe,MWe,PWe,kWe,UWe,LWe,QWe,FWe,GWe,jWe,HWe,zWe,$We,VWe,qWe,YWe,KWe,JWe,Sh,ZWe,WWe,XWe,Gz,Xme=O(()=>{A();$Je="aspnetcore.diagnostics.exception.result",VJe="aborted",qJe="handled",YJe="skipped",KJe="unhandled",JJe="aspnetcore.diagnostics.handler.type",ZJe="aspnetcore.rate_limiting.policy",WJe="aspnetcore.rate_limiting.result",XJe="acquired",eZe="endpoint_limiter",tZe="global_limiter",nZe="request_canceled",rZe="aspnetcore.request.is_unhandled",oZe="aspnetcore.routing.is_fallback",iZe="aspnetcore.routing.match_status",aZe="failure",sZe="success",uZe="aspnetcore.user.is_authenticated",cZe="client.address",lZe="client.port",dZe="code.column.number",pZe="code.file.path",fZe="code.function.name",AZe="code.line.number",mZe="code.stacktrace",Dz="db.collection.name",xz="db.namespace",gZe="db.operation.batch.size",JI="db.operation.name",hZe="db.query.summary",Bz="db.query.text",Nz="db.response.status_code",_Ze="db.stored_procedure.name",L0="db.system.name",EZe="mariadb",SZe="microsoft.sql_server",yZe="mysql",TZe="postgresql",IZe="dotnet.gc.heap.generation",CZe="gen0",bZe="gen1",vZe="gen2",RZe="loh",DZe="poh",Oz="error.type",xZe="_OTHER",BZe="exception.escaped",NZe="exception.message",OZe="exception.stacktrace",wZe="exception.type",MZe=e=>`http.request.header.${e}`,Q0="http.request.method",PZe="_OTHER",kZe="CONNECT",UZe="DELETE",LZe="GET",QZe="HEAD",FZe="OPTIONS",GZe="PATCH",jZe="POST",HZe="PUT",zZe="TRACE",$Ze="http.request.method_original",VZe="http.request.resend_count",qZe=e=>`http.response.header.${e}`,Im="http.response.status_code",Cm="http.route",YZe="jvm.gc.action",KZe="jvm.gc.name",JZe="jvm.memory.pool.name",ZZe="jvm.memory.type",WZe="heap",XZe="non_heap",eWe="jvm.thread.daemon",tWe="jvm.thread.state",nWe="blocked",rWe="new",oWe="runnable",iWe="terminated",aWe="timed_waiting",sWe="waiting",uWe="network.local.address",cWe="network.local.port",wz="network.peer.address",Mz="network.peer.port",lWe="network.protocol.name",Pz="network.protocol.version",kz="network.transport",dWe="pipe",pWe="quic",fWe="tcp",AWe="udp",mWe="unix",gWe="network.type",hWe="ipv4",_We="ipv6",EWe="otel.scope.name",SWe="otel.scope.version",yWe="otel.status_code",TWe="ERROR",IWe="OK",CWe="otel.status_description",Uz="server.address",Lz="server.port",bWe="service.instance.id",Qz="service.name",vWe="service.namespace",Fz="service.version",RWe="signalr.connection.status",DWe="app_shutdown",xWe="normal_closure",BWe="timeout",NWe="signalr.transport",OWe="long_polling",wWe="server_sent_events",MWe="web_sockets",PWe="telemetry.sdk.language",kWe="cpp",UWe="dotnet",LWe="erlang",QWe="go",FWe="java",GWe="nodejs",jWe="php",HWe="python",zWe="ruby",$We="rust",VWe="swift",qWe="webjs",YWe="telemetry.sdk.name",KWe="telemetry.sdk.version",JWe="url.fragment",Sh="url.full",ZWe="url.path",WWe="url.query",XWe="url.scheme",Gz="user_agent.original"});var eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,DXe,xXe,BXe,NXe,OXe,wXe,MXe,PXe,kXe,UXe,LXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ege=O(()=>{A();eXe="aspnetcore.diagnostics.exceptions",tXe="aspnetcore.rate_limiting.active_request_leases",nXe="aspnetcore.rate_limiting.queued_requests",rXe="aspnetcore.rate_limiting.request.time_in_queue",oXe="aspnetcore.rate_limiting.request_lease.duration",iXe="aspnetcore.rate_limiting.requests",aXe="aspnetcore.routing.match_attempts",sXe="db.client.operation.duration",uXe="dotnet.assembly.count",cXe="dotnet.exceptions",lXe="dotnet.gc.collections",dXe="dotnet.gc.heap.total_allocated",pXe="dotnet.gc.last_collection.heap.fragmentation.size",fXe="dotnet.gc.last_collection.heap.size",AXe="dotnet.gc.last_collection.memory.committed_size",mXe="dotnet.gc.pause.time",gXe="dotnet.jit.compilation.time",hXe="dotnet.jit.compiled_il.size",_Xe="dotnet.jit.compiled_methods",EXe="dotnet.monitor.lock_contentions",SXe="dotnet.process.cpu.count",yXe="dotnet.process.cpu.time",TXe="dotnet.process.memory.working_set",IXe="dotnet.thread_pool.queue.length",CXe="dotnet.thread_pool.thread.count",bXe="dotnet.thread_pool.work_item.count",vXe="dotnet.timer.count",RXe="http.client.request.duration",DXe="http.server.request.duration",xXe="jvm.class.count",BXe="jvm.class.loaded",NXe="jvm.class.unloaded",OXe="jvm.cpu.count",wXe="jvm.cpu.recent_utilization",MXe="jvm.cpu.time",PXe="jvm.gc.duration",kXe="jvm.memory.committed",UXe="jvm.memory.limit",LXe="jvm.memory.used",QXe="jvm.memory.used_after_last_gc",FXe="jvm.thread.count",GXe="kestrel.active_connections",jXe="kestrel.active_tls_handshakes",HXe="kestrel.connection.duration",zXe="kestrel.queued_connections",$Xe="kestrel.queued_requests",VXe="kestrel.rejected_connections",qXe="kestrel.tls_handshake.duration",YXe="kestrel.upgraded_connections",KXe="signalr.server.active_connections",JXe="signalr.server.connection.duration"});var ZXe,tge=O(()=>{A();ZXe="exception"});var Nr={};es(Nr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>VJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>qJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>YJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>KJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>XJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>eZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>tZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>nZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>aZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>sZe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>$Je,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>JJe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>ZJe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>WJe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>rZe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>oZe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>iZe,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>uZe,ATTR_CLIENT_ADDRESS:()=>cZe,ATTR_CLIENT_PORT:()=>lZe,ATTR_CODE_COLUMN_NUMBER:()=>dZe,ATTR_CODE_FILE_PATH:()=>pZe,ATTR_CODE_FUNCTION_NAME:()=>fZe,ATTR_CODE_LINE_NUMBER:()=>AZe,ATTR_CODE_STACKTRACE:()=>mZe,ATTR_DB_COLLECTION_NAME:()=>Dz,ATTR_DB_NAMESPACE:()=>xz,ATTR_DB_OPERATION_BATCH_SIZE:()=>gZe,ATTR_DB_OPERATION_NAME:()=>JI,ATTR_DB_QUERY_SUMMARY:()=>hZe,ATTR_DB_QUERY_TEXT:()=>Bz,ATTR_DB_RESPONSE_STATUS_CODE:()=>Nz,ATTR_DB_STORED_PROCEDURE_NAME:()=>_Ze,ATTR_DB_SYSTEM_NAME:()=>L0,ATTR_DOTNET_GC_HEAP_GENERATION:()=>IZe,ATTR_ERROR_TYPE:()=>Oz,ATTR_EXCEPTION_ESCAPED:()=>BZe,ATTR_EXCEPTION_MESSAGE:()=>NZe,ATTR_EXCEPTION_STACKTRACE:()=>OZe,ATTR_EXCEPTION_TYPE:()=>wZe,ATTR_HTTP_REQUEST_HEADER:()=>MZe,ATTR_HTTP_REQUEST_METHOD:()=>Q0,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>$Ze,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>VZe,ATTR_HTTP_RESPONSE_HEADER:()=>qZe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Im,ATTR_HTTP_ROUTE:()=>Cm,ATTR_JVM_GC_ACTION:()=>YZe,ATTR_JVM_GC_NAME:()=>KZe,ATTR_JVM_MEMORY_POOL_NAME:()=>JZe,ATTR_JVM_MEMORY_TYPE:()=>ZZe,ATTR_JVM_THREAD_DAEMON:()=>eWe,ATTR_JVM_THREAD_STATE:()=>tWe,ATTR_NETWORK_LOCAL_ADDRESS:()=>uWe,ATTR_NETWORK_LOCAL_PORT:()=>cWe,ATTR_NETWORK_PEER_ADDRESS:()=>wz,ATTR_NETWORK_PEER_PORT:()=>Mz,ATTR_NETWORK_PROTOCOL_NAME:()=>lWe,ATTR_NETWORK_PROTOCOL_VERSION:()=>Pz,ATTR_NETWORK_TRANSPORT:()=>kz,ATTR_NETWORK_TYPE:()=>gWe,ATTR_OTEL_SCOPE_NAME:()=>EWe,ATTR_OTEL_SCOPE_VERSION:()=>SWe,ATTR_OTEL_STATUS_CODE:()=>yWe,ATTR_OTEL_STATUS_DESCRIPTION:()=>CWe,ATTR_SERVER_ADDRESS:()=>Uz,ATTR_SERVER_PORT:()=>Lz,ATTR_SERVICE_INSTANCE_ID:()=>bWe,ATTR_SERVICE_NAME:()=>Qz,ATTR_SERVICE_NAMESPACE:()=>vWe,ATTR_SERVICE_VERSION:()=>Fz,ATTR_SIGNALR_CONNECTION_STATUS:()=>RWe,ATTR_SIGNALR_TRANSPORT:()=>NWe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>PWe,ATTR_TELEMETRY_SDK_NAME:()=>YWe,ATTR_TELEMETRY_SDK_VERSION:()=>KWe,ATTR_URL_FRAGMENT:()=>JWe,ATTR_URL_FULL:()=>Sh,ATTR_URL_PATH:()=>ZWe,ATTR_URL_QUERY:()=>WWe,ATTR_URL_SCHEME:()=>XWe,ATTR_USER_AGENT_ORIGINAL:()=>Gz,AWSECSLAUNCHTYPEVALUES_EC2:()=>dJe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>pJe,AwsEcsLaunchtypeValues:()=>fJe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>qKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>YKe,CLOUDPLATFORMVALUES_AWS_EC2:()=>KKe,CLOUDPLATFORMVALUES_AWS_ECS:()=>JKe,CLOUDPLATFORMVALUES_AWS_EKS:()=>ZKe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>XKe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>WKe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>nJe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>oJe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>tJe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>rJe,CLOUDPLATFORMVALUES_AZURE_VM:()=>eJe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>cJe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>uJe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>aJe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>iJe,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>sJe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>jKe,CLOUDPROVIDERVALUES_AWS:()=>HKe,CLOUDPROVIDERVALUES_AZURE:()=>zKe,CLOUDPROVIDERVALUES_GCP:()=>$Ke,CloudPlatformValues:()=>lJe,CloudProviderValues:()=>VKe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Rqe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Pqe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Dqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Mqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Bqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Uqe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Nqe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>xqe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>kqe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>wqe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>Oqe,DBSYSTEMVALUES_ADABAS:()=>JVe,DBSYSTEMVALUES_CACHE:()=>KVe,DBSYSTEMVALUES_CASSANDRA:()=>fqe,DBSYSTEMVALUES_CLOUDSCAPE:()=>GVe,DBSYSTEMVALUES_COCKROACHDB:()=>bqe,DBSYSTEMVALUES_COLDFUSION:()=>pqe,DBSYSTEMVALUES_COSMOSDB:()=>Eqe,DBSYSTEMVALUES_COUCHBASE:()=>hqe,DBSYSTEMVALUES_COUCHDB:()=>_qe,DBSYSTEMVALUES_DB2:()=>UVe,DBSYSTEMVALUES_DERBY:()=>WVe,DBSYSTEMVALUES_DYNAMODB:()=>Sqe,DBSYSTEMVALUES_EDB:()=>YVe,DBSYSTEMVALUES_ELASTICSEARCH:()=>Iqe,DBSYSTEMVALUES_FILEMAKER:()=>XVe,DBSYSTEMVALUES_FIREBIRD:()=>ZVe,DBSYSTEMVALUES_FIRSTSQL:()=>qVe,DBSYSTEMVALUES_GEODE:()=>Tqe,DBSYSTEMVALUES_H2:()=>dqe,DBSYSTEMVALUES_HANADB:()=>$Ve,DBSYSTEMVALUES_HBASE:()=>Aqe,DBSYSTEMVALUES_HIVE:()=>FVe,DBSYSTEMVALUES_HSQLDB:()=>jVe,DBSYSTEMVALUES_INFORMIX:()=>eqe,DBSYSTEMVALUES_INGRES:()=>VVe,DBSYSTEMVALUES_INSTANTDB:()=>tqe,DBSYSTEMVALUES_INTERBASE:()=>nqe,DBSYSTEMVALUES_MARIADB:()=>rqe,DBSYSTEMVALUES_MAXDB:()=>zVe,DBSYSTEMVALUES_MEMCACHED:()=>Cqe,DBSYSTEMVALUES_MONGODB:()=>mqe,DBSYSTEMVALUES_MSSQL:()=>MVe,DBSYSTEMVALUES_MYSQL:()=>PVe,DBSYSTEMVALUES_NEO4J:()=>yqe,DBSYSTEMVALUES_NETEZZA:()=>oqe,DBSYSTEMVALUES_ORACLE:()=>kVe,DBSYSTEMVALUES_OTHER_SQL:()=>wVe,DBSYSTEMVALUES_PERVASIVE:()=>iqe,DBSYSTEMVALUES_POINTBASE:()=>aqe,DBSYSTEMVALUES_POSTGRESQL:()=>LVe,DBSYSTEMVALUES_PROGRESS:()=>HVe,DBSYSTEMVALUES_REDIS:()=>gqe,DBSYSTEMVALUES_REDSHIFT:()=>QVe,DBSYSTEMVALUES_SQLITE:()=>sqe,DBSYSTEMVALUES_SYBASE:()=>uqe,DBSYSTEMVALUES_TERADATA:()=>cqe,DBSYSTEMVALUES_VERTICA:()=>lqe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>EZe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>SZe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>yZe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>TZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>CZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>bZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>vZe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>RZe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>DZe,DbCassandraConsistencyLevelValues:()=>Lqe,DbSystemValues:()=>vqe,ERROR_TYPE_VALUE_OTHER:()=>xZe,EVENT_EXCEPTION:()=>ZXe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>qqe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Vqe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>$qe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Kqe,FAASINVOKEDPROVIDERVALUES_AWS:()=>Jqe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Zqe,FAASINVOKEDPROVIDERVALUES_GCP:()=>Wqe,FAASTRIGGERVALUES_DATASOURCE:()=>Qqe,FAASTRIGGERVALUES_HTTP:()=>Fqe,FAASTRIGGERVALUES_OTHER:()=>Hqe,FAASTRIGGERVALUES_PUBSUB:()=>Gqe,FAASTRIGGERVALUES_TIMER:()=>jqe,FaasDocumentOperationValues:()=>Yqe,FaasInvokedProviderValues:()=>Xqe,FaasTriggerValues:()=>zqe,HOSTARCHVALUES_AMD64:()=>AJe,HOSTARCHVALUES_ARM32:()=>mJe,HOSTARCHVALUES_ARM64:()=>gJe,HOSTARCHVALUES_IA64:()=>hJe,HOSTARCHVALUES_PPC32:()=>_Je,HOSTARCHVALUES_PPC64:()=>EJe,HOSTARCHVALUES_X86:()=>SJe,HTTPFLAVORVALUES_HTTP_1_0:()=>k7e,HTTPFLAVORVALUES_HTTP_1_1:()=>U7e,HTTPFLAVORVALUES_HTTP_2_0:()=>L7e,HTTPFLAVORVALUES_QUIC:()=>F7e,HTTPFLAVORVALUES_SPDY:()=>Q7e,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>kZe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>UZe,HTTP_REQUEST_METHOD_VALUE_GET:()=>LZe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>QZe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>FZe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>PZe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>GZe,HTTP_REQUEST_METHOD_VALUE_POST:()=>jZe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>HZe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>zZe,HostArchValues:()=>yJe,HttpFlavorValues:()=>G7e,JVM_MEMORY_TYPE_VALUE_HEAP:()=>WZe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>XZe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>nWe,JVM_THREAD_STATE_VALUE_NEW:()=>rWe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>oWe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>iWe,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>aWe,JVM_THREAD_STATE_VALUE_WAITING:()=>sWe,MESSAGETYPEVALUES_RECEIVED:()=>fYe,MESSAGETYPEVALUES_SENT:()=>pYe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>j7e,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>H7e,MESSAGINGOPERATIONVALUES_PROCESS:()=>V7e,MESSAGINGOPERATIONVALUES_RECEIVE:()=>$7e,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>eXe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>tXe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>nXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>iXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>oXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>rXe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>aXe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>sXe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>uXe,METRIC_DOTNET_EXCEPTIONS:()=>cXe,METRIC_DOTNET_GC_COLLECTIONS:()=>lXe,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>dXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>pXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>fXe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>AXe,METRIC_DOTNET_GC_PAUSE_TIME:()=>mXe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>gXe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>hXe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>_Xe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>EXe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>SXe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>yXe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>TXe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>IXe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>CXe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>bXe,METRIC_DOTNET_TIMER_COUNT:()=>vXe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>RXe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>DXe,METRIC_JVM_CLASS_COUNT:()=>xXe,METRIC_JVM_CLASS_LOADED:()=>BXe,METRIC_JVM_CLASS_UNLOADED:()=>NXe,METRIC_JVM_CPU_COUNT:()=>OXe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>wXe,METRIC_JVM_CPU_TIME:()=>MXe,METRIC_JVM_GC_DURATION:()=>PXe,METRIC_JVM_MEMORY_COMMITTED:()=>kXe,METRIC_JVM_MEMORY_LIMIT:()=>UXe,METRIC_JVM_MEMORY_USED:()=>LXe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>QXe,METRIC_JVM_THREAD_COUNT:()=>FXe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>GXe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>jXe,METRIC_KESTREL_CONNECTION_DURATION:()=>HXe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>zXe,METRIC_KESTREL_QUEUED_REQUESTS:()=>$Xe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>VXe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>qXe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>YXe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>KXe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>JXe,MessageTypeValues:()=>AYe,MessagingDestinationKindValues:()=>z7e,MessagingOperationValues:()=>q7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>h7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>S7e,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>m7e,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>R7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>_7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>E7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>b7e,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>A7e,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>x7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>y7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>I7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>D7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>T7e,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>C7e,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>N7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>v7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>M7e,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>O7e,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>w7e,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>B7e,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>g7e,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>l7e,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>d7e,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>p7e,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>u7e,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>c7e,NETTRANSPORTVALUES_INPROC:()=>i7e,NETTRANSPORTVALUES_IP:()=>n7e,NETTRANSPORTVALUES_IP_TCP:()=>e7e,NETTRANSPORTVALUES_IP_UDP:()=>t7e,NETTRANSPORTVALUES_OTHER:()=>a7e,NETTRANSPORTVALUES_PIPE:()=>o7e,NETTRANSPORTVALUES_UNIX:()=>r7e,NETWORK_TRANSPORT_VALUE_PIPE:()=>dWe,NETWORK_TRANSPORT_VALUE_QUIC:()=>pWe,NETWORK_TRANSPORT_VALUE_TCP:()=>fWe,NETWORK_TRANSPORT_VALUE_UDP:()=>AWe,NETWORK_TRANSPORT_VALUE_UNIX:()=>mWe,NETWORK_TYPE_VALUE_IPV4:()=>hWe,NETWORK_TYPE_VALUE_IPV6:()=>_We,NetHostConnectionSubtypeValues:()=>P7e,NetHostConnectionTypeValues:()=>f7e,NetTransportValues:()=>s7e,OSTYPEVALUES_AIX:()=>BJe,OSTYPEVALUES_DARWIN:()=>CJe,OSTYPEVALUES_DRAGONFLYBSD:()=>DJe,OSTYPEVALUES_FREEBSD:()=>bJe,OSTYPEVALUES_HPUX:()=>xJe,OSTYPEVALUES_LINUX:()=>IJe,OSTYPEVALUES_NETBSD:()=>vJe,OSTYPEVALUES_OPENBSD:()=>RJe,OSTYPEVALUES_SOLARIS:()=>NJe,OSTYPEVALUES_WINDOWS:()=>TJe,OSTYPEVALUES_Z_OS:()=>OJe,OTEL_STATUS_CODE_VALUE_ERROR:()=>TWe,OTEL_STATUS_CODE_VALUE_OK:()=>IWe,OsTypeValues:()=>wJe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>oYe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>eYe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>K7e,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>cYe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>W7e,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>rYe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>sYe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Z7e,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>X7e,RPCGRPCSTATUSCODEVALUES_OK:()=>Y7e,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>iYe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>tYe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>nYe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>lYe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>uYe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>aYe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>J7e,RpcGrpcStatusCodeValues:()=>dYe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>z9e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>nVe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>G9e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>U9e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>eVe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>K9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>q9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>rVe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>$9e,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>L9e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>H9e,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Y9e,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>j9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Q9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>F9e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>tVe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Z9e,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>W9e,SEMATTRS_AWS_DYNAMODB_SELECT:()=>V9e,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>J9e,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>k9e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>X9e,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>D$e,SEMATTRS_CODE_FILEPATH:()=>v9e,SEMATTRS_CODE_FUNCTION:()=>C9e,SEMATTRS_CODE_LINENO:()=>R9e,SEMATTRS_CODE_NAMESPACE:()=>b9e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>U$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>j$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>G$e,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Q$e,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>P$e,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>k$e,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>F$e,SEMATTRS_DB_CASSANDRA_TABLE:()=>L$e,SEMATTRS_DB_CONNECTION_STRING:()=>x$e,SEMATTRS_DB_HBASE_NAMESPACE:()=>H$e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>N$e,SEMATTRS_DB_MONGODB_COLLECTION:()=>$$e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>M$e,SEMATTRS_DB_NAME:()=>O$e,SEMATTRS_DB_OPERATION:()=>w$e,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>z$e,SEMATTRS_DB_SQL_TABLE:()=>V$e,SEMATTRS_DB_STATEMENT:()=>mz,SEMATTRS_DB_SYSTEM:()=>Az,SEMATTRS_DB_USER:()=>B$e,SEMATTRS_ENDUSER_ID:()=>E9e,SEMATTRS_ENDUSER_ROLE:()=>S9e,SEMATTRS_ENDUSER_SCOPE:()=>y9e,SEMATTRS_EXCEPTION_ESCAPED:()=>J$e,SEMATTRS_EXCEPTION_MESSAGE:()=>Y$e,SEMATTRS_EXCEPTION_STACKTRACE:()=>K$e,SEMATTRS_EXCEPTION_TYPE:()=>q$e,SEMATTRS_FAAS_COLDSTART:()=>o9e,SEMATTRS_FAAS_CRON:()=>r9e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>W$e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>t9e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>X$e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>e9e,SEMATTRS_FAAS_EXECUTION:()=>Z$e,SEMATTRS_FAAS_INVOKED_NAME:()=>i9e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>a9e,SEMATTRS_FAAS_INVOKED_REGION:()=>s9e,SEMATTRS_FAAS_TIME:()=>n9e,SEMATTRS_FAAS_TRIGGER:()=>gz,SEMATTRS_HTTP_CLIENT_IP:()=>P9e,SEMATTRS_HTTP_FLAVOR:()=>B9e,SEMATTRS_HTTP_HOST:()=>D9e,SEMATTRS_HTTP_METHOD:()=>r1,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>O9e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>w9e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>yz,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Tz,SEMATTRS_HTTP_ROUTE:()=>Iz,SEMATTRS_HTTP_SCHEME:()=>x9e,SEMATTRS_HTTP_SERVER_NAME:()=>M9e,SEMATTRS_HTTP_STATUS_CODE:()=>U0,SEMATTRS_HTTP_TARGET:()=>Sz,SEMATTRS_HTTP_URL:()=>KI,SEMATTRS_HTTP_USER_AGENT:()=>N9e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>BVe,SEMATTRS_MESSAGE_ID:()=>xVe,SEMATTRS_MESSAGE_TYPE:()=>DVe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>NVe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>mVe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>dVe,SEMATTRS_MESSAGING_DESTINATION:()=>oVe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>iVe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>EVe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>_Ve,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>hVe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>SVe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>yVe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>lVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>fVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>pVe,SEMATTRS_MESSAGING_OPERATION:()=>AVe,SEMATTRS_MESSAGING_PROTOCOL:()=>sVe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>uVe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>gVe,SEMATTRS_MESSAGING_SYSTEM:()=>Cz,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>aVe,SEMATTRS_MESSAGING_URL:()=>cVe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>h9e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>m9e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>g9e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>A9e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>f9e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>p9e,SEMATTRS_NET_HOST_IP:()=>_z,SEMATTRS_NET_HOST_NAME:()=>d9e,SEMATTRS_NET_HOST_PORT:()=>Ez,SEMATTRS_NET_PEER_IP:()=>hz,SEMATTRS_NET_PEER_NAME:()=>l9e,SEMATTRS_NET_PEER_PORT:()=>c9e,SEMATTRS_NET_TRANSPORT:()=>u9e,SEMATTRS_PEER_SERVICE:()=>_9e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>vz,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>vVe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>RVe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>bVe,SEMATTRS_RPC_JSONRPC_VERSION:()=>CVe,SEMATTRS_RPC_METHOD:()=>IVe,SEMATTRS_RPC_SERVICE:()=>bz,SEMATTRS_RPC_SYSTEM:()=>TVe,SEMATTRS_THREAD_ID:()=>T9e,SEMATTRS_THREAD_NAME:()=>I9e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>yYe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>SYe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>TYe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>IYe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>CYe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>bYe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>vYe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>DYe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>RYe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>BYe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>xYe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>gYe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>_Ye,SEMRESATTRS_CLOUD_PLATFORM:()=>EYe,SEMRESATTRS_CLOUD_PROVIDER:()=>mYe,SEMRESATTRS_CLOUD_REGION:()=>hYe,SEMRESATTRS_CONTAINER_ID:()=>OYe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>MYe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>PYe,SEMRESATTRS_CONTAINER_NAME:()=>NYe,SEMRESATTRS_CONTAINER_RUNTIME:()=>wYe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>kYe,SEMRESATTRS_DEVICE_ID:()=>UYe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>LYe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>QYe,SEMRESATTRS_FAAS_ID:()=>GYe,SEMRESATTRS_FAAS_INSTANCE:()=>HYe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>zYe,SEMRESATTRS_FAAS_NAME:()=>FYe,SEMRESATTRS_FAAS_VERSION:()=>jYe,SEMRESATTRS_HOST_ARCH:()=>YYe,SEMRESATTRS_HOST_ID:()=>$Ye,SEMRESATTRS_HOST_IMAGE_ID:()=>JYe,SEMRESATTRS_HOST_IMAGE_NAME:()=>KYe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>ZYe,SEMRESATTRS_HOST_NAME:()=>VYe,SEMRESATTRS_HOST_TYPE:()=>qYe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>WYe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>oKe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>gKe,SEMRESATTRS_K8S_CRONJOB_UID:()=>mKe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>pKe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>dKe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>uKe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>sKe,SEMRESATTRS_K8S_JOB_NAME:()=>AKe,SEMRESATTRS_K8S_JOB_UID:()=>fKe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>tKe,SEMRESATTRS_K8S_NODE_NAME:()=>XYe,SEMRESATTRS_K8S_NODE_UID:()=>eKe,SEMRESATTRS_K8S_POD_NAME:()=>rKe,SEMRESATTRS_K8S_POD_UID:()=>nKe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>aKe,SEMRESATTRS_K8S_REPLICASET_UID:()=>iKe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>lKe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>cKe,SEMRESATTRS_OS_DESCRIPTION:()=>_Ke,SEMRESATTRS_OS_NAME:()=>EKe,SEMRESATTRS_OS_TYPE:()=>hKe,SEMRESATTRS_OS_VERSION:()=>SKe,SEMRESATTRS_PROCESS_COMMAND:()=>CKe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>vKe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>bKe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>TKe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>IKe,SEMRESATTRS_PROCESS_OWNER:()=>RKe,SEMRESATTRS_PROCESS_PID:()=>yKe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>BKe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>DKe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>xKe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>OKe,SEMRESATTRS_SERVICE_NAME:()=>NKe,SEMRESATTRS_SERVICE_NAMESPACE:()=>Rz,SEMRESATTRS_SERVICE_VERSION:()=>wKe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>UKe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>PKe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>MKe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>kKe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>FKe,SEMRESATTRS_WEBENGINE_NAME:()=>LKe,SEMRESATTRS_WEBENGINE_VERSION:()=>QKe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>DWe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>xWe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>BWe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>OWe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>wWe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>MWe,SemanticAttributes:()=>OVe,SemanticResourceAttributes:()=>GKe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>MJe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>PJe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>kJe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>UJe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>LJe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>QJe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>FJe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>GJe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>jJe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>HJe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>kWe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>UWe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>LWe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>QWe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>FWe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>GWe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>jWe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>HWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>zWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>$We,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>VWe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>qWe,TelemetrySdkLanguageValues:()=>zJe});var $n=O(()=>{A();vfe();Wme();Xme();ege();tge()});var nge=Q(ZM=>{"use strict";A();Object.defineProperty(ZM,"__esModule",{value:!0});ZM.ATTR_PROCESS_RUNTIME_NAME=void 0;ZM.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var rge=Q(XM=>{"use strict";A();Object.defineProperty(XM,"__esModule",{value:!0});XM.SDK_INFO=void 0;var WXe=Pue(),WM=($n(),we(Nr)),XXe=nge();XM.SDK_INFO={[WM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[XXe.ATTR_PROCESS_RUNTIME_NAME]:"node",[WM.ATTR_TELEMETRY_SDK_LANGUAGE]:WM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[WM.ATTR_TELEMETRY_SDK_VERSION]:WXe.VERSION}});var oge=Q(Bs=>{"use strict";A();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.otperformance=Bs.SDK_INFO=Bs._globalThis=Bs.getStringListFromEnv=Bs.getNumberFromEnv=Bs.getBooleanFromEnv=Bs.getStringFromEnv=void 0;var eP=wue();Object.defineProperty(Bs,"getStringFromEnv",{enumerable:!0,get:function(){return eP.getStringFromEnv}});Object.defineProperty(Bs,"getBooleanFromEnv",{enumerable:!0,get:function(){return eP.getBooleanFromEnv}});Object.defineProperty(Bs,"getNumberFromEnv",{enumerable:!0,get:function(){return eP.getNumberFromEnv}});Object.defineProperty(Bs,"getStringListFromEnv",{enumerable:!0,get:function(){return eP.getStringListFromEnv}});var eet=Mue();Object.defineProperty(Bs,"_globalThis",{enumerable:!0,get:function(){return eet._globalThis}});var tet=rge();Object.defineProperty(Bs,"SDK_INFO",{enumerable:!0,get:function(){return tet.SDK_INFO}});Bs.otperformance=performance});var jz=Q(Ns=>{"use strict";A();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.getStringListFromEnv=Ns.getNumberFromEnv=Ns.getStringFromEnv=Ns.getBooleanFromEnv=Ns.otperformance=Ns._globalThis=Ns.SDK_INFO=void 0;var F0=oge();Object.defineProperty(Ns,"SDK_INFO",{enumerable:!0,get:function(){return F0.SDK_INFO}});Object.defineProperty(Ns,"_globalThis",{enumerable:!0,get:function(){return F0._globalThis}});Object.defineProperty(Ns,"otperformance",{enumerable:!0,get:function(){return F0.otperformance}});Object.defineProperty(Ns,"getBooleanFromEnv",{enumerable:!0,get:function(){return F0.getBooleanFromEnv}});Object.defineProperty(Ns,"getStringFromEnv",{enumerable:!0,get:function(){return F0.getStringFromEnv}});Object.defineProperty(Ns,"getNumberFromEnv",{enumerable:!0,get:function(){return F0.getNumberFromEnv}});Object.defineProperty(Ns,"getStringListFromEnv",{enumerable:!0,get:function(){return F0.getStringListFromEnv}})});var uge=Q(Xr=>{"use strict";A();Object.defineProperty(Xr,"__esModule",{value:!0});Xr.addHrTimes=Xr.isTimeInput=Xr.isTimeInputHrTime=Xr.hrTimeToMicroseconds=Xr.hrTimeToMilliseconds=Xr.hrTimeToNanoseconds=Xr.hrTimeToTimeStamp=Xr.hrTimeDuration=Xr.timeInputToHrTime=Xr.hrTime=Xr.getTimeOrigin=Xr.millisToHrTime=void 0;var tP=jz(),ige=9,net=6,ret=Math.pow(10,net),nP=Math.pow(10,ige);function o1(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*ret);return[n,r]}Xr.millisToHrTime=o1;function oet(){return tP.otperformance.timeOrigin}Xr.getTimeOrigin=oet;function age(e){let t=o1(tP.otperformance.timeOrigin),n=o1(typeof e=="number"?e:tP.otperformance.now());return sge(t,n)}Xr.hrTime=age;function iet(e){if(Hz(e))return e;if(typeof e=="number")return e<tP.otperformance.timeOrigin?age(e):o1(e);if(e instanceof Date)return o1(e.getTime());throw TypeError("Invalid input type")}Xr.timeInputToHrTime=iet;function aet(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=nP),[n,r]}Xr.hrTimeDuration=aet;function set(e){let t=ige,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Xr.hrTimeToTimeStamp=set;function uet(e){return e[0]*nP+e[1]}Xr.hrTimeToNanoseconds=uet;function cet(e){return e[0]*1e3+e[1]/1e6}Xr.hrTimeToMilliseconds=cet;function det(e){return e[0]*1e6+e[1]/1e3}Xr.hrTimeToMicroseconds=det;function Hz(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Xr.isTimeInputHrTime=Hz;function pet(e){return Hz(e)||typeof e=="number"||e instanceof Date}Xr.isTimeInput=pet;function sge(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=nP&&(n[1]-=nP,n[0]+=1),n}Xr.addHrTimes=sge});var cge=Q(rP=>{"use strict";A();Object.defineProperty(rP,"__esModule",{value:!0});rP.unrefTimer=void 0;function fet(e){typeof e!="number"&&e.unref()}rP.unrefTimer=fet});var lge=Q(i1=>{"use strict";A();Object.defineProperty(i1,"__esModule",{value:!0});i1.ExportResultCode=void 0;var Aet;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Aet=i1.ExportResultCode||(i1.ExportResultCode={}))});var pge=Q(oP=>{"use strict";A();Object.defineProperty(oP,"__esModule",{value:!0});oP.CompositePropagator=void 0;var dge=(Le(),we(Je)),zz=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,r)=>n.concat(r),[])))}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){dge.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(a){dge.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};oP.CompositePropagator=zz});var fge=Q(ZI=>{"use strict";A();Object.defineProperty(ZI,"__esModule",{value:!0});ZI.validateValue=ZI.validateKey=void 0;var $z="[_0-9a-z-*/]",met=`[a-z]${$z}{0,255}`,get=`[a-z0-9]${$z}{0,240}@[a-z]${$z}{0,13}`,het=new RegExp(`^(?:${met}|${get})$`),_et=/^[ -~]{0,255}[!-~]$/,Eet=/,|=/;function yet(e){return het.test(e)}ZI.validateKey=yet;function Tet(e){return _et.test(e)&&!Eet.test(e)}ZI.validateValue=Tet});var qz=Q(iP=>{"use strict";A();Object.defineProperty(iP,"__esModule",{value:!0});iP.TraceState=void 0;var Age=fge(),mge=32,Iet=512,gge=",",hge="=",Vz=class e{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,n)=>(t.push(n+hge+this.get(n)),t),[]).join(gge)}_parse(t){t.length>Iet||(this._internalState=t.split(gge).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(hge);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,Age.validateKey)(a)&&(0,Age.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>mge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,mge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};iP.TraceState=Vz});var Ege=Q(Os=>{"use strict";A();Object.defineProperty(Os,"__esModule",{value:!0});Os.W3CTraceContextPropagator=Os.parseTraceParent=Os.TRACE_STATE_HEADER=Os.TRACE_PARENT_HEADER=void 0;var aP=(Le(),we(Je)),Cet=n1(),bet=qz();Os.TRACE_PARENT_HEADER="traceparent";Os.TRACE_STATE_HEADER="tracestate";var vet="00",Ret="(?!ff)[\\da-f]{2}",Det="(?![0]{32})[\\da-f]{32}",xet="(?![0]{16})[\\da-f]{16}",Bet="[\\da-f]{2}",Net=new RegExp(`^\\s?(${Ret})-(${Det})-(${xet})-(${Bet})(-.*)?\\s?$`);function _ge(e){let t=Net.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Os.parseTraceParent=_ge;var Yz=class{inject(t,n,r){let o=aP.trace.getSpanContext(t);if(!o||(0,Cet.isTracingSuppressed)(t)||!(0,aP.isSpanContextValid)(o))return;let i=`${vet}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||aP.TraceFlags.NONE).toString(16)}`;r.set(n,Os.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Os.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Os.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=_ge(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Os.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new bet.TraceState(typeof d=="string"?d:void 0)}return aP.trace.setSpanContext(t,a)}fields(){return[Os.TRACE_PARENT_HEADER,Os.TRACE_STATE_HEADER]}};Os.W3CTraceContextPropagator=Yz});var Sge=Q(Rp=>{"use strict";A();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.getRPCMetadata=Rp.deleteRPCMetadata=Rp.setRPCMetadata=Rp.RPCType=void 0;var Oet=(Le(),we(Je)),Kz=(0,Oet.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),wet;(function(e){e.HTTP="http"})(wet=Rp.RPCType||(Rp.RPCType={}));function Met(e,t){return e.setValue(Kz,t)}Rp.setRPCMetadata=Met;function Pet(e){return e.deleteValue(Kz)}Rp.deleteRPCMetadata=Pet;function ket(e){return e.getValue(Kz)}Rp.getRPCMetadata=ket});var bge=Q(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.isPlainObject=void 0;var Uet="[object Object]",Let="[object Null]",Qet="[object Undefined]",Fet=Function.prototype,yge=Fet.toString,Get=yge.call(Object),jet=Object.getPrototypeOf,Tge=Object.prototype,Ige=Tge.hasOwnProperty,G0=Symbol?Symbol.toStringTag:void 0,Cge=Tge.toString;function Het(e){if(!zet(e)||$et(e)!==Uet)return!1;let t=jet(e);if(t===null)return!0;let n=Ige.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&yge.call(n)===Get}sP.isPlainObject=Het;function zet(e){return e!=null&&typeof e=="object"}function $et(e){return e==null?e===void 0?Qet:Let:G0&&G0 in Object(e)?Vet(e):qet(e)}function Vet(e){let t=Ige.call(e,G0),n=e[G0],r=!1;try{e[G0]=void 0,r=!0}catch{}let o=Cge.call(e);return r&&(t?e[G0]=n:delete e[G0]),o}function qet(e){return Cge.call(e)}});var Bge=Q(lP=>{"use strict";A();Object.defineProperty(lP,"__esModule",{value:!0});lP.merge=void 0;var vge=bge(),Yet=20;function Ket(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Dge(t,e.shift(),0,n);return t}lP.merge=Ket;function Jz(e){return cP(e)?e.slice():e}function Dge(e,t,n=0,r){let o;if(!(n>Yet)){if(n++,uP(e)||uP(t)||xge(t))o=Jz(t);else if(cP(e)){if(o=e.slice(),cP(t))for(let i=0,a=t.length;i<a;i++)o.push(Jz(t[i]));else if(a1(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=Jz(t[d])}}}else if(a1(e))if(a1(t)){if(!Jet(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],m=t[d];if(uP(m))typeof m>"u"?delete o[d]:o[d]=m;else{let h=o[d],y=m;if(Rge(e,d,r)||Rge(t,d,r))delete o[d];else{if(a1(h)&&a1(y)){let S=r.get(h)||[],C=r.get(y)||[];S.push({obj:e,key:d}),C.push({obj:t,key:d}),r.set(h,S),r.set(y,C)}o[d]=Dge(o[d],m,n,r)}}}}else o=t;return o}}function Rge(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function cP(e){return Array.isArray(e)}function xge(e){return typeof e=="function"}function a1(e){return!uP(e)&&!cP(e)&&!xge(e)&&typeof e=="object"}function uP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Jet(e,t){return!(!(0,vge.isPlainObject)(e)||!(0,vge.isPlainObject)(t))}});var Nge=Q(WI=>{"use strict";A();Object.defineProperty(WI,"__esModule",{value:!0});WI.callWithTimeout=WI.TimeoutError=void 0;var dP=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};WI.TimeoutError=dP;function Zet(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new dP("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}WI.callWithTimeout=Zet});var wge=Q(XI=>{"use strict";A();Object.defineProperty(XI,"__esModule",{value:!0});XI.isUrlIgnored=XI.urlMatches=void 0;function Oge(e,t){return typeof t=="string"?e===t:!!e.match(t)}XI.urlMatches=Oge;function Wet(e,t){if(!t)return!1;for(let n of t)if(Oge(e,n))return!0;return!1}XI.isUrlIgnored=Wet});var Mge=Q(pP=>{"use strict";A();Object.defineProperty(pP,"__esModule",{value:!0});pP.Deferred=void 0;var Zz=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};pP.Deferred=Zz});var Pge=Q(fP=>{"use strict";A();Object.defineProperty(fP,"__esModule",{value:!0});fP.BindOnceFuture=void 0;var Xet=Mge(),Wz=class{_isCalled=!1;_deferred=new Xet.Deferred;_callback;_that;constructor(t,n){this._callback=t,this._that=n}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(n=>this._deferred.resolve(n),n=>this._deferred.reject(n))}catch(n){this._deferred.reject(n)}}return this._deferred.promise}};fP.BindOnceFuture=Wz});var Uge=Q(AP=>{"use strict";A();Object.defineProperty(AP,"__esModule",{value:!0});AP.diagLogLevelFromString=void 0;var bm=(Le(),we(Je)),kge={ALL:bm.DiagLogLevel.ALL,VERBOSE:bm.DiagLogLevel.VERBOSE,DEBUG:bm.DiagLogLevel.DEBUG,INFO:bm.DiagLogLevel.INFO,WARN:bm.DiagLogLevel.WARN,ERROR:bm.DiagLogLevel.ERROR,NONE:bm.DiagLogLevel.NONE};function ett(e){if(e==null)return;let t=kge[e.toUpperCase()];return t??(bm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kge)}, using default`),bm.DiagLogLevel.INFO)}AP.diagLogLevelFromString=ett});var Qge=Q(mP=>{"use strict";A();Object.defineProperty(mP,"__esModule",{value:!0});mP._export=void 0;var Lge=(Le(),we(Je)),ttt=n1();function ntt(e,t){return new Promise(n=>{Lge.context.with((0,ttt.suppressTracing)(Lge.context.active()),()=>{e.export(t,n)})})}mP._export=ntt});var _r=Q(Be=>{"use strict";A();Object.defineProperty(Be,"__esModule",{value:!0});Be.internal=Be.diagLogLevelFromString=Be.BindOnceFuture=Be.urlMatches=Be.isUrlIgnored=Be.callWithTimeout=Be.TimeoutError=Be.merge=Be.TraceState=Be.unsuppressTracing=Be.suppressTracing=Be.isTracingSuppressed=Be.setRPCMetadata=Be.getRPCMetadata=Be.deleteRPCMetadata=Be.RPCType=Be.parseTraceParent=Be.W3CTraceContextPropagator=Be.TRACE_STATE_HEADER=Be.TRACE_PARENT_HEADER=Be.CompositePropagator=Be.otperformance=Be.getStringListFromEnv=Be.getNumberFromEnv=Be.getBooleanFromEnv=Be.getStringFromEnv=Be._globalThis=Be.SDK_INFO=Be.parseKeyPairsIntoRecord=Be.ExportResultCode=Be.unrefTimer=Be.timeInputToHrTime=Be.millisToHrTime=Be.isTimeInputHrTime=Be.isTimeInput=Be.hrTimeToTimeStamp=Be.hrTimeToNanoseconds=Be.hrTimeToMilliseconds=Be.hrTimeToMicroseconds=Be.hrTimeDuration=Be.hrTime=Be.getTimeOrigin=Be.addHrTimes=Be.loggingErrorHandler=Be.setGlobalErrorHandler=Be.globalErrorHandler=Be.sanitizeAttributes=Be.isAttributeValue=Be.AnchoredClock=Be.W3CBaggagePropagator=void 0;var rtt=yue();Object.defineProperty(Be,"W3CBaggagePropagator",{enumerable:!0,get:function(){return rtt.W3CBaggagePropagator}});var ott=Tue();Object.defineProperty(Be,"AnchoredClock",{enumerable:!0,get:function(){return ott.AnchoredClock}});var Fge=Rue();Object.defineProperty(Be,"isAttributeValue",{enumerable:!0,get:function(){return Fge.isAttributeValue}});Object.defineProperty(Be,"sanitizeAttributes",{enumerable:!0,get:function(){return Fge.sanitizeAttributes}});var Gge=xue();Object.defineProperty(Be,"globalErrorHandler",{enumerable:!0,get:function(){return Gge.globalErrorHandler}});Object.defineProperty(Be,"setGlobalErrorHandler",{enumerable:!0,get:function(){return Gge.setGlobalErrorHandler}});var itt=pz();Object.defineProperty(Be,"loggingErrorHandler",{enumerable:!0,get:function(){return itt.loggingErrorHandler}});var pd=uge();Object.defineProperty(Be,"addHrTimes",{enumerable:!0,get:function(){return pd.addHrTimes}});Object.defineProperty(Be,"getTimeOrigin",{enumerable:!0,get:function(){return pd.getTimeOrigin}});Object.defineProperty(Be,"hrTime",{enumerable:!0,get:function(){return pd.hrTime}});Object.defineProperty(Be,"hrTimeDuration",{enumerable:!0,get:function(){return pd.hrTimeDuration}});Object.defineProperty(Be,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return pd.hrTimeToMicroseconds}});Object.defineProperty(Be,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return pd.hrTimeToMilliseconds}});Object.defineProperty(Be,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return pd.hrTimeToNanoseconds}});Object.defineProperty(Be,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return pd.hrTimeToTimeStamp}});Object.defineProperty(Be,"isTimeInput",{enumerable:!0,get:function(){return pd.isTimeInput}});Object.defineProperty(Be,"isTimeInputHrTime",{enumerable:!0,get:function(){return pd.isTimeInputHrTime}});Object.defineProperty(Be,"millisToHrTime",{enumerable:!0,get:function(){return pd.millisToHrTime}});Object.defineProperty(Be,"timeInputToHrTime",{enumerable:!0,get:function(){return pd.timeInputToHrTime}});var att=cge();Object.defineProperty(Be,"unrefTimer",{enumerable:!0,get:function(){return att.unrefTimer}});var stt=lge();Object.defineProperty(Be,"ExportResultCode",{enumerable:!0,get:function(){return stt.ExportResultCode}});var utt=sz();Object.defineProperty(Be,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return utt.parseKeyPairsIntoRecord}});var j0=jz();Object.defineProperty(Be,"SDK_INFO",{enumerable:!0,get:function(){return j0.SDK_INFO}});Object.defineProperty(Be,"_globalThis",{enumerable:!0,get:function(){return j0._globalThis}});Object.defineProperty(Be,"getStringFromEnv",{enumerable:!0,get:function(){return j0.getStringFromEnv}});Object.defineProperty(Be,"getBooleanFromEnv",{enumerable:!0,get:function(){return j0.getBooleanFromEnv}});Object.defineProperty(Be,"getNumberFromEnv",{enumerable:!0,get:function(){return j0.getNumberFromEnv}});Object.defineProperty(Be,"getStringListFromEnv",{enumerable:!0,get:function(){return j0.getStringListFromEnv}});Object.defineProperty(Be,"otperformance",{enumerable:!0,get:function(){return j0.otperformance}});var ctt=pge();Object.defineProperty(Be,"CompositePropagator",{enumerable:!0,get:function(){return ctt.CompositePropagator}});var gP=Ege();Object.defineProperty(Be,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return gP.TRACE_PARENT_HEADER}});Object.defineProperty(Be,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return gP.TRACE_STATE_HEADER}});Object.defineProperty(Be,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return gP.W3CTraceContextPropagator}});Object.defineProperty(Be,"parseTraceParent",{enumerable:!0,get:function(){return gP.parseTraceParent}});var hP=Sge();Object.defineProperty(Be,"RPCType",{enumerable:!0,get:function(){return hP.RPCType}});Object.defineProperty(Be,"deleteRPCMetadata",{enumerable:!0,get:function(){return hP.deleteRPCMetadata}});Object.defineProperty(Be,"getRPCMetadata",{enumerable:!0,get:function(){return hP.getRPCMetadata}});Object.defineProperty(Be,"setRPCMetadata",{enumerable:!0,get:function(){return hP.setRPCMetadata}});var Xz=n1();Object.defineProperty(Be,"isTracingSuppressed",{enumerable:!0,get:function(){return Xz.isTracingSuppressed}});Object.defineProperty(Be,"suppressTracing",{enumerable:!0,get:function(){return Xz.suppressTracing}});Object.defineProperty(Be,"unsuppressTracing",{enumerable:!0,get:function(){return Xz.unsuppressTracing}});var ltt=qz();Object.defineProperty(Be,"TraceState",{enumerable:!0,get:function(){return ltt.TraceState}});var dtt=Bge();Object.defineProperty(Be,"merge",{enumerable:!0,get:function(){return dtt.merge}});var jge=Nge();Object.defineProperty(Be,"TimeoutError",{enumerable:!0,get:function(){return jge.TimeoutError}});Object.defineProperty(Be,"callWithTimeout",{enumerable:!0,get:function(){return jge.callWithTimeout}});var Hge=wge();Object.defineProperty(Be,"isUrlIgnored",{enumerable:!0,get:function(){return Hge.isUrlIgnored}});Object.defineProperty(Be,"urlMatches",{enumerable:!0,get:function(){return Hge.urlMatches}});var ptt=Pge();Object.defineProperty(Be,"BindOnceFuture",{enumerable:!0,get:function(){return ptt.BindOnceFuture}});var ftt=Uge();Object.defineProperty(Be,"diagLogLevelFromString",{enumerable:!0,get:function(){return ftt.diagLogLevelFromString}});var Att=Qge();Be.internal={_export:Att._export}});var zge=Q(_P=>{"use strict";A();Object.defineProperty(_P,"__esModule",{value:!0});_P.VERSION=void 0;_P.VERSION="0.214.0"});var $ge=Q(s1=>{"use strict";A();Object.defineProperty(s1,"__esModule",{value:!0});s1.SeverityNumber=void 0;var mtt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(mtt=s1.SeverityNumber||(s1.SeverityNumber={}))});var SP=Q(eC=>{"use strict";A();Object.defineProperty(eC,"__esModule",{value:!0});eC.NOOP_LOGGER=eC.NoopLogger=void 0;var EP=class{emit(t){}};eC.NoopLogger=EP;eC.NOOP_LOGGER=new EP});var Vge=Q(Gf=>{"use strict";A();Object.defineProperty(Gf,"__esModule",{value:!0});Gf.API_BACKWARDS_COMPATIBILITY_VERSION=Gf.makeGetter=Gf._global=Gf.GLOBAL_LOGS_API_KEY=void 0;Gf.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Gf._global=globalThis;function gtt(e,t,n){return r=>r===e?t:n}Gf.makeGetter=gtt;Gf.API_BACKWARDS_COMPATIBILITY_VERSION=1});var e5=Q(tC=>{"use strict";A();Object.defineProperty(tC,"__esModule",{value:!0});tC.NOOP_LOGGER_PROVIDER=tC.NoopLoggerProvider=void 0;var htt=SP(),yP=class{getLogger(t,n,r){return new htt.NoopLogger}};tC.NoopLoggerProvider=yP;tC.NOOP_LOGGER_PROVIDER=new yP});var qge=Q(TP=>{"use strict";A();Object.defineProperty(TP,"__esModule",{value:!0});TP.ProxyLogger=void 0;var _tt=SP(),t5=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):_tt.NOOP_LOGGER}};TP.ProxyLogger=t5});var Yge=Q(IP=>{"use strict";A();Object.defineProperty(IP,"__esModule",{value:!0});IP.ProxyLoggerProvider=void 0;var Ett=e5(),Stt=qge(),n5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Stt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Ett.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};IP.ProxyLoggerProvider=n5});var Jge=Q(CP=>{"use strict";A();Object.defineProperty(CP,"__esModule",{value:!0});CP.LogsAPI=void 0;var fd=Vge(),ytt=e5(),Kge=Yge(),r5=class e{constructor(){this._proxyLoggerProvider=new Kge.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return fd._global[fd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(fd._global[fd.GLOBAL_LOGS_API_KEY]=(0,fd.makeGetter)(fd.API_BACKWARDS_COMPATIBILITY_VERSION,t,ytt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=fd._global[fd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(fd._global,fd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete fd._global[fd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Kge.ProxyLoggerProvider}};CP.LogsAPI=r5});var o5=Q(jf=>{"use strict";A();Object.defineProperty(jf,"__esModule",{value:!0});jf.logs=jf.NoopLogger=jf.NOOP_LOGGER=jf.SeverityNumber=void 0;var Ttt=$ge();Object.defineProperty(jf,"SeverityNumber",{enumerable:!0,get:function(){return Ttt.SeverityNumber}});var Zge=SP();Object.defineProperty(jf,"NOOP_LOGGER",{enumerable:!0,get:function(){return Zge.NOOP_LOGGER}});Object.defineProperty(jf,"NoopLogger",{enumerable:!0,get:function(){return Zge.NoopLogger}});var Itt=Jge();jf.logs=Itt.LogsAPI.getInstance()});var Wge=Q(nC=>{"use strict";A();Object.defineProperty(nC,"__esModule",{value:!0});nC.disableInstrumentations=nC.enableInstrumentations=void 0;function Ctt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}nC.enableInstrumentations=Ctt;function btt(e){e.forEach(t=>t.disable())}nC.disableInstrumentations=btt});var the=Q(bP=>{"use strict";A();Object.defineProperty(bP,"__esModule",{value:!0});bP.registerInstrumentations=void 0;var Xge=(Le(),we(Je)),vtt=o5(),ehe=Wge();function Rtt(e){let t=e.tracerProvider||Xge.trace.getTracerProvider(),n=e.meterProvider||Xge.metrics.getMeterProvider(),r=e.loggerProvider||vtt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,ehe.enableInstrumentations)(o,t,n,r),()=>{(0,ehe.disableInstrumentations)(o)}}bP.registerInstrumentations=Rtt});var lhe=Q(vP=>{"use strict";A();Object.defineProperty(vP,"__esModule",{value:!0});vP.satisfies=void 0;var u5=(Le(),we(Je)),ahe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Dtt=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,xtt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Btt(e,t,n){if(!Ntt(e))return u5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Ptt(e);if(!r)return!1;let o=[],i=she(r,t,o,n);return i&&!n?.includePrerelease?wtt(r,o):i}vP.satisfies=Btt;function Ntt(e){return typeof e=="string"&&ahe.test(e)}function she(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(i5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=nnt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!i5(e,i,n,r))return!1;return!0}return i5(e,t,n,r)}function i5(e,t,n,r){if(t=Mtt(t,r),t.includes(" "))return she(e,t,n,r);{let o=ktt(t);return n.push(o),Ott(e,o)}}function Ott(e,t){if(t.invalid)return!1;if(!t.version||s5(t.version))return!0;let n=rhe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=rhe(r,o)}return xtt[t.op]?.includes(n)}function wtt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Mtt(e,t){return e=e.trim(),e=ent(e,t),e=Xtt(e),e=tnt(e,t),e=e.trim(),e}function mu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Ptt(e){let t=e.match(ahe);if(!t){u5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function ktt(e){if(!e)return{};let t=e.match(Dtt);if(!t)return u5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function s5(e){return e==="*"||e==="x"||e==="X"}function nhe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Utt(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function Ltt(e,t){if(s5(e)||s5(t))return 0;let[n,r]=Utt(nhe(e),nhe(t));return n>r?1:n<r?-1:0}function rhe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Ltt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var uhe="[a-zA-Z0-9-]",che="0|[1-9]\\d*",Qtt=`\\d*[a-zA-Z-]${uhe}*`,Ftt="((?:<|>)?=?)",ohe=`(?:${che}|${Qtt})`,Gtt=`(?:-(${ohe}(?:\\.${ohe})*))`,ihe=`${uhe}+`,jtt=`(?:\\+(${ihe}(?:\\.${ihe})*))`,a5=`${che}|x|X|\\*`,u1=`[v=\\s]*(${a5})(?:\\.(${a5})(?:\\.(${a5})(?:${Gtt})?${jtt}?)?)?`,Htt=`^${Ftt}\\s*${u1}$`,ztt=new RegExp(Htt),$tt=`^\\s*(${u1})\\s+-\\s+(${u1})\\s*$`,Vtt=new RegExp($tt),qtt="(?:~>?)",Ytt=`^${qtt}${u1}$`,Ktt=new RegExp(Ytt),Jtt="(?:\\^)",Ztt=`^${Jtt}${u1}$`,Wtt=new RegExp(Ztt);function Xtt(e){let t=Ktt;return e.replace(t,(n,r,o,i,a)=>{let c;return mu(r)?c="":mu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:mu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function ent(e,t){let n=Wtt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return mu(i)?m="":mu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:mu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function tnt(e,t){let n=ztt;return e.replace(n,(r,o,i,a,c,d)=>{let m=mu(i),h=m||mu(a),y=h||mu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function nnt(e,t){let n=Vtt;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,C,R)=>(mu(i)?o="":mu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:mu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,mu(y)?h="":mu(S)?h=`<${+y+1}.0.0-0`:mu(C)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${C}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var c5=Q(ts=>{"use strict";A();Object.defineProperty(ts,"__esModule",{value:!0});ts.massUnwrap=ts.unwrap=ts.massWrap=ts.wrap=void 0;var gu=console.error.bind(console);function c1(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var rnt=(e,t,n)=>{if(!e||!e[t]){gu("no original function "+String(t)+" to wrap");return}if(!n){gu("no wrapper function"),gu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){gu("original object and wrapper must be functions");return}let o=n(r,t);return c1(o,"__original",r),c1(o,"__unwrap",()=>{e[t]===o&&c1(e,t,r)}),c1(o,"__wrapped",!0),c1(e,t,o),o};ts.wrap=rnt;var ont=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{gu("must provide one or more modules to patch"),gu(new Error().stack);return}if(!(t&&Array.isArray(t))){gu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ts.wrap)(r,o,n)})})};ts.massWrap=ont;var int=(e,t)=>{if(!e||!e[t]){gu("no function to unwrap."),gu(new Error().stack);return}let n=e[t];if(!n.__unwrap)gu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ts.unwrap=int;var ant=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{gu("must provide one or more modules to patch"),gu(new Error().stack);return}if(!(t&&Array.isArray(t))){gu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ts.unwrap)(n,r)})})};ts.massUnwrap=ant;function l1(e){e&&e.logger&&(typeof e.logger!="function"?gu("new logger isn't a function, not replacing"):gu=e.logger)}ts.default=l1;l1.wrap=ts.wrap;l1.massWrap=ts.massWrap;l1.unwrap=ts.unwrap;l1.massUnwrap=ts.massUnwrap});var dhe=Q(DP=>{"use strict";A();Object.defineProperty(DP,"__esModule",{value:!0});DP.InstrumentationAbstract=void 0;var l5=(Le(),we(Je)),snt=o5(),RP=c5(),d5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=l5.diag.createComponentLogger({namespace:t}),this._tracer=l5.trace.getTracer(t,n),this._meter=l5.metrics.getMeter(t,n),this._logger=snt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=RP.wrap;_unwrap=RP.unwrap;_massWrap=RP.massWrap;_massUnwrap=RP.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};DP.InstrumentationAbstract=d5});var fhe=Q((H8t,phe)=>{A();var rC=1e3,oC=rC*60,iC=oC*60,H0=iC*24,unt=H0*7,cnt=H0*365.25;phe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return lnt(e);if(n==="number"&&isFinite(e))return t.long?pnt(e):dnt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function lnt(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*cnt;case"weeks":case"week":case"w":return n*unt;case"days":case"day":case"d":return n*H0;case"hours":case"hour":case"hrs":case"hr":case"h":return n*iC;case"minutes":case"minute":case"mins":case"min":case"m":return n*oC;case"seconds":case"second":case"secs":case"sec":case"s":return n*rC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function dnt(e){var t=Math.abs(e);return t>=H0?Math.round(e/H0)+"d":t>=iC?Math.round(e/iC)+"h":t>=oC?Math.round(e/oC)+"m":t>=rC?Math.round(e/rC)+"s":e+"ms"}function pnt(e){var t=Math.abs(e);return t>=H0?xP(e,t,H0,"day"):t>=iC?xP(e,t,iC,"hour"):t>=oC?xP(e,t,oC,"minute"):t>=rC?xP(e,t,rC,"second"):e+" ms"}function xP(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var p5=Q(($8t,Ahe)=>{A();function fnt(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=fhe(),n.destroy=m,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,C,R;function B(...N){if(!B.enabled)return;let M=B,F=Number(new Date),H=F-(y||F);M.diff=H,M.prev=y,M.curr=F,y=F,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let j=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(ae,he)=>{if(ae==="%%")return"%";j++;let be=n.formatters[he];if(typeof be=="function"){let Ie=N[j];ae=be.call(M,Ie),N.splice(j,1),j--}return ae}),n.formatArgs.call(M,N),(M.log||n.log).apply(M,N)}return B.namespace=h,B.useColors=n.useColors(),B.color=n.selectColor(h),B.extend=r,B.destroy=n.destroy,Object.defineProperty(B,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(C!==n.namespaces&&(C=n.namespaces,R=n.enabled(h)),R),set:N=>{S=N}}),typeof n.init=="function"&&n.init(B),B}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,C=0,R=-1,B=0;for(;S<h.length;)if(C<y.length&&(y[C]===h[S]||y[C]==="*"))y[C]==="*"?(R=C,B=S,C++):(S++,C++);else if(R!==-1)C=R+1,B++,S=B;else return!1;for(;C<y.length&&y[C]==="*";)C++;return C===y.length}function a(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function c(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function d(h){return h instanceof Error?h.stack||h.message:h}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Ahe.exports=fnt});var mhe=Q((dc,BP)=>{A();dc.formatArgs=mnt;dc.save=gnt;dc.load=hnt;dc.useColors=Ant;dc.storage=_nt();dc.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();dc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ant(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function mnt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+BP.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),e.splice(r,0,t)}dc.log=console.debug||console.log||(()=>{});function gnt(e){try{e?dc.storage.setItem("debug",e):dc.storage.removeItem("debug")}catch{}}function hnt(){let e;try{e=dc.storage.getItem("debug")||dc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function _nt(){try{return localStorage}catch{}}BP.exports=p5()(dc);var{formatters:Ent}=BP.exports;Ent.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var hhe=Q((Y8t,ghe)=>{"use strict";A();ghe.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}});var She=Q((J8t,Ehe)=>{"use strict";A();var Snt=Ue("os"),_he=Ue("tty"),Ad=hhe(),{env:Ca}=process,yh;Ad("no-color")||Ad("no-colors")||Ad("color=false")||Ad("color=never")?yh=0:(Ad("color")||Ad("colors")||Ad("color=true")||Ad("color=always"))&&(yh=1);"FORCE_COLOR"in Ca&&(Ca.FORCE_COLOR==="true"?yh=1:Ca.FORCE_COLOR==="false"?yh=0:yh=Ca.FORCE_COLOR.length===0?1:Math.min(parseInt(Ca.FORCE_COLOR,10),3));function f5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function A5(e,t){if(yh===0)return 0;if(Ad("color=16m")||Ad("color=full")||Ad("color=truecolor"))return 3;if(Ad("color=256"))return 2;if(e&&!t&&yh===void 0)return 0;let n=yh||0;if(Ca.TERM==="dumb")return n;if(process.platform==="win32"){let r=Snt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ca)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ca)||Ca.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ca)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ca.TEAMCITY_VERSION)?1:0;if(Ca.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ca){let r=parseInt((Ca.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ca.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ca.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ca.TERM)||"COLORTERM"in Ca?1:n}function ynt(e){let t=A5(e,e&&e.isTTY);return f5(t)}Ehe.exports={supportsColor:ynt,stdout:f5(A5(!0,_he.isatty(1))),stderr:f5(A5(!0,_he.isatty(2)))}});var The=Q((ba,OP)=>{A();var Tnt=Ue("tty"),NP=Ue("util");ba.init=xnt;ba.log=vnt;ba.formatArgs=Cnt;ba.save=Rnt;ba.load=Dnt;ba.useColors=Int;ba.destroy=NP.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ba.colors=[6,2,3,4,5,1];try{let e=She();e&&(e.stderr||e).level>=2&&(ba.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ba.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function Int(){return"colors"in ba.inspectOpts?!!ba.inspectOpts.colors:Tnt.isatty(process.stderr.fd)}function Cnt(e){let{namespace:t,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
3
+ var w5e=Object.create;var IM=Object.defineProperty;var M5e=Object.getOwnPropertyDescriptor;var P5e=Object.getOwnPropertyNames;var k5e=Object.getPrototypeOf,U5e=Object.prototype.hasOwnProperty;var Ue=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),es=(e,t)=>{for(var n in t)IM(e,n,{get:t[n],enumerable:!0})},bse=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P5e(t))!U5e.call(e,o)&&o!==n&&IM(e,o,{get:()=>t[o],enumerable:!(r=M5e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?w5e(k5e(e)):{},bse(t||!e||!e.__esModule?IM(n,"default",{value:e,enumerable:!0}):n,e)),we=e=>bse(IM({},"__esModule",{value:!0}),e);var A=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.60"}}catch{}})()});var ym,bH=O(()=>{A();ym="1.9.1"});function L5e(e){let t=new Set([e]),n=new Set,r=e.match(vse);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let m=d.match(vse);if(!m)return i(d);let h={major:+m[1],minor:+m[2],patch:+m[3],prerelease:m[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var vse,Rse,Dse=O(()=>{A();bH();vse=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Rse=L5e(ym)});function Pf(e,t,n,r=!1){var o;let i=Kx[Yx]=(o=Kx[Yx])!==null&&o!==void 0?o:{version:ym};if(!r&&i[e]){let a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(a.stack||a.message),!1}if(i.version!==ym){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${ym}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${ym}.`),!0}function il(e){var t,n;let r=(t=Kx[Yx])===null||t===void 0?void 0:t.version;if(!(!r||!Rse(r)))return(n=Kx[Yx])===null||n===void 0?void 0:n[e]}function kf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${ym}.`);let n=Kx[Yx];n&&delete n[e]}var Q5e,Yx,Kx,O0=O(()=>{A();bH();Dse();Q5e=ym.split(".")[0],Yx=Symbol.for(`opentelemetry.js.api.${Q5e}`),Kx=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Jx(e,t,n){let r=il("diag");if(r)return r[e](t,...n)}var CM,xse=O(()=>{A();O0();CM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return Jx("debug",this._namespace,t)}error(...t){return Jx("error",this._namespace,t)}info(...t){return Jx("info",this._namespace,t)}warn(...t){return Jx("warn",this._namespace,t)}verbose(...t){return Jx("verbose",this._namespace,t)}}});var oa,bM=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(oa||(oa={}))});function Bse(e,t){e<oa.NONE?e=oa.NONE:e>oa.ALL&&(e=oa.ALL),t=t||{};function n(r,o){let i=t[r];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return{error:n("error",oa.ERROR),warn:n("warn",oa.WARN),info:n("info",oa.INFO),debug:n("debug",oa.DEBUG),verbose:n("verbose",oa.VERBOSE)}}var Nse=O(()=>{A();bM()});var F5e,Ia,w0=O(()=>{A();xse();Nse();bM();O0();F5e="diag",Ia=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=il("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:oa.INFO})=>{var a,c,d;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=y.stack)!==null&&a!==void 0?a:y.message),!1}typeof i=="number"&&(i={logLevel:i});let m=il("diag"),h=Bse((c=i.logLevel)!==null&&c!==void 0?c:oa.INFO,o);if(m&&!i.suppressOverrideMessage){let y=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Pf("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{kf(F5e,n)},n.createComponentLogger=o=>new CM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var vM,Ose=O(()=>{A();vM=class e{constructor(t){this._entries=t?new Map(t):new Map}getEntry(t){let n=this._entries.get(t);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let r of t)n._entries.delete(r);return n}clear(){return new e}}});var wse,Mse=O(()=>{A();wse=Symbol("BaggageEntryMetadata")});function Pse(e={}){return new vM(new Map(Object.entries(e)))}function kse(e){return typeof e!="string"&&(G5e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:wse,toString(){return e}}}var G5e,vH=O(()=>{A();w0();Ose();Mse();G5e=Ia.instance()});function al(e){return Symbol.for(e)}var RH,HI,Zx=O(()=>{A();RH=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,o)=>{let i=new e(n._currentContext);return i._currentContext.set(r,o),i},n.deleteValue=r=>{let o=new e(n._currentContext);return o._currentContext.delete(r),o}}},HI=new RH});var DH,xH,RM,Use=O(()=>{A();DH=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],xH={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(xH[t]=console[t])}RM=class{constructor(){function t(n){return function(...r){let o=xH[n];if(typeof o!="function"&&(o=xH.log),typeof o!="function"&&console&&(o=console[n],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,r)}}for(let n=0;n<DH.length;n++)this[DH[n].n]=t(DH[n].c)}}});function Lse(){return LH}var BH,zI,NH,OH,wH,MH,Wx,PH,kH,UH,LH,j5e,H5e,z5e,$5e,V5e,q5e,Y5e,QH=O(()=>{A();BH=class{constructor(){}createGauge(t,n){return H5e}createHistogram(t,n){return z5e}createCounter(t,n){return j5e}createUpDownCounter(t,n){return $5e}createObservableGauge(t,n){return q5e}createObservableCounter(t,n){return V5e}createObservableUpDownCounter(t,n){return Y5e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},zI=class{},NH=class extends zI{add(t,n){}},OH=class extends zI{add(t,n){}},wH=class extends zI{record(t,n){}},MH=class extends zI{record(t,n){}},Wx=class{addCallback(t){}removeCallback(t){}},PH=class extends Wx{},kH=class extends Wx{},UH=class extends Wx{},LH=new BH,j5e=new NH,H5e=new wH,z5e=new MH,$5e=new OH,V5e=new PH,q5e=new kH,Y5e=new UH});var DM,Qse=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(DM||(DM={}))});var xM,BM,FH=O(()=>{A();xM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},BM={set(e,t,n){e!=null&&(e[t]=n)}}});var NM,Fse=O(()=>{A();Zx();NM=class{active(){return HI}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var GH,K5e,Uf,Xx=O(()=>{A();Fse();O0();w0();GH="context",K5e=new NM,Uf=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Pf(GH,t,Ia.instance())}active(){return this._getContextManager().active()}with(t,n,r,...o){return this._getContextManager().with(t,n,r,...o)}bind(t,n){return this._getContextManager().bind(t,n)}_getContextManager(){return il(GH)||K5e}disable(){this._getContextManager().disable(),kf(GH,Ia.instance())}}});var Ds,jH=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ds||(Ds={}))});var e1,M0,OM,wM=O(()=>{A();jH();e1="0000000000000000",M0="00000000000000000000000000000000",OM={traceId:M0,spanId:e1,traceFlags:Ds.NONE}});var Lf,MM=O(()=>{A();wM();Lf=class{constructor(t=OM){this._spanContext=t}spanContext(){return this._spanContext}setAttribute(t,n){return this}setAttributes(t){return this}addEvent(t,n){return this}addLink(t){return this}addLinks(t){return this}setStatus(t){return this}updateName(t){return this}end(t){}isRecording(){return!1}recordException(t,n){}}});function PM(e){return e.getValue(HH)||void 0}function Gse(){return PM(Uf.getInstance().active())}function t1(e,t){return e.setValue(HH,t)}function jse(e){return e.deleteValue(HH)}function Hse(e,t){return t1(e,new Lf(t))}function kM(e){var t;return(t=PM(e))===null||t===void 0?void 0:t.spanContext()}var HH,zH=O(()=>{A();Zx();MM();Xx();HH=al("OpenTelemetry Context Key SPAN")});function zse(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(UM[e.charCodeAt(r)]|0)+(UM[e.charCodeAt(r+1)]|0)+(UM[e.charCodeAt(r+2)]|0)+(UM[e.charCodeAt(r+3)]|0);return n===t}function $H(e){return zse(e,32)&&e!==M0}function VH(e){return zse(e,16)&&e!==e1}function Tm(e){return $H(e.traceId)&&VH(e.spanId)}function $se(e){return new Lf(e)}var UM,LM=O(()=>{A();wM();MM();UM=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])});function J5e(e){return e!==null&&typeof e=="object"&&"spanId"in e&&typeof e.spanId=="string"&&"traceId"in e&&typeof e.traceId=="string"&&"traceFlags"in e&&typeof e.traceFlags=="number"}var qH,$I,YH=O(()=>{A();Xx();zH();MM();LM();qH=Uf.getInstance(),$I=class{startSpan(t,n,r=qH.active()){if(!!n?.root)return new Lf;let i=r&&kM(r);return J5e(i)&&Tm(i)?new Lf(i):new Lf}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let d=a??qH.active(),m=this.startSpan(t,i,d),h=t1(d,m);return qH.with(h,c,void 0,m)}}});var Z5e,VI,KH=O(()=>{A();YH();Z5e=new $I,VI=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}startSpan(t,n,r){return this._getTracer().startSpan(t,n,r)}startActiveSpan(t,n,r,o){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Z5e}}});var QM,Vse=O(()=>{A();YH();QM=class{getTracer(t,n,r){return new $I}}});var W5e,P0,JH=O(()=>{A();KH();Vse();W5e=new QM,P0=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new VI(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:W5e}setDelegate(t){this._delegate=t}getDelegateTracer(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(t,n,r)}}});var FM,qse=O(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(FM||(FM={}))});var Wr,Yse=O(()=>{A();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(Wr||(Wr={}))});var Xo,Kse=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Xo||(Xo={}))});function Jse(e){return t$e.test(e)}function Zse(e){return n$e.test(e)&&!r$e.test(e)}var ZH,X5e,e$e,t$e,n$e,r$e,Wse=O(()=>{A();ZH="[_0-9a-z-*/]",X5e=`[a-z]${ZH}{0,255}`,e$e=`[a-z0-9]${ZH}{0,240}@[a-z]${ZH}{0,13}`,t$e=new RegExp(`^(?:${X5e}|${e$e})$`),n$e=/^[ -~]{0,255}[!-~]$/,r$e=/,|=/});var Xse,o$e,eue,tue,GM,nue=O(()=>{A();Wse();Xse=32,o$e=512,eue=",",tue="=",GM=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+tue+this.get(n)),t),[]).join(eue)}_parse(t){t.length>o$e||(this._internalState=t.split(eue).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(tue);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Jse(a)&&Zse(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Xse&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Xse))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function rue(e){return new GM(e)}var oue=O(()=>{A();nue()});var qe,iue=O(()=>{A();Xx();qe=Uf.getInstance()});var sl,aue=O(()=>{A();w0();sl=Ia.instance()});var WH,sue,uue=O(()=>{A();QH();WH=class{getMeter(t,n,r){return LH}},sue=new WH});var XH,jM,cue=O(()=>{A();uue();O0();w0();XH="metrics",jM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Pf(XH,t,Ia.instance())}getMeterProvider(){return il(XH)||sue}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){kf(XH,Ia.instance())}}});var ez,lue=O(()=>{A();cue();ez=jM.getInstance()});var HM,due=O(()=>{A();HM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function nz(e){return e.getValue(tz)||void 0}function pue(){return nz(Uf.getInstance().active())}function fue(e,t){return e.setValue(tz,t)}function Aue(e){return e.deleteValue(tz)}var tz,mue=O(()=>{A();Xx();Zx();tz=al("OpenTelemetry Baggage Key")});var rz,i$e,zM,gue=O(()=>{A();O0();due();FH();mue();vH();w0();rz="propagation",i$e=new HM,zM=class e{constructor(){this.createBaggage=Pse,this.getBaggage=nz,this.getActiveBaggage=pue,this.setBaggage=fue,this.deleteBaggage=Aue}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Pf(rz,t,Ia.instance())}inject(t,n,r=BM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=xM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){kf(rz,Ia.instance())}_getGlobalPropagator(){return il(rz)||i$e}}});var vp,hue=O(()=>{A();gue();vp=zM.getInstance()});var oz,$M,_ue=O(()=>{A();O0();JH();LM();zH();w0();oz="trace",$M=class e{constructor(){this._proxyTracerProvider=new P0,this.wrapSpanContext=$se,this.isSpanContextValid=Tm,this.deleteSpan=jse,this.getSpan=PM,this.getActiveSpan=Gse,this.getSpanContext=kM,this.setSpan=t1,this.setSpanContext=Hse}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Pf(oz,this._proxyTracerProvider,Ia.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return il(oz)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){kf(oz,Ia.instance()),this._proxyTracerProvider=new P0}}});var Ft,Eue=O(()=>{A();_ue();Ft=$M.getInstance()});var Je={};es(Je,{DiagConsoleLogger:()=>RM,DiagLogLevel:()=>oa,INVALID_SPANID:()=>e1,INVALID_SPAN_CONTEXT:()=>OM,INVALID_TRACEID:()=>M0,ProxyTracer:()=>VI,ProxyTracerProvider:()=>P0,ROOT_CONTEXT:()=>HI,SamplingDecision:()=>FM,SpanKind:()=>Wr,SpanStatusCode:()=>Xo,TraceFlags:()=>Ds,ValueType:()=>DM,baggageEntryMetadataFromString:()=>kse,context:()=>qe,createContextKey:()=>al,createNoopMeter:()=>Lse,createTraceState:()=>rue,default:()=>a$e,defaultTextMapGetter:()=>xM,defaultTextMapSetter:()=>BM,diag:()=>sl,isSpanContextValid:()=>Tm,isValidSpanId:()=>VH,isValidTraceId:()=>$H,metrics:()=>ez,propagation:()=>vp,trace:()=>Ft});var a$e,Le=O(()=>{A();vH();Zx();Use();bM();QH();Qse();FH();KH();JH();qse();Yse();Kse();jH();oue();LM();wM();iue();aue();lue();hue();Eue();a$e={context:qe,diag:sl,metrics:ez,propagation:vp,trace:Ft}});var n1=Q(_h=>{"use strict";A();Object.defineProperty(_h,"__esModule",{value:!0});_h.isTracingSuppressed=_h.unsuppressTracing=_h.suppressTracing=void 0;var s$e=(Le(),we(Je)),iz=(0,s$e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function u$e(e){return e.setValue(iz,!0)}_h.suppressTracing=u$e;function c$e(e){return e.deleteValue(iz)}_h.unsuppressTracing=c$e;function l$e(e){return e.getValue(iz)===!0}_h.isTracingSuppressed=l$e});var az=Q(xs=>{"use strict";A();Object.defineProperty(xs,"__esModule",{value:!0});xs.BAGGAGE_MAX_TOTAL_LENGTH=xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=xs.BAGGAGE_HEADER=xs.BAGGAGE_ITEMS_SEPARATOR=xs.BAGGAGE_PROPERTIES_SEPARATOR=xs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;xs.BAGGAGE_KEY_PAIR_SEPARATOR="=";xs.BAGGAGE_PROPERTIES_SEPARATOR=";";xs.BAGGAGE_ITEMS_SEPARATOR=",";xs.BAGGAGE_HEADER="baggage";xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;xs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var sz=Q(Qf=>{"use strict";A();Object.defineProperty(Qf,"__esModule",{value:!0});Qf.parseKeyPairsIntoRecord=Qf.parsePairKeyValue=Qf.getKeyPairs=Qf.serializeKeyPairs=void 0;var d$e=(Le(),we(Je)),qI=az();function p$e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?qI.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>qI.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Qf.serializeKeyPairs=p$e;function f$e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=qI.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Qf.getKeyPairs=f$e;function Sue(e){if(!e)return;let t=e.indexOf(qI.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(qI.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let m=e.substring(t+1);d=(0,d$e.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}Qf.parsePairKeyValue=Sue;function A$e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(qI.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Sue(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Qf.parseKeyPairsIntoRecord=A$e});var yue=Q(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.W3CBaggagePropagator=void 0;var uz=(Le(),we(Je)),m$e=n1(),k0=az(),cz=sz(),lz=class{inject(t,n,r){let o=uz.propagation.getBaggage(t);if(!o||(0,m$e.isTracingSuppressed)(t))return;let i=(0,cz.getKeyPairs)(o).filter(c=>c.length<=k0.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,k0.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,cz.serializeKeyPairs)(i);a.length>0&&r.set(n,k0.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,k0.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(k0.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(k0.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let m=(0,cz.parsePairKeyValue)(d);if(m){let h={value:m.value};m.metadata&&(h.metadata=m.metadata),a[m.key]=h}}),Object.entries(a).length===0)?t:uz.propagation.setBaggage(t,uz.propagation.createBaggage(a))}fields(){return[k0.BAGGAGE_HEADER]}};VM.W3CBaggagePropagator=lz});var Tue=Q(qM=>{"use strict";A();Object.defineProperty(qM,"__esModule",{value:!0});qM.AnchoredClock=void 0;var dz=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(t,n){this._monotonicClock=n,this._epochMillis=t.now(),this._performanceMillis=n.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};qM.AnchoredClock=dz});var Rue=Q(Eh=>{"use strict";A();Object.defineProperty(Eh,"__esModule",{value:!0});Eh.isAttributeValue=Eh.isAttributeKey=Eh.sanitizeAttributes=void 0;var Iue=(Le(),we(Je));function g$e(e){let t={};if(typeof e!="object"||e==null)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!Cue(n)){Iue.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!bue(r)){Iue.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}Eh.sanitizeAttributes=g$e;function Cue(e){return typeof e=="string"&&e!==""}Eh.isAttributeKey=Cue;function bue(e){return e==null?!0:Array.isArray(e)?h$e(e):vue(typeof e)}Eh.isAttributeValue=bue;function h$e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(vue(r)){t=r;continue}return!1}return!1}}return!0}function vue(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var pz=Q(YM=>{"use strict";A();Object.defineProperty(YM,"__esModule",{value:!0});YM.loggingErrorHandler=void 0;var _$e=(Le(),we(Je));function E$e(){return e=>{_$e.diag.error(S$e(e))}}YM.loggingErrorHandler=E$e;function S$e(e){return typeof e=="string"?e:JSON.stringify(y$e(e))}function y$e(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r=>{if(t[r])return;let o=n[r];o&&(t[r]=String(o))}),n=Object.getPrototypeOf(n);return t}});var xue=Q(YI=>{"use strict";A();Object.defineProperty(YI,"__esModule",{value:!0});YI.globalErrorHandler=YI.setGlobalErrorHandler=void 0;var T$e=pz(),Due=(0,T$e.loggingErrorHandler)();function I$e(e){Due=e}YI.setGlobalErrorHandler=I$e;function C$e(e){try{Due(e)}catch{}}YI.globalErrorHandler=C$e});var wue=Q(Ff=>{"use strict";A();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.getStringListFromEnv=Ff.getBooleanFromEnv=Ff.getStringFromEnv=Ff.getNumberFromEnv=void 0;var Bue=(Le(),we(Je)),Nue=Ue("util");function b$e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Bue.diag.warn(`Unknown value ${(0,Nue.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Ff.getNumberFromEnv=b$e;function Oue(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Ff.getStringFromEnv=Oue;function v$e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Bue.diag.warn(`Unknown value ${(0,Nue.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Ff.getBooleanFromEnv=v$e;function R$e(e){return Oue(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Ff.getStringListFromEnv=R$e});var Mue=Q(KM=>{"use strict";A();Object.defineProperty(KM,"__esModule",{value:!0});KM._globalThis=void 0;KM._globalThis=globalThis});var Pue=Q(JM=>{"use strict";A();Object.defineProperty(JM,"__esModule",{value:!0});JM.VERSION=void 0;JM.VERSION="2.6.1"});function gi(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var fz=O(()=>{A()});var kue,Uue,Lue,Que,Fue,Gue,jue,Hue,zue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,Hce,zce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,Hle,zle,$le,Vle,qle,Yle,Kle,Jle,Zle,Wle,Xle,ede,tde,D$e,Az,x$e,B$e,N$e,O$e,mz,w$e,M$e,P$e,k$e,U$e,L$e,Q$e,F$e,G$e,j$e,H$e,z$e,$$e,V$e,q$e,Y$e,K$e,J$e,gz,Z$e,W$e,X$e,e9e,t9e,n9e,r9e,o9e,i9e,a9e,s9e,u9e,hz,c9e,l9e,_z,Ez,d9e,p9e,f9e,A9e,m9e,g9e,h9e,_9e,E9e,S9e,y9e,T9e,I9e,C9e,b9e,v9e,R9e,r1,KI,Sz,D9e,x9e,U0,B9e,N9e,O9e,w9e,yz,Tz,M9e,Iz,P9e,k9e,U9e,L9e,Q9e,F9e,G9e,j9e,H9e,z9e,$9e,V9e,q9e,Y9e,K9e,J9e,Z9e,W9e,X9e,eVe,tVe,nVe,rVe,Cz,oVe,iVe,aVe,sVe,uVe,cVe,lVe,dVe,pVe,fVe,AVe,mVe,gVe,hVe,_Ve,EVe,SVe,yVe,TVe,bz,IVe,vz,CVe,bVe,vVe,RVe,DVe,xVe,BVe,NVe,OVe,nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde,wVe,MVe,PVe,kVe,UVe,LVe,QVe,FVe,GVe,jVe,HVe,zVe,$Ve,VVe,qVe,YVe,KVe,JVe,ZVe,WVe,XVe,eqe,tqe,nqe,rqe,oqe,iqe,aqe,sqe,uqe,cqe,lqe,dqe,pqe,fqe,Aqe,mqe,gqe,hqe,_qe,Eqe,Sqe,yqe,Tqe,Iqe,Cqe,bqe,vqe,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,Rqe,Dqe,xqe,Bqe,Nqe,Oqe,wqe,Mqe,Pqe,kqe,Uqe,Lqe,ape,spe,upe,cpe,lpe,Qqe,Fqe,Gqe,jqe,Hqe,zqe,dpe,ppe,fpe,$qe,Vqe,qqe,Yqe,Ape,mpe,gpe,hpe,Kqe,Jqe,Zqe,Wqe,Xqe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,e7e,t7e,n7e,r7e,o7e,i7e,a7e,s7e,bpe,vpe,Rpe,Dpe,xpe,u7e,c7e,l7e,d7e,p7e,f7e,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,A7e,m7e,g7e,h7e,_7e,E7e,S7e,y7e,T7e,I7e,C7e,b7e,v7e,R7e,D7e,x7e,B7e,N7e,O7e,w7e,M7e,P7e,Zpe,Wpe,Xpe,efe,tfe,k7e,U7e,L7e,Q7e,F7e,G7e,nfe,rfe,j7e,H7e,z7e,ofe,ife,$7e,V7e,q7e,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Y7e,K7e,J7e,Z7e,W7e,X7e,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,Ife,Cfe,pYe,fYe,AYe,bfe=O(()=>{A();fz();kue="aws.lambda.invoked_arn",Uue="db.system",Lue="db.connection_string",Que="db.user",Fue="db.jdbc.driver_classname",Gue="db.name",jue="db.statement",Hue="db.operation",zue="db.mssql.instance_name",$ue="db.cassandra.keyspace",Vue="db.cassandra.page_size",que="db.cassandra.consistency_level",Yue="db.cassandra.table",Kue="db.cassandra.idempotence",Jue="db.cassandra.speculative_execution_count",Zue="db.cassandra.coordinator.id",Wue="db.cassandra.coordinator.dc",Xue="db.hbase.namespace",ece="db.redis.database_index",tce="db.mongodb.collection",nce="db.sql.table",rce="exception.type",oce="exception.message",ice="exception.stacktrace",ace="exception.escaped",sce="faas.trigger",uce="faas.execution",cce="faas.document.collection",lce="faas.document.operation",dce="faas.document.time",pce="faas.document.name",fce="faas.time",Ace="faas.cron",mce="faas.coldstart",gce="faas.invoked_name",hce="faas.invoked_provider",_ce="faas.invoked_region",Ece="net.transport",Sce="net.peer.ip",yce="net.peer.port",Tce="net.peer.name",Ice="net.host.ip",Cce="net.host.port",bce="net.host.name",vce="net.host.connection.type",Rce="net.host.connection.subtype",Dce="net.host.carrier.name",xce="net.host.carrier.mcc",Bce="net.host.carrier.mnc",Nce="net.host.carrier.icc",Oce="peer.service",wce="enduser.id",Mce="enduser.role",Pce="enduser.scope",kce="thread.id",Uce="thread.name",Lce="code.function",Qce="code.namespace",Fce="code.filepath",Gce="code.lineno",jce="http.method",Hce="http.url",zce="http.target",$ce="http.host",Vce="http.scheme",qce="http.status_code",Yce="http.flavor",Kce="http.user_agent",Jce="http.request_content_length",Zce="http.request_content_length_uncompressed",Wce="http.response_content_length",Xce="http.response_content_length_uncompressed",ele="http.server_name",tle="http.route",nle="http.client_ip",rle="aws.dynamodb.table_names",ole="aws.dynamodb.consumed_capacity",ile="aws.dynamodb.item_collection_metrics",ale="aws.dynamodb.provisioned_read_capacity",sle="aws.dynamodb.provisioned_write_capacity",ule="aws.dynamodb.consistent_read",cle="aws.dynamodb.projection",lle="aws.dynamodb.limit",dle="aws.dynamodb.attributes_to_get",ple="aws.dynamodb.index_name",fle="aws.dynamodb.select",Ale="aws.dynamodb.global_secondary_indexes",mle="aws.dynamodb.local_secondary_indexes",gle="aws.dynamodb.exclusive_start_table",hle="aws.dynamodb.table_count",_le="aws.dynamodb.scan_forward",Ele="aws.dynamodb.segment",Sle="aws.dynamodb.total_segments",yle="aws.dynamodb.count",Tle="aws.dynamodb.scanned_count",Ile="aws.dynamodb.attribute_definitions",Cle="aws.dynamodb.global_secondary_index_updates",ble="messaging.system",vle="messaging.destination",Rle="messaging.destination_kind",Dle="messaging.temp_destination",xle="messaging.protocol",Ble="messaging.protocol_version",Nle="messaging.url",Ole="messaging.message_id",wle="messaging.conversation_id",Mle="messaging.message_payload_size_bytes",Ple="messaging.message_payload_compressed_size_bytes",kle="messaging.operation",Ule="messaging.consumer_id",Lle="messaging.rabbitmq.routing_key",Qle="messaging.kafka.message_key",Fle="messaging.kafka.consumer_group",Gle="messaging.kafka.client_id",jle="messaging.kafka.partition",Hle="messaging.kafka.tombstone",zle="rpc.system",$le="rpc.service",Vle="rpc.method",qle="rpc.grpc.status_code",Yle="rpc.jsonrpc.version",Kle="rpc.jsonrpc.request_id",Jle="rpc.jsonrpc.error_code",Zle="rpc.jsonrpc.error_message",Wle="message.type",Xle="message.id",ede="message.compressed_size",tde="message.uncompressed_size",D$e=kue,Az=Uue,x$e=Lue,B$e=Que,N$e=Fue,O$e=Gue,mz=jue,w$e=Hue,M$e=zue,P$e=$ue,k$e=Vue,U$e=que,L$e=Yue,Q$e=Kue,F$e=Jue,G$e=Zue,j$e=Wue,H$e=Xue,z$e=ece,$$e=tce,V$e=nce,q$e=rce,Y$e=oce,K$e=ice,J$e=ace,gz=sce,Z$e=uce,W$e=cce,X$e=lce,e9e=dce,t9e=pce,n9e=fce,r9e=Ace,o9e=mce,i9e=gce,a9e=hce,s9e=_ce,u9e=Ece,hz=Sce,c9e=yce,l9e=Tce,_z=Ice,Ez=Cce,d9e=bce,p9e=vce,f9e=Rce,A9e=Dce,m9e=xce,g9e=Bce,h9e=Nce,_9e=Oce,E9e=wce,S9e=Mce,y9e=Pce,T9e=kce,I9e=Uce,C9e=Lce,b9e=Qce,v9e=Fce,R9e=Gce,r1=jce,KI=Hce,Sz=zce,D9e=$ce,x9e=Vce,U0=qce,B9e=Yce,N9e=Kce,O9e=Jce,w9e=Zce,yz=Wce,Tz=Xce,M9e=ele,Iz=tle,P9e=nle,k9e=rle,U9e=ole,L9e=ile,Q9e=ale,F9e=sle,G9e=ule,j9e=cle,H9e=lle,z9e=dle,$9e=ple,V9e=fle,q9e=Ale,Y9e=mle,K9e=gle,J9e=hle,Z9e=_le,W9e=Ele,X9e=Sle,eVe=yle,tVe=Tle,nVe=Ile,rVe=Cle,Cz=ble,oVe=vle,iVe=Rle,aVe=Dle,sVe=xle,uVe=Ble,cVe=Nle,lVe=Ole,dVe=wle,pVe=Mle,fVe=Ple,AVe=kle,mVe=Ule,gVe=Lle,hVe=Qle,_Ve=Fle,EVe=Gle,SVe=jle,yVe=Hle,TVe=zle,bz=$le,IVe=Vle,vz=qle,CVe=Yle,bVe=Kle,vVe=Jle,RVe=Zle,DVe=Wle,xVe=Xle,BVe=ede,NVe=tde,OVe=gi([kue,Uue,Lue,Que,Fue,Gue,jue,Hue,zue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,Hce,zce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,Hle,zle,$le,Vle,qle,Yle,Kle,Jle,Zle,Wle,Xle,ede,tde]),nde="other_sql",rde="mssql",ode="mysql",ide="oracle",ade="db2",sde="postgresql",ude="redshift",cde="hive",lde="cloudscape",dde="hsqldb",pde="progress",fde="maxdb",Ade="hanadb",mde="ingres",gde="firstsql",hde="edb",_de="cache",Ede="adabas",Sde="firebird",yde="derby",Tde="filemaker",Ide="informix",Cde="instantdb",bde="interbase",vde="mariadb",Rde="netezza",Dde="pervasive",xde="pointbase",Bde="sqlite",Nde="sybase",Ode="teradata",wde="vertica",Mde="h2",Pde="coldfusion",kde="cassandra",Ude="hbase",Lde="mongodb",Qde="redis",Fde="couchbase",Gde="couchdb",jde="cosmosdb",Hde="dynamodb",zde="neo4j",$de="geode",Vde="elasticsearch",qde="memcached",Yde="cockroachdb",wVe=nde,MVe=rde,PVe=ode,kVe=ide,UVe=ade,LVe=sde,QVe=ude,FVe=cde,GVe=lde,jVe=dde,HVe=pde,zVe=fde,$Ve=Ade,VVe=mde,qVe=gde,YVe=hde,KVe=_de,JVe=Ede,ZVe=Sde,WVe=yde,XVe=Tde,eqe=Ide,tqe=Cde,nqe=bde,rqe=vde,oqe=Rde,iqe=Dde,aqe=xde,sqe=Bde,uqe=Nde,cqe=Ode,lqe=wde,dqe=Mde,pqe=Pde,fqe=kde,Aqe=Ude,mqe=Lde,gqe=Qde,hqe=Fde,_qe=Gde,Eqe=jde,Sqe=Hde,yqe=zde,Tqe=$de,Iqe=Vde,Cqe=qde,bqe=Yde,vqe=gi([nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde]),Kde="all",Jde="each_quorum",Zde="quorum",Wde="local_quorum",Xde="one",epe="two",tpe="three",npe="local_one",rpe="any",ope="serial",ipe="local_serial",Rqe=Kde,Dqe=Jde,xqe=Zde,Bqe=Wde,Nqe=Xde,Oqe=epe,wqe=tpe,Mqe=npe,Pqe=rpe,kqe=ope,Uqe=ipe,Lqe=gi([Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe]),ape="datasource",spe="http",upe="pubsub",cpe="timer",lpe="other",Qqe=ape,Fqe=spe,Gqe=upe,jqe=cpe,Hqe=lpe,zqe=gi([ape,spe,upe,cpe,lpe]),dpe="insert",ppe="edit",fpe="delete",$qe=dpe,Vqe=ppe,qqe=fpe,Yqe=gi([dpe,ppe,fpe]),Ape="alibaba_cloud",mpe="aws",gpe="azure",hpe="gcp",Kqe=Ape,Jqe=mpe,Zqe=gpe,Wqe=hpe,Xqe=gi([Ape,mpe,gpe,hpe]),_pe="ip_tcp",Epe="ip_udp",Spe="ip",ype="unix",Tpe="pipe",Ipe="inproc",Cpe="other",e7e=_pe,t7e=Epe,n7e=Spe,r7e=ype,o7e=Tpe,i7e=Ipe,a7e=Cpe,s7e=gi([_pe,Epe,Spe,ype,Tpe,Ipe,Cpe]),bpe="wifi",vpe="wired",Rpe="cell",Dpe="unavailable",xpe="unknown",u7e=bpe,c7e=vpe,l7e=Rpe,d7e=Dpe,p7e=xpe,f7e=gi([bpe,vpe,Rpe,Dpe,xpe]),Bpe="gprs",Npe="edge",Ope="umts",wpe="cdma",Mpe="evdo_0",Ppe="evdo_a",kpe="cdma2000_1xrtt",Upe="hsdpa",Lpe="hsupa",Qpe="hspa",Fpe="iden",Gpe="evdo_b",jpe="lte",Hpe="ehrpd",zpe="hspap",$pe="gsm",Vpe="td_scdma",qpe="iwlan",Ype="nr",Kpe="nrnsa",Jpe="lte_ca",A7e=Bpe,m7e=Npe,g7e=Ope,h7e=wpe,_7e=Mpe,E7e=Ppe,S7e=kpe,y7e=Upe,T7e=Lpe,I7e=Qpe,C7e=Fpe,b7e=Gpe,v7e=jpe,R7e=Hpe,D7e=zpe,x7e=$pe,B7e=Vpe,N7e=qpe,O7e=Ype,w7e=Kpe,M7e=Jpe,P7e=gi([Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe]),Zpe="1.0",Wpe="1.1",Xpe="2.0",efe="SPDY",tfe="QUIC",k7e=Zpe,U7e=Wpe,L7e=Xpe,Q7e=efe,F7e=tfe,G7e={HTTP_1_0:Zpe,HTTP_1_1:Wpe,HTTP_2_0:Xpe,SPDY:efe,QUIC:tfe},nfe="queue",rfe="topic",j7e=nfe,H7e=rfe,z7e=gi([nfe,rfe]),ofe="receive",ife="process",$7e=ofe,V7e=ife,q7e=gi([ofe,ife]),afe=0,sfe=1,ufe=2,cfe=3,lfe=4,dfe=5,pfe=6,ffe=7,Afe=8,mfe=9,gfe=10,hfe=11,_fe=12,Efe=13,Sfe=14,yfe=15,Tfe=16,Y7e=afe,K7e=sfe,J7e=ufe,Z7e=cfe,W7e=lfe,X7e=dfe,eYe=pfe,tYe=ffe,nYe=Afe,rYe=mfe,oYe=gfe,iYe=hfe,aYe=_fe,sYe=Efe,uYe=Sfe,cYe=yfe,lYe=Tfe,dYe={OK:afe,CANCELLED:sfe,UNKNOWN:ufe,INVALID_ARGUMENT:cfe,DEADLINE_EXCEEDED:lfe,NOT_FOUND:dfe,ALREADY_EXISTS:pfe,PERMISSION_DENIED:ffe,RESOURCE_EXHAUSTED:Afe,FAILED_PRECONDITION:mfe,ABORTED:gfe,OUT_OF_RANGE:hfe,UNIMPLEMENTED:_fe,INTERNAL:Efe,UNAVAILABLE:Sfe,DATA_LOSS:yfe,UNAUTHENTICATED:Tfe},Ife="SENT",Cfe="RECEIVED",pYe=Ife,fYe=Cfe,AYe=gi([Ife,Cfe])});var vfe=O(()=>{A();bfe()});var Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,DYe,xYe,BYe,NYe,OYe,wYe,MYe,PYe,kYe,UYe,LYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,DKe,xKe,BKe,NKe,Rz,OKe,wKe,MKe,PKe,kKe,UKe,LKe,QKe,FKe,GKe,eme,tme,nme,rme,jKe,HKe,zKe,$Ke,VKe,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,yme,Tme,dJe,pJe,fJe,Ime,Cme,bme,vme,Rme,Dme,xme,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,Bme,Nme,Ome,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,TJe,IJe,CJe,bJe,vJe,RJe,DJe,xJe,BJe,NJe,OJe,wJe,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,MJe,PJe,kJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,Zme=O(()=>{A();fz();Rfe="cloud.provider",Dfe="cloud.account.id",xfe="cloud.region",Bfe="cloud.availability_zone",Nfe="cloud.platform",Ofe="aws.ecs.container.arn",wfe="aws.ecs.cluster.arn",Mfe="aws.ecs.launchtype",Pfe="aws.ecs.task.arn",kfe="aws.ecs.task.family",Ufe="aws.ecs.task.revision",Lfe="aws.eks.cluster.arn",Qfe="aws.log.group.names",Ffe="aws.log.group.arns",Gfe="aws.log.stream.names",jfe="aws.log.stream.arns",Hfe="container.name",zfe="container.id",$fe="container.runtime",Vfe="container.image.name",qfe="container.image.tag",Yfe="deployment.environment",Kfe="device.id",Jfe="device.model.identifier",Zfe="device.model.name",Wfe="faas.name",Xfe="faas.id",eAe="faas.version",tAe="faas.instance",nAe="faas.max_memory",rAe="host.id",oAe="host.name",iAe="host.type",aAe="host.arch",sAe="host.image.name",uAe="host.image.id",cAe="host.image.version",lAe="k8s.cluster.name",dAe="k8s.node.name",pAe="k8s.node.uid",fAe="k8s.namespace.name",AAe="k8s.pod.uid",mAe="k8s.pod.name",gAe="k8s.container.name",hAe="k8s.replicaset.uid",_Ae="k8s.replicaset.name",EAe="k8s.deployment.uid",SAe="k8s.deployment.name",yAe="k8s.statefulset.uid",TAe="k8s.statefulset.name",IAe="k8s.daemonset.uid",CAe="k8s.daemonset.name",bAe="k8s.job.uid",vAe="k8s.job.name",RAe="k8s.cronjob.uid",DAe="k8s.cronjob.name",xAe="os.type",BAe="os.description",NAe="os.name",OAe="os.version",wAe="process.pid",MAe="process.executable.name",PAe="process.executable.path",kAe="process.command",UAe="process.command_line",LAe="process.command_args",QAe="process.owner",FAe="process.runtime.name",GAe="process.runtime.version",jAe="process.runtime.description",HAe="service.name",zAe="service.namespace",$Ae="service.instance.id",VAe="service.version",qAe="telemetry.sdk.name",YAe="telemetry.sdk.language",KAe="telemetry.sdk.version",JAe="telemetry.auto.version",ZAe="webengine.name",WAe="webengine.version",XAe="webengine.description",mYe=Rfe,gYe=Dfe,hYe=xfe,_Ye=Bfe,EYe=Nfe,SYe=Ofe,yYe=wfe,TYe=Mfe,IYe=Pfe,CYe=kfe,bYe=Ufe,vYe=Lfe,RYe=Qfe,DYe=Ffe,xYe=Gfe,BYe=jfe,NYe=Hfe,OYe=zfe,wYe=$fe,MYe=Vfe,PYe=qfe,kYe=Yfe,UYe=Kfe,LYe=Jfe,QYe=Zfe,FYe=Wfe,GYe=Xfe,jYe=eAe,HYe=tAe,zYe=nAe,$Ye=rAe,VYe=oAe,qYe=iAe,YYe=aAe,KYe=sAe,JYe=uAe,ZYe=cAe,WYe=lAe,XYe=dAe,eKe=pAe,tKe=fAe,nKe=AAe,rKe=mAe,oKe=gAe,iKe=hAe,aKe=_Ae,sKe=EAe,uKe=SAe,cKe=yAe,lKe=TAe,dKe=IAe,pKe=CAe,fKe=bAe,AKe=vAe,mKe=RAe,gKe=DAe,hKe=xAe,_Ke=BAe,EKe=NAe,SKe=OAe,yKe=wAe,TKe=MAe,IKe=PAe,CKe=kAe,bKe=UAe,vKe=LAe,RKe=QAe,DKe=FAe,xKe=GAe,BKe=jAe,NKe=HAe,Rz=zAe,OKe=$Ae,wKe=VAe,MKe=qAe,PKe=YAe,kKe=KAe,UKe=JAe,LKe=ZAe,QKe=WAe,FKe=XAe,GKe=gi([Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe]),eme="alibaba_cloud",tme="aws",nme="azure",rme="gcp",jKe=eme,HKe=tme,zKe=nme,$Ke=rme,VKe=gi([eme,tme,nme,rme]),ome="alibaba_cloud_ecs",ime="alibaba_cloud_fc",ame="aws_ec2",sme="aws_ecs",ume="aws_eks",cme="aws_lambda",lme="aws_elastic_beanstalk",dme="azure_vm",pme="azure_container_instances",fme="azure_aks",Ame="azure_functions",mme="azure_app_service",gme="gcp_compute_engine",hme="gcp_cloud_run",_me="gcp_kubernetes_engine",Eme="gcp_cloud_functions",Sme="gcp_app_engine",qKe=ome,YKe=ime,KKe=ame,JKe=sme,ZKe=ume,WKe=cme,XKe=lme,eJe=dme,tJe=pme,nJe=fme,rJe=Ame,oJe=mme,iJe=gme,aJe=hme,sJe=_me,uJe=Eme,cJe=Sme,lJe=gi([ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme]),yme="ec2",Tme="fargate",dJe=yme,pJe=Tme,fJe=gi([yme,Tme]),Ime="amd64",Cme="arm32",bme="arm64",vme="ia64",Rme="ppc32",Dme="ppc64",xme="x86",AJe=Ime,mJe=Cme,gJe=bme,hJe=vme,_Je=Rme,EJe=Dme,SJe=xme,yJe=gi([Ime,Cme,bme,vme,Rme,Dme,xme]),Bme="windows",Nme="linux",Ome="darwin",wme="freebsd",Mme="netbsd",Pme="openbsd",kme="dragonflybsd",Ume="hpux",Lme="aix",Qme="solaris",Fme="z_os",TJe=Bme,IJe=Nme,CJe=Ome,bJe=wme,vJe=Mme,RJe=Pme,DJe=kme,xJe=Ume,BJe=Lme,NJe=Qme,OJe=Fme,wJe=gi([Bme,Nme,Ome,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme]),Gme="cpp",jme="dotnet",Hme="erlang",zme="go",$me="java",Vme="nodejs",qme="php",Yme="python",Kme="ruby",Jme="webjs",MJe=Gme,PJe=jme,kJe=Hme,UJe=zme,LJe=$me,QJe=Vme,FJe=qme,GJe=Yme,jJe=Kme,HJe=Jme,zJe=gi([Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme])});var Wme=O(()=>{A();Zme()});var $Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,Dz,xz,gZe,JI,hZe,Bz,Nz,_Ze,L0,EZe,SZe,yZe,TZe,IZe,CZe,bZe,vZe,RZe,DZe,Oz,xZe,BZe,NZe,OZe,wZe,MZe,Q0,PZe,kZe,UZe,LZe,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,Im,Cm,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,wz,Mz,lWe,Pz,kz,dWe,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,Uz,Lz,bWe,Qz,vWe,Fz,RWe,DWe,xWe,BWe,NWe,OWe,wWe,MWe,PWe,kWe,UWe,LWe,QWe,FWe,GWe,jWe,HWe,zWe,$We,VWe,qWe,YWe,KWe,JWe,Sh,ZWe,WWe,XWe,Gz,Xme=O(()=>{A();$Je="aspnetcore.diagnostics.exception.result",VJe="aborted",qJe="handled",YJe="skipped",KJe="unhandled",JJe="aspnetcore.diagnostics.handler.type",ZJe="aspnetcore.rate_limiting.policy",WJe="aspnetcore.rate_limiting.result",XJe="acquired",eZe="endpoint_limiter",tZe="global_limiter",nZe="request_canceled",rZe="aspnetcore.request.is_unhandled",oZe="aspnetcore.routing.is_fallback",iZe="aspnetcore.routing.match_status",aZe="failure",sZe="success",uZe="aspnetcore.user.is_authenticated",cZe="client.address",lZe="client.port",dZe="code.column.number",pZe="code.file.path",fZe="code.function.name",AZe="code.line.number",mZe="code.stacktrace",Dz="db.collection.name",xz="db.namespace",gZe="db.operation.batch.size",JI="db.operation.name",hZe="db.query.summary",Bz="db.query.text",Nz="db.response.status_code",_Ze="db.stored_procedure.name",L0="db.system.name",EZe="mariadb",SZe="microsoft.sql_server",yZe="mysql",TZe="postgresql",IZe="dotnet.gc.heap.generation",CZe="gen0",bZe="gen1",vZe="gen2",RZe="loh",DZe="poh",Oz="error.type",xZe="_OTHER",BZe="exception.escaped",NZe="exception.message",OZe="exception.stacktrace",wZe="exception.type",MZe=e=>`http.request.header.${e}`,Q0="http.request.method",PZe="_OTHER",kZe="CONNECT",UZe="DELETE",LZe="GET",QZe="HEAD",FZe="OPTIONS",GZe="PATCH",jZe="POST",HZe="PUT",zZe="TRACE",$Ze="http.request.method_original",VZe="http.request.resend_count",qZe=e=>`http.response.header.${e}`,Im="http.response.status_code",Cm="http.route",YZe="jvm.gc.action",KZe="jvm.gc.name",JZe="jvm.memory.pool.name",ZZe="jvm.memory.type",WZe="heap",XZe="non_heap",eWe="jvm.thread.daemon",tWe="jvm.thread.state",nWe="blocked",rWe="new",oWe="runnable",iWe="terminated",aWe="timed_waiting",sWe="waiting",uWe="network.local.address",cWe="network.local.port",wz="network.peer.address",Mz="network.peer.port",lWe="network.protocol.name",Pz="network.protocol.version",kz="network.transport",dWe="pipe",pWe="quic",fWe="tcp",AWe="udp",mWe="unix",gWe="network.type",hWe="ipv4",_We="ipv6",EWe="otel.scope.name",SWe="otel.scope.version",yWe="otel.status_code",TWe="ERROR",IWe="OK",CWe="otel.status_description",Uz="server.address",Lz="server.port",bWe="service.instance.id",Qz="service.name",vWe="service.namespace",Fz="service.version",RWe="signalr.connection.status",DWe="app_shutdown",xWe="normal_closure",BWe="timeout",NWe="signalr.transport",OWe="long_polling",wWe="server_sent_events",MWe="web_sockets",PWe="telemetry.sdk.language",kWe="cpp",UWe="dotnet",LWe="erlang",QWe="go",FWe="java",GWe="nodejs",jWe="php",HWe="python",zWe="ruby",$We="rust",VWe="swift",qWe="webjs",YWe="telemetry.sdk.name",KWe="telemetry.sdk.version",JWe="url.fragment",Sh="url.full",ZWe="url.path",WWe="url.query",XWe="url.scheme",Gz="user_agent.original"});var eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,DXe,xXe,BXe,NXe,OXe,wXe,MXe,PXe,kXe,UXe,LXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ege=O(()=>{A();eXe="aspnetcore.diagnostics.exceptions",tXe="aspnetcore.rate_limiting.active_request_leases",nXe="aspnetcore.rate_limiting.queued_requests",rXe="aspnetcore.rate_limiting.request.time_in_queue",oXe="aspnetcore.rate_limiting.request_lease.duration",iXe="aspnetcore.rate_limiting.requests",aXe="aspnetcore.routing.match_attempts",sXe="db.client.operation.duration",uXe="dotnet.assembly.count",cXe="dotnet.exceptions",lXe="dotnet.gc.collections",dXe="dotnet.gc.heap.total_allocated",pXe="dotnet.gc.last_collection.heap.fragmentation.size",fXe="dotnet.gc.last_collection.heap.size",AXe="dotnet.gc.last_collection.memory.committed_size",mXe="dotnet.gc.pause.time",gXe="dotnet.jit.compilation.time",hXe="dotnet.jit.compiled_il.size",_Xe="dotnet.jit.compiled_methods",EXe="dotnet.monitor.lock_contentions",SXe="dotnet.process.cpu.count",yXe="dotnet.process.cpu.time",TXe="dotnet.process.memory.working_set",IXe="dotnet.thread_pool.queue.length",CXe="dotnet.thread_pool.thread.count",bXe="dotnet.thread_pool.work_item.count",vXe="dotnet.timer.count",RXe="http.client.request.duration",DXe="http.server.request.duration",xXe="jvm.class.count",BXe="jvm.class.loaded",NXe="jvm.class.unloaded",OXe="jvm.cpu.count",wXe="jvm.cpu.recent_utilization",MXe="jvm.cpu.time",PXe="jvm.gc.duration",kXe="jvm.memory.committed",UXe="jvm.memory.limit",LXe="jvm.memory.used",QXe="jvm.memory.used_after_last_gc",FXe="jvm.thread.count",GXe="kestrel.active_connections",jXe="kestrel.active_tls_handshakes",HXe="kestrel.connection.duration",zXe="kestrel.queued_connections",$Xe="kestrel.queued_requests",VXe="kestrel.rejected_connections",qXe="kestrel.tls_handshake.duration",YXe="kestrel.upgraded_connections",KXe="signalr.server.active_connections",JXe="signalr.server.connection.duration"});var ZXe,tge=O(()=>{A();ZXe="exception"});var Nr={};es(Nr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>VJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>qJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>YJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>KJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>XJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>eZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>tZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>nZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>aZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>sZe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>$Je,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>JJe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>ZJe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>WJe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>rZe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>oZe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>iZe,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>uZe,ATTR_CLIENT_ADDRESS:()=>cZe,ATTR_CLIENT_PORT:()=>lZe,ATTR_CODE_COLUMN_NUMBER:()=>dZe,ATTR_CODE_FILE_PATH:()=>pZe,ATTR_CODE_FUNCTION_NAME:()=>fZe,ATTR_CODE_LINE_NUMBER:()=>AZe,ATTR_CODE_STACKTRACE:()=>mZe,ATTR_DB_COLLECTION_NAME:()=>Dz,ATTR_DB_NAMESPACE:()=>xz,ATTR_DB_OPERATION_BATCH_SIZE:()=>gZe,ATTR_DB_OPERATION_NAME:()=>JI,ATTR_DB_QUERY_SUMMARY:()=>hZe,ATTR_DB_QUERY_TEXT:()=>Bz,ATTR_DB_RESPONSE_STATUS_CODE:()=>Nz,ATTR_DB_STORED_PROCEDURE_NAME:()=>_Ze,ATTR_DB_SYSTEM_NAME:()=>L0,ATTR_DOTNET_GC_HEAP_GENERATION:()=>IZe,ATTR_ERROR_TYPE:()=>Oz,ATTR_EXCEPTION_ESCAPED:()=>BZe,ATTR_EXCEPTION_MESSAGE:()=>NZe,ATTR_EXCEPTION_STACKTRACE:()=>OZe,ATTR_EXCEPTION_TYPE:()=>wZe,ATTR_HTTP_REQUEST_HEADER:()=>MZe,ATTR_HTTP_REQUEST_METHOD:()=>Q0,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>$Ze,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>VZe,ATTR_HTTP_RESPONSE_HEADER:()=>qZe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Im,ATTR_HTTP_ROUTE:()=>Cm,ATTR_JVM_GC_ACTION:()=>YZe,ATTR_JVM_GC_NAME:()=>KZe,ATTR_JVM_MEMORY_POOL_NAME:()=>JZe,ATTR_JVM_MEMORY_TYPE:()=>ZZe,ATTR_JVM_THREAD_DAEMON:()=>eWe,ATTR_JVM_THREAD_STATE:()=>tWe,ATTR_NETWORK_LOCAL_ADDRESS:()=>uWe,ATTR_NETWORK_LOCAL_PORT:()=>cWe,ATTR_NETWORK_PEER_ADDRESS:()=>wz,ATTR_NETWORK_PEER_PORT:()=>Mz,ATTR_NETWORK_PROTOCOL_NAME:()=>lWe,ATTR_NETWORK_PROTOCOL_VERSION:()=>Pz,ATTR_NETWORK_TRANSPORT:()=>kz,ATTR_NETWORK_TYPE:()=>gWe,ATTR_OTEL_SCOPE_NAME:()=>EWe,ATTR_OTEL_SCOPE_VERSION:()=>SWe,ATTR_OTEL_STATUS_CODE:()=>yWe,ATTR_OTEL_STATUS_DESCRIPTION:()=>CWe,ATTR_SERVER_ADDRESS:()=>Uz,ATTR_SERVER_PORT:()=>Lz,ATTR_SERVICE_INSTANCE_ID:()=>bWe,ATTR_SERVICE_NAME:()=>Qz,ATTR_SERVICE_NAMESPACE:()=>vWe,ATTR_SERVICE_VERSION:()=>Fz,ATTR_SIGNALR_CONNECTION_STATUS:()=>RWe,ATTR_SIGNALR_TRANSPORT:()=>NWe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>PWe,ATTR_TELEMETRY_SDK_NAME:()=>YWe,ATTR_TELEMETRY_SDK_VERSION:()=>KWe,ATTR_URL_FRAGMENT:()=>JWe,ATTR_URL_FULL:()=>Sh,ATTR_URL_PATH:()=>ZWe,ATTR_URL_QUERY:()=>WWe,ATTR_URL_SCHEME:()=>XWe,ATTR_USER_AGENT_ORIGINAL:()=>Gz,AWSECSLAUNCHTYPEVALUES_EC2:()=>dJe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>pJe,AwsEcsLaunchtypeValues:()=>fJe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>qKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>YKe,CLOUDPLATFORMVALUES_AWS_EC2:()=>KKe,CLOUDPLATFORMVALUES_AWS_ECS:()=>JKe,CLOUDPLATFORMVALUES_AWS_EKS:()=>ZKe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>XKe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>WKe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>nJe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>oJe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>tJe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>rJe,CLOUDPLATFORMVALUES_AZURE_VM:()=>eJe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>cJe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>uJe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>aJe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>iJe,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>sJe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>jKe,CLOUDPROVIDERVALUES_AWS:()=>HKe,CLOUDPROVIDERVALUES_AZURE:()=>zKe,CLOUDPROVIDERVALUES_GCP:()=>$Ke,CloudPlatformValues:()=>lJe,CloudProviderValues:()=>VKe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Rqe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Pqe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Dqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Mqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Bqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Uqe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Nqe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>xqe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>kqe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>wqe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>Oqe,DBSYSTEMVALUES_ADABAS:()=>JVe,DBSYSTEMVALUES_CACHE:()=>KVe,DBSYSTEMVALUES_CASSANDRA:()=>fqe,DBSYSTEMVALUES_CLOUDSCAPE:()=>GVe,DBSYSTEMVALUES_COCKROACHDB:()=>bqe,DBSYSTEMVALUES_COLDFUSION:()=>pqe,DBSYSTEMVALUES_COSMOSDB:()=>Eqe,DBSYSTEMVALUES_COUCHBASE:()=>hqe,DBSYSTEMVALUES_COUCHDB:()=>_qe,DBSYSTEMVALUES_DB2:()=>UVe,DBSYSTEMVALUES_DERBY:()=>WVe,DBSYSTEMVALUES_DYNAMODB:()=>Sqe,DBSYSTEMVALUES_EDB:()=>YVe,DBSYSTEMVALUES_ELASTICSEARCH:()=>Iqe,DBSYSTEMVALUES_FILEMAKER:()=>XVe,DBSYSTEMVALUES_FIREBIRD:()=>ZVe,DBSYSTEMVALUES_FIRSTSQL:()=>qVe,DBSYSTEMVALUES_GEODE:()=>Tqe,DBSYSTEMVALUES_H2:()=>dqe,DBSYSTEMVALUES_HANADB:()=>$Ve,DBSYSTEMVALUES_HBASE:()=>Aqe,DBSYSTEMVALUES_HIVE:()=>FVe,DBSYSTEMVALUES_HSQLDB:()=>jVe,DBSYSTEMVALUES_INFORMIX:()=>eqe,DBSYSTEMVALUES_INGRES:()=>VVe,DBSYSTEMVALUES_INSTANTDB:()=>tqe,DBSYSTEMVALUES_INTERBASE:()=>nqe,DBSYSTEMVALUES_MARIADB:()=>rqe,DBSYSTEMVALUES_MAXDB:()=>zVe,DBSYSTEMVALUES_MEMCACHED:()=>Cqe,DBSYSTEMVALUES_MONGODB:()=>mqe,DBSYSTEMVALUES_MSSQL:()=>MVe,DBSYSTEMVALUES_MYSQL:()=>PVe,DBSYSTEMVALUES_NEO4J:()=>yqe,DBSYSTEMVALUES_NETEZZA:()=>oqe,DBSYSTEMVALUES_ORACLE:()=>kVe,DBSYSTEMVALUES_OTHER_SQL:()=>wVe,DBSYSTEMVALUES_PERVASIVE:()=>iqe,DBSYSTEMVALUES_POINTBASE:()=>aqe,DBSYSTEMVALUES_POSTGRESQL:()=>LVe,DBSYSTEMVALUES_PROGRESS:()=>HVe,DBSYSTEMVALUES_REDIS:()=>gqe,DBSYSTEMVALUES_REDSHIFT:()=>QVe,DBSYSTEMVALUES_SQLITE:()=>sqe,DBSYSTEMVALUES_SYBASE:()=>uqe,DBSYSTEMVALUES_TERADATA:()=>cqe,DBSYSTEMVALUES_VERTICA:()=>lqe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>EZe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>SZe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>yZe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>TZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>CZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>bZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>vZe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>RZe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>DZe,DbCassandraConsistencyLevelValues:()=>Lqe,DbSystemValues:()=>vqe,ERROR_TYPE_VALUE_OTHER:()=>xZe,EVENT_EXCEPTION:()=>ZXe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>qqe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Vqe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>$qe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Kqe,FAASINVOKEDPROVIDERVALUES_AWS:()=>Jqe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Zqe,FAASINVOKEDPROVIDERVALUES_GCP:()=>Wqe,FAASTRIGGERVALUES_DATASOURCE:()=>Qqe,FAASTRIGGERVALUES_HTTP:()=>Fqe,FAASTRIGGERVALUES_OTHER:()=>Hqe,FAASTRIGGERVALUES_PUBSUB:()=>Gqe,FAASTRIGGERVALUES_TIMER:()=>jqe,FaasDocumentOperationValues:()=>Yqe,FaasInvokedProviderValues:()=>Xqe,FaasTriggerValues:()=>zqe,HOSTARCHVALUES_AMD64:()=>AJe,HOSTARCHVALUES_ARM32:()=>mJe,HOSTARCHVALUES_ARM64:()=>gJe,HOSTARCHVALUES_IA64:()=>hJe,HOSTARCHVALUES_PPC32:()=>_Je,HOSTARCHVALUES_PPC64:()=>EJe,HOSTARCHVALUES_X86:()=>SJe,HTTPFLAVORVALUES_HTTP_1_0:()=>k7e,HTTPFLAVORVALUES_HTTP_1_1:()=>U7e,HTTPFLAVORVALUES_HTTP_2_0:()=>L7e,HTTPFLAVORVALUES_QUIC:()=>F7e,HTTPFLAVORVALUES_SPDY:()=>Q7e,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>kZe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>UZe,HTTP_REQUEST_METHOD_VALUE_GET:()=>LZe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>QZe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>FZe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>PZe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>GZe,HTTP_REQUEST_METHOD_VALUE_POST:()=>jZe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>HZe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>zZe,HostArchValues:()=>yJe,HttpFlavorValues:()=>G7e,JVM_MEMORY_TYPE_VALUE_HEAP:()=>WZe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>XZe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>nWe,JVM_THREAD_STATE_VALUE_NEW:()=>rWe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>oWe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>iWe,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>aWe,JVM_THREAD_STATE_VALUE_WAITING:()=>sWe,MESSAGETYPEVALUES_RECEIVED:()=>fYe,MESSAGETYPEVALUES_SENT:()=>pYe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>j7e,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>H7e,MESSAGINGOPERATIONVALUES_PROCESS:()=>V7e,MESSAGINGOPERATIONVALUES_RECEIVE:()=>$7e,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>eXe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>tXe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>nXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>iXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>oXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>rXe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>aXe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>sXe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>uXe,METRIC_DOTNET_EXCEPTIONS:()=>cXe,METRIC_DOTNET_GC_COLLECTIONS:()=>lXe,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>dXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>pXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>fXe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>AXe,METRIC_DOTNET_GC_PAUSE_TIME:()=>mXe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>gXe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>hXe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>_Xe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>EXe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>SXe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>yXe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>TXe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>IXe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>CXe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>bXe,METRIC_DOTNET_TIMER_COUNT:()=>vXe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>RXe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>DXe,METRIC_JVM_CLASS_COUNT:()=>xXe,METRIC_JVM_CLASS_LOADED:()=>BXe,METRIC_JVM_CLASS_UNLOADED:()=>NXe,METRIC_JVM_CPU_COUNT:()=>OXe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>wXe,METRIC_JVM_CPU_TIME:()=>MXe,METRIC_JVM_GC_DURATION:()=>PXe,METRIC_JVM_MEMORY_COMMITTED:()=>kXe,METRIC_JVM_MEMORY_LIMIT:()=>UXe,METRIC_JVM_MEMORY_USED:()=>LXe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>QXe,METRIC_JVM_THREAD_COUNT:()=>FXe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>GXe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>jXe,METRIC_KESTREL_CONNECTION_DURATION:()=>HXe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>zXe,METRIC_KESTREL_QUEUED_REQUESTS:()=>$Xe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>VXe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>qXe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>YXe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>KXe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>JXe,MessageTypeValues:()=>AYe,MessagingDestinationKindValues:()=>z7e,MessagingOperationValues:()=>q7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>h7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>S7e,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>m7e,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>R7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>_7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>E7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>b7e,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>A7e,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>x7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>y7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>I7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>D7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>T7e,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>C7e,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>N7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>v7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>M7e,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>O7e,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>w7e,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>B7e,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>g7e,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>l7e,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>d7e,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>p7e,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>u7e,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>c7e,NETTRANSPORTVALUES_INPROC:()=>i7e,NETTRANSPORTVALUES_IP:()=>n7e,NETTRANSPORTVALUES_IP_TCP:()=>e7e,NETTRANSPORTVALUES_IP_UDP:()=>t7e,NETTRANSPORTVALUES_OTHER:()=>a7e,NETTRANSPORTVALUES_PIPE:()=>o7e,NETTRANSPORTVALUES_UNIX:()=>r7e,NETWORK_TRANSPORT_VALUE_PIPE:()=>dWe,NETWORK_TRANSPORT_VALUE_QUIC:()=>pWe,NETWORK_TRANSPORT_VALUE_TCP:()=>fWe,NETWORK_TRANSPORT_VALUE_UDP:()=>AWe,NETWORK_TRANSPORT_VALUE_UNIX:()=>mWe,NETWORK_TYPE_VALUE_IPV4:()=>hWe,NETWORK_TYPE_VALUE_IPV6:()=>_We,NetHostConnectionSubtypeValues:()=>P7e,NetHostConnectionTypeValues:()=>f7e,NetTransportValues:()=>s7e,OSTYPEVALUES_AIX:()=>BJe,OSTYPEVALUES_DARWIN:()=>CJe,OSTYPEVALUES_DRAGONFLYBSD:()=>DJe,OSTYPEVALUES_FREEBSD:()=>bJe,OSTYPEVALUES_HPUX:()=>xJe,OSTYPEVALUES_LINUX:()=>IJe,OSTYPEVALUES_NETBSD:()=>vJe,OSTYPEVALUES_OPENBSD:()=>RJe,OSTYPEVALUES_SOLARIS:()=>NJe,OSTYPEVALUES_WINDOWS:()=>TJe,OSTYPEVALUES_Z_OS:()=>OJe,OTEL_STATUS_CODE_VALUE_ERROR:()=>TWe,OTEL_STATUS_CODE_VALUE_OK:()=>IWe,OsTypeValues:()=>wJe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>oYe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>eYe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>K7e,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>cYe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>W7e,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>rYe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>sYe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Z7e,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>X7e,RPCGRPCSTATUSCODEVALUES_OK:()=>Y7e,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>iYe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>tYe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>nYe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>lYe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>uYe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>aYe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>J7e,RpcGrpcStatusCodeValues:()=>dYe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>z9e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>nVe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>G9e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>U9e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>eVe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>K9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>q9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>rVe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>$9e,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>L9e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>H9e,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Y9e,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>j9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Q9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>F9e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>tVe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Z9e,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>W9e,SEMATTRS_AWS_DYNAMODB_SELECT:()=>V9e,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>J9e,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>k9e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>X9e,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>D$e,SEMATTRS_CODE_FILEPATH:()=>v9e,SEMATTRS_CODE_FUNCTION:()=>C9e,SEMATTRS_CODE_LINENO:()=>R9e,SEMATTRS_CODE_NAMESPACE:()=>b9e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>U$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>j$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>G$e,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Q$e,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>P$e,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>k$e,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>F$e,SEMATTRS_DB_CASSANDRA_TABLE:()=>L$e,SEMATTRS_DB_CONNECTION_STRING:()=>x$e,SEMATTRS_DB_HBASE_NAMESPACE:()=>H$e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>N$e,SEMATTRS_DB_MONGODB_COLLECTION:()=>$$e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>M$e,SEMATTRS_DB_NAME:()=>O$e,SEMATTRS_DB_OPERATION:()=>w$e,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>z$e,SEMATTRS_DB_SQL_TABLE:()=>V$e,SEMATTRS_DB_STATEMENT:()=>mz,SEMATTRS_DB_SYSTEM:()=>Az,SEMATTRS_DB_USER:()=>B$e,SEMATTRS_ENDUSER_ID:()=>E9e,SEMATTRS_ENDUSER_ROLE:()=>S9e,SEMATTRS_ENDUSER_SCOPE:()=>y9e,SEMATTRS_EXCEPTION_ESCAPED:()=>J$e,SEMATTRS_EXCEPTION_MESSAGE:()=>Y$e,SEMATTRS_EXCEPTION_STACKTRACE:()=>K$e,SEMATTRS_EXCEPTION_TYPE:()=>q$e,SEMATTRS_FAAS_COLDSTART:()=>o9e,SEMATTRS_FAAS_CRON:()=>r9e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>W$e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>t9e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>X$e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>e9e,SEMATTRS_FAAS_EXECUTION:()=>Z$e,SEMATTRS_FAAS_INVOKED_NAME:()=>i9e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>a9e,SEMATTRS_FAAS_INVOKED_REGION:()=>s9e,SEMATTRS_FAAS_TIME:()=>n9e,SEMATTRS_FAAS_TRIGGER:()=>gz,SEMATTRS_HTTP_CLIENT_IP:()=>P9e,SEMATTRS_HTTP_FLAVOR:()=>B9e,SEMATTRS_HTTP_HOST:()=>D9e,SEMATTRS_HTTP_METHOD:()=>r1,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>O9e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>w9e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>yz,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Tz,SEMATTRS_HTTP_ROUTE:()=>Iz,SEMATTRS_HTTP_SCHEME:()=>x9e,SEMATTRS_HTTP_SERVER_NAME:()=>M9e,SEMATTRS_HTTP_STATUS_CODE:()=>U0,SEMATTRS_HTTP_TARGET:()=>Sz,SEMATTRS_HTTP_URL:()=>KI,SEMATTRS_HTTP_USER_AGENT:()=>N9e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>BVe,SEMATTRS_MESSAGE_ID:()=>xVe,SEMATTRS_MESSAGE_TYPE:()=>DVe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>NVe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>mVe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>dVe,SEMATTRS_MESSAGING_DESTINATION:()=>oVe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>iVe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>EVe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>_Ve,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>hVe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>SVe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>yVe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>lVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>fVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>pVe,SEMATTRS_MESSAGING_OPERATION:()=>AVe,SEMATTRS_MESSAGING_PROTOCOL:()=>sVe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>uVe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>gVe,SEMATTRS_MESSAGING_SYSTEM:()=>Cz,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>aVe,SEMATTRS_MESSAGING_URL:()=>cVe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>h9e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>m9e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>g9e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>A9e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>f9e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>p9e,SEMATTRS_NET_HOST_IP:()=>_z,SEMATTRS_NET_HOST_NAME:()=>d9e,SEMATTRS_NET_HOST_PORT:()=>Ez,SEMATTRS_NET_PEER_IP:()=>hz,SEMATTRS_NET_PEER_NAME:()=>l9e,SEMATTRS_NET_PEER_PORT:()=>c9e,SEMATTRS_NET_TRANSPORT:()=>u9e,SEMATTRS_PEER_SERVICE:()=>_9e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>vz,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>vVe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>RVe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>bVe,SEMATTRS_RPC_JSONRPC_VERSION:()=>CVe,SEMATTRS_RPC_METHOD:()=>IVe,SEMATTRS_RPC_SERVICE:()=>bz,SEMATTRS_RPC_SYSTEM:()=>TVe,SEMATTRS_THREAD_ID:()=>T9e,SEMATTRS_THREAD_NAME:()=>I9e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>yYe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>SYe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>TYe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>IYe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>CYe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>bYe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>vYe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>DYe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>RYe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>BYe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>xYe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>gYe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>_Ye,SEMRESATTRS_CLOUD_PLATFORM:()=>EYe,SEMRESATTRS_CLOUD_PROVIDER:()=>mYe,SEMRESATTRS_CLOUD_REGION:()=>hYe,SEMRESATTRS_CONTAINER_ID:()=>OYe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>MYe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>PYe,SEMRESATTRS_CONTAINER_NAME:()=>NYe,SEMRESATTRS_CONTAINER_RUNTIME:()=>wYe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>kYe,SEMRESATTRS_DEVICE_ID:()=>UYe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>LYe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>QYe,SEMRESATTRS_FAAS_ID:()=>GYe,SEMRESATTRS_FAAS_INSTANCE:()=>HYe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>zYe,SEMRESATTRS_FAAS_NAME:()=>FYe,SEMRESATTRS_FAAS_VERSION:()=>jYe,SEMRESATTRS_HOST_ARCH:()=>YYe,SEMRESATTRS_HOST_ID:()=>$Ye,SEMRESATTRS_HOST_IMAGE_ID:()=>JYe,SEMRESATTRS_HOST_IMAGE_NAME:()=>KYe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>ZYe,SEMRESATTRS_HOST_NAME:()=>VYe,SEMRESATTRS_HOST_TYPE:()=>qYe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>WYe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>oKe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>gKe,SEMRESATTRS_K8S_CRONJOB_UID:()=>mKe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>pKe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>dKe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>uKe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>sKe,SEMRESATTRS_K8S_JOB_NAME:()=>AKe,SEMRESATTRS_K8S_JOB_UID:()=>fKe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>tKe,SEMRESATTRS_K8S_NODE_NAME:()=>XYe,SEMRESATTRS_K8S_NODE_UID:()=>eKe,SEMRESATTRS_K8S_POD_NAME:()=>rKe,SEMRESATTRS_K8S_POD_UID:()=>nKe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>aKe,SEMRESATTRS_K8S_REPLICASET_UID:()=>iKe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>lKe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>cKe,SEMRESATTRS_OS_DESCRIPTION:()=>_Ke,SEMRESATTRS_OS_NAME:()=>EKe,SEMRESATTRS_OS_TYPE:()=>hKe,SEMRESATTRS_OS_VERSION:()=>SKe,SEMRESATTRS_PROCESS_COMMAND:()=>CKe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>vKe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>bKe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>TKe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>IKe,SEMRESATTRS_PROCESS_OWNER:()=>RKe,SEMRESATTRS_PROCESS_PID:()=>yKe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>BKe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>DKe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>xKe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>OKe,SEMRESATTRS_SERVICE_NAME:()=>NKe,SEMRESATTRS_SERVICE_NAMESPACE:()=>Rz,SEMRESATTRS_SERVICE_VERSION:()=>wKe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>UKe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>PKe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>MKe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>kKe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>FKe,SEMRESATTRS_WEBENGINE_NAME:()=>LKe,SEMRESATTRS_WEBENGINE_VERSION:()=>QKe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>DWe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>xWe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>BWe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>OWe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>wWe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>MWe,SemanticAttributes:()=>OVe,SemanticResourceAttributes:()=>GKe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>MJe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>PJe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>kJe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>UJe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>LJe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>QJe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>FJe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>GJe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>jJe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>HJe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>kWe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>UWe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>LWe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>QWe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>FWe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>GWe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>jWe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>HWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>zWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>$We,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>VWe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>qWe,TelemetrySdkLanguageValues:()=>zJe});var $n=O(()=>{A();vfe();Wme();Xme();ege();tge()});var nge=Q(ZM=>{"use strict";A();Object.defineProperty(ZM,"__esModule",{value:!0});ZM.ATTR_PROCESS_RUNTIME_NAME=void 0;ZM.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var rge=Q(XM=>{"use strict";A();Object.defineProperty(XM,"__esModule",{value:!0});XM.SDK_INFO=void 0;var WXe=Pue(),WM=($n(),we(Nr)),XXe=nge();XM.SDK_INFO={[WM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[XXe.ATTR_PROCESS_RUNTIME_NAME]:"node",[WM.ATTR_TELEMETRY_SDK_LANGUAGE]:WM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[WM.ATTR_TELEMETRY_SDK_VERSION]:WXe.VERSION}});var oge=Q(Bs=>{"use strict";A();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.otperformance=Bs.SDK_INFO=Bs._globalThis=Bs.getStringListFromEnv=Bs.getNumberFromEnv=Bs.getBooleanFromEnv=Bs.getStringFromEnv=void 0;var eP=wue();Object.defineProperty(Bs,"getStringFromEnv",{enumerable:!0,get:function(){return eP.getStringFromEnv}});Object.defineProperty(Bs,"getBooleanFromEnv",{enumerable:!0,get:function(){return eP.getBooleanFromEnv}});Object.defineProperty(Bs,"getNumberFromEnv",{enumerable:!0,get:function(){return eP.getNumberFromEnv}});Object.defineProperty(Bs,"getStringListFromEnv",{enumerable:!0,get:function(){return eP.getStringListFromEnv}});var eet=Mue();Object.defineProperty(Bs,"_globalThis",{enumerable:!0,get:function(){return eet._globalThis}});var tet=rge();Object.defineProperty(Bs,"SDK_INFO",{enumerable:!0,get:function(){return tet.SDK_INFO}});Bs.otperformance=performance});var jz=Q(Ns=>{"use strict";A();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.getStringListFromEnv=Ns.getNumberFromEnv=Ns.getStringFromEnv=Ns.getBooleanFromEnv=Ns.otperformance=Ns._globalThis=Ns.SDK_INFO=void 0;var F0=oge();Object.defineProperty(Ns,"SDK_INFO",{enumerable:!0,get:function(){return F0.SDK_INFO}});Object.defineProperty(Ns,"_globalThis",{enumerable:!0,get:function(){return F0._globalThis}});Object.defineProperty(Ns,"otperformance",{enumerable:!0,get:function(){return F0.otperformance}});Object.defineProperty(Ns,"getBooleanFromEnv",{enumerable:!0,get:function(){return F0.getBooleanFromEnv}});Object.defineProperty(Ns,"getStringFromEnv",{enumerable:!0,get:function(){return F0.getStringFromEnv}});Object.defineProperty(Ns,"getNumberFromEnv",{enumerable:!0,get:function(){return F0.getNumberFromEnv}});Object.defineProperty(Ns,"getStringListFromEnv",{enumerable:!0,get:function(){return F0.getStringListFromEnv}})});var uge=Q(Xr=>{"use strict";A();Object.defineProperty(Xr,"__esModule",{value:!0});Xr.addHrTimes=Xr.isTimeInput=Xr.isTimeInputHrTime=Xr.hrTimeToMicroseconds=Xr.hrTimeToMilliseconds=Xr.hrTimeToNanoseconds=Xr.hrTimeToTimeStamp=Xr.hrTimeDuration=Xr.timeInputToHrTime=Xr.hrTime=Xr.getTimeOrigin=Xr.millisToHrTime=void 0;var tP=jz(),ige=9,net=6,ret=Math.pow(10,net),nP=Math.pow(10,ige);function o1(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*ret);return[n,r]}Xr.millisToHrTime=o1;function oet(){return tP.otperformance.timeOrigin}Xr.getTimeOrigin=oet;function age(e){let t=o1(tP.otperformance.timeOrigin),n=o1(typeof e=="number"?e:tP.otperformance.now());return sge(t,n)}Xr.hrTime=age;function iet(e){if(Hz(e))return e;if(typeof e=="number")return e<tP.otperformance.timeOrigin?age(e):o1(e);if(e instanceof Date)return o1(e.getTime());throw TypeError("Invalid input type")}Xr.timeInputToHrTime=iet;function aet(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=nP),[n,r]}Xr.hrTimeDuration=aet;function set(e){let t=ige,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Xr.hrTimeToTimeStamp=set;function uet(e){return e[0]*nP+e[1]}Xr.hrTimeToNanoseconds=uet;function cet(e){return e[0]*1e3+e[1]/1e6}Xr.hrTimeToMilliseconds=cet;function det(e){return e[0]*1e6+e[1]/1e3}Xr.hrTimeToMicroseconds=det;function Hz(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Xr.isTimeInputHrTime=Hz;function pet(e){return Hz(e)||typeof e=="number"||e instanceof Date}Xr.isTimeInput=pet;function sge(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=nP&&(n[1]-=nP,n[0]+=1),n}Xr.addHrTimes=sge});var cge=Q(rP=>{"use strict";A();Object.defineProperty(rP,"__esModule",{value:!0});rP.unrefTimer=void 0;function fet(e){typeof e!="number"&&e.unref()}rP.unrefTimer=fet});var lge=Q(i1=>{"use strict";A();Object.defineProperty(i1,"__esModule",{value:!0});i1.ExportResultCode=void 0;var Aet;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Aet=i1.ExportResultCode||(i1.ExportResultCode={}))});var pge=Q(oP=>{"use strict";A();Object.defineProperty(oP,"__esModule",{value:!0});oP.CompositePropagator=void 0;var dge=(Le(),we(Je)),zz=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,r)=>n.concat(r),[])))}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){dge.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(a){dge.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};oP.CompositePropagator=zz});var fge=Q(ZI=>{"use strict";A();Object.defineProperty(ZI,"__esModule",{value:!0});ZI.validateValue=ZI.validateKey=void 0;var $z="[_0-9a-z-*/]",met=`[a-z]${$z}{0,255}`,get=`[a-z0-9]${$z}{0,240}@[a-z]${$z}{0,13}`,het=new RegExp(`^(?:${met}|${get})$`),_et=/^[ -~]{0,255}[!-~]$/,Eet=/,|=/;function yet(e){return het.test(e)}ZI.validateKey=yet;function Tet(e){return _et.test(e)&&!Eet.test(e)}ZI.validateValue=Tet});var qz=Q(iP=>{"use strict";A();Object.defineProperty(iP,"__esModule",{value:!0});iP.TraceState=void 0;var Age=fge(),mge=32,Iet=512,gge=",",hge="=",Vz=class e{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,n)=>(t.push(n+hge+this.get(n)),t),[]).join(gge)}_parse(t){t.length>Iet||(this._internalState=t.split(gge).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(hge);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,Age.validateKey)(a)&&(0,Age.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>mge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,mge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};iP.TraceState=Vz});var Ege=Q(Os=>{"use strict";A();Object.defineProperty(Os,"__esModule",{value:!0});Os.W3CTraceContextPropagator=Os.parseTraceParent=Os.TRACE_STATE_HEADER=Os.TRACE_PARENT_HEADER=void 0;var aP=(Le(),we(Je)),Cet=n1(),bet=qz();Os.TRACE_PARENT_HEADER="traceparent";Os.TRACE_STATE_HEADER="tracestate";var vet="00",Ret="(?!ff)[\\da-f]{2}",Det="(?![0]{32})[\\da-f]{32}",xet="(?![0]{16})[\\da-f]{16}",Bet="[\\da-f]{2}",Net=new RegExp(`^\\s?(${Ret})-(${Det})-(${xet})-(${Bet})(-.*)?\\s?$`);function _ge(e){let t=Net.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Os.parseTraceParent=_ge;var Yz=class{inject(t,n,r){let o=aP.trace.getSpanContext(t);if(!o||(0,Cet.isTracingSuppressed)(t)||!(0,aP.isSpanContextValid)(o))return;let i=`${vet}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||aP.TraceFlags.NONE).toString(16)}`;r.set(n,Os.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Os.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Os.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=_ge(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Os.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new bet.TraceState(typeof d=="string"?d:void 0)}return aP.trace.setSpanContext(t,a)}fields(){return[Os.TRACE_PARENT_HEADER,Os.TRACE_STATE_HEADER]}};Os.W3CTraceContextPropagator=Yz});var Sge=Q(Rp=>{"use strict";A();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.getRPCMetadata=Rp.deleteRPCMetadata=Rp.setRPCMetadata=Rp.RPCType=void 0;var Oet=(Le(),we(Je)),Kz=(0,Oet.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),wet;(function(e){e.HTTP="http"})(wet=Rp.RPCType||(Rp.RPCType={}));function Met(e,t){return e.setValue(Kz,t)}Rp.setRPCMetadata=Met;function Pet(e){return e.deleteValue(Kz)}Rp.deleteRPCMetadata=Pet;function ket(e){return e.getValue(Kz)}Rp.getRPCMetadata=ket});var bge=Q(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.isPlainObject=void 0;var Uet="[object Object]",Let="[object Null]",Qet="[object Undefined]",Fet=Function.prototype,yge=Fet.toString,Get=yge.call(Object),jet=Object.getPrototypeOf,Tge=Object.prototype,Ige=Tge.hasOwnProperty,G0=Symbol?Symbol.toStringTag:void 0,Cge=Tge.toString;function Het(e){if(!zet(e)||$et(e)!==Uet)return!1;let t=jet(e);if(t===null)return!0;let n=Ige.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&yge.call(n)===Get}sP.isPlainObject=Het;function zet(e){return e!=null&&typeof e=="object"}function $et(e){return e==null?e===void 0?Qet:Let:G0&&G0 in Object(e)?Vet(e):qet(e)}function Vet(e){let t=Ige.call(e,G0),n=e[G0],r=!1;try{e[G0]=void 0,r=!0}catch{}let o=Cge.call(e);return r&&(t?e[G0]=n:delete e[G0]),o}function qet(e){return Cge.call(e)}});var Bge=Q(lP=>{"use strict";A();Object.defineProperty(lP,"__esModule",{value:!0});lP.merge=void 0;var vge=bge(),Yet=20;function Ket(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Dge(t,e.shift(),0,n);return t}lP.merge=Ket;function Jz(e){return cP(e)?e.slice():e}function Dge(e,t,n=0,r){let o;if(!(n>Yet)){if(n++,uP(e)||uP(t)||xge(t))o=Jz(t);else if(cP(e)){if(o=e.slice(),cP(t))for(let i=0,a=t.length;i<a;i++)o.push(Jz(t[i]));else if(a1(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=Jz(t[d])}}}else if(a1(e))if(a1(t)){if(!Jet(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],m=t[d];if(uP(m))typeof m>"u"?delete o[d]:o[d]=m;else{let h=o[d],y=m;if(Rge(e,d,r)||Rge(t,d,r))delete o[d];else{if(a1(h)&&a1(y)){let S=r.get(h)||[],C=r.get(y)||[];S.push({obj:e,key:d}),C.push({obj:t,key:d}),r.set(h,S),r.set(y,C)}o[d]=Dge(o[d],m,n,r)}}}}else o=t;return o}}function Rge(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function cP(e){return Array.isArray(e)}function xge(e){return typeof e=="function"}function a1(e){return!uP(e)&&!cP(e)&&!xge(e)&&typeof e=="object"}function uP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Jet(e,t){return!(!(0,vge.isPlainObject)(e)||!(0,vge.isPlainObject)(t))}});var Nge=Q(WI=>{"use strict";A();Object.defineProperty(WI,"__esModule",{value:!0});WI.callWithTimeout=WI.TimeoutError=void 0;var dP=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};WI.TimeoutError=dP;function Zet(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new dP("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}WI.callWithTimeout=Zet});var wge=Q(XI=>{"use strict";A();Object.defineProperty(XI,"__esModule",{value:!0});XI.isUrlIgnored=XI.urlMatches=void 0;function Oge(e,t){return typeof t=="string"?e===t:!!e.match(t)}XI.urlMatches=Oge;function Wet(e,t){if(!t)return!1;for(let n of t)if(Oge(e,n))return!0;return!1}XI.isUrlIgnored=Wet});var Mge=Q(pP=>{"use strict";A();Object.defineProperty(pP,"__esModule",{value:!0});pP.Deferred=void 0;var Zz=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};pP.Deferred=Zz});var Pge=Q(fP=>{"use strict";A();Object.defineProperty(fP,"__esModule",{value:!0});fP.BindOnceFuture=void 0;var Xet=Mge(),Wz=class{_isCalled=!1;_deferred=new Xet.Deferred;_callback;_that;constructor(t,n){this._callback=t,this._that=n}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(n=>this._deferred.resolve(n),n=>this._deferred.reject(n))}catch(n){this._deferred.reject(n)}}return this._deferred.promise}};fP.BindOnceFuture=Wz});var Uge=Q(AP=>{"use strict";A();Object.defineProperty(AP,"__esModule",{value:!0});AP.diagLogLevelFromString=void 0;var bm=(Le(),we(Je)),kge={ALL:bm.DiagLogLevel.ALL,VERBOSE:bm.DiagLogLevel.VERBOSE,DEBUG:bm.DiagLogLevel.DEBUG,INFO:bm.DiagLogLevel.INFO,WARN:bm.DiagLogLevel.WARN,ERROR:bm.DiagLogLevel.ERROR,NONE:bm.DiagLogLevel.NONE};function ett(e){if(e==null)return;let t=kge[e.toUpperCase()];return t??(bm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kge)}, using default`),bm.DiagLogLevel.INFO)}AP.diagLogLevelFromString=ett});var Qge=Q(mP=>{"use strict";A();Object.defineProperty(mP,"__esModule",{value:!0});mP._export=void 0;var Lge=(Le(),we(Je)),ttt=n1();function ntt(e,t){return new Promise(n=>{Lge.context.with((0,ttt.suppressTracing)(Lge.context.active()),()=>{e.export(t,n)})})}mP._export=ntt});var _r=Q(Be=>{"use strict";A();Object.defineProperty(Be,"__esModule",{value:!0});Be.internal=Be.diagLogLevelFromString=Be.BindOnceFuture=Be.urlMatches=Be.isUrlIgnored=Be.callWithTimeout=Be.TimeoutError=Be.merge=Be.TraceState=Be.unsuppressTracing=Be.suppressTracing=Be.isTracingSuppressed=Be.setRPCMetadata=Be.getRPCMetadata=Be.deleteRPCMetadata=Be.RPCType=Be.parseTraceParent=Be.W3CTraceContextPropagator=Be.TRACE_STATE_HEADER=Be.TRACE_PARENT_HEADER=Be.CompositePropagator=Be.otperformance=Be.getStringListFromEnv=Be.getNumberFromEnv=Be.getBooleanFromEnv=Be.getStringFromEnv=Be._globalThis=Be.SDK_INFO=Be.parseKeyPairsIntoRecord=Be.ExportResultCode=Be.unrefTimer=Be.timeInputToHrTime=Be.millisToHrTime=Be.isTimeInputHrTime=Be.isTimeInput=Be.hrTimeToTimeStamp=Be.hrTimeToNanoseconds=Be.hrTimeToMilliseconds=Be.hrTimeToMicroseconds=Be.hrTimeDuration=Be.hrTime=Be.getTimeOrigin=Be.addHrTimes=Be.loggingErrorHandler=Be.setGlobalErrorHandler=Be.globalErrorHandler=Be.sanitizeAttributes=Be.isAttributeValue=Be.AnchoredClock=Be.W3CBaggagePropagator=void 0;var rtt=yue();Object.defineProperty(Be,"W3CBaggagePropagator",{enumerable:!0,get:function(){return rtt.W3CBaggagePropagator}});var ott=Tue();Object.defineProperty(Be,"AnchoredClock",{enumerable:!0,get:function(){return ott.AnchoredClock}});var Fge=Rue();Object.defineProperty(Be,"isAttributeValue",{enumerable:!0,get:function(){return Fge.isAttributeValue}});Object.defineProperty(Be,"sanitizeAttributes",{enumerable:!0,get:function(){return Fge.sanitizeAttributes}});var Gge=xue();Object.defineProperty(Be,"globalErrorHandler",{enumerable:!0,get:function(){return Gge.globalErrorHandler}});Object.defineProperty(Be,"setGlobalErrorHandler",{enumerable:!0,get:function(){return Gge.setGlobalErrorHandler}});var itt=pz();Object.defineProperty(Be,"loggingErrorHandler",{enumerable:!0,get:function(){return itt.loggingErrorHandler}});var pd=uge();Object.defineProperty(Be,"addHrTimes",{enumerable:!0,get:function(){return pd.addHrTimes}});Object.defineProperty(Be,"getTimeOrigin",{enumerable:!0,get:function(){return pd.getTimeOrigin}});Object.defineProperty(Be,"hrTime",{enumerable:!0,get:function(){return pd.hrTime}});Object.defineProperty(Be,"hrTimeDuration",{enumerable:!0,get:function(){return pd.hrTimeDuration}});Object.defineProperty(Be,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return pd.hrTimeToMicroseconds}});Object.defineProperty(Be,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return pd.hrTimeToMilliseconds}});Object.defineProperty(Be,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return pd.hrTimeToNanoseconds}});Object.defineProperty(Be,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return pd.hrTimeToTimeStamp}});Object.defineProperty(Be,"isTimeInput",{enumerable:!0,get:function(){return pd.isTimeInput}});Object.defineProperty(Be,"isTimeInputHrTime",{enumerable:!0,get:function(){return pd.isTimeInputHrTime}});Object.defineProperty(Be,"millisToHrTime",{enumerable:!0,get:function(){return pd.millisToHrTime}});Object.defineProperty(Be,"timeInputToHrTime",{enumerable:!0,get:function(){return pd.timeInputToHrTime}});var att=cge();Object.defineProperty(Be,"unrefTimer",{enumerable:!0,get:function(){return att.unrefTimer}});var stt=lge();Object.defineProperty(Be,"ExportResultCode",{enumerable:!0,get:function(){return stt.ExportResultCode}});var utt=sz();Object.defineProperty(Be,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return utt.parseKeyPairsIntoRecord}});var j0=jz();Object.defineProperty(Be,"SDK_INFO",{enumerable:!0,get:function(){return j0.SDK_INFO}});Object.defineProperty(Be,"_globalThis",{enumerable:!0,get:function(){return j0._globalThis}});Object.defineProperty(Be,"getStringFromEnv",{enumerable:!0,get:function(){return j0.getStringFromEnv}});Object.defineProperty(Be,"getBooleanFromEnv",{enumerable:!0,get:function(){return j0.getBooleanFromEnv}});Object.defineProperty(Be,"getNumberFromEnv",{enumerable:!0,get:function(){return j0.getNumberFromEnv}});Object.defineProperty(Be,"getStringListFromEnv",{enumerable:!0,get:function(){return j0.getStringListFromEnv}});Object.defineProperty(Be,"otperformance",{enumerable:!0,get:function(){return j0.otperformance}});var ctt=pge();Object.defineProperty(Be,"CompositePropagator",{enumerable:!0,get:function(){return ctt.CompositePropagator}});var gP=Ege();Object.defineProperty(Be,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return gP.TRACE_PARENT_HEADER}});Object.defineProperty(Be,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return gP.TRACE_STATE_HEADER}});Object.defineProperty(Be,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return gP.W3CTraceContextPropagator}});Object.defineProperty(Be,"parseTraceParent",{enumerable:!0,get:function(){return gP.parseTraceParent}});var hP=Sge();Object.defineProperty(Be,"RPCType",{enumerable:!0,get:function(){return hP.RPCType}});Object.defineProperty(Be,"deleteRPCMetadata",{enumerable:!0,get:function(){return hP.deleteRPCMetadata}});Object.defineProperty(Be,"getRPCMetadata",{enumerable:!0,get:function(){return hP.getRPCMetadata}});Object.defineProperty(Be,"setRPCMetadata",{enumerable:!0,get:function(){return hP.setRPCMetadata}});var Xz=n1();Object.defineProperty(Be,"isTracingSuppressed",{enumerable:!0,get:function(){return Xz.isTracingSuppressed}});Object.defineProperty(Be,"suppressTracing",{enumerable:!0,get:function(){return Xz.suppressTracing}});Object.defineProperty(Be,"unsuppressTracing",{enumerable:!0,get:function(){return Xz.unsuppressTracing}});var ltt=qz();Object.defineProperty(Be,"TraceState",{enumerable:!0,get:function(){return ltt.TraceState}});var dtt=Bge();Object.defineProperty(Be,"merge",{enumerable:!0,get:function(){return dtt.merge}});var jge=Nge();Object.defineProperty(Be,"TimeoutError",{enumerable:!0,get:function(){return jge.TimeoutError}});Object.defineProperty(Be,"callWithTimeout",{enumerable:!0,get:function(){return jge.callWithTimeout}});var Hge=wge();Object.defineProperty(Be,"isUrlIgnored",{enumerable:!0,get:function(){return Hge.isUrlIgnored}});Object.defineProperty(Be,"urlMatches",{enumerable:!0,get:function(){return Hge.urlMatches}});var ptt=Pge();Object.defineProperty(Be,"BindOnceFuture",{enumerable:!0,get:function(){return ptt.BindOnceFuture}});var ftt=Uge();Object.defineProperty(Be,"diagLogLevelFromString",{enumerable:!0,get:function(){return ftt.diagLogLevelFromString}});var Att=Qge();Be.internal={_export:Att._export}});var zge=Q(_P=>{"use strict";A();Object.defineProperty(_P,"__esModule",{value:!0});_P.VERSION=void 0;_P.VERSION="0.214.0"});var $ge=Q(s1=>{"use strict";A();Object.defineProperty(s1,"__esModule",{value:!0});s1.SeverityNumber=void 0;var mtt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(mtt=s1.SeverityNumber||(s1.SeverityNumber={}))});var SP=Q(eC=>{"use strict";A();Object.defineProperty(eC,"__esModule",{value:!0});eC.NOOP_LOGGER=eC.NoopLogger=void 0;var EP=class{emit(t){}};eC.NoopLogger=EP;eC.NOOP_LOGGER=new EP});var Vge=Q(Gf=>{"use strict";A();Object.defineProperty(Gf,"__esModule",{value:!0});Gf.API_BACKWARDS_COMPATIBILITY_VERSION=Gf.makeGetter=Gf._global=Gf.GLOBAL_LOGS_API_KEY=void 0;Gf.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Gf._global=globalThis;function gtt(e,t,n){return r=>r===e?t:n}Gf.makeGetter=gtt;Gf.API_BACKWARDS_COMPATIBILITY_VERSION=1});var e5=Q(tC=>{"use strict";A();Object.defineProperty(tC,"__esModule",{value:!0});tC.NOOP_LOGGER_PROVIDER=tC.NoopLoggerProvider=void 0;var htt=SP(),yP=class{getLogger(t,n,r){return new htt.NoopLogger}};tC.NoopLoggerProvider=yP;tC.NOOP_LOGGER_PROVIDER=new yP});var qge=Q(TP=>{"use strict";A();Object.defineProperty(TP,"__esModule",{value:!0});TP.ProxyLogger=void 0;var _tt=SP(),t5=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):_tt.NOOP_LOGGER}};TP.ProxyLogger=t5});var Yge=Q(IP=>{"use strict";A();Object.defineProperty(IP,"__esModule",{value:!0});IP.ProxyLoggerProvider=void 0;var Ett=e5(),Stt=qge(),n5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Stt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Ett.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};IP.ProxyLoggerProvider=n5});var Jge=Q(CP=>{"use strict";A();Object.defineProperty(CP,"__esModule",{value:!0});CP.LogsAPI=void 0;var fd=Vge(),ytt=e5(),Kge=Yge(),r5=class e{constructor(){this._proxyLoggerProvider=new Kge.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return fd._global[fd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(fd._global[fd.GLOBAL_LOGS_API_KEY]=(0,fd.makeGetter)(fd.API_BACKWARDS_COMPATIBILITY_VERSION,t,ytt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=fd._global[fd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(fd._global,fd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete fd._global[fd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Kge.ProxyLoggerProvider}};CP.LogsAPI=r5});var o5=Q(jf=>{"use strict";A();Object.defineProperty(jf,"__esModule",{value:!0});jf.logs=jf.NoopLogger=jf.NOOP_LOGGER=jf.SeverityNumber=void 0;var Ttt=$ge();Object.defineProperty(jf,"SeverityNumber",{enumerable:!0,get:function(){return Ttt.SeverityNumber}});var Zge=SP();Object.defineProperty(jf,"NOOP_LOGGER",{enumerable:!0,get:function(){return Zge.NOOP_LOGGER}});Object.defineProperty(jf,"NoopLogger",{enumerable:!0,get:function(){return Zge.NoopLogger}});var Itt=Jge();jf.logs=Itt.LogsAPI.getInstance()});var Wge=Q(nC=>{"use strict";A();Object.defineProperty(nC,"__esModule",{value:!0});nC.disableInstrumentations=nC.enableInstrumentations=void 0;function Ctt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}nC.enableInstrumentations=Ctt;function btt(e){e.forEach(t=>t.disable())}nC.disableInstrumentations=btt});var the=Q(bP=>{"use strict";A();Object.defineProperty(bP,"__esModule",{value:!0});bP.registerInstrumentations=void 0;var Xge=(Le(),we(Je)),vtt=o5(),ehe=Wge();function Rtt(e){let t=e.tracerProvider||Xge.trace.getTracerProvider(),n=e.meterProvider||Xge.metrics.getMeterProvider(),r=e.loggerProvider||vtt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,ehe.enableInstrumentations)(o,t,n,r),()=>{(0,ehe.disableInstrumentations)(o)}}bP.registerInstrumentations=Rtt});var lhe=Q(vP=>{"use strict";A();Object.defineProperty(vP,"__esModule",{value:!0});vP.satisfies=void 0;var u5=(Le(),we(Je)),ahe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Dtt=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,xtt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Btt(e,t,n){if(!Ntt(e))return u5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Ptt(e);if(!r)return!1;let o=[],i=she(r,t,o,n);return i&&!n?.includePrerelease?wtt(r,o):i}vP.satisfies=Btt;function Ntt(e){return typeof e=="string"&&ahe.test(e)}function she(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(i5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=nnt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!i5(e,i,n,r))return!1;return!0}return i5(e,t,n,r)}function i5(e,t,n,r){if(t=Mtt(t,r),t.includes(" "))return she(e,t,n,r);{let o=ktt(t);return n.push(o),Ott(e,o)}}function Ott(e,t){if(t.invalid)return!1;if(!t.version||s5(t.version))return!0;let n=rhe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=rhe(r,o)}return xtt[t.op]?.includes(n)}function wtt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Mtt(e,t){return e=e.trim(),e=ent(e,t),e=Xtt(e),e=tnt(e,t),e=e.trim(),e}function mu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Ptt(e){let t=e.match(ahe);if(!t){u5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function ktt(e){if(!e)return{};let t=e.match(Dtt);if(!t)return u5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function s5(e){return e==="*"||e==="x"||e==="X"}function nhe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Utt(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function Ltt(e,t){if(s5(e)||s5(t))return 0;let[n,r]=Utt(nhe(e),nhe(t));return n>r?1:n<r?-1:0}function rhe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Ltt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var uhe="[a-zA-Z0-9-]",che="0|[1-9]\\d*",Qtt=`\\d*[a-zA-Z-]${uhe}*`,Ftt="((?:<|>)?=?)",ohe=`(?:${che}|${Qtt})`,Gtt=`(?:-(${ohe}(?:\\.${ohe})*))`,ihe=`${uhe}+`,jtt=`(?:\\+(${ihe}(?:\\.${ihe})*))`,a5=`${che}|x|X|\\*`,u1=`[v=\\s]*(${a5})(?:\\.(${a5})(?:\\.(${a5})(?:${Gtt})?${jtt}?)?)?`,Htt=`^${Ftt}\\s*${u1}$`,ztt=new RegExp(Htt),$tt=`^\\s*(${u1})\\s+-\\s+(${u1})\\s*$`,Vtt=new RegExp($tt),qtt="(?:~>?)",Ytt=`^${qtt}${u1}$`,Ktt=new RegExp(Ytt),Jtt="(?:\\^)",Ztt=`^${Jtt}${u1}$`,Wtt=new RegExp(Ztt);function Xtt(e){let t=Ktt;return e.replace(t,(n,r,o,i,a)=>{let c;return mu(r)?c="":mu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:mu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function ent(e,t){let n=Wtt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return mu(i)?m="":mu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:mu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function tnt(e,t){let n=ztt;return e.replace(n,(r,o,i,a,c,d)=>{let m=mu(i),h=m||mu(a),y=h||mu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function nnt(e,t){let n=Vtt;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,C,R)=>(mu(i)?o="":mu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:mu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,mu(y)?h="":mu(S)?h=`<${+y+1}.0.0-0`:mu(C)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${C}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var c5=Q(ts=>{"use strict";A();Object.defineProperty(ts,"__esModule",{value:!0});ts.massUnwrap=ts.unwrap=ts.massWrap=ts.wrap=void 0;var gu=console.error.bind(console);function c1(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var rnt=(e,t,n)=>{if(!e||!e[t]){gu("no original function "+String(t)+" to wrap");return}if(!n){gu("no wrapper function"),gu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){gu("original object and wrapper must be functions");return}let o=n(r,t);return c1(o,"__original",r),c1(o,"__unwrap",()=>{e[t]===o&&c1(e,t,r)}),c1(o,"__wrapped",!0),c1(e,t,o),o};ts.wrap=rnt;var ont=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{gu("must provide one or more modules to patch"),gu(new Error().stack);return}if(!(t&&Array.isArray(t))){gu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ts.wrap)(r,o,n)})})};ts.massWrap=ont;var int=(e,t)=>{if(!e||!e[t]){gu("no function to unwrap."),gu(new Error().stack);return}let n=e[t];if(!n.__unwrap)gu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ts.unwrap=int;var ant=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{gu("must provide one or more modules to patch"),gu(new Error().stack);return}if(!(t&&Array.isArray(t))){gu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ts.unwrap)(n,r)})})};ts.massUnwrap=ant;function l1(e){e&&e.logger&&(typeof e.logger!="function"?gu("new logger isn't a function, not replacing"):gu=e.logger)}ts.default=l1;l1.wrap=ts.wrap;l1.massWrap=ts.massWrap;l1.unwrap=ts.unwrap;l1.massUnwrap=ts.massUnwrap});var dhe=Q(DP=>{"use strict";A();Object.defineProperty(DP,"__esModule",{value:!0});DP.InstrumentationAbstract=void 0;var l5=(Le(),we(Je)),snt=o5(),RP=c5(),d5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=l5.diag.createComponentLogger({namespace:t}),this._tracer=l5.trace.getTracer(t,n),this._meter=l5.metrics.getMeter(t,n),this._logger=snt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=RP.wrap;_unwrap=RP.unwrap;_massWrap=RP.massWrap;_massUnwrap=RP.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};DP.InstrumentationAbstract=d5});var fhe=Q((H8t,phe)=>{A();var rC=1e3,oC=rC*60,iC=oC*60,H0=iC*24,unt=H0*7,cnt=H0*365.25;phe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return lnt(e);if(n==="number"&&isFinite(e))return t.long?pnt(e):dnt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function lnt(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*cnt;case"weeks":case"week":case"w":return n*unt;case"days":case"day":case"d":return n*H0;case"hours":case"hour":case"hrs":case"hr":case"h":return n*iC;case"minutes":case"minute":case"mins":case"min":case"m":return n*oC;case"seconds":case"second":case"secs":case"sec":case"s":return n*rC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function dnt(e){var t=Math.abs(e);return t>=H0?Math.round(e/H0)+"d":t>=iC?Math.round(e/iC)+"h":t>=oC?Math.round(e/oC)+"m":t>=rC?Math.round(e/rC)+"s":e+"ms"}function pnt(e){var t=Math.abs(e);return t>=H0?xP(e,t,H0,"day"):t>=iC?xP(e,t,iC,"hour"):t>=oC?xP(e,t,oC,"minute"):t>=rC?xP(e,t,rC,"second"):e+" ms"}function xP(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var p5=Q(($8t,Ahe)=>{A();function fnt(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=fhe(),n.destroy=m,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,C,R;function B(...N){if(!B.enabled)return;let M=B,F=Number(new Date),H=F-(y||F);M.diff=H,M.prev=y,M.curr=F,y=F,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let j=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(ae,he)=>{if(ae==="%%")return"%";j++;let be=n.formatters[he];if(typeof be=="function"){let Ie=N[j];ae=be.call(M,Ie),N.splice(j,1),j--}return ae}),n.formatArgs.call(M,N),(M.log||n.log).apply(M,N)}return B.namespace=h,B.useColors=n.useColors(),B.color=n.selectColor(h),B.extend=r,B.destroy=n.destroy,Object.defineProperty(B,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(C!==n.namespaces&&(C=n.namespaces,R=n.enabled(h)),R),set:N=>{S=N}}),typeof n.init=="function"&&n.init(B),B}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,C=0,R=-1,B=0;for(;S<h.length;)if(C<y.length&&(y[C]===h[S]||y[C]==="*"))y[C]==="*"?(R=C,B=S,C++):(S++,C++);else if(R!==-1)C=R+1,B++,S=B;else return!1;for(;C<y.length&&y[C]==="*";)C++;return C===y.length}function a(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function c(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function d(h){return h instanceof Error?h.stack||h.message:h}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Ahe.exports=fnt});var mhe=Q((dc,BP)=>{A();dc.formatArgs=mnt;dc.save=gnt;dc.load=hnt;dc.useColors=Ant;dc.storage=_nt();dc.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();dc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Ant(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function mnt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+BP.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),e.splice(r,0,t)}dc.log=console.debug||console.log||(()=>{});function gnt(e){try{e?dc.storage.setItem("debug",e):dc.storage.removeItem("debug")}catch{}}function hnt(){let e;try{e=dc.storage.getItem("debug")||dc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function _nt(){try{return localStorage}catch{}}BP.exports=p5()(dc);var{formatters:Ent}=BP.exports;Ent.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var hhe=Q((Y8t,ghe)=>{"use strict";A();ghe.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}});var She=Q((J8t,Ehe)=>{"use strict";A();var Snt=Ue("os"),_he=Ue("tty"),Ad=hhe(),{env:Ca}=process,yh;Ad("no-color")||Ad("no-colors")||Ad("color=false")||Ad("color=never")?yh=0:(Ad("color")||Ad("colors")||Ad("color=true")||Ad("color=always"))&&(yh=1);"FORCE_COLOR"in Ca&&(Ca.FORCE_COLOR==="true"?yh=1:Ca.FORCE_COLOR==="false"?yh=0:yh=Ca.FORCE_COLOR.length===0?1:Math.min(parseInt(Ca.FORCE_COLOR,10),3));function f5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function A5(e,t){if(yh===0)return 0;if(Ad("color=16m")||Ad("color=full")||Ad("color=truecolor"))return 3;if(Ad("color=256"))return 2;if(e&&!t&&yh===void 0)return 0;let n=yh||0;if(Ca.TERM==="dumb")return n;if(process.platform==="win32"){let r=Snt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ca)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ca)||Ca.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ca)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ca.TEAMCITY_VERSION)?1:0;if(Ca.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ca){let r=parseInt((Ca.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ca.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ca.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ca.TERM)||"COLORTERM"in Ca?1:n}function ynt(e){let t=A5(e,e&&e.isTTY);return f5(t)}Ehe.exports={supportsColor:ynt,stdout:f5(A5(!0,_he.isatty(1))),stderr:f5(A5(!0,_he.isatty(2)))}});var The=Q((ba,OP)=>{A();var Tnt=Ue("tty"),NP=Ue("util");ba.init=xnt;ba.log=vnt;ba.formatArgs=Cnt;ba.save=Rnt;ba.load=Dnt;ba.useColors=Int;ba.destroy=NP.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ba.colors=[6,2,3,4,5,1];try{let e=She();e&&(e.stderr||e).level>=2&&(ba.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ba.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function Int(){return"colors"in ba.inspectOpts?!!ba.inspectOpts.colors:Tnt.isatty(process.stderr.fd)}function Cnt(e){let{namespace:t,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
4
4
  `).join(`
5
5
  `+i),e.push(o+"m+"+OP.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=bnt()+t+" "+e[0]}function bnt(){return ba.inspectOpts.hideDate?"":new Date().toISOString()+" "}function vnt(...e){return process.stderr.write(NP.formatWithOptions(ba.inspectOpts,...e)+`
6
6
  `)}function Rnt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Dnt(){return process.env.DEBUG}function xnt(e){e.inspectOpts={};let t=Object.keys(ba.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=ba.inspectOpts[t[n]]}OP.exports=p5()(ba);var{formatters:yhe}=OP.exports;yhe.o=function(e){return this.inspectOpts.colors=this.useColors,NP.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${Hk(e)}`),!0}return!1}function Git(e,t){return t?.length?Lk(e).some(n=>Bh(
35
35
  `);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let a=o.substring(0,i).toLowerCase(),c=o.substring(i+1).trim(),d=n.get(a);d&&Array.isArray(d)?d.push(c):d?n.set(a,[d,c]):n.set(a,c)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,bB.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),ae=>ae&&this._diag.error("caught ignoreRequestHook error: ",ae),!0))return;let i=(0,NL.hrTime)(),a;try{a=new Lpt.URL(t.path,t.origin)}catch(ae){this._diag.warn("could not determine url.full:",ae);return}let c=a.protocol.replace(":",""),d=this.getRequestMethod(t.method),m={[Li.ATTR_HTTP_REQUEST_METHOD]:d,[Li.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[Li.ATTR_URL_FULL]:a.toString(),[Li.ATTR_URL_PATH]:a.pathname,[Li.ATTR_URL_QUERY]:a.search,[Li.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},y=a.hostname,S=a.port||h[c];m[Li.ATTR_SERVER_ADDRESS]=y,S&&!isNaN(Number(S))&&(m[Li.ATTR_SERVER_PORT]=Number(S));let R=this.parseRequestHeaders(t).get("user-agent");if(R){let ae=Array.isArray(R)?R[R.length-1]:R;m[Li.ATTR_USER_AGENT_ORIGINAL]=ae}let B=(0,bB.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),ae=>ae&&this._diag.error("caught startSpanHook error: ",ae),!0);B&&Object.entries(B).forEach(([ae,he])=>{m[ae]=he});let N=gl.context.active(),M=gl.trace.getSpan(N),F;n.requireParentforSpans&&(!M||!gl.trace.isSpanContextValid(M.spanContext()))?F=gl.trace.wrapSpanContext(gl.INVALID_SPAN_CONTEXT):F=this.tracer.startSpan(d==="_OTHER"?"HTTP":d,{kind:gl.SpanKind.CLIENT,attributes:m},N),(0,bB.safeExecuteInTheMiddle)(()=>n.requestHook?.(F,t),ae=>ae&&this._diag.error("caught requestHook error: ",ae),!0);let H=gl.trace.setSpan(gl.context.active(),F),j={};gl.propagation.inject(H,j);let ne=Object.entries(j);for(let ae=0;ae<ne.length;ae++){let[he,be]=ne[ae];typeof t.addHeader=="function"?t.addHeader(he,be):typeof t.headers=="string"?t.headers+=`${he}: ${be}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(he,be)}this._recordFromReq.set(t,{span:F,attributes:m,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:a,remotePort:c}=n,d={[Li.ATTR_NETWORK_PEER_ADDRESS]:a,[Li.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let m=new Set(o.headersToSpanAttributes.requestHeaders.map(y=>y.toLowerCase())),h=this.parseRequestHeaders(t);for(let[y,S]of h.entries())if(m.has(y)){let C=Array.isArray(S)?S:[S];d[`http.request.header.${y}`]=C}}i.setAttributes(d)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,a={[Li.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,bB.safeExecuteInTheMiddle)(()=>c.responseHook?.(o,{request:t,response:n}),d=>d&&this._diag.error("caught responseHook error: ",d),!0),c.headersToSpanAttributes?.responseHeaders){let d=new Set;c.headersToSpanAttributes?.responseHeaders.forEach(m=>d.add(m.toLowerCase()));for(let m=0;m<n.headers.length;m=m+2){let h=n.headers[m].toString().toLowerCase(),y=n.headers[m+1];if(d.has(h)){let S=`http.response.header.${h}`;Object.hasOwn(a,S)?a[S].push(y.toString()):a[S]=[y.toString()]}}}o.setAttributes(a),o.setStatus({code:n.statusCode>=400?gl.SpanStatusCode.ERROR:gl.SpanStatusCode.UNSET}),r.attributes=Object.assign(i,a)}onDone({request:t}){let n=this._recordFromReq.get(t);if(!n)return;let{span:r,attributes:o,startTime:i}=n;r.end(),this._recordFromReq.delete(t),this.recordRequestDuration(o,i)}onError({request:t,error:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i,startTime:a}=r;o.recordException(n),o.setStatus({code:gl.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[Li.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[Li.ATTR_HTTP_RESPONSE_STATUS_CODE,Li.ATTR_HTTP_REQUEST_METHOD,Li.ATTR_SERVER_ADDRESS,Li.ATTR_SERVER_PORT,Li.ATTR_URL_SCHEME,Li.ATTR_ERROR_TYPE].forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,NL.hrTimeToMilliseconds)((0,NL.hrTimeDuration)(n,(0,NL.hrTime)()))/1e3;this._httpClientDurationHistogram.record(i,r)}getRequestMethod(t){let n={CONNECT:!0,OPTIONS:!0,HEAD:!0,GET:!0,POST:!0,PUT:!0,PATCH:!0,DELETE:!0,TRACE:!0,QUERY:!0};return t.toUpperCase()in n?t.toUpperCase():"_OTHER"}};OL.UndiciInstrumentation=Bq});var Nbe=Q(wL=>{"use strict";A();Object.defineProperty(wL,"__esModule",{value:!0});wL.UndiciInstrumentation=void 0;var Qpt=Bbe();Object.defineProperty(wL,"UndiciInstrumentation",{enumerable:!0,get:function(){return Qpt.UndiciInstrumentation}})});function Obe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function Hpt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Si(t)}function zpt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=Obe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=Obe(n.origin,n.path);if(r.startsWith("data:")){let o=UC(r);return{[Nt]:"auto.http.otel.node_fetch","http.url":o,[Uh]:o,[_d]:`${n.method||"GET"} ${o}`}}return{[Nt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var wbe,Mbe,Fpt,Gpt,jpt,Pbe,kbe=O(()=>{A();wbe=ie(Nbe(),1);dt();fr();Mbe="NodeFetch",Fpt=it(Mbe,wbe.UndiciInstrumentation,e=>zpt(e)),Gpt=it(`${Mbe}.sentry`,pS,e=>e),jpt=(e={})=>({name:"NodeFetch",setupOnce(){Hpt(e,_t()?.getOptions())&&Fpt(e),Gpt(e)}}),Pbe=jpt});var ML=Q(vB=>{"use strict";A();Object.defineProperty(vB,"__esModule",{value:!0});vB.ExpressLayerType=void 0;var $pt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})($pt=vB.ExpressLayerType||(vB.ExpressLayerType={}))});var PL=Q(RB=>{"use strict";A();Object.defineProperty(RB,"__esModule",{value:!0});RB.AttributeNames=void 0;var Vpt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(Vpt=RB.AttributeNames||(RB.AttributeNames={}))});var Nq=Q(fb=>{"use strict";A();Object.defineProperty(fb,"__esModule",{value:!0});fb._LAYERS_STORE_PROPERTY=fb.kLayerPatched=void 0;fb.kLayerPatched=Symbol("express-layer-patched");fb._LAYERS_STORE_PROPERTY="__ot_middlewares"});var Qbe=Q(Qi=>{"use strict";A();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.getActualMatchedRoute=Qi.getConstructedRoute=Qi.getLayerPath=Qi.asErrorAndMessage=Qi.isLayerIgnored=Qi.getLayerMetadata=Qi.getRouterPath=Qi.storeLayerPath=void 0;var Oq=ML(),Ab=PL(),hS=Nq(),qpt=(e,t)=>(Array.isArray(e[hS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,hS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[hS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));Qi.storeLayerPath=qpt;var Ypt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,Qi.getRouterPath)(e,n):e};Qi.getRouterPath=Ypt;var Kpt=(e,t,n)=>{if(t.name==="router"){let r=(0,Qi.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[Ab.AttributeNames.EXPRESS_NAME]:o,[Ab.AttributeNames.EXPRESS_TYPE]:Oq.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[Ab.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[Ab.AttributeNames.EXPRESS_TYPE]:Oq.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[Ab.AttributeNames.EXPRESS_NAME]:t.name,[Ab.AttributeNames.EXPRESS_TYPE]:Oq.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};Qi.getLayerMetadata=Kpt;var Jpt=(e,t)=>{if(typeof t=="string")return t===e;if(t instanceof RegExp)return t.test(e);if(typeof t=="function")return t(e);throw new TypeError("Pattern is in unsupported datatype")},Zpt=(e,t,n)=>{if(Array.isArray(n?.ignoreLayersType)&&n?.ignoreLayersType?.includes(t))return!0;if(Array.isArray(n?.ignoreLayers)===!1)return!1;try{for(let r of n.ignoreLayers)if(Jpt(e,r))return!0}catch{}return!1};Qi.isLayerIgnored=Zpt;var Wpt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];Qi.asErrorAndMessage=Wpt;var Xpt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>Ube(n)||"").join(","):Ube(t)};Qi.getLayerPath=Xpt;var Ube=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function Lbe(e){let n=(Array.isArray(e[hS._LAYERS_STORE_PROPERTY])?e[hS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}Qi.getConstructedRoute=Lbe;function eft(e){let t=Array.isArray(e[hS._LAYERS_STORE_PROPERTY])?e[hS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=Lbe(e);if(n==="*"||n.includes("/")&&(n.includes(",")||n.includes("\\")||n.includes("*")||n.includes("[")))return n;let r=n.startsWith("/")?n:`/${n}`;return r.length>0&&(e.originalUrl===r||e.originalUrl.startsWith(r)||tft(r))?r:void 0}Qi.getActualMatchedRoute=eft;function tft(e){return e.includes(":")||e.includes("*")}});var Fbe=Q(mb=>{"use strict";A();Object.defineProperty(mb,"__esModule",{value:!0});mb.PACKAGE_NAME=mb.PACKAGE_VERSION=void 0;mb.PACKAGE_VERSION="0.62.0";mb.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var $be=Q(UL=>{"use strict";A();Object.defineProperty(UL,"__esModule",{value:!0});UL.ExpressInstrumentation=void 0;var Gbe=_r(),hc=(Le(),we(Je)),jbe=ML(),Hbe=PL(),aA=Qbe(),zbe=Fbe(),gb=Xt(),nft=($n(),we(Nr)),kL=Nq(),wq=class extends gb.InstrumentationBase{constructor(t={}){super(zbe.PACKAGE_NAME,zbe.PACKAGE_VERSION,t)}init(){return[new gb.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,gb.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,gb.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,gb.isWrapped)(t.application.use)&&this._unwrap(t.application,"use"),this._wrap(t.application,"use",this._getAppUsePatch(n)),t},t=>{if(t===void 0)return;let r=typeof t?.Router?.prototype?.route=="function"?t.Router.prototype:t.Router;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(t.application,"use")})]}_getRoutePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),a=this.stack[this.stack.length-1];return t._applyPatch(a,(0,aA.getLayerPath)(o)),i}}}_getRouterUsePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),a=this.stack[this.stack.length-1];return t._applyPatch(a,(0,aA.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let a=t?this.router:this._router,c=r.apply(this,i);if(a){let d=a.stack[a.stack.length-1];n._applyPatch(d,(0,aA.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[kL.kLayerPatched]!==!0&&(t[kL.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:d}=(0,aA.storeLayerPath)(a,n),m=(0,aA.getConstructedRoute)(a),h=(0,aA.getActualMatchedRoute)(a),y={[nft.ATTR_HTTP_ROUTE]:h},S=(0,aA.getLayerMetadata)(m,t,n),C=S.attributes[Hbe.AttributeNames.EXPRESS_TYPE],R=(0,Gbe.getRPCMetadata)(hc.context.active());if(R?.type===Gbe.RPCType.HTTP&&(R.route=h),(0,aA.isLayerIgnored)(S.name,C,r.getConfig()))return C===jbe.ExpressLayerType.MIDDLEWARE&&a[kL._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(hc.trace.getSpan(hc.context.active())===void 0)return o.apply(this,arguments);let B=r._getSpanName({request:a,layerType:C,route:m},S.name),N=r.tracer.startSpan(B,{attributes:Object.assign(y,S.attributes)}),M=hc.context.active(),F=hc.trace.setSpan(M,N),{requestHook:H}=r.getConfig();H&&(0,gb.safeExecuteInTheMiddle)(()=>H(N,{request:a,layerType:C,route:m}),be=>{be&&hc.diag.error("express instrumentation: request hook failed",be)},!0);let j=!1;S.attributes[Hbe.AttributeNames.EXPRESS_TYPE]===jbe.ExpressLayerType.ROUTER&&(N.end(),j=!0,F=M);let ne=()=>{j===!1&&(j=!0,N.end())},ae=Array.from(arguments),he=ae.findIndex(be=>typeof be=="function");he>=0&&(arguments[he]=function(){let be=arguments[0],Ie=![void 0,null,"route","router"].includes(be);if(!j&&Ie){let[bn,ve]=(0,aA.asErrorAndMessage)(be);N.recordException(bn),N.setStatus({code:hc.SpanStatusCode.ERROR,message:ve})}j===!1&&(j=!0,a.res?.removeListener("finish",ne),N.end()),!(a.route&&Ie)&&d&&a[kL._LAYERS_STORE_PROPERTY].pop();let tt=ae[he],Pt=hc.context.active(),nt=hc.trace.getSpan(M),Kt=nt?hc.trace.setSpan(Pt,nt):Pt;return hc.context.bind(Kt,tt).apply(this,arguments)});try{return hc.context.bind(F,o).apply(this,arguments)}catch(be){let[Ie,tt]=(0,aA.asErrorAndMessage)(be);throw N.recordException(Ie),N.setStatus({code:hc.SpanStatusCode.ERROR,message:tt}),be}finally{j||c.once("finish",ne)}};for(let a in o)Object.defineProperty(i,a,{get(){return o[a]},set(c){o[a]=c}});return i}))}_getSpanName(t,n){let{spanNameHook:r}=this.getConfig();if(!(r instanceof Function))return n;try{return r(t,n)??n}catch(o){return hc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};UL.ExpressInstrumentation=wq});var Vbe=Q(o_=>{"use strict";A();Object.defineProperty(o_,"__esModule",{value:!0});o_.AttributeNames=o_.ExpressLayerType=o_.ExpressInstrumentation=void 0;var rft=$be();Object.defineProperty(o_,"ExpressInstrumentation",{enumerable:!0,get:function(){return rft.ExpressInstrumentation}});var oft=ML();Object.defineProperty(o_,"ExpressLayerType",{enumerable:!0,get:function(){return oft.ExpressLayerType}});var ift=PL();Object.defineProperty(o_,"AttributeNames",{enumerable:!0,get:function(){return ift.AttributeNames}})});var sa,_S=O(()=>{A();sa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function aft(e){Or(e,"auto.http.otel.express");let t=xt(e).data,n=t["express.type"];n&&e.setAttribute(Yt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function sft(e,t){if(wn()===hd())return sa&&Z.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),t;if(e.layerType==="request_handler"){let n=e.request,r=n.method?n.method.toUpperCase():"GET";wn().setTransactionName(`${r} ${e.route}`)}return t}var qbe,Ybe,Kbe,uft,Jbe,Zbe=O(()=>{A();qbe=ie(Vbe(),1);dt();fr();_S();Ybe="Express";Kbe=it(Ybe,()=>new qbe.ExpressInstrumentation({requestHook:e=>aft(e),spanNameHook:(e,t)=>sft(e,t)})),uft=()=>({name:Ybe,setupOnce(){Kbe()}}),Jbe=uft});var Wbe=Q(DB=>{"use strict";A();Object.defineProperty(DB,"__esModule",{value:!0});DB.SeverityNumber=void 0;var cft;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(cft=DB.SeverityNumber||(DB.SeverityNumber={}))});var FL=Q(hb=>{"use strict";A();Object.defineProperty(hb,"__esModule",{value:!0});hb.NOOP_LOGGER=hb.NoopLogger=void 0;var QL=class{emit(t){}};hb.NoopLogger=QL;hb.NOOP_LOGGER=new QL});var Xbe=Q(sA=>{"use strict";A();Object.defineProperty(sA,"__esModule",{value:!0});sA.API_BACKWARDS_COMPATIBILITY_VERSION=sA.makeGetter=sA._global=sA.GLOBAL_LOGS_API_KEY=void 0;sA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");sA._global=globalThis;function lft(e,t,n){return r=>r===e?t:n}sA.makeGetter=lft;sA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var Mq=Q(_b=>{"use strict";A();Object.defineProperty(_b,"__esModule",{value:!0});_b.NOOP_LOGGER_PROVIDER=_b.NoopLoggerProvider=void 0;var dft=FL(),GL=class{getLogger(t,n,r){return new dft.NoopLogger}};_b.NoopLoggerProvider=GL;_b.NOOP_LOGGER_PROVIDER=new GL});var eve=Q(jL=>{"use strict";A();Object.defineProperty(jL,"__esModule",{value:!0});jL.ProxyLogger=void 0;var pft=FL(),Pq=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):pft.NOOP_LOGGER}};jL.ProxyLogger=Pq});var tve=Q(HL=>{"use strict";A();Object.defineProperty(HL,"__esModule",{value:!0});HL.ProxyLoggerProvider=void 0;var fft=Mq(),Aft=eve(),kq=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Aft.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:fft.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};HL.ProxyLoggerProvider=kq});var rve=Q(zL=>{"use strict";A();Object.defineProperty(zL,"__esModule",{value:!0});zL.LogsAPI=void 0;var Cd=Xbe(),mft=Mq(),nve=tve(),Uq=class e{constructor(){this._proxyLoggerProvider=new nve.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Cd._global[Cd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Cd._global[Cd.GLOBAL_LOGS_API_KEY]=(0,Cd.makeGetter)(Cd.API_BACKWARDS_COMPATIBILITY_VERSION,t,mft.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Cd._global[Cd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Cd._global,Cd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Cd._global[Cd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new nve.ProxyLoggerProvider}};zL.LogsAPI=Uq});var Lq=Q(uA=>{"use strict";A();Object.defineProperty(uA,"__esModule",{value:!0});uA.logs=uA.NoopLogger=uA.NOOP_LOGGER=uA.SeverityNumber=void 0;var gft=Wbe();Object.defineProperty(uA,"SeverityNumber",{enumerable:!0,get:function(){return gft.SeverityNumber}});var ove=FL();Object.defineProperty(uA,"NOOP_LOGGER",{enumerable:!0,get:function(){return ove.NOOP_LOGGER}});Object.defineProperty(uA,"NoopLogger",{enumerable:!0,get:function(){return ove.NoopLogger}});var hft=rve();uA.logs=hft.LogsAPI.getInstance()});var ive=Q(Eb=>{"use strict";A();Object.defineProperty(Eb,"__esModule",{value:!0});Eb.disableInstrumentations=Eb.enableInstrumentations=void 0;function _ft(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}Eb.enableInstrumentations=_ft;function Eft(e){e.forEach(t=>t.disable())}Eb.disableInstrumentations=Eft});var uve=Q($L=>{"use strict";A();Object.defineProperty($L,"__esModule",{value:!0});$L.registerInstrumentations=void 0;var ave=(Le(),we(Je)),Sft=Lq(),sve=ive();function yft(e){let t=e.tracerProvider||ave.trace.getTracerProvider(),n=e.meterProvider||ave.metrics.getMeterProvider(),r=e.loggerProvider||Sft.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,sve.enableInstrumentations)(o,t,n,r),()=>{(0,sve.disableInstrumentations)(o)}}$L.registerInstrumentations=yft});var hve=Q(VL=>{"use strict";A();Object.defineProperty(VL,"__esModule",{value:!0});VL.satisfies=void 0;var jq=(Le(),we(Je)),fve=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Tft=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Ift={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Cft(e,t,n){if(!bft(e))return jq.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=xft(e);if(!r)return!1;let o=[],i=Ave(r,t,o,n);return i&&!n?.includePrerelease?Rft(r,o):i}VL.satisfies=Cft;function bft(e){return typeof e=="string"&&fve.test(e)}function Ave(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(Qq(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Jft(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!Qq(e,i,n,r))return!1;return!0}return Qq(e,t,n,r)}function Qq(e,t,n,r){if(t=Dft(t,r),t.includes(" "))return Ave(e,t,n,r);{let o=Bft(t);return n.push(o),vft(e,o)}}function vft(e,t){if(t.invalid)return!1;if(!t.version||Gq(t.version))return!0;let n=lve(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=lve(r,o)}return Ift[t.op]?.includes(n)}function Rft(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Dft(e,t){return e=e.trim(),e=Yft(e,t),e=qft(e),e=Kft(e,t),e=e.trim(),e}function Iu(e){return!e||e.toLowerCase()==="x"||e==="*"}function xft(e){let t=e.match(fve);if(!t){jq.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function Bft(e){if(!e)return{};let t=e.match(Tft);if(!t)return jq.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function Gq(e){return e==="*"||e==="x"||e==="X"}function cve(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Nft(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function Oft(e,t){if(Gq(e)||Gq(t))return 0;let[n,r]=Nft(cve(e),cve(t));return n>r?1:n<r?-1:0}function lve(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Oft(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var mve="[a-zA-Z0-9-]",gve="0|[1-9]\\d*",wft=`\\d*[a-zA-Z-]${mve}*`,Mft="((?:<|>)?=?)",dve=`(?:${gve}|${wft})`,Pft=`(?:-(${dve}(?:\\.${dve})*))`,pve=`${mve}+`,kft=`(?:\\+(${pve}(?:\\.${pve})*))`,Fq=`${gve}|x|X|\\*`,xB=`[v=\\s]*(${Fq})(?:\\.(${Fq})(?:\\.(${Fq})(?:${Pft})?${kft}?)?)?`,Uft=`^${Mft}\\s*${xB}$`,Lft=new RegExp(Uft),Qft=`^\\s*(${xB})\\s+-\\s+(${xB})\\s*$`,Fft=new RegExp(Qft),Gft="(?:~>?)",jft=`^${Gft}${xB}$`,Hft=new RegExp(jft),zft="(?:\\^)",$ft=`^${zft}${xB}$`,Vft=new RegExp($ft);function qft(e){let t=Hft;return e.replace(t,(n,r,o,i,a)=>{let c;return Iu(r)?c="":Iu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Iu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function Yft(e,t){let n=Vft,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Iu(i)?m="":Iu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Iu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function Kft(e,t){let n=Lft;return e.replace(n,(r,o,i,a,c,d)=>{let m=Iu(i),h=m||Iu(a),y=h||Iu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Jft(e,t){let n=Fft;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,C,R)=>(Iu(i)?o="":Iu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Iu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Iu(y)?h="":Iu(S)?h=`<${+y+1}.0.0-0`:Iu(C)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${C}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var Hq=Q(us=>{"use strict";A();Object.defineProperty(us,"__esModule",{value:!0});us.massUnwrap=us.unwrap=us.massWrap=us.wrap=void 0;var Cu=console.error.bind(console);function BB(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Zft=(e,t,n)=>{if(!e||!e[t]){Cu("no original function "+String(t)+" to wrap");return}if(!n){Cu("no wrapper function"),Cu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Cu("original object and wrapper must be functions");return}let o=n(r,t);return BB(o,"__original",r),BB(o,"__unwrap",()=>{e[t]===o&&BB(e,t,r)}),BB(o,"__wrapped",!0),BB(e,t,o),o};us.wrap=Zft;var Wft=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Cu("must provide one or more modules to patch"),Cu(new Error().stack);return}if(!(t&&Array.isArray(t))){Cu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,us.wrap)(r,o,n)})})};us.massWrap=Wft;var Xft=(e,t)=>{if(!e||!e[t]){Cu("no function to unwrap."),Cu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Cu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};us.unwrap=Xft;var eAt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Cu("must provide one or more modules to patch"),Cu(new Error().stack);return}if(!(t&&Array.isArray(t))){Cu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,us.unwrap)(n,r)})})};us.massUnwrap=eAt;function NB(e){e&&e.logger&&(typeof e.logger!="function"?Cu("new logger isn't a function, not replacing"):Cu=e.logger)}us.default=NB;NB.wrap=us.wrap;NB.massWrap=us.massWrap;NB.unwrap=us.unwrap;NB.massUnwrap=us.massUnwrap});var _ve=Q(YL=>{"use strict";A();Object.defineProperty(YL,"__esModule",{value:!0});YL.InstrumentationAbstract=void 0;var zq=(Le(),we(Je)),tAt=Lq(),qL=Hq(),$q=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=zq.diag.createComponentLogger({namespace:t}),this._tracer=zq.trace.getTracer(t,n),this._meter=zq.metrics.getMeter(t,n),this._logger=tAt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=qL.wrap;_unwrap=qL.unwrap;_massWrap=qL.massWrap;_massUnwrap=qL.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};YL.InstrumentationAbstract=$q});var Eve=Q(i_=>{"use strict";A();Object.defineProperty(i_,"__esModule",{value:!0});i_.ModuleNameTrie=i_.ModuleNameSeparator=void 0;i_.ModuleNameSeparator="/";var KL=class{hooks=[];children=new Map},Vq=class{_trie=new KL;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(i_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new KL,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(i_.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};i_.ModuleNameTrie=Vq});var yve=Q(JL=>{"use strict";A();Object.defineProperty(JL,"__esModule",{value:!0});JL.RequireInTheMiddleSingleton=void 0;var nAt=z0(),Sve=Ue("path"),qq=Eve(),rAt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),Yq=class e{_moduleNameTrie=new qq.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new nAt.Hook(null,{internals:!0},(t,n,r)=>{let o=oAt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return rAt?new e:this._instance=this._instance??new e}};JL.RequireInTheMiddleSingleton=Yq;function oAt(e){return Sve.sep!==qq.ModuleNameSeparator?e.split(Sve.sep).join(qq.ModuleNameSeparator):e}});var vve=Q(OB=>{A();var Tve=[],Kq=new WeakMap,Ive=new WeakMap,Cve=new Map,bve=[],iAt={set(e,t,n){let r=Kq.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=Ive.get(e)[t];if(typeof n=="function")return n()},defineProperty(e,t,n){if(!("value"in n))throw new Error("Getters/setters are not supported for exports property descriptors.");let r=Kq.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function aAt(e,t,n,r,o){Cve.set(e,o),Kq.set(t,n),Ive.set(t,r);let i=new Proxy(t,iAt);Tve.forEach(a=>a(e,i,o)),bve.push([e,i,o])}OB.register=aAt;OB.importHooks=Tve;OB.specifiers=Cve;OB.toHook=bve});var Xq=Q((Pan,yb)=>{A();var Rve=Ue("path"),sAt=wP(),{fileURLToPath:uAt}=Ue("url"),{MessageChannel:cAt}=Ue("worker_threads"),{isBuiltin:Jq}=Ue("module");Jq||(Jq=()=>!0);var{importHooks:Zq,specifiers:lAt,toHook:dAt}=vve();function Dve(e){Zq.push(e),dAt.forEach(([t,n,r])=>e(t,n,r))}function xve(e){let t=Zq.indexOf(e);t>-1&&Zq.splice(t,1)}function Sb(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var Wq;function pAt(){let{port1:e,port2:t}=new cAt,n=0,r;Wq=c=>{n++,e.postMessage(c)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let c=setInterval(()=>{},1e3),d=new Promise(m=>{r=m}).then(()=>{clearInterval(c)});return n===0&&r(),d}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function wB(e,t,n){if(!(this instanceof wB))return new wB(e,t,n);typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null);let r=t?t.internals===!0:!1;Wq&&Array.isArray(e)&&Wq(e),this._iitmHook=(o,i,a)=>{let c=o,d=c.startsWith("node:"),m,h;if(d){let y=o.slice(5);Jq(y)&&(o=y)}else if(c.startsWith("file://")){let y=Error.stackTraceLimit;Error.stackTraceLimit=0;try{m=uAt(o),o=m}catch{}if(Error.stackTraceLimit=y,m){let S=sAt(m);S&&(o=S.name,h=S.basedir)}}if(e)for(let y of e)if(m&&y===m)Sb(n,i,m,void 0);else if(y===o){if(!h)Sb(n,i,o,h);else if(h.endsWith(lAt.get(c)))Sb(n,i,o,h);else if(r){let S=o+Rve.sep+Rve.relative(h,m);Sb(n,i,S,h)}}else y===a&&Sb(n,i,a,h);else Sb(n,i,o,h)},Dve(this._iitmHook)}wB.prototype.unhook=function(){xve(this._iitmHook)};yb.exports=wB;yb.exports.Hook=wB;yb.exports.addHook=Dve;yb.exports.removeHook=xve;yb.exports.createAddHookMessageChannel=pAt});var e7=Q(a_=>{"use strict";A();Object.defineProperty(a_,"__esModule",{value:!0});a_.isWrapped=a_.safeExecuteInTheMiddleAsync=a_.safeExecuteInTheMiddle=void 0;function fAt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}a_.safeExecuteInTheMiddle=fAt;async function AAt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(await t(r,o),r&&!n)throw r;return o}}a_.safeExecuteInTheMiddleAsync=AAt;function mAt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}a_.isWrapped=mAt});var Ove=Q(ZL=>{"use strict";A();Object.defineProperty(ZL,"__esModule",{value:!0});ZL.InstrumentationBase=void 0;var MB=Ue("path"),Bve=Ue("util"),gAt=hve(),t7=Hq(),hAt=_ve(),_At=yve(),EAt=Xq(),PB=(Le(),we(Je)),SAt=z0(),yAt=Ue("fs"),TAt=e7(),n7=class extends hAt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=_At.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,TAt.isWrapped)(t[n])&&this._unwrap(t,n),Bve.types.isProxy(t)){let o=(0,t7.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,t7.wrap)(t,n,r)};_unwrap=(t,n)=>Bve.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,t7.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{PB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){PB.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{PB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){PB.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ue.resolve(n);Ue.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,yAt.readFileSync)(MB.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{PB.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return Nve(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=MB.normalize(r);return a.filter(m=>m.name===c&&Nve(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&MB.isAbsolute(c)){let m=MB.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=MB.isAbsolute(t.name)?new SAt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new EAt.Hook([t.name],{internals:!0},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};ZL.InstrumentationBase=n7;function Nve(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,gAt.satisfies)(t,r,{includePrerelease:n}))}});var wve=Q(WL=>{"use strict";A();Object.defineProperty(WL,"__esModule",{value:!0});WL.normalize=void 0;var IAt=Ue("path");Object.defineProperty(WL,"normalize",{enumerable:!0,get:function(){return IAt.normalize}})});var Mve=Q(Tb=>{"use strict";A();Object.defineProperty(Tb,"__esModule",{value:!0});Tb.normalize=Tb.InstrumentationBase=void 0;var CAt=Ove();Object.defineProperty(Tb,"InstrumentationBase",{enumerable:!0,get:function(){return CAt.InstrumentationBase}});var bAt=wve();Object.defineProperty(Tb,"normalize",{enumerable:!0,get:function(){return bAt.normalize}})});var r7=Q(Ib=>{"use strict";A();Object.defineProperty(Ib,"__esModule",{value:!0});Ib.normalize=Ib.InstrumentationBase=void 0;var Pve=Mve();Object.defineProperty(Ib,"InstrumentationBase",{enumerable:!0,get:function(){return Pve.InstrumentationBase}});Object.defineProperty(Ib,"normalize",{enumerable:!0,get:function(){return Pve.normalize}})});var kve=Q(XL=>{"use strict";A();Object.defineProperty(XL,"__esModule",{value:!0});XL.InstrumentationNodeModuleDefinition=void 0;var o7=class{files;name;supportedVersions;patch;unpatch;constructor(t,n,r,o,i){this.files=i||[],this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o}};XL.InstrumentationNodeModuleDefinition=o7});var Uve=Q(eQ=>{"use strict";A();Object.defineProperty(eQ,"__esModule",{value:!0});eQ.InstrumentationNodeModuleFile=void 0;var vAt=r7(),i7=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,vAt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};eQ.InstrumentationNodeModuleFile=i7});var Lve=Q(ES=>{"use strict";A();Object.defineProperty(ES,"__esModule",{value:!0});ES.semconvStabilityFromStr=ES.SemconvStability=void 0;var tQ;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(tQ=ES.SemconvStability||(ES.SemconvStability={}));function RAt(e,t){let n=tQ.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=tQ.DUPLICATE;break}else o.toLowerCase()===e&&(n=tQ.STABLE);return n}ES.semconvStabilityFromStr=RAt});var Fve=Q(Fi=>{"use strict";A();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.semconvStabilityFromStr=Fi.SemconvStability=Fi.safeExecuteInTheMiddleAsync=Fi.safeExecuteInTheMiddle=Fi.isWrapped=Fi.InstrumentationNodeModuleFile=Fi.InstrumentationNodeModuleDefinition=Fi.InstrumentationBase=Fi.registerInstrumentations=void 0;var DAt=uve();Object.defineProperty(Fi,"registerInstrumentations",{enumerable:!0,get:function(){return DAt.registerInstrumentations}});var xAt=r7();Object.defineProperty(Fi,"InstrumentationBase",{enumerable:!0,get:function(){return xAt.InstrumentationBase}});var BAt=kve();Object.defineProperty(Fi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return BAt.InstrumentationNodeModuleDefinition}});var NAt=Uve();Object.defineProperty(Fi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return NAt.InstrumentationNodeModuleFile}});var a7=e7();Object.defineProperty(Fi,"isWrapped",{enumerable:!0,get:function(){return a7.isWrapped}});Object.defineProperty(Fi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return a7.safeExecuteInTheMiddle}});Object.defineProperty(Fi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return a7.safeExecuteInTheMiddleAsync}});var Qve=Lve();Object.defineProperty(Fi,"SemconvStability",{enumerable:!0,get:function(){return Qve.SemconvStability}});Object.defineProperty(Fi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return Qve.semconvStabilityFromStr}})});var Gve=Q((nsn,OAt)=>{OAt.exports={name:"@fastify/otel",version:"0.18.0",description:"Official Fastify OpenTelemetry Instrumentation",main:"index.js",type:"commonjs",types:"types/index.d.ts",scripts:{lint:"eslint","lint:fix":"eslint --fix",test:"npm run test:all && npm run test:typescript","test:unit":"c8 --100 node --test","test:all":"npm run test:v4 && npm run test:v5","test:v4":"cross-env FASTIFY_VERSION=fastifyv4 npm run test:unit","test:v5":"cross-env FASTIFY_VERSION=fastify npm run test:unit","test:coverage":"c8 node --test && c8 report --reporter=html","test:typescript":"tsd"},repository:{type:"git",url:"git+https://github.com/fastify/otel.git"},keywords:["plugin","helper","fastify","instrumentation","otel","opentelemetry"],author:"Carlos Fuentes - @metcoder95 (https://metcoder.dev)",license:"MIT",bugs:{url:"https://github.com/fastify/otel/issues"},homepage:"https://github.com/fastify/otel#readme",funding:[{type:"github",url:"https://github.com/sponsors/fastify"},{type:"opencollective",url:"https://opencollective.com/fastify"}],devDependencies:{"@fastify/type-provider-typebox":"^6.1.0","@opentelemetry/context-async-hooks":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.59.0","@opentelemetry/instrumentation-http":"^0.212.0","@opentelemetry/propagator-jaeger":"^2.0.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.2.0","@types/node":"^25.0.3",c8:"^11.0.0","cross-env":"^10.0.0",eslint:"^9.16.0",fastify:"^5.1.0","fastify-plugin":"^5.1.0",fastifyv4:"npm:fastify@^4.0.0",neostandard:"^0.12.0",tsd:"^0.33.0"},dependencies:{"@opentelemetry/core":"^2.0.0","@opentelemetry/instrumentation":"^0.212.0","@opentelemetry/semantic-conventions":"^1.28.0",minimatch:"^10.2.4"},peerDependencies:{"@opentelemetry/api":"^1.9.0"},tsd:{directory:"types"}}});var Hve=Q(SS=>{"use strict";A();Object.defineProperty(SS,"__esModule",{value:!0});SS.range=SS.balanced=void 0;var wAt=(e,t,n)=>{let r=e instanceof RegExp?jve(e,n):e,o=t instanceof RegExp?jve(t,n):t,i=r!==null&&o!=null&&(0,SS.range)(r,o,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+r.length,i[1]),post:n.slice(i[1]+o.length)}};SS.balanced=wAt;var jve=(e,t)=>{let n=t.match(e);return n?n[0]:null},MAt=(e,t,n)=>{let r,o,i,a,c,d=n.indexOf(e),m=n.indexOf(t,d+1),h=d;if(d>=0&&m>0){if(e===t)return[d,m];for(r=[],i=n.length;h>=0&&!c;){if(h===d)r.push(h),d=n.indexOf(e,h+1);else if(r.length===1){let y=r.pop();y!==void 0&&(c=[y,m])}else o=r.pop(),o!==void 0&&o<i&&(i=o,a=m),m=n.indexOf(t,h+1);h=d<m&&d>=0?d:m}r.length&&a!==void 0&&(c=[i,a])}return c};SS.range=MAt});var Jve=Q(Cb=>{"use strict";A();Object.defineProperty(Cb,"__esModule",{value:!0});Cb.EXPANSION_MAX=void 0;Cb.expand=qAt;var zve=Hve(),$ve="\0SLASH"+Math.random()+"\0",Vve="\0OPEN"+Math.random()+"\0",u7="\0CLOSE"+Math.random()+"\0",qve="\0COMMA"+Math.random()+"\0",Yve="\0PERIOD"+Math.random()+"\0",PAt=new RegExp($ve,"g"),kAt=new RegExp(Vve,"g"),UAt=new RegExp(u7,"g"),LAt=new RegExp(qve,"g"),QAt=new RegExp(Yve,"g"),FAt=/\\\\/g,GAt=/\\{/g,jAt=/\\}/g,HAt=/\\,/g,zAt=/\\\./g;Cb.EXPANSION_MAX=1e5;function s7(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function $At(e){return e.replace(FAt,$ve).replace(GAt,Vve).replace(jAt,u7).replace(HAt,qve).replace(zAt,Yve)}function VAt(e){return e.replace(PAt,"\\").replace(kAt,"{").replace(UAt,"}").replace(LAt,",").replace(QAt,".")}function Kve(e){if(!e)return[""];let t=[],n=(0,zve.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:i}=n,a=r.split(",");a[a.length-1]+="{"+o+"}";let c=Kve(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function qAt(e,t={}){if(!e)return[];let{max:n=Cb.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),kB($At(e),n,!0).map(VAt)}function YAt(e){return"{"+e+"}"}function KAt(e){return/^-?0\d/.test(e)}function JAt(e,t){return e<=t}function ZAt(e,t){return e>=t}function kB(e,t,n){let r=[],o=(0,zve.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?kB(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let c=0;c<a.length&&c<t;c++){let d=i+"{"+o.body+"}"+a[c];r.push(d)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),m=c||d,h=o.body.indexOf(",")>=0;if(!m&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+u7+o.post,kB(e,t,!0)):[e];let y;if(m)y=o.body.split(/\.\./);else if(y=Kve(o.body),y.length===1&&y[0]!==void 0&&(y=kB(y[0],t,!1).map(YAt),y.length===1))return a.map(C=>o.pre+y[0]+C);let S;if(m&&y[0]!==void 0&&y[1]!==void 0){let C=s7(y[0]),R=s7(y[1]),B=Math.max(y[0].length,y[1].length),N=y.length===3&&y[2]!==void 0?Math.abs(s7(y[2])):1,M=JAt;R<C&&(N*=-1,M=ZAt);let H=y.some(KAt);S=[];for(let j=C;M(j,R);j+=N){let ne;if(d)ne=String.fromCharCode(j),ne==="\\"&&(ne="");else if(ne=String(j),H){let ae=B-ne.length;if(ae>0){let he=new Array(ae+1).join("0");j<0?ne="-"+he+ne.slice(1):ne=he+ne}}S.push(ne)}}else{S=[];for(let C=0;C<y.length;C++)S.push.apply(S,kB(y[C],t,!1))}for(let C=0;C<S.length;C++)for(let R=0;R<a.length&&r.length<t;R++){let B=i+S[C]+a[R];(!n||m||B)&&r.push(B)}}return r}});var Zve=Q(nQ=>{"use strict";A();Object.defineProperty(nQ,"__esModule",{value:!0});nQ.assertValidPattern=void 0;var WAt=1024*64,XAt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>WAt)throw new TypeError("pattern is too long")};nQ.assertValidPattern=XAt});var Xve=Q(rQ=>{"use strict";A();Object.defineProperty(rQ,"__esModule",{value:!0});rQ.parseClass=void 0;var emt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},UB=e=>e.replace(/[[\]\\-]/g,"\\$&"),tmt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Wve=e=>e.join(""),nmt=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,a=!1,c=!1,d=!1,m=!1,h=n,y="";e:for(;i<e.length;){let B=e.charAt(i);if((B==="!"||B==="^")&&i===n+1){m=!0,i++;continue}if(B==="]"&&a&&!d){h=i+1;break}if(a=!0,B==="\\"&&!d){d=!0,i++;continue}if(B==="["&&!d){for(let[N,[M,F,H]]of Object.entries(emt))if(e.startsWith(N,i)){if(y)return["$.",!1,e.length-n,!0];i+=N.length,H?o.push(M):r.push(M),c=c||F;continue e}}if(d=!1,y){B>y?r.push(UB(y)+"-"+UB(B)):B===y&&r.push(UB(B)),y="",i++;continue}if(e.startsWith("-]",i+1)){r.push(UB(B+"-")),i+=2;continue}if(e.startsWith("-",i+1)){y=B,i+=2;continue}r.push(UB(B)),i++}if(h<i)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!m){let B=r[0].length===2?r[0].slice(-1):r[0];return[tmt(B),!1,h-n,!1]}let S="["+(m?"^":"")+Wve(r)+"]",C="["+(m?"":"^")+Wve(o)+"]";return[r.length&&o.length?"("+S+"|"+C+")":r.length?S:C,c,h-n,!0]};rQ.parseClass=nmt});var iQ=Q(oQ=>{"use strict";A();Object.defineProperty(oQ,"__esModule",{value:!0});oQ.unescape=void 0;var rmt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");oQ.unescape=rmt});var d7=Q(cQ=>{"use strict";A();var _c;Object.defineProperty(cQ,"__esModule",{value:!0});cQ.AST=void 0;var omt=Xve(),aQ=iQ(),imt=new Set(["!","?","+","*","@"]),c7=e=>imt.has(e),eRe=e=>c7(e.type),amt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),smt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),umt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),tRe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),cmt="(?!(?:^|/)\\.\\.?(?:$|/))",sQ="(?!\\.)",lmt=new Set(["[","."]),dmt=new Set(["..","."]),pmt=new Set("().*{}+?[]^$\\!"),fmt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),l7="[^/]",nRe=l7+"*?",rRe=l7+"+?",Amt=0,uQ=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++Amt;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(t,n,r={}){this.type=t,t&&(this.#r=!0),this.#t=n,this.#n=this.#t?this.#t.#n:this,this.#i=this.#n===this?r:this.#n.#i,this.#c=this.#n===this?[]:this.#n.#c,t==="!"&&!this.#n.#u&&this.#c.push(this),this.#s=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#a=this.#e.map(t=>String(t)).join("")}#h(){if(this!==this.#n)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let n=t,r=n.#t;for(;r;){for(let o=n.#s+1;!r.type&&o<r.#e.length;o++)for(let i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(r.#e[o])}n=r,r=n.#t}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof _c&&n.#t===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let t=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#s===0)return!0;let t=this.#t;for(let n=0;n<this.#s;n++){let r=t.#e[n];if(!(r instanceof _c&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new _c(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let a=o.maxExtglobRecursion??2,c=!1,d=!1,m=-1,h=!1;if(n.type===null){let B=r,N="";for(;B<t.length;){let M=t.charAt(B++);if(c||M==="\\"){c=!c,N+=M;continue}if(d){B===m+1?(M==="^"||M==="!")&&(h=!0):M==="]"&&!(B===m+2&&h)&&(d=!1),N+=M;continue}else if(M==="["){d=!0,m=B,h=!1,N+=M;continue}if(!o.noext&&c7(M)&&t.charAt(B)==="("&&i<=a){n.push(N),N="";let H=new _c(M,n);B=_c.#d(t,H,B,o,i+1),n.push(H);continue}N+=M}return n.push(N),B}let y=r+1,S=new _c(null,n),C=[],R="";for(;y<t.length;){let B=t.charAt(y++);if(c||B==="\\"){c=!c,R+=B;continue}if(d){y===m+1?(B==="^"||B==="!")&&(h=!0):B==="]"&&!(y===m+2&&h)&&(d=!1),R+=B;continue}else if(B==="["){d=!0,m=y,h=!1,R+=B;continue}if(!o.noext&&c7(B)&&t.charAt(y)==="("&&(i<=a||n&&n.#p(B))){let M=n&&n.#p(B)?0:1;S.push(R),R="";let F=new _c(B,S);S.push(F),y=_c.#d(t,F,y,o,i+M);continue}if(B==="|"){S.push(R),R="",C.push(S),S=new _c(null,n);continue}if(B===")")return R===""&&n.#e.length===0&&(n.#l=!0),S.push(R),R="",n.push(...C,S),y;R+=B}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],y}#_(t){return this.#A(t,smt)}#A(t,n=amt){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#p(r.type,n)}#p(t,n=umt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new _c(null,r,this.options);o.#e.push(""),r.push(o),this.#m(t,n)}#m(t,n){let r=t.#e[0];this.#e.splice(n,1,...r.#e);for(let o of r.#e)typeof o=="object"&&(o.#t=this);this.#a=void 0}#S(t){return!!tRe.get(this.type)?.has(t)}#y(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=t.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#S(n.type)}#T(t){let n=tRe.get(this.type),r=t.#e[0],o=n?.get(r.type);if(!o)return!1;this.#e=r.#e;for(let i of this.#e)typeof i=="object"&&(i.#t=this);this.type=o,this.#a=void 0,this.#l=!1}static fromGlob(t,n={}){let r=new _c(null,void 0,n);return _c.#d(t,r,0,n,0),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let t=this.toString(),[n,r,o,i]=this.toRegExpSource();if(!(o||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let c=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,c),{_src:n,_glob:t})}get options(){return this.#i}toRegExpSource(t){let n=t??!!this.#i.dot;if(this.#n===this&&(this.#f(),this.#h()),!eRe(this)){let d=this.isStart()&&this.isEnd()&&!this.#e.some(C=>typeof C!="string"),m=this.#e.map(C=>{let[R,B,N,M]=typeof C=="string"?_c.#I(C,this.#r,d):C.toRegExpSource(t);return this.#r=this.#r||N,this.#o=this.#o||M,R}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&dmt.has(this.#e[0]))){let R=lmt,B=n&&R.has(m.charAt(0))||m.startsWith("\\.")&&R.has(m.charAt(2))||m.startsWith("\\.\\.")&&R.has(m.charAt(4)),N=!n&&!t&&R.has(m.charAt(0));h=B?cmt:N?sQ:""}let y="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(y="(?:$|\\/)"),[h+m+y,(0,aQ.unescape)(m),this.#r=!!this.#r,this.#o]}let r=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let d=this.toString(),m=this;return m.#e=[d],m.type=null,m.#r=void 0,[d,(0,aQ.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!sQ?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?sQ:"")+rRe;else{let d=this.type==="!"?"))"+(this.isStart()&&!n&&!t?sQ:"")+nRe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+d}return[c,(0,aQ.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(eRe(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#A(o)?(n=!1,this.#m(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#y(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#a=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,a]=n.toRegExpSource(t);return this.#o=this.#o||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#I(t,n,r=!1){let o=!1,i="",a=!1,c=!1;for(let d=0;d<t.length;d++){let m=t.charAt(d);if(o){o=!1,i+=(pmt.has(m)?"\\":"")+m;continue}if(m==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?rRe:nRe,n=!0;continue}else c=!1;if(m==="\\"){d===t.length-1?i+="\\\\":o=!0;continue}if(m==="["){let[h,y,S,C]=(0,omt.parseClass)(t,d);if(S){i+=h,a=a||y,d+=S-1,n=n||C;continue}}if(m==="?"){i+=l7,n=!0;continue}i+=fmt(m)}return[i,(0,aQ.unescape)(t),!!n,a]}};cQ.AST=uQ;_c=uQ});var p7=Q(lQ=>{"use strict";A();Object.defineProperty(lQ,"__esModule",{value:!0});lQ.escape=void 0;var mmt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");lQ.escape=mmt});var lRe=Q(lt=>{"use strict";A();Object.defineProperty(lt,"__esModule",{value:!0});lt.unescape=lt.escape=lt.AST=lt.Minimatch=lt.match=lt.makeRe=lt.braceExpand=lt.defaults=lt.filter=lt.GLOBSTAR=lt.sep=lt.minimatch=void 0;var gmt=Jve(),dQ=Zve(),aRe=d7(),hmt=p7(),_mt=iQ(),Emt=(e,t,n={})=>((0,dQ.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new yS(t,n).match(e));lt.minimatch=Emt;var Smt=/^\*+([^+@!?\*\[\(]*)$/,ymt=e=>t=>!t.startsWith(".")&&t.endsWith(e),Tmt=e=>t=>t.endsWith(e),Imt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Cmt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),bmt=/^\*+\.\*+$/,vmt=e=>!e.startsWith(".")&&e.includes("."),Rmt=e=>e!=="."&&e!==".."&&e.includes("."),Dmt=/^\.\*+$/,xmt=e=>e!=="."&&e!==".."&&e.startsWith("."),Bmt=/^\*+$/,Nmt=e=>e.length!==0&&!e.startsWith("."),Omt=e=>e.length!==0&&e!=="."&&e!=="..",wmt=/^\?+([^+@!?\*\[\(]*)?$/,Mmt=([e,t=""])=>{let n=sRe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},Pmt=([e,t=""])=>{let n=uRe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},kmt=([e,t=""])=>{let n=uRe([e]);return t?r=>n(r)&&r.endsWith(t):n},Umt=([e,t=""])=>{let n=sRe([e]);return t?r=>n(r)&&r.endsWith(t):n},sRe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},uRe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},cRe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",oRe={win32:{sep:"\\"},posix:{sep:"/"}};lt.sep=cRe==="win32"?oRe.win32.sep:oRe.posix.sep;lt.minimatch.sep=lt.sep;lt.GLOBSTAR=Symbol("globstar **");lt.minimatch.GLOBSTAR=lt.GLOBSTAR;var Lmt="[^/]",Qmt=Lmt+"*?",Fmt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Gmt="(?:(?!(?:\\/|^)\\.).)*?",jmt=(e,t={})=>n=>(0,lt.minimatch)(n,e,t);lt.filter=jmt;lt.minimatch.filter=lt.filter;var bd=(e,t={})=>Object.assign({},e,t),Hmt=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return lt.minimatch;let t=lt.minimatch;return Object.assign((r,o,i={})=>t(r,o,bd(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,bd(e,i))}static defaults(o){return t.defaults(bd(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,bd(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,bd(e,i))}},unescape:(r,o={})=>t.unescape(r,bd(e,o)),escape:(r,o={})=>t.escape(r,bd(e,o)),filter:(r,o={})=>t.filter(r,bd(e,o)),defaults:r=>t.defaults(bd(e,r)),makeRe:(r,o={})=>t.makeRe(r,bd(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,bd(e,o)),match:(r,o,i={})=>t.match(r,o,bd(e,i)),sep:t.sep,GLOBSTAR:lt.GLOBSTAR})};lt.defaults=Hmt;lt.minimatch.defaults=lt.defaults;var zmt=(e,t={})=>((0,dQ.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,gmt.expand)(e,{max:t.braceExpandMax}));lt.braceExpand=zmt;lt.minimatch.braceExpand=lt.braceExpand;var $mt=(e,t={})=>new yS(e,t).makeRe();lt.makeRe=$mt;lt.minimatch.makeRe=lt.makeRe;var Vmt=(e,t,n={})=>{let r=new yS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};lt.match=Vmt;lt.minimatch.match=lt.match;var iRe=/[?*]|[+@!]\(.*?\)|\[|\]/,qmt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),yS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,dQ.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||cRe,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let d=i[0]===""&&i[1]===""&&(i[2]==="?"||!iRe.test(i[2]))&&!iRe.test(i[3]),m=/^[a-z]:/i.test(i[0]);if(d)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(m)return[i[0],...i.slice(1).map(h=>this.parse(h))]}return i.map(d=>this.parse(d))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{let i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let a=o;for(;r[a+1]==="**";)a++;a>o&&r.splice(o+1,a-o);let c=r[o+1],d=r[o+2],m=r[o+3];if(c!==".."||!d||d==="."||d===".."||!m||m==="."||m==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let a=r[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let d=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...d),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,a=[],c="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])a.push(c==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])a.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])a.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(c==="b")return!1;c="a",a.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(c==="a")return!1;c="b",a.push(n[i]),o++,i++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),d=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!m&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=d?3:c?0:void 0,S=h?3:m?0:void 0;if(typeof y=="number"&&typeof S=="number"){let[C,R]=[t[y],n[S]];C.toLowerCase()===R.toLowerCase()&&(n[S]=C,i=S,o=y)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(lt.GLOBSTAR)?this.#n(t,n,r,o,i):this.#o(t,n,r,o,i)}#n(t,n,r,o,i){let a=n.indexOf(lt.GLOBSTAR,i),c=n.lastIndexOf(lt.GLOBSTAR),[d,m,h]=r?[n.slice(i,a),n.slice(a+1),[]]:[n.slice(i,a),n.slice(a+1,c),n.slice(c+1)];if(d.length){let F=t.slice(o,o+d.length);if(!this.#o(F,d,r,0,0))return!1;o+=d.length,i+=d.length}let y=0;if(h.length){if(h.length+o>t.length)return!1;let F=t.length-h.length;if(this.#o(t,h,r,F,0))y=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(F--,!this.#o(t,h,r,F,0)))return!1;y=h.length+1}}if(!m.length){let F=!!y;for(let H=o;H<t.length-y;H++){let j=String(t[H]);if(F=!0,j==="."||j===".."||!this.options.dot&&j.startsWith("."))return!1}return r||F}let S=[[[],0]],C=S[0],R=0,B=[0];for(let F of m)F===lt.GLOBSTAR?(B.push(R),C=[[],0],S.push(C)):(C[0].push(F),R++);let N=S.length-1,M=t.length-y;for(let F of S)F[1]=M-(B[N--]+F[0].length);return!!this.#r(t,S,o,0,r,0,!!y)}#r(t,n,r,o,i,a,c){let d=n[o];if(!d){for(let y=r;y<t.length;y++){c=!0;let S=t[y];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return c}let[m,h]=d;for(;r<=h;){if(this.#o(t.slice(0,r+m.length),m,i,r,0)&&a<this.maxGlobstarRecursion){let C=this.#r(t,n,r+m.length,o+1,i,a+1,c);if(C!==!1)return C}let S=t[r];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1;r++}return i||null}#o(t,n,r,o,i){let a,c,d,m;for(a=o,c=i,m=t.length,d=n.length;a<m&&c<d;a++,c++){this.debug("matchOne loop");let h=n[c],y=t[a];if(this.debug(n,h,y),h===!1||h===lt.GLOBSTAR)return!1;let S;if(typeof h=="string"?(S=y===h,this.debug("string match",h,y,S)):(S=h.test(y),this.debug("pattern match",h,y,S)),!S)return!1}if(a===m&&c===d)return!0;if(a===m)return r;if(c===d)return a===m-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,lt.braceExpand)(this.pattern,this.options)}parse(t){(0,dQ.assertValidPattern)(t);let n=this.options;if(t==="**")return lt.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(Bmt))?o=n.dot?Omt:Nmt:(r=t.match(Smt))?o=(n.nocase?n.dot?Cmt:Imt:n.dot?Tmt:ymt)(r[1]):(r=t.match(wmt))?o=(n.nocase?n.dot?Pmt:Mmt:n.dot?kmt:Umt)(r):(r=t.match(bmt))?o=n.dot?Rmt:vmt:(r=t.match(Dmt))&&(o=xmt);let i=aRe.AST.fromGlob(t,this.options).toMMPattern();return o&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:o}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?Qmt:n.dot?Fmt:Gmt,o=new Set(n.nocase?["i"]:[]),i=t.map(d=>{let m=d.map(y=>{if(y instanceof RegExp)for(let S of y.flags.split(""))o.add(S);return typeof y=="string"?qmt(y):y===lt.GLOBSTAR?lt.GLOBSTAR:y._src});m.forEach((y,S)=>{let C=m[S+1],R=m[S-1];y!==lt.GLOBSTAR||R===lt.GLOBSTAR||(R===void 0?C!==void 0&&C!==lt.GLOBSTAR?m[S+1]="(?:\\/|"+r+"\\/)?"+C:m[S]=r:C===void 0?m[S-1]=R+"(?:\\/|\\/"+r+")?":C!==lt.GLOBSTAR&&(m[S-1]=R+"(?:\\/|\\/"+r+"\\/)"+C,m[S+1]=lt.GLOBSTAR))});let h=m.filter(y=>y!==lt.GLOBSTAR);if(this.partial&&h.length>=1){let y=[];for(let S=1;S<=h.length;S++)y.push(h.slice(0,S).join("/"));return"(?:"+y.join("|")+")"}return h.join("/")}).join("|"),[a,c]=t.length>1?["(?:",")"]:["",""];i="^"+a+i+c+"$",this.partial&&(i="^(?:\\/|"+a+i.slice(1,-1)+c+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let o=this.slashSplit(t);this.debug(this.pattern,"split",o);let i=this.set;this.debug(this.pattern,"set",i);let a=o[o.length-1];if(!a)for(let c=o.length-2;!a&&c>=0;c--)a=o[c];for(let c=0;c<i.length;c++){let d=i[c],m=o;if(r.matchBase&&d.length===1&&(m=[a]),this.matchOne(m,d,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return lt.minimatch.defaults(t).Minimatch}};lt.Minimatch=yS;var Ymt=d7();Object.defineProperty(lt,"AST",{enumerable:!0,get:function(){return Ymt.AST}});var Kmt=p7();Object.defineProperty(lt,"escape",{enumerable:!0,get:function(){return Kmt.escape}});var Jmt=iQ();Object.defineProperty(lt,"unescape",{enumerable:!0,get:function(){return Jmt.unescape}});lt.minimatch.AST=aRe.AST;lt.minimatch.Minimatch=yS;lt.minimatch.escape=hmt.escape;lt.minimatch.unescape=_mt.unescape});var hRe=Q((ysn,m7)=>{"use strict";A();var dRe=Ue("node:diagnostics_channel"),{context:pQ,trace:f7,SpanStatusCode:fQ,propagation:A7,diag:Zmt}=(Le(),we(Je)),{getRPCMetadata:Wmt,RPCType:Xmt}=_r(),{ATTR_HTTP_ROUTE:AQ,ATTR_HTTP_RESPONSE_STATUS_CODE:pRe,ATTR_HTTP_REQUEST_METHOD:egt,ATTR_URL_PATH:tgt}=($n(),we(Nr)),{InstrumentationBase:ngt}=Fve(),{version:rgt,name:fRe}=Gve(),ogt=">=4.0.0 <6",ARe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],co={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},s_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Hm="anonymous",u_=Symbol("fastify otel instance"),c_=Symbol("fastify otel request spans"),LB=Symbol("fastify otel request context"),mRe=Symbol("fastify otel addhook original"),gRe=Symbol("fastify otel setnotfound original"),QB=Symbol("fastify otel ignore path"),FB=Symbol("fastify otel record exceptions"),mQ=class extends ngt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(fRe,rgt,t),this.logger=Zmt.createComponentLogger({namespace:fRe}),this[QB]=null,this[FB]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[FB]=t.recordExceptions}if(typeof t?.requestHook=="function"&&(this._requestHook=t.requestHook),typeof t?.lifecycleHook=="function"&&(this._lifecycleHook=t.lifecycleHook),t?.ignorePaths!=null||process.env.OTEL_FASTIFY_IGNORE_PATHS!=null){let n=t?.ignorePaths??process.env.OTEL_FASTIFY_IGNORE_PATHS;if((typeof n!="string"||n.length===0)&&typeof n!="function")throw new TypeError("ignorePaths must be a string or a function");let r=null;this[QB]=o=>typeof n=="function"?n(o):(r==null&&(r=lRe().minimatch),r(o.url,n))}}enable(){return this._handleInitialization===void 0&&this.getConfig().registerOnInitialization&&(this._handleInitialization=t=>{this.plugin()(t.fastify,void 0,()=>{});let n=(r,o,i)=>{i()};n[Symbol.for("skip-override")]=!0,n[Symbol.for("fastify.display-name")]="@fastify/otel",t.fastify.register(n)},dRe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(dRe.unsubscribe("fastify.initialization",this._handleInitialization),this._handleInitialization=void 0),super.disable()}init(){return[]}plugin(){let t=this;return n[Symbol.for("skip-override")]=!0,n[Symbol.for("fastify.display-name")]="@fastify/otel",n[Symbol.for("plugin-meta")]={fastify:ogt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(u_,t),r.decorate(mRe,r.addHook),r.decorate(gRe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let C=this[LB],R=this[c_];return{enabled:this.routeOptions.config?.otel!==!1,span:R,tracer:t.tracer,context:C,inject:(B,N)=>A7.inject(C,B,N),extract:(B,N)=>A7.extract(C,B,N)}}),r.decorateRequest(c_,null),r.decorateRequest(LB,null),r.addHook("onRoute",function(C){if(t[QB]?.(C)===!0){t.logger.debug(`Ignoring route instrumentation ${C.method} ${C.url} because it matches the ignore path`);return}if(C.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${C.method} ${C.url} because it is disabled`);return}for(let R of ARe)if(C[R]!=null){let B=C[R];if(typeof B=="function")C[R]=y(B,R,{[co.HOOK_NAME]:`${this.pluginName} - route -> ${R}`,[co.FASTIFY_TYPE]:s_.ROUTE,[AQ]:C.url,[co.HOOK_CALLBACK_NAME]:B.name?.length>0?B.name:Hm});else if(Array.isArray(B)){let N=[];for(let M of B)N.push(y(M,R,{[co.HOOK_NAME]:`${this.pluginName} - route -> ${R}`,[co.FASTIFY_TYPE]:s_.ROUTE,[AQ]:C.url,[co.HOOK_CALLBACK_NAME]:M.name?.length>0?M.name:Hm}));C[R]=N}}C.onSend!=null?C.onSend=Array.isArray(C.onSend)?[...C.onSend,a]:[C.onSend,a]:C.onSend=a,C.onError!=null?C.onError=Array.isArray(C.onError)?[...C.onError,c]:[C.onError,c]:C.onError=c,C.handler=y(C.handler,"handler",{[co.HOOK_NAME]:`${this.pluginName} - route-handler`,[co.FASTIFY_TYPE]:s_.HANDLER,[AQ]:C.url,[co.HOOK_CALLBACK_NAME]:C.handler.name.length>0?C.handler.name:Hm})}),r.addHook("onRequest",function(C,R,B){if(this[u_].isEnabled()===!1||C.routeOptions.config?.otel===!1)return B();if(this[u_][QB]?.({url:C.url,method:C.method})===!0)return this[u_].logger.debug(`Ignoring request ${C.method} ${C.url} because it matches the ignore path`),B();let N=pQ.active();f7.getSpan(N)==null&&(N=A7.extract(N,C.headers));let M=Wmt(N);C.routeOptions.url!=null&&M?.type===Xmt.HTTP&&(M.route=C.routeOptions.url);let F={[co.ROOT]:"@fastify/otel",[egt]:C.method,[tgt]:C.url};C.routeOptions.url!=null&&(F[AQ]=C.routeOptions.url);let H=this[u_].tracer.startSpan("request",{attributes:F},N);try{this[u_]._requestHook?.(H,C)}catch(j){this[u_].logger.error({err:j},"requestHook threw")}C[LB]=f7.setSpan(N,H),C[c_]=H,pQ.with(C[LB],()=>{B()})}),r.addHook("onResponse",function(C,R,B){let N=C[c_];N!=null&&(N.setAttributes({[pRe]:R.statusCode}),N.end()),C[c_]=null,B()}),r.addHook=d,r.setNotFoundHandler=m,i();function a(S,C,R,B){let N=S[c_];N!=null&&(C.statusCode>=500&&N.setStatus({code:fQ.ERROR}),N.setAttributes({[pRe]:C.statusCode}),N.end()),S[c_]=null,B(null,R)}function c(S,C,R,B){let N=S[c_];N!=null&&(N.setStatus({code:fQ.ERROR,message:R.message}),t[FB]!==!1&&N.recordException(R)),B()}function d(S,C){let R=this[mRe];return ARe.includes(S)?R.call(this,S,y(C,S,{[co.HOOK_NAME]:`${this.pluginName} - ${S}`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Hm})):R.call(this,S,C)}function m(S,C){let R=this[gRe];typeof S=="function"?(C=y(S,"notFoundHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:S.name?.length>0?S.name:Hm}),R.call(this,C)):(S.preValidation!=null&&(S.preValidation=y(S.preValidation,"notFoundHandler - preValidation",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:S.preValidation.name?.length>0?S.preValidation.name:Hm})),S.preHandler!=null&&(S.preHandler=y(S.preHandler,"notFoundHandler - preHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:S.preHandler.name?.length>0?S.preHandler.name:Hm})),C=y(C,"notFoundHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Hm}),R.call(this,S,C))}function h(S){for(let C of S)if(C?.routeOptions&&C.url&&C.method)return C;return null}function y(S,C,R={}){return function(...N){let M=this[u_],F=h(N);if(F===null)return M.logger.debug(`Ignoring route instrumentation because ${C} was called without a Fastify request argument`),S.call(this,...N);if(M.isEnabled()===!1||F.routeOptions.config?.otel===!1)return M.logger.debug(`Ignoring route instrumentation ${F.routeOptions.method} ${F.routeOptions.url} because it is disabled`),S.call(this,...N);if(M[QB]?.({url:F.url,method:F.method})===!0)return M.logger.debug(`Ignoring route instrumentation ${F.routeOptions.method} ${F.routeOptions.url} because it matches the ignore path`),S.call(this,...N);let H=F[LB]??pQ.active(),j=S.name?.length>0?S.name:this.pluginName??Hm,ne=M.tracer.startSpan(`${C} - ${j}`,{attributes:R},H);if(M._lifecycleHook!=null)try{M._lifecycleHook(ne,{hookName:C,request:F,handler:j})}catch(ae){M.logger.error({err:ae},"Execution of lifecycleHook failed")}return pQ.with(f7.setSpan(H,ne),function(){try{let ae=S.call(this,...N);return typeof ae?.then=="function"?ae.then(he=>(ne.end(),he),he=>(ne.setStatus({code:fQ.ERROR,message:he.message}),M[FB]!==!1&&ne.recordException(he),ne.end(),Promise.reject(he))):(ne.end(),ae)}catch(ae){throw ne.setStatus({code:fQ.ERROR,message:ae.message}),M[FB]!==!1&&ne.recordException(ae),ne.end(),ae}},this)}}}}};m7.exports=mQ;m7.exports.FastifyOtelInstrumentation=mQ});var zm,GB,jB,_Re=O(()=>{A();(function(e){let t="fastify.name";e.FASTIFY_NAME=t;let n="fastify.type";e.FASTIFY_TYPE=n;let r="hook.name";e.HOOK_NAME=r;let o="plugin.name";e.PLUGIN_NAME=o})(zm||(zm={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(GB||(GB={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(jB||(jB={}))});var HB,ERe=O(()=>{A();HB=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function g7(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[HB]||[];return i.push(o),Object.defineProperty(e,HB,{enumerable:!1,configurable:!0,value:i}),o}function gQ(e,t){let n=e[HB]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:Xo.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[HB])}function yRe(e,t,n){let r,o;try{o=e(),SRe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!SRe(o)&&(t(r,o),r))throw r;return o}}function SRe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var TRe=O(()=>{A();Le();ERe()});function ugt(){let e=_t();e&&e.on("spanStart",t=>{CRe(t)})}function CRe(e){let t=xt(e).data,n=t["fastify.type"];if(t[Yt]||!n)return;e.setAttributes({[Nt]:"auto.http.otel.fastify",[Yt]:`${n}.fastify`});let r=t["fastify.name"]||t["plugin.name"]||t["hook.name"];if(typeof r=="string"){let o=r.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(o)}}var _Q,TS,igt,agt,IRe,sgt,hQ,bRe=O(()=>{A();Le();_Q=ie(_r(),1),TS=ie(Xt(),1);$n();dt();_Re();TRe();igt="0.1.0",agt="@sentry/instrumentation-fastify-v3",IRe="anonymous",sgt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),hQ=class extends TS.InstrumentationBase{constructor(t={}){super(agt,igt,t)}init(){return[new TS.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_hookOnRequest(){let t=this;return function(r,o,i){if(!t.isEnabled())return i();t._wrap(o,"send",t._patchSend());let a=r,c=(0,_Q.getRPCMetadata)(qe.active()),d=a.routeOptions?a.routeOptions.url:r.routerPath;d&&c?.type===_Q.RPCType.HTTP&&(c.route=d);let m=r.method||"GET";wn().setTransactionName(`${m} ${d}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...a){if(!i.isEnabled())return r.apply(this,a);let c=r.name||t||IRe,d=`${jB.MIDDLEWARE} - ${c}`,m=a[1],h=g7(m,i.tracer,d,{[zm.FASTIFY_TYPE]:GB.MIDDLEWARE,[zm.PLUGIN_NAME]:t,[zm.HOOK_NAME]:n}),y=o&&a[a.length-1];return y&&(a[a.length-1]=function(...S){gQ(m),y.apply(this,S)}),qe.with(Ft.setSpan(qe.active(),h),()=>yRe(()=>r.apply(this,a),S=>{S instanceof Error&&(h.setStatus({code:Xo.ERROR,message:S.message}),h.recordException(S)),o||gQ(m)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],a=o[1],c=this.pluginName;if(!sgt.has(i))return n.apply(this,o);let d=typeof o[o.length-1]=="function"&&a.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(c,i,a,d)])}}}_patchConstructor(t){let n=this;function r(...o){let i=t.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),ugt(),n._wrap(i,"addHook",n._wrapAddHook()),i}return t.errorCodes!==void 0&&(r.errorCodes=t.errorCodes),r.fastify=r,r.default=r,r}_patchSend(){let t=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let a=i[0];return t.isEnabled()?(0,TS.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),gQ(this,c)}):r.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){if(!t.isEnabled())return i();let a=r,c=a.routeOptions?.handler||a.context?.handler,d=c?.name.startsWith("bound ")?c.name.substring(6):c?.name,m=`${jB.REQUEST_HANDLER} - ${d||this.pluginName||IRe}`,h={[zm.PLUGIN_NAME]:this.pluginName,[zm.FASTIFY_TYPE]:GB.REQUEST_HANDLER,[Iz]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[zm.FASTIFY_NAME]=d);let y=g7(o,t.tracer,m,h);CRe(y);let{requestHook:S}=t.getConfig();return S&&(0,TS.safeExecuteInTheMiddle)(()=>S(y,{request:r}),C=>{C&&t._diag.error("request hook failed",C)},!0),qe.with(Ft.setSpan(qe.active(),y),()=>{i()})}}}});import*as h7 from"node:diagnostics_channel";function cgt(){let e=_t();if(e)return e.getIntegrationByName(EQ)}function vRe(e,t,n,r){let o=cgt()?.getShouldHandleError()||NRe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){sa&&Z.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}o(e,t,n)&&Wt(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function NRe(e,t,n){let r=n.statusCode;return r>=500||r<=299}function ORe(e){let t=xt(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",a=o===n?.startsWith("handler -"),c=n==="request"||o==="request-handler";if(r[Yt]||!a&&!c&&!i)return;let d=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[Nt]:"auto.http.otel.fastify",[Yt]:`${d}.fastify`});let m=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof m=="string"){let h=m.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function dgt(){let e=_t();e&&e.on("spanStart",t=>{ORe(t)})}function pgt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&ORe(i)}let r=t.routeOptions?.url,o=t.method||"GET";wn().setTransactionName(`${o} ${r}`)})}var RRe,EQ,DRe,xRe,lgt,BRe,wRe=O(()=>{A();RRe=ie(hRe(),1);dt();fr();_S();bRe();EQ="Fastify",DRe=it(`${EQ}.v3`,()=>new hQ);xRe=it(`${EQ}.v5`,()=>{let e=new RRe.FastifyOtelInstrumentation,t=e.plugin();return h7.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?sa&&Z.error("Failed to setup Fastify instrumentation",o):(dgt(),r&&pgt(r))})}),h7.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;vRe.call(vRe,r,o,i,"diagnostics-channel")}),e}),lgt=({shouldHandleError:e})=>{let t;return{name:EQ,setupOnce(){t=e||NRe,DRe(),xRe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},BRe=(e={})=>lgt(e)});var _7=Q(Gp=>{"use strict";A();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.SpanNames=Gp.TokenKind=Gp.AllowedOperationTypes=void 0;var fgt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(fgt=Gp.AllowedOperationTypes||(Gp.AllowedOperationTypes={}));var Agt;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(Agt=Gp.TokenKind||(Gp.TokenKind={}));var mgt;(function(e){e.EXECUTE="graphql.execute",e.PARSE="graphql.parse",e.RESOLVE="graphql.resolve",e.VALIDATE="graphql.validate",e.SCHEMA_VALIDATE="graphql.validateSchema",e.SCHEMA_PARSE="graphql.parseSchema"})(mgt=Gp.SpanNames||(Gp.SpanNames={}))});var E7=Q(zB=>{"use strict";A();Object.defineProperty(zB,"__esModule",{value:!0});zB.AttributeNames=void 0;var ggt;(function(e){e.SOURCE="graphql.source",e.FIELD_NAME="graphql.field.name",e.FIELD_PATH="graphql.field.path",e.FIELD_TYPE="graphql.field.type",e.PARENT_NAME="graphql.parent.name",e.OPERATION_TYPE="graphql.operation.type",e.OPERATION_NAME="graphql.operation.name",e.VARIABLES="graphql.variables.",e.ERROR_VALIDATION_NAME="graphql.validation.error"})(ggt=zB.AttributeNames||(zB.AttributeNames={}))});var SQ=Q(bb=>{"use strict";A();Object.defineProperty(bb,"__esModule",{value:!0});bb.OTEL_GRAPHQL_DATA_SYMBOL=bb.OTEL_PATCHED_SYMBOL=void 0;bb.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");bb.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var MRe=Q(yQ=>{"use strict";A();Object.defineProperty(yQ,"__esModule",{value:!0});yQ.OPERATION_NOT_SUPPORTED=void 0;var Jsn=SQ();yQ.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var YRe=Q(ua=>{"use strict";A();Object.defineProperty(ua,"__esModule",{value:!0});ua.wrapFieldResolver=ua.wrapFields=ua.getSourceFromLocation=ua.getOperation=ua.endSpan=ua.addSpanSource=ua.addInputVariableAttributes=ua.isPromise=void 0;var vb=(Le(),we(Je)),l_=_7(),IS=E7(),$m=SQ(),PRe=Object.values(l_.AllowedOperationTypes),hgt=e=>typeof e?.then=="function";ua.isPromise=hgt;var _gt=e=>typeof e=="object"&&e!==null;function S7(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{S7(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{S7(e,`${t}.${r}`,o)}):e.setAttribute(`${IS.AttributeNames.VARIABLES}${String(t)}`,n)}function Egt(e,t){Object.entries(t).forEach(([n,r])=>{S7(e,n,r)})}ua.addInputVariableAttributes=Egt;function QRe(e,t,n,r,o){let i=zRe(t,n,r,o);e.setAttribute(IS.AttributeNames.SOURCE,i)}ua.addSpanSource=QRe;function Sgt(e,t,n,r,o){let i=FRe(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?jRe(n):GRe(n,o);return i={span:ygt(e,t,n,r,o,c)},Cgt(n,o,i),{field:i,spanAdded:!0}}function ygt(e,t,n,r,o,i){let a={[IS.AttributeNames.FIELD_NAME]:r.fieldName,[IS.AttributeNames.FIELD_PATH]:o.join("."),[IS.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[IS.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${l_.SpanNames.RESOLVE} ${a[IS.AttributeNames.FIELD_PATH]}`,{attributes:a},i?vb.trace.setSpan(vb.context.active(),i):void 0),d=n[$m.OTEL_GRAPHQL_DATA_SYMBOL].source,m=r.fieldNodes.find(h=>h.kind==="Field");return m&&QRe(c,d.loc,t().allowValues,m.loc?.start,m.loc?.end),c}function Tgt(e,t){t&&e.recordException(t),e.end()}ua.endSpan=Tgt;function Igt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>PRe.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>PRe.indexOf(n?.operation)!==-1)}ua.getOperation=Igt;function Cgt(e,t,n){return e[$m.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function FRe(e,t){return e[$m.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function GRe(e,t){for(let n=t.length-1;n>0;n--){let r=FRe(e,t.slice(0,n));if(r)return r.span}return jRe(e)}function jRe(e){return e[$m.OTEL_GRAPHQL_DATA_SYMBOL].span}function bgt(e,t){let n=[],r=t;for(;r;){let o=r.key;e&&typeof o=="number"&&(o="*"),n.push(String(o)),r=r.prev}return n.reverse()}function vgt(e){return HRe(`
37
37
  `,e)}function kRe(e){return HRe(" ",e)}function HRe(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var Rgt=[l_.TokenKind.FLOAT,l_.TokenKind.STRING,l_.TokenKind.INT,l_.TokenKind.BLOCK_STRING];function zRe(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,a=typeof r=="number"?r:e.end,c=e.startToken.next,d=1;for(;c;){if(c.start<i){c=c.next,d=c?.line;continue}if(c.end>a){c=c.next,d=c?.line;continue}let m=c.value||c.kind,h="";!t&&Rgt.indexOf(c.kind)>=0&&(m="*"),c.kind===l_.TokenKind.STRING&&(m=`"${m}"`),c.kind===l_.TokenKind.EOF&&(m=""),c.line>d?(o+=vgt(c.line-d),d=c.line,h=kRe(c.column-1)):c.line===c.prev?.line&&(h=kRe(c.start-(c.prev?.end||0))),o+=h+m,c&&(c=c.next)}}return o}ua.getSourceFromLocation=zRe;function $Re(e,t,n){if(!e||e[$m.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[$m.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=qRe(t,n,i.resolve)),i.type)){let a=VRe(i.type);for(let c of a)$Re(c,t,n)}})}ua.wrapFields=$Re;function VRe(e){return"ofType"in e?VRe(e.ofType):Dgt(e)?e.getTypes():xgt(e)?[e]:[]}function Dgt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function xgt(e){return"getFields"in e&&typeof e.getFields=="function"}var URe=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:vb.SpanStatusCode.ERROR,message:t.message}),e.end())},LRe=(e,t)=>{t&&e.end()};function qRe(e,t,n,r=!1){if(o[$m.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let m=t();if(m.ignoreTrivialResolveSpans&&r&&(_gt(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[$m.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=bgt(m.mergeItems,d&&d.path),y=h.filter(R=>typeof R=="string").length,S,C=!1;if(m.depth>=0&&m.depth<y)S=GRe(c,h);else{let{field:R,spanAdded:B}=Sgt(e,t,c,d,h);S=R.span,C=B}return vb.context.with(vb.trace.setSpan(vb.context.active(),S),()=>{try{let R=n.call(this,i,a,c,d);return(0,ua.isPromise)(R)?R.then(B=>(LRe(S,C),B),B=>{throw URe(S,B,C),B}):(LRe(S,C),R)}catch(R){throw URe(S,R,C),R}})}return o[$m.OTEL_PATCHED_SYMBOL]=!0,o}ua.wrapFieldResolver=qRe});var KRe=Q(Rb=>{"use strict";A();Object.defineProperty(Rb,"__esModule",{value:!0});Rb.PACKAGE_NAME=Rb.PACKAGE_VERSION=void 0;Rb.PACKAGE_VERSION="0.62.0";Rb.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var WRe=Q(CQ=>{"use strict";A();Object.defineProperty(CQ,"__esModule",{value:!0});CQ.GraphQLInstrumentation=void 0;var Vm=(Le(),we(Je)),vd=Xt(),$B=_7(),TQ=E7(),y7=SQ(),Bgt=MRe(),Ls=YRe(),JRe=KRe(),ZRe={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},IQ=[">=14.0.0 <17"],T7=class extends vd.InstrumentationBase{constructor(t={}){super(JRe.PACKAGE_NAME,JRe.PACKAGE_VERSION,{...ZRe,...t})}setConfig(t={}){super.setConfig({...ZRe,...t})}init(){let t=new vd.InstrumentationNodeModuleDefinition("graphql",IQ);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new vd.InstrumentationNodeModuleFile("graphql/execution/execute.js",IQ,t=>((0,vd.isWrapped)(t.execute)&&this._unwrap(t,"execute"),this._wrap(t,"execute",this._patchExecute(t.defaultFieldResolver)),t),t=>{t&&this._unwrap(t,"execute")})}_addPatchingParser(){return new vd.InstrumentationNodeModuleFile("graphql/language/parser.js",IQ,t=>((0,vd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new vd.InstrumentationNodeModuleFile("graphql/validation/validate.js",IQ,t=>((0,vd.isWrapped)(t.validate)&&this._unwrap(t,"validate"),this._wrap(t,"validate",this._patchValidate()),t),t=>{t&&this._unwrap(t,"validate")})}_patchExecute(t){let n=this;return function(o){return function(){let a;if(arguments.length>=2){let m=arguments;a=n._wrapExecuteArgs(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],t)}else{let m=arguments[0];a=n._wrapExecuteArgs(m.schema,m.document,m.rootValue,m.contextValue,m.variableValues,m.operationName,m.fieldResolver,m.typeResolver,t)}let c=(0,Ls.getOperation)(a.document,a.operationName),d=n._createExecuteSpan(c,a);return a.contextValue[y7.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[y7.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:d,fields:{}},Vm.context.with(Vm.trace.setSpan(Vm.context.active(),d),()=>(0,vd.safeExecuteInTheMiddle)(()=>o.apply(this,[a]),(m,h)=>{n._handleExecutionResult(d,m,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,Ls.endSpan)(t,n);return}if((0,Ls.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,Ls.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,Ls.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,Ls.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,vd.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,Ls.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,a){return t._parse(this,r,i,a)}}}_patchValidate(){let t=this;return function(r){return function(i,a,c,d,m){return t._validate(this,r,i,a,c,m,d)}}}_parse(t,n,r,o){let i=this.getConfig(),a=this.tracer.startSpan($B.SpanNames.PARSE);return Vm.context.with(Vm.trace.setSpan(Vm.context.active(),a),()=>(0,vd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,d)=>{d&&((0,Ls.getOperation)(d)?d.loc&&(0,Ls.addSpanSource)(a,d.loc,i.allowValues):a.updateName($B.SpanNames.SCHEMA_PARSE)),(0,Ls.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan($B.SpanNames.VALIDATE,{});return Vm.context.with(Vm.trace.setSpan(Vm.context.active(),d),()=>(0,vd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(m,h)=>{o.loc||d.updateName($B.SpanNames.SCHEMA_VALIDATE),h&&h.length&&d.recordException({name:TQ.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,Ls.endSpan)(d,m)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan($B.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(TQ.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(TQ.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=Bgt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(TQ.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,Ls.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,Ls.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,a,c,d,m){if(o||(o={}),o[y7.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d};let h=c==null,y=c??m;return c=(0,Ls.wrapFieldResolver)(this.tracer,()=>this.getConfig(),y,h),t&&((0,Ls.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,Ls.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d}}};CQ.GraphQLInstrumentation=T7});var XRe=Q(bQ=>{"use strict";A();Object.defineProperty(bQ,"__esModule",{value:!0});bQ.GraphQLInstrumentation=void 0;var Ngt=WRe();Object.defineProperty(bQ,"GraphQLInstrumentation",{enumerable:!0,get:function(){return Ngt.GraphQLInstrumentation}})});function oDe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function wgt(e){if(Array.isArray(e)){let t=e.slice().sort();return t.length<=5?t.join(", "):`${t.slice(0,5).join(", ")}, +${t.length-5}`}return`${e}`}var eDe,tDe,nDe,Ogt,rDe,iDe=O(()=>{A();Le();eDe=ie(XRe(),1);dt();fr();db();tDe="Graphql",nDe=it(tDe,eDe.GraphQLInstrumentation,e=>{let t=oDe(e);return{...t,responseHook(n,r){Or(n,"auto.graphql.otel.graphql"),r.errors?.length&&!xt(n).status&&n.setStatus({code:Xo.ERROR});let i=xt(n).data,a=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&a){let d=ei(n),h=xt(d).data[cb]||[],y=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(y),d.setAttribute(cb,h)):typeof h=="string"?d.setAttribute(cb,[h,y]):d.setAttribute(cb,y),xt(d).data["original-description"]||d.setAttribute("original-description",xt(d).description),d.updateName(`${xt(d).data["original-description"]} (${wgt(h)})`)}}}}),Ogt=(e={})=>({name:tDe,setupOnce(){nDe(oDe(e))}}),rDe=Ogt});var aDe=Q(vQ=>{"use strict";A();Object.defineProperty(vQ,"__esModule",{value:!0});vQ.EVENT_LISTENERS_SET=void 0;vQ.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var sDe=Q(RQ=>{"use strict";A();Object.defineProperty(RQ,"__esModule",{value:!0});RQ.bufferTextMapGetter=void 0;RQ.bufferTextMapGetter={get(e,t){if(!e)return;let n=Object.keys(e);for(let r of n)if(r===t||r.toLowerCase()===t)return e[r]?.toString()},keys(e){return e?Object.keys(e):[]}}});var uDe=Q(Zn=>{"use strict";A();Object.defineProperty(Zn,"__esModule",{value:!0});Zn.METRIC_MESSAGING_PROCESS_DURATION=Zn.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=Zn.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=Zn.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=Zn.MESSAGING_SYSTEM_VALUE_KAFKA=Zn.MESSAGING_OPERATION_TYPE_VALUE_SEND=Zn.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=Zn.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=Zn.ATTR_MESSAGING_SYSTEM=Zn.ATTR_MESSAGING_OPERATION_TYPE=Zn.ATTR_MESSAGING_OPERATION_NAME=Zn.ATTR_MESSAGING_KAFKA_OFFSET=Zn.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=Zn.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=Zn.ATTR_MESSAGING_DESTINATION_PARTITION_ID=Zn.ATTR_MESSAGING_DESTINATION_NAME=Zn.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;Zn.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";Zn.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";Zn.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";Zn.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";Zn.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";Zn.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";Zn.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";Zn.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";Zn.ATTR_MESSAGING_SYSTEM="messaging.system";Zn.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";Zn.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";Zn.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";Zn.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";Zn.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";Zn.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";Zn.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";Zn.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var cDe=Q(Db=>{"use strict";A();Object.defineProperty(Db,"__esModule",{value:!0});Db.PACKAGE_NAME=Db.PACKAGE_VERSION=void 0;Db.PACKAGE_VERSION="0.23.0";Db.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var mDe=Q(xQ=>{"use strict";A();Object.defineProperty(xQ,"__esModule",{value:!0});xQ.KafkaJsInstrumentation=void 0;var wr=(Le(),we(Je)),Rd=Xt(),xb=($n(),we(Nr)),lDe=aDe(),dDe=sDe(),pt=uDe(),pDe=cDe();function DQ(e,t,n){return r=>{e.add(t,{...n,...r?{[xb.ATTR_ERROR_TYPE]:r}:{}})}}function fDe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[xb.ATTR_ERROR_TYPE]:r}:{}})}}var ADe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],I7=class extends Rd.InstrumentationBase{constructor(t={}){super(pDe.PACKAGE_NAME,pDe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(pt.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:ADe}}),this._sentMessages=this.meter.createCounter(pt.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(pt.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(pt.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:ADe}})}init(){let t=r=>{(0,Rd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,Rd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new Rd.InstrumentationNodeModuleDefinition("kafkajs",[">=0.3.0 <3"],r=>(t(r),this._wrap(r?.Kafka?.prototype,"producer",this._getProducerPatch()),this._wrap(r?.Kafka?.prototype,"consumer",this._getConsumerPatch()),r),t)}_getConsumerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Rd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[lDe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[lDe.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[xb.ATTR_SERVER_ADDRESS]:n,[xb.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Rd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,Rd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,Rd.isWrapped)(i.transaction)&&t._unwrap(i,"transaction"),t._wrap(i,"transaction",t._getProducerTransactionPatch()),t._setKafkaEventListeners(i),i}}_getConsumerRunPatch(){let t=this;return n=>function(...o){let i=o[0];return i?.eachMessage&&((0,Rd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,Rd.isWrapped)(i.eachBatch)&&t._unwrap(i,"eachBatch"),t._wrap(i,"eachBatch",t._getConsumerEachBatchPatch())),n.call(this,i)}}_getConsumerEachMessagePatch(){let t=this;return n=>function(...o){let i=o[0],a=wr.propagation.extract(wr.ROOT_CONTEXT,i.message.headers,dDe.bufferTextMapGetter),c=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:pt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:a,attributes:{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),d=[fDe(t._processDuration,Date.now(),{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),DQ(t._consumedMessages,1,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],m=wr.context.with(wr.trace.setSpan(a,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],d,m)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],a=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:pt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:wr.ROOT_CONTEXT,attributes:{[pt.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return wr.context.with(wr.trace.setSpan(wr.context.active(),a),()=>{let c=Date.now(),d=[],m=[DQ(n._consumedMessages,i.batch.messages.length,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(y=>{let S=wr.propagation.extract(wr.ROOT_CONTEXT,y.headers,dDe.bufferTextMapGetter),C=wr.trace.getSpan(S)?.spanContext(),R;C&&(R={context:C}),d.push(n._startConsumerSpan({topic:i.batch.topic,message:y,operationType:pt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:R,attributes:{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),m.push(fDe(n._processDuration,c,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return d.unshift(a),n._endSpansOnPromise(d,m,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),a=n.apply(this,o);return a.then(c=>{let d=c.send;c.send=function(...C){return wr.context.with(wr.trace.setSpan(wr.context.active(),i),()=>t._getSendPatch()(d).apply(this,C).catch(B=>{throw i.setStatus({code:wr.SpanStatusCode.ERROR,message:B?.message}),i.recordException(B),B}))};let m=c.sendBatch;c.sendBatch=function(...C){return wr.context.with(wr.trace.setSpan(wr.context.active(),i),()=>t._getSendBatchPatch()(m).apply(this,C).catch(B=>{throw i.setStatus({code:wr.SpanStatusCode.ERROR,message:B?.message}),i.recordException(B),B}))};let h=c.commit;c.commit=function(...C){let R=h.apply(this,C).then(()=>{i.setStatus({code:wr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],R)};let y=c.abort;c.abort=function(...C){let R=y.apply(this,C);return t._endSpansOnPromise([i],[],R)}}).catch(c=>{i.setStatus({code:wr.SpanStatusCode.ERROR,message:c?.message}),i.recordException(c),i.end()}),a}}_getSendBatchPatch(){let t=this;return n=>function(...o){let a=o[0].topicMessages||[],c=[],d=[];a.forEach(h=>{h.messages.forEach(y=>{c.push(t._startProducerSpan(h.topic,y)),d.push(DQ(t._sentMessages,1,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"send",[pt.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...y.partition!==void 0?{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(y.partition)}:{}}))})});let m=n.apply(this,o);return t._endSpansOnPromise(c,d,m)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],a=i.messages.map(m=>t._startProducerSpan(i.topic,m)),c=i.messages.map(m=>DQ(t._sentMessages,1,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"send",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...m.partition!==void 0?{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(m.partition)}:{}})),d=n.apply(this,o);return t._endSpansOnPromise(a,c,d)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,a=xb.ERROR_TYPE_VALUE_OTHER;throw typeof o=="string"||o===void 0?i=o:typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"message")&&(i=o.message,a=o.constructor.name),n.forEach(c=>c(a)),t.forEach(c=>{c.setAttribute(xb.ATTR_ERROR_TYPE,a),c.setStatus({code:wr.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:a}){let c=r===pt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,d=this.tracer.startSpan(`${c} ${t}`,{kind:r===pt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?wr.SpanKind.CLIENT:wr.SpanKind.CONSUMER,attributes:{...a,[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_DESTINATION_NAME]:t,[pt.ATTR_MESSAGING_OPERATION_TYPE]:r,[pt.ATTR_MESSAGING_OPERATION_NAME]:c,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[pt.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:m}=this.getConfig();return m&&n&&(0,Rd.safeExecuteInTheMiddle)(()=>m(d,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),d}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:wr.SpanKind.PRODUCER,attributes:{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_DESTINATION_NAME]:t,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[pt.ATTR_MESSAGING_OPERATION_NAME]:"send",[pt.ATTR_MESSAGING_OPERATION_TYPE]:pt.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},wr.propagation.inject(wr.trace.setSpan(wr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,Rd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};xQ.KafkaJsInstrumentation=I7});var gDe=Q(BQ=>{"use strict";A();Object.defineProperty(BQ,"__esModule",{value:!0});BQ.KafkaJsInstrumentation=void 0;var Mgt=mDe();Object.defineProperty(BQ,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return Mgt.KafkaJsInstrumentation}})});var hDe,_De,EDe,Pgt,SDe,yDe=O(()=>{A();hDe=ie(gDe(),1);fr();_De="Kafka",EDe=it(_De,()=>new hDe.KafkaJsInstrumentation({consumerHook(e){Or(e,"auto.kafkajs.otel.consumer")},producerHook(e){Or(e,"auto.kafkajs.otel.producer")}})),Pgt=()=>({name:_De,setupOnce(){EDe()}}),SDe=Pgt});var TDe=Q(Bb=>{"use strict";A();Object.defineProperty(Bb,"__esModule",{value:!0});Bb.PACKAGE_NAME=Bb.PACKAGE_VERSION=void 0;Bb.PACKAGE_VERSION="0.58.0";Bb.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var vDe=Q(NQ=>{"use strict";A();Object.defineProperty(NQ,"__esModule",{value:!0});NQ.LruMemoizerInstrumentation=void 0;var IDe=(Le(),we(Je)),CDe=Xt(),bDe=TDe(),C7=class extends CDe.InstrumentationBase{constructor(t={}){super(bDe.PACKAGE_NAME,bDe.PACKAGE_VERSION,t)}init(){return[new CDe.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <4"],t=>{let n=function(){let r=t.apply(this,arguments);return function(){let o=[...arguments],i=o.pop(),a=typeof i=="function"?IDe.context.bind(IDe.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};NQ.LruMemoizerInstrumentation=C7});var RDe=Q(OQ=>{"use strict";A();Object.defineProperty(OQ,"__esModule",{value:!0});OQ.LruMemoizerInstrumentation=void 0;var kgt=vDe();Object.defineProperty(OQ,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return kgt.LruMemoizerInstrumentation}})});var DDe,xDe,BDe,Ugt,NDe,ODe=O(()=>{A();DDe=ie(RDe(),1);fr();xDe="LruMemoizer",BDe=it(xDe,()=>new DDe.LruMemoizerInstrumentation),Ugt=()=>({name:xDe,setupOnce(){BDe()}}),NDe=Ugt});var wDe=Q(To=>{"use strict";A();Object.defineProperty(To,"__esModule",{value:!0});To.METRIC_DB_CLIENT_CONNECTIONS_USAGE=To.DB_SYSTEM_VALUE_MONGODB=To.DB_SYSTEM_NAME_VALUE_MONGODB=To.ATTR_NET_PEER_PORT=To.ATTR_NET_PEER_NAME=To.ATTR_DB_SYSTEM=To.ATTR_DB_STATEMENT=To.ATTR_DB_OPERATION=To.ATTR_DB_NAME=To.ATTR_DB_MONGODB_COLLECTION=To.ATTR_DB_CONNECTION_STRING=void 0;To.ATTR_DB_CONNECTION_STRING="db.connection_string";To.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";To.ATTR_DB_NAME="db.name";To.ATTR_DB_OPERATION="db.operation";To.ATTR_DB_STATEMENT="db.statement";To.ATTR_DB_SYSTEM="db.system";To.ATTR_NET_PEER_NAME="net.peer.name";To.ATTR_NET_PEER_PORT="net.peer.port";To.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";To.DB_SYSTEM_VALUE_MONGODB="mongodb";To.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var MDe=Q(VB=>{"use strict";A();Object.defineProperty(VB,"__esModule",{value:!0});VB.MongodbCommandType=void 0;var Lgt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(Lgt=VB.MongodbCommandType||(VB.MongodbCommandType={}))});var PDe=Q(Nb=>{"use strict";A();Object.defineProperty(Nb,"__esModule",{value:!0});Nb.PACKAGE_NAME=Nb.PACKAGE_VERSION=void 0;Nb.PACKAGE_VERSION="0.67.0";Nb.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var LDe=Q(wQ=>{"use strict";A();Object.defineProperty(wQ,"__esModule",{value:!0});wQ.MongoDBInstrumentation=void 0;var Qo=(Le(),we(Je)),Wn=Xt(),qm=($n(),we(Nr)),hl=wDe(),CS=MDe(),kDe=PDe(),UDe={requireParentSpan:!0},b7=class e extends Wn.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(kDe.PACKAGE_NAME,kDe.PACKAGE_VERSION,{...UDe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Wn.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Wn.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...UDe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(hl.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:a,v4UnpatchConnection:c}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:d,v4UnpatchConnectionPool:m}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:y}=this._getV4SessionsPatches();return[new Wn.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new Wn.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new Wn.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new Wn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new Wn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new Wn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],d,m),new Wn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new Wn.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,y)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,Wn.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,Wn.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,Wn.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,Wn.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,Wn.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,Wn.isWrapped)(t.getMore)&&this._unwrap(t,"getMore"),this._wrap(t,"getMore",this._getV3PatchCursor()),t),v3UnpatchConnection:t=>{t!==void 0&&(this._unwrap(t,"insert"),this._unwrap(t,"remove"),this._unwrap(t,"update"),this._unwrap(t,"command"),this._unwrap(t,"query"),this._unwrap(t,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:t=>((0,Wn.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,Wn.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,Wn.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,Wn.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let o=this.sessions.length,i=n.call(this),a=this.sessions.length;return o===a?t._connCountAdd(1,t._poolName,"used"):o-1===a&&(t._connCountAdd(-1,t._poolName,"idle"),t._connCountAdd(1,t._poolName,"used")),i}}_getV4ReleaseCommand(){let t=this;return n=>function(o){let i=n.call(this,o);return t._connCountAdd(-1,t._poolName,"used"),t._connCountAdd(1,t._poolName,"idle"),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:t=>{let n=t.ConnectionPool.prototype;return(0,Wn.isWrapped)(n.checkOut)&&this._unwrap(n,"checkOut"),this._wrap(n,"checkOut",this._getV4ConnectionPoolCheckOut()),t},v4UnpatchConnectionPool:t=>{t!==void 0&&this._unwrap(t.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:t=>((0,Wn.isWrapped)(t.connect)&&this._unwrap(t,"connect"),this._wrap(t,"connect",this._getV4ConnectCommand()),t),v4UnpatchConnect:t=>{t!==void 0&&this._unwrap(t,"connect")}}}_getV4ConnectionPoolCheckOut(){return t=>function(r){let o=Qo.context.bind(Qo.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let c=n.call(this,o);return c&&typeof c.then=="function"&&c.then(()=>t.setPoolName(o),()=>{}),c}let a=function(c,d){if(c||!d){i(c,d);return}t.setPoolName(o),i(c,d)};return n.call(this,o,a)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,Wn.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,Wn.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,a,c,d,m){let h=Qo.trace.getSpan(Qo.context.active()),y=n._checkSkipInstrumentation(h),S=typeof d=="function"?d:m;if(y||typeof S!="function"||typeof c!="object")return typeof d=="function"?r.call(this,i,a,c,d):r.call(this,i,a,c,d,m);let C=n._getV3SpanAttributes(a,i,c[0],t),R=n._spanNameFromAttrs(C),B=n.tracer.startSpan(R,{kind:Qo.SpanKind.CLIENT,attributes:C}),N=n._patchEnd(B,S);return typeof d=="function"?r.call(this,i,a,c,N):r.call(this,i,a,c,d,N)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,a,c,d){let m=Qo.trace.getSpan(Qo.context.active()),h=t._checkSkipInstrumentation(m),y=typeof c=="function"?c:d;if(h||typeof y!="function"||typeof a!="object")return typeof c=="function"?n.call(this,o,i,a,c):n.call(this,o,i,a,c,d);let S=e._getCommandType(a),C=S===CS.MongodbCommandType.UNKNOWN?void 0:S,R=t._getV3SpanAttributes(i,o,a,C),B=t._spanNameFromAttrs(R),N=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R}),M=t._patchEnd(N,y);return typeof c=="function"?n.call(this,o,i,a,M):n.call(this,o,i,a,c,M)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,a,c){let d=Qo.trace.getSpan(Qo.context.active()),m=t._checkSkipInstrumentation(d),h=c,y=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,a,c);let S;if(!m){let R=t._getV4SpanAttributes(this,o,i,y),B=t._spanNameFromAttrs(R);S=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R})}let C=t._patchEnd(S,h,this.id,y);return n.call(this,o,i,a,C)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,a]=o,c=Qo.trace.getSpan(Qo.context.active()),d=t._checkSkipInstrumentation(c),m=Object.keys(a)[0],h=()=>{};if(typeof a!="object"||a.ismaster||a.hello)return n.apply(this,o);let y;if(!d){let R=t._getV4SpanAttributes(this,i,a,m),B=t._spanNameFromAttrs(R);y=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R})}let S=t._patchEnd(y,h,this.id,m),C=n.apply(this,o);return C.then(R=>S(null,R),R=>S(R)),C}}_getV3PatchFind(){let t=this;return n=>function(o,i,a,c,d,m){let h=Qo.trace.getSpan(Qo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof d=="function"?d:m;if(y||typeof S!="function"||typeof a!="object")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,m);let C=t._getV3SpanAttributes(i,o,a,"find"),R=t._spanNameFromAttrs(C),B=t.tracer.startSpan(R,{kind:Qo.SpanKind.CLIENT,attributes:C}),N=t._patchEnd(B,S);return typeof d=="function"?n.call(this,o,i,a,c,N):n.call(this,o,i,a,c,d,N)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,a,c,d,m){let h=Qo.trace.getSpan(Qo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof d=="function"?d:m;if(y||typeof S!="function")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,m);let C=t._getV3SpanAttributes(i,o,a.cmd,"getMore"),R=t._spanNameFromAttrs(C),B=t.tracer.startSpan(R,{kind:Qo.SpanKind.CLIENT,attributes:C}),N=t._patchEnd(B,S);return typeof d=="function"?n.call(this,o,i,a,c,N):n.call(this,o,i,a,c,d,N)}}static _getCommandType(t){return t.createIndexes!==void 0?CS.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?CS.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?CS.MongodbCommandType.IS_MASTER:t.count!==void 0?CS.MongodbCommandType.COUNT:t.aggregate!==void 0?CS.MongodbCommandType.AGGREGATE:CS.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,a;if(t){let d=typeof t.address=="string"?t.address.split(":"):"";d.length===2&&(i=d[0],a=d[1])}let c;return r?.documents&&r.documents[0]?c=r.documents[0]:r?.cursors?c=r.cursors:c=r,this._getSpanAttributes(n.db,n.collection,i,a,c,o)}_getV3SpanAttributes(t,n,r,o){let i,a;if(n&&n.s&&(i=n.s.options?.host??n.s.host,a=(n.s.options?.port??n.s.port)?.toString(),i==null||a==null)){let h=n.description?.address;if(h){let y=h.split(":");i=y[0],a=y[1]}}let[c,d]=t.toString().split("."),m=r?.query??r?.q??r;return this._getSpanAttributes(c,d,i,a,m,o)}_getSpanAttributes(t,n,r,o,i,a){let c={};if(this._dbSemconvStability&Wn.SemconvStability.OLD&&(c[hl.ATTR_DB_SYSTEM]=hl.DB_SYSTEM_VALUE_MONGODB,c[hl.ATTR_DB_NAME]=t,c[hl.ATTR_DB_MONGODB_COLLECTION]=n,c[hl.ATTR_DB_OPERATION]=a,c[hl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&Wn.SemconvStability.STABLE&&(c[qm.ATTR_DB_SYSTEM_NAME]=hl.DB_SYSTEM_NAME_VALUE_MONGODB,c[qm.ATTR_DB_NAMESPACE]=t,c[qm.ATTR_DB_OPERATION_NAME]=a,c[qm.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&Wn.SemconvStability.OLD&&(c[hl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&Wn.SemconvStability.STABLE&&(c[qm.ATTR_SERVER_ADDRESS]=r);let d=parseInt(o,10);isNaN(d)||(this._netSemconvStability&Wn.SemconvStability.OLD&&(c[hl.ATTR_NET_PEER_PORT]=d),this._netSemconvStability&Wn.SemconvStability.STABLE&&(c[qm.ATTR_SERVER_PORT]=d))}if(i){let{dbStatementSerializer:d}=this.getConfig(),m=typeof d=="function"?d:this._defaultDbStatementSerializer.bind(this);(0,Wn.safeExecuteInTheMiddle)(()=>{let h=m(i);this._dbSemconvStability&Wn.SemconvStability.OLD&&(c[hl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&Wn.SemconvStability.STABLE&&(c[qm.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return c}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&Wn.SemconvStability.STABLE?n=[t[qm.ATTR_DB_OPERATION_NAME],t[qm.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||hl.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[hl.ATTR_DB_OPERATION]||"command"}`,n}_getDefaultDbStatementReplacer(){let t=new WeakSet;return(n,r)=>typeof r!="object"||!r?"?":t.has(r)?"[Circular]":(t.add(r),r)}_defaultDbStatementSerializer(t){let{enhancedDatabaseReporting:n}=this.getConfig();return n?JSON.stringify(t):JSON.stringify(t,this._getDefaultDbStatementReplacer())}_handleExecutionResult(t,n){let{responseHook:r}=this.getConfig();typeof r=="function"&&(0,Wn.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=Qo.context.active(),a=this,c=!1;return function(...m){if(!c){c=!0;let h=m[0];if(t){if(h instanceof Error)t.setStatus({code:Qo.SpanStatusCode.ERROR,message:h.message});else{let y=m[1];a._handleExecutionResult(t,y)}t.end()}o==="endSessions"&&a._connCountAdd(-1,a._poolName,"idle")}return Qo.context.with(i,()=>n.apply(this,m))}}setPoolName(t){let n=t.hostAddress?.host,r=t.hostAddress?.port,o=t.dbName,i=`mongodb://${n}:${r}/${o}`;this._poolName=i}_checkSkipInstrumentation(t){return this.getConfig().requireParentSpan===!0&&t===void 0}};wQ.MongoDBInstrumentation=b7});var QDe=Q(qB=>{"use strict";A();Object.defineProperty(qB,"__esModule",{value:!0});qB.MongodbCommandType=void 0;var Qgt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(Qgt=qB.MongodbCommandType||(qB.MongodbCommandType={}))});var FDe=Q(Ob=>{"use strict";A();Object.defineProperty(Ob,"__esModule",{value:!0});Ob.MongodbCommandType=Ob.MongoDBInstrumentation=void 0;var Fgt=LDe();Object.defineProperty(Ob,"MongoDBInstrumentation",{enumerable:!0,get:function(){return Fgt.MongoDBInstrumentation}});var Ggt=QDe();Object.defineProperty(Ob,"MongodbCommandType",{enumerable:!0,get:function(){return Ggt.MongodbCommandType}})});function jgt(e){let t=v7(e);return JSON.stringify(t)}function v7(e){if(Array.isArray(e))return e.map(t=>v7(t));if(Hgt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,v7(r)]).reduce((n,r)=>($gt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function Hgt(e){return typeof e=="object"&&e!==null&&!zgt(e)}function zgt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function $gt(e){return Array.isArray(e)}var GDe,jDe,HDe,Vgt,zDe,$De=O(()=>{A();GDe=ie(FDe(),1);fr();jDe="Mongo",HDe=it(jDe,()=>new GDe.MongoDBInstrumentation({dbStatementSerializer:jgt,responseHook(e){Or(e,"auto.db.otel.mongo")}}));Vgt=()=>({name:jDe,setupOnce(){HDe()}}),zDe=Vgt});var R7=Q(Gi=>{"use strict";A();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.DB_SYSTEM_NAME_VALUE_MONGODB=Gi.ATTR_NET_PEER_PORT=Gi.ATTR_NET_PEER_NAME=Gi.ATTR_DB_USER=Gi.ATTR_DB_SYSTEM=Gi.ATTR_DB_STATEMENT=Gi.ATTR_DB_OPERATION=Gi.ATTR_DB_NAME=Gi.ATTR_DB_MONGODB_COLLECTION=void 0;Gi.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Gi.ATTR_DB_NAME="db.name";Gi.ATTR_DB_OPERATION="db.operation";Gi.ATTR_DB_STATEMENT="db.statement";Gi.ATTR_DB_SYSTEM="db.system";Gi.ATTR_DB_USER="db.user";Gi.ATTR_NET_PEER_NAME="net.peer.name";Gi.ATTR_NET_PEER_PORT="net.peer.port";Gi.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var YDe=Q(d_=>{"use strict";A();Object.defineProperty(d_,"__esModule",{value:!0});d_.handleCallbackResponse=d_.handlePromiseResponse=d_.getAttributesFromCollection=void 0;var VDe=(Le(),we(Je)),KB=Xt(),YB=R7(),MQ=($n(),we(Nr));function qgt(e,t,n){let r={};return t&KB.SemconvStability.OLD&&(r[YB.ATTR_DB_MONGODB_COLLECTION]=e.name,r[YB.ATTR_DB_NAME]=e.conn.name,r[YB.ATTR_DB_USER]=e.conn.user),t&KB.SemconvStability.STABLE&&(r[MQ.ATTR_DB_COLLECTION_NAME]=e.name,r[MQ.ATTR_DB_NAMESPACE]=e.conn.name),n&KB.SemconvStability.OLD&&(r[YB.ATTR_NET_PEER_NAME]=e.conn.host,r[YB.ATTR_NET_PEER_PORT]=e.conn.port),n&KB.SemconvStability.STABLE&&(r[MQ.ATTR_SERVER_ADDRESS]=e.conn.host,r[MQ.ATTR_SERVER_PORT]=e.conn.port),r}d_.getAttributesFromCollection=qgt;function qDe(e,t={}){e.recordException(t),e.setStatus({code:VDe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function D7(e,t,n,r=void 0){n&&(0,KB.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&VDe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Ygt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(D7(t,o,n,r),o)).catch(o=>{throw qDe(t,o),o}).finally(()=>t.end()):(D7(t,e,n,r),t.end(),e)}d_.handlePromiseResponse=Ygt;function Kgt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,m)=>(d?qDe(r,d):D7(r,m,i,a),r.end(),e(d,m)),t.apply(n,o)}d_.handleCallbackResponse=Kgt});var KDe=Q(wb=>{"use strict";A();Object.defineProperty(wb,"__esModule",{value:!0});wb.PACKAGE_NAME=wb.PACKAGE_VERSION=void 0;wb.PACKAGE_VERSION="0.60.0";wb.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var exe=Q(Ec=>{"use strict";A();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.MongooseInstrumentation=Ec._ALREADY_INSTRUMENTED=Ec._STORED_PARENT_SPAN=void 0;var ca=(Le(),we(Je)),Jgt=_r(),x7=YDe(),cs=Xt(),JDe=KDe(),p_=R7(),bS=($n(),we(Nr)),PQ=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Zgt=["remove","count","findOneAndRemove",...PQ],Wgt=["count","findOneAndRemove",...PQ],Xgt=[...PQ];function ZDe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Zgt:e.startsWith("7.")?Wgt:Xgt:PQ}function WDe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function XDe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Ec._STORED_PARENT_SPAN=Symbol("stored-parent-span");Ec._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var B7=class extends cs.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(JDe.PACKAGE_NAME,JDe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,cs.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,cs.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new cs.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,WDe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),XDe(n)&&(this._wrap(r.Model.prototype,"updateOne",this._patchDocumentUpdateMethods("updateOne",n)),this._wrap(r.Model.prototype,"deleteOne",this._patchDocumentUpdateMethods("deleteOne",n))),this._wrap(r.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(r.Aggregate.prototype,"exec",this.patchAggregateExec(n)),ZDe(n).forEach(i=>{this._wrap(r.Query.prototype,i,this.patchAndCaptureSpanContext(i))}),this._wrap(r.Model,"aggregate",this.patchModelAggregate()),this._wrap(r.Model,"insertMany",this.patchModelStatic("insertMany",n)),this._wrap(r.Model,"bulkWrite",this.patchModelStatic("bulkWrite",n)),r}unpatch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t,o=ZDe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,WDe(n)&&this._unwrap(r.Model.prototype,"remove"),XDe(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Ec._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Ec._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Ec._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let m={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,d);r._dbSemconvStability&cs.SemconvStability.OLD&&(m[p_.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&cs.SemconvStability.STABLE&&(m[bS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(y,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,y=c;typeof a=="function"?(m=a,h=void 0,y=void 0):typeof c=="function"&&(m=c,y=void 0);let S={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&cs.SemconvStability.OLD&&(S[p_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&cs.SemconvStability.STABLE&&(S[bS.ATTR_DB_QUERY_TEXT]=N)}let R=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),B=r._handleResponse(R,o,this,arguments,m,n);return B&&typeof B=="object"&&(B[Ec._ALREADY_INSTRUMENTED]=!0),B}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let m={};switch(t){case"insertMany":m.documents=a;break;case"bulkWrite":m.operations=a;break;default:m.document=a;break}c!==void 0&&(m.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let C=y(t,m);r._dbSemconvStability&cs.SemconvStability.OLD&&(h[p_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&cs.SemconvStability.STABLE&&(h[bS.ATTR_DB_QUERY_TEXT]=C)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=ca.trace.getSpan(ca.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Ec._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Ec._STORED_PARENT_SPAN]=ca.trace.getSpan(ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,x7.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&cs.SemconvStability.OLD&&(a[p_.ATTR_DB_OPERATION]=r,a[p_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&cs.SemconvStability.STABLE&&(a[bS.ATTR_DB_OPERATION_NAME]=r,a[bS.ATTR_DB_SYSTEM_NAME]=p_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&cs.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:ca.SpanKind.CLIENT,attributes:a},i?ca.trace.setSpan(ca.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,x7.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,x7.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ca.context.with((0,Jgt.suppressTracing)(ca.context.active()),t):t()}};Ec.MongooseInstrumentation=B7});var txe=Q(kQ=>{"use strict";A();Object.defineProperty(kQ,"__esModule",{value:!0});kQ.MongooseInstrumentation=void 0;var eht=exe();Object.defineProperty(kQ,"MongooseInstrumentation",{enumerable:!0,get:function(){return eht.MongooseInstrumentation}})});var nxe,rxe,oxe,tht,ixe,axe=O(()=>{A();nxe=ie(txe(),1);fr();rxe="Mongoose",oxe=it(rxe,()=>new nxe.MongooseInstrumentation({responseHook(e){Or(e,"auto.db.otel.mongoose")}})),tht=()=>({name:rxe,setupOnce(){oxe()}}),ixe=tht});var sxe=Q(ji=>{"use strict";A();Object.defineProperty(ji,"__esModule",{value:!0});ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ji.DB_SYSTEM_VALUE_MYSQL=ji.ATTR_NET_PEER_PORT=ji.ATTR_NET_PEER_NAME=ji.ATTR_DB_USER=ji.ATTR_DB_SYSTEM=ji.ATTR_DB_STATEMENT=ji.ATTR_DB_NAME=ji.ATTR_DB_CONNECTION_STRING=void 0;ji.ATTR_DB_CONNECTION_STRING="db.connection_string";ji.ATTR_DB_NAME="db.name";ji.ATTR_DB_STATEMENT="db.statement";ji.ATTR_DB_SYSTEM="db.system";ji.ATTR_DB_USER="db.user";ji.ATTR_NET_PEER_NAME="net.peer.name";ji.ATTR_NET_PEER_PORT="net.peer.port";ji.DB_SYSTEM_VALUE_MYSQL="mysql";ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var uxe=Q(JB=>{"use strict";A();Object.defineProperty(JB,"__esModule",{value:!0});JB.AttributeNames=void 0;var nht;(function(e){e.MYSQL_VALUES="db.mysql.values"})(nht=JB.AttributeNames||(JB.AttributeNames={}))});var cxe=Q(Qs=>{"use strict";A();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.getPoolNameOld=Qs.arrayStringifyHelper=Qs.getSpanName=Qs.getDbValues=Qs.getDbQueryText=Qs.getJDBCString=Qs.getConfig=void 0;function rht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Qs.getConfig=rht;function oht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Qs.getJDBCString=oht;function iht(e){return typeof e=="string"?e:e.sql}Qs.getDbQueryText=iht;function aht(e,t){return N7(typeof e=="string"?t:t||e.values)}Qs.getDbValues=aht;function sht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Qs.getSpanName=sht;function N7(e){return e?`[${e.toString()}]`:""}Qs.arrayStringifyHelper=N7;function uht(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}Qs.getPoolNameOld=uht});var lxe=Q(Mb=>{"use strict";A();Object.defineProperty(Mb,"__esModule",{value:!0});Mb.PACKAGE_NAME=Mb.PACKAGE_VERSION=void 0;Mb.PACKAGE_VERSION="0.60.0";Mb.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var pxe=Q(UQ=>{"use strict";A();Object.defineProperty(UQ,"__esModule",{value:!0});UQ.MySQLInstrumentation=void 0;var Sc=(Le(),we(Je)),Dd=Xt(),Pb=($n(),we(Nr)),Ym=sxe(),cht=uxe(),vS=cxe(),dxe=lxe(),O7=class extends Dd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(dxe.PACKAGE_NAME,dxe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Dd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Dd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Ym.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new Dd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Dd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Dd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Dd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,m=(0,vS.getPoolNameOld)(t);r._connCountAdd(-d,m,"used"),r._connCountAdd(-c,m,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),m=c[d].pool;r._setPoolCallbacks(m,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Sc.context.active();return function(o,i){i&&((0,Dd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Sc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:m,database:h,user:y}=(0,vS.getConfig)(t.config),S=parseInt(m,10),C=(0,vS.getDbQueryText)(o);r._dbSemconvStability&Dd.SemconvStability.OLD&&(c[Ym.ATTR_DB_SYSTEM]=Ym.DB_SYSTEM_VALUE_MYSQL,c[Ym.ATTR_DB_CONNECTION_STRING]=(0,vS.getJDBCString)(d,m,h),c[Ym.ATTR_DB_NAME]=h,c[Ym.ATTR_DB_USER]=y,c[Ym.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Dd.SemconvStability.STABLE&&(c[Pb.ATTR_DB_SYSTEM_NAME]=Pb.DB_SYSTEM_NAME_VALUE_MYSQL,c[Pb.ATTR_DB_NAMESPACE]=h,c[Pb.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&Dd.SemconvStability.OLD&&(c[Ym.ATTR_NET_PEER_NAME]=d,isNaN(S)||(c[Ym.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&Dd.SemconvStability.STABLE&&(c[Pb.ATTR_SERVER_ADDRESS]=d,isNaN(S)||(c[Pb.ATTR_SERVER_PORT]=S));let R=r.tracer.startSpan((0,vS.getSpanName)(o),{kind:Sc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let M;Array.isArray(i)?M=i:arguments[2]&&(M=[i]),R.setAttribute(cht.AttributeNames.MYSQL_VALUES,(0,vS.getDbValues)(o,M))}let B=Array.from(arguments).findIndex(M=>typeof M=="function"),N=Sc.context.active();if(B===-1){let M=Sc.context.with(Sc.trace.setSpan(Sc.context.active(),R),()=>n.apply(t,arguments));return Sc.context.bind(N,M),M.on("error",F=>R.setStatus({code:Sc.SpanStatusCode.ERROR,message:F.message})).on("end",()=>{R.end()})}else return r._wrap(arguments,B,r._patchCallbackQuery(R,N)),Sc.context.with(Sc.trace.setSpan(Sc.context.active(),R),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Sc.SpanStatusCode.ERROR,message:o.message}),t.end(),Sc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,vS.getPoolNameOld)(t);t.on("connection",o=>{this._connCountAdd(1,r,"idle")}),t.on("acquire",o=>{this._connCountAdd(-1,r,"idle"),this._connCountAdd(1,r,"used")}),t.on("release",o=>{this._connCountAdd(1,r,"idle"),this._connCountAdd(-1,r,"used")})}};UQ.MySQLInstrumentation=O7});var fxe=Q(LQ=>{"use strict";A();Object.defineProperty(LQ,"__esModule",{value:!0});LQ.MySQLInstrumentation=void 0;var lht=pxe();Object.defineProperty(LQ,"MySQLInstrumentation",{enumerable:!0,get:function(){return lht.MySQLInstrumentation}})});var Axe,mxe,gxe,dht,hxe,_xe=O(()=>{A();Axe=ie(fxe(),1);fr();mxe="Mysql",gxe=it(mxe,()=>new Axe.MySQLInstrumentation({})),dht=()=>({name:mxe,setupOnce(){gxe()}}),hxe=dht});var w7=Q(Ma=>{"use strict";A();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.DB_SYSTEM_VALUE_MYSQL=Ma.ATTR_NET_PEER_PORT=Ma.ATTR_NET_PEER_NAME=Ma.ATTR_DB_USER=Ma.ATTR_DB_SYSTEM=Ma.ATTR_DB_STATEMENT=Ma.ATTR_DB_NAME=Ma.ATTR_DB_CONNECTION_STRING=void 0;Ma.ATTR_DB_CONNECTION_STRING="db.connection_string";Ma.ATTR_DB_NAME="db.name";Ma.ATTR_DB_STATEMENT="db.statement";Ma.ATTR_DB_SYSTEM="db.system";Ma.ATTR_DB_USER="db.user";Ma.ATTR_NET_PEER_NAME="net.peer.name";Ma.ATTR_NET_PEER_PORT="net.peer.port";Ma.DB_SYSTEM_VALUE_MYSQL="mysql"});var P7=Q(QQ=>{"use strict";A();Object.defineProperty(QQ,"__esModule",{value:!0});QQ.addSqlCommenterComment=void 0;var M7=(Le(),we(Je)),pht=_r();function fht(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Aht(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function mht(e,t){if(typeof t!="string"||t.length===0||fht(t))return t;let n=new pht.W3CTraceContextPropagator,r={};n.inject(M7.trace.setSpan(M7.ROOT_CONTEXT,e),r,M7.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=Aht(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}QQ.addSqlCommenterComment=mht});var Exe=Q(xd=>{"use strict";A();Object.defineProperty(xd,"__esModule",{value:!0});xd.getConnectionPrototypeToInstrument=xd.once=xd.getSpanName=xd.getQueryText=xd.getConnectionAttributes=void 0;var ZB=w7(),FQ=Xt(),k7=($n(),we(Nr));function ght(e,t,n){let{host:r,port:o,database:i,user:a}=hht(e),c={};t&FQ.SemconvStability.OLD&&(c[ZB.ATTR_DB_CONNECTION_STRING]=_ht(r,o,i),c[ZB.ATTR_DB_NAME]=i,c[ZB.ATTR_DB_USER]=a),t&FQ.SemconvStability.STABLE&&(c[k7.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&FQ.SemconvStability.OLD&&(c[ZB.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[ZB.ATTR_NET_PEER_PORT]=d)),n&FQ.SemconvStability.STABLE&&(c[k7.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[k7.ATTR_SERVER_PORT]=d)),c}xd.getConnectionAttributes=ght;function hht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function _ht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Eht(e,t,n,r=!1,o=Sht){let[i,a]=typeof e=="string"?[e,n]:[e.sql,yht(e)?n||e.values:n];try{return r?o(i):t&&a?t(i,a):i}catch{return"Could not determine the query due to an error in masking or formatting"}}xd.getQueryText=Eht;function Sht(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function yht(e){return"values"in e}function Tht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}xd.getSpanName=Tht;var Iht=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};xd.once=Iht;function Cht(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}xd.getConnectionPrototypeToInstrument=Cht});var Sxe=Q(kb=>{"use strict";A();Object.defineProperty(kb,"__esModule",{value:!0});kb.PACKAGE_NAME=kb.PACKAGE_VERSION=void 0;kb.PACKAGE_VERSION="0.60.0";kb.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var Cxe=Q(GQ=>{"use strict";A();Object.defineProperty(GQ,"__esModule",{value:!0});GQ.MySQL2Instrumentation=void 0;var yxe=(Le(),we(Je)),jp=Xt(),U7=w7(),Txe=P7(),Ub=Exe(),Ixe=Sxe(),L7=($n(),we(Nr)),Q7=[">=1.4.2 <4"],F7=class extends jp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Ixe.PACKAGE_NAME,Ixe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,jp.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,jp.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new jp.InstrumentationNodeModuleDefinition("mysql2",Q7,i=>(n(i),i),()=>{},[new jp.InstrumentationNodeModuleFile("mysql2/promise.js",Q7,i=>(n(i),i),()=>{}),new jp.InstrumentationNodeModuleFile("mysql2/lib/connection.js",Q7,i=>{let a=(0,Ub.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Ub.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:m,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,Ub.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Ub.getQueryText)(i,t,d,m,h);o._dbSemconvStability&jp.SemconvStability.OLD&&(S[U7.ATTR_DB_SYSTEM]=U7.DB_SYSTEM_VALUE_MYSQL,S[U7.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&jp.SemconvStability.STABLE&&(S[L7.ATTR_DB_SYSTEM_NAME]=L7.DB_SYSTEM_NAME_VALUE_MYSQL,S[L7.ATTR_DB_QUERY_TEXT]=C);let R=o.tracer.startSpan((0,Ub.getSpanName)(i),{kind:yxe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,Txe.addSqlCommenterComment)(R,i):Object.assign(i,{sql:(0,Txe.addSqlCommenterComment)(R,i.sql)}));let B=(0,Ub.once)((N,M)=>{N?R.setStatus({code:yxe.SpanStatusCode.ERROR,message:N.message}):typeof y=="function"&&(0,jp.safeExecuteInTheMiddle)(()=>{y(R,{queryResults:M})},F=>{F&&o._diag.warn("Failed executing responseHook",F)},!0),R.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(B));let N=r.apply(this,arguments);return N.once("error",M=>{B(M)}).once("result",M=>{B(void 0,M)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(B)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(B)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};GQ.MySQL2Instrumentation=F7});var bxe=Q(jQ=>{"use strict";A();Object.defineProperty(jQ,"__esModule",{value:!0});jQ.MySQL2Instrumentation=void 0;var bht=Cxe();Object.defineProperty(jQ,"MySQL2Instrumentation",{enumerable:!0,get:function(){return bht.MySQL2Instrumentation}})});var vxe,Rxe,Dxe,vht,xxe,Bxe=O(()=>{A();vxe=ie(bxe(),1);fr();Rxe="Mysql2",Dxe=it(Rxe,()=>new vxe.MySQL2Instrumentation({responseHook(e){Or(e,"auto.db.otel.mysql2")}})),vht=()=>({name:Rxe,setupOnce(){Dxe()}}),xxe=vht});var Nxe=Q(Fs=>{"use strict";A();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.DB_SYSTEM_VALUE_REDIS=Fs.DB_SYSTEM_NAME_VALUE_REDIS=Fs.ATTR_NET_PEER_PORT=Fs.ATTR_NET_PEER_NAME=Fs.ATTR_DB_SYSTEM=Fs.ATTR_DB_STATEMENT=Fs.ATTR_DB_CONNECTION_STRING=void 0;Fs.ATTR_DB_CONNECTION_STRING="db.connection_string";Fs.ATTR_DB_STATEMENT="db.statement";Fs.ATTR_DB_SYSTEM="db.system";Fs.ATTR_NET_PEER_NAME="net.peer.name";Fs.ATTR_NET_PEER_PORT="net.peer.port";Fs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Fs.DB_SYSTEM_VALUE_REDIS="redis"});var Oxe=Q(HQ=>{"use strict";A();Object.defineProperty(HQ,"__esModule",{value:!0});HQ.endSpan=void 0;var Rht=(Le(),we(Je)),Dht=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:Rht.SpanStatusCode.ERROR,message:t.message})),e.end()};HQ.endSpan=Dht});var $Q=Q(zQ=>{"use strict";A();Object.defineProperty(zQ,"__esModule",{value:!0});zQ.defaultDbStatementSerializer=void 0;var xht=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}],Bht=(e,t)=>{if(Array.isArray(t)&&t.length){let n=xht.find(({regex:o})=>o.test(e))?.args??0,r=n>=0?t.slice(0,n):t;return t.length>r.length&&r.push(`[${t.length-n} other arguments]`),`${e} ${r.join(" ")}`}return e};zQ.defaultDbStatementSerializer=Bht});var wxe=Q(Lb=>{"use strict";A();Object.defineProperty(Lb,"__esModule",{value:!0});Lb.PACKAGE_NAME=Lb.PACKAGE_VERSION=void 0;Lb.PACKAGE_VERSION="0.62.0";Lb.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var Uxe=Q(VQ=>{"use strict";A();Object.defineProperty(VQ,"__esModule",{value:!0});VQ.IORedisInstrumentation=void 0;var f_=(Le(),we(Je)),yc=Xt(),A_=($n(),we(Nr)),Tc=Nxe(),Mxe=Xt(),WB=Oxe(),Nht=$Q(),Pxe=wxe(),kxe={requireParentSpan:!0},G7=class extends yc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Pxe.PACKAGE_NAME,Pxe.PACKAGE_VERSION,{...kxe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,yc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,yc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...kxe,...t})}init(){return[new yc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,yc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,yc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),a=i.dbStatementSerializer||Nht.defaultDbStatementSerializer,c=f_.trace.getSpan(f_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:m,port:h}=this.options,y=a(o.name,o.args);r._dbSemconvStability&yc.SemconvStability.OLD&&(d[Tc.ATTR_DB_SYSTEM]=Tc.DB_SYSTEM_VALUE_REDIS,d[Tc.ATTR_DB_STATEMENT]=y,d[Tc.ATTR_DB_CONNECTION_STRING]=`redis://${m}:${h}`),r._dbSemconvStability&yc.SemconvStability.STABLE&&(d[A_.ATTR_DB_SYSTEM_NAME]=Tc.DB_SYSTEM_NAME_VALUE_REDIS,d[A_.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&yc.SemconvStability.OLD&&(d[Tc.ATTR_NET_PEER_NAME]=m,d[Tc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&yc.SemconvStability.STABLE&&(d[A_.ATTR_SERVER_ADDRESS]=m,d[A_.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:f_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,Mxe.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),R=>{R&&f_.diag.error("ioredis instrumentation: request hook failed",R)},!0);try{let R=t.apply(this,arguments),B=o.resolve;o.resolve=function(M){(0,Mxe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,M),F=>{F&&f_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,WB.endSpan)(S,null),B(M)};let N=o.reject;return o.reject=function(M){(0,WB.endSpan)(S,M),N(M)},R}catch(R){throw(0,WB.endSpan)(S,R),R}}}_traceConnection(t){let n=this;return function(){let r=f_.trace.getSpan(f_.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&yc.SemconvStability.OLD&&(o[Tc.ATTR_DB_SYSTEM]=Tc.DB_SYSTEM_VALUE_REDIS,o[Tc.ATTR_DB_STATEMENT]="connect",o[Tc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&yc.SemconvStability.STABLE&&(o[A_.ATTR_DB_SYSTEM_NAME]=Tc.DB_SYSTEM_NAME_VALUE_REDIS,o[A_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&yc.SemconvStability.OLD&&(o[Tc.ATTR_NET_PEER_NAME]=i,o[Tc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&yc.SemconvStability.STABLE&&(o[A_.ATTR_SERVER_ADDRESS]=i,o[A_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:f_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,WB.endSpan)(c,null),d}catch(d){throw(0,WB.endSpan)(c,d),d}}}};VQ.IORedisInstrumentation=G7});var Lxe=Q(qQ=>{"use strict";A();Object.defineProperty(qQ,"__esModule",{value:!0});qQ.IORedisInstrumentation=void 0;var Oht=Uxe();Object.defineProperty(qQ,"IORedisInstrumentation",{enumerable:!0,get:function(){return Oht.IORedisInstrumentation}})});var YQ=Q(Qb=>{"use strict";A();Object.defineProperty(Qb,"__esModule",{value:!0});Qb.PACKAGE_NAME=Qb.PACKAGE_VERSION=void 0;Qb.PACKAGE_VERSION="0.62.0";Qb.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var Qxe=Q(m_=>{"use strict";A();Object.defineProperty(m_,"__esModule",{value:!0});m_.getTracedCreateStreamTrace=m_.getTracedCreateClient=m_.endSpan=void 0;var XB=(Le(),we(Je)),wht=(e,t)=>{t&&e.setStatus({code:XB.SpanStatusCode.ERROR,message:t.message}),e.end()};m_.endSpan=wht;var Mht=e=>function(){let n=e.apply(this,arguments);return XB.context.bind(XB.context.active(),n)};m_.getTracedCreateClient=Mht;var Pht=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){XB.context.bind(XB.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};m_.getTracedCreateStreamTrace=Pht});var KQ=Q(Gs=>{"use strict";A();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.DB_SYSTEM_VALUE_REDIS=Gs.DB_SYSTEM_NAME_VALUE_REDIS=Gs.ATTR_NET_PEER_PORT=Gs.ATTR_NET_PEER_NAME=Gs.ATTR_DB_SYSTEM=Gs.ATTR_DB_STATEMENT=Gs.ATTR_DB_CONNECTION_STRING=void 0;Gs.ATTR_DB_CONNECTION_STRING="db.connection_string";Gs.ATTR_DB_STATEMENT="db.statement";Gs.ATTR_DB_SYSTEM="db.system";Gs.ATTR_NET_PEER_NAME="net.peer.name";Gs.ATTR_NET_PEER_PORT="net.peer.port";Gs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Gs.DB_SYSTEM_VALUE_REDIS="redis"});var Gxe=Q(ZQ=>{"use strict";A();Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.RedisInstrumentationV2_V3=void 0;var _l=Xt(),JQ=Qxe(),Fxe=YQ(),eN=(Le(),we(Je)),tN=($n(),we(Nr)),RS=KQ(),kht=$Q(),j7=class e extends _l.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(Fxe.PACKAGE_NAME,Fxe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,_l.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,_l.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new _l.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,_l.isWrapped)(t.RedisClient.prototype.internal_send_command)&&this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._wrap(t.RedisClient.prototype,"internal_send_command",this._getPatchInternalSendCommand()),(0,_l.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,_l.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let a=t.getConfig(),c=eN.trace.getSpan(eN.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||kht.defaultDbStatementSerializer,m={};t._semconvStability&_l.SemconvStability.OLD&&Object.assign(m,{[RS.ATTR_DB_SYSTEM]:RS.DB_SYSTEM_VALUE_REDIS,[RS.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&_l.SemconvStability.STABLE&&Object.assign(m,{[tN.ATTR_DB_SYSTEM_NAME]:RS.DB_SYSTEM_NAME_VALUE_REDIS,[tN.ATTR_DB_OPERATION_NAME]:i.command,[tN.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:eN.SpanKind.CLIENT,attributes:m});if(this.connection_options){let S={};t._semconvStability&_l.SemconvStability.OLD&&Object.assign(S,{[RS.ATTR_NET_PEER_NAME]:this.connection_options.host,[RS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&_l.SemconvStability.STABLE&&Object.assign(S,{[tN.ATTR_SERVER_ADDRESS]:this.connection_options.host,[tN.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&_l.SemconvStability.OLD&&h.setAttribute(RS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=eN.context.active();arguments[0].callback=function(R,B){if(a?.responseHook){let N=a.responseHook;(0,_l.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,B)},M=>{M&&t._diag.error("Error executing responseHook",M)},!0)}return(0,JQ.endSpan)(h,R),eN.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,JQ.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,JQ.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,JQ.getTracedCreateStreamTrace)(n)}}};ZQ.RedisInstrumentationV2_V3=j7});var Hxe=Q(WQ=>{"use strict";A();Object.defineProperty(WQ,"__esModule",{value:!0});WQ.getClientAttributes=void 0;var H7=($n(),we(Nr)),Fb=KQ(),jxe=Xt();function Uht(e,t,n){let r={};return n&jxe.SemconvStability.OLD&&Object.assign(r,{[Fb.ATTR_DB_SYSTEM]:Fb.DB_SYSTEM_VALUE_REDIS,[Fb.ATTR_NET_PEER_NAME]:t?.socket?.host,[Fb.ATTR_NET_PEER_PORT]:t?.socket?.port,[Fb.ATTR_DB_CONNECTION_STRING]:Lht(e,t?.url)}),n&jxe.SemconvStability.STABLE&&Object.assign(r,{[H7.ATTR_DB_SYSTEM_NAME]:Fb.DB_SYSTEM_NAME_VALUE_REDIS,[H7.ATTR_SERVER_ADDRESS]:t?.socket?.host,[H7.ATTR_SERVER_PORT]:t?.socket?.port}),r}WQ.getClientAttributes=Uht;function Lht(e,t){if(!(typeof t!="string"||!t))try{let n=new URL(t);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){e.error("failed to sanitize redis connection url",n)}}});var qxe=Q(XQ=>{"use strict";A();Object.defineProperty(XQ,"__esModule",{value:!0});XQ.RedisInstrumentationV4_V5=void 0;var Bd=(Le(),we(Je)),lo=Xt(),zxe=Hxe(),Qht=$Q(),$xe=YQ(),z7=($n(),we(Nr)),Fht=KQ(),nN=Symbol("opentelemetry.instrumentation.redis.open_spans"),Vxe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),$7=class e extends lo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super($xe.PACKAGE_NAME,$xe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,lo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,lo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,lo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,lo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,lo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,lo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new lo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,m){let h=t(d,m).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[nN];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[nN];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let m=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,m,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[Vxe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,a=(0,zxe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Bd.SpanKind.CLIENT,attributes:a});return Bd.context.with(Bd.trace.setSpan(Bd.context.active(),c),()=>r.apply(this)).then(m=>(c.end(),m)).catch(m=>(c.recordException(m),c.setStatus({code:Bd.SpanStatusCode.ERROR,message:m.message}),c.end(),Promise.reject(m)))}}}_traceClientCommand(t,n,r,o){if(Bd.trace.getSpan(Bd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[Vxe],c=o[0],d=o.slice(1),m=this.getConfig().dbStatementSerializer||Qht.defaultDbStatementSerializer,h=(0,zxe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&lo.SemconvStability.STABLE&&(h[z7.ATTR_DB_OPERATION_NAME]=c);try{let C=m(c,d);C!=null&&(this._semconvStability&lo.SemconvStability.OLD&&(h[Fht.ATTR_DB_STATEMENT]=C),this._semconvStability&lo.SemconvStability.STABLE&&(h[z7.ATTR_DB_QUERY_TEXT]=C))}catch(C){this._diag.error("dbStatementSerializer throw an exception",C,{commandName:c})}let y=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:Bd.SpanKind.CLIENT,attributes:h}),S=Bd.context.with(Bd.trace.setSpan(Bd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(C=>{this._endSpanWithResponse(y,c,d,C,void 0)},C=>{this._endSpanWithResponse(y,c,d,null,C)});else{let C=S;C[nN]=C[nN]||[],C[nN].push({span:y,commandName:c,commandArgs:d})}return S}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:m}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&lo.SemconvStability.STABLE&&d.setAttribute(z7.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],m,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Bd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};XQ.RedisInstrumentationV4_V5=$7});var Jxe=Q(e4=>{"use strict";A();Object.defineProperty(e4,"__esModule",{value:!0});e4.RedisInstrumentation=void 0;var Ght=Xt(),Yxe=YQ(),jht=Gxe(),Hht=qxe(),Kxe={requireParentSpan:!1},V7=class extends Ght.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...Kxe,...t};super(Yxe.PACKAGE_NAME,Yxe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new jht.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new Hht.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...Kxe,...t};super.setConfig(n),this.initialized&&(this.instrumentationV2_V3.setConfig(n),this.instrumentationV4_V5.setConfig(n))}init(){}getModuleDefinitions(){return[...this.instrumentationV2_V3.getModuleDefinitions(),...this.instrumentationV4_V5.getModuleDefinitions()]}setTracerProvider(t){super.setTracerProvider(t),this.initialized&&(this.instrumentationV2_V3.setTracerProvider(t),this.instrumentationV4_V5.setTracerProvider(t))}enable(){super.enable(),this.initialized&&(this.instrumentationV2_V3.enable(),this.instrumentationV4_V5.enable())}disable(){super.disable(),this.initialized&&(this.instrumentationV2_V3.disable(),this.instrumentationV4_V5.disable())}};e4.RedisInstrumentation=V7});var Zxe=Q(t4=>{"use strict";A();Object.defineProperty(t4,"__esModule",{value:!0});t4.RedisInstrumentation=void 0;var zht=Jxe();Object.defineProperty(t4,"RedisInstrumentation",{enumerable:!0,get:function(){return zht.RedisInstrumentation}})});function rN(e,t){return e.includes(t.toLowerCase())}function Y7(e){return rN(q7,e)?"cache.get":rN(Vht,e)?"cache.put":void 0}function qht(e,t){return t.some(n=>e.startsWith(n))}function Xxe(e,t){try{if(t.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?Wxe(o.map(i=>n(i))):["<unknown>"],r=t[0];return rN($ht,e)&&r!=null?n(r):Wxe(t.map(o=>n(o)))}catch{return}}function e1e(e,t,n){if(!Y7(e))return!1;for(let r of t)if(qht(r,n))return!0;return!1}function t1e(e){let t=n=>{try{return Buffer.isBuffer(n)?n.byteLength:typeof n=="string"?n.length:typeof n=="number"?n.toString().length:n==null?0:JSON.stringify(n).length}catch{return}};return Array.isArray(e)?e.reduce((n,r)=>{let o=t(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):t(e)}function Wxe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var $ht,q7,Vht,n1e=O(()=>{A();$ht=["get","set","setex"],q7=["get","mget"],Vht=["set","setex"]});var r1e,o1e,n4,oN,i1e,Yht,Kht,a1e,Jht,s1e,u1e=O(()=>{A();r1e=ie(Lxe(),1),o1e=ie(Zxe(),1);dt();fr();n1e();n4="Redis",oN={},i1e=(e,t,n,r)=>{e.setAttribute(Nt,"auto.db.otel.redis");let o=Xxe(t,n),i=Y7(t);if(!o||!i||!oN.cachePrefixes||!e1e(t,o,oN.cachePrefixes))return;let a=xt(e).data["net.peer.name"],c=xt(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=t1e(r);d&&e.setAttribute(g$,d),rN(q7,t)&&d!==void 0&&e.setAttribute(A$,d>0),e.setAttributes({[Yt]:i,[m$]:o});let m=o.join(", ");e.updateName(oN.maxCacheKeyLength?xh(m,oN.maxCacheKeyLength):m)},Yht=it(`${n4}.IORedis`,()=>new r1e.IORedisInstrumentation({responseHook:i1e})),Kht=it(`${n4}.Redis`,()=>new o1e.RedisInstrumentation({responseHook:i1e})),a1e=Object.assign(()=>{Yht(),Kht()},{id:n4}),Jht=(e={})=>({name:n4,setupOnce(){oN=e,a1e()}}),s1e=Jht});var c1e=Q(r4=>{"use strict";A();Object.defineProperty(r4,"__esModule",{value:!0});r4.EVENT_LISTENERS_SET=void 0;r4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var K7=Q(iN=>{"use strict";A();Object.defineProperty(iN,"__esModule",{value:!0});iN.AttributeNames=void 0;var Zht;(function(e){e.PG_VALUES="db.postgresql.values",e.PG_PLAN="db.postgresql.plan",e.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",e.MAX_CLIENT="db.postgresql.max.client"})(Zht=iN.AttributeNames||(iN.AttributeNames={}))});var J7=Q(Cr=>{"use strict";A();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Cr.METRIC_DB_CLIENT_CONNECTION_COUNT=Cr.DB_SYSTEM_VALUE_POSTGRESQL=Cr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Cr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Cr.ATTR_NET_PEER_PORT=Cr.ATTR_NET_PEER_NAME=Cr.ATTR_DB_USER=Cr.ATTR_DB_SYSTEM=Cr.ATTR_DB_STATEMENT=Cr.ATTR_DB_NAME=Cr.ATTR_DB_CONNECTION_STRING=Cr.ATTR_DB_CLIENT_CONNECTION_STATE=Cr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Cr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Cr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Cr.ATTR_DB_CONNECTION_STRING="db.connection_string";Cr.ATTR_DB_NAME="db.name";Cr.ATTR_DB_STATEMENT="db.statement";Cr.ATTR_DB_SYSTEM="db.system";Cr.ATTR_DB_USER="db.user";Cr.ATTR_NET_PEER_NAME="net.peer.name";Cr.ATTR_NET_PEER_PORT="net.peer.port";Cr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Cr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Cr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Cr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Cr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var Z7=Q(aN=>{"use strict";A();Object.defineProperty(aN,"__esModule",{value:!0});aN.SpanNames=void 0;var Wht;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Wht=aN.SpanNames||(aN.SpanNames={}))});var g1e=Q(Xn=>{"use strict";A();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.sanitizedErrorMessage=Xn.isObjectWithTextString=Xn.getErrorMessage=Xn.patchClientConnectCallback=Xn.patchCallbackPGPool=Xn.updateCounter=Xn.getPoolName=Xn.patchCallback=Xn.handleExecutionResult=Xn.handleConfigQuery=Xn.shouldSkipInstrumentation=Xn.getSemanticAttributesFromPoolConnection=Xn.getSemanticAttributesFromConnection=Xn.getConnectionString=Xn.parseAndMaskConnectionString=Xn.parseNormalizedOperationName=Xn.getQuerySpanName=void 0;var g_=(Le(),we(Je)),o4=K7(),Nd=($n(),we(Nr)),ri=J7(),DS=Xt(),l1e=Z7();function d1e(e,t){if(!t)return l1e.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:p1e(t.text);return`${l1e.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}Xn.getQuerySpanName=d1e;function p1e(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}Xn.parseNormalizedOperationName=p1e;function f1e(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}Xn.parseAndMaskConnectionString=f1e;function W7(e){if("connectionString"in e&&e.connectionString)return f1e(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}Xn.getConnectionString=W7;function i4(e){if(Number.isInteger(e))return e}function A1e(e,t){let n={};return t&DS.SemconvStability.OLD&&(n={...n,[ri.ATTR_DB_SYSTEM]:ri.DB_SYSTEM_VALUE_POSTGRESQL,[ri.ATTR_DB_NAME]:e.database,[ri.ATTR_DB_CONNECTION_STRING]:W7(e),[ri.ATTR_DB_USER]:e.user,[ri.ATTR_NET_PEER_NAME]:e.host,[ri.ATTR_NET_PEER_PORT]:i4(e.port)}),t&DS.SemconvStability.STABLE&&(n={...n,[Nd.ATTR_DB_SYSTEM_NAME]:Nd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Nd.ATTR_DB_NAMESPACE]:e.namespace,[Nd.ATTR_SERVER_ADDRESS]:e.host,[Nd.ATTR_SERVER_PORT]:i4(e.port)}),n}Xn.getSemanticAttributesFromConnection=A1e;function Xht(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[o4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[o4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&DS.SemconvStability.OLD&&(r={...r,[ri.ATTR_DB_SYSTEM]:ri.DB_SYSTEM_VALUE_POSTGRESQL,[ri.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[ri.ATTR_DB_CONNECTION_STRING]:W7(e),[ri.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[ri.ATTR_NET_PEER_PORT]:Number(n?.port)||i4(e.port),[ri.ATTR_DB_USER]:n?.username??e.user}),t&DS.SemconvStability.STABLE&&(r={...r,[Nd.ATTR_DB_SYSTEM_NAME]:Nd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Nd.ATTR_DB_NAMESPACE]:e.namespace,[Nd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Nd.ATTR_SERVER_PORT]:Number(n?.port)||i4(e.port)}),r}Xn.getSemanticAttributesFromPoolConnection=Xht;function e_t(e){return e.requireParentSpan===!0&&g_.trace.getSpan(g_.context.active())===void 0}Xn.shouldSkipInstrumentation=e_t;function t_t(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=d1e(i,r),c=e.startSpan(a,{kind:g_.SpanKind.CLIENT,attributes:A1e(o,n)});if(!r)return c;if(r.text&&(n&DS.SemconvStability.OLD&&c.setAttribute(ri.ATTR_DB_STATEMENT,r.text),n&DS.SemconvStability.STABLE&&c.setAttribute(Nd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(m=>m==null?"null":m instanceof Buffer?m.toString():typeof m=="object"?typeof m.toPostgres=="function"?m.toPostgres():JSON.stringify(m):m.toString());c.setAttribute(o4.AttributeNames.PG_VALUES,d)}catch(d){g_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(o4.AttributeNames.PG_PLAN,r.name),c}Xn.handleConfigQuery=t_t;function m1e(e,t,n){typeof e.responseHook=="function"&&(0,DS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&g_.diag.error("Error running response hook",r)},!0)}Xn.handleExecutionResult=m1e;function n_t(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Nd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(a4(a)),t.setStatus({code:g_.SpanStatusCode.ERROR,message:a.message})):m1e(e,t,c),o(),t.end(),n.call(this,a,c)}}Xn.patchCallback=n_t;function r_t(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}Xn.getPoolName=r_t;function o_t(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[ri.ATTR_DB_CLIENT_CONNECTION_STATE]:ri.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[ri.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[ri.ATTR_DB_CLIENT_CONNECTION_STATE]:ri.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[ri.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[ri.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}Xn.updateCounter=o_t;function i_t(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(a4(r)),e.setStatus({code:g_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}Xn.patchCallbackPGPool=i_t;function a_t(e,t){return function(r){r&&(r instanceof Error&&e.recordException(a4(r)),e.setStatus({code:g_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}Xn.patchClientConnectCallback=a_t;function s_t(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}Xn.getErrorMessage=s_t;function u_t(e){return typeof e=="object"&&typeof e?.text=="string"}Xn.isObjectWithTextString=u_t;function a4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}Xn.sanitizedErrorMessage=a4});var h1e=Q(Gb=>{"use strict";A();Object.defineProperty(Gb,"__esModule",{value:!0});Gb.PACKAGE_NAME=Gb.PACKAGE_VERSION=void 0;Gb.PACKAGE_VERSION="0.66.0";Gb.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var I1e=Q(u4=>{"use strict";A();Object.defineProperty(u4,"__esModule",{value:!0});u4.PgInstrumentation=void 0;var bu=Xt(),Mr=(Le(),we(Je)),_1e=c1e(),Fo=g1e(),E1e=P7(),S1e=h1e(),y1e=Z7(),s4=_r(),Hp=($n(),we(Nr)),sN=J7();function jb(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var X7=class extends bu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(S1e.PACKAGE_NAME,S1e.PACKAGE_VERSION,t),this._semconvStability=(0,bu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Hp.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Mr.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(sN.METRIC_DB_CLIENT_CONNECTION_COUNT,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"}),this._connectionPendingRequests=this.meter.createUpDownCounter(sN.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new bu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new bu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new bu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=jb(c);return this._patchPgClient(d.Client),c},c=>{let d=jb(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new bu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=jb(c);return(0,bu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=jb(c);(0,bu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=jb(t);return(0,bu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,bu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=jb(t);return(0,bu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,bu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(y1e.SpanNames.CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchClientConnectCallback(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return T1e(a,c)}}recordOperationDuration(t,n){let r={},o=[Hp.ATTR_DB_NAMESPACE,Hp.ATTR_ERROR_TYPE,Hp.ATTR_SERVER_PORT,Hp.ATTR_SERVER_ADDRESS,Hp.ATTR_DB_OPERATION_NAME];this._semconvStability&bu.SemconvStability.OLD&&o.push(sN.ATTR_DB_SYSTEM),this._semconvStability&bu.SemconvStability.STABLE&&o.push(Hp.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,s4.hrTimeToMilliseconds)((0,s4.hrTimeDuration)(n,(0,s4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Fo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,s4.hrTime)(),a=o[0],c=typeof a=="string",d=Fo.isObjectWithTextString(a),m=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[sN.ATTR_DB_SYSTEM]:sN.DB_SYSTEM_VALUE_POSTGRESQL,[Hp.ATTR_DB_NAMESPACE]:this.database,[Hp.ATTR_SERVER_PORT]:this.connectionParameters.port,[Hp.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};m?.text&&(h[Hp.ATTR_DB_OPERATION_NAME]=Fo.parseNormalizedOperationName(m?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),C=Fo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,m);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,E1e.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,E1e.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Mr.trace.getSpan(Mr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Fo.patchCallback(S,C,o[o.length-1],h,y),N&&(o[o.length-1]=Mr.context.bind(Mr.context.active(),o[o.length-1]));else if(typeof m?.callback=="function"){let M=Fo.patchCallback(t.getConfig(),C,m.callback,h,y);N&&(M=Mr.context.bind(Mr.context.active(),M)),o[0].callback=M}}let{requestHook:R}=S;typeof R=="function"&&m&&(0,bu.safeExecuteInTheMiddle)(()=>{let{database:N,host:M,port:F,user:H}=this.connectionParameters;R(C,{connection:{database:N,host:M,port:F,user:H},query:{text:m.text,values:m.values,name:m.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let B;try{B=n.apply(this,o)}catch(N){throw N instanceof Error&&C.recordException(Fo.sanitizedErrorMessage(N)),C.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(N)}),C.end(),N}return B instanceof Promise?B.then(N=>new Promise(M=>{Fo.handleExecutionResult(t.getConfig(),C,N),y(),C.end(),M(N)})).catch(N=>new Promise((M,F)=>{N instanceof Error&&C.recordException(Fo.sanitizedErrorMessage(N)),C.setStatus({code:Mr.SpanStatusCode.ERROR,message:N.message}),y(),C.end(),F(N)})):B})}_setPoolConnectEventListeners(t){if(t[_1e.EVENT_LISTENERS_SET])return;let n=Fo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[_1e.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(y1e.SpanNames.POOL_CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchCallbackPGPool(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return T1e(a,c)}}};u4.PgInstrumentation=X7;function T1e(e,t){if(!(t instanceof Promise))return t;let n=t;return Mr.context.bind(Mr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Fo.sanitizedErrorMessage(r)),e.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var C1e=Q(Hb=>{"use strict";A();Object.defineProperty(Hb,"__esModule",{value:!0});Hb.AttributeNames=Hb.PgInstrumentation=void 0;var c_t=I1e();Object.defineProperty(Hb,"PgInstrumentation",{enumerable:!0,get:function(){return c_t.PgInstrumentation}});var l_t=K7();Object.defineProperty(Hb,"AttributeNames",{enumerable:!0,get:function(){return l_t.AttributeNames}})});var b1e,v1e,R1e,d_t,D1e,x1e=O(()=>{A();b1e=ie(C1e(),1);fr();v1e="Postgres",R1e=it(v1e,b1e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Or(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),d_t=e=>({name:v1e,setupOnce(){R1e(e)}}),D1e=d_t});var h_,tY,B1e,p_t,f_t,N1e,eY,A_t,O1e,w1e=O(()=>{A();Le();h_=ie(Xt(),1);$n();dt();fr();_S();tY="PostgresJs",B1e=[">=3.0.0 <4"],p_t=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,f_t=Symbol.for("sentry.query.from.instrumented.sql"),N1e=it(tY,e=>new eY({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),eY=class extends h_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Vn,t)}init(){let t=new h_.InstrumentationNodeModuleDefinition("postgres",B1e,n=>{try{return this._patchPostgres(n)}catch(r){return sa&&Z.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new h_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,B1e,this._patchQueryPrototype.bind(this),this._unpatchQueryPrototype.bind(this)))}),t}_patchPostgres(t){let n=typeof t=="function",r=n?t:t.default;if(typeof r!="function")return sa&&Z.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...a){let c=Reflect.construct(r,a);if(!c||typeof c!="function")return sa&&Z.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return p9(c,{requireParentSpan:d.requireParentSpan,requestHook:d.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(nB(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ft.getSpan(qe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(JI,r);return}let o=n?.match(p_t);o?.[1]&&t.setAttribute(JI,o[1].toUpperCase())}_reconstructQuery(t){if(t?.length)return t.length===1?t[0]||void 0:t.reduce((n,r,o)=>o===0?r:`${n}$${o}${r}`,"")}_sanitizeSqlQuery(t){return t?t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\s+/g," ").trim().replace(/\bX'[0-9A-Fa-f]*'/gi,"?").replace(/\bB'[01]*'/gi,"?").replace(/'(?:[^']|'')*'/g,"?").replace(/\b0x[0-9A-Fa-f]+/gi,"?").replace(/\b(?:TRUE|FALSE)\b/gi,"?").replace(/-?\b\d+\.?\d*[eE][+-]?\d+\b/g,"?").replace(/-?\b\d+\.\d+\b/g,"?").replace(/-?\.\d+\b/g,"?").replace(/(?<!\$)-?\b\d+\b/g,"?").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/gi,"IN (?)").replace(/\bIN\b\s*\(\s*\$\d+(?:\s*,\s*\$\d+)*\s*\)/gi,"IN ($?)"):"Unknown SQL Query"}_patchQueryPrototype(t){let n=this,r=t.Query.prototype.handle;return t.Query.prototype.handle=async function(...o){if(this[f_t])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Ba({name:a||"postgresjs.query",op:"db"},c=>{Or(c,"auto.db.postgresjs"),c.setAttributes({[L0]:"postgres",[Bz]:a});let d=n.getConfig(),{requestHook:m}=d;m&&(0,h_.safeExecuteInTheMiddle)(()=>m(c,a,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),sa&&Z.error(`Error in requestHook for ${tY} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,C,R)=>{try{n._setOperationName(c,a,R?.[0]?.command),c.end()}catch(B){sa&&Z.error("Error ending span in resolve callback:",B)}return Reflect.apply(S,C,R)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,C,R)=>{try{c.setStatus({code:2,message:R?.[0]?.message||"unknown_error"}),c.setAttribute(Nz,R?.[0]?.code||"unknown"),c.setAttribute(Oz,R?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(B){sa&&Z.error("Error ending span in reject callback:",B)}return Reflect.apply(S,C,R)}});try{return r.apply(this,o)}catch(S){throw c.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),c.end(),S}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},A_t=e=>({name:tY,setupOnce(){N1e(e)}}),O1e=A_t});var M1e=Q(uN=>{"use strict";A();Object.defineProperty(uN,"__esModule",{value:!0});uN.SeverityNumber=void 0;var m_t;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(m_t=uN.SeverityNumber||(uN.SeverityNumber={}))});var l4=Q(zb=>{"use strict";A();Object.defineProperty(zb,"__esModule",{value:!0});zb.NOOP_LOGGER=zb.NoopLogger=void 0;var c4=class{emit(t){}};zb.NoopLogger=c4;zb.NOOP_LOGGER=new c4});var p4=Q($b=>{"use strict";A();Object.defineProperty($b,"__esModule",{value:!0});$b.NOOP_LOGGER_PROVIDER=$b.NoopLoggerProvider=void 0;var g_t=l4(),d4=class{getLogger(t,n,r){return new g_t.NoopLogger}};$b.NoopLoggerProvider=d4;$b.NOOP_LOGGER_PROVIDER=new d4});var rY=Q(f4=>{"use strict";A();Object.defineProperty(f4,"__esModule",{value:!0});f4.ProxyLogger=void 0;var h_t=l4(),nY=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):h_t.NOOP_LOGGER}};f4.ProxyLogger=nY});var iY=Q(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.ProxyLoggerProvider=void 0;var __t=p4(),E_t=rY(),oY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new E_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:__t.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};A4.ProxyLoggerProvider=oY});var P1e=Q(m4=>{"use strict";A();Object.defineProperty(m4,"__esModule",{value:!0});m4._globalThis=void 0;m4._globalThis=typeof globalThis=="object"?globalThis:global});var k1e=Q(g4=>{"use strict";A();Object.defineProperty(g4,"__esModule",{value:!0});g4._globalThis=void 0;var S_t=P1e();Object.defineProperty(g4,"_globalThis",{enumerable:!0,get:function(){return S_t._globalThis}})});var U1e=Q(h4=>{"use strict";A();Object.defineProperty(h4,"__esModule",{value:!0});h4._globalThis=void 0;var y_t=k1e();Object.defineProperty(h4,"_globalThis",{enumerable:!0,get:function(){return y_t._globalThis}})});var L1e=Q(cA=>{"use strict";A();Object.defineProperty(cA,"__esModule",{value:!0});cA.API_BACKWARDS_COMPATIBILITY_VERSION=cA.makeGetter=cA._global=cA.GLOBAL_LOGS_API_KEY=void 0;var T_t=U1e();cA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");cA._global=T_t._globalThis;function I_t(e,t,n){return r=>r===e?t:n}cA.makeGetter=I_t;cA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var F1e=Q(_4=>{"use strict";A();Object.defineProperty(_4,"__esModule",{value:!0});_4.LogsAPI=void 0;var Od=L1e(),C_t=p4(),Q1e=iY(),aY=class e{constructor(){this._proxyLoggerProvider=new Q1e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Od._global[Od.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Od._global[Od.GLOBAL_LOGS_API_KEY]=(0,Od.makeGetter)(Od.API_BACKWARDS_COMPATIBILITY_VERSION,t,C_t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Od._global[Od.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Od._global,Od.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Od._global[Od.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Q1e.ProxyLoggerProvider}};_4.LogsAPI=aY});var sY=Q(Pa=>{"use strict";A();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.logs=Pa.ProxyLoggerProvider=Pa.ProxyLogger=Pa.NoopLoggerProvider=Pa.NOOP_LOGGER_PROVIDER=Pa.NoopLogger=Pa.NOOP_LOGGER=Pa.SeverityNumber=void 0;var b_t=M1e();Object.defineProperty(Pa,"SeverityNumber",{enumerable:!0,get:function(){return b_t.SeverityNumber}});var G1e=l4();Object.defineProperty(Pa,"NOOP_LOGGER",{enumerable:!0,get:function(){return G1e.NOOP_LOGGER}});Object.defineProperty(Pa,"NoopLogger",{enumerable:!0,get:function(){return G1e.NoopLogger}});var j1e=p4();Object.defineProperty(Pa,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return j1e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(Pa,"NoopLoggerProvider",{enumerable:!0,get:function(){return j1e.NoopLoggerProvider}});var v_t=rY();Object.defineProperty(Pa,"ProxyLogger",{enumerable:!0,get:function(){return v_t.ProxyLogger}});var R_t=iY();Object.defineProperty(Pa,"ProxyLoggerProvider",{enumerable:!0,get:function(){return R_t.ProxyLoggerProvider}});var D_t=F1e();Pa.logs=D_t.LogsAPI.getInstance()});var H1e=Q(Vb=>{"use strict";A();Object.defineProperty(Vb,"__esModule",{value:!0});Vb.disableInstrumentations=Vb.enableInstrumentations=void 0;function x_t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}Vb.enableInstrumentations=x_t;function B_t(e){e.forEach(t=>t.disable())}Vb.disableInstrumentations=B_t});var V1e=Q(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.registerInstrumentations=void 0;var z1e=(Le(),we(Je)),N_t=sY(),$1e=H1e();function O_t(e){let t=e.tracerProvider||z1e.trace.getTracerProvider(),n=e.meterProvider||z1e.metrics.getMeterProvider(),r=e.loggerProvider||N_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,$1e.enableInstrumentations)(o,t,n,r),()=>{(0,$1e.disableInstrumentations)(o)}}E4.registerInstrumentations=O_t});var tBe=Q(S4=>{"use strict";A();Object.defineProperty(S4,"__esModule",{value:!0});S4.satisfies=void 0;var dY=(Le(),we(Je)),Z1e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,w_t=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,M_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function P_t(e,t,n){if(!k_t(e))return dY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=F_t(e);if(!r)return!1;let o=[],i=W1e(r,t,o,n);return i&&!n?.includePrerelease?L_t(r,o):i}S4.satisfies=P_t;function k_t(e){return typeof e=="string"&&Z1e.test(e)}function W1e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(uY(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=sEt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!uY(e,i,n,r))return!1;return!0}return uY(e,t,n,r)}function uY(e,t,n,r){if(t=Q_t(t,r),t.includes(" "))return W1e(e,t,n,r);{let o=G_t(t);return n.push(o),U_t(e,o)}}function U_t(e,t){if(t.invalid)return!1;if(!t.version||lY(t.version))return!0;let n=Y1e(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=Y1e(r,o)}return M_t[t.op]?.includes(n)}function L_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Q_t(e,t){return e=e.trim(),e=iEt(e,t),e=oEt(e),e=aEt(e,t),e=e.trim(),e}function vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function F_t(e){let t=e.match(Z1e);if(!t){dY.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function G_t(e){if(!e)return{};let t=e.match(w_t);if(!t)return dY.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function lY(e){return e==="*"||e==="x"||e==="X"}function q1e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function j_t(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function H_t(e,t){if(lY(e)||lY(t))return 0;let[n,r]=j_t(q1e(e),q1e(t));return n>r?1:n<r?-1:0}function Y1e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=H_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var X1e="[a-zA-Z0-9-]",eBe="0|[1-9]\\d*",z_t=`\\d*[a-zA-Z-]${X1e}*`,$_t="((?:<|>)?=?)",K1e=`(?:${eBe}|${z_t})`,V_t=`(?:-(${K1e}(?:\\.${K1e})*))`,J1e=`${X1e}+`,q_t=`(?:\\+(${J1e}(?:\\.${J1e})*))`,cY=`${eBe}|x|X|\\*`,cN=`[v=\\s]*(${cY})(?:\\.(${cY})(?:\\.(${cY})(?:${V_t})?${q_t}?)?)?`,Y_t=`^${$_t}\\s*${cN}$`,K_t=new RegExp(Y_t),J_t=`^\\s*(${cN})\\s+-\\s+(${cN})\\s*$`,Z_t=new RegExp(J_t),W_t="(?:~>?)",X_t=`^${W_t}${cN}$`,eEt=new RegExp(X_t),tEt="(?:\\^)",nEt=`^${tEt}${cN}$`,rEt=new RegExp(nEt);function oEt(e){let t=eEt;return e.replace(t,(n,r,o,i,a)=>{let c;return vu(r)?c="":vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:vu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function iEt(e,t){let n=rEt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return vu(i)?m="":vu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:vu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function aEt(e,t){let n=K_t;return e.replace(n,(r,o,i,a,c,d)=>{let m=vu(i),h=m||vu(a),y=h||vu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function sEt(e,t){let n=Z_t;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,C,R)=>(vu(i)?o="":vu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:vu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,vu(y)?h="":vu(S)?h=`<${+y+1}.0.0-0`:vu(C)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${C}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var pY=Q(ls=>{"use strict";A();Object.defineProperty(ls,"__esModule",{value:!0});ls.massUnwrap=ls.unwrap=ls.massWrap=ls.wrap=void 0;var Ru=console.error.bind(console);function lN(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var uEt=(e,t,n)=>{if(!e||!e[t]){Ru("no original function "+String(t)+" to wrap");return}if(!n){Ru("no wrapper function"),Ru(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Ru("original object and wrapper must be functions");return}let o=n(r,t);return lN(o,"__original",r),lN(o,"__unwrap",()=>{e[t]===o&&lN(e,t,r)}),lN(o,"__wrapped",!0),lN(e,t,o),o};ls.wrap=uEt;var cEt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Ru("must provide one or more modules to patch"),Ru(new Error().stack);return}if(!(t&&Array.isArray(t))){Ru("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ls.wrap)(r,o,n)})})};ls.massWrap=cEt;var lEt=(e,t)=>{if(!e||!e[t]){Ru("no function to unwrap."),Ru(new Error().stack);return}let n=e[t];if(!n.__unwrap)Ru("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ls.unwrap=lEt;var dEt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Ru("must provide one or more modules to patch"),Ru(new Error().stack);return}if(!(t&&Array.isArray(t))){Ru("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ls.unwrap)(n,r)})})};ls.massUnwrap=dEt;function dN(e){e&&e.logger&&(typeof e.logger!="function"?Ru("new logger isn't a function, not replacing"):Ru=e.logger)}ls.default=dN;dN.wrap=ls.wrap;dN.massWrap=ls.massWrap;dN.unwrap=ls.unwrap;dN.massUnwrap=ls.massUnwrap});var nBe=Q(T4=>{"use strict";A();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationAbstract=void 0;var fY=(Le(),we(Je)),pEt=sY(),y4=pY(),AY=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=fY.diag.createComponentLogger({namespace:t}),this._tracer=fY.trace.getTracer(t,n),this._meter=fY.metrics.getMeter(t,n),this._logger=pEt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=y4.wrap;_unwrap=y4.unwrap;_massWrap=y4.massWrap;_massUnwrap=y4.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};T4.InstrumentationAbstract=AY});var rBe=Q(__=>{"use strict";A();Object.defineProperty(__,"__esModule",{value:!0});__.ModuleNameTrie=__.ModuleNameSeparator=void 0;__.ModuleNameSeparator="/";var I4=class{hooks=[];children=new Map},mY=class{_trie=new I4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(__.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new I4,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(__.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};__.ModuleNameTrie=mY});var iBe=Q(C4=>{"use strict";A();Object.defineProperty(C4,"__esModule",{value:!0});C4.RequireInTheMiddleSingleton=void 0;var fEt=z0(),oBe=Ue("path"),gY=rBe(),AEt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),hY=class e{_moduleNameTrie=new gY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new fEt.Hook(null,{internals:!0},(t,n,r)=>{let o=mEt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return AEt?new e:this._instance=this._instance??new e}};C4.RequireInTheMiddleSingleton=hY;function mEt(e){return oBe.sep!==gY.ModuleNameSeparator?e.split(oBe.sep).join(gY.ModuleNameSeparator):e}});var _Y=Q(E_=>{"use strict";A();Object.defineProperty(E_,"__esModule",{value:!0});E_.isWrapped=E_.safeExecuteInTheMiddleAsync=E_.safeExecuteInTheMiddle=void 0;function gEt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}E_.safeExecuteInTheMiddle=gEt;async function hEt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}E_.safeExecuteInTheMiddleAsync=hEt;function _Et(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}E_.isWrapped=_Et});var uBe=Q(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.InstrumentationBase=void 0;var pN=Ue("path"),aBe=Ue("util"),EEt=tBe(),EY=pY(),SEt=nBe(),yEt=iBe(),TEt=Xq(),fN=(Le(),we(Je)),IEt=z0(),CEt=Ue("fs"),bEt=_Y(),SY=class extends SEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=yEt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,bEt.isWrapped)(t[n])&&this._unwrap(t,n),aBe.types.isProxy(t)){let o=(0,EY.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,EY.wrap)(t,n,r)};_unwrap=(t,n)=>aBe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,EY.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{fN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){fN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{fN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){fN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ue.resolve(n);Ue.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,CEt.readFileSync)(pN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{fN.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return sBe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=pN.normalize(r);return a.filter(m=>m.name===c).filter(m=>sBe(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&pN.isAbsolute(c)){let m=pN.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=pN.isAbsolute(t.name)?new IEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new TEt.Hook([t.name],{internals:!1},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};b4.InstrumentationBase=SY;function sBe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,EEt.satisfies)(t,r,{includePrerelease:n}))}});var cBe=Q(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.normalize=void 0;var vEt=Ue("path");Object.defineProperty(v4,"normalize",{enumerable:!0,get:function(){return vEt.normalize}})});var lBe=Q(qb=>{"use strict";A();Object.defineProperty(qb,"__esModule",{value:!0});qb.normalize=qb.InstrumentationBase=void 0;var REt=uBe();Object.defineProperty(qb,"InstrumentationBase",{enumerable:!0,get:function(){return REt.InstrumentationBase}});var DEt=cBe();Object.defineProperty(qb,"normalize",{enumerable:!0,get:function(){return DEt.normalize}})});var yY=Q(Yb=>{"use strict";A();Object.defineProperty(Yb,"__esModule",{value:!0});Yb.normalize=Yb.InstrumentationBase=void 0;var dBe=lBe();Object.defineProperty(Yb,"InstrumentationBase",{enumerable:!0,get:function(){return dBe.InstrumentationBase}});Object.defineProperty(Yb,"normalize",{enumerable:!0,get:function(){return dBe.normalize}})});var pBe=Q(R4=>{"use strict";A();Object.defineProperty(R4,"__esModule",{value:!0});R4.InstrumentationNodeModuleDefinition=void 0;var TY=class{name;supportedVersions;patch;unpatch;files;constructor(t,n,r,o,i){this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}};R4.InstrumentationNodeModuleDefinition=TY});var fBe=Q(D4=>{"use strict";A();Object.defineProperty(D4,"__esModule",{value:!0});D4.InstrumentationNodeModuleFile=void 0;var xEt=yY(),IY=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,xEt.normalize)(t)}};D4.InstrumentationNodeModuleFile=IY});var ABe=Q(xS=>{"use strict";A();Object.defineProperty(xS,"__esModule",{value:!0});xS.semconvStabilityFromStr=xS.SemconvStability=void 0;var x4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(x4=xS.SemconvStability||(xS.SemconvStability={}));function BEt(e,t){let n=x4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=x4.DUPLICATE;break}else o.toLowerCase()===e&&(n=x4.STABLE);return n}xS.semconvStabilityFromStr=BEt});var gBe=Q(Hi=>{"use strict";A();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.semconvStabilityFromStr=Hi.SemconvStability=Hi.safeExecuteInTheMiddleAsync=Hi.safeExecuteInTheMiddle=Hi.isWrapped=Hi.InstrumentationNodeModuleFile=Hi.InstrumentationNodeModuleDefinition=Hi.InstrumentationBase=Hi.registerInstrumentations=void 0;var NEt=V1e();Object.defineProperty(Hi,"registerInstrumentations",{enumerable:!0,get:function(){return NEt.registerInstrumentations}});var OEt=yY();Object.defineProperty(Hi,"InstrumentationBase",{enumerable:!0,get:function(){return OEt.InstrumentationBase}});var wEt=pBe();Object.defineProperty(Hi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return wEt.InstrumentationNodeModuleDefinition}});var MEt=fBe();Object.defineProperty(Hi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return MEt.InstrumentationNodeModuleFile}});var CY=_Y();Object.defineProperty(Hi,"isWrapped",{enumerable:!0,get:function(){return CY.isWrapped}});Object.defineProperty(Hi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddle}});Object.defineProperty(Hi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddleAsync}});var mBe=ABe();Object.defineProperty(Hi,"SemconvStability",{enumerable:!0,get:function(){return mBe.SemconvStability}});Object.defineProperty(Hi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return mBe.semconvStabilityFromStr}})});function UEt(){let e=Kb[vY];return e?.helper?e.helper:Kb[bY]?.helper}function LEt(e){let t={helper:e};Kb[vY]=t,Kb[bY]=t}function QEt(){delete Kb[vY],delete Kb[bY]}function jEt(e){switch(e){case"client":return Wr.CLIENT;case"internal":default:return Wr.INTERNAL}}function EBe(e,t,n,r,o){if(SBe(t.name,o))return;let i={attributes:t.attributes,kind:jEt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let m=r.get(d);return m?{context:{spanId:m,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)EBe(e,d,n,r,o);a.end(t.endTime)})}function hBe(e,t){return zEt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function zEt(e){return e!=null&&typeof e.then=="function"}function SBe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var B4,PEt,kEt,bY,vY,Kb,FEt,GEt,HEt,yBe,_Be,$Et,VEt,TBe,IBe=O(()=>{A();Le();B4=ie(gBe(),1);Le();PEt={name:"@prisma/instrumentation-contract",version:"7.6.0",description:"Shared types and utilities for Prisma instrumentation",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation-contract"},bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},files:["dist"],sideEffects:!1,devDependencies:{"@opentelemetry/api":"1.9.0"},peerDependencies:{"@opentelemetry/api":"^1.8"}},kEt=PEt.version.split(".")[0],bY="PRISMA_INSTRUMENTATION",vY=`V${kEt}_PRISMA_INSTRUMENTATION`,Kb=globalThis;FEt=process.env.PRISMA_SHOW_ALL_TRACES==="true",GEt="00-10-10-00";HEt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ft.getSpanContext(e??qe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:GEt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)EBe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return qe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!FEt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(SBe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return hBe(i,t(i,r))}return n.startActiveSpan(o,e,i=>hBe(i,t(i,r)))}};yBe={name:"@prisma/instrumentation",version:"7.6.0",description:"OpenTelemetry compliant instrumentation for Prisma Client",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.ts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation"},bugs:"https://github.com/prisma/prisma/issues",devDependencies:{"@opentelemetry/api":"1.9.0","@prisma/instrumentation-contract":"workspace:*","@types/node":"~20.19.24",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.207.0"},peerDependencies:{"@opentelemetry/api":"^1.8"},files:["dist"],keywords:["prisma","instrumentation","opentelemetry","otel"],scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},sideEffects:!1},_Be=yBe.version,$Et=yBe.name,VEt="@prisma/client",TBe=class extends B4.InstrumentationBase{tracerProvider;constructor(e={}){super($Et,_Be,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new B4.InstrumentationNodeModuleDefinition(VEt,[_Be])]}enable(){let e=this._config;LEt(new HEt({tracerProvider:this.tracerProvider??Ft.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){QEt()}isEnabled(){return UEt()!==void 0}}});function qEt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function bBe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function YEt(e){switch(e){case"client":return Wr.CLIENT;case"internal":default:return Wr.INTERNAL}}var CBe,RY,KEt,vBe,RBe=O(()=>{A();Le();IBe();dt();fr();CBe="Prisma";RY=class extends TBe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=bBe();qEt(t)&&(t.createEngineSpan=n=>{let r=Ft.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Ei(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let a=YEt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Ds.SAMPLED}})),y=Ft.setSpanContext(qe.active(),{traceId:m,spanId:c,traceFlags:Ds.SAMPLED});qe.with(y,()=>{let S={generateTraceId:()=>m,generateSpanId:()=>d};r._idGenerator=S,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};KEt=it(CBe,e=>new RY(e)),vBe=e=>({name:CBe,setupOnce(){KEt(e)},setup(t){bBe()&&t.on("spanStart",n=>{let r=xt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Nt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var DBe=Q(Jb=>{"use strict";A();Object.defineProperty(Jb,"__esModule",{value:!0});Jb.PACKAGE_NAME=Jb.PACKAGE_VERSION=void 0;Jb.PACKAGE_VERSION="0.60.0";Jb.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var DY=Q(lA=>{"use strict";A();Object.defineProperty(lA,"__esModule",{value:!0});lA.HapiLifecycleMethodNames=lA.HapiLayerType=lA.handlerPatched=lA.HapiComponentName=void 0;lA.HapiComponentName="@hapi/hapi";lA.handlerPatched=Symbol("hapi-handler-patched");lA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};lA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var xBe=Q(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.ATTR_HTTP_METHOD=void 0;N4.ATTR_HTTP_METHOD="http.method"});var xY=Q(AN=>{"use strict";A();Object.defineProperty(AN,"__esModule",{value:!0});AN.AttributeNames=void 0;var JEt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(JEt=AN.AttributeNames||(AN.AttributeNames={}))});var OBe=Q(zi=>{"use strict";A();Object.defineProperty(zi,"__esModule",{value:!0});zi.getPluginFromInput=zi.getExtMetadata=zi.getRouteMetadata=zi.isPatchableExtMethod=zi.isDirectExtInput=zi.isLifecycleExtEventObj=zi.isLifecycleExtType=zi.getPluginName=void 0;var BBe=($n(),we(Nr)),ZEt=xBe(),mN=DY(),S_=xY(),NBe=Xt();function WEt(e){return e.name?e.name:e.pkg.name}zi.getPluginName=WEt;var XEt=e=>typeof e=="string"&&mN.HapiLifecycleMethodNames.has(e);zi.isLifecycleExtType=XEt;var e0t=e=>{let t=e?.type;return t!==void 0&&(0,zi.isLifecycleExtType)(t)};zi.isLifecycleExtEventObj=e0t;var t0t=e=>Array.isArray(e)&&e.length<=3&&(0,zi.isLifecycleExtType)(e[0])&&typeof e[1]=="function";zi.isDirectExtInput=t0t;var n0t=e=>!Array.isArray(e);zi.isPatchableExtMethod=n0t;var r0t=(e,t,n)=>{let r={[BBe.ATTR_HTTP_ROUTE]:e.path};t&NBe.SemconvStability.OLD&&(r[ZEt.ATTR_HTTP_METHOD]=e.method),t&NBe.SemconvStability.STABLE&&(r[BBe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[S_.AttributeNames.HAPI_TYPE]=mN.HapiLayerType.PLUGIN,r[S_.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[S_.AttributeNames.HAPI_TYPE]=mN.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};zi.getRouteMetadata=r0t;var o0t=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[S_.AttributeNames.EXT_TYPE]:e,[S_.AttributeNames.HAPI_TYPE]:mN.HapiLayerType.EXT,[S_.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[S_.AttributeNames.EXT_TYPE]:e,[S_.AttributeNames.HAPI_TYPE]:mN.HapiLayerType.EXT},name:r}};zi.getExtMetadata=o0t;var i0t=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;zi.getPluginFromInput=i0t});var PBe=Q(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.HapiInstrumentation=void 0;var El=(Le(),we(Je)),wBe=_r(),gN=Xt(),MBe=DBe(),hN=DY(),Km=OBe(),BY=class extends gN.InstrumentationBase{_semconvStability;constructor(t={}){super(MBe.PACKAGE_NAME,MBe.PACKAGE_VERSION,t),this._semconvStability=(0,gN.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new gN.InstrumentationNodeModuleDefinition(hN.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,gN.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,gN.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let a=t.apply(this,[i]);return r._wrap(a,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(a,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(a,"register",n._getServerRegisterPatch.bind(n)),a}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let a of o){let c=(0,Km.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Km.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let d=a[c];if((0,Km.isLifecycleExtType)(d.type)){let m=d,h=r._wrapExtMethods(m.method,d.type,n);m.method=h,a[c]=m}}return t.apply(this,i)}else if((0,Km.isDirectExtInput)(i)){let a=i,c=a[1],d=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],d,a[2]])}else if((0,Km.isLifecycleExtEventObj)(i[0])){let a=i[0],c=r._wrapExtMethods(a.method,a.type,n);return a.method=c,t.call(this,a)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let a=r._wrapRouteHandler.call(r,o[i],n);o[i]=a}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Km.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",m=>n._getServerRoutePatch.bind(n)(m,r)),i._wrap(c,"ext",m=>n._getServerExtPatch.bind(n)(m,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Km.isPatchableExtMethod)(t))return t[hN.handlerPatched]===!0?t:(t[hN.handlerPatched]=!0,async function(...a){if(El.trace.getSpan(El.context.active())===void 0)return await t.apply(this,a);let c=(0,Km.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await El.context.with(El.trace.setSpan(El.context.active(),d),t,void 0,...a)}catch(m){throw d.recordException(m),d.setStatus({code:El.SpanStatusCode.ERROR,message:m.message}),m}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[hN.handlerPatched]===!0)return t;t[hN.handlerPatched]=!0;let o=i=>async function(...a){if(El.trace.getSpan(El.context.active())===void 0)return await i.call(this,...a);let c=(0,wBe.getRPCMetadata)(El.context.active());c?.type===wBe.RPCType.HTTP&&(c.route=t.path);let d=(0,Km.getRouteMetadata)(t,r._semconvStability,n),m=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await El.context.with(El.trace.setSpan(El.context.active(),m),()=>i.call(this,...a))}catch(h){throw m.recordException(h),m.setStatus({code:El.SpanStatusCode.ERROR,message:h.message}),h}finally{m.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};O4.HapiInstrumentation=BY});var kBe=Q(Zb=>{"use strict";A();Object.defineProperty(Zb,"__esModule",{value:!0});Zb.AttributeNames=Zb.HapiInstrumentation=void 0;var a0t=PBe();Object.defineProperty(Zb,"HapiInstrumentation",{enumerable:!0,get:function(){return a0t.HapiInstrumentation}});var s0t=xY();Object.defineProperty(Zb,"AttributeNames",{enumerable:!0,get:function(){return s0t.AttributeNames}})});var UBe,LBe,QBe,u0t,FBe,GBe=O(()=>{A();UBe=ie(kBe(),1);fr();LBe="Hapi",QBe=it(LBe,()=>new UBe.HapiInstrumentation),u0t=()=>({name:LBe,setupOnce(){QBe()}}),FBe=u0t});var y_,_N,NY=O(()=>{A();y_={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},_N={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var M4,c0t,l0t,w4,jBe=O(()=>{A();Le();M4=ie(Xt(),1);dt();NY();c0t="@sentry/instrumentation-hono",l0t="0.0.1",w4=class extends M4.InstrumentationBase{constructor(t={}){super(c0t,l0t,t)}init(){return[new M4.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(a=>t._wrapHandler(a))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,a=n.tracer.startSpan(i);return qe.with(Ft.setSpan(qe.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(ns(c))return c.then(d=>{let m=n._determineHandlerType(d);return a.setAttributes({[y_.HONO_TYPE]:m,[y_.HONO_NAME]:m===_N.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[y_.HONO_TYPE]:d,[y_.HONO_NAME]:d===_N.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),c}},()=>a.end(),c=>{n._handleError(a,c),a.end()}))}}_safeExecute(t,n,r){try{let o=t();return ns(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?_N.MIDDLEWARE:_N.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Xo.ERROR,message:n.message}),t.recordException(n))}}});function d0t(e){let t=xt(e).data,n=t[y_.HONO_TYPE];if(t[Yt]||!n)return;e.setAttributes({[Nt]:"auto.http.otel.hono",[Yt]:`${n}.hono`});let r=t[y_.HONO_NAME];if(typeof r=="string"&&e.updateName(r),wn()===hd()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Cm],i=t[Q0];typeof o=="string"&&typeof i=="string"&&wn().setTransactionName(`${i} ${o}`)}var HBe,zBe,p0t,$Be,VBe=O(()=>{A();$n();dt();fr();_S();NY();jBe();HBe="Hono";zBe=it(HBe,()=>new w4({responseHook:e=>{d0t(e)}})),p0t=()=>({name:HBe,setupOnce(){zBe()}}),$Be=p0t});var P4=Q(EN=>{"use strict";A();Object.defineProperty(EN,"__esModule",{value:!0});EN.KoaLayerType=void 0;var f0t;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(f0t=EN.KoaLayerType||(EN.KoaLayerType={}))});var qBe=Q(Wb=>{"use strict";A();Object.defineProperty(Wb,"__esModule",{value:!0});Wb.PACKAGE_NAME=Wb.PACKAGE_VERSION=void 0;Wb.PACKAGE_VERSION="0.62.0";Wb.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var OY=Q(SN=>{"use strict";A();Object.defineProperty(SN,"__esModule",{value:!0});SN.AttributeNames=void 0;var A0t;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(A0t=SN.AttributeNames||(SN.AttributeNames={}))});var KBe=Q(Xb=>{"use strict";A();Object.defineProperty(Xb,"__esModule",{value:!0});Xb.isLayerIgnored=Xb.getMiddlewareMetadata=void 0;var YBe=P4(),k4=OY(),m0t=($n(),we(Nr)),g0t=(e,t,n,r)=>n?{attributes:{[k4.AttributeNames.KOA_NAME]:r?.toString(),[k4.AttributeNames.KOA_TYPE]:YBe.KoaLayerType.ROUTER,[m0t.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[k4.AttributeNames.KOA_NAME]:t.name??"middleware",[k4.AttributeNames.KOA_TYPE]:YBe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Xb.getMiddlewareMetadata=g0t;var h0t=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Xb.isLayerIgnored=h0t});var JBe=Q(U4=>{"use strict";A();Object.defineProperty(U4,"__esModule",{value:!0});U4.kLayerPatched=void 0;U4.kLayerPatched=Symbol("koa-layer-patched")});var nNe=Q(L4=>{"use strict";A();Object.defineProperty(L4,"__esModule",{value:!0});L4.KoaInstrumentation=void 0;var dA=(Le(),we(Je)),yN=Xt(),ZBe=P4(),WBe=qBe(),XBe=KBe(),eNe=_r(),tNe=JBe(),wY=class extends yN.InstrumentationBase{constructor(t={}){super(WBe.PACKAGE_NAME,WBe.PACKAGE_VERSION,t)}init(){return new yN.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,yN.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),t)},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;(0,yN.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(t){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),t.apply(this,[i])}}_patchRouterDispatch(t){dA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let d=a[c];a[c]=this._patchLayer(d,!0,i)}}return t}_patchLayer(t,n,r){let o=n?ZBe.KoaLayerType.ROUTER:ZBe.KoaLayerType.MIDDLEWARE;return t[tNe.kLayerPatched]===!0||(0,XBe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(dA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[tNe.kLayerPatched]=!0,dA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(dA.trace.getSpan(dA.context.active())===void 0)return t(i,a);let d=(0,XBe.getMiddlewareMetadata)(i,t,n,r),m=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,eNe.getRPCMetadata)(dA.context.active());h?.type===eNe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,yN.safeExecuteInTheMiddle)(()=>y(m,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&dA.diag.error("koa instrumentation: request hook failed",C)},!0);let S=dA.trace.setSpan(dA.context.active(),m);return dA.context.with(S,async()=>{try{return await t(i,a)}catch(C){throw m.recordException(C),C}finally{m.end()}})})}};L4.KoaInstrumentation=wY});var rNe=Q(T_=>{"use strict";A();Object.defineProperty(T_,"__esModule",{value:!0});T_.KoaLayerType=T_.AttributeNames=T_.KoaInstrumentation=void 0;var _0t=nNe();Object.defineProperty(T_,"KoaInstrumentation",{enumerable:!0,get:function(){return _0t.KoaInstrumentation}});var E0t=OY();Object.defineProperty(T_,"AttributeNames",{enumerable:!0,get:function(){return E0t.AttributeNames}});var S0t=P4();Object.defineProperty(T_,"KoaLayerType",{enumerable:!0,get:function(){return S0t.KoaLayerType}})});var oNe,iNe,aNe,y0t,sNe,uNe=O(()=>{A();oNe=ie(rNe(),1);$n();dt();fr();_S();iNe="Koa",aNe=it(iNe,oNe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Or(t,"auto.http.otel.koa");let r=xt(t).data,o=r["koa.type"];o&&t.setAttribute(Yt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),wn()===hd()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[Cm],c=n.context?.request?.method?.toUpperCase()||"GET";a&&wn().setTransactionName(`${c} ${a}`)}})),y0t=(e={})=>({name:iNe,setupOnce(){aNe(e)}}),sNe=y0t});var MY=Q(zp=>{"use strict";A();Object.defineProperty(zp,"__esModule",{value:!0});zp.ConnectNames=zp.ConnectTypes=zp.AttributeNames=void 0;var T0t;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(T0t=zp.AttributeNames||(zp.AttributeNames={}));var I0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(I0t=zp.ConnectTypes||(zp.ConnectTypes={}));var C0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(C0t=zp.ConnectNames||(zp.ConnectNames={}))});var cNe=Q(ev=>{"use strict";A();Object.defineProperty(ev,"__esModule",{value:!0});ev.PACKAGE_NAME=ev.PACKAGE_VERSION=void 0;ev.PACKAGE_VERSION="0.57.0";ev.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var lNe=Q(Q4=>{"use strict";A();Object.defineProperty(Q4,"__esModule",{value:!0});Q4._LAYERS_STORE_PROPERTY=void 0;Q4._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var dNe=Q(C_=>{"use strict";A();Object.defineProperty(C_,"__esModule",{value:!0});C_.generateRoute=C_.replaceCurrentStackRoute=C_.addNewStackLayer=void 0;var b0t=(Le(),we(Je)),I_=lNe(),v0t=e=>{Array.isArray(e[I_._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,I_._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[I_._LAYERS_STORE_PROPERTY].push("/");let t=e[I_._LAYERS_STORE_PROPERTY].length;return()=>{t===e[I_._LAYERS_STORE_PROPERTY].length?e[I_._LAYERS_STORE_PROPERTY].pop():b0t.diag.warn("Connect: Trying to pop the stack multiple time")}};C_.addNewStackLayer=v0t;var R0t=(e,t)=>{t&&e[I_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};C_.replaceCurrentStackRoute=R0t;var D0t=e=>e[I_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);C_.generateRoute=D0t});var ANe=Q(b_=>{"use strict";A();Object.defineProperty(b_,"__esModule",{value:!0});b_.ConnectInstrumentation=b_.ANONYMOUS_NAME=void 0;var x0t=(Le(),we(Je)),pNe=_r(),tv=MY(),fNe=cNe(),F4=Xt(),B0t=($n(),we(Nr)),PY=dNe();b_.ANONYMOUS_NAME="anonymous";var kY=class extends F4.InstrumentationBase{constructor(t={}){super(fNe.PACKAGE_NAME,fNe.PACKAGE_VERSION,t)}init(){return[new F4.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,F4.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,F4.isWrapped)(t.handle)||this._wrap(t,"handle",this._patchHandle.bind(this))}_patchConstructor(t){let n=this;return function(...r){let o=t.apply(this,r);return n._patchApp(o),o}}_patchNext(t,n){return function(o){let i=t.apply(this,[o]);return n(),i}}_startSpan(t,n){let r,o,i;t?(r=tv.ConnectTypes.REQUEST_HANDLER,i=tv.ConnectNames.REQUEST_HANDLER,o=t):(r=tv.ConnectTypes.MIDDLEWARE,i=tv.ConnectNames.MIDDLEWARE,o=n.name||b_.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[B0t.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[tv.AttributeNames.CONNECT_TYPE]:r,[tv.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],m=arguments[a],h=arguments[c],y=arguments[d];(0,PY.replaceCurrentStackRoute)(m,t);let S=(0,pNe.getRPCMetadata)(x0t.context.active());t&&S?.type===pNe.RPCType.HTTP&&(S.route=(0,PY.generateRoute)(m));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||b_.ANONYMOUS_NAME}`;let R=r._startSpan(t,n);r._diag.debug("start span",C);let B=!1;function N(){B?r._diag.debug(`span ${R.name} - already finished`):(B=!0,r._diag.debug(`finishing span ${R.name}`),R.end()),h.removeListener("close",N)}return h.addListener("close",N),arguments[d]=r._patchNext(y,N),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,PY.addNewStackLayer)(i);return typeof a=="function"&&(arguments[o]=n._patchOut(a,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};b_.ConnectInstrumentation=kY});var gNe=Q(wd=>{"use strict";A();Object.defineProperty(wd,"__esModule",{value:!0});wd.ConnectTypes=wd.ConnectNames=wd.AttributeNames=wd.ANONYMOUS_NAME=wd.ConnectInstrumentation=void 0;var mNe=ANe();Object.defineProperty(wd,"ConnectInstrumentation",{enumerable:!0,get:function(){return mNe.ConnectInstrumentation}});Object.defineProperty(wd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return mNe.ANONYMOUS_NAME}});var UY=MY();Object.defineProperty(wd,"AttributeNames",{enumerable:!0,get:function(){return UY.AttributeNames}});Object.defineProperty(wd,"ConnectNames",{enumerable:!0,get:function(){return UY.ConnectNames}});Object.defineProperty(wd,"ConnectTypes",{enumerable:!0,get:function(){return UY.ConnectTypes}})});var hNe,_Ne,ENe,N0t,SNe,yNe=O(()=>{A();hNe=ie(gNe(),1);fr();_Ne="Connect",ENe=it(_Ne,()=>new hNe.ConnectInstrumentation),N0t=()=>({name:_Ne,setupOnce(){ENe()}}),SNe=N0t});var TNe=Q(ka=>{"use strict";A();Object.defineProperty(ka,"__esModule",{value:!0});ka.DB_SYSTEM_VALUE_MSSQL=ka.ATTR_NET_PEER_PORT=ka.ATTR_NET_PEER_NAME=ka.ATTR_DB_USER=ka.ATTR_DB_SYSTEM=ka.ATTR_DB_STATEMENT=ka.ATTR_DB_SQL_TABLE=ka.ATTR_DB_NAME=void 0;ka.ATTR_DB_NAME="db.name";ka.ATTR_DB_SQL_TABLE="db.sql.table";ka.ATTR_DB_STATEMENT="db.statement";ka.ATTR_DB_SYSTEM="db.system";ka.ATTR_DB_USER="db.user";ka.ATTR_NET_PEER_NAME="net.peer.name";ka.ATTR_NET_PEER_PORT="net.peer.port";ka.DB_SYSTEM_VALUE_MSSQL="mssql"});var INe=Q(nv=>{"use strict";A();Object.defineProperty(nv,"__esModule",{value:!0});nv.once=nv.getSpanName=void 0;function O0t(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}nv.getSpanName=O0t;var w0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};nv.once=w0t});var CNe=Q(rv=>{"use strict";A();Object.defineProperty(rv,"__esModule",{value:!0});rv.PACKAGE_NAME=rv.PACKAGE_VERSION=void 0;rv.PACKAGE_VERSION="0.33.0";rv.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var xNe=Q(R_=>{"use strict";A();Object.defineProperty(R_,"__esModule",{value:!0});R_.TediousInstrumentation=R_.INJECTED_CTX=void 0;var ov=(Le(),we(Je)),M0t=Ue("events"),pA=Xt(),BS=($n(),we(Nr)),v_=TNe(),bNe=INe(),vNe=CNe(),DNe=Symbol("opentelemetry.instrumentation-tedious.current-database");R_.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var RNe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function G4(e){Object.defineProperty(this,DNe,{value:e,writable:!0})}var LY=class e extends pA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(vNe.PACKAGE_NAME,vNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,pA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,pA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new pA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of RNe)(0,pA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,pA.isWrapped)(n.connect)&&this._unwrap(n,"connect"),this._wrap(n,"connect",this._patchConnect),t},t=>{if(t===void 0)return;let n=t.Connection.prototype;for(let r of RNe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return G4.call(this,this.config?.options?.database),this.removeListener("databaseChange",G4),this.on("databaseChange",G4),this.once("end",()=>{this.removeListener("databaseChange",G4)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||ov.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,d=>{o()});Object.defineProperty(a,R_.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");a.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(a)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(a){if(a?.[R_.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof M0t.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,m=()=>d++,h=()=>c++,y=this[DNe],S=(j=>j.sqlTextOrProcedure==="sp_prepare"&&j.parametersByName?.stmt?.value?j.parametersByName.stmt.value:j.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&pA.SemconvStability.OLD&&(C[v_.ATTR_DB_SYSTEM]=v_.DB_SYSTEM_VALUE_MSSQL,C[v_.ATTR_DB_NAME]=y,C[v_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[v_.ATTR_DB_STATEMENT]=S,C[v_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&pA.SemconvStability.STABLE&&(C[BS.ATTR_DB_NAMESPACE]=y,C[BS.ATTR_DB_SYSTEM_NAME]=BS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[BS.ATTR_DB_QUERY_TEXT]=S,C[BS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&pA.SemconvStability.OLD&&(C[v_.ATTR_NET_PEER_NAME]=this.config?.server,C[v_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&pA.SemconvStability.STABLE&&(C[BS.ATTR_SERVER_ADDRESS]=this.config?.server,C[BS.ATTR_SERVER_PORT]=this.config?.options?.port);let R=o.tracer.startSpan((0,bNe.getSpanName)(t,y,S,a.table),{kind:ov.SpanKind.CLIENT,attributes:C}),B=(0,bNe.once)(j=>{a.removeListener("done",m),a.removeListener("doneInProc",m),a.removeListener("doneProc",h),a.removeListener("error",B),this.removeListener("end",B),R.setAttribute("tedious.procedure_count",c),R.setAttribute("tedious.statement_count",d),j&&R.setStatus({code:ov.SpanStatusCode.ERROR,message:j.message}),R.end()});a.on("done",m),a.on("doneInProc",m),a.on("doneProc",h),a.once("error",B),this.on("end",B),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(B)):o._diag.error("Expected request.callback to be a function");let N=()=>ov.context.with(ov.trace.setSpan(ov.context.active(),R),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let H=o._buildTraceparent(R);o._injectContextInfo(this,n,H).finally(N)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};R_.TediousInstrumentation=LY});var BNe=Q(j4=>{"use strict";A();Object.defineProperty(j4,"__esModule",{value:!0});j4.TediousInstrumentation=void 0;var P0t=xNe();Object.defineProperty(j4,"TediousInstrumentation",{enumerable:!0,get:function(){return P0t.TediousInstrumentation}})});var NNe,k0t,ONe,wNe,U0t,MNe,PNe=O(()=>{A();NNe=ie(BNe(),1);dt();fr();k0t=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),ONe="Tedious",wNe=it(ONe,()=>new NNe.TediousInstrumentation({})),U0t=()=>{let e;return{name:ONe,setupOnce(){let t=wNe();e=oB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=xt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";k0t.has(i)&&n.setAttribute(Nt,"auto.db.otel.tedious")}))}}},MNe=U0t});var kNe=Q(iv=>{"use strict";A();Object.defineProperty(iv,"__esModule",{value:!0});iv.PACKAGE_NAME=iv.PACKAGE_VERSION=void 0;iv.PACKAGE_VERSION="0.57.0";iv.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var LNe=Q(H4=>{"use strict";A();Object.defineProperty(H4,"__esModule",{value:!0});H4.GenericPoolInstrumentation=void 0;var av=(Le(),we(Je)),NS=Xt(),UNe=kNe(),QY="generic-pool",FY=class extends NS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t)}init(){return[new NS.InstrumentationNodeModuleDefinition(QY,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,NS.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquirePatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new NS.InstrumentationNodeModuleDefinition(QY,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,NS.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new NS.InstrumentationNodeModuleDefinition(QY,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,NS.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=av.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return av.context.with(av.trace.setSpan(i,a),()=>t.call(this,...o).then(c=>(a.end(),c),c=>{throw a.recordException(c),a.end(),c}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let a=av.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return av.context.with(av.trace.setSpan(a,c),()=>{t.call(this,(d,m)=>{if(c.end(),o)return o(d,m)},i)})}}};H4.GenericPoolInstrumentation=FY});var QNe=Q(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.GenericPoolInstrumentation=void 0;var L0t=LNe();Object.defineProperty(z4,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return L0t.GenericPoolInstrumentation}})});var FNe,GNe,jNe,Q0t,HNe,zNe=O(()=>{A();FNe=ie(QNe(),1);dt();fr();GNe="GenericPool",jNe=it(GNe,()=>new FNe.GenericPoolInstrumentation({})),Q0t=()=>{let e;return{name:GNe,setupOnce(){let t=jNe();e=oB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=xt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Nt,"auto.db.otel.generic_pool")}))}}},HNe=Q0t});var GY=Q(fA=>{"use strict";A();Object.defineProperty(fA,"__esModule",{value:!0});fA.ATTR_NET_PEER_PORT=fA.ATTR_NET_PEER_NAME=fA.ATTR_MESSAGING_SYSTEM=fA.ATTR_MESSAGING_OPERATION=void 0;fA.ATTR_MESSAGING_OPERATION="messaging.operation";fA.ATTR_MESSAGING_SYSTEM="messaging.system";fA.ATTR_NET_PEER_NAME="net.peer.name";fA.ATTR_NET_PEER_PORT="net.peer.port"});var jY=Q(oi=>{"use strict";A();Object.defineProperty(oi,"__esModule",{value:!0});oi.ATTR_MESSAGING_CONVERSATION_ID=oi.OLD_ATTR_MESSAGING_MESSAGE_ID=oi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=oi.ATTR_MESSAGING_URL=oi.ATTR_MESSAGING_PROTOCOL_VERSION=oi.ATTR_MESSAGING_PROTOCOL=oi.MESSAGING_OPERATION_VALUE_PROCESS=oi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=oi.ATTR_MESSAGING_DESTINATION_KIND=oi.ATTR_MESSAGING_DESTINATION=void 0;oi.ATTR_MESSAGING_DESTINATION="messaging.destination";oi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";oi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";oi.MESSAGING_OPERATION_VALUE_PROCESS="process";oi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";oi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";oi.ATTR_MESSAGING_URL="messaging.url";oi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";oi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";oi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var HY=Q(OS=>{"use strict";A();Object.defineProperty(OS,"__esModule",{value:!0});OS.DEFAULT_CONFIG=OS.EndOperation=void 0;var F0t;(function(e){e.AutoAck="auto ack",e.Ack="ack",e.AckAll="ackAll",e.Reject="reject",e.Nack="nack",e.NackAll="nackAll",e.ChannelClosed="channel closed",e.ChannelError="channel error",e.InstrumentationTimeout="instrumentation timeout"})(F0t=OS.EndOperation||(OS.EndOperation={}));OS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var YNe=Q(ii=>{"use strict";A();Object.defineProperty(ii,"__esModule",{value:!0});ii.isConfirmChannelTracing=ii.unmarkConfirmChannelTracing=ii.markConfirmChannelTracing=ii.getConnectionAttributesFromUrl=ii.getConnectionAttributesFromServer=ii.normalizeExchange=ii.CONNECTION_ATTRIBUTES=ii.CHANNEL_CONSUME_TIMEOUT_TIMER=ii.CHANNEL_SPANS_NOT_ENDED=ii.MESSAGE_STORED_SPAN=void 0;var zY=(Le(),we(Je)),D_=Xt(),$4=($n(),we(Nr)),TN=GY(),V4=jY();ii.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");ii.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");ii.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");ii.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var $Y=(0,zY.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),G0t=e=>e!==""?e:"<default>";ii.normalizeExchange=G0t;var j0t=e=>e.replace(/:[^:@/]*@/,":***@"),$Ne=(e,t)=>e||(t==="AMQP"?5672:5671),VNe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},qNe=e=>e||"localhost",AA=(e,t,n,r)=>n?{[t]:n}:(zY.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),H0t=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[TN.ATTR_MESSAGING_SYSTEM]:t}:{}};ii.getConnectionAttributesFromServer=H0t;var z0t=(e,t)=>{let n={[V4.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=VNe(r?.protocol);Object.assign(n,{...AA(e,V4.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=qNe(r?.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...AA(e,TN.ATTR_NET_PEER_NAME,i,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...AA(e,$4.ATTR_SERVER_ADDRESS,i,"hostname")});let a=$Ne(r.port,o);t&D_.SemconvStability.OLD&&Object.assign(n,AA(e,TN.ATTR_NET_PEER_PORT,a,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,AA(e,$4.ATTR_SERVER_PORT,a,"port"))}else{let r=j0t(e);n[V4.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=VNe(o.protocol);Object.assign(n,{...AA(r,V4.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=qNe(o.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...AA(r,TN.ATTR_NET_PEER_NAME,a,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...AA(r,$4.ATTR_SERVER_ADDRESS,a,"hostname")});let c=$Ne(o.port?parseInt(o.port):void 0,i);t&D_.SemconvStability.OLD&&Object.assign(n,AA(r,TN.ATTR_NET_PEER_PORT,c,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,AA(r,$4.ATTR_SERVER_PORT,c,"port"))}catch(o){zY.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};ii.getConnectionAttributesFromUrl=z0t;var $0t=e=>e.setValue($Y,!0);ii.markConfirmChannelTracing=$0t;var V0t=e=>e.deleteValue($Y);ii.unmarkConfirmChannelTracing=V0t;var q0t=e=>e.getValue($Y)===!0;ii.isConfirmChannelTracing=q0t});var KNe=Q(sv=>{"use strict";A();Object.defineProperty(sv,"__esModule",{value:!0});sv.PACKAGE_NAME=sv.PACKAGE_VERSION=void 0;sv.PACKAGE_VERSION="0.61.0";sv.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var ZNe=Q(K4=>{"use strict";A();Object.defineProperty(K4,"__esModule",{value:!0});K4.AmqplibInstrumentation=void 0;var Go=(Le(),we(Je)),q4=_r(),Er=Xt(),Y0t=GY(),Sl=jY(),Du=HY(),ai=YNe(),JNe=KNe(),Y4=[">=0.5.5 <1"],VY=class extends Er.InstrumentationBase{_netSemconvStability;constructor(t={}){super(JNe.PACKAGE_NAME,JNe.PACKAGE_VERSION,{...Du.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Er.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Du.DEFAULT_CONFIG,...t})}init(){let t=new Er.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",Y4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Er.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",Y4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Er.InstrumentationNodeModuleFile("amqplib/lib/connect.js",Y4,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Er.InstrumentationNodeModuleDefinition("amqplib",Y4,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Er.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Er.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Er.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Er.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Er.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Du.EndOperation.Ack)),(0,Er.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Du.EndOperation.Nack)),(0,Er.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Du.EndOperation.Reject)),(0,Er.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Du.EndOperation.AckAll)),(0,Er.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Du.EndOperation.NackAll)),(0,Er.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Er.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Er.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Er.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Er.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Er.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Er.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Er.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Er.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Er.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Er.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,d){if(c==null){let m=(0,ai.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,ai.getConnectionAttributesFromServer)(d);d[ai.CONNECTION_ATTRIBUTES]={...m,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Du.EndOperation.ChannelClosed,void 0);let i=this[ai.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[ai.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Du.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let m=this,h=n===Du.EndOperation.Reject?c:d,y=m[ai.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(C=>C.msg===a);if(S<0)o.endConsumerSpan(a,t,n,h);else if(n!==Du.EndOperation.Reject&&c){for(let C=0;C<=S;C++)o.endConsumerSpan(y[C].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(a,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,a,c){let d=this;if(!Object.prototype.hasOwnProperty.call(d,ai.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);y.unref(),d[ai.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}d[ai.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let y=h.properties.headers??{},S=Go.propagation.extract(Go.ROOT_CONTEXT,y),C=h.fields?.exchange,R;if(r._config.useLinksForConsume){let F=S?Go.trace.getSpan(S)?.spanContext():void 0;S=void 0,F&&(R=[{context:F}])}let B=r.tracer.startSpan(`${i} process`,{kind:Go.SpanKind.CONSUMER,attributes:{...d?.connection?.[ai.CONNECTION_ATTRIBUTES],[Sl.ATTR_MESSAGING_DESTINATION]:C,[Sl.ATTR_MESSAGING_DESTINATION_KIND]:Sl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Sl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[Y0t.ATTR_MESSAGING_OPERATION]:Sl.MESSAGING_OPERATION_VALUE_PROCESS,[Sl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Sl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:R},S),{consumeHook:N}=r.getConfig();N&&(0,Er.safeExecuteInTheMiddle)(()=>N(B,{moduleVersion:t,msg:h}),F=>{F&&Go.diag.error("amqplib instrumentation: consumerHook error",F)},!0),c?.noAck||(d[ai.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,q4.hrTime)()}),h[ai.MESSAGE_STORED_SPAN]=B);let M=S||Go.ROOT_CONTEXT;Go.context.with(Go.trace.setSpan(M,B),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(B,h,!1,Du.EndOperation.AutoAck),B.end())};return arguments[1]=m,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,m){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Er.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!0}),M=>{M&&Go.diag.error("amqplib instrumentation: publishHook error",M)},!0);let R=function(M,F){try{m?.call(this,M,F)}finally{let{publishConfirmHook:H}=r.getConfig();H&&(0,Er.safeExecuteInTheMiddle)(()=>H(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:M}),j=>{j&&Go.diag.error("amqplib instrumentation: publishConfirmHook error",j)},!0),M&&y.setStatus({code:Go.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},B=(0,ai.markConfirmChannelTracing)(Go.context.active()),N=[...arguments];return N[3]=S,N[4]=Go.context.bind((0,ai.unmarkConfirmChannelTracing)(Go.trace.setSpan(B,y)),R),Go.context.with(B,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,ai.isConfirmChannelTracing)(Go.context.active()))return n.apply(this,arguments);{let m=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,a,m,d),{publishHook:S}=r.getConfig();S&&(0,Er.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!1}),B=>{B&&Go.diag.error("amqplib instrumentation: publishHook error",B)},!0);let C=[...arguments];C[3]=y;let R=n.apply(this,C);return h.end(),R}}}createPublishSpan(t,n,r,o,i){let a=(0,ai.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Go.SpanKind.PRODUCER,attributes:{...o.connection[ai.CONNECTION_ATTRIBUTES],[Sl.ATTR_MESSAGING_DESTINATION]:n,[Sl.ATTR_MESSAGING_DESTINATION_KIND]:Sl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Sl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Sl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Sl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Go.propagation.inject(Go.trace.setSpan(Go.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[ai.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Go.SpanStatusCode.ERROR,message:r!==Du.EndOperation.ChannelClosed&&r!==Du.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[ai.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[ai.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[ai.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Er.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Go.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,q4.hrTime)(),r=t[ai.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,q4.hrTimeDuration)(a.timeOfConsume,n);if((0,q4.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Du.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};K4.AmqplibInstrumentation=VY});var XNe=Q(x_=>{"use strict";A();Object.defineProperty(x_,"__esModule",{value:!0});x_.EndOperation=x_.DEFAULT_CONFIG=x_.AmqplibInstrumentation=void 0;var K0t=ZNe();Object.defineProperty(x_,"AmqplibInstrumentation",{enumerable:!0,get:function(){return K0t.AmqplibInstrumentation}});var WNe=HY();Object.defineProperty(x_,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return WNe.DEFAULT_CONFIG}});Object.defineProperty(x_,"EndOperation",{enumerable:!0,get:function(){return WNe.EndOperation}})});var eOe,tOe,J0t,nOe,Z0t,rOe,oOe=O(()=>{A();eOe=ie(XNe(),1);fr();tOe="Amqplib",J0t={consumeEndHook:e=>{Or(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Or(e,"auto.amqplib.otel.publisher")}},nOe=it(tOe,()=>new eOe.AmqplibInstrumentation(J0t)),Z0t=()=>({name:tOe,setupOnce(){nOe()}}),rOe=Z0t});var IN,qY=O(()=>{A();IN="VercelAI"});function X0t(e){if(typeof e!="object"||e===null)return!1;let t=e;return"type"in t&&"error"in t&&"toolName"in t&&"toolCallId"in t&&t.type==="tool-error"&&t.error instanceof Error}function eSt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(tSt(t.content),nSt(t.content))}function tSt(e){for(let t of e){if(!X0t(t))continue;let n=P9(t.toolCallId);n?cl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):cl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function nSt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&k9(t.toolCallId)}function rSt(e,t,n,r){let o=e?.recordInputs!==void 0?e.recordInputs:t.recordInputs!==void 0?t.recordInputs:n===!0?!0:r,i=e?.recordOutputs!==void 0?e.recordOutputs:t.recordOutputs!==void 0?t.recordOutputs:n===!0?!0:r;return{recordInputs:o,recordOutputs:i}}var Z4,W0t,iOe,J4,aOe=O(()=>{A();Z4=ie(Xt(),1);dt();qY();W0t=[">=3.0.0 <7"],iOe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];J4=class e extends Z4.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Vn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new Z4.InstrumentationNodeModuleDefinition("ai",W0t,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,m=_t(),h=m?.getIntegrationByName(IN),y=h?.options,S=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:R}=rSt(y,c,d,S);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:R},kp(()=>Reflect.apply(o,i,a),B=>{B&&typeof B=="object"&&ki(B,"_sentry_active_span",Ed())},()=>{},B=>{eSt(B)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of iOe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=iOe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function oSt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var sOe,iSt,uOe,cOe=O(()=>{A();dt();fr();qY();aOe();sOe=it(IN,()=>new J4({}));iSt=(e={})=>{let t;return{name:IN,options:e,setupOnce(){t=sOe()},afterAllSetup(n){e.force??oSt(n)?rU(n):t?.callWhenPatched(()=>rU(n))}}},uOe=iSt});var X4,aSt,W4,lOe=O(()=>{A();X4=ie(Xt(),1);dt();aSt=[">=4.0.0 <7"],W4=class extends X4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Vn,t)}init(){return new X4.InstrumentationNodeModuleDefinition("openai",aSt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...a){if(nS(Xh))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return aU(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var dOe,sSt,pOe,fOe=O(()=>{A();dt();fr();lOe();dOe=it(Xh,e=>new W4(e)),sSt=(e={})=>({name:Xh,setupOnce(){dOe(e)}}),pOe=sSt});var t3,uSt,e3,AOe=O(()=>{A();t3=ie(Xt(),1);dt();uSt=[">=0.19.2 <1.0.0"],e3=class extends t3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Vn,t)}init(){return new t3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",uSt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(nS(e_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return sU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var mOe,cSt,gOe,hOe=O(()=>{A();dt();fr();AOe();mOe=it(e_,e=>new e3(e)),cSt=(e={})=>({name:e_,options:e,setupOnce(){mOe(e)}}),gOe=cSt});var uv,_Oe,n3,EOe=O(()=>{A();uv=ie(Xt(),1);dt();_Oe=[">=0.10.0 <2"],n3=class extends uv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Vn,t)}init(){return new uv.InstrumentationNodeModuleDefinition("@google/genai",_Oe,n=>this._patch(n),n=>n,[new uv.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",_Oe,n=>this._patch(n),n=>n)])}_patch(t){let n=t.GoogleGenAI,r=this.getConfig();if(typeof n!="function")return t;let o=function(...i){if(nS(t_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return uU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}return nB(t,"GoogleGenAI",o),t}}});var SOe,lSt,yOe,TOe=O(()=>{A();dt();fr();EOe();SOe=it(t_,e=>new n3(e)),lSt=(e={})=>({name:t_,setupOnce(){SOe(e)}}),yOe=lSt});function dSt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function pSt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,m=dSt(d,t);return c.callbacks=m,Reflect.apply(r,o,i)}})}var B_,r3,o3,IOe=O(()=>{A();B_=ie(Xt(),1);dt();r3=[">=0.1.0 <2.0.0"];o3=class extends B_.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Vn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new B_.InstrumentationNodeModuleDefinition(r,r3,this._patch.bind(this),o=>o,[new B_.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,r3,this._patch.bind(this),o=>o)]));return t.push(new B_.InstrumentationNodeModuleDefinition("langchain",r3,this._patch.bind(this),r=>r,[new B_.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",r3,this._patch.bind(this),r=>r)])),t}_patch(t){e9([Xh,e_,t_]);let n=pU(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let m=a[d];typeof m=="function"&&(a[d]=pSt(m,n))}}}});var COe,fSt,bOe,vOe=O(()=>{A();dt();fr();IOe();COe=it(cU,e=>new o3(e)),fSt=(e={})=>({name:cU,setupOnce(){COe(e)}}),bOe=fSt});var cv,ROe,i3,DOe=O(()=>{A();cv=ie(Xt(),1);dt();ROe=[">=0.0.0 <2.0.0"],i3=class extends cv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Vn,t)}init(){return new cv.InstrumentationNodeModuleDefinition("@langchain/langgraph",ROe,this._patch.bind(this),n=>n,[new cv.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",ROe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&AU(t.StateGraph.prototype,this.getConfig()),t}}});var xOe,ASt,BOe,NOe=O(()=>{A();dt();fr();DOe();xOe=it(fU,e=>new i3(e)),ASt=(e={})=>({name:fU,setupOnce(){xOe(e)}}),BOe=ASt});import*as wOe from"node:net";function MOe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Jm.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&sl.error(y?.message)},!0)});let d=new Jm.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>OOe(h,n,r,e,a)),m=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of m)d.files.push(new Jm.InstrumentationNodeModuleFile(h,t,y=>OOe(y,n,r,e,a),y=>POe(y,r)));return d}function OOe(e,t,n,r,o){return POe(e,n),t(e,"addDoc",mSt(r,o)),t(e,"getDocs",hSt(r,o)),t(e,"setDoc",_St(r,o)),t(e,"deleteDoc",gSt(r,o)),e}function POe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Jm.isWrapped)(e[n])&&t(e,n);return e}function mSt(e,t){return function(r){return function(o,i){let a=s3(e,"addDoc",o);return t(a),a3(a,()=>r(o,i))}}}function gSt(e,t){return function(r){return function(o){let i=s3(e,"deleteDoc",o.parent||o);return t(i),a3(i,()=>r(o))}}}function hSt(e,t){return function(r){return function(o){let i=s3(e,"getDocs",o);return t(i),a3(i,()=>r(o))}}}function _St(e,t){return function(r){return function(o,i,a){let c=s3(e,"setDoc",o.parent||o);return t(c),a3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function a3(e,t){return qe.with(Ft.setSpan(qe.active(),e),()=>(0,Jm.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function s3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Wr.CLIENT});return SSt(r,n),r.setAttribute(JI,t),r}function ESt(e){let t,n;if(typeof e.host=="string")if(e.host.startsWith("[")){if(e.host.endsWith("]"))t=e.host.replace(/^\[|\]$/g,"");else if(e.host.includes("]:")){let r=e.host.lastIndexOf(":");r!==-1&&(t=e.host.slice(1,r).replace(/^\[|\]$/g,""),n=e.host.slice(r+1))}}else if(wOe.isIPv6(e.host))t=e.host;else{let r=e.host.lastIndexOf(":");r!==-1?(t=e.host.slice(0,r),n=e.host.slice(r+1)):t=e.host}return{address:t,port:n?parseInt(n,10):void 0}}function SSt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[Dz]:t.path,[xz]:n.name,[L0]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:d}=ESt(i);c&&(a[Uz]=c),d&&(a[Lz]=d),e.setAttributes(a)}var Jm,kOe=O(()=>{A();Le();Jm=ie(Xt(),1);$n()});function UOe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,m=o.functions?.responseHook;typeof m=="function"&&(a=(S,C)=>{(0,Zm.safeExecuteInTheMiddle)(()=>m(S,C),R=>{R&&sl.error(R?.message)},!0)}),typeof d=="function"&&(i=S=>{(0,Zm.safeExecuteInTheMiddle)(()=>d(S),C=>{C&&sl.error(C?.message)},!0)});let h=new Zm.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:S,triggerType:C})=>{h.files.push(new Zm.InstrumentationNodeModuleFile(S,t,R=>ySt(R,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),R=>LOe(R,r)))}),h}function xu(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...m){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:Wr.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),qe.with(Ft.setSpan(qe.active(),y),async()=>{let C,R;try{R=await a.apply(this,m)}catch(B){C=B}if(t?.responseHook?.(y,C),C&&y.recordException(C),y.end(),C)throw await t?.errorHook?.(y,C),C;return R})};return c?o.call(this,c,d):o.call(this,d)}}}function ySt(e,t,n,r,o,i){switch(LOe(e,n),i){case"function":t(e,"onRequest",xu(r,o,"http.request")),t(e,"onCall",xu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",xu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",xu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",xu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",xu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",xu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",xu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",xu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",xu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",xu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",xu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",xu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",xu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",xu(r,o,"storage.object.metadataUpdated"));break}return e}function LOe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,Zm.isWrapped)(e[r])&&t(e,r);return e}var Zm,QOe=O(()=>{A();Le();Zm=ie(Xt(),1)});var GOe,FOe,TSt,ISt,u3,jOe=O(()=>{A();GOe=ie(Xt(),1);dt();kOe();QOe();FOe={},TSt=[">=3.0.0 <5"],ISt=[">=6.0.0 <7"],u3=class extends GOe.InstrumentationBase{constructor(t=FOe){super("@sentry/instrumentation-firebase",Vn,t)}setConfig(t={}){super.setConfig({...FOe,...t})}init(){let t=[];return t.push(MOe(this.tracer,TSt,this._wrap,this._unwrap,this.getConfig())),t.push(UOe(this.tracer,ISt,this._wrap,this._unwrap,this.getConfig())),t}}});var HOe,CSt,zOe,bSt,$Oe,VOe=O(()=>{A();dt();fr();jOe();HOe="Firebase",CSt={firestoreSpanCreationHook:e=>{Or(e,"auto.firebase.otel.firestore"),e.setAttribute(Yt,"db.query")},functions:{requestHook:e=>{Or(e,"auto.firebase.otel.functions"),e.setAttribute(Yt,"http.request")},errorHook:async(e,t)=>{t&&(Wt(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Nk(2e3))}}},zOe=it(HOe,()=>new u3(CSt)),bSt=()=>({name:HOe,setupOnce(){zOe()}}),$Oe=bSt});function qOe(){return[Jbe(),BRe(),rDe(),$Be(),zDe(),ixe(),hxe(),xxe(),s1e(),D1e(),vBe(),FBe(),sNe(),SNe(),MNe(),HNe(),SDe(),rOe(),NDe(),bOe(),BOe(),uOe(),pOe(),gOe(),yOe(),O1e(),$Oe()]}var YOe=O(()=>{A();oOe();hOe();yNe();Zbe();wRe();VOe();zNe();TOe();iDe();GBe();VBe();yDe();uNe();vOe();NOe();ODe();$De();axe();_xe();Bxe();fOe();x1e();w1e();RBe();u1e();PNe();cOe()});function JOe(e,t={}){e.getOptions().debug&&Aq();let[n,r]=vSt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function vSt(e,t={}){let n=new KOe.BasicTracerProvider({sampler:new SL(e),resource:(0,c3.defaultResource)().merge((0,c3.resourceFromAttributes)({[Qz]:"node",[Rz]:"sentry",[Fz]:Vn})),forceFlushTimeoutMillis:500,spanProcessors:[new EL({timeout:RSt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ft.setGlobalTracerProvider(n),vp.setGlobalPropagator(new _L);let r=new fq;return qe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function RSt(e){if(e!=null){if(e>YY)return sa&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${YY}`),YY;if(e<=0||Number.isNaN(e)){sa&&Z.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var c3,KOe,YY,ZOe=O(()=>{A();Le();c3=ie(vV(),1),KOe=ie(WV(),1);$n();dt();fr();db();_S();YY=1e6});function WOe(){return xL().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(vbe(),Pbe())}function XOe(e){return[...WOe(),...Si(e)?qOe():[]]}function KY(e={}){return DSt(e,XOe)}function DSt(e={},t){rS(e,"node");let n=vq({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(JOe(n,{spanProcessors:e.openTelemetrySpanProcessors}),Rq()),n}var ewe=O(()=>{A();dt();fr();Rbe();kbe();YOe();ZOe()});var CN=O(()=>{A();ewe();dt()});function jo(){return xSt}function yl(){return twe}function nwe(){return BSt}var xSt,twe,BSt,Tl=O(()=>{"use strict";A();xSt="prod",twe="0.1.59",BSt=`@tanagram/lore/${twe}`});function wSt(e=""){if(!NSt.test(e))return e!==e.toLowerCase()}function rwe(e,t){let n=t??OSt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let m=wSt(c);if(a===!1){if(i===!1&&m===!0){r.push(o),o=c,i=m;continue}if(i===!0&&m===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=m;continue}}o+=c,i=m,a=d}return r.push(o),r}function MSt(e){return e?e[0].toUpperCase()+e.slice(1):""}function PSt(e){return e?e[0].toLowerCase()+e.slice(1):""}function kSt(e,t){return e?(Array.isArray(e)?e:rwe(e)).map(n=>MSt(t?.normalize?n.toLowerCase():n)).join(""):""}function bN(e,t){return PSt(kSt(e||"",t))}function d3(e,t){return e?(Array.isArray(e)?e:rwe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function owe(e){return d3(e||"","_")}var NSt,OSt,iwe=O(()=>{A();NSt=/\d/,OSt=["-","_","/","."]});import{parseArgs as USt}from"node:util";function m3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function JY(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
38
+ Mongoose Error Code: ${t.code}`:""}`})}function D7(e,t,n,r=void 0){n&&(0,KB.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&VDe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Ygt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(D7(t,o,n,r),o)).catch(o=>{throw qDe(t,o),o}).finally(()=>t.end()):(D7(t,e,n,r),t.end(),e)}d_.handlePromiseResponse=Ygt;function Kgt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,m)=>(d?qDe(r,d):D7(r,m,i,a),r.end(),e(d,m)),t.apply(n,o)}d_.handleCallbackResponse=Kgt});var KDe=Q(wb=>{"use strict";A();Object.defineProperty(wb,"__esModule",{value:!0});wb.PACKAGE_NAME=wb.PACKAGE_VERSION=void 0;wb.PACKAGE_VERSION="0.60.0";wb.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var exe=Q(Ec=>{"use strict";A();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.MongooseInstrumentation=Ec._ALREADY_INSTRUMENTED=Ec._STORED_PARENT_SPAN=void 0;var ca=(Le(),we(Je)),Jgt=_r(),x7=YDe(),cs=Xt(),JDe=KDe(),p_=R7(),bS=($n(),we(Nr)),PQ=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Zgt=["remove","count","findOneAndRemove",...PQ],Wgt=["count","findOneAndRemove",...PQ],Xgt=[...PQ];function ZDe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Zgt:e.startsWith("7.")?Wgt:Xgt:PQ}function WDe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function XDe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Ec._STORED_PARENT_SPAN=Symbol("stored-parent-span");Ec._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var B7=class extends cs.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(JDe.PACKAGE_NAME,JDe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,cs.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,cs.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new cs.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,WDe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),XDe(n)&&(this._wrap(r.Model.prototype,"updateOne",this._patchDocumentUpdateMethods("updateOne",n)),this._wrap(r.Model.prototype,"deleteOne",this._patchDocumentUpdateMethods("deleteOne",n))),this._wrap(r.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(r.Aggregate.prototype,"exec",this.patchAggregateExec(n)),ZDe(n).forEach(i=>{this._wrap(r.Query.prototype,i,this.patchAndCaptureSpanContext(i))}),this._wrap(r.Model,"aggregate",this.patchModelAggregate()),this._wrap(r.Model,"insertMany",this.patchModelStatic("insertMany",n)),this._wrap(r.Model,"bulkWrite",this.patchModelStatic("bulkWrite",n)),r}unpatch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t,o=ZDe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,WDe(n)&&this._unwrap(r.Model.prototype,"remove"),XDe(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Ec._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Ec._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Ec._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let m={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,d);r._dbSemconvStability&cs.SemconvStability.OLD&&(m[p_.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&cs.SemconvStability.STABLE&&(m[bS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(y,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,y=c;typeof a=="function"?(m=a,h=void 0,y=void 0):typeof c=="function"&&(m=c,y=void 0);let S={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&cs.SemconvStability.OLD&&(S[p_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&cs.SemconvStability.STABLE&&(S[bS.ATTR_DB_QUERY_TEXT]=N)}let R=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),B=r._handleResponse(R,o,this,arguments,m,n);return B&&typeof B=="object"&&(B[Ec._ALREADY_INSTRUMENTED]=!0),B}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let m={};switch(t){case"insertMany":m.documents=a;break;case"bulkWrite":m.operations=a;break;default:m.document=a;break}c!==void 0&&(m.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let C=y(t,m);r._dbSemconvStability&cs.SemconvStability.OLD&&(h[p_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&cs.SemconvStability.STABLE&&(h[bS.ATTR_DB_QUERY_TEXT]=C)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=ca.trace.getSpan(ca.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Ec._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Ec._STORED_PARENT_SPAN]=ca.trace.getSpan(ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,x7.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&cs.SemconvStability.OLD&&(a[p_.ATTR_DB_OPERATION]=r,a[p_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&cs.SemconvStability.STABLE&&(a[bS.ATTR_DB_OPERATION_NAME]=r,a[bS.ATTR_DB_SYSTEM_NAME]=p_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&cs.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:ca.SpanKind.CLIENT,attributes:a},i?ca.trace.setSpan(ca.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,x7.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,x7.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ca.context.with((0,Jgt.suppressTracing)(ca.context.active()),t):t()}};Ec.MongooseInstrumentation=B7});var txe=Q(kQ=>{"use strict";A();Object.defineProperty(kQ,"__esModule",{value:!0});kQ.MongooseInstrumentation=void 0;var eht=exe();Object.defineProperty(kQ,"MongooseInstrumentation",{enumerable:!0,get:function(){return eht.MongooseInstrumentation}})});var nxe,rxe,oxe,tht,ixe,axe=O(()=>{A();nxe=ie(txe(),1);fr();rxe="Mongoose",oxe=it(rxe,()=>new nxe.MongooseInstrumentation({responseHook(e){Or(e,"auto.db.otel.mongoose")}})),tht=()=>({name:rxe,setupOnce(){oxe()}}),ixe=tht});var sxe=Q(ji=>{"use strict";A();Object.defineProperty(ji,"__esModule",{value:!0});ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ji.DB_SYSTEM_VALUE_MYSQL=ji.ATTR_NET_PEER_PORT=ji.ATTR_NET_PEER_NAME=ji.ATTR_DB_USER=ji.ATTR_DB_SYSTEM=ji.ATTR_DB_STATEMENT=ji.ATTR_DB_NAME=ji.ATTR_DB_CONNECTION_STRING=void 0;ji.ATTR_DB_CONNECTION_STRING="db.connection_string";ji.ATTR_DB_NAME="db.name";ji.ATTR_DB_STATEMENT="db.statement";ji.ATTR_DB_SYSTEM="db.system";ji.ATTR_DB_USER="db.user";ji.ATTR_NET_PEER_NAME="net.peer.name";ji.ATTR_NET_PEER_PORT="net.peer.port";ji.DB_SYSTEM_VALUE_MYSQL="mysql";ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var uxe=Q(JB=>{"use strict";A();Object.defineProperty(JB,"__esModule",{value:!0});JB.AttributeNames=void 0;var nht;(function(e){e.MYSQL_VALUES="db.mysql.values"})(nht=JB.AttributeNames||(JB.AttributeNames={}))});var cxe=Q(Qs=>{"use strict";A();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.getPoolNameOld=Qs.arrayStringifyHelper=Qs.getSpanName=Qs.getDbValues=Qs.getDbQueryText=Qs.getJDBCString=Qs.getConfig=void 0;function rht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Qs.getConfig=rht;function oht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Qs.getJDBCString=oht;function iht(e){return typeof e=="string"?e:e.sql}Qs.getDbQueryText=iht;function aht(e,t){return N7(typeof e=="string"?t:t||e.values)}Qs.getDbValues=aht;function sht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Qs.getSpanName=sht;function N7(e){return e?`[${e.toString()}]`:""}Qs.arrayStringifyHelper=N7;function uht(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}Qs.getPoolNameOld=uht});var lxe=Q(Mb=>{"use strict";A();Object.defineProperty(Mb,"__esModule",{value:!0});Mb.PACKAGE_NAME=Mb.PACKAGE_VERSION=void 0;Mb.PACKAGE_VERSION="0.60.0";Mb.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var pxe=Q(UQ=>{"use strict";A();Object.defineProperty(UQ,"__esModule",{value:!0});UQ.MySQLInstrumentation=void 0;var Sc=(Le(),we(Je)),Dd=Xt(),Pb=($n(),we(Nr)),Ym=sxe(),cht=uxe(),vS=cxe(),dxe=lxe(),O7=class extends Dd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(dxe.PACKAGE_NAME,dxe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Dd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Dd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Ym.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new Dd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Dd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Dd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Dd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,m=(0,vS.getPoolNameOld)(t);r._connCountAdd(-d,m,"used"),r._connCountAdd(-c,m,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),m=c[d].pool;r._setPoolCallbacks(m,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Sc.context.active();return function(o,i){i&&((0,Dd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Sc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:m,database:h,user:y}=(0,vS.getConfig)(t.config),S=parseInt(m,10),C=(0,vS.getDbQueryText)(o);r._dbSemconvStability&Dd.SemconvStability.OLD&&(c[Ym.ATTR_DB_SYSTEM]=Ym.DB_SYSTEM_VALUE_MYSQL,c[Ym.ATTR_DB_CONNECTION_STRING]=(0,vS.getJDBCString)(d,m,h),c[Ym.ATTR_DB_NAME]=h,c[Ym.ATTR_DB_USER]=y,c[Ym.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Dd.SemconvStability.STABLE&&(c[Pb.ATTR_DB_SYSTEM_NAME]=Pb.DB_SYSTEM_NAME_VALUE_MYSQL,c[Pb.ATTR_DB_NAMESPACE]=h,c[Pb.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&Dd.SemconvStability.OLD&&(c[Ym.ATTR_NET_PEER_NAME]=d,isNaN(S)||(c[Ym.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&Dd.SemconvStability.STABLE&&(c[Pb.ATTR_SERVER_ADDRESS]=d,isNaN(S)||(c[Pb.ATTR_SERVER_PORT]=S));let R=r.tracer.startSpan((0,vS.getSpanName)(o),{kind:Sc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let M;Array.isArray(i)?M=i:arguments[2]&&(M=[i]),R.setAttribute(cht.AttributeNames.MYSQL_VALUES,(0,vS.getDbValues)(o,M))}let B=Array.from(arguments).findIndex(M=>typeof M=="function"),N=Sc.context.active();if(B===-1){let M=Sc.context.with(Sc.trace.setSpan(Sc.context.active(),R),()=>n.apply(t,arguments));return Sc.context.bind(N,M),M.on("error",F=>R.setStatus({code:Sc.SpanStatusCode.ERROR,message:F.message})).on("end",()=>{R.end()})}else return r._wrap(arguments,B,r._patchCallbackQuery(R,N)),Sc.context.with(Sc.trace.setSpan(Sc.context.active(),R),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Sc.SpanStatusCode.ERROR,message:o.message}),t.end(),Sc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,vS.getPoolNameOld)(t);t.on("connection",o=>{this._connCountAdd(1,r,"idle")}),t.on("acquire",o=>{this._connCountAdd(-1,r,"idle"),this._connCountAdd(1,r,"used")}),t.on("release",o=>{this._connCountAdd(1,r,"idle"),this._connCountAdd(-1,r,"used")})}};UQ.MySQLInstrumentation=O7});var fxe=Q(LQ=>{"use strict";A();Object.defineProperty(LQ,"__esModule",{value:!0});LQ.MySQLInstrumentation=void 0;var lht=pxe();Object.defineProperty(LQ,"MySQLInstrumentation",{enumerable:!0,get:function(){return lht.MySQLInstrumentation}})});var Axe,mxe,gxe,dht,hxe,_xe=O(()=>{A();Axe=ie(fxe(),1);fr();mxe="Mysql",gxe=it(mxe,()=>new Axe.MySQLInstrumentation({})),dht=()=>({name:mxe,setupOnce(){gxe()}}),hxe=dht});var w7=Q(Ma=>{"use strict";A();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.DB_SYSTEM_VALUE_MYSQL=Ma.ATTR_NET_PEER_PORT=Ma.ATTR_NET_PEER_NAME=Ma.ATTR_DB_USER=Ma.ATTR_DB_SYSTEM=Ma.ATTR_DB_STATEMENT=Ma.ATTR_DB_NAME=Ma.ATTR_DB_CONNECTION_STRING=void 0;Ma.ATTR_DB_CONNECTION_STRING="db.connection_string";Ma.ATTR_DB_NAME="db.name";Ma.ATTR_DB_STATEMENT="db.statement";Ma.ATTR_DB_SYSTEM="db.system";Ma.ATTR_DB_USER="db.user";Ma.ATTR_NET_PEER_NAME="net.peer.name";Ma.ATTR_NET_PEER_PORT="net.peer.port";Ma.DB_SYSTEM_VALUE_MYSQL="mysql"});var P7=Q(QQ=>{"use strict";A();Object.defineProperty(QQ,"__esModule",{value:!0});QQ.addSqlCommenterComment=void 0;var M7=(Le(),we(Je)),pht=_r();function fht(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Aht(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function mht(e,t){if(typeof t!="string"||t.length===0||fht(t))return t;let n=new pht.W3CTraceContextPropagator,r={};n.inject(M7.trace.setSpan(M7.ROOT_CONTEXT,e),r,M7.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=Aht(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}QQ.addSqlCommenterComment=mht});var Exe=Q(xd=>{"use strict";A();Object.defineProperty(xd,"__esModule",{value:!0});xd.getConnectionPrototypeToInstrument=xd.once=xd.getSpanName=xd.getQueryText=xd.getConnectionAttributes=void 0;var ZB=w7(),FQ=Xt(),k7=($n(),we(Nr));function ght(e,t,n){let{host:r,port:o,database:i,user:a}=hht(e),c={};t&FQ.SemconvStability.OLD&&(c[ZB.ATTR_DB_CONNECTION_STRING]=_ht(r,o,i),c[ZB.ATTR_DB_NAME]=i,c[ZB.ATTR_DB_USER]=a),t&FQ.SemconvStability.STABLE&&(c[k7.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&FQ.SemconvStability.OLD&&(c[ZB.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[ZB.ATTR_NET_PEER_PORT]=d)),n&FQ.SemconvStability.STABLE&&(c[k7.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[k7.ATTR_SERVER_PORT]=d)),c}xd.getConnectionAttributes=ght;function hht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function _ht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Eht(e,t,n,r=!1,o=Sht){let[i,a]=typeof e=="string"?[e,n]:[e.sql,yht(e)?n||e.values:n];try{return r?o(i):t&&a?t(i,a):i}catch{return"Could not determine the query due to an error in masking or formatting"}}xd.getQueryText=Eht;function Sht(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function yht(e){return"values"in e}function Tht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}xd.getSpanName=Tht;var Iht=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};xd.once=Iht;function Cht(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}xd.getConnectionPrototypeToInstrument=Cht});var Sxe=Q(kb=>{"use strict";A();Object.defineProperty(kb,"__esModule",{value:!0});kb.PACKAGE_NAME=kb.PACKAGE_VERSION=void 0;kb.PACKAGE_VERSION="0.60.0";kb.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var Cxe=Q(GQ=>{"use strict";A();Object.defineProperty(GQ,"__esModule",{value:!0});GQ.MySQL2Instrumentation=void 0;var yxe=(Le(),we(Je)),jp=Xt(),U7=w7(),Txe=P7(),Ub=Exe(),Ixe=Sxe(),L7=($n(),we(Nr)),Q7=[">=1.4.2 <4"],F7=class extends jp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Ixe.PACKAGE_NAME,Ixe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,jp.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,jp.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new jp.InstrumentationNodeModuleDefinition("mysql2",Q7,i=>(n(i),i),()=>{},[new jp.InstrumentationNodeModuleFile("mysql2/promise.js",Q7,i=>(n(i),i),()=>{}),new jp.InstrumentationNodeModuleFile("mysql2/lib/connection.js",Q7,i=>{let a=(0,Ub.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Ub.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:m,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,Ub.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Ub.getQueryText)(i,t,d,m,h);o._dbSemconvStability&jp.SemconvStability.OLD&&(S[U7.ATTR_DB_SYSTEM]=U7.DB_SYSTEM_VALUE_MYSQL,S[U7.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&jp.SemconvStability.STABLE&&(S[L7.ATTR_DB_SYSTEM_NAME]=L7.DB_SYSTEM_NAME_VALUE_MYSQL,S[L7.ATTR_DB_QUERY_TEXT]=C);let R=o.tracer.startSpan((0,Ub.getSpanName)(i),{kind:yxe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,Txe.addSqlCommenterComment)(R,i):Object.assign(i,{sql:(0,Txe.addSqlCommenterComment)(R,i.sql)}));let B=(0,Ub.once)((N,M)=>{N?R.setStatus({code:yxe.SpanStatusCode.ERROR,message:N.message}):typeof y=="function"&&(0,jp.safeExecuteInTheMiddle)(()=>{y(R,{queryResults:M})},F=>{F&&o._diag.warn("Failed executing responseHook",F)},!0),R.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(B));let N=r.apply(this,arguments);return N.once("error",M=>{B(M)}).once("result",M=>{B(void 0,M)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(B)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(B)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};GQ.MySQL2Instrumentation=F7});var bxe=Q(jQ=>{"use strict";A();Object.defineProperty(jQ,"__esModule",{value:!0});jQ.MySQL2Instrumentation=void 0;var bht=Cxe();Object.defineProperty(jQ,"MySQL2Instrumentation",{enumerable:!0,get:function(){return bht.MySQL2Instrumentation}})});var vxe,Rxe,Dxe,vht,xxe,Bxe=O(()=>{A();vxe=ie(bxe(),1);fr();Rxe="Mysql2",Dxe=it(Rxe,()=>new vxe.MySQL2Instrumentation({responseHook(e){Or(e,"auto.db.otel.mysql2")}})),vht=()=>({name:Rxe,setupOnce(){Dxe()}}),xxe=vht});var Nxe=Q(Fs=>{"use strict";A();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.DB_SYSTEM_VALUE_REDIS=Fs.DB_SYSTEM_NAME_VALUE_REDIS=Fs.ATTR_NET_PEER_PORT=Fs.ATTR_NET_PEER_NAME=Fs.ATTR_DB_SYSTEM=Fs.ATTR_DB_STATEMENT=Fs.ATTR_DB_CONNECTION_STRING=void 0;Fs.ATTR_DB_CONNECTION_STRING="db.connection_string";Fs.ATTR_DB_STATEMENT="db.statement";Fs.ATTR_DB_SYSTEM="db.system";Fs.ATTR_NET_PEER_NAME="net.peer.name";Fs.ATTR_NET_PEER_PORT="net.peer.port";Fs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Fs.DB_SYSTEM_VALUE_REDIS="redis"});var Oxe=Q(HQ=>{"use strict";A();Object.defineProperty(HQ,"__esModule",{value:!0});HQ.endSpan=void 0;var Rht=(Le(),we(Je)),Dht=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:Rht.SpanStatusCode.ERROR,message:t.message})),e.end()};HQ.endSpan=Dht});var $Q=Q(zQ=>{"use strict";A();Object.defineProperty(zQ,"__esModule",{value:!0});zQ.defaultDbStatementSerializer=void 0;var xht=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}],Bht=(e,t)=>{if(Array.isArray(t)&&t.length){let n=xht.find(({regex:o})=>o.test(e))?.args??0,r=n>=0?t.slice(0,n):t;return t.length>r.length&&r.push(`[${t.length-n} other arguments]`),`${e} ${r.join(" ")}`}return e};zQ.defaultDbStatementSerializer=Bht});var wxe=Q(Lb=>{"use strict";A();Object.defineProperty(Lb,"__esModule",{value:!0});Lb.PACKAGE_NAME=Lb.PACKAGE_VERSION=void 0;Lb.PACKAGE_VERSION="0.62.0";Lb.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var Uxe=Q(VQ=>{"use strict";A();Object.defineProperty(VQ,"__esModule",{value:!0});VQ.IORedisInstrumentation=void 0;var f_=(Le(),we(Je)),yc=Xt(),A_=($n(),we(Nr)),Tc=Nxe(),Mxe=Xt(),WB=Oxe(),Nht=$Q(),Pxe=wxe(),kxe={requireParentSpan:!0},G7=class extends yc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Pxe.PACKAGE_NAME,Pxe.PACKAGE_VERSION,{...kxe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,yc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,yc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...kxe,...t})}init(){return[new yc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,yc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,yc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),a=i.dbStatementSerializer||Nht.defaultDbStatementSerializer,c=f_.trace.getSpan(f_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:m,port:h}=this.options,y=a(o.name,o.args);r._dbSemconvStability&yc.SemconvStability.OLD&&(d[Tc.ATTR_DB_SYSTEM]=Tc.DB_SYSTEM_VALUE_REDIS,d[Tc.ATTR_DB_STATEMENT]=y,d[Tc.ATTR_DB_CONNECTION_STRING]=`redis://${m}:${h}`),r._dbSemconvStability&yc.SemconvStability.STABLE&&(d[A_.ATTR_DB_SYSTEM_NAME]=Tc.DB_SYSTEM_NAME_VALUE_REDIS,d[A_.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&yc.SemconvStability.OLD&&(d[Tc.ATTR_NET_PEER_NAME]=m,d[Tc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&yc.SemconvStability.STABLE&&(d[A_.ATTR_SERVER_ADDRESS]=m,d[A_.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:f_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,Mxe.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),R=>{R&&f_.diag.error("ioredis instrumentation: request hook failed",R)},!0);try{let R=t.apply(this,arguments),B=o.resolve;o.resolve=function(M){(0,Mxe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,M),F=>{F&&f_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,WB.endSpan)(S,null),B(M)};let N=o.reject;return o.reject=function(M){(0,WB.endSpan)(S,M),N(M)},R}catch(R){throw(0,WB.endSpan)(S,R),R}}}_traceConnection(t){let n=this;return function(){let r=f_.trace.getSpan(f_.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&yc.SemconvStability.OLD&&(o[Tc.ATTR_DB_SYSTEM]=Tc.DB_SYSTEM_VALUE_REDIS,o[Tc.ATTR_DB_STATEMENT]="connect",o[Tc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&yc.SemconvStability.STABLE&&(o[A_.ATTR_DB_SYSTEM_NAME]=Tc.DB_SYSTEM_NAME_VALUE_REDIS,o[A_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&yc.SemconvStability.OLD&&(o[Tc.ATTR_NET_PEER_NAME]=i,o[Tc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&yc.SemconvStability.STABLE&&(o[A_.ATTR_SERVER_ADDRESS]=i,o[A_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:f_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,WB.endSpan)(c,null),d}catch(d){throw(0,WB.endSpan)(c,d),d}}}};VQ.IORedisInstrumentation=G7});var Lxe=Q(qQ=>{"use strict";A();Object.defineProperty(qQ,"__esModule",{value:!0});qQ.IORedisInstrumentation=void 0;var Oht=Uxe();Object.defineProperty(qQ,"IORedisInstrumentation",{enumerable:!0,get:function(){return Oht.IORedisInstrumentation}})});var YQ=Q(Qb=>{"use strict";A();Object.defineProperty(Qb,"__esModule",{value:!0});Qb.PACKAGE_NAME=Qb.PACKAGE_VERSION=void 0;Qb.PACKAGE_VERSION="0.62.0";Qb.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var Qxe=Q(m_=>{"use strict";A();Object.defineProperty(m_,"__esModule",{value:!0});m_.getTracedCreateStreamTrace=m_.getTracedCreateClient=m_.endSpan=void 0;var XB=(Le(),we(Je)),wht=(e,t)=>{t&&e.setStatus({code:XB.SpanStatusCode.ERROR,message:t.message}),e.end()};m_.endSpan=wht;var Mht=e=>function(){let n=e.apply(this,arguments);return XB.context.bind(XB.context.active(),n)};m_.getTracedCreateClient=Mht;var Pht=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){XB.context.bind(XB.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};m_.getTracedCreateStreamTrace=Pht});var KQ=Q(Gs=>{"use strict";A();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.DB_SYSTEM_VALUE_REDIS=Gs.DB_SYSTEM_NAME_VALUE_REDIS=Gs.ATTR_NET_PEER_PORT=Gs.ATTR_NET_PEER_NAME=Gs.ATTR_DB_SYSTEM=Gs.ATTR_DB_STATEMENT=Gs.ATTR_DB_CONNECTION_STRING=void 0;Gs.ATTR_DB_CONNECTION_STRING="db.connection_string";Gs.ATTR_DB_STATEMENT="db.statement";Gs.ATTR_DB_SYSTEM="db.system";Gs.ATTR_NET_PEER_NAME="net.peer.name";Gs.ATTR_NET_PEER_PORT="net.peer.port";Gs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Gs.DB_SYSTEM_VALUE_REDIS="redis"});var Gxe=Q(ZQ=>{"use strict";A();Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.RedisInstrumentationV2_V3=void 0;var _l=Xt(),JQ=Qxe(),Fxe=YQ(),eN=(Le(),we(Je)),tN=($n(),we(Nr)),RS=KQ(),kht=$Q(),j7=class e extends _l.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(Fxe.PACKAGE_NAME,Fxe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,_l.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,_l.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new _l.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,_l.isWrapped)(t.RedisClient.prototype.internal_send_command)&&this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._wrap(t.RedisClient.prototype,"internal_send_command",this._getPatchInternalSendCommand()),(0,_l.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,_l.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let a=t.getConfig(),c=eN.trace.getSpan(eN.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||kht.defaultDbStatementSerializer,m={};t._semconvStability&_l.SemconvStability.OLD&&Object.assign(m,{[RS.ATTR_DB_SYSTEM]:RS.DB_SYSTEM_VALUE_REDIS,[RS.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&_l.SemconvStability.STABLE&&Object.assign(m,{[tN.ATTR_DB_SYSTEM_NAME]:RS.DB_SYSTEM_NAME_VALUE_REDIS,[tN.ATTR_DB_OPERATION_NAME]:i.command,[tN.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:eN.SpanKind.CLIENT,attributes:m});if(this.connection_options){let S={};t._semconvStability&_l.SemconvStability.OLD&&Object.assign(S,{[RS.ATTR_NET_PEER_NAME]:this.connection_options.host,[RS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&_l.SemconvStability.STABLE&&Object.assign(S,{[tN.ATTR_SERVER_ADDRESS]:this.connection_options.host,[tN.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&_l.SemconvStability.OLD&&h.setAttribute(RS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=eN.context.active();arguments[0].callback=function(R,B){if(a?.responseHook){let N=a.responseHook;(0,_l.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,B)},M=>{M&&t._diag.error("Error executing responseHook",M)},!0)}return(0,JQ.endSpan)(h,R),eN.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,JQ.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,JQ.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,JQ.getTracedCreateStreamTrace)(n)}}};ZQ.RedisInstrumentationV2_V3=j7});var Hxe=Q(WQ=>{"use strict";A();Object.defineProperty(WQ,"__esModule",{value:!0});WQ.getClientAttributes=void 0;var H7=($n(),we(Nr)),Fb=KQ(),jxe=Xt();function Uht(e,t,n){let r={};return n&jxe.SemconvStability.OLD&&Object.assign(r,{[Fb.ATTR_DB_SYSTEM]:Fb.DB_SYSTEM_VALUE_REDIS,[Fb.ATTR_NET_PEER_NAME]:t?.socket?.host,[Fb.ATTR_NET_PEER_PORT]:t?.socket?.port,[Fb.ATTR_DB_CONNECTION_STRING]:Lht(e,t?.url)}),n&jxe.SemconvStability.STABLE&&Object.assign(r,{[H7.ATTR_DB_SYSTEM_NAME]:Fb.DB_SYSTEM_NAME_VALUE_REDIS,[H7.ATTR_SERVER_ADDRESS]:t?.socket?.host,[H7.ATTR_SERVER_PORT]:t?.socket?.port}),r}WQ.getClientAttributes=Uht;function Lht(e,t){if(!(typeof t!="string"||!t))try{let n=new URL(t);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){e.error("failed to sanitize redis connection url",n)}}});var qxe=Q(XQ=>{"use strict";A();Object.defineProperty(XQ,"__esModule",{value:!0});XQ.RedisInstrumentationV4_V5=void 0;var Bd=(Le(),we(Je)),lo=Xt(),zxe=Hxe(),Qht=$Q(),$xe=YQ(),z7=($n(),we(Nr)),Fht=KQ(),nN=Symbol("opentelemetry.instrumentation.redis.open_spans"),Vxe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),$7=class e extends lo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super($xe.PACKAGE_NAME,$xe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,lo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,lo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,lo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,lo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,lo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,lo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new lo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,m){let h=t(d,m).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[nN];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[nN];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let m=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,m,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[Vxe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,a=(0,zxe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Bd.SpanKind.CLIENT,attributes:a});return Bd.context.with(Bd.trace.setSpan(Bd.context.active(),c),()=>r.apply(this)).then(m=>(c.end(),m)).catch(m=>(c.recordException(m),c.setStatus({code:Bd.SpanStatusCode.ERROR,message:m.message}),c.end(),Promise.reject(m)))}}}_traceClientCommand(t,n,r,o){if(Bd.trace.getSpan(Bd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[Vxe],c=o[0],d=o.slice(1),m=this.getConfig().dbStatementSerializer||Qht.defaultDbStatementSerializer,h=(0,zxe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&lo.SemconvStability.STABLE&&(h[z7.ATTR_DB_OPERATION_NAME]=c);try{let C=m(c,d);C!=null&&(this._semconvStability&lo.SemconvStability.OLD&&(h[Fht.ATTR_DB_STATEMENT]=C),this._semconvStability&lo.SemconvStability.STABLE&&(h[z7.ATTR_DB_QUERY_TEXT]=C))}catch(C){this._diag.error("dbStatementSerializer throw an exception",C,{commandName:c})}let y=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:Bd.SpanKind.CLIENT,attributes:h}),S=Bd.context.with(Bd.trace.setSpan(Bd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(C=>{this._endSpanWithResponse(y,c,d,C,void 0)},C=>{this._endSpanWithResponse(y,c,d,null,C)});else{let C=S;C[nN]=C[nN]||[],C[nN].push({span:y,commandName:c,commandArgs:d})}return S}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:m}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&lo.SemconvStability.STABLE&&d.setAttribute(z7.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],m,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Bd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};XQ.RedisInstrumentationV4_V5=$7});var Jxe=Q(e4=>{"use strict";A();Object.defineProperty(e4,"__esModule",{value:!0});e4.RedisInstrumentation=void 0;var Ght=Xt(),Yxe=YQ(),jht=Gxe(),Hht=qxe(),Kxe={requireParentSpan:!1},V7=class extends Ght.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...Kxe,...t};super(Yxe.PACKAGE_NAME,Yxe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new jht.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new Hht.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...Kxe,...t};super.setConfig(n),this.initialized&&(this.instrumentationV2_V3.setConfig(n),this.instrumentationV4_V5.setConfig(n))}init(){}getModuleDefinitions(){return[...this.instrumentationV2_V3.getModuleDefinitions(),...this.instrumentationV4_V5.getModuleDefinitions()]}setTracerProvider(t){super.setTracerProvider(t),this.initialized&&(this.instrumentationV2_V3.setTracerProvider(t),this.instrumentationV4_V5.setTracerProvider(t))}enable(){super.enable(),this.initialized&&(this.instrumentationV2_V3.enable(),this.instrumentationV4_V5.enable())}disable(){super.disable(),this.initialized&&(this.instrumentationV2_V3.disable(),this.instrumentationV4_V5.disable())}};e4.RedisInstrumentation=V7});var Zxe=Q(t4=>{"use strict";A();Object.defineProperty(t4,"__esModule",{value:!0});t4.RedisInstrumentation=void 0;var zht=Jxe();Object.defineProperty(t4,"RedisInstrumentation",{enumerable:!0,get:function(){return zht.RedisInstrumentation}})});function rN(e,t){return e.includes(t.toLowerCase())}function Y7(e){return rN(q7,e)?"cache.get":rN(Vht,e)?"cache.put":void 0}function qht(e,t){return t.some(n=>e.startsWith(n))}function Xxe(e,t){try{if(t.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?Wxe(o.map(i=>n(i))):["<unknown>"],r=t[0];return rN($ht,e)&&r!=null?n(r):Wxe(t.map(o=>n(o)))}catch{return}}function e1e(e,t,n){if(!Y7(e))return!1;for(let r of t)if(qht(r,n))return!0;return!1}function t1e(e){let t=n=>{try{return Buffer.isBuffer(n)?n.byteLength:typeof n=="string"?n.length:typeof n=="number"?n.toString().length:n==null?0:JSON.stringify(n).length}catch{return}};return Array.isArray(e)?e.reduce((n,r)=>{let o=t(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):t(e)}function Wxe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var $ht,q7,Vht,n1e=O(()=>{A();$ht=["get","set","setex"],q7=["get","mget"],Vht=["set","setex"]});var r1e,o1e,n4,oN,i1e,Yht,Kht,a1e,Jht,s1e,u1e=O(()=>{A();r1e=ie(Lxe(),1),o1e=ie(Zxe(),1);dt();fr();n1e();n4="Redis",oN={},i1e=(e,t,n,r)=>{e.setAttribute(Nt,"auto.db.otel.redis");let o=Xxe(t,n),i=Y7(t);if(!o||!i||!oN.cachePrefixes||!e1e(t,o,oN.cachePrefixes))return;let a=xt(e).data["net.peer.name"],c=xt(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=t1e(r);d&&e.setAttribute(g$,d),rN(q7,t)&&d!==void 0&&e.setAttribute(A$,d>0),e.setAttributes({[Yt]:i,[m$]:o});let m=o.join(", ");e.updateName(oN.maxCacheKeyLength?xh(m,oN.maxCacheKeyLength):m)},Yht=it(`${n4}.IORedis`,()=>new r1e.IORedisInstrumentation({responseHook:i1e})),Kht=it(`${n4}.Redis`,()=>new o1e.RedisInstrumentation({responseHook:i1e})),a1e=Object.assign(()=>{Yht(),Kht()},{id:n4}),Jht=(e={})=>({name:n4,setupOnce(){oN=e,a1e()}}),s1e=Jht});var c1e=Q(r4=>{"use strict";A();Object.defineProperty(r4,"__esModule",{value:!0});r4.EVENT_LISTENERS_SET=void 0;r4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var K7=Q(iN=>{"use strict";A();Object.defineProperty(iN,"__esModule",{value:!0});iN.AttributeNames=void 0;var Zht;(function(e){e.PG_VALUES="db.postgresql.values",e.PG_PLAN="db.postgresql.plan",e.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",e.MAX_CLIENT="db.postgresql.max.client"})(Zht=iN.AttributeNames||(iN.AttributeNames={}))});var J7=Q(Cr=>{"use strict";A();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Cr.METRIC_DB_CLIENT_CONNECTION_COUNT=Cr.DB_SYSTEM_VALUE_POSTGRESQL=Cr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Cr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Cr.ATTR_NET_PEER_PORT=Cr.ATTR_NET_PEER_NAME=Cr.ATTR_DB_USER=Cr.ATTR_DB_SYSTEM=Cr.ATTR_DB_STATEMENT=Cr.ATTR_DB_NAME=Cr.ATTR_DB_CONNECTION_STRING=Cr.ATTR_DB_CLIENT_CONNECTION_STATE=Cr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Cr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Cr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Cr.ATTR_DB_CONNECTION_STRING="db.connection_string";Cr.ATTR_DB_NAME="db.name";Cr.ATTR_DB_STATEMENT="db.statement";Cr.ATTR_DB_SYSTEM="db.system";Cr.ATTR_DB_USER="db.user";Cr.ATTR_NET_PEER_NAME="net.peer.name";Cr.ATTR_NET_PEER_PORT="net.peer.port";Cr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Cr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Cr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Cr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Cr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var Z7=Q(aN=>{"use strict";A();Object.defineProperty(aN,"__esModule",{value:!0});aN.SpanNames=void 0;var Wht;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Wht=aN.SpanNames||(aN.SpanNames={}))});var g1e=Q(Xn=>{"use strict";A();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.sanitizedErrorMessage=Xn.isObjectWithTextString=Xn.getErrorMessage=Xn.patchClientConnectCallback=Xn.patchCallbackPGPool=Xn.updateCounter=Xn.getPoolName=Xn.patchCallback=Xn.handleExecutionResult=Xn.handleConfigQuery=Xn.shouldSkipInstrumentation=Xn.getSemanticAttributesFromPoolConnection=Xn.getSemanticAttributesFromConnection=Xn.getConnectionString=Xn.parseAndMaskConnectionString=Xn.parseNormalizedOperationName=Xn.getQuerySpanName=void 0;var g_=(Le(),we(Je)),o4=K7(),Nd=($n(),we(Nr)),ri=J7(),DS=Xt(),l1e=Z7();function d1e(e,t){if(!t)return l1e.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:p1e(t.text);return`${l1e.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}Xn.getQuerySpanName=d1e;function p1e(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}Xn.parseNormalizedOperationName=p1e;function f1e(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}Xn.parseAndMaskConnectionString=f1e;function W7(e){if("connectionString"in e&&e.connectionString)return f1e(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}Xn.getConnectionString=W7;function i4(e){if(Number.isInteger(e))return e}function A1e(e,t){let n={};return t&DS.SemconvStability.OLD&&(n={...n,[ri.ATTR_DB_SYSTEM]:ri.DB_SYSTEM_VALUE_POSTGRESQL,[ri.ATTR_DB_NAME]:e.database,[ri.ATTR_DB_CONNECTION_STRING]:W7(e),[ri.ATTR_DB_USER]:e.user,[ri.ATTR_NET_PEER_NAME]:e.host,[ri.ATTR_NET_PEER_PORT]:i4(e.port)}),t&DS.SemconvStability.STABLE&&(n={...n,[Nd.ATTR_DB_SYSTEM_NAME]:Nd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Nd.ATTR_DB_NAMESPACE]:e.namespace,[Nd.ATTR_SERVER_ADDRESS]:e.host,[Nd.ATTR_SERVER_PORT]:i4(e.port)}),n}Xn.getSemanticAttributesFromConnection=A1e;function Xht(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[o4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[o4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&DS.SemconvStability.OLD&&(r={...r,[ri.ATTR_DB_SYSTEM]:ri.DB_SYSTEM_VALUE_POSTGRESQL,[ri.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[ri.ATTR_DB_CONNECTION_STRING]:W7(e),[ri.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[ri.ATTR_NET_PEER_PORT]:Number(n?.port)||i4(e.port),[ri.ATTR_DB_USER]:n?.username??e.user}),t&DS.SemconvStability.STABLE&&(r={...r,[Nd.ATTR_DB_SYSTEM_NAME]:Nd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Nd.ATTR_DB_NAMESPACE]:e.namespace,[Nd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Nd.ATTR_SERVER_PORT]:Number(n?.port)||i4(e.port)}),r}Xn.getSemanticAttributesFromPoolConnection=Xht;function e_t(e){return e.requireParentSpan===!0&&g_.trace.getSpan(g_.context.active())===void 0}Xn.shouldSkipInstrumentation=e_t;function t_t(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=d1e(i,r),c=e.startSpan(a,{kind:g_.SpanKind.CLIENT,attributes:A1e(o,n)});if(!r)return c;if(r.text&&(n&DS.SemconvStability.OLD&&c.setAttribute(ri.ATTR_DB_STATEMENT,r.text),n&DS.SemconvStability.STABLE&&c.setAttribute(Nd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(m=>m==null?"null":m instanceof Buffer?m.toString():typeof m=="object"?typeof m.toPostgres=="function"?m.toPostgres():JSON.stringify(m):m.toString());c.setAttribute(o4.AttributeNames.PG_VALUES,d)}catch(d){g_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(o4.AttributeNames.PG_PLAN,r.name),c}Xn.handleConfigQuery=t_t;function m1e(e,t,n){typeof e.responseHook=="function"&&(0,DS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&g_.diag.error("Error running response hook",r)},!0)}Xn.handleExecutionResult=m1e;function n_t(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Nd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(a4(a)),t.setStatus({code:g_.SpanStatusCode.ERROR,message:a.message})):m1e(e,t,c),o(),t.end(),n.call(this,a,c)}}Xn.patchCallback=n_t;function r_t(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}Xn.getPoolName=r_t;function o_t(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[ri.ATTR_DB_CLIENT_CONNECTION_STATE]:ri.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[ri.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[ri.ATTR_DB_CLIENT_CONNECTION_STATE]:ri.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[ri.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[ri.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}Xn.updateCounter=o_t;function i_t(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(a4(r)),e.setStatus({code:g_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}Xn.patchCallbackPGPool=i_t;function a_t(e,t){return function(r){r&&(r instanceof Error&&e.recordException(a4(r)),e.setStatus({code:g_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}Xn.patchClientConnectCallback=a_t;function s_t(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}Xn.getErrorMessage=s_t;function u_t(e){return typeof e=="object"&&typeof e?.text=="string"}Xn.isObjectWithTextString=u_t;function a4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}Xn.sanitizedErrorMessage=a4});var h1e=Q(Gb=>{"use strict";A();Object.defineProperty(Gb,"__esModule",{value:!0});Gb.PACKAGE_NAME=Gb.PACKAGE_VERSION=void 0;Gb.PACKAGE_VERSION="0.66.0";Gb.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var I1e=Q(u4=>{"use strict";A();Object.defineProperty(u4,"__esModule",{value:!0});u4.PgInstrumentation=void 0;var bu=Xt(),Mr=(Le(),we(Je)),_1e=c1e(),Fo=g1e(),E1e=P7(),S1e=h1e(),y1e=Z7(),s4=_r(),Hp=($n(),we(Nr)),sN=J7();function jb(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var X7=class extends bu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(S1e.PACKAGE_NAME,S1e.PACKAGE_VERSION,t),this._semconvStability=(0,bu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Hp.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Mr.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(sN.METRIC_DB_CLIENT_CONNECTION_COUNT,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"}),this._connectionPendingRequests=this.meter.createUpDownCounter(sN.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new bu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new bu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new bu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=jb(c);return this._patchPgClient(d.Client),c},c=>{let d=jb(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new bu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=jb(c);return(0,bu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=jb(c);(0,bu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=jb(t);return(0,bu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,bu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=jb(t);return(0,bu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,bu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(y1e.SpanNames.CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchClientConnectCallback(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return T1e(a,c)}}recordOperationDuration(t,n){let r={},o=[Hp.ATTR_DB_NAMESPACE,Hp.ATTR_ERROR_TYPE,Hp.ATTR_SERVER_PORT,Hp.ATTR_SERVER_ADDRESS,Hp.ATTR_DB_OPERATION_NAME];this._semconvStability&bu.SemconvStability.OLD&&o.push(sN.ATTR_DB_SYSTEM),this._semconvStability&bu.SemconvStability.STABLE&&o.push(Hp.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,s4.hrTimeToMilliseconds)((0,s4.hrTimeDuration)(n,(0,s4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Fo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,s4.hrTime)(),a=o[0],c=typeof a=="string",d=Fo.isObjectWithTextString(a),m=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[sN.ATTR_DB_SYSTEM]:sN.DB_SYSTEM_VALUE_POSTGRESQL,[Hp.ATTR_DB_NAMESPACE]:this.database,[Hp.ATTR_SERVER_PORT]:this.connectionParameters.port,[Hp.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};m?.text&&(h[Hp.ATTR_DB_OPERATION_NAME]=Fo.parseNormalizedOperationName(m?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),C=Fo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,m);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,E1e.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,E1e.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Mr.trace.getSpan(Mr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Fo.patchCallback(S,C,o[o.length-1],h,y),N&&(o[o.length-1]=Mr.context.bind(Mr.context.active(),o[o.length-1]));else if(typeof m?.callback=="function"){let M=Fo.patchCallback(t.getConfig(),C,m.callback,h,y);N&&(M=Mr.context.bind(Mr.context.active(),M)),o[0].callback=M}}let{requestHook:R}=S;typeof R=="function"&&m&&(0,bu.safeExecuteInTheMiddle)(()=>{let{database:N,host:M,port:F,user:H}=this.connectionParameters;R(C,{connection:{database:N,host:M,port:F,user:H},query:{text:m.text,values:m.values,name:m.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let B;try{B=n.apply(this,o)}catch(N){throw N instanceof Error&&C.recordException(Fo.sanitizedErrorMessage(N)),C.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(N)}),C.end(),N}return B instanceof Promise?B.then(N=>new Promise(M=>{Fo.handleExecutionResult(t.getConfig(),C,N),y(),C.end(),M(N)})).catch(N=>new Promise((M,F)=>{N instanceof Error&&C.recordException(Fo.sanitizedErrorMessage(N)),C.setStatus({code:Mr.SpanStatusCode.ERROR,message:N.message}),y(),C.end(),F(N)})):B})}_setPoolConnectEventListeners(t){if(t[_1e.EVENT_LISTENERS_SET])return;let n=Fo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[_1e.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(y1e.SpanNames.POOL_CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchCallbackPGPool(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return T1e(a,c)}}};u4.PgInstrumentation=X7;function T1e(e,t){if(!(t instanceof Promise))return t;let n=t;return Mr.context.bind(Mr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Fo.sanitizedErrorMessage(r)),e.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var C1e=Q(Hb=>{"use strict";A();Object.defineProperty(Hb,"__esModule",{value:!0});Hb.AttributeNames=Hb.PgInstrumentation=void 0;var c_t=I1e();Object.defineProperty(Hb,"PgInstrumentation",{enumerable:!0,get:function(){return c_t.PgInstrumentation}});var l_t=K7();Object.defineProperty(Hb,"AttributeNames",{enumerable:!0,get:function(){return l_t.AttributeNames}})});var b1e,v1e,R1e,d_t,D1e,x1e=O(()=>{A();b1e=ie(C1e(),1);fr();v1e="Postgres",R1e=it(v1e,b1e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Or(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),d_t=e=>({name:v1e,setupOnce(){R1e(e)}}),D1e=d_t});var h_,tY,B1e,p_t,f_t,N1e,eY,A_t,O1e,w1e=O(()=>{A();Le();h_=ie(Xt(),1);$n();dt();fr();_S();tY="PostgresJs",B1e=[">=3.0.0 <4"],p_t=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,f_t=Symbol.for("sentry.query.from.instrumented.sql"),N1e=it(tY,e=>new eY({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),eY=class extends h_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Vn,t)}init(){let t=new h_.InstrumentationNodeModuleDefinition("postgres",B1e,n=>{try{return this._patchPostgres(n)}catch(r){return sa&&Z.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new h_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,B1e,this._patchQueryPrototype.bind(this),this._unpatchQueryPrototype.bind(this)))}),t}_patchPostgres(t){let n=typeof t=="function",r=n?t:t.default;if(typeof r!="function")return sa&&Z.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...a){let c=Reflect.construct(r,a);if(!c||typeof c!="function")return sa&&Z.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return p9(c,{requireParentSpan:d.requireParentSpan,requestHook:d.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(nB(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ft.getSpan(qe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(JI,r);return}let o=n?.match(p_t);o?.[1]&&t.setAttribute(JI,o[1].toUpperCase())}_reconstructQuery(t){if(t?.length)return t.length===1?t[0]||void 0:t.reduce((n,r,o)=>o===0?r:`${n}$${o}${r}`,"")}_sanitizeSqlQuery(t){return t?t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\s+/g," ").trim().replace(/\bX'[0-9A-Fa-f]*'/gi,"?").replace(/\bB'[01]*'/gi,"?").replace(/'(?:[^']|'')*'/g,"?").replace(/\b0x[0-9A-Fa-f]+/gi,"?").replace(/\b(?:TRUE|FALSE)\b/gi,"?").replace(/-?\b\d+\.?\d*[eE][+-]?\d+\b/g,"?").replace(/-?\b\d+\.\d+\b/g,"?").replace(/-?\.\d+\b/g,"?").replace(/(?<!\$)-?\b\d+\b/g,"?").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/gi,"IN (?)").replace(/\bIN\b\s*\(\s*\$\d+(?:\s*,\s*\$\d+)*\s*\)/gi,"IN ($?)"):"Unknown SQL Query"}_patchQueryPrototype(t){let n=this,r=t.Query.prototype.handle;return t.Query.prototype.handle=async function(...o){if(this[f_t])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Ba({name:a||"postgresjs.query",op:"db"},c=>{Or(c,"auto.db.postgresjs"),c.setAttributes({[L0]:"postgres",[Bz]:a});let d=n.getConfig(),{requestHook:m}=d;m&&(0,h_.safeExecuteInTheMiddle)(()=>m(c,a,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),sa&&Z.error(`Error in requestHook for ${tY} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,C,R)=>{try{n._setOperationName(c,a,R?.[0]?.command),c.end()}catch(B){sa&&Z.error("Error ending span in resolve callback:",B)}return Reflect.apply(S,C,R)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,C,R)=>{try{c.setStatus({code:2,message:R?.[0]?.message||"unknown_error"}),c.setAttribute(Nz,R?.[0]?.code||"unknown"),c.setAttribute(Oz,R?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(B){sa&&Z.error("Error ending span in reject callback:",B)}return Reflect.apply(S,C,R)}});try{return r.apply(this,o)}catch(S){throw c.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),c.end(),S}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},A_t=e=>({name:tY,setupOnce(){N1e(e)}}),O1e=A_t});var M1e=Q(uN=>{"use strict";A();Object.defineProperty(uN,"__esModule",{value:!0});uN.SeverityNumber=void 0;var m_t;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(m_t=uN.SeverityNumber||(uN.SeverityNumber={}))});var l4=Q(zb=>{"use strict";A();Object.defineProperty(zb,"__esModule",{value:!0});zb.NOOP_LOGGER=zb.NoopLogger=void 0;var c4=class{emit(t){}};zb.NoopLogger=c4;zb.NOOP_LOGGER=new c4});var p4=Q($b=>{"use strict";A();Object.defineProperty($b,"__esModule",{value:!0});$b.NOOP_LOGGER_PROVIDER=$b.NoopLoggerProvider=void 0;var g_t=l4(),d4=class{getLogger(t,n,r){return new g_t.NoopLogger}};$b.NoopLoggerProvider=d4;$b.NOOP_LOGGER_PROVIDER=new d4});var rY=Q(f4=>{"use strict";A();Object.defineProperty(f4,"__esModule",{value:!0});f4.ProxyLogger=void 0;var h_t=l4(),nY=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):h_t.NOOP_LOGGER}};f4.ProxyLogger=nY});var iY=Q(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.ProxyLoggerProvider=void 0;var __t=p4(),E_t=rY(),oY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new E_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:__t.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};A4.ProxyLoggerProvider=oY});var P1e=Q(m4=>{"use strict";A();Object.defineProperty(m4,"__esModule",{value:!0});m4._globalThis=void 0;m4._globalThis=typeof globalThis=="object"?globalThis:global});var k1e=Q(g4=>{"use strict";A();Object.defineProperty(g4,"__esModule",{value:!0});g4._globalThis=void 0;var S_t=P1e();Object.defineProperty(g4,"_globalThis",{enumerable:!0,get:function(){return S_t._globalThis}})});var U1e=Q(h4=>{"use strict";A();Object.defineProperty(h4,"__esModule",{value:!0});h4._globalThis=void 0;var y_t=k1e();Object.defineProperty(h4,"_globalThis",{enumerable:!0,get:function(){return y_t._globalThis}})});var L1e=Q(cA=>{"use strict";A();Object.defineProperty(cA,"__esModule",{value:!0});cA.API_BACKWARDS_COMPATIBILITY_VERSION=cA.makeGetter=cA._global=cA.GLOBAL_LOGS_API_KEY=void 0;var T_t=U1e();cA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");cA._global=T_t._globalThis;function I_t(e,t,n){return r=>r===e?t:n}cA.makeGetter=I_t;cA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var F1e=Q(_4=>{"use strict";A();Object.defineProperty(_4,"__esModule",{value:!0});_4.LogsAPI=void 0;var Od=L1e(),C_t=p4(),Q1e=iY(),aY=class e{constructor(){this._proxyLoggerProvider=new Q1e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Od._global[Od.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Od._global[Od.GLOBAL_LOGS_API_KEY]=(0,Od.makeGetter)(Od.API_BACKWARDS_COMPATIBILITY_VERSION,t,C_t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Od._global[Od.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Od._global,Od.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Od._global[Od.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Q1e.ProxyLoggerProvider}};_4.LogsAPI=aY});var sY=Q(Pa=>{"use strict";A();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.logs=Pa.ProxyLoggerProvider=Pa.ProxyLogger=Pa.NoopLoggerProvider=Pa.NOOP_LOGGER_PROVIDER=Pa.NoopLogger=Pa.NOOP_LOGGER=Pa.SeverityNumber=void 0;var b_t=M1e();Object.defineProperty(Pa,"SeverityNumber",{enumerable:!0,get:function(){return b_t.SeverityNumber}});var G1e=l4();Object.defineProperty(Pa,"NOOP_LOGGER",{enumerable:!0,get:function(){return G1e.NOOP_LOGGER}});Object.defineProperty(Pa,"NoopLogger",{enumerable:!0,get:function(){return G1e.NoopLogger}});var j1e=p4();Object.defineProperty(Pa,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return j1e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(Pa,"NoopLoggerProvider",{enumerable:!0,get:function(){return j1e.NoopLoggerProvider}});var v_t=rY();Object.defineProperty(Pa,"ProxyLogger",{enumerable:!0,get:function(){return v_t.ProxyLogger}});var R_t=iY();Object.defineProperty(Pa,"ProxyLoggerProvider",{enumerable:!0,get:function(){return R_t.ProxyLoggerProvider}});var D_t=F1e();Pa.logs=D_t.LogsAPI.getInstance()});var H1e=Q(Vb=>{"use strict";A();Object.defineProperty(Vb,"__esModule",{value:!0});Vb.disableInstrumentations=Vb.enableInstrumentations=void 0;function x_t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}Vb.enableInstrumentations=x_t;function B_t(e){e.forEach(t=>t.disable())}Vb.disableInstrumentations=B_t});var V1e=Q(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.registerInstrumentations=void 0;var z1e=(Le(),we(Je)),N_t=sY(),$1e=H1e();function O_t(e){let t=e.tracerProvider||z1e.trace.getTracerProvider(),n=e.meterProvider||z1e.metrics.getMeterProvider(),r=e.loggerProvider||N_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,$1e.enableInstrumentations)(o,t,n,r),()=>{(0,$1e.disableInstrumentations)(o)}}E4.registerInstrumentations=O_t});var tBe=Q(S4=>{"use strict";A();Object.defineProperty(S4,"__esModule",{value:!0});S4.satisfies=void 0;var dY=(Le(),we(Je)),Z1e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,w_t=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,M_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function P_t(e,t,n){if(!k_t(e))return dY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=F_t(e);if(!r)return!1;let o=[],i=W1e(r,t,o,n);return i&&!n?.includePrerelease?L_t(r,o):i}S4.satisfies=P_t;function k_t(e){return typeof e=="string"&&Z1e.test(e)}function W1e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(uY(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=sEt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!uY(e,i,n,r))return!1;return!0}return uY(e,t,n,r)}function uY(e,t,n,r){if(t=Q_t(t,r),t.includes(" "))return W1e(e,t,n,r);{let o=G_t(t);return n.push(o),U_t(e,o)}}function U_t(e,t){if(t.invalid)return!1;if(!t.version||lY(t.version))return!0;let n=Y1e(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=Y1e(r,o)}return M_t[t.op]?.includes(n)}function L_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Q_t(e,t){return e=e.trim(),e=iEt(e,t),e=oEt(e),e=aEt(e,t),e=e.trim(),e}function vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function F_t(e){let t=e.match(Z1e);if(!t){dY.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function G_t(e){if(!e)return{};let t=e.match(w_t);if(!t)return dY.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function lY(e){return e==="*"||e==="x"||e==="X"}function q1e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function j_t(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function H_t(e,t){if(lY(e)||lY(t))return 0;let[n,r]=j_t(q1e(e),q1e(t));return n>r?1:n<r?-1:0}function Y1e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=H_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var X1e="[a-zA-Z0-9-]",eBe="0|[1-9]\\d*",z_t=`\\d*[a-zA-Z-]${X1e}*`,$_t="((?:<|>)?=?)",K1e=`(?:${eBe}|${z_t})`,V_t=`(?:-(${K1e}(?:\\.${K1e})*))`,J1e=`${X1e}+`,q_t=`(?:\\+(${J1e}(?:\\.${J1e})*))`,cY=`${eBe}|x|X|\\*`,cN=`[v=\\s]*(${cY})(?:\\.(${cY})(?:\\.(${cY})(?:${V_t})?${q_t}?)?)?`,Y_t=`^${$_t}\\s*${cN}$`,K_t=new RegExp(Y_t),J_t=`^\\s*(${cN})\\s+-\\s+(${cN})\\s*$`,Z_t=new RegExp(J_t),W_t="(?:~>?)",X_t=`^${W_t}${cN}$`,eEt=new RegExp(X_t),tEt="(?:\\^)",nEt=`^${tEt}${cN}$`,rEt=new RegExp(nEt);function oEt(e){let t=eEt;return e.replace(t,(n,r,o,i,a)=>{let c;return vu(r)?c="":vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:vu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function iEt(e,t){let n=rEt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return vu(i)?m="":vu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:vu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function aEt(e,t){let n=K_t;return e.replace(n,(r,o,i,a,c,d)=>{let m=vu(i),h=m||vu(a),y=h||vu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function sEt(e,t){let n=Z_t;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,C,R)=>(vu(i)?o="":vu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:vu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,vu(y)?h="":vu(S)?h=`<${+y+1}.0.0-0`:vu(C)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${C}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var pY=Q(ls=>{"use strict";A();Object.defineProperty(ls,"__esModule",{value:!0});ls.massUnwrap=ls.unwrap=ls.massWrap=ls.wrap=void 0;var Ru=console.error.bind(console);function lN(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var uEt=(e,t,n)=>{if(!e||!e[t]){Ru("no original function "+String(t)+" to wrap");return}if(!n){Ru("no wrapper function"),Ru(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Ru("original object and wrapper must be functions");return}let o=n(r,t);return lN(o,"__original",r),lN(o,"__unwrap",()=>{e[t]===o&&lN(e,t,r)}),lN(o,"__wrapped",!0),lN(e,t,o),o};ls.wrap=uEt;var cEt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Ru("must provide one or more modules to patch"),Ru(new Error().stack);return}if(!(t&&Array.isArray(t))){Ru("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ls.wrap)(r,o,n)})})};ls.massWrap=cEt;var lEt=(e,t)=>{if(!e||!e[t]){Ru("no function to unwrap."),Ru(new Error().stack);return}let n=e[t];if(!n.__unwrap)Ru("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ls.unwrap=lEt;var dEt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Ru("must provide one or more modules to patch"),Ru(new Error().stack);return}if(!(t&&Array.isArray(t))){Ru("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ls.unwrap)(n,r)})})};ls.massUnwrap=dEt;function dN(e){e&&e.logger&&(typeof e.logger!="function"?Ru("new logger isn't a function, not replacing"):Ru=e.logger)}ls.default=dN;dN.wrap=ls.wrap;dN.massWrap=ls.massWrap;dN.unwrap=ls.unwrap;dN.massUnwrap=ls.massUnwrap});var nBe=Q(T4=>{"use strict";A();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationAbstract=void 0;var fY=(Le(),we(Je)),pEt=sY(),y4=pY(),AY=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=fY.diag.createComponentLogger({namespace:t}),this._tracer=fY.trace.getTracer(t,n),this._meter=fY.metrics.getMeter(t,n),this._logger=pEt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=y4.wrap;_unwrap=y4.unwrap;_massWrap=y4.massWrap;_massUnwrap=y4.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};T4.InstrumentationAbstract=AY});var rBe=Q(__=>{"use strict";A();Object.defineProperty(__,"__esModule",{value:!0});__.ModuleNameTrie=__.ModuleNameSeparator=void 0;__.ModuleNameSeparator="/";var I4=class{hooks=[];children=new Map},mY=class{_trie=new I4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(__.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new I4,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(__.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};__.ModuleNameTrie=mY});var iBe=Q(C4=>{"use strict";A();Object.defineProperty(C4,"__esModule",{value:!0});C4.RequireInTheMiddleSingleton=void 0;var fEt=z0(),oBe=Ue("path"),gY=rBe(),AEt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),hY=class e{_moduleNameTrie=new gY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new fEt.Hook(null,{internals:!0},(t,n,r)=>{let o=mEt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return AEt?new e:this._instance=this._instance??new e}};C4.RequireInTheMiddleSingleton=hY;function mEt(e){return oBe.sep!==gY.ModuleNameSeparator?e.split(oBe.sep).join(gY.ModuleNameSeparator):e}});var _Y=Q(E_=>{"use strict";A();Object.defineProperty(E_,"__esModule",{value:!0});E_.isWrapped=E_.safeExecuteInTheMiddleAsync=E_.safeExecuteInTheMiddle=void 0;function gEt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}E_.safeExecuteInTheMiddle=gEt;async function hEt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}E_.safeExecuteInTheMiddleAsync=hEt;function _Et(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}E_.isWrapped=_Et});var uBe=Q(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.InstrumentationBase=void 0;var pN=Ue("path"),aBe=Ue("util"),EEt=tBe(),EY=pY(),SEt=nBe(),yEt=iBe(),TEt=Xq(),fN=(Le(),we(Je)),IEt=z0(),CEt=Ue("fs"),bEt=_Y(),SY=class extends SEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=yEt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,bEt.isWrapped)(t[n])&&this._unwrap(t,n),aBe.types.isProxy(t)){let o=(0,EY.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,EY.wrap)(t,n,r)};_unwrap=(t,n)=>aBe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,EY.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{fN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){fN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{fN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){fN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ue.resolve(n);Ue.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,CEt.readFileSync)(pN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{fN.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return sBe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=pN.normalize(r);return a.filter(m=>m.name===c).filter(m=>sBe(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&pN.isAbsolute(c)){let m=pN.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=pN.isAbsolute(t.name)?new IEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new TEt.Hook([t.name],{internals:!1},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};b4.InstrumentationBase=SY;function sBe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,EEt.satisfies)(t,r,{includePrerelease:n}))}});var cBe=Q(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.normalize=void 0;var vEt=Ue("path");Object.defineProperty(v4,"normalize",{enumerable:!0,get:function(){return vEt.normalize}})});var lBe=Q(qb=>{"use strict";A();Object.defineProperty(qb,"__esModule",{value:!0});qb.normalize=qb.InstrumentationBase=void 0;var REt=uBe();Object.defineProperty(qb,"InstrumentationBase",{enumerable:!0,get:function(){return REt.InstrumentationBase}});var DEt=cBe();Object.defineProperty(qb,"normalize",{enumerable:!0,get:function(){return DEt.normalize}})});var yY=Q(Yb=>{"use strict";A();Object.defineProperty(Yb,"__esModule",{value:!0});Yb.normalize=Yb.InstrumentationBase=void 0;var dBe=lBe();Object.defineProperty(Yb,"InstrumentationBase",{enumerable:!0,get:function(){return dBe.InstrumentationBase}});Object.defineProperty(Yb,"normalize",{enumerable:!0,get:function(){return dBe.normalize}})});var pBe=Q(R4=>{"use strict";A();Object.defineProperty(R4,"__esModule",{value:!0});R4.InstrumentationNodeModuleDefinition=void 0;var TY=class{name;supportedVersions;patch;unpatch;files;constructor(t,n,r,o,i){this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}};R4.InstrumentationNodeModuleDefinition=TY});var fBe=Q(D4=>{"use strict";A();Object.defineProperty(D4,"__esModule",{value:!0});D4.InstrumentationNodeModuleFile=void 0;var xEt=yY(),IY=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,xEt.normalize)(t)}};D4.InstrumentationNodeModuleFile=IY});var ABe=Q(xS=>{"use strict";A();Object.defineProperty(xS,"__esModule",{value:!0});xS.semconvStabilityFromStr=xS.SemconvStability=void 0;var x4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(x4=xS.SemconvStability||(xS.SemconvStability={}));function BEt(e,t){let n=x4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=x4.DUPLICATE;break}else o.toLowerCase()===e&&(n=x4.STABLE);return n}xS.semconvStabilityFromStr=BEt});var gBe=Q(Hi=>{"use strict";A();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.semconvStabilityFromStr=Hi.SemconvStability=Hi.safeExecuteInTheMiddleAsync=Hi.safeExecuteInTheMiddle=Hi.isWrapped=Hi.InstrumentationNodeModuleFile=Hi.InstrumentationNodeModuleDefinition=Hi.InstrumentationBase=Hi.registerInstrumentations=void 0;var NEt=V1e();Object.defineProperty(Hi,"registerInstrumentations",{enumerable:!0,get:function(){return NEt.registerInstrumentations}});var OEt=yY();Object.defineProperty(Hi,"InstrumentationBase",{enumerable:!0,get:function(){return OEt.InstrumentationBase}});var wEt=pBe();Object.defineProperty(Hi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return wEt.InstrumentationNodeModuleDefinition}});var MEt=fBe();Object.defineProperty(Hi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return MEt.InstrumentationNodeModuleFile}});var CY=_Y();Object.defineProperty(Hi,"isWrapped",{enumerable:!0,get:function(){return CY.isWrapped}});Object.defineProperty(Hi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddle}});Object.defineProperty(Hi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddleAsync}});var mBe=ABe();Object.defineProperty(Hi,"SemconvStability",{enumerable:!0,get:function(){return mBe.SemconvStability}});Object.defineProperty(Hi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return mBe.semconvStabilityFromStr}})});function UEt(){let e=Kb[vY];return e?.helper?e.helper:Kb[bY]?.helper}function LEt(e){let t={helper:e};Kb[vY]=t,Kb[bY]=t}function QEt(){delete Kb[vY],delete Kb[bY]}function jEt(e){switch(e){case"client":return Wr.CLIENT;case"internal":default:return Wr.INTERNAL}}function EBe(e,t,n,r,o){if(SBe(t.name,o))return;let i={attributes:t.attributes,kind:jEt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let m=r.get(d);return m?{context:{spanId:m,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)EBe(e,d,n,r,o);a.end(t.endTime)})}function hBe(e,t){return zEt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function zEt(e){return e!=null&&typeof e.then=="function"}function SBe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var B4,PEt,kEt,bY,vY,Kb,FEt,GEt,HEt,yBe,_Be,$Et,VEt,TBe,IBe=O(()=>{A();Le();B4=ie(gBe(),1);Le();PEt={name:"@prisma/instrumentation-contract",version:"7.6.0",description:"Shared types and utilities for Prisma instrumentation",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation-contract"},bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},files:["dist"],sideEffects:!1,devDependencies:{"@opentelemetry/api":"1.9.0"},peerDependencies:{"@opentelemetry/api":"^1.8"}},kEt=PEt.version.split(".")[0],bY="PRISMA_INSTRUMENTATION",vY=`V${kEt}_PRISMA_INSTRUMENTATION`,Kb=globalThis;FEt=process.env.PRISMA_SHOW_ALL_TRACES==="true",GEt="00-10-10-00";HEt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ft.getSpanContext(e??qe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:GEt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)EBe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return qe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!FEt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(SBe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return hBe(i,t(i,r))}return n.startActiveSpan(o,e,i=>hBe(i,t(i,r)))}};yBe={name:"@prisma/instrumentation",version:"7.6.0",description:"OpenTelemetry compliant instrumentation for Prisma Client",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.ts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation"},bugs:"https://github.com/prisma/prisma/issues",devDependencies:{"@opentelemetry/api":"1.9.0","@prisma/instrumentation-contract":"workspace:*","@types/node":"~20.19.24",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.207.0"},peerDependencies:{"@opentelemetry/api":"^1.8"},files:["dist"],keywords:["prisma","instrumentation","opentelemetry","otel"],scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},sideEffects:!1},_Be=yBe.version,$Et=yBe.name,VEt="@prisma/client",TBe=class extends B4.InstrumentationBase{tracerProvider;constructor(e={}){super($Et,_Be,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new B4.InstrumentationNodeModuleDefinition(VEt,[_Be])]}enable(){let e=this._config;LEt(new HEt({tracerProvider:this.tracerProvider??Ft.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){QEt()}isEnabled(){return UEt()!==void 0}}});function qEt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function bBe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function YEt(e){switch(e){case"client":return Wr.CLIENT;case"internal":default:return Wr.INTERNAL}}var CBe,RY,KEt,vBe,RBe=O(()=>{A();Le();IBe();dt();fr();CBe="Prisma";RY=class extends TBe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=bBe();qEt(t)&&(t.createEngineSpan=n=>{let r=Ft.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Ei(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let a=YEt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Ds.SAMPLED}})),y=Ft.setSpanContext(qe.active(),{traceId:m,spanId:c,traceFlags:Ds.SAMPLED});qe.with(y,()=>{let S={generateTraceId:()=>m,generateSpanId:()=>d};r._idGenerator=S,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};KEt=it(CBe,e=>new RY(e)),vBe=e=>({name:CBe,setupOnce(){KEt(e)},setup(t){bBe()&&t.on("spanStart",n=>{let r=xt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Nt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var DBe=Q(Jb=>{"use strict";A();Object.defineProperty(Jb,"__esModule",{value:!0});Jb.PACKAGE_NAME=Jb.PACKAGE_VERSION=void 0;Jb.PACKAGE_VERSION="0.60.0";Jb.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var DY=Q(lA=>{"use strict";A();Object.defineProperty(lA,"__esModule",{value:!0});lA.HapiLifecycleMethodNames=lA.HapiLayerType=lA.handlerPatched=lA.HapiComponentName=void 0;lA.HapiComponentName="@hapi/hapi";lA.handlerPatched=Symbol("hapi-handler-patched");lA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};lA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var xBe=Q(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.ATTR_HTTP_METHOD=void 0;N4.ATTR_HTTP_METHOD="http.method"});var xY=Q(AN=>{"use strict";A();Object.defineProperty(AN,"__esModule",{value:!0});AN.AttributeNames=void 0;var JEt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(JEt=AN.AttributeNames||(AN.AttributeNames={}))});var OBe=Q(zi=>{"use strict";A();Object.defineProperty(zi,"__esModule",{value:!0});zi.getPluginFromInput=zi.getExtMetadata=zi.getRouteMetadata=zi.isPatchableExtMethod=zi.isDirectExtInput=zi.isLifecycleExtEventObj=zi.isLifecycleExtType=zi.getPluginName=void 0;var BBe=($n(),we(Nr)),ZEt=xBe(),mN=DY(),S_=xY(),NBe=Xt();function WEt(e){return e.name?e.name:e.pkg.name}zi.getPluginName=WEt;var XEt=e=>typeof e=="string"&&mN.HapiLifecycleMethodNames.has(e);zi.isLifecycleExtType=XEt;var e0t=e=>{let t=e?.type;return t!==void 0&&(0,zi.isLifecycleExtType)(t)};zi.isLifecycleExtEventObj=e0t;var t0t=e=>Array.isArray(e)&&e.length<=3&&(0,zi.isLifecycleExtType)(e[0])&&typeof e[1]=="function";zi.isDirectExtInput=t0t;var n0t=e=>!Array.isArray(e);zi.isPatchableExtMethod=n0t;var r0t=(e,t,n)=>{let r={[BBe.ATTR_HTTP_ROUTE]:e.path};t&NBe.SemconvStability.OLD&&(r[ZEt.ATTR_HTTP_METHOD]=e.method),t&NBe.SemconvStability.STABLE&&(r[BBe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[S_.AttributeNames.HAPI_TYPE]=mN.HapiLayerType.PLUGIN,r[S_.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[S_.AttributeNames.HAPI_TYPE]=mN.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};zi.getRouteMetadata=r0t;var o0t=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[S_.AttributeNames.EXT_TYPE]:e,[S_.AttributeNames.HAPI_TYPE]:mN.HapiLayerType.EXT,[S_.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[S_.AttributeNames.EXT_TYPE]:e,[S_.AttributeNames.HAPI_TYPE]:mN.HapiLayerType.EXT},name:r}};zi.getExtMetadata=o0t;var i0t=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;zi.getPluginFromInput=i0t});var PBe=Q(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.HapiInstrumentation=void 0;var El=(Le(),we(Je)),wBe=_r(),gN=Xt(),MBe=DBe(),hN=DY(),Km=OBe(),BY=class extends gN.InstrumentationBase{_semconvStability;constructor(t={}){super(MBe.PACKAGE_NAME,MBe.PACKAGE_VERSION,t),this._semconvStability=(0,gN.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new gN.InstrumentationNodeModuleDefinition(hN.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,gN.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,gN.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let a=t.apply(this,[i]);return r._wrap(a,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(a,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(a,"register",n._getServerRegisterPatch.bind(n)),a}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let a of o){let c=(0,Km.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Km.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let d=a[c];if((0,Km.isLifecycleExtType)(d.type)){let m=d,h=r._wrapExtMethods(m.method,d.type,n);m.method=h,a[c]=m}}return t.apply(this,i)}else if((0,Km.isDirectExtInput)(i)){let a=i,c=a[1],d=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],d,a[2]])}else if((0,Km.isLifecycleExtEventObj)(i[0])){let a=i[0],c=r._wrapExtMethods(a.method,a.type,n);return a.method=c,t.call(this,a)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let a=r._wrapRouteHandler.call(r,o[i],n);o[i]=a}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Km.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",m=>n._getServerRoutePatch.bind(n)(m,r)),i._wrap(c,"ext",m=>n._getServerExtPatch.bind(n)(m,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Km.isPatchableExtMethod)(t))return t[hN.handlerPatched]===!0?t:(t[hN.handlerPatched]=!0,async function(...a){if(El.trace.getSpan(El.context.active())===void 0)return await t.apply(this,a);let c=(0,Km.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await El.context.with(El.trace.setSpan(El.context.active(),d),t,void 0,...a)}catch(m){throw d.recordException(m),d.setStatus({code:El.SpanStatusCode.ERROR,message:m.message}),m}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[hN.handlerPatched]===!0)return t;t[hN.handlerPatched]=!0;let o=i=>async function(...a){if(El.trace.getSpan(El.context.active())===void 0)return await i.call(this,...a);let c=(0,wBe.getRPCMetadata)(El.context.active());c?.type===wBe.RPCType.HTTP&&(c.route=t.path);let d=(0,Km.getRouteMetadata)(t,r._semconvStability,n),m=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await El.context.with(El.trace.setSpan(El.context.active(),m),()=>i.call(this,...a))}catch(h){throw m.recordException(h),m.setStatus({code:El.SpanStatusCode.ERROR,message:h.message}),h}finally{m.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};O4.HapiInstrumentation=BY});var kBe=Q(Zb=>{"use strict";A();Object.defineProperty(Zb,"__esModule",{value:!0});Zb.AttributeNames=Zb.HapiInstrumentation=void 0;var a0t=PBe();Object.defineProperty(Zb,"HapiInstrumentation",{enumerable:!0,get:function(){return a0t.HapiInstrumentation}});var s0t=xY();Object.defineProperty(Zb,"AttributeNames",{enumerable:!0,get:function(){return s0t.AttributeNames}})});var UBe,LBe,QBe,u0t,FBe,GBe=O(()=>{A();UBe=ie(kBe(),1);fr();LBe="Hapi",QBe=it(LBe,()=>new UBe.HapiInstrumentation),u0t=()=>({name:LBe,setupOnce(){QBe()}}),FBe=u0t});var y_,_N,NY=O(()=>{A();y_={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},_N={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var M4,c0t,l0t,w4,jBe=O(()=>{A();Le();M4=ie(Xt(),1);dt();NY();c0t="@sentry/instrumentation-hono",l0t="0.0.1",w4=class extends M4.InstrumentationBase{constructor(t={}){super(c0t,l0t,t)}init(){return[new M4.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(a=>t._wrapHandler(a))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,a=n.tracer.startSpan(i);return qe.with(Ft.setSpan(qe.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(ns(c))return c.then(d=>{let m=n._determineHandlerType(d);return a.setAttributes({[y_.HONO_TYPE]:m,[y_.HONO_NAME]:m===_N.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[y_.HONO_TYPE]:d,[y_.HONO_NAME]:d===_N.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),c}},()=>a.end(),c=>{n._handleError(a,c),a.end()}))}}_safeExecute(t,n,r){try{let o=t();return ns(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?_N.MIDDLEWARE:_N.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Xo.ERROR,message:n.message}),t.recordException(n))}}});function d0t(e){let t=xt(e).data,n=t[y_.HONO_TYPE];if(t[Yt]||!n)return;e.setAttributes({[Nt]:"auto.http.otel.hono",[Yt]:`${n}.hono`});let r=t[y_.HONO_NAME];if(typeof r=="string"&&e.updateName(r),wn()===hd()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Cm],i=t[Q0];typeof o=="string"&&typeof i=="string"&&wn().setTransactionName(`${i} ${o}`)}var HBe,zBe,p0t,$Be,VBe=O(()=>{A();$n();dt();fr();_S();NY();jBe();HBe="Hono";zBe=it(HBe,()=>new w4({responseHook:e=>{d0t(e)}})),p0t=()=>({name:HBe,setupOnce(){zBe()}}),$Be=p0t});var P4=Q(EN=>{"use strict";A();Object.defineProperty(EN,"__esModule",{value:!0});EN.KoaLayerType=void 0;var f0t;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(f0t=EN.KoaLayerType||(EN.KoaLayerType={}))});var qBe=Q(Wb=>{"use strict";A();Object.defineProperty(Wb,"__esModule",{value:!0});Wb.PACKAGE_NAME=Wb.PACKAGE_VERSION=void 0;Wb.PACKAGE_VERSION="0.62.0";Wb.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var OY=Q(SN=>{"use strict";A();Object.defineProperty(SN,"__esModule",{value:!0});SN.AttributeNames=void 0;var A0t;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(A0t=SN.AttributeNames||(SN.AttributeNames={}))});var KBe=Q(Xb=>{"use strict";A();Object.defineProperty(Xb,"__esModule",{value:!0});Xb.isLayerIgnored=Xb.getMiddlewareMetadata=void 0;var YBe=P4(),k4=OY(),m0t=($n(),we(Nr)),g0t=(e,t,n,r)=>n?{attributes:{[k4.AttributeNames.KOA_NAME]:r?.toString(),[k4.AttributeNames.KOA_TYPE]:YBe.KoaLayerType.ROUTER,[m0t.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[k4.AttributeNames.KOA_NAME]:t.name??"middleware",[k4.AttributeNames.KOA_TYPE]:YBe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Xb.getMiddlewareMetadata=g0t;var h0t=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Xb.isLayerIgnored=h0t});var JBe=Q(U4=>{"use strict";A();Object.defineProperty(U4,"__esModule",{value:!0});U4.kLayerPatched=void 0;U4.kLayerPatched=Symbol("koa-layer-patched")});var nNe=Q(L4=>{"use strict";A();Object.defineProperty(L4,"__esModule",{value:!0});L4.KoaInstrumentation=void 0;var dA=(Le(),we(Je)),yN=Xt(),ZBe=P4(),WBe=qBe(),XBe=KBe(),eNe=_r(),tNe=JBe(),wY=class extends yN.InstrumentationBase{constructor(t={}){super(WBe.PACKAGE_NAME,WBe.PACKAGE_VERSION,t)}init(){return new yN.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,yN.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),t)},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;(0,yN.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(t){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),t.apply(this,[i])}}_patchRouterDispatch(t){dA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let d=a[c];a[c]=this._patchLayer(d,!0,i)}}return t}_patchLayer(t,n,r){let o=n?ZBe.KoaLayerType.ROUTER:ZBe.KoaLayerType.MIDDLEWARE;return t[tNe.kLayerPatched]===!0||(0,XBe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(dA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[tNe.kLayerPatched]=!0,dA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(dA.trace.getSpan(dA.context.active())===void 0)return t(i,a);let d=(0,XBe.getMiddlewareMetadata)(i,t,n,r),m=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,eNe.getRPCMetadata)(dA.context.active());h?.type===eNe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,yN.safeExecuteInTheMiddle)(()=>y(m,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&dA.diag.error("koa instrumentation: request hook failed",C)},!0);let S=dA.trace.setSpan(dA.context.active(),m);return dA.context.with(S,async()=>{try{return await t(i,a)}catch(C){throw m.recordException(C),C}finally{m.end()}})})}};L4.KoaInstrumentation=wY});var rNe=Q(T_=>{"use strict";A();Object.defineProperty(T_,"__esModule",{value:!0});T_.KoaLayerType=T_.AttributeNames=T_.KoaInstrumentation=void 0;var _0t=nNe();Object.defineProperty(T_,"KoaInstrumentation",{enumerable:!0,get:function(){return _0t.KoaInstrumentation}});var E0t=OY();Object.defineProperty(T_,"AttributeNames",{enumerable:!0,get:function(){return E0t.AttributeNames}});var S0t=P4();Object.defineProperty(T_,"KoaLayerType",{enumerable:!0,get:function(){return S0t.KoaLayerType}})});var oNe,iNe,aNe,y0t,sNe,uNe=O(()=>{A();oNe=ie(rNe(),1);$n();dt();fr();_S();iNe="Koa",aNe=it(iNe,oNe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Or(t,"auto.http.otel.koa");let r=xt(t).data,o=r["koa.type"];o&&t.setAttribute(Yt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),wn()===hd()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[Cm],c=n.context?.request?.method?.toUpperCase()||"GET";a&&wn().setTransactionName(`${c} ${a}`)}})),y0t=(e={})=>({name:iNe,setupOnce(){aNe(e)}}),sNe=y0t});var MY=Q(zp=>{"use strict";A();Object.defineProperty(zp,"__esModule",{value:!0});zp.ConnectNames=zp.ConnectTypes=zp.AttributeNames=void 0;var T0t;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(T0t=zp.AttributeNames||(zp.AttributeNames={}));var I0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(I0t=zp.ConnectTypes||(zp.ConnectTypes={}));var C0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(C0t=zp.ConnectNames||(zp.ConnectNames={}))});var cNe=Q(ev=>{"use strict";A();Object.defineProperty(ev,"__esModule",{value:!0});ev.PACKAGE_NAME=ev.PACKAGE_VERSION=void 0;ev.PACKAGE_VERSION="0.57.0";ev.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var lNe=Q(Q4=>{"use strict";A();Object.defineProperty(Q4,"__esModule",{value:!0});Q4._LAYERS_STORE_PROPERTY=void 0;Q4._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var dNe=Q(C_=>{"use strict";A();Object.defineProperty(C_,"__esModule",{value:!0});C_.generateRoute=C_.replaceCurrentStackRoute=C_.addNewStackLayer=void 0;var b0t=(Le(),we(Je)),I_=lNe(),v0t=e=>{Array.isArray(e[I_._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,I_._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[I_._LAYERS_STORE_PROPERTY].push("/");let t=e[I_._LAYERS_STORE_PROPERTY].length;return()=>{t===e[I_._LAYERS_STORE_PROPERTY].length?e[I_._LAYERS_STORE_PROPERTY].pop():b0t.diag.warn("Connect: Trying to pop the stack multiple time")}};C_.addNewStackLayer=v0t;var R0t=(e,t)=>{t&&e[I_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};C_.replaceCurrentStackRoute=R0t;var D0t=e=>e[I_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);C_.generateRoute=D0t});var ANe=Q(b_=>{"use strict";A();Object.defineProperty(b_,"__esModule",{value:!0});b_.ConnectInstrumentation=b_.ANONYMOUS_NAME=void 0;var x0t=(Le(),we(Je)),pNe=_r(),tv=MY(),fNe=cNe(),F4=Xt(),B0t=($n(),we(Nr)),PY=dNe();b_.ANONYMOUS_NAME="anonymous";var kY=class extends F4.InstrumentationBase{constructor(t={}){super(fNe.PACKAGE_NAME,fNe.PACKAGE_VERSION,t)}init(){return[new F4.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,F4.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,F4.isWrapped)(t.handle)||this._wrap(t,"handle",this._patchHandle.bind(this))}_patchConstructor(t){let n=this;return function(...r){let o=t.apply(this,r);return n._patchApp(o),o}}_patchNext(t,n){return function(o){let i=t.apply(this,[o]);return n(),i}}_startSpan(t,n){let r,o,i;t?(r=tv.ConnectTypes.REQUEST_HANDLER,i=tv.ConnectNames.REQUEST_HANDLER,o=t):(r=tv.ConnectTypes.MIDDLEWARE,i=tv.ConnectNames.MIDDLEWARE,o=n.name||b_.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[B0t.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[tv.AttributeNames.CONNECT_TYPE]:r,[tv.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],m=arguments[a],h=arguments[c],y=arguments[d];(0,PY.replaceCurrentStackRoute)(m,t);let S=(0,pNe.getRPCMetadata)(x0t.context.active());t&&S?.type===pNe.RPCType.HTTP&&(S.route=(0,PY.generateRoute)(m));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||b_.ANONYMOUS_NAME}`;let R=r._startSpan(t,n);r._diag.debug("start span",C);let B=!1;function N(){B?r._diag.debug(`span ${R.name} - already finished`):(B=!0,r._diag.debug(`finishing span ${R.name}`),R.end()),h.removeListener("close",N)}return h.addListener("close",N),arguments[d]=r._patchNext(y,N),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,PY.addNewStackLayer)(i);return typeof a=="function"&&(arguments[o]=n._patchOut(a,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};b_.ConnectInstrumentation=kY});var gNe=Q(wd=>{"use strict";A();Object.defineProperty(wd,"__esModule",{value:!0});wd.ConnectTypes=wd.ConnectNames=wd.AttributeNames=wd.ANONYMOUS_NAME=wd.ConnectInstrumentation=void 0;var mNe=ANe();Object.defineProperty(wd,"ConnectInstrumentation",{enumerable:!0,get:function(){return mNe.ConnectInstrumentation}});Object.defineProperty(wd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return mNe.ANONYMOUS_NAME}});var UY=MY();Object.defineProperty(wd,"AttributeNames",{enumerable:!0,get:function(){return UY.AttributeNames}});Object.defineProperty(wd,"ConnectNames",{enumerable:!0,get:function(){return UY.ConnectNames}});Object.defineProperty(wd,"ConnectTypes",{enumerable:!0,get:function(){return UY.ConnectTypes}})});var hNe,_Ne,ENe,N0t,SNe,yNe=O(()=>{A();hNe=ie(gNe(),1);fr();_Ne="Connect",ENe=it(_Ne,()=>new hNe.ConnectInstrumentation),N0t=()=>({name:_Ne,setupOnce(){ENe()}}),SNe=N0t});var TNe=Q(ka=>{"use strict";A();Object.defineProperty(ka,"__esModule",{value:!0});ka.DB_SYSTEM_VALUE_MSSQL=ka.ATTR_NET_PEER_PORT=ka.ATTR_NET_PEER_NAME=ka.ATTR_DB_USER=ka.ATTR_DB_SYSTEM=ka.ATTR_DB_STATEMENT=ka.ATTR_DB_SQL_TABLE=ka.ATTR_DB_NAME=void 0;ka.ATTR_DB_NAME="db.name";ka.ATTR_DB_SQL_TABLE="db.sql.table";ka.ATTR_DB_STATEMENT="db.statement";ka.ATTR_DB_SYSTEM="db.system";ka.ATTR_DB_USER="db.user";ka.ATTR_NET_PEER_NAME="net.peer.name";ka.ATTR_NET_PEER_PORT="net.peer.port";ka.DB_SYSTEM_VALUE_MSSQL="mssql"});var INe=Q(nv=>{"use strict";A();Object.defineProperty(nv,"__esModule",{value:!0});nv.once=nv.getSpanName=void 0;function O0t(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}nv.getSpanName=O0t;var w0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};nv.once=w0t});var CNe=Q(rv=>{"use strict";A();Object.defineProperty(rv,"__esModule",{value:!0});rv.PACKAGE_NAME=rv.PACKAGE_VERSION=void 0;rv.PACKAGE_VERSION="0.33.0";rv.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var xNe=Q(R_=>{"use strict";A();Object.defineProperty(R_,"__esModule",{value:!0});R_.TediousInstrumentation=R_.INJECTED_CTX=void 0;var ov=(Le(),we(Je)),M0t=Ue("events"),pA=Xt(),BS=($n(),we(Nr)),v_=TNe(),bNe=INe(),vNe=CNe(),DNe=Symbol("opentelemetry.instrumentation-tedious.current-database");R_.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var RNe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function G4(e){Object.defineProperty(this,DNe,{value:e,writable:!0})}var LY=class e extends pA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(vNe.PACKAGE_NAME,vNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,pA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,pA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new pA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of RNe)(0,pA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,pA.isWrapped)(n.connect)&&this._unwrap(n,"connect"),this._wrap(n,"connect",this._patchConnect),t},t=>{if(t===void 0)return;let n=t.Connection.prototype;for(let r of RNe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return G4.call(this,this.config?.options?.database),this.removeListener("databaseChange",G4),this.on("databaseChange",G4),this.once("end",()=>{this.removeListener("databaseChange",G4)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||ov.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,d=>{o()});Object.defineProperty(a,R_.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");a.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(a)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(a){if(a?.[R_.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof M0t.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,m=()=>d++,h=()=>c++,y=this[DNe],S=(j=>j.sqlTextOrProcedure==="sp_prepare"&&j.parametersByName?.stmt?.value?j.parametersByName.stmt.value:j.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&pA.SemconvStability.OLD&&(C[v_.ATTR_DB_SYSTEM]=v_.DB_SYSTEM_VALUE_MSSQL,C[v_.ATTR_DB_NAME]=y,C[v_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[v_.ATTR_DB_STATEMENT]=S,C[v_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&pA.SemconvStability.STABLE&&(C[BS.ATTR_DB_NAMESPACE]=y,C[BS.ATTR_DB_SYSTEM_NAME]=BS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[BS.ATTR_DB_QUERY_TEXT]=S,C[BS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&pA.SemconvStability.OLD&&(C[v_.ATTR_NET_PEER_NAME]=this.config?.server,C[v_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&pA.SemconvStability.STABLE&&(C[BS.ATTR_SERVER_ADDRESS]=this.config?.server,C[BS.ATTR_SERVER_PORT]=this.config?.options?.port);let R=o.tracer.startSpan((0,bNe.getSpanName)(t,y,S,a.table),{kind:ov.SpanKind.CLIENT,attributes:C}),B=(0,bNe.once)(j=>{a.removeListener("done",m),a.removeListener("doneInProc",m),a.removeListener("doneProc",h),a.removeListener("error",B),this.removeListener("end",B),R.setAttribute("tedious.procedure_count",c),R.setAttribute("tedious.statement_count",d),j&&R.setStatus({code:ov.SpanStatusCode.ERROR,message:j.message}),R.end()});a.on("done",m),a.on("doneInProc",m),a.on("doneProc",h),a.once("error",B),this.on("end",B),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(B)):o._diag.error("Expected request.callback to be a function");let N=()=>ov.context.with(ov.trace.setSpan(ov.context.active(),R),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let H=o._buildTraceparent(R);o._injectContextInfo(this,n,H).finally(N)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};R_.TediousInstrumentation=LY});var BNe=Q(j4=>{"use strict";A();Object.defineProperty(j4,"__esModule",{value:!0});j4.TediousInstrumentation=void 0;var P0t=xNe();Object.defineProperty(j4,"TediousInstrumentation",{enumerable:!0,get:function(){return P0t.TediousInstrumentation}})});var NNe,k0t,ONe,wNe,U0t,MNe,PNe=O(()=>{A();NNe=ie(BNe(),1);dt();fr();k0t=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),ONe="Tedious",wNe=it(ONe,()=>new NNe.TediousInstrumentation({})),U0t=()=>{let e;return{name:ONe,setupOnce(){let t=wNe();e=oB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=xt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";k0t.has(i)&&n.setAttribute(Nt,"auto.db.otel.tedious")}))}}},MNe=U0t});var kNe=Q(iv=>{"use strict";A();Object.defineProperty(iv,"__esModule",{value:!0});iv.PACKAGE_NAME=iv.PACKAGE_VERSION=void 0;iv.PACKAGE_VERSION="0.57.0";iv.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var LNe=Q(H4=>{"use strict";A();Object.defineProperty(H4,"__esModule",{value:!0});H4.GenericPoolInstrumentation=void 0;var av=(Le(),we(Je)),NS=Xt(),UNe=kNe(),QY="generic-pool",FY=class extends NS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t)}init(){return[new NS.InstrumentationNodeModuleDefinition(QY,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,NS.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquirePatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new NS.InstrumentationNodeModuleDefinition(QY,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,NS.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new NS.InstrumentationNodeModuleDefinition(QY,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,NS.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=av.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return av.context.with(av.trace.setSpan(i,a),()=>t.call(this,...o).then(c=>(a.end(),c),c=>{throw a.recordException(c),a.end(),c}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let a=av.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return av.context.with(av.trace.setSpan(a,c),()=>{t.call(this,(d,m)=>{if(c.end(),o)return o(d,m)},i)})}}};H4.GenericPoolInstrumentation=FY});var QNe=Q(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.GenericPoolInstrumentation=void 0;var L0t=LNe();Object.defineProperty(z4,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return L0t.GenericPoolInstrumentation}})});var FNe,GNe,jNe,Q0t,HNe,zNe=O(()=>{A();FNe=ie(QNe(),1);dt();fr();GNe="GenericPool",jNe=it(GNe,()=>new FNe.GenericPoolInstrumentation({})),Q0t=()=>{let e;return{name:GNe,setupOnce(){let t=jNe();e=oB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=xt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Nt,"auto.db.otel.generic_pool")}))}}},HNe=Q0t});var GY=Q(fA=>{"use strict";A();Object.defineProperty(fA,"__esModule",{value:!0});fA.ATTR_NET_PEER_PORT=fA.ATTR_NET_PEER_NAME=fA.ATTR_MESSAGING_SYSTEM=fA.ATTR_MESSAGING_OPERATION=void 0;fA.ATTR_MESSAGING_OPERATION="messaging.operation";fA.ATTR_MESSAGING_SYSTEM="messaging.system";fA.ATTR_NET_PEER_NAME="net.peer.name";fA.ATTR_NET_PEER_PORT="net.peer.port"});var jY=Q(oi=>{"use strict";A();Object.defineProperty(oi,"__esModule",{value:!0});oi.ATTR_MESSAGING_CONVERSATION_ID=oi.OLD_ATTR_MESSAGING_MESSAGE_ID=oi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=oi.ATTR_MESSAGING_URL=oi.ATTR_MESSAGING_PROTOCOL_VERSION=oi.ATTR_MESSAGING_PROTOCOL=oi.MESSAGING_OPERATION_VALUE_PROCESS=oi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=oi.ATTR_MESSAGING_DESTINATION_KIND=oi.ATTR_MESSAGING_DESTINATION=void 0;oi.ATTR_MESSAGING_DESTINATION="messaging.destination";oi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";oi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";oi.MESSAGING_OPERATION_VALUE_PROCESS="process";oi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";oi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";oi.ATTR_MESSAGING_URL="messaging.url";oi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";oi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";oi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var HY=Q(OS=>{"use strict";A();Object.defineProperty(OS,"__esModule",{value:!0});OS.DEFAULT_CONFIG=OS.EndOperation=void 0;var F0t;(function(e){e.AutoAck="auto ack",e.Ack="ack",e.AckAll="ackAll",e.Reject="reject",e.Nack="nack",e.NackAll="nackAll",e.ChannelClosed="channel closed",e.ChannelError="channel error",e.InstrumentationTimeout="instrumentation timeout"})(F0t=OS.EndOperation||(OS.EndOperation={}));OS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var YNe=Q(ii=>{"use strict";A();Object.defineProperty(ii,"__esModule",{value:!0});ii.isConfirmChannelTracing=ii.unmarkConfirmChannelTracing=ii.markConfirmChannelTracing=ii.getConnectionAttributesFromUrl=ii.getConnectionAttributesFromServer=ii.normalizeExchange=ii.CONNECTION_ATTRIBUTES=ii.CHANNEL_CONSUME_TIMEOUT_TIMER=ii.CHANNEL_SPANS_NOT_ENDED=ii.MESSAGE_STORED_SPAN=void 0;var zY=(Le(),we(Je)),D_=Xt(),$4=($n(),we(Nr)),TN=GY(),V4=jY();ii.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");ii.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");ii.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");ii.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var $Y=(0,zY.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),G0t=e=>e!==""?e:"<default>";ii.normalizeExchange=G0t;var j0t=e=>e.replace(/:[^:@/]*@/,":***@"),$Ne=(e,t)=>e||(t==="AMQP"?5672:5671),VNe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},qNe=e=>e||"localhost",AA=(e,t,n,r)=>n?{[t]:n}:(zY.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),H0t=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[TN.ATTR_MESSAGING_SYSTEM]:t}:{}};ii.getConnectionAttributesFromServer=H0t;var z0t=(e,t)=>{let n={[V4.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=VNe(r?.protocol);Object.assign(n,{...AA(e,V4.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=qNe(r?.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...AA(e,TN.ATTR_NET_PEER_NAME,i,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...AA(e,$4.ATTR_SERVER_ADDRESS,i,"hostname")});let a=$Ne(r.port,o);t&D_.SemconvStability.OLD&&Object.assign(n,AA(e,TN.ATTR_NET_PEER_PORT,a,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,AA(e,$4.ATTR_SERVER_PORT,a,"port"))}else{let r=j0t(e);n[V4.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=VNe(o.protocol);Object.assign(n,{...AA(r,V4.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=qNe(o.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...AA(r,TN.ATTR_NET_PEER_NAME,a,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...AA(r,$4.ATTR_SERVER_ADDRESS,a,"hostname")});let c=$Ne(o.port?parseInt(o.port):void 0,i);t&D_.SemconvStability.OLD&&Object.assign(n,AA(r,TN.ATTR_NET_PEER_PORT,c,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,AA(r,$4.ATTR_SERVER_PORT,c,"port"))}catch(o){zY.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};ii.getConnectionAttributesFromUrl=z0t;var $0t=e=>e.setValue($Y,!0);ii.markConfirmChannelTracing=$0t;var V0t=e=>e.deleteValue($Y);ii.unmarkConfirmChannelTracing=V0t;var q0t=e=>e.getValue($Y)===!0;ii.isConfirmChannelTracing=q0t});var KNe=Q(sv=>{"use strict";A();Object.defineProperty(sv,"__esModule",{value:!0});sv.PACKAGE_NAME=sv.PACKAGE_VERSION=void 0;sv.PACKAGE_VERSION="0.61.0";sv.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var ZNe=Q(K4=>{"use strict";A();Object.defineProperty(K4,"__esModule",{value:!0});K4.AmqplibInstrumentation=void 0;var Go=(Le(),we(Je)),q4=_r(),Er=Xt(),Y0t=GY(),Sl=jY(),Du=HY(),ai=YNe(),JNe=KNe(),Y4=[">=0.5.5 <1"],VY=class extends Er.InstrumentationBase{_netSemconvStability;constructor(t={}){super(JNe.PACKAGE_NAME,JNe.PACKAGE_VERSION,{...Du.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Er.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Du.DEFAULT_CONFIG,...t})}init(){let t=new Er.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",Y4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Er.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",Y4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Er.InstrumentationNodeModuleFile("amqplib/lib/connect.js",Y4,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Er.InstrumentationNodeModuleDefinition("amqplib",Y4,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Er.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Er.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Er.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Er.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Er.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Du.EndOperation.Ack)),(0,Er.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Du.EndOperation.Nack)),(0,Er.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Du.EndOperation.Reject)),(0,Er.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Du.EndOperation.AckAll)),(0,Er.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Du.EndOperation.NackAll)),(0,Er.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Er.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Er.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Er.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Er.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Er.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Er.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Er.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Er.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Er.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Er.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,d){if(c==null){let m=(0,ai.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,ai.getConnectionAttributesFromServer)(d);d[ai.CONNECTION_ATTRIBUTES]={...m,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Du.EndOperation.ChannelClosed,void 0);let i=this[ai.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[ai.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Du.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let m=this,h=n===Du.EndOperation.Reject?c:d,y=m[ai.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(C=>C.msg===a);if(S<0)o.endConsumerSpan(a,t,n,h);else if(n!==Du.EndOperation.Reject&&c){for(let C=0;C<=S;C++)o.endConsumerSpan(y[C].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(a,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,a,c){let d=this;if(!Object.prototype.hasOwnProperty.call(d,ai.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);y.unref(),d[ai.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}d[ai.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let y=h.properties.headers??{},S=Go.propagation.extract(Go.ROOT_CONTEXT,y),C=h.fields?.exchange,R;if(r._config.useLinksForConsume){let F=S?Go.trace.getSpan(S)?.spanContext():void 0;S=void 0,F&&(R=[{context:F}])}let B=r.tracer.startSpan(`${i} process`,{kind:Go.SpanKind.CONSUMER,attributes:{...d?.connection?.[ai.CONNECTION_ATTRIBUTES],[Sl.ATTR_MESSAGING_DESTINATION]:C,[Sl.ATTR_MESSAGING_DESTINATION_KIND]:Sl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Sl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[Y0t.ATTR_MESSAGING_OPERATION]:Sl.MESSAGING_OPERATION_VALUE_PROCESS,[Sl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Sl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:R},S),{consumeHook:N}=r.getConfig();N&&(0,Er.safeExecuteInTheMiddle)(()=>N(B,{moduleVersion:t,msg:h}),F=>{F&&Go.diag.error("amqplib instrumentation: consumerHook error",F)},!0),c?.noAck||(d[ai.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,q4.hrTime)()}),h[ai.MESSAGE_STORED_SPAN]=B);let M=S||Go.ROOT_CONTEXT;Go.context.with(Go.trace.setSpan(M,B),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(B,h,!1,Du.EndOperation.AutoAck),B.end())};return arguments[1]=m,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,m){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Er.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!0}),M=>{M&&Go.diag.error("amqplib instrumentation: publishHook error",M)},!0);let R=function(M,F){try{m?.call(this,M,F)}finally{let{publishConfirmHook:H}=r.getConfig();H&&(0,Er.safeExecuteInTheMiddle)(()=>H(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:M}),j=>{j&&Go.diag.error("amqplib instrumentation: publishConfirmHook error",j)},!0),M&&y.setStatus({code:Go.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},B=(0,ai.markConfirmChannelTracing)(Go.context.active()),N=[...arguments];return N[3]=S,N[4]=Go.context.bind((0,ai.unmarkConfirmChannelTracing)(Go.trace.setSpan(B,y)),R),Go.context.with(B,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,ai.isConfirmChannelTracing)(Go.context.active()))return n.apply(this,arguments);{let m=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,a,m,d),{publishHook:S}=r.getConfig();S&&(0,Er.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!1}),B=>{B&&Go.diag.error("amqplib instrumentation: publishHook error",B)},!0);let C=[...arguments];C[3]=y;let R=n.apply(this,C);return h.end(),R}}}createPublishSpan(t,n,r,o,i){let a=(0,ai.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Go.SpanKind.PRODUCER,attributes:{...o.connection[ai.CONNECTION_ATTRIBUTES],[Sl.ATTR_MESSAGING_DESTINATION]:n,[Sl.ATTR_MESSAGING_DESTINATION_KIND]:Sl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Sl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Sl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Sl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Go.propagation.inject(Go.trace.setSpan(Go.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[ai.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Go.SpanStatusCode.ERROR,message:r!==Du.EndOperation.ChannelClosed&&r!==Du.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[ai.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[ai.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[ai.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Er.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Go.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,q4.hrTime)(),r=t[ai.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,q4.hrTimeDuration)(a.timeOfConsume,n);if((0,q4.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Du.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};K4.AmqplibInstrumentation=VY});var XNe=Q(x_=>{"use strict";A();Object.defineProperty(x_,"__esModule",{value:!0});x_.EndOperation=x_.DEFAULT_CONFIG=x_.AmqplibInstrumentation=void 0;var K0t=ZNe();Object.defineProperty(x_,"AmqplibInstrumentation",{enumerable:!0,get:function(){return K0t.AmqplibInstrumentation}});var WNe=HY();Object.defineProperty(x_,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return WNe.DEFAULT_CONFIG}});Object.defineProperty(x_,"EndOperation",{enumerable:!0,get:function(){return WNe.EndOperation}})});var eOe,tOe,J0t,nOe,Z0t,rOe,oOe=O(()=>{A();eOe=ie(XNe(),1);fr();tOe="Amqplib",J0t={consumeEndHook:e=>{Or(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Or(e,"auto.amqplib.otel.publisher")}},nOe=it(tOe,()=>new eOe.AmqplibInstrumentation(J0t)),Z0t=()=>({name:tOe,setupOnce(){nOe()}}),rOe=Z0t});var IN,qY=O(()=>{A();IN="VercelAI"});function X0t(e){if(typeof e!="object"||e===null)return!1;let t=e;return"type"in t&&"error"in t&&"toolName"in t&&"toolCallId"in t&&t.type==="tool-error"&&t.error instanceof Error}function eSt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(tSt(t.content),nSt(t.content))}function tSt(e){for(let t of e){if(!X0t(t))continue;let n=P9(t.toolCallId);n?cl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):cl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function nSt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&k9(t.toolCallId)}function rSt(e,t,n,r){let o=e?.recordInputs!==void 0?e.recordInputs:t.recordInputs!==void 0?t.recordInputs:n===!0?!0:r,i=e?.recordOutputs!==void 0?e.recordOutputs:t.recordOutputs!==void 0?t.recordOutputs:n===!0?!0:r;return{recordInputs:o,recordOutputs:i}}var Z4,W0t,iOe,J4,aOe=O(()=>{A();Z4=ie(Xt(),1);dt();qY();W0t=[">=3.0.0 <7"],iOe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];J4=class e extends Z4.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Vn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new Z4.InstrumentationNodeModuleDefinition("ai",W0t,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,m=_t(),h=m?.getIntegrationByName(IN),y=h?.options,S=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:R}=rSt(y,c,d,S);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:R},kp(()=>Reflect.apply(o,i,a),B=>{B&&typeof B=="object"&&ki(B,"_sentry_active_span",Ed())},()=>{},B=>{eSt(B)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of iOe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=iOe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function oSt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var sOe,iSt,uOe,cOe=O(()=>{A();dt();fr();qY();aOe();sOe=it(IN,()=>new J4({}));iSt=(e={})=>{let t;return{name:IN,options:e,setupOnce(){t=sOe()},afterAllSetup(n){e.force??oSt(n)?rU(n):t?.callWhenPatched(()=>rU(n))}}},uOe=iSt});var X4,aSt,W4,lOe=O(()=>{A();X4=ie(Xt(),1);dt();aSt=[">=4.0.0 <7"],W4=class extends X4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Vn,t)}init(){return new X4.InstrumentationNodeModuleDefinition("openai",aSt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...a){if(nS(Xh))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return aU(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var dOe,sSt,pOe,fOe=O(()=>{A();dt();fr();lOe();dOe=it(Xh,e=>new W4(e)),sSt=(e={})=>({name:Xh,setupOnce(){dOe(e)}}),pOe=sSt});var t3,uSt,e3,AOe=O(()=>{A();t3=ie(Xt(),1);dt();uSt=[">=0.19.2 <1.0.0"],e3=class extends t3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Vn,t)}init(){return new t3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",uSt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(nS(e_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return sU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var mOe,cSt,gOe,hOe=O(()=>{A();dt();fr();AOe();mOe=it(e_,e=>new e3(e)),cSt=(e={})=>({name:e_,options:e,setupOnce(){mOe(e)}}),gOe=cSt});var uv,_Oe,n3,EOe=O(()=>{A();uv=ie(Xt(),1);dt();_Oe=[">=0.10.0 <2"],n3=class extends uv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Vn,t)}init(){return new uv.InstrumentationNodeModuleDefinition("@google/genai",_Oe,n=>this._patch(n),n=>n,[new uv.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",_Oe,n=>this._patch(n),n=>n)])}_patch(t){let n=t.GoogleGenAI,r=this.getConfig();if(typeof n!="function")return t;let o=function(...i){if(nS(t_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return uU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}return nB(t,"GoogleGenAI",o),t}}});var SOe,lSt,yOe,TOe=O(()=>{A();dt();fr();EOe();SOe=it(t_,e=>new n3(e)),lSt=(e={})=>({name:t_,setupOnce(){SOe(e)}}),yOe=lSt});function dSt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function pSt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,m=dSt(d,t);return c.callbacks=m,Reflect.apply(r,o,i)}})}var B_,r3,o3,IOe=O(()=>{A();B_=ie(Xt(),1);dt();r3=[">=0.1.0 <2.0.0"];o3=class extends B_.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Vn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new B_.InstrumentationNodeModuleDefinition(r,r3,this._patch.bind(this),o=>o,[new B_.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,r3,this._patch.bind(this),o=>o)]));return t.push(new B_.InstrumentationNodeModuleDefinition("langchain",r3,this._patch.bind(this),r=>r,[new B_.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",r3,this._patch.bind(this),r=>r)])),t}_patch(t){e9([Xh,e_,t_]);let n=pU(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let m=a[d];typeof m=="function"&&(a[d]=pSt(m,n))}}}});var COe,fSt,bOe,vOe=O(()=>{A();dt();fr();IOe();COe=it(cU,e=>new o3(e)),fSt=(e={})=>({name:cU,setupOnce(){COe(e)}}),bOe=fSt});var cv,ROe,i3,DOe=O(()=>{A();cv=ie(Xt(),1);dt();ROe=[">=0.0.0 <2.0.0"],i3=class extends cv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Vn,t)}init(){return new cv.InstrumentationNodeModuleDefinition("@langchain/langgraph",ROe,this._patch.bind(this),n=>n,[new cv.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",ROe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&AU(t.StateGraph.prototype,this.getConfig()),t}}});var xOe,ASt,BOe,NOe=O(()=>{A();dt();fr();DOe();xOe=it(fU,e=>new i3(e)),ASt=(e={})=>({name:fU,setupOnce(){xOe(e)}}),BOe=ASt});import*as wOe from"node:net";function MOe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Jm.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&sl.error(y?.message)},!0)});let d=new Jm.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>OOe(h,n,r,e,a)),m=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of m)d.files.push(new Jm.InstrumentationNodeModuleFile(h,t,y=>OOe(y,n,r,e,a),y=>POe(y,r)));return d}function OOe(e,t,n,r,o){return POe(e,n),t(e,"addDoc",mSt(r,o)),t(e,"getDocs",hSt(r,o)),t(e,"setDoc",_St(r,o)),t(e,"deleteDoc",gSt(r,o)),e}function POe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Jm.isWrapped)(e[n])&&t(e,n);return e}function mSt(e,t){return function(r){return function(o,i){let a=s3(e,"addDoc",o);return t(a),a3(a,()=>r(o,i))}}}function gSt(e,t){return function(r){return function(o){let i=s3(e,"deleteDoc",o.parent||o);return t(i),a3(i,()=>r(o))}}}function hSt(e,t){return function(r){return function(o){let i=s3(e,"getDocs",o);return t(i),a3(i,()=>r(o))}}}function _St(e,t){return function(r){return function(o,i,a){let c=s3(e,"setDoc",o.parent||o);return t(c),a3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function a3(e,t){return qe.with(Ft.setSpan(qe.active(),e),()=>(0,Jm.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function s3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Wr.CLIENT});return SSt(r,n),r.setAttribute(JI,t),r}function ESt(e){let t,n;if(typeof e.host=="string")if(e.host.startsWith("[")){if(e.host.endsWith("]"))t=e.host.replace(/^\[|\]$/g,"");else if(e.host.includes("]:")){let r=e.host.lastIndexOf(":");r!==-1&&(t=e.host.slice(1,r).replace(/^\[|\]$/g,""),n=e.host.slice(r+1))}}else if(wOe.isIPv6(e.host))t=e.host;else{let r=e.host.lastIndexOf(":");r!==-1?(t=e.host.slice(0,r),n=e.host.slice(r+1)):t=e.host}return{address:t,port:n?parseInt(n,10):void 0}}function SSt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[Dz]:t.path,[xz]:n.name,[L0]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:d}=ESt(i);c&&(a[Uz]=c),d&&(a[Lz]=d),e.setAttributes(a)}var Jm,kOe=O(()=>{A();Le();Jm=ie(Xt(),1);$n()});function UOe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,m=o.functions?.responseHook;typeof m=="function"&&(a=(S,C)=>{(0,Zm.safeExecuteInTheMiddle)(()=>m(S,C),R=>{R&&sl.error(R?.message)},!0)}),typeof d=="function"&&(i=S=>{(0,Zm.safeExecuteInTheMiddle)(()=>d(S),C=>{C&&sl.error(C?.message)},!0)});let h=new Zm.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:S,triggerType:C})=>{h.files.push(new Zm.InstrumentationNodeModuleFile(S,t,R=>ySt(R,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),R=>LOe(R,r)))}),h}function xu(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...m){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:Wr.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),qe.with(Ft.setSpan(qe.active(),y),async()=>{let C,R;try{R=await a.apply(this,m)}catch(B){C=B}if(t?.responseHook?.(y,C),C&&y.recordException(C),y.end(),C)throw await t?.errorHook?.(y,C),C;return R})};return c?o.call(this,c,d):o.call(this,d)}}}function ySt(e,t,n,r,o,i){switch(LOe(e,n),i){case"function":t(e,"onRequest",xu(r,o,"http.request")),t(e,"onCall",xu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",xu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",xu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",xu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",xu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",xu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",xu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",xu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",xu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",xu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",xu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",xu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",xu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",xu(r,o,"storage.object.metadataUpdated"));break}return e}function LOe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,Zm.isWrapped)(e[r])&&t(e,r);return e}var Zm,QOe=O(()=>{A();Le();Zm=ie(Xt(),1)});var GOe,FOe,TSt,ISt,u3,jOe=O(()=>{A();GOe=ie(Xt(),1);dt();kOe();QOe();FOe={},TSt=[">=3.0.0 <5"],ISt=[">=6.0.0 <7"],u3=class extends GOe.InstrumentationBase{constructor(t=FOe){super("@sentry/instrumentation-firebase",Vn,t)}setConfig(t={}){super.setConfig({...FOe,...t})}init(){let t=[];return t.push(MOe(this.tracer,TSt,this._wrap,this._unwrap,this.getConfig())),t.push(UOe(this.tracer,ISt,this._wrap,this._unwrap,this.getConfig())),t}}});var HOe,CSt,zOe,bSt,$Oe,VOe=O(()=>{A();dt();fr();jOe();HOe="Firebase",CSt={firestoreSpanCreationHook:e=>{Or(e,"auto.firebase.otel.firestore"),e.setAttribute(Yt,"db.query")},functions:{requestHook:e=>{Or(e,"auto.firebase.otel.functions"),e.setAttribute(Yt,"http.request")},errorHook:async(e,t)=>{t&&(Wt(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Nk(2e3))}}},zOe=it(HOe,()=>new u3(CSt)),bSt=()=>({name:HOe,setupOnce(){zOe()}}),$Oe=bSt});function qOe(){return[Jbe(),BRe(),rDe(),$Be(),zDe(),ixe(),hxe(),xxe(),s1e(),D1e(),vBe(),FBe(),sNe(),SNe(),MNe(),HNe(),SDe(),rOe(),NDe(),bOe(),BOe(),uOe(),pOe(),gOe(),yOe(),O1e(),$Oe()]}var YOe=O(()=>{A();oOe();hOe();yNe();Zbe();wRe();VOe();zNe();TOe();iDe();GBe();VBe();yDe();uNe();vOe();NOe();ODe();$De();axe();_xe();Bxe();fOe();x1e();w1e();RBe();u1e();PNe();cOe()});function JOe(e,t={}){e.getOptions().debug&&Aq();let[n,r]=vSt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function vSt(e,t={}){let n=new KOe.BasicTracerProvider({sampler:new SL(e),resource:(0,c3.defaultResource)().merge((0,c3.resourceFromAttributes)({[Qz]:"node",[Rz]:"sentry",[Fz]:Vn})),forceFlushTimeoutMillis:500,spanProcessors:[new EL({timeout:RSt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ft.setGlobalTracerProvider(n),vp.setGlobalPropagator(new _L);let r=new fq;return qe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function RSt(e){if(e!=null){if(e>YY)return sa&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${YY}`),YY;if(e<=0||Number.isNaN(e)){sa&&Z.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var c3,KOe,YY,ZOe=O(()=>{A();Le();c3=ie(vV(),1),KOe=ie(WV(),1);$n();dt();fr();db();_S();YY=1e6});function WOe(){return xL().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(vbe(),Pbe())}function XOe(e){return[...WOe(),...Si(e)?qOe():[]]}function KY(e={}){return DSt(e,XOe)}function DSt(e={},t){rS(e,"node");let n=vq({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(JOe(n,{spanProcessors:e.openTelemetrySpanProcessors}),Rq()),n}var ewe=O(()=>{A();dt();fr();Rbe();kbe();YOe();ZOe()});var CN=O(()=>{A();ewe();dt()});function jo(){return xSt}function yl(){return twe}function nwe(){return BSt}var xSt,twe,BSt,Tl=O(()=>{"use strict";A();xSt="prod",twe="0.1.60",BSt=`@tanagram/lore/${twe}`});function wSt(e=""){if(!NSt.test(e))return e!==e.toLowerCase()}function rwe(e,t){let n=t??OSt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let m=wSt(c);if(a===!1){if(i===!1&&m===!0){r.push(o),o=c,i=m;continue}if(i===!0&&m===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=m;continue}}o+=c,i=m,a=d}return r.push(o),r}function MSt(e){return e?e[0].toUpperCase()+e.slice(1):""}function PSt(e){return e?e[0].toLowerCase()+e.slice(1):""}function kSt(e,t){return e?(Array.isArray(e)?e:rwe(e)).map(n=>MSt(t?.normalize?n.toLowerCase():n)).join(""):""}function bN(e,t){return PSt(kSt(e||"",t))}function d3(e,t){return e?(Array.isArray(e)?e:rwe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function owe(e){return d3(e||"","_")}var NSt,OSt,iwe=O(()=>{A();NSt=/\d/,OSt=["-","_","/","."]});import{parseArgs as USt}from"node:util";function m3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function JY(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
39
39
  `)}function Il(e){return typeof e=="function"?e():e}function LSt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},a=new Map,c=new Map;for(let[N,M]of Object.entries(o)){let F=M;for(let H of F)a.set(N,H),c.has(H)||c.set(H,[]),c.get(H).push(N),a.set(H,N),c.has(N)||c.set(N,[]),c.get(N).push(H)}let d={};function m(N){if(n.has(N))return"boolean";let M=c.get(N)||[];for(let F of M)if(n.has(F))return"boolean";return"string"}function h(N){if(r.has(N))return!0;let M=c.get(N)||[];for(let F of M)if(r.has(F))return!0;return!1}let y=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let N of y)d[N]||(d[N]={type:m(N),default:i[N]});for(let[N,M]of a.entries())N.length===1&&d[M]&&!d[M].short&&(d[M].short=N);let S=[],C={};for(let N=0;N<e.length;N++){let M=e[N];if(M==="--"){S.push(...e.slice(N));break}if(M.startsWith("--no-")){let F=M.slice(5);C[F]=!0;continue}S.push(M)}let R;try{R=USt({args:S,options:Object.keys(d).length>0?d:void 0,allowPositionals:!0,strict:!1})}catch{R={values:{},positionals:S}}let B={_:[]};B._=R.positionals;for(let[N,M]of Object.entries(R.values)){let F=M;m(N)==="boolean"&&typeof M=="string"?F=M!=="false":h(N)&&typeof M=="boolean"&&(F=""),B[N]=F}for(let[N]of Object.entries(C)){B[N]=!1;let M=a.get(N);M&&(B[M]=!1);let F=c.get(N);if(F)for(let H of F)B[H]=!1}for(let[N,M]of a.entries())B[N]!==void 0&&B[M]===void 0&&(B[M]=B[N]),B[M]!==void 0&&B[N]===void 0&&(B[N]=B[M]),B[N]!==B[M]&&i[M]===B[M]&&(B[M]=B[N]);return B}function FSt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=uwe(t);for(let c of r){if(c.type==="positional")continue;c.type==="string"||c.type==="enum"?n.string.push(c.name):c.type==="boolean"&&n.boolean.push(c.name),c.default!==void 0&&(n.default[c.name]=c.default),c.alias&&(n.alias[c.name]=c.alias);let d=bN(c.name),m=d3(c.name);if(d!==c.name||m!==c.name){let h=m3(n.alias[c.name]||[]);d!==c.name&&!h.includes(d)&&h.push(d),m!==c.name&&!h.includes(m)&&h.push(m),h.length>0&&(n.alias[c.name]=h)}}let o=LSt(e,n),[...i]=o._,a=new Proxy(o,{get(c,d){return c[d]??c[bN(d)]??c[d3(d)]}});for(let[,c]of r.entries())if(c.type==="positional"){let d=i.shift();if(d!==void 0)a[c.name]=d;else{if(c.default===void 0&&c.required!==!1)throw new wS(`Missing required positional argument: ${c.name.toUpperCase()}`,"EARG");a[c.name]=c.default}}else if(c.type==="enum"){let d=a[c.name],m=c.options||[];if(d!==void 0&&m.length>0&&!m.includes(d))throw new wS(`Invalid value for argument: ${$p(`--${c.name}`)} (${$p(d)}). Expected one of: ${m.map(h=>$p(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new wS(`Missing required argument: --${c.name}`,"EARG");return a}function uwe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:m3(r.alias)});return t}async function GSt(e){return Promise.all(e.map(t=>Il(t)))}async function N_(e,t){let n=await Il(e.args||{}),r=FSt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await GSt(e.plugins??[]),a,c;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let m=await Il(e.subCommands);if(m&&Object.keys(m).length>0){let h=jSt(t.rawArgs,n),y=t.rawArgs[h];if(y){let S=await awe(m,y);if(!S)throw new wS(`Unknown command ${$p(y)}`,"E_UNKNOWN_COMMAND");await N_(S,{rawArgs:t.rawArgs.slice(h+1)})}else{let S=await Il(e.default);if(S){if(e.run)throw new wS("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let C=await awe(m,S);if(!C)throw new wS(`Default sub command ${$p(S)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await N_(C,{rawArgs:t.rawArgs})}else if(!e.run)throw new wS("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(a=await e.run(o))}catch(m){c=m}let d=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(m){d.push(m)}for(let m of[...i].reverse())try{await m.cleanup?.(o)}catch(h){d.push(h)}if(c)throw c;if(d.length===1)throw d[0];if(d.length>1)throw new Error("Multiple cleanup errors",{cause:d});return{result:a}}async function awe(e,t){if(t in e)return Il(e[t]);for(let n of Object.values(e)){let r=await Il(n),o=await Il(r?.meta);if(o?.alias&&m3(o.alias).includes(t))return r}}function jSt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&HSt(r,t)&&n++;continue}return n}return-1}function HSt(e,t){let n=e.replace(/^-{1,2}/,""),r=bN(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===bN(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function WY(e,t){let n=await Il(e.meta||{}),r=uwe(await Il(e.args||{})),o=await Il(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),a=[],c=[],d=[],m=[];for(let C of r)if(C.type==="positional"){let R=C.name.toUpperCase(),B=C.required!==!1&&C.default===void 0;c.push([$p(R+ZY(C)),swe(C,B)]),m.push(B?`<${R}>`:`[${R}]`)}else{let R=C.required===!0&&C.default===void 0,B=[...(C.alias||[]).map(N=>`-${N}`),`--${C.name}`].join(", ")+ZY(C);if(a.push([$p(B),swe(C,R)]),C.type==="boolean"&&(C.default===!0||C.negativeDescription)&&!zSt.test(C.name)){let N=[...(C.alias||[]).map(M=>`--no-${M}`),`--no-${C.name}`].join(", ");a.push([$p(N),[C.negativeDescription,R?A3("(Required)"):""].filter(Boolean).join(" ")])}R&&m.push(`--${C.name}`+ZY(C))}if(e.subCommands){let C=[],R=await Il(e.subCommands);for(let[B,N]of Object.entries(R)){let M=await Il((await Il(N))?.meta);if(M?.hidden)continue;let F=m3(M?.alias),H=[B,...F].join(", ");d.push([$p(H),M?.description||""]),C.push(B,...F)}m.push(C.join("|"))}let h=[],y=n.version||o.version;h.push(A3(`${n.description} (${i+(y?` v${y}`:"")})`),"");let S=a.length>0||c.length>0;return h.push(`${f3(p3("USAGE"))} ${$p(`${i}${S?" [OPTIONS]":""} ${m.join(" ")}`)}`,""),c.length>0&&(h.push(f3(p3("ARGUMENTS")),""),h.push(JY(c," ")),h.push("")),a.length>0&&(h.push(f3(p3("OPTIONS")),""),h.push(JY(a," ")),h.push("")),d.length>0&&(h.push(f3(p3("COMMANDS")),""),h.push(JY(d," ")),h.push("",`Use ${$p(`${i} <command> --help`)} for more information about a command.`)),h.filter(C=>typeof C=="string").join(`
40
40
  `)}function ZY(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${owe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function swe(e,t){let n=t?A3("(Required)"):"",r=e.default===void 0?"":A3(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var wS,QSt,g3,p3,$p,A3,f3,zSt,XY=O(()=>{A();iwe();wS=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};QSt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),g3=(e,t=39)=>n=>QSt?n:`\x1B[${e}m${n}\x1B[${t}m`,p3=g3(1,22),$p=g3(36),A3=g3(90),f3=g3(4,24);zSt=/^no[-A-Z]/});function VSt(e){pwe=e}function _3(){return pwe}function at(e,t){let n=E3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,_3(),vN].filter(r=>!!r)});e.common.issues.push(n)}function Sn(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,c)=>a.code!=="invalid_type"?{message:c.defaultError}:typeof c.data>"u"?{message:r??c.defaultError}:{message:n??c.defaultError},description:o}}function ryt(e,t){return!!((t==="v4"||!t)&&eyt.test(e)||(t==="v6"||!t)&&tyt.test(e))}function oyt(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}function lv(e){if(e instanceof zs){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Vp.create(lv(r))}return new zs({...e._def,shape:()=>t})}else return e instanceof Xm?new Xm({...e._def,type:lv(e.element)}):e instanceof Vp?Vp.create(lv(e.unwrap())):e instanceof eg?eg.create(lv(e.unwrap())):e instanceof mA?mA.create(e.items.map(t=>lv(t))):e}function iK(e,t){let n=O_(e),r=O_(t);if(e===t)return{valid:!0,data:e};if(n===ot.object&&r===ot.object){let o=Ar.objectKeys(t),i=Ar.objectKeys(e).filter(c=>o.indexOf(c)!==-1),a={...e,...t};for(let c of i){let d=iK(e[c],t[c]);if(!d.valid)return{valid:!1};a[c]=d.data}return{valid:!0,data:a}}else if(n===ot.array&&r===ot.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let a=e[i],c=t[i],d=iK(a,c);if(!d.valid)return{valid:!1};o.push(d.data)}return{valid:!0,data:o}}else return n===ot.date&&r===ot.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function Awe(e,t){return new zS({values:e,typeName:Ht.ZodEnum,...Sn(t)})}var Ar,nK,ot,O_,ze,$St,Ic,vN,pwe,E3,qSt,Hs,ln,fwe,Bu,rK,oK,RN,S3,wt,Pd,cwe,yn,YSt,KSt,JSt,ZSt,WSt,XSt,eyt,tyt,nyt,w_,MS,PS,kS,US,dv,LS,QS,M_,Wm,qp,pv,Xm,zs,FS,h3,y3,GS,mA,T3,fv,Av,I3,jS,HS,zS,$S,P_,Cl,Vp,eg,VS,mv,gv,iyt,C3,DN,hv,mwe,ayt,Ht,syt,gwe,hwe,uyt,cyt,_we,lyt,dyt,pyt,fyt,Ayt,myt,gyt,hyt,_yt,Eyt,Syt,yyt,Tyt,Iyt,Cyt,byt,vyt,Ryt,Dyt,xyt,Byt,Nyt,Oyt,wyt,lwe,Myt,Pyt,kyt,Uyt,Lyt,Qyt,Fyt,Gyt,jyt,js,Hyt,eK,zyt,Md,aK,$gn,Vgn,qgn,Ewe,$yt,Vyt,qyt,Yyt,Swe,ywe,Twe,tK,$s,Kyt,Jyt,Zyt,Wyt,sK,uK,cK,Xyt,dwe,eTt,tTt,nTt,rTt,lK,gA=O(()=>{A();(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let a of o)i[a]=a;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),a={};for(let c of i)a[c]=o[c];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(let a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ar||(Ar={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(nK||(nK={}));ot=Ar.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),O_=e=>{switch(typeof e){case"undefined":return ot.undefined;case"string":return ot.string;case"number":return isNaN(e)?ot.nan:ot.number;case"boolean":return ot.boolean;case"function":return ot.function;case"bigint":return ot.bigint;case"symbol":return ot.symbol;case"object":return Array.isArray(e)?ot.array:e===null?ot.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ot.promise:typeof Map<"u"&&e instanceof Map?ot.map:typeof Set<"u"&&e instanceof Set?ot.set:typeof Date<"u"&&e instanceof Date?ot.date:ot.object;default:return ot.unknown}},ze=Ar.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$St=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ic=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,d=0;for(;d<a.path.length;){let m=a.path[d];d===a.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(n(a))):c[m]=c[m]||{_errors:[]},c=c[m],d++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ar.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Ic.create=e=>new Ic(e);vN=(e,t)=>{let n;switch(e.code){case ze.invalid_type:e.received===ot.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ze.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ar.jsonStringifyReplacer)}`;break;case ze.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ar.joinValues(e.keys,", ")}`;break;case ze.invalid_union:n="Invalid input";break;case ze.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ar.joinValues(e.options)}`;break;case ze.invalid_enum_value:n=`Invalid enum value. Expected ${Ar.joinValues(e.options)}, received '${e.received}'`;break;case ze.invalid_arguments:n="Invalid function arguments";break;case ze.invalid_return_type:n="Invalid function return type";break;case ze.invalid_date:n="Invalid date";break;case ze.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ar.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ze.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ze.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ze.custom:n="Invalid input";break;case ze.invalid_intersection_types:n="Intersection results could not be merged";break;case ze.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ze.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ar.assertNever(e)}return{message:n}},pwe=vN;E3=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i},c="",d=r.filter(m=>!!m).slice().reverse();for(let m of d)c=m(a,{data:t,defaultError:c}).message;return{...o,path:i,message:o.message||c}},qSt=[];Hs=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return ln;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n)r.push({key:await o.key,value:await o.value});return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return ln;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}},ln=Object.freeze({status:"aborted"}),fwe=e=>({status:"dirty",value:e}),Bu=e=>({status:"valid",value:e}),rK=e=>e.status==="aborted",oK=e=>e.status==="dirty",RN=e=>e.status==="valid",S3=e=>typeof Promise<"u"&&e instanceof Promise;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(wt||(wt={}));Pd=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},cwe=(e,t)=>{if(RN(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Ic(e.common.issues);return this._error=n,this._error}}};yn=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return O_(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:O_(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Hs,ctx:{common:t.parent.common,data:t.data,parsedType:O_(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(S3(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;let o={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:O_(t)},i=this._parseSync({data:t,path:o.path,parent:o});return cwe(o,i)}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:O_(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(S3(o)?o:Promise.resolve(o));return cwe(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let a=t(o),c=()=>i.addIssue({code:ze.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Cl({schema:this,typeName:Ht.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Vp.create(this,this._def)}nullable(){return eg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xm.create(this,this._def)}promise(){return P_.create(this,this._def)}or(t){return FS.create([this,t],this._def)}and(t){return GS.create(this,t,this._def)}transform(t){return new Cl({...Sn(this._def),schema:this,typeName:Ht.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new VS({...Sn(this._def),innerType:this,defaultValue:n,typeName:Ht.ZodDefault})}brand(){return new C3({typeName:Ht.ZodBranded,type:this,...Sn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new mv({...Sn(this._def),innerType:this,catchValue:n,typeName:Ht.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return DN.create(this,t)}readonly(){return hv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},YSt=/^c[^\s-]{8,}$/i,KSt=/^[a-z][a-z0-9]*$/,JSt=/[0-9A-HJKMNP-TV-Z]{26}/,ZSt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,WSt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,XSt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),eyt=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,tyt=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,nyt=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");w_=class e extends yn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:ze.invalid_string,...wt.errToObj(r)}),this.nonempty=t=>this.min(1,wt.errToObj(t)),this.trim=()=>new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ot.string){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.string,received:i.parsedType}),ln}let r=new Hs,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),at(o,{code:ze.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),at(o,{code:ze.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,c=t.data.length<i.value;(a||c)&&(o=this._getOrReturnCtx(t,o),a?at(o,{code:ze.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&at(o,{code:ze.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")WSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"email",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")XSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"emoji",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ZSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"uuid",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")YSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"cuid",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")KSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"cuid2",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")JSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"ulid",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),at(o,{validation:"url",code:ze.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"regex",code:ze.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),at(o,{code:ze.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),at(o,{code:ze.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),at(o,{code:ze.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?nyt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{code:ze.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?ryt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"ip",code:ze.invalid_string,message:i.message}),r.dirty()):Ar.assertNever(i);return{status:r.value,value:t.data}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...wt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...wt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...wt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...wt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...wt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...wt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...wt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...wt.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,...wt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...wt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...wt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...wt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...wt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...wt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...wt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...wt.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};w_.create=e=>{var t;return new w_({checks:[],typeName:Ht.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Sn(e)})};MS=class e extends yn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ot.number){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.number,received:i.parsedType}),ln}let r,o=new Hs;for(let i of this._def.checks)i.kind==="int"?Ar.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),at(r,{code:ze.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),at(r,{code:ze.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),at(r,{code:ze.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?oyt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),at(r,{code:ze.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),at(r,{code:ze.not_finite,message:i.message}),o.dirty()):Ar.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,wt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,wt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,wt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,wt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:wt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:wt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:wt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:wt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:wt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:wt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:wt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:wt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:wt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:wt.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ar.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};MS.create=e=>new MS({checks:[],typeName:Ht.ZodNumber,coerce:e?.coerce||!1,...Sn(e)});PS=class e extends yn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ot.bigint){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.bigint,received:i.parsedType}),ln}let r,o=new Hs;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),at(r,{code:ze.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),at(r,{code:ze.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),at(r,{code:ze.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ar.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,wt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,wt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,wt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,wt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:wt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:wt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:wt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:wt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:wt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:wt.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};PS.create=e=>{var t;return new PS({checks:[],typeName:Ht.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Sn(e)})};kS=class extends yn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ot.boolean){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.boolean,received:r.parsedType}),ln}return Bu(t.data)}};kS.create=e=>new kS({typeName:Ht.ZodBoolean,coerce:e?.coerce||!1,...Sn(e)});US=class e extends yn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ot.date){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.date,received:i.parsedType}),ln}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_date}),ln}let r=new Hs,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),at(o,{code:ze.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),at(o,{code:ze.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ar.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:wt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:wt.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};US.create=e=>new US({checks:[],coerce:e?.coerce||!1,typeName:Ht.ZodDate,...Sn(e)});dv=class extends yn{_parse(t){if(this._getType(t)!==ot.symbol){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.symbol,received:r.parsedType}),ln}return Bu(t.data)}};dv.create=e=>new dv({typeName:Ht.ZodSymbol,...Sn(e)});LS=class extends yn{_parse(t){if(this._getType(t)!==ot.undefined){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.undefined,received:r.parsedType}),ln}return Bu(t.data)}};LS.create=e=>new LS({typeName:Ht.ZodUndefined,...Sn(e)});QS=class extends yn{_parse(t){if(this._getType(t)!==ot.null){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.null,received:r.parsedType}),ln}return Bu(t.data)}};QS.create=e=>new QS({typeName:Ht.ZodNull,...Sn(e)});M_=class extends yn{constructor(){super(...arguments),this._any=!0}_parse(t){return Bu(t.data)}};M_.create=e=>new M_({typeName:Ht.ZodAny,...Sn(e)});Wm=class extends yn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Bu(t.data)}};Wm.create=e=>new Wm({typeName:Ht.ZodUnknown,...Sn(e)});qp=class extends yn{_parse(t){let n=this._getOrReturnCtx(t);return at(n,{code:ze.invalid_type,expected:ot.never,received:n.parsedType}),ln}};qp.create=e=>new qp({typeName:Ht.ZodNever,...Sn(e)});pv=class extends yn{_parse(t){if(this._getType(t)!==ot.undefined){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.void,received:r.parsedType}),ln}return Bu(t.data)}};pv.create=e=>new pv({typeName:Ht.ZodVoid,...Sn(e)});Xm=class e extends yn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ot.array)return at(n,{code:ze.invalid_type,expected:ot.array,received:n.parsedType}),ln;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(a||c)&&(at(n,{code:a?ze.too_big:ze.too_small,minimum:c?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(at(n,{code:ze.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(at(n,{code:ze.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>o.type._parseAsync(new Pd(n,a,n.path,c)))).then(a=>Hs.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new Pd(n,a,n.path,c)));return Hs.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:wt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:wt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:wt.toString(n)}})}nonempty(t){return this.min(1,t)}};Xm.create=(e,t)=>new Xm({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ht.ZodArray,...Sn(t)});zs=class e extends yn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=Ar.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ot.object){let m=this._getOrReturnCtx(t);return at(m,{code:ze.invalid_type,expected:ot.object,received:m.parsedType}),ln}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof qp&&this._def.unknownKeys==="strip"))for(let m in o.data)a.includes(m)||c.push(m);let d=[];for(let m of a){let h=i[m],y=o.data[m];d.push({key:{status:"valid",value:m},value:h._parse(new Pd(o,y,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof qp){let m=this._def.unknownKeys;if(m==="passthrough")for(let h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(m==="strict")c.length>0&&(at(o,{code:ze.unrecognized_keys,keys:c}),r.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let m=this._def.catchall;for(let h of c){let y=o.data[h];d.push({key:{status:"valid",value:h},value:m._parse(new Pd(o,y,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let m=[];for(let h of d){let y=await h.key;m.push({key:y,value:await h.value,alwaysSet:h.alwaysSet})}return m}).then(m=>Hs.mergeObjectSync(r,m)):Hs.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return wt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,c;let d=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=wt.errToObj(t).message)!==null&&c!==void 0?c:d}:{message:d}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ht.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return Ar.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}omit(t){let n={};return Ar.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return lv(this)}partial(t){let n={};return Ar.objectKeys(this.shape).forEach(r=>{let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new e({...this._def,shape:()=>n})}required(t){let n={};return Ar.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Vp;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return Awe(Ar.objectKeys(this.shape))}};zs.create=(e,t)=>new zs({shape:()=>e,unknownKeys:"strip",catchall:qp.create(),typeName:Ht.ZodObject,...Sn(t)});zs.strictCreate=(e,t)=>new zs({shape:()=>e,unknownKeys:"strict",catchall:qp.create(),typeName:Ht.ZodObject,...Sn(t)});zs.lazycreate=(e,t)=>new zs({shape:e,unknownKeys:"strip",catchall:qp.create(),typeName:Ht.ZodObject,...Sn(t)});FS=class extends yn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new Ic(c.ctx.common.issues));return at(n,{code:ze.invalid_union,unionErrors:a}),ln}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i,a=[];for(let d of r){let m={...n,common:{...n.common,issues:[]},parent:null},h=d._parseSync({data:n.data,path:n.path,parent:m});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:m}),m.common.issues.length&&a.push(m.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(d=>new Ic(d));return at(n,{code:ze.invalid_union,unionErrors:c}),ln}}get options(){return this._def.options}};FS.create=(e,t)=>new FS({options:e,typeName:Ht.ZodUnion,...Sn(t)});h3=e=>e instanceof jS?h3(e.schema):e instanceof Cl?h3(e.innerType()):e instanceof HS?[e.value]:e instanceof zS?e.options:e instanceof $S?Object.keys(e.enum):e instanceof VS?h3(e._def.innerType):e instanceof LS?[void 0]:e instanceof QS?[null]:null,y3=class e extends yn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ot.object)return at(n,{code:ze.invalid_type,expected:ot.object,received:n.parsedType}),ln;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(at(n,{code:ze.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ln)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let a=h3(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let c of a){if(o.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);o.set(c,i)}}return new e({typeName:Ht.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Sn(r)})}};GS=class extends yn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(rK(i)||rK(a))return ln;let c=iK(i.value,a.value);return c.valid?((oK(i)||oK(a))&&n.dirty(),{status:n.value,value:c.data}):(at(r,{code:ze.invalid_intersection_types}),ln)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};GS.create=(e,t,n)=>new GS({left:e,right:t,typeName:Ht.ZodIntersection,...Sn(n)});mA=class e extends yn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ot.array)return at(r,{code:ze.invalid_type,expected:ot.array,received:r.parsedType}),ln;if(r.data.length<this._def.items.length)return at(r,{code:ze.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ln;!this._def.rest&&r.data.length>this._def.items.length&&(at(r,{code:ze.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let d=this._def.items[c]||this._def.rest;return d?d._parse(new Pd(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Hs.mergeArray(n,a)):Hs.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};mA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new mA({items:e,typeName:Ht.ZodTuple,rest:null,...Sn(t)})};T3=class e extends yn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ot.object)return at(r,{code:ze.invalid_type,expected:ot.object,received:r.parsedType}),ln;let o=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)o.push({key:i._parse(new Pd(r,c,r.path,c)),value:a._parse(new Pd(r,r.data[c],r.path,c))});return r.common.async?Hs.mergeObjectAsync(n,o):Hs.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof yn?new e({keyType:t,valueType:n,typeName:Ht.ZodRecord,...Sn(r)}):new e({keyType:w_.create(),valueType:t,typeName:Ht.ZodRecord,...Sn(n)})}},fv=class extends yn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ot.map)return at(r,{code:ze.invalid_type,expected:ot.map,received:r.parsedType}),ln;let o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,d],m)=>({key:o._parse(new Pd(r,c,r.path,[m,"key"])),value:i._parse(new Pd(r,d,r.path,[m,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let d of a){let m=await d.key,h=await d.value;if(m.status==="aborted"||h.status==="aborted")return ln;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(m.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let d of a){let m=d.key,h=d.value;if(m.status==="aborted"||h.status==="aborted")return ln;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(m.value,h.value)}return{status:n.value,value:c}}}};fv.create=(e,t,n)=>new fv({valueType:t,keyType:e,typeName:Ht.ZodMap,...Sn(n)});Av=class e extends yn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ot.set)return at(r,{code:ze.invalid_type,expected:ot.set,received:r.parsedType}),ln;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(at(r,{code:ze.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(at(r,{code:ze.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function a(d){let m=new Set;for(let h of d){if(h.status==="aborted")return ln;h.status==="dirty"&&n.dirty(),m.add(h.value)}return{status:n.value,value:m}}let c=[...r.data.values()].map((d,m)=>i._parse(new Pd(r,d,r.path,m)));return r.common.async?Promise.all(c).then(d=>a(d)):a(c)}min(t,n){return new e({...this._def,minSize:{value:t,message:wt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:wt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Av.create=(e,t)=>new Av({valueType:e,minSize:null,maxSize:null,typeName:Ht.ZodSet,...Sn(t)});I3=class e extends yn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ot.function)return at(n,{code:ze.invalid_type,expected:ot.function,received:n.parsedType}),ln;function r(c,d){return E3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,_3(),vN].filter(m=>!!m),issueData:{code:ze.invalid_arguments,argumentsError:d}})}function o(c,d){return E3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,_3(),vN].filter(m=>!!m),issueData:{code:ze.invalid_return_type,returnTypeError:d}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof P_){let c=this;return Bu(async function(...d){let m=new Ic([]),h=await c._def.args.parseAsync(d,i).catch(C=>{throw m.addIssue(r(d,C)),m}),y=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(y,i).catch(C=>{throw m.addIssue(o(y,C)),m})})}else{let c=this;return Bu(function(...d){let m=c._def.args.safeParse(d,i);if(!m.success)throw new Ic([r(d,m.error)]);let h=Reflect.apply(a,this,m.data),y=c._def.returns.safeParse(h,i);if(!y.success)throw new Ic([o(h,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:mA.create(t).rest(Wm.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||mA.create([]).rest(Wm.create()),returns:n||Wm.create(),typeName:Ht.ZodFunction,...Sn(r)})}},jS=class extends yn{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};jS.create=(e,t)=>new jS({getter:e,typeName:Ht.ZodLazy,...Sn(t)});HS=class extends yn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return at(n,{received:n.data,code:ze.invalid_literal,expected:this._def.value}),ln}return{status:"valid",value:t.data}}get value(){return this._def.value}};HS.create=(e,t)=>new HS({value:e,typeName:Ht.ZodLiteral,...Sn(t)});zS=class e extends yn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return at(n,{expected:Ar.joinValues(r),received:n.parsedType,code:ze.invalid_type}),ln}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return at(n,{received:n.data,code:ze.invalid_enum_value,options:r}),ln}return Bu(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(n=>!t.includes(n)))}};zS.create=Awe;$S=class extends yn{_parse(t){let n=Ar.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ot.string&&r.parsedType!==ot.number){let o=Ar.objectValues(n);return at(r,{expected:Ar.joinValues(o),received:r.parsedType,code:ze.invalid_type}),ln}if(n.indexOf(t.data)===-1){let o=Ar.objectValues(n);return at(r,{received:r.data,code:ze.invalid_enum_value,options:o}),ln}return Bu(t.data)}get enum(){return this._def.values}};$S.create=(e,t)=>new $S({values:e,typeName:Ht.ZodNativeEnum,...Sn(t)});P_=class extends yn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ot.promise&&n.common.async===!1)return at(n,{code:ze.invalid_type,expected:ot.promise,received:n.parsedType}),ln;let r=n.parsedType===ot.promise?n.data:Promise.resolve(n.data);return Bu(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};P_.create=(e,t)=>new P_({type:e,typeName:Ht.ZodPromise,...Sn(t)});Cl=class extends yn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ht.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{at(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){let a=c=>{let d=o.refinement(c,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?ln:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?ln:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(o.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!RN(a))return a;let c=o.transform(a.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>RN(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);Ar.assertNever(o)}};Cl.create=(e,t,n)=>new Cl({schema:e,typeName:Ht.ZodEffects,effect:t,...Sn(n)});Cl.createWithPreprocess=(e,t,n)=>new Cl({schema:t,effect:{type:"preprocess",transform:e},typeName:Ht.ZodEffects,...Sn(n)});Vp=class extends yn{_parse(t){return this._getType(t)===ot.undefined?Bu(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Vp.create=(e,t)=>new Vp({innerType:e,typeName:Ht.ZodOptional,...Sn(t)});eg=class extends yn{_parse(t){return this._getType(t)===ot.null?Bu(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};eg.create=(e,t)=>new eg({innerType:e,typeName:Ht.ZodNullable,...Sn(t)});VS=class extends yn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===ot.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};VS.create=(e,t)=>new VS({innerType:e,typeName:Ht.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Sn(t)});mv=class extends yn{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return S3(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ic(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ic(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};mv.create=(e,t)=>new mv({innerType:e,typeName:Ht.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Sn(t)});gv=class extends yn{_parse(t){if(this._getType(t)!==ot.nan){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.nan,received:r.parsedType}),ln}return{status:"valid",value:t.data}}};gv.create=e=>new gv({typeName:Ht.ZodNaN,...Sn(e)});iyt=Symbol("zod_brand"),C3=class extends yn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},DN=class e extends yn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ln:i.status==="dirty"?(n.dirty(),fwe(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ln:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:Ht.ZodPipeline})}},hv=class extends yn{_parse(t){let n=this._def.innerType._parse(t);return RN(n)&&(n.value=Object.freeze(n.value)),n}};hv.create=(e,t)=>new hv({innerType:e,typeName:Ht.ZodReadonly,...Sn(t)});mwe=(e,t={},n)=>e?M_.create().superRefine((r,o)=>{var i,a;if(!e(r)){let c=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,d=(a=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,m=typeof c=="string"?{message:c}:c;o.addIssue({code:"custom",...m,fatal:d})}}):M_.create(),ayt={object:zs.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ht||(Ht={}));syt=(e,t={message:`Input not instance of ${e.name}`})=>mwe(n=>n instanceof e,t),gwe=w_.create,hwe=MS.create,uyt=gv.create,cyt=PS.create,_we=kS.create,lyt=US.create,dyt=dv.create,pyt=LS.create,fyt=QS.create,Ayt=M_.create,myt=Wm.create,gyt=qp.create,hyt=pv.create,_yt=Xm.create,Eyt=zs.create,Syt=zs.strictCreate,yyt=FS.create,Tyt=y3.create,Iyt=GS.create,Cyt=mA.create,byt=T3.create,vyt=fv.create,Ryt=Av.create,Dyt=I3.create,xyt=jS.create,Byt=HS.create,Nyt=zS.create,Oyt=$S.create,wyt=P_.create,lwe=Cl.create,Myt=Vp.create,Pyt=eg.create,kyt=Cl.createWithPreprocess,Uyt=DN.create,Lyt=()=>gwe().optional(),Qyt=()=>hwe().optional(),Fyt=()=>_we().optional(),Gyt={string:e=>w_.create({...e,coerce:!0}),number:e=>MS.create({...e,coerce:!0}),boolean:e=>kS.create({...e,coerce:!0}),bigint:e=>PS.create({...e,coerce:!0}),date:e=>US.create({...e,coerce:!0})},jyt=ln,js=Object.freeze({__proto__:null,defaultErrorMap:vN,setErrorMap:VSt,getErrorMap:_3,makeIssue:E3,EMPTY_PATH:qSt,addIssueToContext:at,ParseStatus:Hs,INVALID:ln,DIRTY:fwe,OK:Bu,isAborted:rK,isDirty:oK,isValid:RN,isAsync:S3,get util(){return Ar},get objectUtil(){return nK},ZodParsedType:ot,getParsedType:O_,ZodType:yn,ZodString:w_,ZodNumber:MS,ZodBigInt:PS,ZodBoolean:kS,ZodDate:US,ZodSymbol:dv,ZodUndefined:LS,ZodNull:QS,ZodAny:M_,ZodUnknown:Wm,ZodNever:qp,ZodVoid:pv,ZodArray:Xm,ZodObject:zs,ZodUnion:FS,ZodDiscriminatedUnion:y3,ZodIntersection:GS,ZodTuple:mA,ZodRecord:T3,ZodMap:fv,ZodSet:Av,ZodFunction:I3,ZodLazy:jS,ZodLiteral:HS,ZodEnum:zS,ZodNativeEnum:$S,ZodPromise:P_,ZodEffects:Cl,ZodTransformer:Cl,ZodOptional:Vp,ZodNullable:eg,ZodDefault:VS,ZodCatch:mv,ZodNaN:gv,BRAND:iyt,ZodBranded:C3,ZodPipeline:DN,ZodReadonly:hv,custom:mwe,Schema:yn,ZodSchema:yn,late:ayt,get ZodFirstPartyTypeKind(){return Ht},coerce:Gyt,any:Ayt,array:_yt,bigint:cyt,boolean:_we,date:lyt,discriminatedUnion:Tyt,effect:lwe,enum:Nyt,function:Dyt,instanceof:syt,intersection:Iyt,lazy:xyt,literal:Byt,map:vyt,nan:uyt,nativeEnum:Oyt,never:gyt,null:fyt,nullable:Pyt,number:hwe,object:Eyt,oboolean:Fyt,onumber:Qyt,optional:Myt,ostring:Lyt,pipeline:Uyt,preprocess:kyt,promise:wyt,record:byt,set:Ryt,strictObject:Syt,string:gwe,symbol:dyt,transformer:lwe,tuple:Cyt,undefined:pyt,union:yyt,unknown:myt,void:hyt,NEVER:jyt,ZodIssueCode:ze,quotelessJson:$St,ZodError:Ic}),Hyt=e=>typeof e?.safeParse=="function",eK=e=>typeof e?.passthrough=="function",zyt=(e,t)=>eK(e)?eK(t)?e.merge(t):e:eK(t)?t:Object.assign({},e,t),Md=js.object({name:js.literal("ZodError"),issues:js.array(js.object({path:js.array(js.union([js.string(),js.number()])),message:js.string().optional(),code:js.nativeEnum(js.ZodIssueCode)}).catchall(js.any()))}),aK=class extends Error{constructor(t){let n=JSON.stringify(t,(r,o)=>typeof o=="bigint"?o.toString():o,2);super(n),this.name="ValidationError",this.issues=t}toString(){return this.message}},$gn=js.object({message:js.literal("Request validation failed"),pathParameterErrors:Md.nullable(),headerErrors:Md.nullable(),queryParameterErrors:Md.nullable(),bodyErrors:Md.nullable()}),Vgn=js.object({pathParameterErrors:Md.nullable(),headerErrors:Md.nullable(),queryParameterErrors:Md.nullable(),bodyErrors:Md.nullable()}),qgn=js.object({paramsResult:Md.nullable(),headersResult:Md.nullable(),queryResult:Md.nullable(),bodyResult:Md.nullable()}),Ewe="zod-ts-rest-polyfill",$yt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},Vyt=e=>$yt(e)?e:Hyt(e)?(Object.assign(e,{"~standard":{vendor:Ewe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,qyt=(e,t)=>e?t?e instanceof zs&&t instanceof zs?zyt(e,t):{...e,...t}:e:t,Yyt=(e,t,{passThroughExtraKeys:n=!1}={})=>{let r=t["~standard"].validate(e);if(r instanceof Promise)throw new Error("Schema validation must be synchronous");return r.issues?t["~standard"].vendor===Ewe?{error:new Ic(r.issues)}:{error:new aK(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},Swe=Symbol("ContractNoBody"),ywe=e=>"method"in e&&"path"in e,Twe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return ywe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:qyt(t?.baseHeaders,r.headers),strictStatusCodes:(o=r.strictStatusCodes)!==null&&o!==void 0?o:t?.strictStatusCodes,validateResponseOnClient:(i=r.validateResponseOnClient)!==null&&i!==void 0?i:t?.validateResponseOnClient,responses:{...t?.commonResponses,...r.responses},metadata:t?.metadata?{...t?.metadata,...(a=r.metadata)!==null&&a!==void 0?a:{}}:r.metadata}]:[n,Twe(r,t)]})),tK=Symbol("ContractPlainType"),$s=()=>({router:(e,t)=>Twe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>tK,body:()=>tK,type:()=>tK,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>Swe}),Kyt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},Jyt=(e,t=!1)=>{let n=t?Zyt(e):Wyt(e);return n?.length>0?"?"+n:""},Zyt=e=>e?Object.entries(e).filter(([,t])=>t!==void 0).map(([t,n])=>{let r;return typeof n=="string"&&!["true","false","null"].includes(n.trim())&&isNaN(Number(n))?r=n:r=JSON.stringify(n),`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}).join("&"):"",Wyt=e=>e?Object.keys(e).flatMap(t=>sK(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",sK=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>sK(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>sK(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],uK=class extends Error{constructor(t,n){let r=n.join(",");super(`Server returned unexpected response. Expected one of: ${r} got: ${t.status}`),this.response=t}},cK=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:a})=>{let c=await fetch(t,{...a,method:n,headers:r,body:o}),d=c.headers.get("content-type");if(d?.includes("application/")&&d?.includes("json")){let m=e.responses[c.status],h={status:c.status,body:m===Swe?void 0:await c.json(),headers:c.headers},y=Vyt(m);if(y&&(i??e.validateResponseOnClient)){let S=Yyt(h.body,y);if(S.error)throw S.error;return{...h,body:S.value}}return h}return d?.includes("text/")?{status:c.status,body:await c.text(),headers:c.headers}:{status:c.status,body:await c.blob(),headers:c.headers}},Xyt=e=>{let t=new FormData,n=(r,o)=>{o instanceof File?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e).forEach(([r,o])=>{if(Array.isArray(o))for(let i of o)n(r,i);else n(r,o)}),t},dwe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),eTt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:d}=e,m=n.api||cK,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([C,R])=>typeof R=="function"?[C,R(e)]:[C,R])),y={...h&&dwe(h),...dwe(c)};Object.keys(y).forEach(C=>{y[C]===void 0&&delete y[C]});let S={route:r,path:t,method:r.method,headers:y,body:void 0,rawBody:o,rawQuery:i,contentType:void 0,validateResponse:n.validateResponse,fetchOptions:{...n.credentials&&{credentials:n.credentials},...d},...d?.signal&&{signal:d.signal},...d?.cache&&{cache:d.cache},...d&&"next"in d&&!!d?.next&&{next:d.next}};return r.method!=="GET"&&("contentType"in r&&r.contentType==="multipart/form-data"?S={...S,contentType:"multipart/form-data",body:o instanceof FormData?o:Xyt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?S={...S,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...S.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(S={...S,contentType:"application/json",headers:{"content-type":"application/json",...S.headers},body:JSON.stringify(o)})),m({...S,...a})},tTt=(e,t,n)=>{let{query:r,params:o,body:i,headers:a,extraHeaders:c,overrideClientOptions:d,fetchOptions:m,cache:h,next:y,...S}=n||{},C={...t,...d},R=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([N,M])=>[N,String(M)])):{};return{path:nTt(r,C.baseUrl,R,e,!!C.jsonQuery),clientArgs:C,route:e,body:i,query:r,extraInputArgs:S,fetchOptions:{...h&&{cache:h},...y&&{next:y},...m},headers:{...c,...a}}},nTt=(e,t,n,r,o)=>{let i=Kyt({path:r.path,params:n}),a=Jyt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},rTt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=tTt(e,t,r),i=await eTt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new uK(i,n)}},lK=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>ywe(r)?[n,rTt(r,t)]:[n,lK(r,t)]))});function te(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);let m=a.prototype,h=Object.keys(m);for(let y=0;y<h.length;y++){let S=h[y];S in c||(c[S]=m[S].bind(c))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(c){var d;let m=n?.Parent?new i:this;r(m,c),(d=m._zod).deferred??(d.deferred=[]);for(let h of m._zod.deferred)h();return m}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function si(e){return e&&Object.assign(qS,e),qS}var Iwe,dK,pK,Yp,k_,qS,YS=O(()=>{A();dK=Object.freeze({status:"aborted"});pK=Symbol("zod_brand"),Yp=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},k_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Iwe=globalThis).__zod_globalConfig??(Iwe.__zod_globalConfig={});qS=globalThis.__zod_globalConfig});var Me={};es(Me,{BIGINT_FORMAT_RANGES:()=>TK,Class:()=>AK,NUMBER_FORMAT_RANGES:()=>yK,aborted:()=>F_,allowsEval:()=>hK,assert:()=>uTt,assertEqual:()=>oTt,assertIs:()=>aTt,assertNever:()=>sTt,assertNotEqual:()=>iTt,assignProp:()=>L_,base64ToUint8Array:()=>bwe,base64urlToUint8Array:()=>bTt,cached:()=>Ev,captureStackTrace:()=>v3,cleanEnum:()=>CTt,cleanRegex:()=>NN,clone:()=>Nu,cloneDef:()=>lTt,createTransparentProxy:()=>gTt,defineLazy:()=>Ln,esc:()=>b3,escapeRegex:()=>kd,explicitlyAborted:()=>IK,extend:()=>ETt,finalizeIssue:()=>Ou,floatSafeRemainder:()=>mK,getElementAtPath:()=>dTt,getEnumValues:()=>BN,getLengthableOrigin:()=>MN,getParsedType:()=>mTt,getSizableOrigin:()=>wN,hexToUint8Array:()=>RTt,isObject:()=>KS,isPlainObject:()=>Q_,issue:()=>Sv,joinValues:()=>ue,jsonStringifyReplacer:()=>_v,merge:()=>yTt,mergeDefs:()=>tg,normalizeParams:()=>Fe,nullish:()=>U_,numKeys:()=>ATt,objectClone:()=>cTt,omit:()=>_Tt,optionalKeys:()=>SK,parsedType:()=>Ne,partial:()=>TTt,pick:()=>hTt,prefixIssues:()=>Cc,primitiveTypes:()=>EK,promiseAllObject:()=>pTt,propertyKeyTypes:()=>ON,randomString:()=>fTt,required:()=>ITt,safeExtend:()=>STt,shallowClone:()=>_K,slugify:()=>gK,stringifyPrimitive:()=>xe,uint8ArrayToBase64:()=>vwe,uint8ArrayToBase64url:()=>vTt,uint8ArrayToHex:()=>DTt,unwrapMessage:()=>xN});function oTt(e){return e}function iTt(e){return e}function aTt(e){}function sTt(e){throw new Error("Unexpected value in exhaustive check")}function uTt(e){}function BN(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ue(e,t="|"){return e.map(n=>xe(n)).join(t)}function _v(e,t){return typeof t=="bigint"?t.toString():t}function Ev(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function U_(e){return e==null}function NN(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function mK(e,t){let n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function Ln(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Cwe)return r===void 0&&(r=Cwe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function cTt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function L_(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function tg(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function lTt(e){return tg(e._zod.def)}function dTt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function pTt(e){let t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=r[i];return o})}function fTt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function b3(e){return JSON.stringify(e)}function gK(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function KS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Q_(e){if(KS(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(KS(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function _K(e){return Q_(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function ATt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function kd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nu(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Fe(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function gTt(e){let t;return new Proxy({},{get(n,r,o){return t??(t=e()),Reflect.get(t,r,o)},set(n,r,o,i){return t??(t=e()),Reflect.set(t,r,o,i)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,o){return t??(t=e()),Reflect.defineProperty(t,r,o)}})}function xe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function SK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function hTt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=tg(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return L_(this,"shape",a),a},checks:[]});return Nu(e,i)}function _Tt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=tg(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return L_(this,"shape",a),a},checks:[]});return Nu(e,i)}function ETt(e,t){if(!Q_(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=tg(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return L_(this,"shape",i),i}});return Nu(e,o)}function STt(e,t){if(!Q_(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=tg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return L_(this,"shape",r),r}});return Nu(e,n)}function yTt(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=tg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return L_(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Nu(e,n)}function TTt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=tg(t._zod.def,{get shape(){let c=t._zod.def.shape,d={...c};if(n)for(let m in n){if(!(m in c))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(d[m]=e?new e({type:"optional",innerType:c[m]}):c[m])}else for(let m in c)d[m]=e?new e({type:"optional",innerType:c[m]}):c[m];return L_(this,"shape",d),d},checks:[]});return Nu(t,a)}function ITt(e,t,n){let r=tg(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(let a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return L_(this,"shape",i),i}});return Nu(t,r)}function F_(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function IK(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Cc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function xN(e){return typeof e=="string"?e:e?.message}function Ou(e,t,n){let r=e.message?e.message:xN(e.inst?._zod.def?.error?.(e))??xN(t?.error?.(e))??xN(n.customError?.(e))??xN(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:a,...c}=e;return c.path??(c.path=[]),c.message=r,t?.reportInput&&(c.input=a),c}function wN(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function MN(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ne(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Sv(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function CTt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function bwe(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function vwe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function bTt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return bwe(t+n)}function vTt(e){return vwe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function RTt(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function DTt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Cwe,v3,hK,mTt,ON,EK,yK,TK,AK,mt=O(()=>{A();YS();Cwe=Symbol("evaluating");v3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};hK=Ev(()=>{if(qS.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});mTt=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ON=new Set(["string","number","symbol"]),EK=new Set(["string","number","bigint","boolean","symbol","undefined"]);yK={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},TK={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};AK=class{constructor(...t){}}});function kN(e,t=n=>n.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function UN(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>r({issues:c},[...i,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...i,...a.path]);else{let c=[...i,...a.path];if(c.length===0)n._errors.push(t(a));else{let d=n,m=0;for(;m<c.length;){let h=c[m];m===c.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(t(a))):d[h]=d[h]||{_errors:[]},d=d[h],m++}}}};return r(e),n}function CK(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var a,c;for(let d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(m=>r({issues:m},[...i,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...i,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...i,...d.path]);else{let m=[...i,...d.path];if(m.length===0){n.errors.push(t(d));continue}let h=n,y=0;for(;y<m.length;){let S=m[y],C=y===m.length-1;typeof S=="string"?(h.properties??(h.properties={}),(a=h.properties)[S]??(a[S]={errors:[]}),h=h.properties[S]):(h.items??(h.items=[]),(c=h.items)[S]??(c[S]={errors:[]}),h=h.items[S]),C&&h.errors.push(t(d)),y++}}};return r(e),n}function Dwe(e){let t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function bK(e){let t=[],n=[...e.issues].sort((r,o)=>(r.path??[]).length-(o.path??[]).length);for(let r of n)t.push(`\u2716 ${r.message}`),r.path?.length&&t.push(` \u2192 at ${Dwe(r.path)}`);return t.join(`
41
41
  `)}var Rwe,PN,bc,vK=O(()=>{A();YS();mt();Rwe=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,_v,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},PN=te("$ZodError",Rwe),bc=te("$ZodError",Rwe,{Parent:Error})});var yv,R3,Tv,D3,Iv,RK,Cv,DK,x3,BTt,B3,NTt,N3,OTt,O3,wTt,w3,MTt,M3,PTt,P3,kTt,k3,UTt,xK=O(()=>{A();YS();vK();mt();yv=e=>(t,n,r,o)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Yp;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Ou(d,i,si())));throw v3(c,o?.callee),c}return a.value},R3=yv(bc),Tv=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Ou(d,i,si())));throw v3(c,o?.callee),c}return a.value},D3=Tv(bc),Iv=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Yp;return i.issues.length?{success:!1,error:new(e??PN)(i.issues.map(a=>Ou(a,o,si())))}:{success:!0,data:i.value}},RK=Iv(bc),Cv=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Ou(a,o,si())))}:{success:!0,data:i.value}},DK=Cv(bc),x3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return yv(e)(t,n,o)},BTt=x3(bc),B3=e=>(t,n,r)=>yv(e)(t,n,r),NTt=B3(bc),N3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Tv(e)(t,n,o)},OTt=N3(bc),O3=e=>async(t,n,r)=>Tv(e)(t,n,r),wTt=O3(bc),w3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Iv(e)(t,n,o)},MTt=w3(bc),M3=e=>(t,n,r)=>Iv(e)(t,n,r),PTt=M3(bc),P3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Cv(e)(t,n,o)},kTt=P3(bc),k3=e=>async(t,n,r)=>Cv(e)(t,n,r),UTt=k3(bc)});var bl={};es(bl,{base64:()=>$K,base64url:()=>U3,bigint:()=>WK,boolean:()=>eJ,browserEmail:()=>$Tt,cidrv4:()=>HK,cidrv6:()=>zK,cuid:()=>BK,cuid2:()=>NK,date:()=>YK,datetime:()=>JK,domain:()=>YTt,duration:()=>kK,e164:()=>qK,email:()=>LK,emoji:()=>QK,extendedDuration:()=>LTt,guid:()=>UK,hex:()=>KTt,hostname:()=>qTt,html5Email:()=>jTt,httpProtocol:()=>VK,idnEmail:()=>zTt,integer:()=>XK,ipv4:()=>FK,ipv6:()=>GK,ksuid:()=>MK,lowercase:()=>rJ,mac:()=>jK,md5_base64:()=>ZTt,md5_base64url:()=>WTt,md5_hex:()=>JTt,nanoid:()=>PK,null:()=>tJ,number:()=>L3,rfc5322Email:()=>HTt,sha1_base64:()=>eIt,sha1_base64url:()=>tIt,sha1_hex:()=>XTt,sha256_base64:()=>rIt,sha256_base64url:()=>oIt,sha256_hex:()=>nIt,sha384_base64:()=>aIt,sha384_base64url:()=>sIt,sha384_hex:()=>iIt,sha512_base64:()=>cIt,sha512_base64url:()=>lIt,sha512_hex:()=>uIt,string:()=>ZK,time:()=>KK,ulid:()=>OK,undefined:()=>nJ,unicodeEmail:()=>xwe,uppercase:()=>oJ,uuid:()=>JS,uuid4:()=>QTt,uuid6:()=>FTt,uuid7:()=>GTt,xid:()=>wK});function QK(){return new RegExp(VTt,"u")}function Nwe(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function KK(e){return new RegExp(`^${Nwe(e)}$`)}function JK(e){let t=Nwe({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Bwe}T(?:${r})$`)}function LN(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function QN(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var BK,NK,OK,wK,MK,PK,kK,LTt,UK,JS,QTt,FTt,GTt,LK,jTt,HTt,xwe,zTt,$Tt,VTt,FK,GK,jK,HK,zK,$K,U3,qTt,YTt,VK,qK,Bwe,YK,ZK,WK,XK,L3,eJ,tJ,nJ,rJ,oJ,KTt,JTt,ZTt,WTt,XTt,eIt,tIt,nIt,rIt,oIt,iIt,aIt,sIt,uIt,cIt,lIt,Q3=O(()=>{A();mt();BK=/^[cC][0-9a-z]{6,}$/,NK=/^[0-9a-z]+$/,OK=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wK=/^[0-9a-vA-V]{20}$/,MK=/^[A-Za-z0-9]{27}$/,PK=/^[a-zA-Z0-9_-]{21}$/,kK=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,LTt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,UK=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,JS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,QTt=JS(4),FTt=JS(6),GTt=JS(7),LK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jTt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,HTt=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,xwe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,zTt=xwe,$Tt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,VTt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";FK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,GK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,jK=e=>{let t=kd(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},HK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,zK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$K=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,U3=/^[A-Za-z0-9_-]*$/,qTt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,YTt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,VK=/^https?$/,qK=/^\+[1-9]\d{6,14}$/,Bwe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",YK=new RegExp(`^${Bwe}$`);ZK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},WK=/^-?\d+n?$/,XK=/^-?\d+$/,L3=/^-?\d+(?:\.\d+)?$/,eJ=/^(?:true|false)$/i,tJ=/^null$/i,nJ=/^undefined$/i,rJ=/^[^A-Z]*$/,oJ=/^[^a-z]*$/,KTt=/^[0-9a-fA-F]*$/;JTt=/^[0-9a-fA-F]{32}$/,ZTt=LN(22,"=="),WTt=QN(22),XTt=/^[0-9a-fA-F]{40}$/,eIt=LN(27,"="),tIt=QN(27),nIt=/^[0-9a-fA-F]{64}$/,rIt=LN(43,"="),oIt=QN(43),iIt=/^[0-9a-fA-F]{96}$/,aIt=LN(64,""),sIt=QN(64),uIt=/^[0-9a-fA-F]{128}$/,cIt=LN(86,"=="),lIt=QN(86)});function Owe(e,t,n){e.issues.length&&t.issues.push(...Cc(n,e.issues))}var Hr,wwe,F3,G3,iJ,aJ,sJ,uJ,cJ,lJ,dJ,pJ,fJ,bv,AJ,mJ,gJ,hJ,_J,EJ,SJ,yJ,TJ,j3=O(()=>{A();YS();Q3();mt();Hr=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),wwe={number:"number",bigint:"bigint",object:"date"},F3=te("$ZodCheckLessThan",(e,t)=>{Hr.init(e,t);let n=wwe[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),G3=te("$ZodCheckGreaterThan",(e,t)=>{Hr.init(e,t);let n=wwe[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),iJ=te("$ZodCheckMultipleOf",(e,t)=>{Hr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):mK(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),aJ=te("$ZodCheckNumberFormat",(e,t)=>{Hr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=yK[t.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=t.format,c.minimum=o,c.maximum=i,n&&(c.pattern=XK)}),e._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),sJ=te("$ZodCheckBigIntFormat",(e,t)=>{Hr.init(e,t);let[n,r]=TK[t.format];e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=o=>{let i=o.value;i<n&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>r&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),uJ=te("$ZodCheckMaxSize",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!U_(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;o.size<=t.maximum||r.issues.push({origin:wN(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),cJ=te("$ZodCheckMinSize",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!U_(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;o.size>=t.minimum||r.issues.push({origin:wN(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),lJ=te("$ZodCheckSizeEquals",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!U_(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let a=i>t.size;r.issues.push({origin:wN(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),dJ=te("$ZodCheckMaxLength",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!U_(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let a=MN(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),pJ=te("$ZodCheckMinLength",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!U_(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let a=MN(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fJ=te("$ZodCheckLengthEquals",(e,t)=>{var n;Hr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!U_(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let a=MN(o),c=i>t.length;r.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),bv=te("$ZodCheckStringFormat",(e,t)=>{var n,r;Hr.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),AJ=te("$ZodCheckRegex",(e,t)=>{bv.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),mJ=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=rJ),bv.init(e,t)}),gJ=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=oJ),bv.init(e,t)}),hJ=te("$ZodCheckIncludes",(e,t)=>{Hr.init(e,t);let n=kd(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),_J=te("$ZodCheckStartsWith",(e,t)=>{Hr.init(e,t);let n=new RegExp(`^${kd(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),EJ=te("$ZodCheckEndsWith",(e,t)=>{Hr.init(e,t);let n=new RegExp(`.*${kd(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});SJ=te("$ZodCheckProperty",(e,t)=>{Hr.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(o=>Owe(o,n,t.property));Owe(r,n,t.property)}}),yJ=te("$ZodCheckMimeType",(e,t)=>{Hr.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),TJ=te("$ZodCheckOverwrite",(e,t)=>{Hr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var FN,IJ=O(()=>{A();FN=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split(`
@@ -477,7 +477,7 @@ exec ${_ie(n)} ${_ie(e)} "$@"
477
477
  Authorization denied.
478
478
  `);return;case"authorization_expired":console.log(`
479
479
  Authorization expired. Please try again.
480
- `);return}}});var cHe={};es(cHe,{getOpenBrowserCommand:()=>jHe,loginCommand:()=>Iie,openBrowser:()=>GHe,pollForTokens:()=>FHe,requestDeviceAuthorization:()=>QHe,runLogin:()=>HHe});import{spawn as hLt}from"node:child_process";async function SLt(e){let n=await lr({token:e}).whoAmI({headers:{}});n.status===200&&AUe(`lore_${n.body.user.id}`)}async function kHe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function UHe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function LHe(e,t){return new URL(t,e).toString()}async function QHe({clientId:e,workosApiOrigin:t}){let n=await fetch(LHe(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await kHe(n);if(!n.ok)throw new Error(UHe(r));return r}async function FHe({clientId:e,deviceCode:t,expiresIn:n,interval:r,timeoutMs:o,workosApiOrigin:i}){let a=AbortSignal.timeout(Math.min(o,n*1e3)),c=r;for(;;){let d;try{d=await fetch(LHe(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:ELt,device_code:t,client_id:e}),signal:a})}catch(y){throw y instanceof Error&&y.name==="TimeoutError"?new Error("authorization timed out"):y}let m=await kHe(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await PHe(c*1e3);break;case"slow_down":c+=1,await PHe(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(UHe(h))}}}async function GHe(e){let{command:t,args:n}=jHe(process.platform,e);await new Promise((r,o)=>{let i=hLt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function jHe(e,t){return e==="win32"?{command:"rundll32",args:["url.dll,FileProtocolHandler",t]}:e==="darwin"?{command:"open",args:[t]}:{command:"xdg-open",args:[t]}}async function yLt(e){if(!await Ur())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function TLt(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:Ud()})}catch(r){gt.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}async function HHe({client:e=lr(),enableLaunchAgent:t=$8,openBrowser:n=GHe,platform:r=process.platform,pollForTokens:o=FHe,requestDeviceAuthorization:i=QHe,setAccessToken:a=v6,setRefreshToken:c=R6,cacheAnalyticsDistinctId:d=SLt,timeoutMs:m=_Lt,progress:h=wHe}={}){if(await yLt(e)){h({kind:"already_logged_in"});return}let y=await e.getCliAuthConfig();if(y.status!==200)throw new Error("WorkOS CLI Auth is not configured.");try{let S=await i({clientId:y.body.workos_client_id,workosApiOrigin:y.body.workos_api_origin});h({kind:"device_authorized",userCode:S.user_code,verificationUri:S.verification_uri,verificationUriComplete:S.verification_uri_complete});try{await n(S.verification_uri_complete),h({kind:"browser_opened"})}catch(R){gt.warn("open_browser_failed",{error:R instanceof Error?R.message:String(R)}),h({kind:"browser_open_failed"})}h({kind:"browser_url",url:S.verification_uri_complete}),h({kind:"waiting_for_authorization"});let C=await o({clientId:y.body.workos_client_id,deviceCode:S.device_code,expiresIn:S.expires_in,interval:S.interval,timeoutMs:m,workosApiOrigin:y.body.workos_api_origin});a(C.access_token),C.refresh_token&&c(C.refresh_token),d(C.access_token).catch(R=>{gt.warn("cache_analytics_distinct_id_failed",{error:R instanceof Error?R.message:String(R)})}),h({kind:"logged_in"}),await TLt(t,r,h)}catch(S){throw S instanceof Error&&S.message==="authorization timed out"?h({kind:"authorization_timed_out"}):S instanceof Error&&S.message==="Authorization denied"?h({kind:"authorization_denied"}):S instanceof Error&&S.message==="Authorization expired"&&h({kind:"authorization_expired"}),S}}var _Lt,ELt,PHe,Iie,pie=O(async()=>{"use strict";A();ps();As();Ys();sy();await nHe();await uHe();Cw();Xv();MHe();_Lt=5*60*1e3,ELt="urn:ietf:params:oauth:grant-type:device_code";PHe=e=>new Promise(t=>setTimeout(t,e));Iie={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){gt.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(xc()&&!e?.progress){await sHe(t),await tHe({skipIfAlreadyConfigured:!0});return}await HHe({...t,progress:e?.progress})}}});A();A();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2ffe72f2-dc8c-4b59-9561-778108300a6a",e._sentryDebugIdIdentifier="sentry-dbid-2ffe72f2-dc8c-4b59-9561-778108300a6a")}catch{}})();A();A();CN();Tl();KY({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:jo(),release:yl(),sendDefaultPii:!0});xk("service_name","lore-cli");CN();XY();import{realpathSync as y4t}from"node:fs";import{fileURLToPath as T4t,pathToFileURL as c5e}from"node:url";A();A();jee();ps();fs();As();A();function hO(e){let t=e;return t._def??t.def??{}}function Nxt(e){let t=hO(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Dc(e,t,n){let r=Nxt(e);return r===t||r===n}function vUe(e){let t=hO(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function Oxt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=hO(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function Yee(e){if(!e||!Dc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=hO(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function RUe(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=hO(t);if(Dc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Dc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Dc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Dc(t,"ZodEffects","effects"))t=i.schema;else if(Dc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function wxt(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=RUe(e),a=!1,c=n;Dc(c,"ZodArray","array")&&(a=!0,c=vUe(c)??c);let d=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Dc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:Oxt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Dc(c,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:d,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:a}:{arg:{type:"string",description:a?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:d,...o!==void 0?{default:String(o)}:{},...a?{valueHint:"a,b,c"}:{}},optional:r,isArray:a}}function Kee(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=wxt(i,t);n[o]=a,r[o]={isArray:c,leafKind:Mxt(i)}}return{args:n,fields:r}}function Jee(e,t={}){let n=Yee(e);return n?Kee(n,t):{args:{},fields:{}}}function Mxt(e){let{inner:t}=RUe(e),n=t;return Dc(n,"ZodArray","array")&&(n=vUe(n)??n),Dc(n,"ZodNumber","number")?"number":Dc(n,"ZodBoolean","boolean")?"boolean":Dc(n,"ZodEnum","enum")?"enum":Dc(n,"ZodString","string")?"string":"other"}function Pxt(e,t){let n=e;for(let r of t){if(n===null||typeof n!="object"||!(r in n))throw new Error(`cliRoutes path [${t.join(".")}] does not resolve in apiContract`);n=n[r]}if(n===null||typeof n!="object"||typeof n.method!="string")throw new Error(`cliRoutes path [${t.join(".")}] is not a leaf route (missing 'method')`);return n}function kxt(e,t){let n=e;for(let r of t)n=n[r];if(typeof n!="function")throw new Error(`client method for [${t.join(".")}] is not callable`);return n}function Zee(e,t){if(!(e==null||e==="")){if(t.isArray&&typeof e=="string"){let n=e.split(",").map(r=>r.trim()).filter(r=>r.length>0);return n.length>0?n:void 0}if(t.leafKind==="number"&&typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:e}return e}}function Uxt(e){if(typeof e!="string")return e;try{let n=new URL(e).pathname.split("/").filter(Boolean),r=n.findIndex(i=>i==="thread"||i==="threads"),o=r>=0?n[r+1]:void 0;return o&&o.length>0?o:e}catch{return e}}function Lxt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Wee(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>Lxt(n,a))}function Qxt(e,t,n){return e.resource==="threads"&&t==="id"?Uxt(n):n}function DUe(e){let t=Pxt(T6,e.path),n=Yee(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=Kee(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=Jee(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Jee(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let d={...i.args,...a.args,...c.args},m=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:m},args:d,async run({args:h,data:y}){gt.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??Ur)())throw new In("not logged in \u2014 run 'lore login' first");let R={};for(let he of r){let be=h[he],Ie=Zee(be,i.fields[he])??be;R[he]=Qxt(e,he,Ie)}let B={};for(let[he,be]of Object.entries(a.fields)){let Ie=Zee(h[he],be);Ie!==void 0&&(B[he]=Ie)}let N={};for(let[he,be]of Object.entries(c.fields)){let Ie=Zee(h[he],be);Ie!==void 0&&(N[he]=Ie)}let M=[...Wee(t.pathParams,R,"path"),...Wee(t.query,B,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Wee(t.body,N,"body")];if(M.length>0)throw new In(`Invalid request for \`lore ${e.resource} ${e.op}\`:
480
+ `);return}}});var cHe={};es(cHe,{getOpenBrowserCommand:()=>jHe,loginCommand:()=>Iie,openBrowser:()=>GHe,pollForTokens:()=>FHe,requestDeviceAuthorization:()=>QHe,runLogin:()=>HHe});import{spawn as hLt}from"node:child_process";async function SLt(e){let n=await lr({token:e}).whoAmI({headers:{}});n.status===200&&AUe(`lore_${n.body.user.id}`)}async function kHe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function UHe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function LHe(e,t){return new URL(t,e).toString()}async function QHe({clientId:e,workosApiOrigin:t}){let n=await fetch(LHe(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await kHe(n);if(!n.ok)throw new Error(UHe(r));return r}async function FHe({clientId:e,deviceCode:t,expiresIn:n,interval:r,timeoutMs:o,workosApiOrigin:i}){let a=AbortSignal.timeout(Math.min(o,n*1e3)),c=r;for(;;){let d;try{d=await fetch(LHe(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:ELt,device_code:t,client_id:e}),signal:a})}catch(y){throw y instanceof Error&&y.name==="TimeoutError"?new Error("authorization timed out"):y}let m=await kHe(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await PHe(c*1e3);break;case"slow_down":c+=1,await PHe(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(UHe(h))}}}async function GHe(e){let{command:t,args:n}=jHe(process.platform,e);await new Promise((r,o)=>{let i=hLt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function jHe(e,t){return e==="win32"?{command:"rundll32",args:["url.dll,FileProtocolHandler",t]}:e==="darwin"?{command:"open",args:[t]}:{command:"xdg-open",args:[t]}}async function yLt(e){if(!await Ur())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function TLt(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:Ud()})}catch(r){gt.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}async function HHe({client:e=lr(),enableLaunchAgent:t=$8,openBrowser:n=GHe,platform:r=process.platform,pollForTokens:o=FHe,requestDeviceAuthorization:i=QHe,setAccessToken:a=v6,setRefreshToken:c=R6,cacheAnalyticsDistinctId:d=SLt,timeoutMs:m=_Lt,progress:h=wHe}={}){if(await yLt(e)){h({kind:"already_logged_in"});return}let y=await e.getCliAuthConfig();if(y.status!==200)throw new Error("WorkOS CLI Auth is not configured.");try{let S=await i({clientId:y.body.workos_client_id,workosApiOrigin:y.body.workos_api_origin});h({kind:"device_authorized",userCode:S.user_code,verificationUri:S.verification_uri,verificationUriComplete:S.verification_uri_complete});try{await n(S.verification_uri_complete),h({kind:"browser_opened"})}catch(R){gt.warn("open_browser_failed",{error:R instanceof Error?R.message:String(R)}),h({kind:"browser_open_failed"})}h({kind:"browser_url",url:S.verification_uri_complete}),h({kind:"waiting_for_authorization"});let C=await o({clientId:y.body.workos_client_id,deviceCode:S.device_code,expiresIn:S.expires_in,interval:S.interval,timeoutMs:m,workosApiOrigin:y.body.workos_api_origin});a(C.access_token),C.refresh_token&&c(C.refresh_token),d(C.access_token).catch(R=>{gt.warn("cache_analytics_distinct_id_failed",{error:R instanceof Error?R.message:String(R)})}),h({kind:"logged_in"}),await TLt(t,r,h)}catch(S){throw S instanceof Error&&S.message==="authorization timed out"?h({kind:"authorization_timed_out"}):S instanceof Error&&S.message==="Authorization denied"?h({kind:"authorization_denied"}):S instanceof Error&&S.message==="Authorization expired"&&h({kind:"authorization_expired"}),S}}var _Lt,ELt,PHe,Iie,pie=O(async()=>{"use strict";A();ps();As();Ys();sy();await nHe();await uHe();Cw();Xv();MHe();_Lt=5*60*1e3,ELt="urn:ietf:params:oauth:grant-type:device_code";PHe=e=>new Promise(t=>setTimeout(t,e));Iie={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){gt.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(xc()&&!e?.progress){await sHe(t),await tHe({skipIfAlreadyConfigured:!0});return}await HHe({...t,progress:e?.progress})}}});A();A();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="812a568d-7be6-4edc-9b70-dd9e91e7baa0",e._sentryDebugIdIdentifier="sentry-dbid-812a568d-7be6-4edc-9b70-dd9e91e7baa0")}catch{}})();A();A();CN();Tl();KY({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:jo(),release:yl(),sendDefaultPii:!0});xk("service_name","lore-cli");CN();XY();import{realpathSync as y4t}from"node:fs";import{fileURLToPath as T4t,pathToFileURL as c5e}from"node:url";A();A();jee();ps();fs();As();A();function hO(e){let t=e;return t._def??t.def??{}}function Nxt(e){let t=hO(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Dc(e,t,n){let r=Nxt(e);return r===t||r===n}function vUe(e){let t=hO(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function Oxt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=hO(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function Yee(e){if(!e||!Dc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=hO(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function RUe(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=hO(t);if(Dc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Dc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Dc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Dc(t,"ZodEffects","effects"))t=i.schema;else if(Dc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function wxt(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=RUe(e),a=!1,c=n;Dc(c,"ZodArray","array")&&(a=!0,c=vUe(c)??c);let d=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Dc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:Oxt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Dc(c,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:d,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:a}:{arg:{type:"string",description:a?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:d,...o!==void 0?{default:String(o)}:{},...a?{valueHint:"a,b,c"}:{}},optional:r,isArray:a}}function Kee(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=wxt(i,t);n[o]=a,r[o]={isArray:c,leafKind:Mxt(i)}}return{args:n,fields:r}}function Jee(e,t={}){let n=Yee(e);return n?Kee(n,t):{args:{},fields:{}}}function Mxt(e){let{inner:t}=RUe(e),n=t;return Dc(n,"ZodArray","array")&&(n=vUe(n)??n),Dc(n,"ZodNumber","number")?"number":Dc(n,"ZodBoolean","boolean")?"boolean":Dc(n,"ZodEnum","enum")?"enum":Dc(n,"ZodString","string")?"string":"other"}function Pxt(e,t){let n=e;for(let r of t){if(n===null||typeof n!="object"||!(r in n))throw new Error(`cliRoutes path [${t.join(".")}] does not resolve in apiContract`);n=n[r]}if(n===null||typeof n!="object"||typeof n.method!="string")throw new Error(`cliRoutes path [${t.join(".")}] is not a leaf route (missing 'method')`);return n}function kxt(e,t){let n=e;for(let r of t)n=n[r];if(typeof n!="function")throw new Error(`client method for [${t.join(".")}] is not callable`);return n}function Zee(e,t){if(!(e==null||e==="")){if(t.isArray&&typeof e=="string"){let n=e.split(",").map(r=>r.trim()).filter(r=>r.length>0);return n.length>0?n:void 0}if(t.leafKind==="number"&&typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:e}return e}}function Uxt(e){if(typeof e!="string")return e;try{let n=new URL(e).pathname.split("/").filter(Boolean),r=n.findIndex(i=>i==="thread"||i==="threads"),o=r>=0?n[r+1]:void 0;return o&&o.length>0?o:e}catch{return e}}function Lxt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Wee(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>Lxt(n,a))}function Qxt(e,t,n){return e.resource==="threads"&&t==="id"?Uxt(n):n}function DUe(e){let t=Pxt(T6,e.path),n=Yee(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=Kee(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=Jee(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Jee(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let d={...i.args,...a.args,...c.args},m=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:m},args:d,async run({args:h,data:y}){gt.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??Ur)())throw new In("not logged in \u2014 run 'lore login' first");let R={};for(let he of r){let be=h[he],Ie=Zee(be,i.fields[he])??be;R[he]=Qxt(e,he,Ie)}let B={};for(let[he,be]of Object.entries(a.fields)){let Ie=Zee(h[he],be);Ie!==void 0&&(B[he]=Ie)}let N={};for(let[he,be]of Object.entries(c.fields)){let Ie=Zee(h[he],be);Ie!==void 0&&(N[he]=Ie)}let M=[...Wee(t.pathParams,R,"path"),...Wee(t.query,B,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Wee(t.body,N,"body")];if(M.length>0)throw new In(`Invalid request for \`lore ${e.resource} ${e.op}\`:
481
481
  ${M.join(`
482
482
  `)}`);let F=S?.client??lr(),H=kxt(F,e.path),j={headers:{}};r.length>0&&(j.params=R),Object.keys(B).length>0&&(j.query=B),Object.keys(c.fields).length>0&&(j.body=N);let ne=await H(j);if(ne.status>=200&&ne.status<300){console.log(JSON.stringify(ne.body,null,2));return}let ae=ne.body?.message??`${e.path.join(".")} returned ${ne.status}`;throw new In(ae)}}}A();var xUe=[{path:["getThread"],resource:"threads",op:"get"},{path:["listThreads"],resource:"threads",op:"list"},{path:["forkThread"],resource:"threads",op:"fork"},{path:["projects","listProjects"],resource:"projects",op:"list"}];function BUe(e=xUe){let t=new Map;for(let r of e){let o=DUe(r),i=t.get(r.resource)??new Map;if(i.has(r.op))throw new Error(`cliRoutes has duplicate "${r.resource} ${r.op}" \u2014 operations must be unique within a resource`);i.set(r.op,o),t.set(r.resource,i)}let n={};for(let[r,o]of t)n[r]={meta:{name:r,description:`Operations on ${r}.`},subCommands:Object.fromEntries(o)};return n}await pie();A();As();A();As();Ys();import{createHash as xLt}from"node:crypto";import Z8 from"node:fs/promises";import BLt from"node:path";A();import bw from"node:fs/promises";import ILt from"node:os";import nf from"node:path";var CLt=nf.join(ILt.homedir(),".claude","skills"),ZR=()=>CLt,Cie=(e=process.cwd())=>nf.join(e,".claude","skills"),Y8="SKILL.md",bLt=/^[A-Za-z0-9_][A-Za-z0-9._:-]*$/,vw=e=>{if(typeof e!="string"||e.length===0||e.length>200||e==="."||e===".."||e.includes("/")||e.includes("\\")||/[\x00-\x1f]/.test(e)||!bLt.test(e))return!1;for(let t of e.split(":"))if(t===""||t==="."||t==="..")return!1;return!0},K8=(e,t)=>{let n=nf.resolve(e),r=nf.resolve(t),o=nf.relative(n,r);if(o===""||o.startsWith("..")||nf.isAbsolute(o))throw new Error(`refused to use a skill path outside ${n}: ${r}`);return r},vLt=(e,t)=>vw(e)?[K8(Cie(t),nf.join(Cie(t),e,Y8)),K8(ZR(),nf.join(ZR(),e,Y8))]:[],zHe=async e=>{try{return await bw.access(e),!0}catch{return!1}},WR=async(e,t=process.cwd())=>{for(let n of vLt(e,t))if(await zHe(n)){let r=await bw.readFile(n,"utf8"),o=DLt(r);return{name:o.name??e,description:o.description??null,bodyMd:r,filePath:n}}return null},RLt=/^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/,DLt=e=>{let t=RLt.exec(e);if(!t)return{name:null,description:null};let n=t[1];if(!n)return{name:null,description:null};let r={name:null,description:null};for(let o of n.split(`
483
483
  `)){let i=o.trimEnd(),a=i.indexOf(":");if(a<=0)continue;let c=i.slice(0,a).trim(),d=i.slice(a+1).trim();(d.startsWith('"')&&d.endsWith('"')||d.startsWith("'")&&d.endsWith("'"))&&(d=d.slice(1,-1)),c==="name"&&(r.name=d||null),c==="description"&&(r.description=d||null)}return r},$He=async(e,t)=>{if(!vw(e))throw new Error(`refusing to install skill with invalid name: ${JSON.stringify(e)}`);let n=K8(ZR(),nf.join(ZR(),e)),r=K8(ZR(),nf.join(n,Y8));return await bw.mkdir(n,{recursive:!0}),await bw.writeFile(r,t,"utf8"),r},J8=async(e=process.cwd())=>{let t=new Set;for(let n of[Cie(e),ZR()])try{let r=await bw.readdir(n,{withFileTypes:!0});for(let o of r){if(!o.isDirectory()||!vw(o.name))continue;let i=nf.join(n,o.name,Y8);await zHe(i)&&t.add(o.name)}}catch{}return[...t].sort()};var NLt=e=>xLt("sha256").update(e,"utf8").digest("hex"),OLt=async()=>{try{let e=await Z8.readFile(C6(),"utf8");return{pushedHashes:JSON.parse(e).pushedHashes??{}}}catch{return{pushedHashes:{}}}},wLt=async e=>{let t=C6();await Z8.mkdir(BLt.dirname(t),{recursive:!0,mode:448}),await Z8.writeFile(t,`${JSON.stringify(e,null,2)}