@tanagram/lore 0.1.63 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/skills/lore-read/SKILL.md +16 -16
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 M5e=Object.create;var IM=Object.defineProperty;var P5e=Object.getOwnPropertyDescriptor;var k5e=Object.getOwnPropertyNames;var U5e=Object.getPrototypeOf,L5e=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),ts=(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 k5e(t))!L5e.call(e,o)&&o!==n&&IM(e,o,{get:()=>t[o],enumerable:!(r=P5e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?M5e(U5e(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.63"}}catch{}})()});var Tm,bH=O(()=>{A();Tm="1.9.1"});function Q5e(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=Q5e(Tm)});function kf(e,t,n,r=!1){var o;let i=Kx[Yx]=(o=Kx[Yx])!==null&&o!==void 0?o:{version:Tm};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!==Tm){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Tm}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Tm}.`),!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 Uf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Tm}.`);let n=Kx[Yx];n&&delete n[e]}var F5e,Yx,Kx,O0=O(()=>{A();bH();Dse();F5e=Tm.split(".")[0],Yx=Symbol.for(`opentelemetry.js.api.${F5e}`),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 ia,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"})(ia||(ia={}))});function Bse(e,t){e<ia.NONE?e=ia.NONE:e>ia.ALL&&(e=ia.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",ia.ERROR),warn:n("warn",ia.WARN),info:n("info",ia.INFO),debug:n("debug",ia.DEBUG),verbose:n("verbose",ia.VERBOSE)}}var Nse=O(()=>{A();bM()});var G5e,Ca,w0=O(()=>{A();xse();Nse();bM();O0();G5e="diag",Ca=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:ia.INFO})=>{var a,c,d;if(o===n){let S=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=S.stack)!==null&&a!==void 0?a:S.message),!1}typeof i=="number"&&(i={logLevel:i});let m=il("diag"),h=Bse((c=i.logLevel)!==null&&c!==void 0?c:ia.INFO,o);if(m&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return kf("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Uf(G5e,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"&&(j5e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:wse,toString(){return e}}}var j5e,vH=O(()=>{A();w0();Ose();Mse();j5e=Ca.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,H5e,z5e,$5e,V5e,q5e,Y5e,K5e,QH=O(()=>{A();BH=class{constructor(){}createGauge(t,n){return z5e}createHistogram(t,n){return $5e}createCounter(t,n){return H5e}createUpDownCounter(t,n){return V5e}createObservableGauge(t,n){return Y5e}createObservableCounter(t,n){return q5e}createObservableUpDownCounter(t,n){return K5e}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,H5e=new NH,z5e=new wH,$5e=new MH,V5e=new OH,q5e=new PH,Y5e=new kH,K5e=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,J5e,Lf,Xx=O(()=>{A();Fse();O0();w0();GH="context",J5e=new NM,Lf=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return kf(GH,t,Ca.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)||J5e}disable(){this._getContextManager().disable(),Uf(GH,Ca.instance())}}});var xs,jH=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(xs||(xs={}))});var e1,M0,OM,wM=O(()=>{A();jH();e1="0000000000000000",M0="00000000000000000000000000000000",OM={traceId:M0,spanId:e1,traceFlags:xs.NONE}});var Qf,MM=O(()=>{A();wM();Qf=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(Lf.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 Qf(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 Im(e){return $H(e.traceId)&&VH(e.spanId)}function $se(e){return new Qf(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 Z5e(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=Lf.getInstance(),$I=class{startSpan(t,n,r=qH.active()){if(!!n?.root)return new Qf;let i=r&&kM(r);return Z5e(i)&&Im(i)?new Qf(i):new Qf}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 W5e,VI,KH=O(()=>{A();YH();W5e=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):W5e}}});var QM,Vse=O(()=>{A();YH();QM=class{getTracer(t,n,r){return new $I}}});var X5e,P0,JH=O(()=>{A();KH();Vse();X5e=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:X5e}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 n$e.test(e)}function Zse(e){return r$e.test(e)&&!o$e.test(e)}var ZH,e$e,t$e,n$e,r$e,o$e,Wse=O(()=>{A();ZH="[_0-9a-z-*/]",e$e=`[a-z]${ZH}{0,255}`,t$e=`[a-z0-9]${ZH}{0,240}@[a-z]${ZH}{0,13}`,n$e=new RegExp(`^(?:${e$e}|${t$e})$`),r$e=/^[ -~]{0,255}[!-~]$/,o$e=/,|=/});var Xse,i$e,eue,tue,GM,nue=O(()=>{A();Wse();Xse=32,i$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>i$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=Lf.getInstance()});var sl,aue=O(()=>{A();w0();sl=Ca.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 kf(XH,t,Ca.instance())}getMeterProvider(){return il(XH)||sue}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Uf(XH,Ca.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(Lf.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,a$e,zM,gue=O(()=>{A();O0();due();FH();mue();vH();w0();rz="propagation",a$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 kf(rz,t,Ca.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(){Uf(rz,Ca.instance())}_getGlobalPropagator(){return il(rz)||a$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=Im,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=kf(oz,this._proxyTracerProvider,Ca.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return il(oz)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Uf(oz,Ca.instance()),this._proxyTracerProvider=new P0}}});var Ft,Eue=O(()=>{A();_ue();Ft=$M.getInstance()});var Je={};ts(Je,{DiagConsoleLogger:()=>RM,DiagLogLevel:()=>ia,INVALID_SPANID:()=>e1,INVALID_SPAN_CONTEXT:()=>OM,INVALID_TRACEID:()=>M0,ProxyTracer:()=>VI,ProxyTracerProvider:()=>P0,ROOT_CONTEXT:()=>HI,SamplingDecision:()=>FM,SpanKind:()=>Wr,SpanStatusCode:()=>Xo,TraceFlags:()=>xs,ValueType:()=>DM,baggageEntryMetadataFromString:()=>kse,context:()=>qe,createContextKey:()=>al,createNoopMeter:()=>Lse,createTraceState:()=>rue,default:()=>s$e,defaultTextMapGetter:()=>xM,defaultTextMapSetter:()=>BM,diag:()=>sl,isSpanContextValid:()=>Im,isValidSpanId:()=>VH,isValidTraceId:()=>$H,metrics:()=>ez,propagation:()=>vp,trace:()=>Ft});var s$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();s$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 u$e=(Le(),we(Je)),iz=(0,u$e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function c$e(e){return e.setValue(iz,!0)}_h.suppressTracing=c$e;function l$e(e){return e.deleteValue(iz)}_h.unsuppressTracing=l$e;function d$e(e){return e.getValue(iz)===!0}_h.isTracingSuppressed=d$e});var az=Q(Bs=>{"use strict";A();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.BAGGAGE_MAX_TOTAL_LENGTH=Bs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Bs.BAGGAGE_MAX_NAME_VALUE_PAIRS=Bs.BAGGAGE_HEADER=Bs.BAGGAGE_ITEMS_SEPARATOR=Bs.BAGGAGE_PROPERTIES_SEPARATOR=Bs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Bs.BAGGAGE_KEY_PAIR_SEPARATOR="=";Bs.BAGGAGE_PROPERTIES_SEPARATOR=";";Bs.BAGGAGE_ITEMS_SEPARATOR=",";Bs.BAGGAGE_HEADER="baggage";Bs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Bs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Bs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var sz=Q(Ff=>{"use strict";A();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.parseKeyPairsIntoRecord=Ff.parsePairKeyValue=Ff.getKeyPairs=Ff.serializeKeyPairs=void 0;var p$e=(Le(),we(Je)),qI=az();function f$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},"")}Ff.serializeKeyPairs=f$e;function A$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})}Ff.getKeyPairs=A$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,p$e.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}Ff.parsePairKeyValue=Sue;function m$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}Ff.parseKeyPairsIntoRecord=m$e});var yue=Q(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.W3CBaggagePropagator=void 0;var uz=(Le(),we(Je)),g$e=n1(),k0=az(),cz=sz(),lz=class{inject(t,n,r){let o=uz.propagation.getBaggage(t);if(!o||(0,g$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 h$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=h$e;function Cue(e){return typeof e=="string"&&e!==""}Eh.isAttributeKey=Cue;function bue(e){return e==null?!0:Array.isArray(e)?_$e(e):vue(typeof e)}Eh.isAttributeValue=bue;function _$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$e=(Le(),we(Je));function S$e(){return e=>{E$e.diag.error(y$e(e))}}YM.loggingErrorHandler=S$e;function y$e(e){return typeof e=="string"?e:JSON.stringify(T$e(e))}function T$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 I$e=pz(),Due=(0,I$e.loggingErrorHandler)();function C$e(e){Due=e}YI.setGlobalErrorHandler=C$e;function b$e(e){try{Due(e)}catch{}}YI.globalErrorHandler=b$e});var wue=Q(Gf=>{"use strict";A();Object.defineProperty(Gf,"__esModule",{value:!0});Gf.getStringListFromEnv=Gf.getBooleanFromEnv=Gf.getStringFromEnv=Gf.getNumberFromEnv=void 0;var Bue=(Le(),we(Je)),Nue=Ue("util");function v$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}Gf.getNumberFromEnv=v$e;function Oue(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Gf.getStringFromEnv=Oue;function R$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)}Gf.getBooleanFromEnv=R$e;function D$e(e){return Oue(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Gf.getStringListFromEnv=D$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,x$e,Az,B$e,N$e,O$e,w$e,mz,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,Z$e,gz,W$e,X$e,e9e,t9e,n9e,r9e,o9e,i9e,a9e,s9e,u9e,c9e,hz,l9e,d9e,_z,Ez,p9e,f9e,A9e,m9e,g9e,h9e,_9e,E9e,S9e,y9e,T9e,I9e,C9e,b9e,v9e,R9e,D9e,r1,KI,Sz,x9e,B9e,U0,N9e,O9e,w9e,M9e,yz,Tz,P9e,Iz,k9e,U9e,L9e,Q9e,F9e,G9e,j9e,H9e,z9e,$9e,V9e,q9e,Y9e,K9e,J9e,Z9e,W9e,X9e,eVe,tVe,nVe,rVe,oVe,Cz,iVe,aVe,sVe,uVe,cVe,lVe,dVe,pVe,fVe,AVe,mVe,gVe,hVe,_Ve,EVe,SVe,yVe,TVe,IVe,bz,CVe,vz,bVe,vVe,RVe,DVe,xVe,BVe,NVe,OVe,wVe,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,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,Rqe,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,Dqe,xqe,Bqe,Nqe,Oqe,wqe,Mqe,Pqe,kqe,Uqe,Lqe,Qqe,ape,spe,upe,cpe,lpe,Fqe,Gqe,jqe,Hqe,zqe,$qe,dpe,ppe,fpe,Vqe,qqe,Yqe,Kqe,Ape,mpe,gpe,hpe,Jqe,Zqe,Wqe,Xqe,e7e,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,t7e,n7e,r7e,o7e,i7e,a7e,s7e,u7e,bpe,vpe,Rpe,Dpe,xpe,c7e,l7e,d7e,p7e,f7e,A7e,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,m7e,g7e,h7e,_7e,E7e,S7e,y7e,T7e,I7e,C7e,b7e,v7e,R7e,D7e,x7e,B7e,N7e,O7e,w7e,M7e,P7e,k7e,Zpe,Wpe,Xpe,efe,tfe,U7e,L7e,Q7e,F7e,G7e,j7e,nfe,rfe,H7e,z7e,$7e,ofe,ife,V7e,q7e,Y7e,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,K7e,J7e,Z7e,W7e,X7e,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,Ife,Cfe,fYe,AYe,mYe,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",x$e=kue,Az=Uue,B$e=Lue,N$e=Que,O$e=Fue,w$e=Gue,mz=jue,M$e=Hue,P$e=zue,k$e=$ue,U$e=Vue,L$e=que,Q$e=Yue,F$e=Kue,G$e=Jue,j$e=Zue,H$e=Wue,z$e=Xue,$$e=ece,V$e=tce,q$e=nce,Y$e=rce,K$e=oce,J$e=ice,Z$e=ace,gz=sce,W$e=uce,X$e=cce,e9e=lce,t9e=dce,n9e=pce,r9e=fce,o9e=Ace,i9e=mce,a9e=gce,s9e=hce,u9e=_ce,c9e=Ece,hz=Sce,l9e=yce,d9e=Tce,_z=Ice,Ez=Cce,p9e=bce,f9e=vce,A9e=Rce,m9e=Dce,g9e=xce,h9e=Bce,_9e=Nce,E9e=Oce,S9e=wce,y9e=Mce,T9e=Pce,I9e=kce,C9e=Uce,b9e=Lce,v9e=Qce,R9e=Fce,D9e=Gce,r1=jce,KI=Hce,Sz=zce,x9e=$ce,B9e=Vce,U0=qce,N9e=Yce,O9e=Kce,w9e=Jce,M9e=Zce,yz=Wce,Tz=Xce,P9e=ele,Iz=tle,k9e=nle,U9e=rle,L9e=ole,Q9e=ile,F9e=ale,G9e=sle,j9e=ule,H9e=cle,z9e=lle,$9e=dle,V9e=ple,q9e=fle,Y9e=Ale,K9e=mle,J9e=gle,Z9e=hle,W9e=_le,X9e=Ele,eVe=Sle,tVe=yle,nVe=Tle,rVe=Ile,oVe=Cle,Cz=ble,iVe=vle,aVe=Rle,sVe=Dle,uVe=xle,cVe=Ble,lVe=Nle,dVe=Ole,pVe=wle,fVe=Mle,AVe=Ple,mVe=kle,gVe=Ule,hVe=Lle,_Ve=Qle,EVe=Fle,SVe=Gle,yVe=jle,TVe=Hle,IVe=zle,bz=$le,CVe=Vle,vz=qle,bVe=Yle,vVe=Kle,RVe=Jle,DVe=Zle,xVe=Wle,BVe=Xle,NVe=ede,OVe=tde,wVe=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",MVe=nde,PVe=rde,kVe=ode,UVe=ide,LVe=ade,QVe=sde,FVe=ude,GVe=cde,jVe=lde,HVe=dde,zVe=pde,$Ve=fde,VVe=Ade,qVe=mde,YVe=gde,KVe=hde,JVe=_de,ZVe=Ede,WVe=Sde,XVe=yde,eqe=Tde,tqe=Ide,nqe=Cde,rqe=bde,oqe=vde,iqe=Rde,aqe=Dde,sqe=xde,uqe=Bde,cqe=Nde,lqe=Ode,dqe=wde,pqe=Mde,fqe=Pde,Aqe=kde,mqe=Ude,gqe=Lde,hqe=Qde,_qe=Fde,Eqe=Gde,Sqe=jde,yqe=Hde,Tqe=zde,Iqe=$de,Cqe=Vde,bqe=qde,vqe=Yde,Rqe=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",Dqe=Kde,xqe=Jde,Bqe=Zde,Nqe=Wde,Oqe=Xde,wqe=epe,Mqe=tpe,Pqe=npe,kqe=rpe,Uqe=ope,Lqe=ipe,Qqe=gi([Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe]),ape="datasource",spe="http",upe="pubsub",cpe="timer",lpe="other",Fqe=ape,Gqe=spe,jqe=upe,Hqe=cpe,zqe=lpe,$qe=gi([ape,spe,upe,cpe,lpe]),dpe="insert",ppe="edit",fpe="delete",Vqe=dpe,qqe=ppe,Yqe=fpe,Kqe=gi([dpe,ppe,fpe]),Ape="alibaba_cloud",mpe="aws",gpe="azure",hpe="gcp",Jqe=Ape,Zqe=mpe,Wqe=gpe,Xqe=hpe,e7e=gi([Ape,mpe,gpe,hpe]),_pe="ip_tcp",Epe="ip_udp",Spe="ip",ype="unix",Tpe="pipe",Ipe="inproc",Cpe="other",t7e=_pe,n7e=Epe,r7e=Spe,o7e=ype,i7e=Tpe,a7e=Ipe,s7e=Cpe,u7e=gi([_pe,Epe,Spe,ype,Tpe,Ipe,Cpe]),bpe="wifi",vpe="wired",Rpe="cell",Dpe="unavailable",xpe="unknown",c7e=bpe,l7e=vpe,d7e=Rpe,p7e=Dpe,f7e=xpe,A7e=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",m7e=Bpe,g7e=Npe,h7e=Ope,_7e=wpe,E7e=Mpe,S7e=Ppe,y7e=kpe,T7e=Upe,I7e=Lpe,C7e=Qpe,b7e=Fpe,v7e=Gpe,R7e=jpe,D7e=Hpe,x7e=zpe,B7e=$pe,N7e=Vpe,O7e=qpe,w7e=Ype,M7e=Kpe,P7e=Jpe,k7e=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",U7e=Zpe,L7e=Wpe,Q7e=Xpe,F7e=efe,G7e=tfe,j7e={HTTP_1_0:Zpe,HTTP_1_1:Wpe,HTTP_2_0:Xpe,SPDY:efe,QUIC:tfe},nfe="queue",rfe="topic",H7e=nfe,z7e=rfe,$7e=gi([nfe,rfe]),ofe="receive",ife="process",V7e=ofe,q7e=ife,Y7e=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,K7e=afe,J7e=sfe,Z7e=ufe,W7e=cfe,X7e=lfe,eYe=dfe,tYe=pfe,nYe=ffe,rYe=Afe,oYe=mfe,iYe=gfe,aYe=hfe,sYe=_fe,uYe=Efe,cYe=Sfe,lYe=yfe,dYe=Tfe,pYe={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",fYe=Ife,AYe=Cfe,mYe=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,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,OKe,Rz,wKe,MKe,PKe,kKe,UKe,LKe,QKe,FKe,GKe,jKe,eme,tme,nme,rme,HKe,zKe,$Ke,VKe,qKe,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,yme,Tme,pJe,fJe,AJe,Ime,Cme,bme,vme,Rme,Dme,xme,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,Bme,Nme,Ome,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,IJe,CJe,bJe,vJe,RJe,DJe,xJe,BJe,NJe,OJe,wJe,MJe,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,PJe,kJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,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",gYe=Rfe,hYe=Dfe,_Ye=xfe,EYe=Bfe,SYe=Nfe,yYe=Ofe,TYe=wfe,IYe=Mfe,CYe=Pfe,bYe=kfe,vYe=Ufe,RYe=Lfe,DYe=Qfe,xYe=Ffe,BYe=Gfe,NYe=jfe,OYe=Hfe,wYe=zfe,MYe=$fe,PYe=Vfe,kYe=qfe,UYe=Yfe,LYe=Kfe,QYe=Jfe,FYe=Zfe,GYe=Wfe,jYe=Xfe,HYe=eAe,zYe=tAe,$Ye=nAe,VYe=rAe,qYe=oAe,YYe=iAe,KYe=aAe,JYe=sAe,ZYe=uAe,WYe=cAe,XYe=lAe,eKe=dAe,tKe=pAe,nKe=fAe,rKe=AAe,oKe=mAe,iKe=gAe,aKe=hAe,sKe=_Ae,uKe=EAe,cKe=SAe,lKe=yAe,dKe=TAe,pKe=IAe,fKe=CAe,AKe=bAe,mKe=vAe,gKe=RAe,hKe=DAe,_Ke=xAe,EKe=BAe,SKe=NAe,yKe=OAe,TKe=wAe,IKe=MAe,CKe=PAe,bKe=kAe,vKe=UAe,RKe=LAe,DKe=QAe,xKe=FAe,BKe=GAe,NKe=jAe,OKe=HAe,Rz=zAe,wKe=$Ae,MKe=VAe,PKe=qAe,kKe=YAe,UKe=KAe,LKe=JAe,QKe=ZAe,FKe=WAe,GKe=XAe,jKe=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",HKe=eme,zKe=tme,$Ke=nme,VKe=rme,qKe=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",YKe=ome,KKe=ime,JKe=ame,ZKe=sme,WKe=ume,XKe=cme,eJe=lme,tJe=dme,nJe=pme,rJe=fme,oJe=Ame,iJe=mme,aJe=gme,sJe=hme,uJe=_me,cJe=Eme,lJe=Sme,dJe=gi([ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme]),yme="ec2",Tme="fargate",pJe=yme,fJe=Tme,AJe=gi([yme,Tme]),Ime="amd64",Cme="arm32",bme="arm64",vme="ia64",Rme="ppc32",Dme="ppc64",xme="x86",mJe=Ime,gJe=Cme,hJe=bme,_Je=vme,EJe=Rme,SJe=Dme,yJe=xme,TJe=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",IJe=Bme,CJe=Nme,bJe=Ome,vJe=wme,RJe=Mme,DJe=Pme,xJe=kme,BJe=Ume,NJe=Lme,OJe=Qme,wJe=Fme,MJe=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",PJe=Gme,kJe=jme,UJe=Hme,LJe=zme,QJe=$me,FJe=Vme,GJe=qme,jJe=Yme,HJe=Kme,zJe=Jme,$Je=gi([Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme])});var Wme=O(()=>{A();Zme()});var VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,Dz,xz,hZe,JI,_Ze,Bz,Nz,EZe,L0,SZe,yZe,TZe,IZe,CZe,bZe,vZe,RZe,DZe,xZe,Oz,BZe,NZe,OZe,wZe,MZe,PZe,Q0,kZe,UZe,LZe,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,YZe,Cm,bm,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,wz,Mz,dWe,Pz,kz,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,Uz,Lz,vWe,Qz,RWe,Fz,DWe,xWe,BWe,NWe,OWe,wWe,MWe,PWe,kWe,UWe,LWe,QWe,FWe,GWe,jWe,HWe,zWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,Sh,WWe,XWe,eXe,Gz,Xme=O(()=>{A();VJe="aspnetcore.diagnostics.exception.result",qJe="aborted",YJe="handled",KJe="skipped",JJe="unhandled",ZJe="aspnetcore.diagnostics.handler.type",WJe="aspnetcore.rate_limiting.policy",XJe="aspnetcore.rate_limiting.result",eZe="acquired",tZe="endpoint_limiter",nZe="global_limiter",rZe="request_canceled",oZe="aspnetcore.request.is_unhandled",iZe="aspnetcore.routing.is_fallback",aZe="aspnetcore.routing.match_status",sZe="failure",uZe="success",cZe="aspnetcore.user.is_authenticated",lZe="client.address",dZe="client.port",pZe="code.column.number",fZe="code.file.path",AZe="code.function.name",mZe="code.line.number",gZe="code.stacktrace",Dz="db.collection.name",xz="db.namespace",hZe="db.operation.batch.size",JI="db.operation.name",_Ze="db.query.summary",Bz="db.query.text",Nz="db.response.status_code",EZe="db.stored_procedure.name",L0="db.system.name",SZe="mariadb",yZe="microsoft.sql_server",TZe="mysql",IZe="postgresql",CZe="dotnet.gc.heap.generation",bZe="gen0",vZe="gen1",RZe="gen2",DZe="loh",xZe="poh",Oz="error.type",BZe="_OTHER",NZe="exception.escaped",OZe="exception.message",wZe="exception.stacktrace",MZe="exception.type",PZe=e=>`http.request.header.${e}`,Q0="http.request.method",kZe="_OTHER",UZe="CONNECT",LZe="DELETE",QZe="GET",FZe="HEAD",GZe="OPTIONS",jZe="PATCH",HZe="POST",zZe="PUT",$Ze="TRACE",VZe="http.request.method_original",qZe="http.request.resend_count",YZe=e=>`http.response.header.${e}`,Cm="http.response.status_code",bm="http.route",KZe="jvm.gc.action",JZe="jvm.gc.name",ZZe="jvm.memory.pool.name",WZe="jvm.memory.type",XZe="heap",eWe="non_heap",tWe="jvm.thread.daemon",nWe="jvm.thread.state",rWe="blocked",oWe="new",iWe="runnable",aWe="terminated",sWe="timed_waiting",uWe="waiting",cWe="network.local.address",lWe="network.local.port",wz="network.peer.address",Mz="network.peer.port",dWe="network.protocol.name",Pz="network.protocol.version",kz="network.transport",pWe="pipe",fWe="quic",AWe="tcp",mWe="udp",gWe="unix",hWe="network.type",_We="ipv4",EWe="ipv6",SWe="otel.scope.name",yWe="otel.scope.version",TWe="otel.status_code",IWe="ERROR",CWe="OK",bWe="otel.status_description",Uz="server.address",Lz="server.port",vWe="service.instance.id",Qz="service.name",RWe="service.namespace",Fz="service.version",DWe="signalr.connection.status",xWe="app_shutdown",BWe="normal_closure",NWe="timeout",OWe="signalr.transport",wWe="long_polling",MWe="server_sent_events",PWe="web_sockets",kWe="telemetry.sdk.language",UWe="cpp",LWe="dotnet",QWe="erlang",FWe="go",GWe="java",jWe="nodejs",HWe="php",zWe="python",$We="ruby",VWe="rust",qWe="swift",YWe="webjs",KWe="telemetry.sdk.name",JWe="telemetry.sdk.version",ZWe="url.fragment",Sh="url.full",WWe="url.path",XWe="url.query",eXe="url.scheme",Gz="user_agent.original"});var 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,ZXe,ege=O(()=>{A();tXe="aspnetcore.diagnostics.exceptions",nXe="aspnetcore.rate_limiting.active_request_leases",rXe="aspnetcore.rate_limiting.queued_requests",oXe="aspnetcore.rate_limiting.request.time_in_queue",iXe="aspnetcore.rate_limiting.request_lease.duration",aXe="aspnetcore.rate_limiting.requests",sXe="aspnetcore.routing.match_attempts",uXe="db.client.operation.duration",cXe="dotnet.assembly.count",lXe="dotnet.exceptions",dXe="dotnet.gc.collections",pXe="dotnet.gc.heap.total_allocated",fXe="dotnet.gc.last_collection.heap.fragmentation.size",AXe="dotnet.gc.last_collection.heap.size",mXe="dotnet.gc.last_collection.memory.committed_size",gXe="dotnet.gc.pause.time",hXe="dotnet.jit.compilation.time",_Xe="dotnet.jit.compiled_il.size",EXe="dotnet.jit.compiled_methods",SXe="dotnet.monitor.lock_contentions",yXe="dotnet.process.cpu.count",TXe="dotnet.process.cpu.time",IXe="dotnet.process.memory.working_set",CXe="dotnet.thread_pool.queue.length",bXe="dotnet.thread_pool.thread.count",vXe="dotnet.thread_pool.work_item.count",RXe="dotnet.timer.count",DXe="http.client.request.duration",xXe="http.server.request.duration",BXe="jvm.class.count",NXe="jvm.class.loaded",OXe="jvm.class.unloaded",wXe="jvm.cpu.count",MXe="jvm.cpu.recent_utilization",PXe="jvm.cpu.time",kXe="jvm.gc.duration",UXe="jvm.memory.committed",LXe="jvm.memory.limit",QXe="jvm.memory.used",FXe="jvm.memory.used_after_last_gc",GXe="jvm.thread.count",jXe="kestrel.active_connections",HXe="kestrel.active_tls_handshakes",zXe="kestrel.connection.duration",$Xe="kestrel.queued_connections",VXe="kestrel.queued_requests",qXe="kestrel.rejected_connections",YXe="kestrel.tls_handshake.duration",KXe="kestrel.upgraded_connections",JXe="signalr.server.active_connections",ZXe="signalr.server.connection.duration"});var WXe,tge=O(()=>{A();WXe="exception"});var Nr={};ts(Nr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>qJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>YJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>KJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>JJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>eZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>tZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>nZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>rZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>sZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>uZe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>VJe,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>ZJe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>WJe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>XJe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>oZe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>iZe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>aZe,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>cZe,ATTR_CLIENT_ADDRESS:()=>lZe,ATTR_CLIENT_PORT:()=>dZe,ATTR_CODE_COLUMN_NUMBER:()=>pZe,ATTR_CODE_FILE_PATH:()=>fZe,ATTR_CODE_FUNCTION_NAME:()=>AZe,ATTR_CODE_LINE_NUMBER:()=>mZe,ATTR_CODE_STACKTRACE:()=>gZe,ATTR_DB_COLLECTION_NAME:()=>Dz,ATTR_DB_NAMESPACE:()=>xz,ATTR_DB_OPERATION_BATCH_SIZE:()=>hZe,ATTR_DB_OPERATION_NAME:()=>JI,ATTR_DB_QUERY_SUMMARY:()=>_Ze,ATTR_DB_QUERY_TEXT:()=>Bz,ATTR_DB_RESPONSE_STATUS_CODE:()=>Nz,ATTR_DB_STORED_PROCEDURE_NAME:()=>EZe,ATTR_DB_SYSTEM_NAME:()=>L0,ATTR_DOTNET_GC_HEAP_GENERATION:()=>CZe,ATTR_ERROR_TYPE:()=>Oz,ATTR_EXCEPTION_ESCAPED:()=>NZe,ATTR_EXCEPTION_MESSAGE:()=>OZe,ATTR_EXCEPTION_STACKTRACE:()=>wZe,ATTR_EXCEPTION_TYPE:()=>MZe,ATTR_HTTP_REQUEST_HEADER:()=>PZe,ATTR_HTTP_REQUEST_METHOD:()=>Q0,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>VZe,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>qZe,ATTR_HTTP_RESPONSE_HEADER:()=>YZe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Cm,ATTR_HTTP_ROUTE:()=>bm,ATTR_JVM_GC_ACTION:()=>KZe,ATTR_JVM_GC_NAME:()=>JZe,ATTR_JVM_MEMORY_POOL_NAME:()=>ZZe,ATTR_JVM_MEMORY_TYPE:()=>WZe,ATTR_JVM_THREAD_DAEMON:()=>tWe,ATTR_JVM_THREAD_STATE:()=>nWe,ATTR_NETWORK_LOCAL_ADDRESS:()=>cWe,ATTR_NETWORK_LOCAL_PORT:()=>lWe,ATTR_NETWORK_PEER_ADDRESS:()=>wz,ATTR_NETWORK_PEER_PORT:()=>Mz,ATTR_NETWORK_PROTOCOL_NAME:()=>dWe,ATTR_NETWORK_PROTOCOL_VERSION:()=>Pz,ATTR_NETWORK_TRANSPORT:()=>kz,ATTR_NETWORK_TYPE:()=>hWe,ATTR_OTEL_SCOPE_NAME:()=>SWe,ATTR_OTEL_SCOPE_VERSION:()=>yWe,ATTR_OTEL_STATUS_CODE:()=>TWe,ATTR_OTEL_STATUS_DESCRIPTION:()=>bWe,ATTR_SERVER_ADDRESS:()=>Uz,ATTR_SERVER_PORT:()=>Lz,ATTR_SERVICE_INSTANCE_ID:()=>vWe,ATTR_SERVICE_NAME:()=>Qz,ATTR_SERVICE_NAMESPACE:()=>RWe,ATTR_SERVICE_VERSION:()=>Fz,ATTR_SIGNALR_CONNECTION_STATUS:()=>DWe,ATTR_SIGNALR_TRANSPORT:()=>OWe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>kWe,ATTR_TELEMETRY_SDK_NAME:()=>KWe,ATTR_TELEMETRY_SDK_VERSION:()=>JWe,ATTR_URL_FRAGMENT:()=>ZWe,ATTR_URL_FULL:()=>Sh,ATTR_URL_PATH:()=>WWe,ATTR_URL_QUERY:()=>XWe,ATTR_URL_SCHEME:()=>eXe,ATTR_USER_AGENT_ORIGINAL:()=>Gz,AWSECSLAUNCHTYPEVALUES_EC2:()=>pJe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>fJe,AwsEcsLaunchtypeValues:()=>AJe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>YKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>KKe,CLOUDPLATFORMVALUES_AWS_EC2:()=>JKe,CLOUDPLATFORMVALUES_AWS_ECS:()=>ZKe,CLOUDPLATFORMVALUES_AWS_EKS:()=>WKe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>eJe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>XKe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>rJe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>iJe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>nJe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>oJe,CLOUDPLATFORMVALUES_AZURE_VM:()=>tJe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>lJe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>cJe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>sJe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>aJe,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>uJe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>HKe,CLOUDPROVIDERVALUES_AWS:()=>zKe,CLOUDPROVIDERVALUES_AZURE:()=>$Ke,CLOUDPROVIDERVALUES_GCP:()=>VKe,CloudPlatformValues:()=>dJe,CloudProviderValues:()=>qKe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Dqe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>kqe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>xqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Pqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Nqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Lqe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Oqe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Bqe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Uqe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Mqe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>wqe,DBSYSTEMVALUES_ADABAS:()=>ZVe,DBSYSTEMVALUES_CACHE:()=>JVe,DBSYSTEMVALUES_CASSANDRA:()=>Aqe,DBSYSTEMVALUES_CLOUDSCAPE:()=>jVe,DBSYSTEMVALUES_COCKROACHDB:()=>vqe,DBSYSTEMVALUES_COLDFUSION:()=>fqe,DBSYSTEMVALUES_COSMOSDB:()=>Sqe,DBSYSTEMVALUES_COUCHBASE:()=>_qe,DBSYSTEMVALUES_COUCHDB:()=>Eqe,DBSYSTEMVALUES_DB2:()=>LVe,DBSYSTEMVALUES_DERBY:()=>XVe,DBSYSTEMVALUES_DYNAMODB:()=>yqe,DBSYSTEMVALUES_EDB:()=>KVe,DBSYSTEMVALUES_ELASTICSEARCH:()=>Cqe,DBSYSTEMVALUES_FILEMAKER:()=>eqe,DBSYSTEMVALUES_FIREBIRD:()=>WVe,DBSYSTEMVALUES_FIRSTSQL:()=>YVe,DBSYSTEMVALUES_GEODE:()=>Iqe,DBSYSTEMVALUES_H2:()=>pqe,DBSYSTEMVALUES_HANADB:()=>VVe,DBSYSTEMVALUES_HBASE:()=>mqe,DBSYSTEMVALUES_HIVE:()=>GVe,DBSYSTEMVALUES_HSQLDB:()=>HVe,DBSYSTEMVALUES_INFORMIX:()=>tqe,DBSYSTEMVALUES_INGRES:()=>qVe,DBSYSTEMVALUES_INSTANTDB:()=>nqe,DBSYSTEMVALUES_INTERBASE:()=>rqe,DBSYSTEMVALUES_MARIADB:()=>oqe,DBSYSTEMVALUES_MAXDB:()=>$Ve,DBSYSTEMVALUES_MEMCACHED:()=>bqe,DBSYSTEMVALUES_MONGODB:()=>gqe,DBSYSTEMVALUES_MSSQL:()=>PVe,DBSYSTEMVALUES_MYSQL:()=>kVe,DBSYSTEMVALUES_NEO4J:()=>Tqe,DBSYSTEMVALUES_NETEZZA:()=>iqe,DBSYSTEMVALUES_ORACLE:()=>UVe,DBSYSTEMVALUES_OTHER_SQL:()=>MVe,DBSYSTEMVALUES_PERVASIVE:()=>aqe,DBSYSTEMVALUES_POINTBASE:()=>sqe,DBSYSTEMVALUES_POSTGRESQL:()=>QVe,DBSYSTEMVALUES_PROGRESS:()=>zVe,DBSYSTEMVALUES_REDIS:()=>hqe,DBSYSTEMVALUES_REDSHIFT:()=>FVe,DBSYSTEMVALUES_SQLITE:()=>uqe,DBSYSTEMVALUES_SYBASE:()=>cqe,DBSYSTEMVALUES_TERADATA:()=>lqe,DBSYSTEMVALUES_VERTICA:()=>dqe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>SZe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>yZe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>TZe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>IZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>bZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>vZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>RZe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>DZe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>xZe,DbCassandraConsistencyLevelValues:()=>Qqe,DbSystemValues:()=>Rqe,ERROR_TYPE_VALUE_OTHER:()=>BZe,EVENT_EXCEPTION:()=>WXe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Yqe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>qqe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Vqe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Jqe,FAASINVOKEDPROVIDERVALUES_AWS:()=>Zqe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Wqe,FAASINVOKEDPROVIDERVALUES_GCP:()=>Xqe,FAASTRIGGERVALUES_DATASOURCE:()=>Fqe,FAASTRIGGERVALUES_HTTP:()=>Gqe,FAASTRIGGERVALUES_OTHER:()=>zqe,FAASTRIGGERVALUES_PUBSUB:()=>jqe,FAASTRIGGERVALUES_TIMER:()=>Hqe,FaasDocumentOperationValues:()=>Kqe,FaasInvokedProviderValues:()=>e7e,FaasTriggerValues:()=>$qe,HOSTARCHVALUES_AMD64:()=>mJe,HOSTARCHVALUES_ARM32:()=>gJe,HOSTARCHVALUES_ARM64:()=>hJe,HOSTARCHVALUES_IA64:()=>_Je,HOSTARCHVALUES_PPC32:()=>EJe,HOSTARCHVALUES_PPC64:()=>SJe,HOSTARCHVALUES_X86:()=>yJe,HTTPFLAVORVALUES_HTTP_1_0:()=>U7e,HTTPFLAVORVALUES_HTTP_1_1:()=>L7e,HTTPFLAVORVALUES_HTTP_2_0:()=>Q7e,HTTPFLAVORVALUES_QUIC:()=>G7e,HTTPFLAVORVALUES_SPDY:()=>F7e,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>UZe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>LZe,HTTP_REQUEST_METHOD_VALUE_GET:()=>QZe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>FZe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>GZe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>kZe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>jZe,HTTP_REQUEST_METHOD_VALUE_POST:()=>HZe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>zZe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>$Ze,HostArchValues:()=>TJe,HttpFlavorValues:()=>j7e,JVM_MEMORY_TYPE_VALUE_HEAP:()=>XZe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>eWe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>rWe,JVM_THREAD_STATE_VALUE_NEW:()=>oWe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>iWe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>aWe,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>sWe,JVM_THREAD_STATE_VALUE_WAITING:()=>uWe,MESSAGETYPEVALUES_RECEIVED:()=>AYe,MESSAGETYPEVALUES_SENT:()=>fYe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>H7e,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>z7e,MESSAGINGOPERATIONVALUES_PROCESS:()=>q7e,MESSAGINGOPERATIONVALUES_RECEIVE:()=>V7e,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>tXe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>nXe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>rXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>aXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>iXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>oXe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>sXe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>uXe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>cXe,METRIC_DOTNET_EXCEPTIONS:()=>lXe,METRIC_DOTNET_GC_COLLECTIONS:()=>dXe,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>pXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>fXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>AXe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>mXe,METRIC_DOTNET_GC_PAUSE_TIME:()=>gXe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>hXe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>_Xe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>EXe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>SXe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>yXe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>TXe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>IXe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>CXe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>bXe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>vXe,METRIC_DOTNET_TIMER_COUNT:()=>RXe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>DXe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>xXe,METRIC_JVM_CLASS_COUNT:()=>BXe,METRIC_JVM_CLASS_LOADED:()=>NXe,METRIC_JVM_CLASS_UNLOADED:()=>OXe,METRIC_JVM_CPU_COUNT:()=>wXe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>MXe,METRIC_JVM_CPU_TIME:()=>PXe,METRIC_JVM_GC_DURATION:()=>kXe,METRIC_JVM_MEMORY_COMMITTED:()=>UXe,METRIC_JVM_MEMORY_LIMIT:()=>LXe,METRIC_JVM_MEMORY_USED:()=>QXe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>FXe,METRIC_JVM_THREAD_COUNT:()=>GXe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>jXe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>HXe,METRIC_KESTREL_CONNECTION_DURATION:()=>zXe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>$Xe,METRIC_KESTREL_QUEUED_REQUESTS:()=>VXe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>qXe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>YXe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>KXe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>JXe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>ZXe,MessageTypeValues:()=>mYe,MessagingDestinationKindValues:()=>$7e,MessagingOperationValues:()=>Y7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>_7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>y7e,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>g7e,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>D7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>E7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>S7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>v7e,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>m7e,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>B7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>T7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>C7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>x7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>I7e,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>b7e,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>O7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>R7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>P7e,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>w7e,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>M7e,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>N7e,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>h7e,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>d7e,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>p7e,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>f7e,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>c7e,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>l7e,NETTRANSPORTVALUES_INPROC:()=>a7e,NETTRANSPORTVALUES_IP:()=>r7e,NETTRANSPORTVALUES_IP_TCP:()=>t7e,NETTRANSPORTVALUES_IP_UDP:()=>n7e,NETTRANSPORTVALUES_OTHER:()=>s7e,NETTRANSPORTVALUES_PIPE:()=>i7e,NETTRANSPORTVALUES_UNIX:()=>o7e,NETWORK_TRANSPORT_VALUE_PIPE:()=>pWe,NETWORK_TRANSPORT_VALUE_QUIC:()=>fWe,NETWORK_TRANSPORT_VALUE_TCP:()=>AWe,NETWORK_TRANSPORT_VALUE_UDP:()=>mWe,NETWORK_TRANSPORT_VALUE_UNIX:()=>gWe,NETWORK_TYPE_VALUE_IPV4:()=>_We,NETWORK_TYPE_VALUE_IPV6:()=>EWe,NetHostConnectionSubtypeValues:()=>k7e,NetHostConnectionTypeValues:()=>A7e,NetTransportValues:()=>u7e,OSTYPEVALUES_AIX:()=>NJe,OSTYPEVALUES_DARWIN:()=>bJe,OSTYPEVALUES_DRAGONFLYBSD:()=>xJe,OSTYPEVALUES_FREEBSD:()=>vJe,OSTYPEVALUES_HPUX:()=>BJe,OSTYPEVALUES_LINUX:()=>CJe,OSTYPEVALUES_NETBSD:()=>RJe,OSTYPEVALUES_OPENBSD:()=>DJe,OSTYPEVALUES_SOLARIS:()=>OJe,OSTYPEVALUES_WINDOWS:()=>IJe,OSTYPEVALUES_Z_OS:()=>wJe,OTEL_STATUS_CODE_VALUE_ERROR:()=>IWe,OTEL_STATUS_CODE_VALUE_OK:()=>CWe,OsTypeValues:()=>MJe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>iYe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>tYe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>J7e,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>lYe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>X7e,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>oYe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>uYe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>W7e,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>eYe,RPCGRPCSTATUSCODEVALUES_OK:()=>K7e,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>aYe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>nYe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>rYe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>dYe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>cYe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>sYe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Z7e,RpcGrpcStatusCodeValues:()=>pYe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>$9e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>rVe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>j9e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>L9e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>tVe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>J9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Y9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>oVe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>V9e,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>Q9e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>z9e,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>K9e,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>H9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>F9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>G9e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>nVe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>W9e,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>X9e,SEMATTRS_AWS_DYNAMODB_SELECT:()=>q9e,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Z9e,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>U9e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>eVe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>x$e,SEMATTRS_CODE_FILEPATH:()=>R9e,SEMATTRS_CODE_FUNCTION:()=>b9e,SEMATTRS_CODE_LINENO:()=>D9e,SEMATTRS_CODE_NAMESPACE:()=>v9e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>L$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>H$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>j$e,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>F$e,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>k$e,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>U$e,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>G$e,SEMATTRS_DB_CASSANDRA_TABLE:()=>Q$e,SEMATTRS_DB_CONNECTION_STRING:()=>B$e,SEMATTRS_DB_HBASE_NAMESPACE:()=>z$e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>O$e,SEMATTRS_DB_MONGODB_COLLECTION:()=>V$e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>P$e,SEMATTRS_DB_NAME:()=>w$e,SEMATTRS_DB_OPERATION:()=>M$e,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>$$e,SEMATTRS_DB_SQL_TABLE:()=>q$e,SEMATTRS_DB_STATEMENT:()=>mz,SEMATTRS_DB_SYSTEM:()=>Az,SEMATTRS_DB_USER:()=>N$e,SEMATTRS_ENDUSER_ID:()=>S9e,SEMATTRS_ENDUSER_ROLE:()=>y9e,SEMATTRS_ENDUSER_SCOPE:()=>T9e,SEMATTRS_EXCEPTION_ESCAPED:()=>Z$e,SEMATTRS_EXCEPTION_MESSAGE:()=>K$e,SEMATTRS_EXCEPTION_STACKTRACE:()=>J$e,SEMATTRS_EXCEPTION_TYPE:()=>Y$e,SEMATTRS_FAAS_COLDSTART:()=>i9e,SEMATTRS_FAAS_CRON:()=>o9e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>X$e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>n9e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>e9e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>t9e,SEMATTRS_FAAS_EXECUTION:()=>W$e,SEMATTRS_FAAS_INVOKED_NAME:()=>a9e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>s9e,SEMATTRS_FAAS_INVOKED_REGION:()=>u9e,SEMATTRS_FAAS_TIME:()=>r9e,SEMATTRS_FAAS_TRIGGER:()=>gz,SEMATTRS_HTTP_CLIENT_IP:()=>k9e,SEMATTRS_HTTP_FLAVOR:()=>N9e,SEMATTRS_HTTP_HOST:()=>x9e,SEMATTRS_HTTP_METHOD:()=>r1,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>w9e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>M9e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>yz,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Tz,SEMATTRS_HTTP_ROUTE:()=>Iz,SEMATTRS_HTTP_SCHEME:()=>B9e,SEMATTRS_HTTP_SERVER_NAME:()=>P9e,SEMATTRS_HTTP_STATUS_CODE:()=>U0,SEMATTRS_HTTP_TARGET:()=>Sz,SEMATTRS_HTTP_URL:()=>KI,SEMATTRS_HTTP_USER_AGENT:()=>O9e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>NVe,SEMATTRS_MESSAGE_ID:()=>BVe,SEMATTRS_MESSAGE_TYPE:()=>xVe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>OVe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>gVe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>pVe,SEMATTRS_MESSAGING_DESTINATION:()=>iVe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>aVe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>SVe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>EVe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>_Ve,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>yVe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>TVe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>dVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>AVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>fVe,SEMATTRS_MESSAGING_OPERATION:()=>mVe,SEMATTRS_MESSAGING_PROTOCOL:()=>uVe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>cVe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>hVe,SEMATTRS_MESSAGING_SYSTEM:()=>Cz,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>sVe,SEMATTRS_MESSAGING_URL:()=>lVe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>_9e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>g9e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>h9e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>m9e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>A9e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>f9e,SEMATTRS_NET_HOST_IP:()=>_z,SEMATTRS_NET_HOST_NAME:()=>p9e,SEMATTRS_NET_HOST_PORT:()=>Ez,SEMATTRS_NET_PEER_IP:()=>hz,SEMATTRS_NET_PEER_NAME:()=>d9e,SEMATTRS_NET_PEER_PORT:()=>l9e,SEMATTRS_NET_TRANSPORT:()=>c9e,SEMATTRS_PEER_SERVICE:()=>E9e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>vz,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>RVe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>DVe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>vVe,SEMATTRS_RPC_JSONRPC_VERSION:()=>bVe,SEMATTRS_RPC_METHOD:()=>CVe,SEMATTRS_RPC_SERVICE:()=>bz,SEMATTRS_RPC_SYSTEM:()=>IVe,SEMATTRS_THREAD_ID:()=>I9e,SEMATTRS_THREAD_NAME:()=>C9e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>TYe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>yYe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>IYe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>CYe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>bYe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>vYe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>RYe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>xYe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>DYe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>NYe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>BYe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>hYe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>EYe,SEMRESATTRS_CLOUD_PLATFORM:()=>SYe,SEMRESATTRS_CLOUD_PROVIDER:()=>gYe,SEMRESATTRS_CLOUD_REGION:()=>_Ye,SEMRESATTRS_CONTAINER_ID:()=>wYe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>PYe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>kYe,SEMRESATTRS_CONTAINER_NAME:()=>OYe,SEMRESATTRS_CONTAINER_RUNTIME:()=>MYe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>UYe,SEMRESATTRS_DEVICE_ID:()=>LYe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>QYe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>FYe,SEMRESATTRS_FAAS_ID:()=>jYe,SEMRESATTRS_FAAS_INSTANCE:()=>zYe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>$Ye,SEMRESATTRS_FAAS_NAME:()=>GYe,SEMRESATTRS_FAAS_VERSION:()=>HYe,SEMRESATTRS_HOST_ARCH:()=>KYe,SEMRESATTRS_HOST_ID:()=>VYe,SEMRESATTRS_HOST_IMAGE_ID:()=>ZYe,SEMRESATTRS_HOST_IMAGE_NAME:()=>JYe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>WYe,SEMRESATTRS_HOST_NAME:()=>qYe,SEMRESATTRS_HOST_TYPE:()=>YYe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>XYe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>iKe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>hKe,SEMRESATTRS_K8S_CRONJOB_UID:()=>gKe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>fKe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>pKe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>cKe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>uKe,SEMRESATTRS_K8S_JOB_NAME:()=>mKe,SEMRESATTRS_K8S_JOB_UID:()=>AKe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>nKe,SEMRESATTRS_K8S_NODE_NAME:()=>eKe,SEMRESATTRS_K8S_NODE_UID:()=>tKe,SEMRESATTRS_K8S_POD_NAME:()=>oKe,SEMRESATTRS_K8S_POD_UID:()=>rKe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>sKe,SEMRESATTRS_K8S_REPLICASET_UID:()=>aKe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>dKe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>lKe,SEMRESATTRS_OS_DESCRIPTION:()=>EKe,SEMRESATTRS_OS_NAME:()=>SKe,SEMRESATTRS_OS_TYPE:()=>_Ke,SEMRESATTRS_OS_VERSION:()=>yKe,SEMRESATTRS_PROCESS_COMMAND:()=>bKe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>RKe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>vKe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>IKe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>CKe,SEMRESATTRS_PROCESS_OWNER:()=>DKe,SEMRESATTRS_PROCESS_PID:()=>TKe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>NKe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>xKe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>BKe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>wKe,SEMRESATTRS_SERVICE_NAME:()=>OKe,SEMRESATTRS_SERVICE_NAMESPACE:()=>Rz,SEMRESATTRS_SERVICE_VERSION:()=>MKe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>LKe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>kKe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>PKe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>UKe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>GKe,SEMRESATTRS_WEBENGINE_NAME:()=>QKe,SEMRESATTRS_WEBENGINE_VERSION:()=>FKe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>xWe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>BWe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>NWe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>wWe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>MWe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>PWe,SemanticAttributes:()=>wVe,SemanticResourceAttributes:()=>jKe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>PJe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>kJe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>UJe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>LJe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>QJe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>FJe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>GJe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>jJe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>HJe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>zJe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>UWe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>LWe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>QWe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>FWe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>GWe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>jWe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>HWe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>zWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>$We,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>VWe,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>qWe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>YWe,TelemetrySdkLanguageValues:()=>$Je});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 XXe=Pue(),WM=($n(),we(Nr)),eet=nge();XM.SDK_INFO={[WM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[eet.ATTR_PROCESS_RUNTIME_NAME]:"node",[WM.ATTR_TELEMETRY_SDK_LANGUAGE]:WM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[WM.ATTR_TELEMETRY_SDK_VERSION]:XXe.VERSION}});var oge=Q(Ns=>{"use strict";A();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.otperformance=Ns.SDK_INFO=Ns._globalThis=Ns.getStringListFromEnv=Ns.getNumberFromEnv=Ns.getBooleanFromEnv=Ns.getStringFromEnv=void 0;var eP=wue();Object.defineProperty(Ns,"getStringFromEnv",{enumerable:!0,get:function(){return eP.getStringFromEnv}});Object.defineProperty(Ns,"getBooleanFromEnv",{enumerable:!0,get:function(){return eP.getBooleanFromEnv}});Object.defineProperty(Ns,"getNumberFromEnv",{enumerable:!0,get:function(){return eP.getNumberFromEnv}});Object.defineProperty(Ns,"getStringListFromEnv",{enumerable:!0,get:function(){return eP.getStringListFromEnv}});var tet=Mue();Object.defineProperty(Ns,"_globalThis",{enumerable:!0,get:function(){return tet._globalThis}});var net=rge();Object.defineProperty(Ns,"SDK_INFO",{enumerable:!0,get:function(){return net.SDK_INFO}});Ns.otperformance=performance});var jz=Q(Os=>{"use strict";A();Object.defineProperty(Os,"__esModule",{value:!0});Os.getStringListFromEnv=Os.getNumberFromEnv=Os.getStringFromEnv=Os.getBooleanFromEnv=Os.otperformance=Os._globalThis=Os.SDK_INFO=void 0;var F0=oge();Object.defineProperty(Os,"SDK_INFO",{enumerable:!0,get:function(){return F0.SDK_INFO}});Object.defineProperty(Os,"_globalThis",{enumerable:!0,get:function(){return F0._globalThis}});Object.defineProperty(Os,"otperformance",{enumerable:!0,get:function(){return F0.otperformance}});Object.defineProperty(Os,"getBooleanFromEnv",{enumerable:!0,get:function(){return F0.getBooleanFromEnv}});Object.defineProperty(Os,"getStringFromEnv",{enumerable:!0,get:function(){return F0.getStringFromEnv}});Object.defineProperty(Os,"getNumberFromEnv",{enumerable:!0,get:function(){return F0.getNumberFromEnv}});Object.defineProperty(Os,"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,ret=6,oet=Math.pow(10,ret),nP=Math.pow(10,ige);function o1(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*oet);return[n,r]}Xr.millisToHrTime=o1;function iet(){return tP.otperformance.timeOrigin}Xr.getTimeOrigin=iet;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 aet(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=aet;function set(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=nP),[n,r]}Xr.hrTimeDuration=set;function uet(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=uet;function cet(e){return e[0]*nP+e[1]}Xr.hrTimeToNanoseconds=cet;function det(e){return e[0]*1e3+e[1]/1e6}Xr.hrTimeToMilliseconds=det;function pet(e){return e[0]*1e6+e[1]/1e3}Xr.hrTimeToMicroseconds=pet;function Hz(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Xr.isTimeInputHrTime=Hz;function fet(e){return Hz(e)||typeof e=="number"||e instanceof Date}Xr.isTimeInput=fet;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 Aet(e){typeof e!="number"&&e.unref()}rP.unrefTimer=Aet});var lge=Q(i1=>{"use strict";A();Object.defineProperty(i1,"__esModule",{value:!0});i1.ExportResultCode=void 0;var met;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(met=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-*/]",get=`[a-z]${$z}{0,255}`,het=`[a-z0-9]${$z}{0,240}@[a-z]${$z}{0,13}`,_et=new RegExp(`^(?:${get}|${het})$`),Eet=/^[ -~]{0,255}[!-~]$/,yet=/,|=/;function Tet(e){return _et.test(e)}ZI.validateKey=Tet;function Iet(e){return Eet.test(e)&&!yet.test(e)}ZI.validateValue=Iet});var qz=Q(iP=>{"use strict";A();Object.defineProperty(iP,"__esModule",{value:!0});iP.TraceState=void 0;var Age=fge(),mge=32,Cet=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>Cet||(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(ws=>{"use strict";A();Object.defineProperty(ws,"__esModule",{value:!0});ws.W3CTraceContextPropagator=ws.parseTraceParent=ws.TRACE_STATE_HEADER=ws.TRACE_PARENT_HEADER=void 0;var aP=(Le(),we(Je)),bet=n1(),vet=qz();ws.TRACE_PARENT_HEADER="traceparent";ws.TRACE_STATE_HEADER="tracestate";var Ret="00",Det="(?!ff)[\\da-f]{2}",xet="(?![0]{32})[\\da-f]{32}",Bet="(?![0]{16})[\\da-f]{16}",Net="[\\da-f]{2}",Oet=new RegExp(`^\\s?(${Det})-(${xet})-(${Bet})-(${Net})(-.*)?\\s?$`);function _ge(e){let t=Oet.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}ws.parseTraceParent=_ge;var Yz=class{inject(t,n,r){let o=aP.trace.getSpanContext(t);if(!o||(0,bet.isTracingSuppressed)(t)||!(0,aP.isSpanContextValid)(o))return;let i=`${Ret}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||aP.TraceFlags.NONE).toString(16)}`;r.set(n,ws.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,ws.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,ws.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,ws.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new vet.TraceState(typeof d=="string"?d:void 0)}return aP.trace.setSpanContext(t,a)}fields(){return[ws.TRACE_PARENT_HEADER,ws.TRACE_STATE_HEADER]}};ws.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 wet=(Le(),we(Je)),Kz=(0,wet.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Met;(function(e){e.HTTP="http"})(Met=Rp.RPCType||(Rp.RPCType={}));function Pet(e,t){return e.setValue(Kz,t)}Rp.setRPCMetadata=Pet;function ket(e){return e.deleteValue(Kz)}Rp.deleteRPCMetadata=ket;function Uet(e){return e.getValue(Kz)}Rp.getRPCMetadata=Uet});var bge=Q(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.isPlainObject=void 0;var Let="[object Object]",Qet="[object Null]",Fet="[object Undefined]",Get=Function.prototype,yge=Get.toString,jet=yge.call(Object),Het=Object.getPrototypeOf,Tge=Object.prototype,Ige=Tge.hasOwnProperty,G0=Symbol?Symbol.toStringTag:void 0,Cge=Tge.toString;function zet(e){if(!$et(e)||Vet(e)!==Let)return!1;let t=Het(e);if(t===null)return!0;let n=Ige.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&yge.call(n)===jet}sP.isPlainObject=zet;function $et(e){return e!=null&&typeof e=="object"}function Vet(e){return e==null?e===void 0?Fet:Qet:G0&&G0 in Object(e)?qet(e):Yet(e)}function qet(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 Yet(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(),Ket=20;function Jet(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Dge(t,e.shift(),0,n);return t}lP.merge=Jet;function Jz(e){return cP(e)?e.slice():e}function Dge(e,t,n=0,r){let o;if(!(n>Ket)){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(!Zet(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],S=m;if(Rge(e,d,r)||Rge(t,d,r))delete o[d];else{if(a1(h)&&a1(S)){let y=r.get(h)||[],C=r.get(S)||[];y.push({obj:e,key:d}),C.push({obj:t,key:d}),r.set(h,y),r.set(S,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 Zet(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 Wet(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=Wet});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 Xet(e,t){if(!t)return!1;for(let n of t)if(Oge(e,n))return!0;return!1}XI.isUrlIgnored=Xet});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 ett=Mge(),Wz=class{_isCalled=!1;_deferred=new ett.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 vm=(Le(),we(Je)),kge={ALL:vm.DiagLogLevel.ALL,VERBOSE:vm.DiagLogLevel.VERBOSE,DEBUG:vm.DiagLogLevel.DEBUG,INFO:vm.DiagLogLevel.INFO,WARN:vm.DiagLogLevel.WARN,ERROR:vm.DiagLogLevel.ERROR,NONE:vm.DiagLogLevel.NONE};function ttt(e){if(e==null)return;let t=kge[e.toUpperCase()];return t??(vm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kge)}, using default`),vm.DiagLogLevel.INFO)}AP.diagLogLevelFromString=ttt});var Qge=Q(mP=>{"use strict";A();Object.defineProperty(mP,"__esModule",{value:!0});mP._export=void 0;var Lge=(Le(),we(Je)),ntt=n1();function rtt(e,t){return new Promise(n=>{Lge.context.with((0,ntt.suppressTracing)(Lge.context.active()),()=>{e.export(t,n)})})}mP._export=rtt});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 ott=yue();Object.defineProperty(Be,"W3CBaggagePropagator",{enumerable:!0,get:function(){return ott.W3CBaggagePropagator}});var itt=Tue();Object.defineProperty(Be,"AnchoredClock",{enumerable:!0,get:function(){return itt.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 att=pz();Object.defineProperty(Be,"loggingErrorHandler",{enumerable:!0,get:function(){return att.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 stt=cge();Object.defineProperty(Be,"unrefTimer",{enumerable:!0,get:function(){return stt.unrefTimer}});var utt=lge();Object.defineProperty(Be,"ExportResultCode",{enumerable:!0,get:function(){return utt.ExportResultCode}});var ctt=sz();Object.defineProperty(Be,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return ctt.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 ltt=pge();Object.defineProperty(Be,"CompositePropagator",{enumerable:!0,get:function(){return ltt.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 dtt=qz();Object.defineProperty(Be,"TraceState",{enumerable:!0,get:function(){return dtt.TraceState}});var ptt=Bge();Object.defineProperty(Be,"merge",{enumerable:!0,get:function(){return ptt.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 ftt=Pge();Object.defineProperty(Be,"BindOnceFuture",{enumerable:!0,get:function(){return ftt.BindOnceFuture}});var Att=Uge();Object.defineProperty(Be,"diagLogLevelFromString",{enumerable:!0,get:function(){return Att.diagLogLevelFromString}});var mtt=Qge();Be.internal={_export:mtt._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 gtt;(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"})(gtt=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(jf=>{"use strict";A();Object.defineProperty(jf,"__esModule",{value:!0});jf.API_BACKWARDS_COMPATIBILITY_VERSION=jf.makeGetter=jf._global=jf.GLOBAL_LOGS_API_KEY=void 0;jf.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");jf._global=globalThis;function htt(e,t,n){return r=>r===e?t:n}jf.makeGetter=htt;jf.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 _tt=SP(),yP=class{getLogger(t,n,r){return new _tt.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 Ett=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):Ett.NOOP_LOGGER}};TP.ProxyLogger=t5});var Yge=Q(IP=>{"use strict";A();Object.defineProperty(IP,"__esModule",{value:!0});IP.ProxyLoggerProvider=void 0;var Stt=e5(),ytt=qge(),n5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new ytt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Stt.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(),Ttt=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,Ttt.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(Hf=>{"use strict";A();Object.defineProperty(Hf,"__esModule",{value:!0});Hf.logs=Hf.NoopLogger=Hf.NOOP_LOGGER=Hf.SeverityNumber=void 0;var Itt=$ge();Object.defineProperty(Hf,"SeverityNumber",{enumerable:!0,get:function(){return Itt.SeverityNumber}});var Zge=SP();Object.defineProperty(Hf,"NOOP_LOGGER",{enumerable:!0,get:function(){return Zge.NOOP_LOGGER}});Object.defineProperty(Hf,"NoopLogger",{enumerable:!0,get:function(){return Zge.NoopLogger}});var Ctt=Jge();Hf.logs=Ctt.LogsAPI.getInstance()});var Wge=Q(nC=>{"use strict";A();Object.defineProperty(nC,"__esModule",{value:!0});nC.disableInstrumentations=nC.enableInstrumentations=void 0;function btt(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=btt;function vtt(e){e.forEach(t=>t.disable())}nC.disableInstrumentations=vtt});var the=Q(bP=>{"use strict";A();Object.defineProperty(bP,"__esModule",{value:!0});bP.registerInstrumentations=void 0;var Xge=(Le(),we(Je)),Rtt=o5(),ehe=Wge();function Dtt(e){let t=e.tracerProvider||Xge.trace.getTracerProvider(),n=e.meterProvider||Xge.metrics.getMeterProvider(),r=e.loggerProvider||Rtt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,ehe.enableInstrumentations)(o,t,n,r),()=>{(0,ehe.disableInstrumentations)(o)}}bP.registerInstrumentations=Dtt});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-]+)*))?$/,xtt=/^(?<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-]+)*))?$/,Btt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Ntt(e,t,n){if(!Ott(e))return u5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=ktt(e);if(!r)return!1;let o=[],i=she(r,t,o,n);return i&&!n?.includePrerelease?Mtt(r,o):i}vP.satisfies=Ntt;function Ott(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=rnt(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=Ptt(t,r),t.includes(" "))return she(e,t,n,r);{let o=Utt(t);return n.push(o),wtt(e,o)}}function wtt(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 Btt[t.op]?.includes(n)}function Mtt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Ptt(e,t){return e=e.trim(),e=tnt(e,t),e=ent(e),e=nnt(e,t),e=e.trim(),e}function gu(e){return!e||e.toLowerCase()==="x"||e==="*"}function ktt(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 Utt(e){if(!e)return{};let t=e.match(xtt);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 Ltt(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 Qtt(e,t){if(s5(e)||s5(t))return 0;let[n,r]=Ltt(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=Qtt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var uhe="[a-zA-Z0-9-]",che="0|[1-9]\\d*",Ftt=`\\d*[a-zA-Z-]${uhe}*`,Gtt="((?:<|>)?=?)",ohe=`(?:${che}|${Ftt})`,jtt=`(?:-(${ohe}(?:\\.${ohe})*))`,ihe=`${uhe}+`,Htt=`(?:\\+(${ihe}(?:\\.${ihe})*))`,a5=`${che}|x|X|\\*`,u1=`[v=\\s]*(${a5})(?:\\.(${a5})(?:\\.(${a5})(?:${jtt})?${Htt}?)?)?`,ztt=`^${Gtt}\\s*${u1}$`,$tt=new RegExp(ztt),Vtt=`^\\s*(${u1})\\s+-\\s+(${u1})\\s*$`,qtt=new RegExp(Vtt),Ytt="(?:~>?)",Ktt=`^${Ytt}${u1}$`,Jtt=new RegExp(Ktt),Ztt="(?:\\^)",Wtt=`^${Ztt}${u1}$`,Xtt=new RegExp(Wtt);function ent(e){let t=Jtt;return e.replace(t,(n,r,o,i,a)=>{let c;return gu(r)?c="":gu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:gu(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 tnt(e,t){let n=Xtt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return gu(i)?m="":gu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:gu(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 nnt(e,t){let n=$tt;return e.replace(n,(r,o,i,a,c,d)=>{let m=gu(i),h=m||gu(a),S=h||gu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function rnt(e,t){let n=qtt;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,R)=>(gu(i)?o="":gu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:gu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,gu(S)?h="":gu(y)?h=`<${+S+1}.0.0-0`:gu(C)?h=`<${S}.${+y+1}.0-0`:R?h=`<=${S}.${y}.${C}-${R}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var c5=Q(ns=>{"use strict";A();Object.defineProperty(ns,"__esModule",{value:!0});ns.massUnwrap=ns.unwrap=ns.massWrap=ns.wrap=void 0;var hu=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 ont=(e,t,n)=>{if(!e||!e[t]){hu("no original function "+String(t)+" to wrap");return}if(!n){hu("no wrapper function"),hu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){hu("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};ns.wrap=ont;var int=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{hu("must provide one or more modules to patch"),hu(new Error().stack);return}if(!(t&&Array.isArray(t))){hu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ns.wrap)(r,o,n)})})};ns.massWrap=int;var ant=(e,t)=>{if(!e||!e[t]){hu("no function to unwrap."),hu(new Error().stack);return}let n=e[t];if(!n.__unwrap)hu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ns.unwrap=ant;var snt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{hu("must provide one or more modules to patch"),hu(new Error().stack);return}if(!(t&&Array.isArray(t))){hu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ns.unwrap)(n,r)})})};ns.massUnwrap=snt;function l1(e){e&&e.logger&&(typeof e.logger!="function"?hu("new logger isn't a function, not replacing"):hu=e.logger)}ns.default=l1;l1.wrap=ns.wrap;l1.massWrap=ns.massWrap;l1.unwrap=ns.unwrap;l1.massUnwrap=ns.massUnwrap});var dhe=Q(DP=>{"use strict";A();Object.defineProperty(DP,"__esModule",{value:!0});DP.InstrumentationAbstract=void 0;var l5=(Le(),we(Je)),unt=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=unt.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((z8t,phe)=>{A();var rC=1e3,oC=rC*60,iC=oC*60,H0=iC*24,cnt=H0*7,lnt=H0*365.25;phe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return dnt(e);if(n==="number"&&isFinite(e))return t.long?fnt(e):pnt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function dnt(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*lnt;case"weeks":case"week":case"w":return n*cnt;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 pnt(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 fnt(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((V8t,Ahe)=>{A();function Ant(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 S=0;for(let y=0;y<h.length;y++)S=(S<<5)-S+h.charCodeAt(y),S|=0;return n.colors[Math.abs(S)%n.colors.length]}n.selectColor=t;function n(h){let S,y=null,C,R;function B(...N){if(!B.enabled)return;let M=B,F=Number(new Date),H=F-(S||F);M.diff=H,M.prev=S,M.curr=F,S=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:()=>y!==null?y:(C!==n.namespaces&&(C=n.namespaces,R=n.enabled(h)),R),set:N=>{y=N}}),typeof n.init=="function"&&n.init(B),B}function r(h,S){let y=n(this.namespace+(typeof S>"u"?":":S)+h);return y.log=this.log,y}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let S=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of S)y[0]==="-"?n.skips.push(y.slice(1)):n.names.push(y)}function i(h,S){let y=0,C=0,R=-1,B=0;for(;y<h.length;)if(C<S.length&&(S[C]===h[y]||S[C]==="*"))S[C]==="*"?(R=C,B=y,C++):(y++,C++);else if(R!==-1)C=R+1,B++,y=B;else return!1;for(;C<S.length&&S[C]==="*";)C++;return C===S.length}function a(){let h=[...n.names,...n.skips.map(S=>"-"+S)].join(",");return n.enable(""),h}function c(h){for(let S of n.skips)if(i(h,S))return!1;for(let S of n.names)if(i(h,S))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=Ant});var mhe=Q((dc,BP)=>{A();dc.formatArgs=gnt;dc.save=hnt;dc.load=_nt;dc.useColors=mnt;dc.storage=Ent();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 mnt(){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 gnt(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 hnt(e){try{e?dc.storage.setItem("debug",e):dc.storage.removeItem("debug")}catch{}}function _nt(){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 Ent(){try{return localStorage}catch{}}BP.exports=p5()(dc);var{formatters:Snt}=BP.exports;Snt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var hhe=Q((K8t,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((Z8t,Ehe)=>{"use strict";A();var ynt=Ue("os"),_he=Ue("tty"),Ad=hhe(),{env:ba}=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 ba&&(ba.FORCE_COLOR==="true"?yh=1:ba.FORCE_COLOR==="false"?yh=0:yh=ba.FORCE_COLOR.length===0?1:Math.min(parseInt(ba.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(ba.TERM==="dumb")return n;if(process.platform==="win32"){let r=ynt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ba)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in ba)||ba.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in ba)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ba.TEAMCITY_VERSION)?1:0;if(ba.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ba){let r=parseInt((ba.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ba.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ba.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ba.TERM)||"COLORTERM"in ba?1:n}function Tnt(e){let t=A5(e,e&&e.isTTY);return f5(t)}Ehe.exports={supportsColor:Tnt,stdout:f5(A5(!0,_he.isatty(1))),stderr:f5(A5(!0,_he.isatty(2)))}});var The=Q((va,OP)=>{A();var Int=Ue("tty"),NP=Ue("util");va.init=Bnt;va.log=Rnt;va.formatArgs=bnt;va.save=Dnt;va.load=xnt;va.useColors=Cnt;va.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`.");va.colors=[6,2,3,4,5,1];try{let e=She();e&&(e.stderr||e).level>=2&&(va.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{}va.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 Cnt(){return"colors"in va.inspectOpts?!!va.inspectOpts.colors:Int.isatty(process.stderr.fd)}function bnt(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 M5e=Object.create;var IM=Object.defineProperty;var P5e=Object.getOwnPropertyDescriptor;var k5e=Object.getOwnPropertyNames;var U5e=Object.getPrototypeOf,L5e=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),ts=(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 k5e(t))!L5e.call(e,o)&&o!==n&&IM(e,o,{get:()=>t[o],enumerable:!(r=P5e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?M5e(U5e(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.64"}}catch{}})()});var Tm,bH=O(()=>{A();Tm="1.9.1"});function Q5e(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=Q5e(Tm)});function kf(e,t,n,r=!1){var o;let i=Kx[Yx]=(o=Kx[Yx])!==null&&o!==void 0?o:{version:Tm};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!==Tm){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Tm}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Tm}.`),!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 Uf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Tm}.`);let n=Kx[Yx];n&&delete n[e]}var F5e,Yx,Kx,O0=O(()=>{A();bH();Dse();F5e=Tm.split(".")[0],Yx=Symbol.for(`opentelemetry.js.api.${F5e}`),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 ia,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"})(ia||(ia={}))});function Bse(e,t){e<ia.NONE?e=ia.NONE:e>ia.ALL&&(e=ia.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",ia.ERROR),warn:n("warn",ia.WARN),info:n("info",ia.INFO),debug:n("debug",ia.DEBUG),verbose:n("verbose",ia.VERBOSE)}}var Nse=O(()=>{A();bM()});var G5e,Ca,w0=O(()=>{A();xse();Nse();bM();O0();G5e="diag",Ca=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:ia.INFO})=>{var a,c,d;if(o===n){let S=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=S.stack)!==null&&a!==void 0?a:S.message),!1}typeof i=="number"&&(i={logLevel:i});let m=il("diag"),h=Bse((c=i.logLevel)!==null&&c!==void 0?c:ia.INFO,o);if(m&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return kf("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Uf(G5e,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"&&(j5e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:wse,toString(){return e}}}var j5e,vH=O(()=>{A();w0();Ose();Mse();j5e=Ca.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,H5e,z5e,$5e,V5e,q5e,Y5e,K5e,QH=O(()=>{A();BH=class{constructor(){}createGauge(t,n){return z5e}createHistogram(t,n){return $5e}createCounter(t,n){return H5e}createUpDownCounter(t,n){return V5e}createObservableGauge(t,n){return Y5e}createObservableCounter(t,n){return q5e}createObservableUpDownCounter(t,n){return K5e}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,H5e=new NH,z5e=new wH,$5e=new MH,V5e=new OH,q5e=new PH,Y5e=new kH,K5e=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,J5e,Lf,Xx=O(()=>{A();Fse();O0();w0();GH="context",J5e=new NM,Lf=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return kf(GH,t,Ca.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)||J5e}disable(){this._getContextManager().disable(),Uf(GH,Ca.instance())}}});var xs,jH=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(xs||(xs={}))});var e1,M0,OM,wM=O(()=>{A();jH();e1="0000000000000000",M0="00000000000000000000000000000000",OM={traceId:M0,spanId:e1,traceFlags:xs.NONE}});var Qf,MM=O(()=>{A();wM();Qf=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(Lf.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 Qf(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 Im(e){return $H(e.traceId)&&VH(e.spanId)}function $se(e){return new Qf(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 Z5e(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=Lf.getInstance(),$I=class{startSpan(t,n,r=qH.active()){if(!!n?.root)return new Qf;let i=r&&kM(r);return Z5e(i)&&Im(i)?new Qf(i):new Qf}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 W5e,VI,KH=O(()=>{A();YH();W5e=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):W5e}}});var QM,Vse=O(()=>{A();YH();QM=class{getTracer(t,n,r){return new $I}}});var X5e,P0,JH=O(()=>{A();KH();Vse();X5e=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:X5e}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 n$e.test(e)}function Zse(e){return r$e.test(e)&&!o$e.test(e)}var ZH,e$e,t$e,n$e,r$e,o$e,Wse=O(()=>{A();ZH="[_0-9a-z-*/]",e$e=`[a-z]${ZH}{0,255}`,t$e=`[a-z0-9]${ZH}{0,240}@[a-z]${ZH}{0,13}`,n$e=new RegExp(`^(?:${e$e}|${t$e})$`),r$e=/^[ -~]{0,255}[!-~]$/,o$e=/,|=/});var Xse,i$e,eue,tue,GM,nue=O(()=>{A();Wse();Xse=32,i$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>i$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=Lf.getInstance()});var sl,aue=O(()=>{A();w0();sl=Ca.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 kf(XH,t,Ca.instance())}getMeterProvider(){return il(XH)||sue}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Uf(XH,Ca.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(Lf.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,a$e,zM,gue=O(()=>{A();O0();due();FH();mue();vH();w0();rz="propagation",a$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 kf(rz,t,Ca.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(){Uf(rz,Ca.instance())}_getGlobalPropagator(){return il(rz)||a$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=Im,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=kf(oz,this._proxyTracerProvider,Ca.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return il(oz)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Uf(oz,Ca.instance()),this._proxyTracerProvider=new P0}}});var Ft,Eue=O(()=>{A();_ue();Ft=$M.getInstance()});var Je={};ts(Je,{DiagConsoleLogger:()=>RM,DiagLogLevel:()=>ia,INVALID_SPANID:()=>e1,INVALID_SPAN_CONTEXT:()=>OM,INVALID_TRACEID:()=>M0,ProxyTracer:()=>VI,ProxyTracerProvider:()=>P0,ROOT_CONTEXT:()=>HI,SamplingDecision:()=>FM,SpanKind:()=>Wr,SpanStatusCode:()=>Xo,TraceFlags:()=>xs,ValueType:()=>DM,baggageEntryMetadataFromString:()=>kse,context:()=>qe,createContextKey:()=>al,createNoopMeter:()=>Lse,createTraceState:()=>rue,default:()=>s$e,defaultTextMapGetter:()=>xM,defaultTextMapSetter:()=>BM,diag:()=>sl,isSpanContextValid:()=>Im,isValidSpanId:()=>VH,isValidTraceId:()=>$H,metrics:()=>ez,propagation:()=>vp,trace:()=>Ft});var s$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();s$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 u$e=(Le(),we(Je)),iz=(0,u$e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function c$e(e){return e.setValue(iz,!0)}_h.suppressTracing=c$e;function l$e(e){return e.deleteValue(iz)}_h.unsuppressTracing=l$e;function d$e(e){return e.getValue(iz)===!0}_h.isTracingSuppressed=d$e});var az=Q(Bs=>{"use strict";A();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.BAGGAGE_MAX_TOTAL_LENGTH=Bs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Bs.BAGGAGE_MAX_NAME_VALUE_PAIRS=Bs.BAGGAGE_HEADER=Bs.BAGGAGE_ITEMS_SEPARATOR=Bs.BAGGAGE_PROPERTIES_SEPARATOR=Bs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Bs.BAGGAGE_KEY_PAIR_SEPARATOR="=";Bs.BAGGAGE_PROPERTIES_SEPARATOR=";";Bs.BAGGAGE_ITEMS_SEPARATOR=",";Bs.BAGGAGE_HEADER="baggage";Bs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Bs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Bs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var sz=Q(Ff=>{"use strict";A();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.parseKeyPairsIntoRecord=Ff.parsePairKeyValue=Ff.getKeyPairs=Ff.serializeKeyPairs=void 0;var p$e=(Le(),we(Je)),qI=az();function f$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},"")}Ff.serializeKeyPairs=f$e;function A$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})}Ff.getKeyPairs=A$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,p$e.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}Ff.parsePairKeyValue=Sue;function m$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}Ff.parseKeyPairsIntoRecord=m$e});var yue=Q(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.W3CBaggagePropagator=void 0;var uz=(Le(),we(Je)),g$e=n1(),k0=az(),cz=sz(),lz=class{inject(t,n,r){let o=uz.propagation.getBaggage(t);if(!o||(0,g$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 h$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=h$e;function Cue(e){return typeof e=="string"&&e!==""}Eh.isAttributeKey=Cue;function bue(e){return e==null?!0:Array.isArray(e)?_$e(e):vue(typeof e)}Eh.isAttributeValue=bue;function _$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$e=(Le(),we(Je));function S$e(){return e=>{E$e.diag.error(y$e(e))}}YM.loggingErrorHandler=S$e;function y$e(e){return typeof e=="string"?e:JSON.stringify(T$e(e))}function T$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 I$e=pz(),Due=(0,I$e.loggingErrorHandler)();function C$e(e){Due=e}YI.setGlobalErrorHandler=C$e;function b$e(e){try{Due(e)}catch{}}YI.globalErrorHandler=b$e});var wue=Q(Gf=>{"use strict";A();Object.defineProperty(Gf,"__esModule",{value:!0});Gf.getStringListFromEnv=Gf.getBooleanFromEnv=Gf.getStringFromEnv=Gf.getNumberFromEnv=void 0;var Bue=(Le(),we(Je)),Nue=Ue("util");function v$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}Gf.getNumberFromEnv=v$e;function Oue(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Gf.getStringFromEnv=Oue;function R$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)}Gf.getBooleanFromEnv=R$e;function D$e(e){return Oue(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Gf.getStringListFromEnv=D$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,x$e,Az,B$e,N$e,O$e,w$e,mz,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,Z$e,gz,W$e,X$e,e9e,t9e,n9e,r9e,o9e,i9e,a9e,s9e,u9e,c9e,hz,l9e,d9e,_z,Ez,p9e,f9e,A9e,m9e,g9e,h9e,_9e,E9e,S9e,y9e,T9e,I9e,C9e,b9e,v9e,R9e,D9e,r1,KI,Sz,x9e,B9e,U0,N9e,O9e,w9e,M9e,yz,Tz,P9e,Iz,k9e,U9e,L9e,Q9e,F9e,G9e,j9e,H9e,z9e,$9e,V9e,q9e,Y9e,K9e,J9e,Z9e,W9e,X9e,eVe,tVe,nVe,rVe,oVe,Cz,iVe,aVe,sVe,uVe,cVe,lVe,dVe,pVe,fVe,AVe,mVe,gVe,hVe,_Ve,EVe,SVe,yVe,TVe,IVe,bz,CVe,vz,bVe,vVe,RVe,DVe,xVe,BVe,NVe,OVe,wVe,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,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,Rqe,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,Dqe,xqe,Bqe,Nqe,Oqe,wqe,Mqe,Pqe,kqe,Uqe,Lqe,Qqe,ape,spe,upe,cpe,lpe,Fqe,Gqe,jqe,Hqe,zqe,$qe,dpe,ppe,fpe,Vqe,qqe,Yqe,Kqe,Ape,mpe,gpe,hpe,Jqe,Zqe,Wqe,Xqe,e7e,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,t7e,n7e,r7e,o7e,i7e,a7e,s7e,u7e,bpe,vpe,Rpe,Dpe,xpe,c7e,l7e,d7e,p7e,f7e,A7e,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,m7e,g7e,h7e,_7e,E7e,S7e,y7e,T7e,I7e,C7e,b7e,v7e,R7e,D7e,x7e,B7e,N7e,O7e,w7e,M7e,P7e,k7e,Zpe,Wpe,Xpe,efe,tfe,U7e,L7e,Q7e,F7e,G7e,j7e,nfe,rfe,H7e,z7e,$7e,ofe,ife,V7e,q7e,Y7e,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,K7e,J7e,Z7e,W7e,X7e,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,Ife,Cfe,fYe,AYe,mYe,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",x$e=kue,Az=Uue,B$e=Lue,N$e=Que,O$e=Fue,w$e=Gue,mz=jue,M$e=Hue,P$e=zue,k$e=$ue,U$e=Vue,L$e=que,Q$e=Yue,F$e=Kue,G$e=Jue,j$e=Zue,H$e=Wue,z$e=Xue,$$e=ece,V$e=tce,q$e=nce,Y$e=rce,K$e=oce,J$e=ice,Z$e=ace,gz=sce,W$e=uce,X$e=cce,e9e=lce,t9e=dce,n9e=pce,r9e=fce,o9e=Ace,i9e=mce,a9e=gce,s9e=hce,u9e=_ce,c9e=Ece,hz=Sce,l9e=yce,d9e=Tce,_z=Ice,Ez=Cce,p9e=bce,f9e=vce,A9e=Rce,m9e=Dce,g9e=xce,h9e=Bce,_9e=Nce,E9e=Oce,S9e=wce,y9e=Mce,T9e=Pce,I9e=kce,C9e=Uce,b9e=Lce,v9e=Qce,R9e=Fce,D9e=Gce,r1=jce,KI=Hce,Sz=zce,x9e=$ce,B9e=Vce,U0=qce,N9e=Yce,O9e=Kce,w9e=Jce,M9e=Zce,yz=Wce,Tz=Xce,P9e=ele,Iz=tle,k9e=nle,U9e=rle,L9e=ole,Q9e=ile,F9e=ale,G9e=sle,j9e=ule,H9e=cle,z9e=lle,$9e=dle,V9e=ple,q9e=fle,Y9e=Ale,K9e=mle,J9e=gle,Z9e=hle,W9e=_le,X9e=Ele,eVe=Sle,tVe=yle,nVe=Tle,rVe=Ile,oVe=Cle,Cz=ble,iVe=vle,aVe=Rle,sVe=Dle,uVe=xle,cVe=Ble,lVe=Nle,dVe=Ole,pVe=wle,fVe=Mle,AVe=Ple,mVe=kle,gVe=Ule,hVe=Lle,_Ve=Qle,EVe=Fle,SVe=Gle,yVe=jle,TVe=Hle,IVe=zle,bz=$le,CVe=Vle,vz=qle,bVe=Yle,vVe=Kle,RVe=Jle,DVe=Zle,xVe=Wle,BVe=Xle,NVe=ede,OVe=tde,wVe=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",MVe=nde,PVe=rde,kVe=ode,UVe=ide,LVe=ade,QVe=sde,FVe=ude,GVe=cde,jVe=lde,HVe=dde,zVe=pde,$Ve=fde,VVe=Ade,qVe=mde,YVe=gde,KVe=hde,JVe=_de,ZVe=Ede,WVe=Sde,XVe=yde,eqe=Tde,tqe=Ide,nqe=Cde,rqe=bde,oqe=vde,iqe=Rde,aqe=Dde,sqe=xde,uqe=Bde,cqe=Nde,lqe=Ode,dqe=wde,pqe=Mde,fqe=Pde,Aqe=kde,mqe=Ude,gqe=Lde,hqe=Qde,_qe=Fde,Eqe=Gde,Sqe=jde,yqe=Hde,Tqe=zde,Iqe=$de,Cqe=Vde,bqe=qde,vqe=Yde,Rqe=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",Dqe=Kde,xqe=Jde,Bqe=Zde,Nqe=Wde,Oqe=Xde,wqe=epe,Mqe=tpe,Pqe=npe,kqe=rpe,Uqe=ope,Lqe=ipe,Qqe=gi([Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe]),ape="datasource",spe="http",upe="pubsub",cpe="timer",lpe="other",Fqe=ape,Gqe=spe,jqe=upe,Hqe=cpe,zqe=lpe,$qe=gi([ape,spe,upe,cpe,lpe]),dpe="insert",ppe="edit",fpe="delete",Vqe=dpe,qqe=ppe,Yqe=fpe,Kqe=gi([dpe,ppe,fpe]),Ape="alibaba_cloud",mpe="aws",gpe="azure",hpe="gcp",Jqe=Ape,Zqe=mpe,Wqe=gpe,Xqe=hpe,e7e=gi([Ape,mpe,gpe,hpe]),_pe="ip_tcp",Epe="ip_udp",Spe="ip",ype="unix",Tpe="pipe",Ipe="inproc",Cpe="other",t7e=_pe,n7e=Epe,r7e=Spe,o7e=ype,i7e=Tpe,a7e=Ipe,s7e=Cpe,u7e=gi([_pe,Epe,Spe,ype,Tpe,Ipe,Cpe]),bpe="wifi",vpe="wired",Rpe="cell",Dpe="unavailable",xpe="unknown",c7e=bpe,l7e=vpe,d7e=Rpe,p7e=Dpe,f7e=xpe,A7e=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",m7e=Bpe,g7e=Npe,h7e=Ope,_7e=wpe,E7e=Mpe,S7e=Ppe,y7e=kpe,T7e=Upe,I7e=Lpe,C7e=Qpe,b7e=Fpe,v7e=Gpe,R7e=jpe,D7e=Hpe,x7e=zpe,B7e=$pe,N7e=Vpe,O7e=qpe,w7e=Ype,M7e=Kpe,P7e=Jpe,k7e=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",U7e=Zpe,L7e=Wpe,Q7e=Xpe,F7e=efe,G7e=tfe,j7e={HTTP_1_0:Zpe,HTTP_1_1:Wpe,HTTP_2_0:Xpe,SPDY:efe,QUIC:tfe},nfe="queue",rfe="topic",H7e=nfe,z7e=rfe,$7e=gi([nfe,rfe]),ofe="receive",ife="process",V7e=ofe,q7e=ife,Y7e=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,K7e=afe,J7e=sfe,Z7e=ufe,W7e=cfe,X7e=lfe,eYe=dfe,tYe=pfe,nYe=ffe,rYe=Afe,oYe=mfe,iYe=gfe,aYe=hfe,sYe=_fe,uYe=Efe,cYe=Sfe,lYe=yfe,dYe=Tfe,pYe={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",fYe=Ife,AYe=Cfe,mYe=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,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,OKe,Rz,wKe,MKe,PKe,kKe,UKe,LKe,QKe,FKe,GKe,jKe,eme,tme,nme,rme,HKe,zKe,$Ke,VKe,qKe,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,yme,Tme,pJe,fJe,AJe,Ime,Cme,bme,vme,Rme,Dme,xme,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,Bme,Nme,Ome,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,IJe,CJe,bJe,vJe,RJe,DJe,xJe,BJe,NJe,OJe,wJe,MJe,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,PJe,kJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,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",gYe=Rfe,hYe=Dfe,_Ye=xfe,EYe=Bfe,SYe=Nfe,yYe=Ofe,TYe=wfe,IYe=Mfe,CYe=Pfe,bYe=kfe,vYe=Ufe,RYe=Lfe,DYe=Qfe,xYe=Ffe,BYe=Gfe,NYe=jfe,OYe=Hfe,wYe=zfe,MYe=$fe,PYe=Vfe,kYe=qfe,UYe=Yfe,LYe=Kfe,QYe=Jfe,FYe=Zfe,GYe=Wfe,jYe=Xfe,HYe=eAe,zYe=tAe,$Ye=nAe,VYe=rAe,qYe=oAe,YYe=iAe,KYe=aAe,JYe=sAe,ZYe=uAe,WYe=cAe,XYe=lAe,eKe=dAe,tKe=pAe,nKe=fAe,rKe=AAe,oKe=mAe,iKe=gAe,aKe=hAe,sKe=_Ae,uKe=EAe,cKe=SAe,lKe=yAe,dKe=TAe,pKe=IAe,fKe=CAe,AKe=bAe,mKe=vAe,gKe=RAe,hKe=DAe,_Ke=xAe,EKe=BAe,SKe=NAe,yKe=OAe,TKe=wAe,IKe=MAe,CKe=PAe,bKe=kAe,vKe=UAe,RKe=LAe,DKe=QAe,xKe=FAe,BKe=GAe,NKe=jAe,OKe=HAe,Rz=zAe,wKe=$Ae,MKe=VAe,PKe=qAe,kKe=YAe,UKe=KAe,LKe=JAe,QKe=ZAe,FKe=WAe,GKe=XAe,jKe=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",HKe=eme,zKe=tme,$Ke=nme,VKe=rme,qKe=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",YKe=ome,KKe=ime,JKe=ame,ZKe=sme,WKe=ume,XKe=cme,eJe=lme,tJe=dme,nJe=pme,rJe=fme,oJe=Ame,iJe=mme,aJe=gme,sJe=hme,uJe=_me,cJe=Eme,lJe=Sme,dJe=gi([ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme]),yme="ec2",Tme="fargate",pJe=yme,fJe=Tme,AJe=gi([yme,Tme]),Ime="amd64",Cme="arm32",bme="arm64",vme="ia64",Rme="ppc32",Dme="ppc64",xme="x86",mJe=Ime,gJe=Cme,hJe=bme,_Je=vme,EJe=Rme,SJe=Dme,yJe=xme,TJe=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",IJe=Bme,CJe=Nme,bJe=Ome,vJe=wme,RJe=Mme,DJe=Pme,xJe=kme,BJe=Ume,NJe=Lme,OJe=Qme,wJe=Fme,MJe=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",PJe=Gme,kJe=jme,UJe=Hme,LJe=zme,QJe=$me,FJe=Vme,GJe=qme,jJe=Yme,HJe=Kme,zJe=Jme,$Je=gi([Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme])});var Wme=O(()=>{A();Zme()});var VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,Dz,xz,hZe,JI,_Ze,Bz,Nz,EZe,L0,SZe,yZe,TZe,IZe,CZe,bZe,vZe,RZe,DZe,xZe,Oz,BZe,NZe,OZe,wZe,MZe,PZe,Q0,kZe,UZe,LZe,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,YZe,Cm,bm,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,wz,Mz,dWe,Pz,kz,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,Uz,Lz,vWe,Qz,RWe,Fz,DWe,xWe,BWe,NWe,OWe,wWe,MWe,PWe,kWe,UWe,LWe,QWe,FWe,GWe,jWe,HWe,zWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,Sh,WWe,XWe,eXe,Gz,Xme=O(()=>{A();VJe="aspnetcore.diagnostics.exception.result",qJe="aborted",YJe="handled",KJe="skipped",JJe="unhandled",ZJe="aspnetcore.diagnostics.handler.type",WJe="aspnetcore.rate_limiting.policy",XJe="aspnetcore.rate_limiting.result",eZe="acquired",tZe="endpoint_limiter",nZe="global_limiter",rZe="request_canceled",oZe="aspnetcore.request.is_unhandled",iZe="aspnetcore.routing.is_fallback",aZe="aspnetcore.routing.match_status",sZe="failure",uZe="success",cZe="aspnetcore.user.is_authenticated",lZe="client.address",dZe="client.port",pZe="code.column.number",fZe="code.file.path",AZe="code.function.name",mZe="code.line.number",gZe="code.stacktrace",Dz="db.collection.name",xz="db.namespace",hZe="db.operation.batch.size",JI="db.operation.name",_Ze="db.query.summary",Bz="db.query.text",Nz="db.response.status_code",EZe="db.stored_procedure.name",L0="db.system.name",SZe="mariadb",yZe="microsoft.sql_server",TZe="mysql",IZe="postgresql",CZe="dotnet.gc.heap.generation",bZe="gen0",vZe="gen1",RZe="gen2",DZe="loh",xZe="poh",Oz="error.type",BZe="_OTHER",NZe="exception.escaped",OZe="exception.message",wZe="exception.stacktrace",MZe="exception.type",PZe=e=>`http.request.header.${e}`,Q0="http.request.method",kZe="_OTHER",UZe="CONNECT",LZe="DELETE",QZe="GET",FZe="HEAD",GZe="OPTIONS",jZe="PATCH",HZe="POST",zZe="PUT",$Ze="TRACE",VZe="http.request.method_original",qZe="http.request.resend_count",YZe=e=>`http.response.header.${e}`,Cm="http.response.status_code",bm="http.route",KZe="jvm.gc.action",JZe="jvm.gc.name",ZZe="jvm.memory.pool.name",WZe="jvm.memory.type",XZe="heap",eWe="non_heap",tWe="jvm.thread.daemon",nWe="jvm.thread.state",rWe="blocked",oWe="new",iWe="runnable",aWe="terminated",sWe="timed_waiting",uWe="waiting",cWe="network.local.address",lWe="network.local.port",wz="network.peer.address",Mz="network.peer.port",dWe="network.protocol.name",Pz="network.protocol.version",kz="network.transport",pWe="pipe",fWe="quic",AWe="tcp",mWe="udp",gWe="unix",hWe="network.type",_We="ipv4",EWe="ipv6",SWe="otel.scope.name",yWe="otel.scope.version",TWe="otel.status_code",IWe="ERROR",CWe="OK",bWe="otel.status_description",Uz="server.address",Lz="server.port",vWe="service.instance.id",Qz="service.name",RWe="service.namespace",Fz="service.version",DWe="signalr.connection.status",xWe="app_shutdown",BWe="normal_closure",NWe="timeout",OWe="signalr.transport",wWe="long_polling",MWe="server_sent_events",PWe="web_sockets",kWe="telemetry.sdk.language",UWe="cpp",LWe="dotnet",QWe="erlang",FWe="go",GWe="java",jWe="nodejs",HWe="php",zWe="python",$We="ruby",VWe="rust",qWe="swift",YWe="webjs",KWe="telemetry.sdk.name",JWe="telemetry.sdk.version",ZWe="url.fragment",Sh="url.full",WWe="url.path",XWe="url.query",eXe="url.scheme",Gz="user_agent.original"});var 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,ZXe,ege=O(()=>{A();tXe="aspnetcore.diagnostics.exceptions",nXe="aspnetcore.rate_limiting.active_request_leases",rXe="aspnetcore.rate_limiting.queued_requests",oXe="aspnetcore.rate_limiting.request.time_in_queue",iXe="aspnetcore.rate_limiting.request_lease.duration",aXe="aspnetcore.rate_limiting.requests",sXe="aspnetcore.routing.match_attempts",uXe="db.client.operation.duration",cXe="dotnet.assembly.count",lXe="dotnet.exceptions",dXe="dotnet.gc.collections",pXe="dotnet.gc.heap.total_allocated",fXe="dotnet.gc.last_collection.heap.fragmentation.size",AXe="dotnet.gc.last_collection.heap.size",mXe="dotnet.gc.last_collection.memory.committed_size",gXe="dotnet.gc.pause.time",hXe="dotnet.jit.compilation.time",_Xe="dotnet.jit.compiled_il.size",EXe="dotnet.jit.compiled_methods",SXe="dotnet.monitor.lock_contentions",yXe="dotnet.process.cpu.count",TXe="dotnet.process.cpu.time",IXe="dotnet.process.memory.working_set",CXe="dotnet.thread_pool.queue.length",bXe="dotnet.thread_pool.thread.count",vXe="dotnet.thread_pool.work_item.count",RXe="dotnet.timer.count",DXe="http.client.request.duration",xXe="http.server.request.duration",BXe="jvm.class.count",NXe="jvm.class.loaded",OXe="jvm.class.unloaded",wXe="jvm.cpu.count",MXe="jvm.cpu.recent_utilization",PXe="jvm.cpu.time",kXe="jvm.gc.duration",UXe="jvm.memory.committed",LXe="jvm.memory.limit",QXe="jvm.memory.used",FXe="jvm.memory.used_after_last_gc",GXe="jvm.thread.count",jXe="kestrel.active_connections",HXe="kestrel.active_tls_handshakes",zXe="kestrel.connection.duration",$Xe="kestrel.queued_connections",VXe="kestrel.queued_requests",qXe="kestrel.rejected_connections",YXe="kestrel.tls_handshake.duration",KXe="kestrel.upgraded_connections",JXe="signalr.server.active_connections",ZXe="signalr.server.connection.duration"});var WXe,tge=O(()=>{A();WXe="exception"});var Nr={};ts(Nr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>qJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>YJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>KJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>JJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>eZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>tZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>nZe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>rZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>sZe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>uZe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>VJe,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>ZJe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>WJe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>XJe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>oZe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>iZe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>aZe,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>cZe,ATTR_CLIENT_ADDRESS:()=>lZe,ATTR_CLIENT_PORT:()=>dZe,ATTR_CODE_COLUMN_NUMBER:()=>pZe,ATTR_CODE_FILE_PATH:()=>fZe,ATTR_CODE_FUNCTION_NAME:()=>AZe,ATTR_CODE_LINE_NUMBER:()=>mZe,ATTR_CODE_STACKTRACE:()=>gZe,ATTR_DB_COLLECTION_NAME:()=>Dz,ATTR_DB_NAMESPACE:()=>xz,ATTR_DB_OPERATION_BATCH_SIZE:()=>hZe,ATTR_DB_OPERATION_NAME:()=>JI,ATTR_DB_QUERY_SUMMARY:()=>_Ze,ATTR_DB_QUERY_TEXT:()=>Bz,ATTR_DB_RESPONSE_STATUS_CODE:()=>Nz,ATTR_DB_STORED_PROCEDURE_NAME:()=>EZe,ATTR_DB_SYSTEM_NAME:()=>L0,ATTR_DOTNET_GC_HEAP_GENERATION:()=>CZe,ATTR_ERROR_TYPE:()=>Oz,ATTR_EXCEPTION_ESCAPED:()=>NZe,ATTR_EXCEPTION_MESSAGE:()=>OZe,ATTR_EXCEPTION_STACKTRACE:()=>wZe,ATTR_EXCEPTION_TYPE:()=>MZe,ATTR_HTTP_REQUEST_HEADER:()=>PZe,ATTR_HTTP_REQUEST_METHOD:()=>Q0,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>VZe,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>qZe,ATTR_HTTP_RESPONSE_HEADER:()=>YZe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Cm,ATTR_HTTP_ROUTE:()=>bm,ATTR_JVM_GC_ACTION:()=>KZe,ATTR_JVM_GC_NAME:()=>JZe,ATTR_JVM_MEMORY_POOL_NAME:()=>ZZe,ATTR_JVM_MEMORY_TYPE:()=>WZe,ATTR_JVM_THREAD_DAEMON:()=>tWe,ATTR_JVM_THREAD_STATE:()=>nWe,ATTR_NETWORK_LOCAL_ADDRESS:()=>cWe,ATTR_NETWORK_LOCAL_PORT:()=>lWe,ATTR_NETWORK_PEER_ADDRESS:()=>wz,ATTR_NETWORK_PEER_PORT:()=>Mz,ATTR_NETWORK_PROTOCOL_NAME:()=>dWe,ATTR_NETWORK_PROTOCOL_VERSION:()=>Pz,ATTR_NETWORK_TRANSPORT:()=>kz,ATTR_NETWORK_TYPE:()=>hWe,ATTR_OTEL_SCOPE_NAME:()=>SWe,ATTR_OTEL_SCOPE_VERSION:()=>yWe,ATTR_OTEL_STATUS_CODE:()=>TWe,ATTR_OTEL_STATUS_DESCRIPTION:()=>bWe,ATTR_SERVER_ADDRESS:()=>Uz,ATTR_SERVER_PORT:()=>Lz,ATTR_SERVICE_INSTANCE_ID:()=>vWe,ATTR_SERVICE_NAME:()=>Qz,ATTR_SERVICE_NAMESPACE:()=>RWe,ATTR_SERVICE_VERSION:()=>Fz,ATTR_SIGNALR_CONNECTION_STATUS:()=>DWe,ATTR_SIGNALR_TRANSPORT:()=>OWe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>kWe,ATTR_TELEMETRY_SDK_NAME:()=>KWe,ATTR_TELEMETRY_SDK_VERSION:()=>JWe,ATTR_URL_FRAGMENT:()=>ZWe,ATTR_URL_FULL:()=>Sh,ATTR_URL_PATH:()=>WWe,ATTR_URL_QUERY:()=>XWe,ATTR_URL_SCHEME:()=>eXe,ATTR_USER_AGENT_ORIGINAL:()=>Gz,AWSECSLAUNCHTYPEVALUES_EC2:()=>pJe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>fJe,AwsEcsLaunchtypeValues:()=>AJe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>YKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>KKe,CLOUDPLATFORMVALUES_AWS_EC2:()=>JKe,CLOUDPLATFORMVALUES_AWS_ECS:()=>ZKe,CLOUDPLATFORMVALUES_AWS_EKS:()=>WKe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>eJe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>XKe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>rJe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>iJe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>nJe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>oJe,CLOUDPLATFORMVALUES_AZURE_VM:()=>tJe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>lJe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>cJe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>sJe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>aJe,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>uJe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>HKe,CLOUDPROVIDERVALUES_AWS:()=>zKe,CLOUDPROVIDERVALUES_AZURE:()=>$Ke,CLOUDPROVIDERVALUES_GCP:()=>VKe,CloudPlatformValues:()=>dJe,CloudProviderValues:()=>qKe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Dqe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>kqe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>xqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Pqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Nqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Lqe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Oqe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Bqe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Uqe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Mqe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>wqe,DBSYSTEMVALUES_ADABAS:()=>ZVe,DBSYSTEMVALUES_CACHE:()=>JVe,DBSYSTEMVALUES_CASSANDRA:()=>Aqe,DBSYSTEMVALUES_CLOUDSCAPE:()=>jVe,DBSYSTEMVALUES_COCKROACHDB:()=>vqe,DBSYSTEMVALUES_COLDFUSION:()=>fqe,DBSYSTEMVALUES_COSMOSDB:()=>Sqe,DBSYSTEMVALUES_COUCHBASE:()=>_qe,DBSYSTEMVALUES_COUCHDB:()=>Eqe,DBSYSTEMVALUES_DB2:()=>LVe,DBSYSTEMVALUES_DERBY:()=>XVe,DBSYSTEMVALUES_DYNAMODB:()=>yqe,DBSYSTEMVALUES_EDB:()=>KVe,DBSYSTEMVALUES_ELASTICSEARCH:()=>Cqe,DBSYSTEMVALUES_FILEMAKER:()=>eqe,DBSYSTEMVALUES_FIREBIRD:()=>WVe,DBSYSTEMVALUES_FIRSTSQL:()=>YVe,DBSYSTEMVALUES_GEODE:()=>Iqe,DBSYSTEMVALUES_H2:()=>pqe,DBSYSTEMVALUES_HANADB:()=>VVe,DBSYSTEMVALUES_HBASE:()=>mqe,DBSYSTEMVALUES_HIVE:()=>GVe,DBSYSTEMVALUES_HSQLDB:()=>HVe,DBSYSTEMVALUES_INFORMIX:()=>tqe,DBSYSTEMVALUES_INGRES:()=>qVe,DBSYSTEMVALUES_INSTANTDB:()=>nqe,DBSYSTEMVALUES_INTERBASE:()=>rqe,DBSYSTEMVALUES_MARIADB:()=>oqe,DBSYSTEMVALUES_MAXDB:()=>$Ve,DBSYSTEMVALUES_MEMCACHED:()=>bqe,DBSYSTEMVALUES_MONGODB:()=>gqe,DBSYSTEMVALUES_MSSQL:()=>PVe,DBSYSTEMVALUES_MYSQL:()=>kVe,DBSYSTEMVALUES_NEO4J:()=>Tqe,DBSYSTEMVALUES_NETEZZA:()=>iqe,DBSYSTEMVALUES_ORACLE:()=>UVe,DBSYSTEMVALUES_OTHER_SQL:()=>MVe,DBSYSTEMVALUES_PERVASIVE:()=>aqe,DBSYSTEMVALUES_POINTBASE:()=>sqe,DBSYSTEMVALUES_POSTGRESQL:()=>QVe,DBSYSTEMVALUES_PROGRESS:()=>zVe,DBSYSTEMVALUES_REDIS:()=>hqe,DBSYSTEMVALUES_REDSHIFT:()=>FVe,DBSYSTEMVALUES_SQLITE:()=>uqe,DBSYSTEMVALUES_SYBASE:()=>cqe,DBSYSTEMVALUES_TERADATA:()=>lqe,DBSYSTEMVALUES_VERTICA:()=>dqe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>SZe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>yZe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>TZe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>IZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>bZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>vZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>RZe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>DZe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>xZe,DbCassandraConsistencyLevelValues:()=>Qqe,DbSystemValues:()=>Rqe,ERROR_TYPE_VALUE_OTHER:()=>BZe,EVENT_EXCEPTION:()=>WXe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Yqe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>qqe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Vqe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Jqe,FAASINVOKEDPROVIDERVALUES_AWS:()=>Zqe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Wqe,FAASINVOKEDPROVIDERVALUES_GCP:()=>Xqe,FAASTRIGGERVALUES_DATASOURCE:()=>Fqe,FAASTRIGGERVALUES_HTTP:()=>Gqe,FAASTRIGGERVALUES_OTHER:()=>zqe,FAASTRIGGERVALUES_PUBSUB:()=>jqe,FAASTRIGGERVALUES_TIMER:()=>Hqe,FaasDocumentOperationValues:()=>Kqe,FaasInvokedProviderValues:()=>e7e,FaasTriggerValues:()=>$qe,HOSTARCHVALUES_AMD64:()=>mJe,HOSTARCHVALUES_ARM32:()=>gJe,HOSTARCHVALUES_ARM64:()=>hJe,HOSTARCHVALUES_IA64:()=>_Je,HOSTARCHVALUES_PPC32:()=>EJe,HOSTARCHVALUES_PPC64:()=>SJe,HOSTARCHVALUES_X86:()=>yJe,HTTPFLAVORVALUES_HTTP_1_0:()=>U7e,HTTPFLAVORVALUES_HTTP_1_1:()=>L7e,HTTPFLAVORVALUES_HTTP_2_0:()=>Q7e,HTTPFLAVORVALUES_QUIC:()=>G7e,HTTPFLAVORVALUES_SPDY:()=>F7e,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>UZe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>LZe,HTTP_REQUEST_METHOD_VALUE_GET:()=>QZe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>FZe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>GZe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>kZe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>jZe,HTTP_REQUEST_METHOD_VALUE_POST:()=>HZe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>zZe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>$Ze,HostArchValues:()=>TJe,HttpFlavorValues:()=>j7e,JVM_MEMORY_TYPE_VALUE_HEAP:()=>XZe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>eWe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>rWe,JVM_THREAD_STATE_VALUE_NEW:()=>oWe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>iWe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>aWe,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>sWe,JVM_THREAD_STATE_VALUE_WAITING:()=>uWe,MESSAGETYPEVALUES_RECEIVED:()=>AYe,MESSAGETYPEVALUES_SENT:()=>fYe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>H7e,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>z7e,MESSAGINGOPERATIONVALUES_PROCESS:()=>q7e,MESSAGINGOPERATIONVALUES_RECEIVE:()=>V7e,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>tXe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>nXe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>rXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>aXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>iXe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>oXe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>sXe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>uXe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>cXe,METRIC_DOTNET_EXCEPTIONS:()=>lXe,METRIC_DOTNET_GC_COLLECTIONS:()=>dXe,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>pXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>fXe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>AXe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>mXe,METRIC_DOTNET_GC_PAUSE_TIME:()=>gXe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>hXe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>_Xe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>EXe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>SXe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>yXe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>TXe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>IXe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>CXe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>bXe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>vXe,METRIC_DOTNET_TIMER_COUNT:()=>RXe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>DXe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>xXe,METRIC_JVM_CLASS_COUNT:()=>BXe,METRIC_JVM_CLASS_LOADED:()=>NXe,METRIC_JVM_CLASS_UNLOADED:()=>OXe,METRIC_JVM_CPU_COUNT:()=>wXe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>MXe,METRIC_JVM_CPU_TIME:()=>PXe,METRIC_JVM_GC_DURATION:()=>kXe,METRIC_JVM_MEMORY_COMMITTED:()=>UXe,METRIC_JVM_MEMORY_LIMIT:()=>LXe,METRIC_JVM_MEMORY_USED:()=>QXe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>FXe,METRIC_JVM_THREAD_COUNT:()=>GXe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>jXe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>HXe,METRIC_KESTREL_CONNECTION_DURATION:()=>zXe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>$Xe,METRIC_KESTREL_QUEUED_REQUESTS:()=>VXe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>qXe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>YXe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>KXe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>JXe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>ZXe,MessageTypeValues:()=>mYe,MessagingDestinationKindValues:()=>$7e,MessagingOperationValues:()=>Y7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>_7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>y7e,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>g7e,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>D7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>E7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>S7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>v7e,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>m7e,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>B7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>T7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>C7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>x7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>I7e,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>b7e,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>O7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>R7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>P7e,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>w7e,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>M7e,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>N7e,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>h7e,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>d7e,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>p7e,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>f7e,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>c7e,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>l7e,NETTRANSPORTVALUES_INPROC:()=>a7e,NETTRANSPORTVALUES_IP:()=>r7e,NETTRANSPORTVALUES_IP_TCP:()=>t7e,NETTRANSPORTVALUES_IP_UDP:()=>n7e,NETTRANSPORTVALUES_OTHER:()=>s7e,NETTRANSPORTVALUES_PIPE:()=>i7e,NETTRANSPORTVALUES_UNIX:()=>o7e,NETWORK_TRANSPORT_VALUE_PIPE:()=>pWe,NETWORK_TRANSPORT_VALUE_QUIC:()=>fWe,NETWORK_TRANSPORT_VALUE_TCP:()=>AWe,NETWORK_TRANSPORT_VALUE_UDP:()=>mWe,NETWORK_TRANSPORT_VALUE_UNIX:()=>gWe,NETWORK_TYPE_VALUE_IPV4:()=>_We,NETWORK_TYPE_VALUE_IPV6:()=>EWe,NetHostConnectionSubtypeValues:()=>k7e,NetHostConnectionTypeValues:()=>A7e,NetTransportValues:()=>u7e,OSTYPEVALUES_AIX:()=>NJe,OSTYPEVALUES_DARWIN:()=>bJe,OSTYPEVALUES_DRAGONFLYBSD:()=>xJe,OSTYPEVALUES_FREEBSD:()=>vJe,OSTYPEVALUES_HPUX:()=>BJe,OSTYPEVALUES_LINUX:()=>CJe,OSTYPEVALUES_NETBSD:()=>RJe,OSTYPEVALUES_OPENBSD:()=>DJe,OSTYPEVALUES_SOLARIS:()=>OJe,OSTYPEVALUES_WINDOWS:()=>IJe,OSTYPEVALUES_Z_OS:()=>wJe,OTEL_STATUS_CODE_VALUE_ERROR:()=>IWe,OTEL_STATUS_CODE_VALUE_OK:()=>CWe,OsTypeValues:()=>MJe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>iYe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>tYe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>J7e,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>lYe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>X7e,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>oYe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>uYe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>W7e,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>eYe,RPCGRPCSTATUSCODEVALUES_OK:()=>K7e,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>aYe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>nYe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>rYe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>dYe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>cYe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>sYe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Z7e,RpcGrpcStatusCodeValues:()=>pYe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>$9e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>rVe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>j9e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>L9e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>tVe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>J9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Y9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>oVe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>V9e,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>Q9e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>z9e,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>K9e,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>H9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>F9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>G9e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>nVe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>W9e,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>X9e,SEMATTRS_AWS_DYNAMODB_SELECT:()=>q9e,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Z9e,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>U9e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>eVe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>x$e,SEMATTRS_CODE_FILEPATH:()=>R9e,SEMATTRS_CODE_FUNCTION:()=>b9e,SEMATTRS_CODE_LINENO:()=>D9e,SEMATTRS_CODE_NAMESPACE:()=>v9e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>L$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>H$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>j$e,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>F$e,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>k$e,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>U$e,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>G$e,SEMATTRS_DB_CASSANDRA_TABLE:()=>Q$e,SEMATTRS_DB_CONNECTION_STRING:()=>B$e,SEMATTRS_DB_HBASE_NAMESPACE:()=>z$e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>O$e,SEMATTRS_DB_MONGODB_COLLECTION:()=>V$e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>P$e,SEMATTRS_DB_NAME:()=>w$e,SEMATTRS_DB_OPERATION:()=>M$e,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>$$e,SEMATTRS_DB_SQL_TABLE:()=>q$e,SEMATTRS_DB_STATEMENT:()=>mz,SEMATTRS_DB_SYSTEM:()=>Az,SEMATTRS_DB_USER:()=>N$e,SEMATTRS_ENDUSER_ID:()=>S9e,SEMATTRS_ENDUSER_ROLE:()=>y9e,SEMATTRS_ENDUSER_SCOPE:()=>T9e,SEMATTRS_EXCEPTION_ESCAPED:()=>Z$e,SEMATTRS_EXCEPTION_MESSAGE:()=>K$e,SEMATTRS_EXCEPTION_STACKTRACE:()=>J$e,SEMATTRS_EXCEPTION_TYPE:()=>Y$e,SEMATTRS_FAAS_COLDSTART:()=>i9e,SEMATTRS_FAAS_CRON:()=>o9e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>X$e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>n9e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>e9e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>t9e,SEMATTRS_FAAS_EXECUTION:()=>W$e,SEMATTRS_FAAS_INVOKED_NAME:()=>a9e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>s9e,SEMATTRS_FAAS_INVOKED_REGION:()=>u9e,SEMATTRS_FAAS_TIME:()=>r9e,SEMATTRS_FAAS_TRIGGER:()=>gz,SEMATTRS_HTTP_CLIENT_IP:()=>k9e,SEMATTRS_HTTP_FLAVOR:()=>N9e,SEMATTRS_HTTP_HOST:()=>x9e,SEMATTRS_HTTP_METHOD:()=>r1,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>w9e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>M9e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>yz,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Tz,SEMATTRS_HTTP_ROUTE:()=>Iz,SEMATTRS_HTTP_SCHEME:()=>B9e,SEMATTRS_HTTP_SERVER_NAME:()=>P9e,SEMATTRS_HTTP_STATUS_CODE:()=>U0,SEMATTRS_HTTP_TARGET:()=>Sz,SEMATTRS_HTTP_URL:()=>KI,SEMATTRS_HTTP_USER_AGENT:()=>O9e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>NVe,SEMATTRS_MESSAGE_ID:()=>BVe,SEMATTRS_MESSAGE_TYPE:()=>xVe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>OVe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>gVe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>pVe,SEMATTRS_MESSAGING_DESTINATION:()=>iVe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>aVe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>SVe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>EVe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>_Ve,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>yVe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>TVe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>dVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>AVe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>fVe,SEMATTRS_MESSAGING_OPERATION:()=>mVe,SEMATTRS_MESSAGING_PROTOCOL:()=>uVe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>cVe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>hVe,SEMATTRS_MESSAGING_SYSTEM:()=>Cz,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>sVe,SEMATTRS_MESSAGING_URL:()=>lVe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>_9e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>g9e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>h9e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>m9e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>A9e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>f9e,SEMATTRS_NET_HOST_IP:()=>_z,SEMATTRS_NET_HOST_NAME:()=>p9e,SEMATTRS_NET_HOST_PORT:()=>Ez,SEMATTRS_NET_PEER_IP:()=>hz,SEMATTRS_NET_PEER_NAME:()=>d9e,SEMATTRS_NET_PEER_PORT:()=>l9e,SEMATTRS_NET_TRANSPORT:()=>c9e,SEMATTRS_PEER_SERVICE:()=>E9e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>vz,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>RVe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>DVe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>vVe,SEMATTRS_RPC_JSONRPC_VERSION:()=>bVe,SEMATTRS_RPC_METHOD:()=>CVe,SEMATTRS_RPC_SERVICE:()=>bz,SEMATTRS_RPC_SYSTEM:()=>IVe,SEMATTRS_THREAD_ID:()=>I9e,SEMATTRS_THREAD_NAME:()=>C9e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>TYe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>yYe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>IYe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>CYe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>bYe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>vYe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>RYe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>xYe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>DYe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>NYe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>BYe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>hYe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>EYe,SEMRESATTRS_CLOUD_PLATFORM:()=>SYe,SEMRESATTRS_CLOUD_PROVIDER:()=>gYe,SEMRESATTRS_CLOUD_REGION:()=>_Ye,SEMRESATTRS_CONTAINER_ID:()=>wYe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>PYe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>kYe,SEMRESATTRS_CONTAINER_NAME:()=>OYe,SEMRESATTRS_CONTAINER_RUNTIME:()=>MYe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>UYe,SEMRESATTRS_DEVICE_ID:()=>LYe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>QYe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>FYe,SEMRESATTRS_FAAS_ID:()=>jYe,SEMRESATTRS_FAAS_INSTANCE:()=>zYe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>$Ye,SEMRESATTRS_FAAS_NAME:()=>GYe,SEMRESATTRS_FAAS_VERSION:()=>HYe,SEMRESATTRS_HOST_ARCH:()=>KYe,SEMRESATTRS_HOST_ID:()=>VYe,SEMRESATTRS_HOST_IMAGE_ID:()=>ZYe,SEMRESATTRS_HOST_IMAGE_NAME:()=>JYe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>WYe,SEMRESATTRS_HOST_NAME:()=>qYe,SEMRESATTRS_HOST_TYPE:()=>YYe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>XYe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>iKe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>hKe,SEMRESATTRS_K8S_CRONJOB_UID:()=>gKe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>fKe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>pKe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>cKe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>uKe,SEMRESATTRS_K8S_JOB_NAME:()=>mKe,SEMRESATTRS_K8S_JOB_UID:()=>AKe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>nKe,SEMRESATTRS_K8S_NODE_NAME:()=>eKe,SEMRESATTRS_K8S_NODE_UID:()=>tKe,SEMRESATTRS_K8S_POD_NAME:()=>oKe,SEMRESATTRS_K8S_POD_UID:()=>rKe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>sKe,SEMRESATTRS_K8S_REPLICASET_UID:()=>aKe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>dKe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>lKe,SEMRESATTRS_OS_DESCRIPTION:()=>EKe,SEMRESATTRS_OS_NAME:()=>SKe,SEMRESATTRS_OS_TYPE:()=>_Ke,SEMRESATTRS_OS_VERSION:()=>yKe,SEMRESATTRS_PROCESS_COMMAND:()=>bKe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>RKe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>vKe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>IKe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>CKe,SEMRESATTRS_PROCESS_OWNER:()=>DKe,SEMRESATTRS_PROCESS_PID:()=>TKe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>NKe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>xKe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>BKe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>wKe,SEMRESATTRS_SERVICE_NAME:()=>OKe,SEMRESATTRS_SERVICE_NAMESPACE:()=>Rz,SEMRESATTRS_SERVICE_VERSION:()=>MKe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>LKe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>kKe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>PKe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>UKe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>GKe,SEMRESATTRS_WEBENGINE_NAME:()=>QKe,SEMRESATTRS_WEBENGINE_VERSION:()=>FKe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>xWe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>BWe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>NWe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>wWe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>MWe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>PWe,SemanticAttributes:()=>wVe,SemanticResourceAttributes:()=>jKe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>PJe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>kJe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>UJe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>LJe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>QJe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>FJe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>GJe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>jJe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>HJe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>zJe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>UWe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>LWe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>QWe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>FWe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>GWe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>jWe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>HWe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>zWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>$We,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>VWe,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>qWe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>YWe,TelemetrySdkLanguageValues:()=>$Je});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 XXe=Pue(),WM=($n(),we(Nr)),eet=nge();XM.SDK_INFO={[WM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[eet.ATTR_PROCESS_RUNTIME_NAME]:"node",[WM.ATTR_TELEMETRY_SDK_LANGUAGE]:WM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[WM.ATTR_TELEMETRY_SDK_VERSION]:XXe.VERSION}});var oge=Q(Ns=>{"use strict";A();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.otperformance=Ns.SDK_INFO=Ns._globalThis=Ns.getStringListFromEnv=Ns.getNumberFromEnv=Ns.getBooleanFromEnv=Ns.getStringFromEnv=void 0;var eP=wue();Object.defineProperty(Ns,"getStringFromEnv",{enumerable:!0,get:function(){return eP.getStringFromEnv}});Object.defineProperty(Ns,"getBooleanFromEnv",{enumerable:!0,get:function(){return eP.getBooleanFromEnv}});Object.defineProperty(Ns,"getNumberFromEnv",{enumerable:!0,get:function(){return eP.getNumberFromEnv}});Object.defineProperty(Ns,"getStringListFromEnv",{enumerable:!0,get:function(){return eP.getStringListFromEnv}});var tet=Mue();Object.defineProperty(Ns,"_globalThis",{enumerable:!0,get:function(){return tet._globalThis}});var net=rge();Object.defineProperty(Ns,"SDK_INFO",{enumerable:!0,get:function(){return net.SDK_INFO}});Ns.otperformance=performance});var jz=Q(Os=>{"use strict";A();Object.defineProperty(Os,"__esModule",{value:!0});Os.getStringListFromEnv=Os.getNumberFromEnv=Os.getStringFromEnv=Os.getBooleanFromEnv=Os.otperformance=Os._globalThis=Os.SDK_INFO=void 0;var F0=oge();Object.defineProperty(Os,"SDK_INFO",{enumerable:!0,get:function(){return F0.SDK_INFO}});Object.defineProperty(Os,"_globalThis",{enumerable:!0,get:function(){return F0._globalThis}});Object.defineProperty(Os,"otperformance",{enumerable:!0,get:function(){return F0.otperformance}});Object.defineProperty(Os,"getBooleanFromEnv",{enumerable:!0,get:function(){return F0.getBooleanFromEnv}});Object.defineProperty(Os,"getStringFromEnv",{enumerable:!0,get:function(){return F0.getStringFromEnv}});Object.defineProperty(Os,"getNumberFromEnv",{enumerable:!0,get:function(){return F0.getNumberFromEnv}});Object.defineProperty(Os,"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,ret=6,oet=Math.pow(10,ret),nP=Math.pow(10,ige);function o1(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*oet);return[n,r]}Xr.millisToHrTime=o1;function iet(){return tP.otperformance.timeOrigin}Xr.getTimeOrigin=iet;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 aet(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=aet;function set(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=nP),[n,r]}Xr.hrTimeDuration=set;function uet(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=uet;function cet(e){return e[0]*nP+e[1]}Xr.hrTimeToNanoseconds=cet;function det(e){return e[0]*1e3+e[1]/1e6}Xr.hrTimeToMilliseconds=det;function pet(e){return e[0]*1e6+e[1]/1e3}Xr.hrTimeToMicroseconds=pet;function Hz(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Xr.isTimeInputHrTime=Hz;function fet(e){return Hz(e)||typeof e=="number"||e instanceof Date}Xr.isTimeInput=fet;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 Aet(e){typeof e!="number"&&e.unref()}rP.unrefTimer=Aet});var lge=Q(i1=>{"use strict";A();Object.defineProperty(i1,"__esModule",{value:!0});i1.ExportResultCode=void 0;var met;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(met=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-*/]",get=`[a-z]${$z}{0,255}`,het=`[a-z0-9]${$z}{0,240}@[a-z]${$z}{0,13}`,_et=new RegExp(`^(?:${get}|${het})$`),Eet=/^[ -~]{0,255}[!-~]$/,yet=/,|=/;function Tet(e){return _et.test(e)}ZI.validateKey=Tet;function Iet(e){return Eet.test(e)&&!yet.test(e)}ZI.validateValue=Iet});var qz=Q(iP=>{"use strict";A();Object.defineProperty(iP,"__esModule",{value:!0});iP.TraceState=void 0;var Age=fge(),mge=32,Cet=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>Cet||(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(ws=>{"use strict";A();Object.defineProperty(ws,"__esModule",{value:!0});ws.W3CTraceContextPropagator=ws.parseTraceParent=ws.TRACE_STATE_HEADER=ws.TRACE_PARENT_HEADER=void 0;var aP=(Le(),we(Je)),bet=n1(),vet=qz();ws.TRACE_PARENT_HEADER="traceparent";ws.TRACE_STATE_HEADER="tracestate";var Ret="00",Det="(?!ff)[\\da-f]{2}",xet="(?![0]{32})[\\da-f]{32}",Bet="(?![0]{16})[\\da-f]{16}",Net="[\\da-f]{2}",Oet=new RegExp(`^\\s?(${Det})-(${xet})-(${Bet})-(${Net})(-.*)?\\s?$`);function _ge(e){let t=Oet.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}ws.parseTraceParent=_ge;var Yz=class{inject(t,n,r){let o=aP.trace.getSpanContext(t);if(!o||(0,bet.isTracingSuppressed)(t)||!(0,aP.isSpanContextValid)(o))return;let i=`${Ret}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||aP.TraceFlags.NONE).toString(16)}`;r.set(n,ws.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,ws.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,ws.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,ws.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new vet.TraceState(typeof d=="string"?d:void 0)}return aP.trace.setSpanContext(t,a)}fields(){return[ws.TRACE_PARENT_HEADER,ws.TRACE_STATE_HEADER]}};ws.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 wet=(Le(),we(Je)),Kz=(0,wet.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Met;(function(e){e.HTTP="http"})(Met=Rp.RPCType||(Rp.RPCType={}));function Pet(e,t){return e.setValue(Kz,t)}Rp.setRPCMetadata=Pet;function ket(e){return e.deleteValue(Kz)}Rp.deleteRPCMetadata=ket;function Uet(e){return e.getValue(Kz)}Rp.getRPCMetadata=Uet});var bge=Q(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.isPlainObject=void 0;var Let="[object Object]",Qet="[object Null]",Fet="[object Undefined]",Get=Function.prototype,yge=Get.toString,jet=yge.call(Object),Het=Object.getPrototypeOf,Tge=Object.prototype,Ige=Tge.hasOwnProperty,G0=Symbol?Symbol.toStringTag:void 0,Cge=Tge.toString;function zet(e){if(!$et(e)||Vet(e)!==Let)return!1;let t=Het(e);if(t===null)return!0;let n=Ige.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&yge.call(n)===jet}sP.isPlainObject=zet;function $et(e){return e!=null&&typeof e=="object"}function Vet(e){return e==null?e===void 0?Fet:Qet:G0&&G0 in Object(e)?qet(e):Yet(e)}function qet(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 Yet(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(),Ket=20;function Jet(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Dge(t,e.shift(),0,n);return t}lP.merge=Jet;function Jz(e){return cP(e)?e.slice():e}function Dge(e,t,n=0,r){let o;if(!(n>Ket)){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(!Zet(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],S=m;if(Rge(e,d,r)||Rge(t,d,r))delete o[d];else{if(a1(h)&&a1(S)){let y=r.get(h)||[],C=r.get(S)||[];y.push({obj:e,key:d}),C.push({obj:t,key:d}),r.set(h,y),r.set(S,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 Zet(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 Wet(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=Wet});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 Xet(e,t){if(!t)return!1;for(let n of t)if(Oge(e,n))return!0;return!1}XI.isUrlIgnored=Xet});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 ett=Mge(),Wz=class{_isCalled=!1;_deferred=new ett.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 vm=(Le(),we(Je)),kge={ALL:vm.DiagLogLevel.ALL,VERBOSE:vm.DiagLogLevel.VERBOSE,DEBUG:vm.DiagLogLevel.DEBUG,INFO:vm.DiagLogLevel.INFO,WARN:vm.DiagLogLevel.WARN,ERROR:vm.DiagLogLevel.ERROR,NONE:vm.DiagLogLevel.NONE};function ttt(e){if(e==null)return;let t=kge[e.toUpperCase()];return t??(vm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kge)}, using default`),vm.DiagLogLevel.INFO)}AP.diagLogLevelFromString=ttt});var Qge=Q(mP=>{"use strict";A();Object.defineProperty(mP,"__esModule",{value:!0});mP._export=void 0;var Lge=(Le(),we(Je)),ntt=n1();function rtt(e,t){return new Promise(n=>{Lge.context.with((0,ntt.suppressTracing)(Lge.context.active()),()=>{e.export(t,n)})})}mP._export=rtt});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 ott=yue();Object.defineProperty(Be,"W3CBaggagePropagator",{enumerable:!0,get:function(){return ott.W3CBaggagePropagator}});var itt=Tue();Object.defineProperty(Be,"AnchoredClock",{enumerable:!0,get:function(){return itt.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 att=pz();Object.defineProperty(Be,"loggingErrorHandler",{enumerable:!0,get:function(){return att.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 stt=cge();Object.defineProperty(Be,"unrefTimer",{enumerable:!0,get:function(){return stt.unrefTimer}});var utt=lge();Object.defineProperty(Be,"ExportResultCode",{enumerable:!0,get:function(){return utt.ExportResultCode}});var ctt=sz();Object.defineProperty(Be,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return ctt.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 ltt=pge();Object.defineProperty(Be,"CompositePropagator",{enumerable:!0,get:function(){return ltt.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 dtt=qz();Object.defineProperty(Be,"TraceState",{enumerable:!0,get:function(){return dtt.TraceState}});var ptt=Bge();Object.defineProperty(Be,"merge",{enumerable:!0,get:function(){return ptt.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 ftt=Pge();Object.defineProperty(Be,"BindOnceFuture",{enumerable:!0,get:function(){return ftt.BindOnceFuture}});var Att=Uge();Object.defineProperty(Be,"diagLogLevelFromString",{enumerable:!0,get:function(){return Att.diagLogLevelFromString}});var mtt=Qge();Be.internal={_export:mtt._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 gtt;(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"})(gtt=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(jf=>{"use strict";A();Object.defineProperty(jf,"__esModule",{value:!0});jf.API_BACKWARDS_COMPATIBILITY_VERSION=jf.makeGetter=jf._global=jf.GLOBAL_LOGS_API_KEY=void 0;jf.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");jf._global=globalThis;function htt(e,t,n){return r=>r===e?t:n}jf.makeGetter=htt;jf.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 _tt=SP(),yP=class{getLogger(t,n,r){return new _tt.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 Ett=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):Ett.NOOP_LOGGER}};TP.ProxyLogger=t5});var Yge=Q(IP=>{"use strict";A();Object.defineProperty(IP,"__esModule",{value:!0});IP.ProxyLoggerProvider=void 0;var Stt=e5(),ytt=qge(),n5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new ytt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Stt.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(),Ttt=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,Ttt.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(Hf=>{"use strict";A();Object.defineProperty(Hf,"__esModule",{value:!0});Hf.logs=Hf.NoopLogger=Hf.NOOP_LOGGER=Hf.SeverityNumber=void 0;var Itt=$ge();Object.defineProperty(Hf,"SeverityNumber",{enumerable:!0,get:function(){return Itt.SeverityNumber}});var Zge=SP();Object.defineProperty(Hf,"NOOP_LOGGER",{enumerable:!0,get:function(){return Zge.NOOP_LOGGER}});Object.defineProperty(Hf,"NoopLogger",{enumerable:!0,get:function(){return Zge.NoopLogger}});var Ctt=Jge();Hf.logs=Ctt.LogsAPI.getInstance()});var Wge=Q(nC=>{"use strict";A();Object.defineProperty(nC,"__esModule",{value:!0});nC.disableInstrumentations=nC.enableInstrumentations=void 0;function btt(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=btt;function vtt(e){e.forEach(t=>t.disable())}nC.disableInstrumentations=vtt});var the=Q(bP=>{"use strict";A();Object.defineProperty(bP,"__esModule",{value:!0});bP.registerInstrumentations=void 0;var Xge=(Le(),we(Je)),Rtt=o5(),ehe=Wge();function Dtt(e){let t=e.tracerProvider||Xge.trace.getTracerProvider(),n=e.meterProvider||Xge.metrics.getMeterProvider(),r=e.loggerProvider||Rtt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,ehe.enableInstrumentations)(o,t,n,r),()=>{(0,ehe.disableInstrumentations)(o)}}bP.registerInstrumentations=Dtt});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-]+)*))?$/,xtt=/^(?<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-]+)*))?$/,Btt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Ntt(e,t,n){if(!Ott(e))return u5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=ktt(e);if(!r)return!1;let o=[],i=she(r,t,o,n);return i&&!n?.includePrerelease?Mtt(r,o):i}vP.satisfies=Ntt;function Ott(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=rnt(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=Ptt(t,r),t.includes(" "))return she(e,t,n,r);{let o=Utt(t);return n.push(o),wtt(e,o)}}function wtt(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 Btt[t.op]?.includes(n)}function Mtt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Ptt(e,t){return e=e.trim(),e=tnt(e,t),e=ent(e),e=nnt(e,t),e=e.trim(),e}function gu(e){return!e||e.toLowerCase()==="x"||e==="*"}function ktt(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 Utt(e){if(!e)return{};let t=e.match(xtt);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 Ltt(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 Qtt(e,t){if(s5(e)||s5(t))return 0;let[n,r]=Ltt(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=Qtt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var uhe="[a-zA-Z0-9-]",che="0|[1-9]\\d*",Ftt=`\\d*[a-zA-Z-]${uhe}*`,Gtt="((?:<|>)?=?)",ohe=`(?:${che}|${Ftt})`,jtt=`(?:-(${ohe}(?:\\.${ohe})*))`,ihe=`${uhe}+`,Htt=`(?:\\+(${ihe}(?:\\.${ihe})*))`,a5=`${che}|x|X|\\*`,u1=`[v=\\s]*(${a5})(?:\\.(${a5})(?:\\.(${a5})(?:${jtt})?${Htt}?)?)?`,ztt=`^${Gtt}\\s*${u1}$`,$tt=new RegExp(ztt),Vtt=`^\\s*(${u1})\\s+-\\s+(${u1})\\s*$`,qtt=new RegExp(Vtt),Ytt="(?:~>?)",Ktt=`^${Ytt}${u1}$`,Jtt=new RegExp(Ktt),Ztt="(?:\\^)",Wtt=`^${Ztt}${u1}$`,Xtt=new RegExp(Wtt);function ent(e){let t=Jtt;return e.replace(t,(n,r,o,i,a)=>{let c;return gu(r)?c="":gu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:gu(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 tnt(e,t){let n=Xtt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return gu(i)?m="":gu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:gu(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 nnt(e,t){let n=$tt;return e.replace(n,(r,o,i,a,c,d)=>{let m=gu(i),h=m||gu(a),S=h||gu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function rnt(e,t){let n=qtt;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,R)=>(gu(i)?o="":gu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:gu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,gu(S)?h="":gu(y)?h=`<${+S+1}.0.0-0`:gu(C)?h=`<${S}.${+y+1}.0-0`:R?h=`<=${S}.${y}.${C}-${R}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var c5=Q(ns=>{"use strict";A();Object.defineProperty(ns,"__esModule",{value:!0});ns.massUnwrap=ns.unwrap=ns.massWrap=ns.wrap=void 0;var hu=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 ont=(e,t,n)=>{if(!e||!e[t]){hu("no original function "+String(t)+" to wrap");return}if(!n){hu("no wrapper function"),hu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){hu("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};ns.wrap=ont;var int=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{hu("must provide one or more modules to patch"),hu(new Error().stack);return}if(!(t&&Array.isArray(t))){hu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ns.wrap)(r,o,n)})})};ns.massWrap=int;var ant=(e,t)=>{if(!e||!e[t]){hu("no function to unwrap."),hu(new Error().stack);return}let n=e[t];if(!n.__unwrap)hu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ns.unwrap=ant;var snt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{hu("must provide one or more modules to patch"),hu(new Error().stack);return}if(!(t&&Array.isArray(t))){hu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ns.unwrap)(n,r)})})};ns.massUnwrap=snt;function l1(e){e&&e.logger&&(typeof e.logger!="function"?hu("new logger isn't a function, not replacing"):hu=e.logger)}ns.default=l1;l1.wrap=ns.wrap;l1.massWrap=ns.massWrap;l1.unwrap=ns.unwrap;l1.massUnwrap=ns.massUnwrap});var dhe=Q(DP=>{"use strict";A();Object.defineProperty(DP,"__esModule",{value:!0});DP.InstrumentationAbstract=void 0;var l5=(Le(),we(Je)),unt=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=unt.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((z8t,phe)=>{A();var rC=1e3,oC=rC*60,iC=oC*60,H0=iC*24,cnt=H0*7,lnt=H0*365.25;phe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return dnt(e);if(n==="number"&&isFinite(e))return t.long?fnt(e):pnt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function dnt(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*lnt;case"weeks":case"week":case"w":return n*cnt;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 pnt(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 fnt(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((V8t,Ahe)=>{A();function Ant(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 S=0;for(let y=0;y<h.length;y++)S=(S<<5)-S+h.charCodeAt(y),S|=0;return n.colors[Math.abs(S)%n.colors.length]}n.selectColor=t;function n(h){let S,y=null,C,R;function B(...N){if(!B.enabled)return;let M=B,F=Number(new Date),H=F-(S||F);M.diff=H,M.prev=S,M.curr=F,S=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:()=>y!==null?y:(C!==n.namespaces&&(C=n.namespaces,R=n.enabled(h)),R),set:N=>{y=N}}),typeof n.init=="function"&&n.init(B),B}function r(h,S){let y=n(this.namespace+(typeof S>"u"?":":S)+h);return y.log=this.log,y}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let S=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of S)y[0]==="-"?n.skips.push(y.slice(1)):n.names.push(y)}function i(h,S){let y=0,C=0,R=-1,B=0;for(;y<h.length;)if(C<S.length&&(S[C]===h[y]||S[C]==="*"))S[C]==="*"?(R=C,B=y,C++):(y++,C++);else if(R!==-1)C=R+1,B++,y=B;else return!1;for(;C<S.length&&S[C]==="*";)C++;return C===S.length}function a(){let h=[...n.names,...n.skips.map(S=>"-"+S)].join(",");return n.enable(""),h}function c(h){for(let S of n.skips)if(i(h,S))return!1;for(let S of n.names)if(i(h,S))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=Ant});var mhe=Q((dc,BP)=>{A();dc.formatArgs=gnt;dc.save=hnt;dc.load=_nt;dc.useColors=mnt;dc.storage=Ent();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 mnt(){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 gnt(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 hnt(e){try{e?dc.storage.setItem("debug",e):dc.storage.removeItem("debug")}catch{}}function _nt(){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 Ent(){try{return localStorage}catch{}}BP.exports=p5()(dc);var{formatters:Snt}=BP.exports;Snt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var hhe=Q((K8t,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((Z8t,Ehe)=>{"use strict";A();var ynt=Ue("os"),_he=Ue("tty"),Ad=hhe(),{env:ba}=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 ba&&(ba.FORCE_COLOR==="true"?yh=1:ba.FORCE_COLOR==="false"?yh=0:yh=ba.FORCE_COLOR.length===0?1:Math.min(parseInt(ba.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(ba.TERM==="dumb")return n;if(process.platform==="win32"){let r=ynt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in ba)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in ba)||ba.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in ba)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ba.TEAMCITY_VERSION)?1:0;if(ba.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ba){let r=parseInt((ba.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ba.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ba.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ba.TERM)||"COLORTERM"in ba?1:n}function Tnt(e){let t=A5(e,e&&e.isTTY);return f5(t)}Ehe.exports={supportsColor:Tnt,stdout:f5(A5(!0,_he.isatty(1))),stderr:f5(A5(!0,_he.isatty(2)))}});var The=Q((va,OP)=>{A();var Int=Ue("tty"),NP=Ue("util");va.init=Bnt;va.log=Rnt;va.formatArgs=bnt;va.save=Dnt;va.load=xnt;va.useColors=Cnt;va.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`.");va.colors=[6,2,3,4,5,1];try{let e=She();e&&(e.stderr||e).level>=2&&(va.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{}va.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 Cnt(){return"colors"in va.inspectOpts?!!va.inspectOpts.colors:Int.isatty(process.stderr.fd)}function bnt(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]=vnt()+t+" "+e[0]}function vnt(){return va.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Rnt(...e){return process.stderr.write(NP.formatWithOptions(va.inspectOpts,...e)+`
|
|
6
6
|
`)}function Dnt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function xnt(){return process.env.DEBUG}function Bnt(e){e.inspectOpts={};let t=Object.keys(va.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=va.inspectOpts[t[n]]}OP.exports=p5()(va);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 jit(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 Qpt.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={[Qi.ATTR_HTTP_REQUEST_METHOD]:d,[Qi.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[Qi.ATTR_URL_FULL]:a.toString(),[Qi.ATTR_URL_PATH]:a.pathname,[Qi.ATTR_URL_QUERY]:a.search,[Qi.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},S=a.hostname,y=a.port||h[c];m[Qi.ATTR_SERVER_ADDRESS]=S,y&&!isNaN(Number(y))&&(m[Qi.ATTR_SERVER_PORT]=Number(y));let R=this.parseRequestHeaders(t).get("user-agent");if(R){let ae=Array.isArray(R)?R[R.length-1]:R;m[Qi.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={[Qi.ATTR_NETWORK_PEER_ADDRESS]:a,[Qi.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let m=new Set(o.headersToSpanAttributes.requestHeaders.map(S=>S.toLowerCase())),h=this.parseRequestHeaders(t);for(let[S,y]of h.entries())if(m.has(S)){let C=Array.isArray(y)?y:[y];d[`http.request.header.${S}`]=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={[Qi.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(),S=n.headers[m+1];if(d.has(h)){let y=`http.response.header.${h}`;Object.hasOwn(a,y)?a[y].push(S.toString()):a[y]=[S.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[Qi.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[Qi.ATTR_HTTP_RESPONSE_STATUS_CODE,Qi.ATTR_HTTP_REQUEST_METHOD,Qi.ATTR_SERVER_ADDRESS,Qi.ATTR_SERVER_PORT,Qi.ATTR_URL_SCHEME,Qi.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 Fpt=Bbe();Object.defineProperty(wL,"UndiciInstrumentation",{enumerable:!0,get:function(){return Fpt.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 zpt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Si(t)}function $pt(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,Gpt,jpt,Hpt,Pbe,kbe=O(()=>{A();wbe=ie(Nbe(),1);dt();fr();Mbe="NodeFetch",Gpt=it(Mbe,wbe.UndiciInstrumentation,e=>$pt(e)),jpt=it(`${Mbe}.sentry`,pS,e=>e),Hpt=(e={})=>({name:"NodeFetch",setupOnce(){zpt(e,_t()?.getOptions())&&Gpt(e),jpt(e)}}),Pbe=Hpt});var ML=Q(vB=>{"use strict";A();Object.defineProperty(vB,"__esModule",{value:!0});vB.ExpressLayerType=void 0;var Vpt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(Vpt=vB.ExpressLayerType||(vB.ExpressLayerType={}))});var PL=Q(RB=>{"use strict";A();Object.defineProperty(RB,"__esModule",{value:!0});RB.AttributeNames=void 0;var qpt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(qpt=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(Fi=>{"use strict";A();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.getActualMatchedRoute=Fi.getConstructedRoute=Fi.getLayerPath=Fi.asErrorAndMessage=Fi.isLayerIgnored=Fi.getLayerMetadata=Fi.getRouterPath=Fi.storeLayerPath=void 0;var Oq=ML(),Ab=PL(),hS=Nq(),Ypt=(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}));Fi.storeLayerPath=Ypt;var Kpt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,Fi.getRouterPath)(e,n):e};Fi.getRouterPath=Kpt;var Jpt=(e,t,n)=>{if(t.name==="router"){let r=(0,Fi.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}`}};Fi.getLayerMetadata=Jpt;var Zpt=(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")},Wpt=(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(Zpt(e,r))return!0}catch{}return!1};Fi.isLayerIgnored=Wpt;var Xpt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];Fi.asErrorAndMessage=Xpt;var eft=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>Ube(n)||"").join(","):Ube(t)};Fi.getLayerPath=eft;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,"/")}Fi.getConstructedRoute=Lbe;function tft(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)||nft(r))?r:void 0}Fi.getActualMatchedRoute=tft;function nft(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(),sA=Qbe(),zbe=Fbe(),gb=Xt(),rft=($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,sA.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,sA.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,sA.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,sA.storeLayerPath)(a,n),m=(0,sA.getConstructedRoute)(a),h=(0,sA.getActualMatchedRoute)(a),S={[rft.ATTR_HTTP_ROUTE]:h},y=(0,sA.getLayerMetadata)(m,t,n),C=y.attributes[Hbe.AttributeNames.EXPRESS_TYPE],R=(0,Gbe.getRPCMetadata)(hc.context.active());if(R?.type===Gbe.RPCType.HTTP&&(R.route=h),(0,sA.isLayerIgnored)(y.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},y.name),N=r.tracer.startSpan(B,{attributes:Object.assign(S,y.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;y.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,sA.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,sA.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 oft=$be();Object.defineProperty(o_,"ExpressInstrumentation",{enumerable:!0,get:function(){return oft.ExpressInstrumentation}});var ift=ML();Object.defineProperty(o_,"ExpressLayerType",{enumerable:!0,get:function(){return ift.ExpressLayerType}});var aft=PL();Object.defineProperty(o_,"AttributeNames",{enumerable:!0,get:function(){return aft.AttributeNames}})});var ua,_S=O(()=>{A();ua=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function sft(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 uft(e,t){if(wn()===hd())return ua&&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,cft,Jbe,Zbe=O(()=>{A();qbe=ie(Vbe(),1);dt();fr();_S();Ybe="Express";Kbe=it(Ybe,()=>new qbe.ExpressInstrumentation({requestHook:e=>sft(e),spanNameHook:(e,t)=>uft(e,t)})),cft=()=>({name:Ybe,setupOnce(){Kbe()}}),Jbe=cft});var Wbe=Q(DB=>{"use strict";A();Object.defineProperty(DB,"__esModule",{value:!0});DB.SeverityNumber=void 0;var lft;(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"})(lft=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(uA=>{"use strict";A();Object.defineProperty(uA,"__esModule",{value:!0});uA.API_BACKWARDS_COMPATIBILITY_VERSION=uA.makeGetter=uA._global=uA.GLOBAL_LOGS_API_KEY=void 0;uA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");uA._global=globalThis;function dft(e,t,n){return r=>r===e?t:n}uA.makeGetter=dft;uA.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 pft=FL(),GL=class{getLogger(t,n,r){return new pft.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 fft=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):fft.NOOP_LOGGER}};jL.ProxyLogger=Pq});var tve=Q(HL=>{"use strict";A();Object.defineProperty(HL,"__esModule",{value:!0});HL.ProxyLoggerProvider=void 0;var Aft=Mq(),mft=eve(),kq=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new mft.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Aft.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(),gft=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,gft.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(cA=>{"use strict";A();Object.defineProperty(cA,"__esModule",{value:!0});cA.logs=cA.NoopLogger=cA.NOOP_LOGGER=cA.SeverityNumber=void 0;var hft=Wbe();Object.defineProperty(cA,"SeverityNumber",{enumerable:!0,get:function(){return hft.SeverityNumber}});var ove=FL();Object.defineProperty(cA,"NOOP_LOGGER",{enumerable:!0,get:function(){return ove.NOOP_LOGGER}});Object.defineProperty(cA,"NoopLogger",{enumerable:!0,get:function(){return ove.NoopLogger}});var _ft=rve();cA.logs=_ft.LogsAPI.getInstance()});var ive=Q(Eb=>{"use strict";A();Object.defineProperty(Eb,"__esModule",{value:!0});Eb.disableInstrumentations=Eb.enableInstrumentations=void 0;function Eft(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=Eft;function Sft(e){e.forEach(t=>t.disable())}Eb.disableInstrumentations=Sft});var uve=Q($L=>{"use strict";A();Object.defineProperty($L,"__esModule",{value:!0});$L.registerInstrumentations=void 0;var ave=(Le(),we(Je)),yft=Lq(),sve=ive();function Tft(e){let t=e.tracerProvider||ave.trace.getTracerProvider(),n=e.meterProvider||ave.metrics.getMeterProvider(),r=e.loggerProvider||yft.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,sve.enableInstrumentations)(o,t,n,r),()=>{(0,sve.disableInstrumentations)(o)}}$L.registerInstrumentations=Tft});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-]+)*))?$/,Ift=/^(?<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-]+)*))?$/,Cft={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function bft(e,t,n){if(!vft(e))return jq.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Bft(e);if(!r)return!1;let o=[],i=Ave(r,t,o,n);return i&&!n?.includePrerelease?Dft(r,o):i}VL.satisfies=bft;function vft(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=Zft(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=xft(t,r),t.includes(" "))return Ave(e,t,n,r);{let o=Nft(t);return n.push(o),Rft(e,o)}}function Rft(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 Cft[t.op]?.includes(n)}function Dft(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function xft(e,t){return e=e.trim(),e=Kft(e,t),e=Yft(e),e=Jft(e,t),e=e.trim(),e}function Cu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Bft(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 Nft(e){if(!e)return{};let t=e.match(Ift);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 Oft(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 wft(e,t){if(Gq(e)||Gq(t))return 0;let[n,r]=Oft(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=wft(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var mve="[a-zA-Z0-9-]",gve="0|[1-9]\\d*",Mft=`\\d*[a-zA-Z-]${mve}*`,Pft="((?:<|>)?=?)",dve=`(?:${gve}|${Mft})`,kft=`(?:-(${dve}(?:\\.${dve})*))`,pve=`${mve}+`,Uft=`(?:\\+(${pve}(?:\\.${pve})*))`,Fq=`${gve}|x|X|\\*`,xB=`[v=\\s]*(${Fq})(?:\\.(${Fq})(?:\\.(${Fq})(?:${kft})?${Uft}?)?)?`,Lft=`^${Pft}\\s*${xB}$`,Qft=new RegExp(Lft),Fft=`^\\s*(${xB})\\s+-\\s+(${xB})\\s*$`,Gft=new RegExp(Fft),jft="(?:~>?)",Hft=`^${jft}${xB}$`,zft=new RegExp(Hft),$ft="(?:\\^)",Vft=`^${$ft}${xB}$`,qft=new RegExp(Vft);function Yft(e){let t=zft;return e.replace(t,(n,r,o,i,a)=>{let c;return Cu(r)?c="":Cu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Cu(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 Kft(e,t){let n=qft,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Cu(i)?m="":Cu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Cu(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 Jft(e,t){let n=Qft;return e.replace(n,(r,o,i,a,c,d)=>{let m=Cu(i),h=m||Cu(a),S=h||Cu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Zft(e,t){let n=Gft;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,R)=>(Cu(i)?o="":Cu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Cu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Cu(S)?h="":Cu(y)?h=`<${+S+1}.0.0-0`:Cu(C)?h=`<${S}.${+y+1}.0-0`:R?h=`<=${S}.${y}.${C}-${R}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var Hq=Q(cs=>{"use strict";A();Object.defineProperty(cs,"__esModule",{value:!0});cs.massUnwrap=cs.unwrap=cs.massWrap=cs.wrap=void 0;var bu=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 Wft=(e,t,n)=>{if(!e||!e[t]){bu("no original function "+String(t)+" to wrap");return}if(!n){bu("no wrapper function"),bu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){bu("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};cs.wrap=Wft;var Xft=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{bu("must provide one or more modules to patch"),bu(new Error().stack);return}if(!(t&&Array.isArray(t))){bu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,cs.wrap)(r,o,n)})})};cs.massWrap=Xft;var eAt=(e,t)=>{if(!e||!e[t]){bu("no function to unwrap."),bu(new Error().stack);return}let n=e[t];if(!n.__unwrap)bu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};cs.unwrap=eAt;var tAt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{bu("must provide one or more modules to patch"),bu(new Error().stack);return}if(!(t&&Array.isArray(t))){bu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,cs.unwrap)(n,r)})})};cs.massUnwrap=tAt;function NB(e){e&&e.logger&&(typeof e.logger!="function"?bu("new logger isn't a function, not replacing"):bu=e.logger)}cs.default=NB;NB.wrap=cs.wrap;NB.massWrap=cs.massWrap;NB.unwrap=cs.unwrap;NB.massUnwrap=cs.massUnwrap});var _ve=Q(YL=>{"use strict";A();Object.defineProperty(YL,"__esModule",{value:!0});YL.InstrumentationAbstract=void 0;var zq=(Le(),we(Je)),nAt=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=nAt.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 rAt=z0(),Sve=Ue("path"),qq=Eve(),oAt=["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 rAt.Hook(null,{internals:!0},(t,n,r)=>{let o=iAt(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 oAt?new e:this._instance=this._instance??new e}};JL.RequireInTheMiddleSingleton=Yq;function iAt(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=[],aAt={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 sAt(e,t,n,r,o){Cve.set(e,o),Kq.set(t,n),Ive.set(t,r);let i=new Proxy(t,aAt);Tve.forEach(a=>a(e,i,o)),bve.push([e,i,o])}OB.register=sAt;OB.importHooks=Tve;OB.specifiers=Cve;OB.toHook=bve});var Xq=Q((kan,yb)=>{A();var Rve=Ue("path"),uAt=wP(),{fileURLToPath:cAt}=Ue("url"),{MessageChannel:lAt}=Ue("worker_threads"),{isBuiltin:Jq}=Ue("module");Jq||(Jq=()=>!0);var{importHooks:Zq,specifiers:dAt,toHook:pAt}=vve();function Dve(e){Zq.push(e),pAt.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 fAt(){let{port1:e,port2:t}=new lAt,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 S=o.slice(5);Jq(S)&&(o=S)}else if(c.startsWith("file://")){let S=Error.stackTraceLimit;Error.stackTraceLimit=0;try{m=cAt(o),o=m}catch{}if(Error.stackTraceLimit=S,m){let y=uAt(m);y&&(o=y.name,h=y.basedir)}}if(e)for(let S of e)if(m&&S===m)Sb(n,i,m,void 0);else if(S===o){if(!h)Sb(n,i,o,h);else if(h.endsWith(dAt.get(c)))Sb(n,i,o,h);else if(r){let y=o+Rve.sep+Rve.relative(h,m);Sb(n,i,y,h)}}else S===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=fAt});var e7=Q(a_=>{"use strict";A();Object.defineProperty(a_,"__esModule",{value:!0});a_.isWrapped=a_.safeExecuteInTheMiddleAsync=a_.safeExecuteInTheMiddle=void 0;function AAt(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=AAt;async function mAt(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=mAt;function gAt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}a_.isWrapped=gAt});var Ove=Q(ZL=>{"use strict";A();Object.defineProperty(ZL,"__esModule",{value:!0});ZL.InstrumentationBase=void 0;var MB=Ue("path"),Bve=Ue("util"),hAt=hve(),t7=Hq(),_At=_ve(),EAt=yve(),SAt=Xq(),PB=(Le(),we(Je)),yAt=z0(),TAt=Ue("fs"),IAt=e7(),n7=class extends _At.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=EAt.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,IAt.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,TAt.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 yAt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new SAt.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,hAt.satisfies)(t,r,{includePrerelease:n}))}});var wve=Q(WL=>{"use strict";A();Object.defineProperty(WL,"__esModule",{value:!0});WL.normalize=void 0;var CAt=Ue("path");Object.defineProperty(WL,"normalize",{enumerable:!0,get:function(){return CAt.normalize}})});var Mve=Q(Tb=>{"use strict";A();Object.defineProperty(Tb,"__esModule",{value:!0});Tb.normalize=Tb.InstrumentationBase=void 0;var bAt=Ove();Object.defineProperty(Tb,"InstrumentationBase",{enumerable:!0,get:function(){return bAt.InstrumentationBase}});var vAt=wve();Object.defineProperty(Tb,"normalize",{enumerable:!0,get:function(){return vAt.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 RAt=r7(),i7=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,RAt.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 DAt(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=DAt});var Fve=Q(Gi=>{"use strict";A();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.semconvStabilityFromStr=Gi.SemconvStability=Gi.safeExecuteInTheMiddleAsync=Gi.safeExecuteInTheMiddle=Gi.isWrapped=Gi.InstrumentationNodeModuleFile=Gi.InstrumentationNodeModuleDefinition=Gi.InstrumentationBase=Gi.registerInstrumentations=void 0;var xAt=uve();Object.defineProperty(Gi,"registerInstrumentations",{enumerable:!0,get:function(){return xAt.registerInstrumentations}});var BAt=r7();Object.defineProperty(Gi,"InstrumentationBase",{enumerable:!0,get:function(){return BAt.InstrumentationBase}});var NAt=kve();Object.defineProperty(Gi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return NAt.InstrumentationNodeModuleDefinition}});var OAt=Uve();Object.defineProperty(Gi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return OAt.InstrumentationNodeModuleFile}});var a7=e7();Object.defineProperty(Gi,"isWrapped",{enumerable:!0,get:function(){return a7.isWrapped}});Object.defineProperty(Gi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return a7.safeExecuteInTheMiddle}});Object.defineProperty(Gi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return a7.safeExecuteInTheMiddleAsync}});var Qve=Lve();Object.defineProperty(Gi,"SemconvStability",{enumerable:!0,get:function(){return Qve.SemconvStability}});Object.defineProperty(Gi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return Qve.semconvStabilityFromStr}})});var Gve=Q((rsn,wAt)=>{wAt.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 MAt=(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=MAt;var jve=(e,t)=>{let n=t.match(e);return n?n[0]:null},PAt=(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 S=r.pop();S!==void 0&&(c=[S,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=PAt});var Jve=Q(Cb=>{"use strict";A();Object.defineProperty(Cb,"__esModule",{value:!0});Cb.EXPANSION_MAX=void 0;Cb.expand=YAt;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",kAt=new RegExp($ve,"g"),UAt=new RegExp(Vve,"g"),LAt=new RegExp(u7,"g"),QAt=new RegExp(qve,"g"),FAt=new RegExp(Yve,"g"),GAt=/\\\\/g,jAt=/\\{/g,HAt=/\\}/g,zAt=/\\,/g,$At=/\\\./g;Cb.EXPANSION_MAX=1e5;function s7(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function VAt(e){return e.replace(GAt,$ve).replace(jAt,Vve).replace(HAt,u7).replace(zAt,qve).replace($At,Yve)}function qAt(e){return e.replace(kAt,"\\").replace(UAt,"{").replace(LAt,"}").replace(QAt,",").replace(FAt,".")}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 YAt(e,t={}){if(!e)return[];let{max:n=Cb.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),kB(VAt(e),n,!0).map(qAt)}function KAt(e){return"{"+e+"}"}function JAt(e){return/^-?0\d/.test(e)}function ZAt(e,t){return e<=t}function WAt(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 S;if(m)S=o.body.split(/\.\./);else if(S=Kve(o.body),S.length===1&&S[0]!==void 0&&(S=kB(S[0],t,!1).map(KAt),S.length===1))return a.map(C=>o.pre+S[0]+C);let y;if(m&&S[0]!==void 0&&S[1]!==void 0){let C=s7(S[0]),R=s7(S[1]),B=Math.max(S[0].length,S[1].length),N=S.length===3&&S[2]!==void 0?Math.abs(s7(S[2])):1,M=ZAt;R<C&&(N*=-1,M=WAt);let H=S.some(JAt);y=[];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}}y.push(ne)}}else{y=[];for(let C=0;C<S.length;C++)y.push.apply(y,kB(S[C],t,!1))}for(let C=0;C<y.length;C++)for(let R=0;R<a.length&&r.length<t;R++){let B=i+y[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 XAt=1024*64,emt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>XAt)throw new TypeError("pattern is too long")};nQ.assertValidPattern=emt});var Xve=Q(rQ=>{"use strict";A();Object.defineProperty(rQ,"__esModule",{value:!0});rQ.parseClass=void 0;var tmt={"[: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,"\\$&"),nmt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Wve=e=>e.join(""),rmt=(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,S="";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(tmt))if(e.startsWith(N,i)){if(S)return["$.",!1,e.length-n,!0];i+=N.length,H?o.push(M):r.push(M),c=c||F;continue e}}if(d=!1,S){B>S?r.push(UB(S)+"-"+UB(B)):B===S&&r.push(UB(B)),S="",i++;continue}if(e.startsWith("-]",i+1)){r.push(UB(B+"-")),i+=2;continue}if(e.startsWith("-",i+1)){S=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[nmt(B),!1,h-n,!1]}let y="["+(m?"^":"")+Wve(r)+"]",C="["+(m?"":"^")+Wve(o)+"]";return[r.length&&o.length?"("+y+"|"+C+")":r.length?y:C,c,h-n,!0]};rQ.parseClass=rmt});var iQ=Q(oQ=>{"use strict";A();Object.defineProperty(oQ,"__esModule",{value:!0});oQ.unescape=void 0;var omt=(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=omt});var d7=Q(cQ=>{"use strict";A();var _c;Object.defineProperty(cQ,"__esModule",{value:!0});cQ.AST=void 0;var imt=Xve(),aQ=iQ(),amt=new Set(["!","?","+","*","@"]),c7=e=>amt.has(e),eRe=e=>c7(e.type),smt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),umt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),cmt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),tRe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),lmt="(?!(?:^|/)\\.\\.?(?:$|/))",sQ="(?!\\.)",dmt=new Set(["[","."]),pmt=new Set(["..","."]),fmt=new Set("().*{}+?[]^$\\!"),Amt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),l7="[^/]",nRe=l7+"*?",rRe=l7+"+?",mmt=0,uQ=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++mmt;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 S=r+1,y=new _c(null,n),C=[],R="";for(;S<t.length;){let B=t.charAt(S++);if(c||B==="\\"){c=!c,R+=B;continue}if(d){S===m+1?(B==="^"||B==="!")&&(h=!0):B==="]"&&!(S===m+2&&h)&&(d=!1),R+=B;continue}else if(B==="["){d=!0,m=S,h=!1,R+=B;continue}if(!o.noext&&c7(B)&&t.charAt(S)==="("&&(i<=a||n&&n.#p(B))){let M=n&&n.#p(B)?0:1;y.push(R),R="";let F=new _c(B,y);y.push(F),S=_c.#d(t,F,S,o,i+M);continue}if(B==="|"){y.push(R),R="",C.push(y),y=new _c(null,n);continue}if(B===")")return R===""&&n.#e.length===0&&(n.#l=!0),y.push(R),R="",n.push(...C,y),S;R+=B}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],S}#_(t){return this.#A(t,umt)}#A(t,n=smt){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=cmt){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&&pmt.has(this.#e[0]))){let R=dmt,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?lmt:N?sQ:""}let S="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(S="(?:$|\\/)"),[h+m+S,(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+=(fmt.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,S,y,C]=(0,imt.parseClass)(t,d);if(y){i+=h,a=a||S,d+=y-1,n=n||C;continue}}if(m==="?"){i+=l7,n=!0;continue}i+=Amt(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 gmt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");lQ.escape=gmt});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 hmt=Jve(),dQ=Zve(),aRe=d7(),_mt=p7(),Emt=iQ(),Smt=(e,t,n={})=>((0,dQ.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new yS(t,n).match(e));lt.minimatch=Smt;var ymt=/^\*+([^+@!?\*\[\(]*)$/,Tmt=e=>t=>!t.startsWith(".")&&t.endsWith(e),Imt=e=>t=>t.endsWith(e),Cmt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),bmt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),vmt=/^\*+\.\*+$/,Rmt=e=>!e.startsWith(".")&&e.includes("."),Dmt=e=>e!=="."&&e!==".."&&e.includes("."),xmt=/^\.\*+$/,Bmt=e=>e!=="."&&e!==".."&&e.startsWith("."),Nmt=/^\*+$/,Omt=e=>e.length!==0&&!e.startsWith("."),wmt=e=>e.length!==0&&e!=="."&&e!=="..",Mmt=/^\?+([^+@!?\*\[\(]*)?$/,Pmt=([e,t=""])=>{let n=sRe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},kmt=([e,t=""])=>{let n=uRe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},Umt=([e,t=""])=>{let n=uRe([e]);return t?r=>n(r)&&r.endsWith(t):n},Lmt=([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 Qmt="[^/]",Fmt=Qmt+"*?",Gmt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",jmt="(?:(?!(?:\\/|^)\\.).)*?",Hmt=(e,t={})=>n=>(0,lt.minimatch)(n,e,t);lt.filter=Hmt;lt.minimatch.filter=lt.filter;var bd=(e,t={})=>Object.assign({},e,t),zmt=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=zmt;lt.minimatch.defaults=lt.defaults;var $mt=(e,t={})=>((0,dQ.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,hmt.expand)(e,{max:t.braceExpandMax}));lt.braceExpand=$mt;lt.minimatch.braceExpand=lt.braceExpand;var Vmt=(e,t={})=>new yS(e,t).makeRe();lt.makeRe=Vmt;lt.minimatch.makeRe=lt.makeRe;var qmt=(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=qmt;lt.minimatch.match=lt.match;var iRe=/[?*]|[+@!]\(.*?\)|\[|\]/,Ymt=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]),S=d?3:c?0:void 0,y=h?3:m?0:void 0;if(typeof S=="number"&&typeof y=="number"){let[C,R]=[t[S],n[y]];C.toLowerCase()===R.toLowerCase()&&(n[y]=C,i=y,o=S)}}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 S=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))S=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(F--,!this.#o(t,h,r,F,0)))return!1;S=h.length+1}}if(!m.length){let F=!!S;for(let H=o;H<t.length-S;H++){let j=String(t[H]);if(F=!0,j==="."||j===".."||!this.options.dot&&j.startsWith("."))return!1}return r||F}let y=[[[],0]],C=y[0],R=0,B=[0];for(let F of m)F===lt.GLOBSTAR?(B.push(R),C=[[],0],y.push(C)):(C[0].push(F),R++);let N=y.length-1,M=t.length-S;for(let F of y)F[1]=M-(B[N--]+F[0].length);return!!this.#r(t,y,o,0,r,0,!!S)}#r(t,n,r,o,i,a,c){let d=n[o];if(!d){for(let S=r;S<t.length;S++){c=!0;let y=t[S];if(y==="."||y===".."||!this.options.dot&&y.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 y=t[r];if(y==="."||y===".."||!this.options.dot&&y.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],S=t[a];if(this.debug(n,h,S),h===!1||h===lt.GLOBSTAR)return!1;let y;if(typeof h=="string"?(y=S===h,this.debug("string match",h,S,y)):(y=h.test(S),this.debug("pattern match",h,S,y)),!y)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(Nmt))?o=n.dot?wmt:Omt:(r=t.match(ymt))?o=(n.nocase?n.dot?bmt:Cmt:n.dot?Imt:Tmt)(r[1]):(r=t.match(Mmt))?o=(n.nocase?n.dot?kmt:Pmt:n.dot?Umt:Lmt)(r):(r=t.match(vmt))?o=n.dot?Dmt:Rmt:(r=t.match(xmt))&&(o=Bmt);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?Fmt:n.dot?Gmt:jmt,o=new Set(n.nocase?["i"]:[]),i=t.map(d=>{let m=d.map(S=>{if(S instanceof RegExp)for(let y of S.flags.split(""))o.add(y);return typeof S=="string"?Ymt(S):S===lt.GLOBSTAR?lt.GLOBSTAR:S._src});m.forEach((S,y)=>{let C=m[y+1],R=m[y-1];S!==lt.GLOBSTAR||R===lt.GLOBSTAR||(R===void 0?C!==void 0&&C!==lt.GLOBSTAR?m[y+1]="(?:\\/|"+r+"\\/)?"+C:m[y]=r:C===void 0?m[y-1]=R+"(?:\\/|\\/"+r+")?":C!==lt.GLOBSTAR&&(m[y-1]=R+"(?:\\/|\\/"+r+"\\/)"+C,m[y+1]=lt.GLOBSTAR))});let h=m.filter(S=>S!==lt.GLOBSTAR);if(this.partial&&h.length>=1){let S=[];for(let y=1;y<=h.length;y++)S.push(h.slice(0,y).join("/"));return"(?:"+S.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 Kmt=d7();Object.defineProperty(lt,"AST",{enumerable:!0,get:function(){return Kmt.AST}});var Jmt=p7();Object.defineProperty(lt,"escape",{enumerable:!0,get:function(){return Jmt.escape}});var Zmt=iQ();Object.defineProperty(lt,"unescape",{enumerable:!0,get:function(){return Zmt.unescape}});lt.minimatch.AST=aRe.AST;lt.minimatch.Minimatch=yS;lt.minimatch.escape=_mt.escape;lt.minimatch.unescape=Emt.unescape});var hRe=Q((Tsn,m7)=>{"use strict";A();var dRe=Ue("node:diagnostics_channel"),{context:pQ,trace:f7,SpanStatusCode:fQ,propagation:A7,diag:Wmt}=(Le(),we(Je)),{getRPCMetadata:Xmt,RPCType:egt}=_r(),{ATTR_HTTP_ROUTE:AQ,ATTR_HTTP_RESPONSE_STATUS_CODE:pRe,ATTR_HTTP_REQUEST_METHOD:tgt,ATTR_URL_PATH:ngt}=($n(),we(Nr)),{InstrumentationBase:rgt}=Fve(),{version:ogt,name:fRe}=Gve(),igt=">=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"},zm="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 rgt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(fRe,ogt,t),this.logger=Wmt.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:igt,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]=S(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:zm});else if(Array.isArray(B)){let N=[];for(let M of B)N.push(S(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:zm}));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=S(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:zm})}),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=Xmt(N);C.routeOptions.url!=null&&M?.type===egt.HTTP&&(M.route=C.routeOptions.url);let F={[co.ROOT]:"@fastify/otel",[tgt]:C.method,[ngt]: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(y,C,R,B){let N=y[c_];N!=null&&(C.statusCode>=500&&N.setStatus({code:fQ.ERROR}),N.setAttributes({[pRe]:C.statusCode}),N.end()),y[c_]=null,B(null,R)}function c(y,C,R,B){let N=y[c_];N!=null&&(N.setStatus({code:fQ.ERROR,message:R.message}),t[FB]!==!1&&N.recordException(R)),B()}function d(y,C){let R=this[mRe];return ARe.includes(y)?R.call(this,y,S(C,y,{[co.HOOK_NAME]:`${this.pluginName} - ${y}`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:zm})):R.call(this,y,C)}function m(y,C){let R=this[gRe];typeof y=="function"?(C=S(y,"notFoundHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:y.name?.length>0?y.name:zm}),R.call(this,C)):(y.preValidation!=null&&(y.preValidation=S(y.preValidation,"notFoundHandler - preValidation",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:y.preValidation.name?.length>0?y.preValidation.name:zm})),y.preHandler!=null&&(y.preHandler=S(y.preHandler,"notFoundHandler - preHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[co.FASTIFY_TYPE]:s_.INSTANCE,[co.HOOK_CALLBACK_NAME]:y.preHandler.name?.length>0?y.preHandler.name:zm})),C=S(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:zm}),R.call(this,y,C))}function h(y){for(let C of y)if(C?.routeOptions&&C.url&&C.method)return C;return null}function S(y,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`),y.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`),y.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`),y.call(this,...N);let H=F[LB]??pQ.active(),j=y.name?.length>0?y.name:this.pluginName??zm,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=y.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 $m,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})($m||($m={}));(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 cgt(){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,agt,sgt,IRe,ugt,hQ,bRe=O(()=>{A();Le();_Q=ie(_r(),1),TS=ie(Xt(),1);$n();dt();_Re();TRe();agt="0.1.0",sgt="@sentry/instrumentation-fastify-v3",IRe="anonymous",ugt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),hQ=class extends TS.InstrumentationBase{constructor(t={}){super(sgt,agt,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,{[$m.FASTIFY_TYPE]:GB.MIDDLEWARE,[$m.PLUGIN_NAME]:t,[$m.HOOK_NAME]:n}),S=o&&a[a.length-1];return S&&(a[a.length-1]=function(...y){gQ(m),S.apply(this,y)}),qe.with(Ft.setSpan(qe.active(),h),()=>yRe(()=>r.apply(this,a),y=>{y instanceof Error&&(h.setStatus({code:Xo.ERROR,message:y.message}),h.recordException(y)),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(!ugt.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()),cgt(),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={[$m.PLUGIN_NAME]:this.pluginName,[$m.FASTIFY_TYPE]:GB.REQUEST_HANDLER,[Iz]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[$m.FASTIFY_NAME]=d);let S=g7(o,t.tracer,m,h);CRe(S);let{requestHook:y}=t.getConfig();return y&&(0,TS.safeExecuteInTheMiddle)(()=>y(S,{request:r}),C=>{C&&t._diag.error("request hook failed",C)},!0),qe.with(Ft.setSpan(qe.active(),S),()=>{i()})}}}});import*as h7 from"node:diagnostics_channel";function lgt(){let e=_t();if(e)return e.getIntegrationByName(EQ)}function vRe(e,t,n,r){let o=lgt()?.getShouldHandleError()||NRe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){ua&&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 pgt(){let e=_t();e&&e.on("spanStart",t=>{ORe(t)})}function fgt(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,dgt,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?ua&&Z.error("Failed to setup Fastify instrumentation",o):(pgt(),r&&fgt(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}),dgt=({shouldHandleError:e})=>{let t;return{name:EQ,setupOnce(){t=e||NRe,DRe(),xRe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},BRe=(e={})=>dgt(e)});var _7=Q(Gp=>{"use strict";A();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.SpanNames=Gp.TokenKind=Gp.AllowedOperationTypes=void 0;var Agt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Agt=Gp.AllowedOperationTypes||(Gp.AllowedOperationTypes={}));var mgt;(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"})(mgt=Gp.TokenKind||(Gp.TokenKind={}));var ggt;(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"})(ggt=Gp.SpanNames||(Gp.SpanNames={}))});var E7=Q(zB=>{"use strict";A();Object.defineProperty(zB,"__esModule",{value:!0});zB.AttributeNames=void 0;var hgt;(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"})(hgt=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 Zsn=SQ();yQ.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var YRe=Q(ca=>{"use strict";A();Object.defineProperty(ca,"__esModule",{value:!0});ca.wrapFieldResolver=ca.wrapFields=ca.getSourceFromLocation=ca.getOperation=ca.endSpan=ca.addSpanSource=ca.addInputVariableAttributes=ca.isPromise=void 0;var vb=(Le(),we(Je)),l_=_7(),IS=E7(),Vm=SQ(),PRe=Object.values(l_.AllowedOperationTypes),_gt=e=>typeof e?.then=="function";ca.isPromise=_gt;var Egt=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 Sgt(e,t){Object.entries(t).forEach(([n,r])=>{S7(e,n,r)})}ca.addInputVariableAttributes=Sgt;function QRe(e,t,n,r,o){let i=zRe(t,n,r,o);e.setAttribute(IS.AttributeNames.SOURCE,i)}ca.addSpanSource=QRe;function ygt(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:Tgt(e,t,n,r,o,c)},bgt(n,o,i),{field:i,spanAdded:!0}}function Tgt(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[Vm.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 Igt(e,t){t&&e.recordException(t),e.end()}ca.endSpan=Igt;function Cgt(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)}ca.getOperation=Cgt;function bgt(e,t,n){return e[Vm.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function FRe(e,t){return e[Vm.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[Vm.OTEL_GRAPHQL_DATA_SYMBOL].span}function vgt(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 Rgt(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 Dgt=[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&&Dgt.indexOf(c.kind)>=0&&(m="*"),c.kind===l_.TokenKind.STRING&&(m=`"${m}"`),c.kind===l_.TokenKind.EOF&&(m=""),c.line>d?(o+=Rgt(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}ca.getSourceFromLocation=zRe;function $Re(e,t,n){if(!e||e[Vm.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Vm.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)}})}ca.wrapFields=$Re;function VRe(e){return"ofType"in e?VRe(e.ofType):xgt(e)?e.getTypes():Bgt(e)?[e]:[]}function xgt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function Bgt(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[Vm.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let m=t();if(m.ignoreTrivialResolveSpans&&r&&(Egt(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[Vm.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=vgt(m.mergeItems,d&&d.path),S=h.filter(R=>typeof R=="string").length,y,C=!1;if(m.depth>=0&&m.depth<S)y=GRe(c,h);else{let{field:R,spanAdded:B}=ygt(e,t,c,d,h);y=R.span,C=B}return vb.context.with(vb.trace.setSpan(vb.context.active(),y),()=>{try{let R=n.call(this,i,a,c,d);return(0,ca.isPromise)(R)?R.then(B=>(LRe(y,C),B),B=>{throw URe(y,B,C),B}):(LRe(y,C),R)}catch(R){throw URe(y,R,C),R}})}return o[Vm.OTEL_PATCHED_SYMBOL]=!0,o}ca.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 qm=(Le(),we(Je)),vd=Xt(),$B=_7(),TQ=E7(),y7=SQ(),Ngt=MRe(),Qs=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,Qs.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:{}},qm.context.with(qm.trace.setSpan(qm.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,Qs.endSpan)(t,n);return}if((0,Qs.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,Qs.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,Qs.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,Qs.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,Qs.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 qm.context.with(qm.trace.setSpan(qm.context.active(),a),()=>(0,vd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,d)=>{d&&((0,Qs.getOperation)(d)?d.loc&&(0,Qs.addSpanSource)(a,d.loc,i.allowValues):a.updateName($B.SpanNames.SCHEMA_PARSE)),(0,Qs.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan($B.SpanNames.VALIDATE,{});return qm.context.with(qm.trace.setSpan(qm.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,Qs.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=Ngt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(TQ.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,Qs.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,Qs.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,S=c??m;return c=(0,Qs.wrapFieldResolver)(this.tracer,()=>this.getConfig(),S,h),t&&((0,Qs.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,Qs.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 Ogt=WRe();Object.defineProperty(bQ,"GraphQLInstrumentation",{enumerable:!0,get:function(){return Ogt.GraphQLInstrumentation}})});function oDe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function Mgt(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,wgt,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]||[],S=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(S),d.setAttribute(cb,h)):typeof h=="string"?d.setAttribute(cb,[h,S]):d.setAttribute(cb,S),xt(d).data["original-description"]||d.setAttribute("original-description",xt(d).description),d.updateName(`${xt(d).data["original-description"]} (${Mgt(h)})`)}}}}),wgt=(e={})=>({name:tDe,setupOnce(){nDe(oDe(e))}}),rDe=wgt});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(S=>{let y=wr.propagation.extract(wr.ROOT_CONTEXT,S.headers,dDe.bufferTextMapGetter),C=wr.trace.getSpan(y)?.spanContext(),R;C&&(R={context:C}),d.push(n._startConsumerSpan({topic:i.batch.topic,message:S,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 S=c.abort;c.abort=function(...C){let R=S.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(S=>{c.push(t._startProducerSpan(h.topic,S)),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,...S.partition!==void 0?{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(S.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 Pgt=mDe();Object.defineProperty(BQ,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return Pgt.KafkaJsInstrumentation}})});var hDe,_De,EDe,kgt,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")}})),kgt=()=>({name:_De,setupOnce(){EDe()}}),SDe=kgt});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 Ugt=vDe();Object.defineProperty(OQ,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return Ugt.LruMemoizerInstrumentation}})});var DDe,xDe,BDe,Lgt,NDe,ODe=O(()=>{A();DDe=ie(RDe(),1);fr();xDe="LruMemoizer",BDe=it(xDe,()=>new DDe.LruMemoizerInstrumentation),Lgt=()=>({name:xDe,setupOnce(){BDe()}}),NDe=Lgt});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 Qgt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(Qgt=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(),Ym=($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:S}=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,S)])]}_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()),S=n._checkSkipInstrumentation(h),y=typeof d=="function"?d:m;if(S||typeof y!="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,y);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),S=typeof c=="function"?c:d;if(h||typeof S!="function"||typeof a!="object")return typeof c=="function"?n.call(this,o,i,a,c):n.call(this,o,i,a,c,d);let y=e._getCommandType(a),C=y===CS.MongodbCommandType.UNKNOWN?void 0:y,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,S);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,S=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,a,c);let y;if(!m){let R=t._getV4SpanAttributes(this,o,i,S),B=t._spanNameFromAttrs(R);y=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R})}let C=t._patchEnd(y,h,this.id,S);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 S;if(!d){let R=t._getV4SpanAttributes(this,i,a,m),B=t._spanNameFromAttrs(R);S=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R})}let y=t._patchEnd(S,h,this.id,m),C=n.apply(this,o);return C.then(R=>y(null,R),R=>y(R)),C}}_getV3PatchFind(){let t=this;return n=>function(o,i,a,c,d,m){let h=Qo.trace.getSpan(Qo.context.active()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:m;if(S||typeof y!="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,y);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()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:m;if(S||typeof y!="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,y);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 S=h.split(":");i=S[0],a=S[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[Ym.ATTR_DB_SYSTEM_NAME]=hl.DB_SYSTEM_NAME_VALUE_MONGODB,c[Ym.ATTR_DB_NAMESPACE]=t,c[Ym.ATTR_DB_OPERATION_NAME]=a,c[Ym.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[Ym.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[Ym.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[Ym.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[Ym.ATTR_DB_OPERATION_NAME],t[Ym.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 S=m[1];a._handleExecutionResult(t,S)}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 Fgt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(Fgt=qB.MongodbCommandType||(qB.MongodbCommandType={}))});var FDe=Q(Ob=>{"use strict";A();Object.defineProperty(Ob,"__esModule",{value:!0});Ob.MongodbCommandType=Ob.MongoDBInstrumentation=void 0;var Ggt=LDe();Object.defineProperty(Ob,"MongoDBInstrumentation",{enumerable:!0,get:function(){return Ggt.MongoDBInstrumentation}});var jgt=QDe();Object.defineProperty(Ob,"MongodbCommandType",{enumerable:!0,get:function(){return jgt.MongodbCommandType}})});function Hgt(e){let t=v7(e);return JSON.stringify(t)}function v7(e){if(Array.isArray(e))return e.map(t=>v7(t));if(zgt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,v7(r)]).reduce((n,r)=>(Vgt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function zgt(e){return typeof e=="object"&&e!==null&&!$gt(e)}function $gt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function Vgt(e){return Array.isArray(e)}var GDe,jDe,HDe,qgt,zDe,$De=O(()=>{A();GDe=ie(FDe(),1);fr();jDe="Mongo",HDe=it(jDe,()=>new GDe.MongoDBInstrumentation({dbStatementSerializer:Hgt,responseHook(e){Or(e,"auto.db.otel.mongo")}}));qgt=()=>({name:jDe,setupOnce(){HDe()}}),zDe=qgt});var R7=Q(ji=>{"use strict";A();Object.defineProperty(ji,"__esModule",{value:!0});ji.DB_SYSTEM_NAME_VALUE_MONGODB=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_OPERATION=ji.ATTR_DB_NAME=ji.ATTR_DB_MONGODB_COLLECTION=void 0;ji.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";ji.ATTR_DB_NAME="db.name";ji.ATTR_DB_OPERATION="db.operation";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_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 Ygt(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=Ygt;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 Kgt(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=Kgt;function Jgt(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=Jgt});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 la=(Le(),we(Je)),Zgt=_r(),x7=YDe(),ls=Xt(),JDe=KDe(),p_=R7(),bS=($n(),we(Nr)),PQ=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Wgt=["remove","count","findOneAndRemove",...PQ],Xgt=["count","findOneAndRemove",...PQ],eht=[...PQ];function ZDe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Wgt:e.startsWith("7.")?Xgt:eht: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 ls.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(JDe.PACKAGE_NAME,JDe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,ls.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,ls.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new ls.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&&la.trace.getSpan(la.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&ls.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&ls.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&&la.trace.getSpan(la.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&ls.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&ls.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&&la.trace.getSpan(la.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 y=h(t,d);r._dbSemconvStability&ls.SemconvStability.OLD&&(m[p_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&ls.SemconvStability.STABLE&&(m[bS.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(S,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&la.trace.getSpan(la.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,S=c;typeof a=="function"?(m=a,h=void 0,S=void 0):typeof c=="function"&&(m=c,S=void 0);let y={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&ls.SemconvStability.OLD&&(y[p_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&ls.SemconvStability.STABLE&&(y[bS.ATTR_DB_QUERY_TEXT]=N)}let R=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),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&&la.trace.getSpan(la.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:S}=r.getConfig();if(S){let C=S(t,m);r._dbSemconvStability&ls.SemconvStability.OLD&&(h[p_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&ls.SemconvStability.STABLE&&(h[bS.ATTR_DB_QUERY_TEXT]=C)}let y=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(y,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=la.trace.getSpan(la.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]=la.trace.getSpan(la.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&ls.SemconvStability.OLD&&(a[p_.ATTR_DB_OPERATION]=r,a[p_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&ls.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&ls.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:la.SpanKind.CLIENT,attributes:a},i?la.trace.setSpan(la.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?la.context.with((0,Zgt.suppressTracing)(la.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 tht=exe();Object.defineProperty(kQ,"MongooseInstrumentation",{enumerable:!0,get:function(){return tht.MongooseInstrumentation}})});var nxe,rxe,oxe,nht,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")}})),nht=()=>({name:rxe,setupOnce(){oxe()}}),ixe=nht});var sxe=Q(Hi=>{"use strict";A();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Hi.DB_SYSTEM_VALUE_MYSQL=Hi.ATTR_NET_PEER_PORT=Hi.ATTR_NET_PEER_NAME=Hi.ATTR_DB_USER=Hi.ATTR_DB_SYSTEM=Hi.ATTR_DB_STATEMENT=Hi.ATTR_DB_NAME=Hi.ATTR_DB_CONNECTION_STRING=void 0;Hi.ATTR_DB_CONNECTION_STRING="db.connection_string";Hi.ATTR_DB_NAME="db.name";Hi.ATTR_DB_STATEMENT="db.statement";Hi.ATTR_DB_SYSTEM="db.system";Hi.ATTR_DB_USER="db.user";Hi.ATTR_NET_PEER_NAME="net.peer.name";Hi.ATTR_NET_PEER_PORT="net.peer.port";Hi.DB_SYSTEM_VALUE_MYSQL="mysql";Hi.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 rht;(function(e){e.MYSQL_VALUES="db.mysql.values"})(rht=JB.AttributeNames||(JB.AttributeNames={}))});var cxe=Q(Fs=>{"use strict";A();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.getPoolNameOld=Fs.arrayStringifyHelper=Fs.getSpanName=Fs.getDbValues=Fs.getDbQueryText=Fs.getJDBCString=Fs.getConfig=void 0;function oht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Fs.getConfig=oht;function iht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Fs.getJDBCString=iht;function aht(e){return typeof e=="string"?e:e.sql}Fs.getDbQueryText=aht;function sht(e,t){return N7(typeof e=="string"?t:t||e.values)}Fs.getDbValues=sht;function uht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Fs.getSpanName=uht;function N7(e){return e?`[${e.toString()}]`:""}Fs.arrayStringifyHelper=N7;function cht(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()}Fs.getPoolNameOld=cht});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)),Km=sxe(),lht=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(Km.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:S}=(0,vS.getConfig)(t.config),y=parseInt(m,10),C=(0,vS.getDbQueryText)(o);r._dbSemconvStability&Dd.SemconvStability.OLD&&(c[Km.ATTR_DB_SYSTEM]=Km.DB_SYSTEM_VALUE_MYSQL,c[Km.ATTR_DB_CONNECTION_STRING]=(0,vS.getJDBCString)(d,m,h),c[Km.ATTR_DB_NAME]=h,c[Km.ATTR_DB_USER]=S,c[Km.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[Km.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[Km.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&Dd.SemconvStability.STABLE&&(c[Pb.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Pb.ATTR_SERVER_PORT]=y));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(lht.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 dht=pxe();Object.defineProperty(LQ,"MySQLInstrumentation",{enumerable:!0,get:function(){return dht.MySQLInstrumentation}})});var Axe,mxe,gxe,pht,hxe,_xe=O(()=>{A();Axe=ie(fxe(),1);fr();mxe="Mysql",gxe=it(mxe,()=>new Axe.MySQLInstrumentation({})),pht=()=>({name:mxe,setupOnce(){gxe()}}),hxe=pht});var w7=Q(Pa=>{"use strict";A();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.DB_SYSTEM_VALUE_MYSQL=Pa.ATTR_NET_PEER_PORT=Pa.ATTR_NET_PEER_NAME=Pa.ATTR_DB_USER=Pa.ATTR_DB_SYSTEM=Pa.ATTR_DB_STATEMENT=Pa.ATTR_DB_NAME=Pa.ATTR_DB_CONNECTION_STRING=void 0;Pa.ATTR_DB_CONNECTION_STRING="db.connection_string";Pa.ATTR_DB_NAME="db.name";Pa.ATTR_DB_STATEMENT="db.statement";Pa.ATTR_DB_SYSTEM="db.system";Pa.ATTR_DB_USER="db.user";Pa.ATTR_NET_PEER_NAME="net.peer.name";Pa.ATTR_NET_PEER_PORT="net.peer.port";Pa.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)),fht=_r();function Aht(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function mht(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function ght(e,t){if(typeof t!="string"||t.length===0||Aht(t))return t;let n=new fht.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=mht(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}QQ.addSqlCommenterComment=ght});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 hht(e,t,n){let{host:r,port:o,database:i,user:a}=_ht(e),c={};t&FQ.SemconvStability.OLD&&(c[ZB.ATTR_DB_CONNECTION_STRING]=Eht(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=hht;function _ht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function Eht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Sht(e,t,n,r=!1,o=yht){let[i,a]=typeof e=="string"?[e,n]:[e.sql,Tht(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=Sht;function yht(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function Tht(e){return"values"in e}function Iht(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=Iht;var Cht=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};xd.once=Cht;function bht(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}xd.getConnectionPrototypeToInstrument=bht});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:S}=o.getConfig(),y=(0,Ub.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Ub.getQueryText)(i,t,d,m,h);o._dbSemconvStability&jp.SemconvStability.OLD&&(y[U7.ATTR_DB_SYSTEM]=U7.DB_SYSTEM_VALUE_MYSQL,y[U7.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&jp.SemconvStability.STABLE&&(y[L7.ATTR_DB_SYSTEM_NAME]=L7.DB_SYSTEM_NAME_VALUE_MYSQL,y[L7.ATTR_DB_QUERY_TEXT]=C);let R=o.tracer.startSpan((0,Ub.getSpanName)(i),{kind:yxe.SpanKind.CLIENT,attributes:y});!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 S=="function"&&(0,jp.safeExecuteInTheMiddle)(()=>{S(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 vht=Cxe();Object.defineProperty(jQ,"MySQL2Instrumentation",{enumerable:!0,get:function(){return vht.MySQL2Instrumentation}})});var vxe,Rxe,Dxe,Rht,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")}})),Rht=()=>({name:Rxe,setupOnce(){Dxe()}}),xxe=Rht});var Nxe=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 Oxe=Q(HQ=>{"use strict";A();Object.defineProperty(HQ,"__esModule",{value:!0});HQ.endSpan=void 0;var Dht=(Le(),we(Je)),xht=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:Dht.SpanStatusCode.ERROR,message:t.message})),e.end()};HQ.endSpan=xht});var $Q=Q(zQ=>{"use strict";A();Object.defineProperty(zQ,"__esModule",{value:!0});zQ.defaultDbStatementSerializer=void 0;var Bht=[{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}],Nht=(e,t)=>{if(Array.isArray(t)&&t.length){let n=Bht.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=Nht});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(),Oht=$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||Oht.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,S=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]=S,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]=S),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 y=r.tracer.startSpan(o.name,{kind:f_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,Mxe.safeExecuteInTheMiddle)(()=>C(y,{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?.(y,o.name,o.args,M),F=>{F&&f_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,WB.endSpan)(y,null),B(M)};let N=o.reject;return o.reject=function(M){(0,WB.endSpan)(y,M),N(M)},R}catch(R){throw(0,WB.endSpan)(y,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 wht=Uxe();Object.defineProperty(qQ,"IORedisInstrumentation",{enumerable:!0,get:function(){return wht.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)),Mht=(e,t)=>{t&&e.setStatus({code:XB.SpanStatusCode.ERROR,message:t.message}),e.end()};m_.endSpan=Mht;var Pht=e=>function(){let n=e.apply(this,arguments);return XB.context.bind(XB.context.active(),n)};m_.getTracedCreateClient=Pht;var kht=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=kht});var KQ=Q(js=>{"use strict";A();Object.defineProperty(js,"__esModule",{value:!0});js.DB_SYSTEM_VALUE_REDIS=js.DB_SYSTEM_NAME_VALUE_REDIS=js.ATTR_NET_PEER_PORT=js.ATTR_NET_PEER_NAME=js.ATTR_DB_SYSTEM=js.ATTR_DB_STATEMENT=js.ATTR_DB_CONNECTION_STRING=void 0;js.ATTR_DB_CONNECTION_STRING="db.connection_string";js.ATTR_DB_STATEMENT="db.statement";js.ATTR_DB_SYSTEM="db.system";js.ATTR_NET_PEER_NAME="net.peer.name";js.ATTR_NET_PEER_PORT="net.peer.port";js.DB_SYSTEM_NAME_VALUE_REDIS="redis";js.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(),Uht=$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||Uht.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 y={};t._semconvStability&_l.SemconvStability.OLD&&Object.assign(y,{[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(y,{[tN.ATTR_SERVER_ADDRESS]:this.connection_options.host,[tN.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&_l.SemconvStability.OLD&&h.setAttribute(RS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=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(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,JQ.endSpan)(h,y),y}}}}_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 Lht(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]:Qht(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=Lht;function Qht(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(),Fht=$Q(),$xe=YQ(),z7=($n(),we(Nr)),Ght=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||Fht.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[Ght.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 S=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:Bd.SpanKind.CLIENT,attributes:h}),y=Bd.context.with(Bd.trace.setSpan(Bd.context.active(),S),()=>t.apply(n,r));if(typeof y?.then=="function")y.then(C=>{this._endSpanWithResponse(S,c,d,C,void 0)},C=>{this._endSpanWithResponse(S,c,d,null,C)});else{let C=y;C[nN]=C[nN]||[],C[nN].push({span:S,commandName:c,commandArgs:d})}return y}_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],[S,y]=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,S,y)}}_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 jht=Xt(),Yxe=YQ(),Hht=Gxe(),zht=qxe(),Kxe={requireParentSpan:!1},V7=class extends jht.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 Hht.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new zht.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 $ht=Jxe();Object.defineProperty(t4,"RedisInstrumentation",{enumerable:!0,get:function(){return $ht.RedisInstrumentation}})});function rN(e,t){return e.includes(t.toLowerCase())}function Y7(e){return rN(q7,e)?"cache.get":rN(qht,e)?"cache.put":void 0}function Yht(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(Vht,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(Yht(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 Vht,q7,qht,n1e=O(()=>{A();Vht=["get","set","setex"],q7=["get","mget"],qht=["set","setex"]});var r1e,o1e,n4,oN,i1e,Kht,Jht,a1e,Zht,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)},Kht=it(`${n4}.IORedis`,()=>new r1e.IORedisInstrumentation({responseHook:i1e})),Jht=it(`${n4}.Redis`,()=>new o1e.RedisInstrumentation({responseHook:i1e})),a1e=Object.assign(()=>{Kht(),Jht()},{id:n4}),Zht=(e={})=>({name:n4,setupOnce(){oN=e,a1e()}}),s1e=Zht});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 Wht;(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"})(Wht=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 Xht;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Xht=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 e_t(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=e_t;function t_t(e){return e.requireParentSpan===!0&&g_.trace.getSpan(g_.context.active())===void 0}Xn.shouldSkipInstrumentation=t_t;function n_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=n_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 r_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=r_t;function o_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=o_t;function i_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=i_t;function a_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=a_t;function s_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=s_t;function u_t(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}Xn.getErrorMessage=u_t;function c_t(e){return typeof e=="object"&&typeof e?.text=="string"}Xn.isObjectWithTextString=c_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 vu=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 vu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(S1e.PACKAGE_NAME,S1e.PACKAGE_VERSION,t),this._semconvStability=(0,vu.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 vu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new vu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new vu.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 vu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=jb(c);return(0,vu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=jb(c);(0,vu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=jb(t);return(0,vu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,vu.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,vu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,vu.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&vu.SemconvStability.OLD&&o.push(sN.ATTR_DB_SYSTEM),this._semconvStability&vu.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 S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Fo.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,m);if(y.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(y,C,o[o.length-1],h,S),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,S);N&&(M=Mr.context.bind(Mr.context.active(),M)),o[0].callback=M}}let{requestHook:R}=y;typeof R=="function"&&m&&(0,vu.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),S(),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}),S(),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 l_t=I1e();Object.defineProperty(Hb,"PgInstrumentation",{enumerable:!0,get:function(){return l_t.PgInstrumentation}});var d_t=K7();Object.defineProperty(Hb,"AttributeNames",{enumerable:!0,get:function(){return d_t.AttributeNames}})});var b1e,v1e,R1e,p_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})),p_t=e=>({name:v1e,setupOnce(){R1e(e)}}),D1e=p_t});var h_,tY,B1e,f_t,A_t,N1e,eY,m_t,O1e,w1e=O(()=>{A();Le();h_=ie(Xt(),1);$n();dt();fr();_S();tY="PostgresJs",B1e=[">=3.0.0 <4"],f_t=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,A_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 ua&&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 ua&&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 ua&&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(f_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[A_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 Na({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),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),ua&&Z.error(`Error in requestHook for ${tY} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,C,R)=>{try{n._setOperationName(c,a,R?.[0]?.command),c.end()}catch(B){ua&&Z.error("Error ending span in resolve callback:",B)}return Reflect.apply(y,C,R)}});let S=this.reject;this.reject=new Proxy(S,{apply:(y,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){ua&&Z.error("Error ending span in reject callback:",B)}return Reflect.apply(y,C,R)}});try{return r.apply(this,o)}catch(y){throw c.setStatus({code:2,message:y instanceof Error?y.message:"unknown_error"}),c.end(),y}})},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}},m_t=e=>({name:tY,setupOnce(){N1e(e)}}),O1e=m_t});var M1e=Q(uN=>{"use strict";A();Object.defineProperty(uN,"__esModule",{value:!0});uN.SeverityNumber=void 0;var g_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"})(g_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 h_t=l4(),d4=class{getLogger(t,n,r){return new h_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 __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):__t.NOOP_LOGGER}};f4.ProxyLogger=nY});var iY=Q(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.ProxyLoggerProvider=void 0;var E_t=p4(),S_t=rY(),oY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new S_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:E_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 y_t=P1e();Object.defineProperty(g4,"_globalThis",{enumerable:!0,get:function(){return y_t._globalThis}})});var U1e=Q(h4=>{"use strict";A();Object.defineProperty(h4,"__esModule",{value:!0});h4._globalThis=void 0;var T_t=k1e();Object.defineProperty(h4,"_globalThis",{enumerable:!0,get:function(){return T_t._globalThis}})});var L1e=Q(lA=>{"use strict";A();Object.defineProperty(lA,"__esModule",{value:!0});lA.API_BACKWARDS_COMPATIBILITY_VERSION=lA.makeGetter=lA._global=lA.GLOBAL_LOGS_API_KEY=void 0;var I_t=U1e();lA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");lA._global=I_t._globalThis;function C_t(e,t,n){return r=>r===e?t:n}lA.makeGetter=C_t;lA.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(),b_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,b_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(ka=>{"use strict";A();Object.defineProperty(ka,"__esModule",{value:!0});ka.logs=ka.ProxyLoggerProvider=ka.ProxyLogger=ka.NoopLoggerProvider=ka.NOOP_LOGGER_PROVIDER=ka.NoopLogger=ka.NOOP_LOGGER=ka.SeverityNumber=void 0;var v_t=M1e();Object.defineProperty(ka,"SeverityNumber",{enumerable:!0,get:function(){return v_t.SeverityNumber}});var G1e=l4();Object.defineProperty(ka,"NOOP_LOGGER",{enumerable:!0,get:function(){return G1e.NOOP_LOGGER}});Object.defineProperty(ka,"NoopLogger",{enumerable:!0,get:function(){return G1e.NoopLogger}});var j1e=p4();Object.defineProperty(ka,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return j1e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ka,"NoopLoggerProvider",{enumerable:!0,get:function(){return j1e.NoopLoggerProvider}});var R_t=rY();Object.defineProperty(ka,"ProxyLogger",{enumerable:!0,get:function(){return R_t.ProxyLogger}});var D_t=iY();Object.defineProperty(ka,"ProxyLoggerProvider",{enumerable:!0,get:function(){return D_t.ProxyLoggerProvider}});var x_t=F1e();ka.logs=x_t.LogsAPI.getInstance()});var H1e=Q(Vb=>{"use strict";A();Object.defineProperty(Vb,"__esModule",{value:!0});Vb.disableInstrumentations=Vb.enableInstrumentations=void 0;function B_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=B_t;function N_t(e){e.forEach(t=>t.disable())}Vb.disableInstrumentations=N_t});var V1e=Q(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.registerInstrumentations=void 0;var z1e=(Le(),we(Je)),O_t=sY(),$1e=H1e();function w_t(e){let t=e.tracerProvider||z1e.trace.getTracerProvider(),n=e.meterProvider||z1e.metrics.getMeterProvider(),r=e.loggerProvider||O_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,$1e.enableInstrumentations)(o,t,n,r),()=>{(0,$1e.disableInstrumentations)(o)}}E4.registerInstrumentations=w_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-]+)*))?$/,M_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-]+)*))?$/,P_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function k_t(e,t,n){if(!U_t(e))return dY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=G_t(e);if(!r)return!1;let o=[],i=W1e(r,t,o,n);return i&&!n?.includePrerelease?Q_t(r,o):i}S4.satisfies=k_t;function U_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=uEt(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=F_t(t,r),t.includes(" "))return W1e(e,t,n,r);{let o=j_t(t);return n.push(o),L_t(e,o)}}function L_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 P_t[t.op]?.includes(n)}function Q_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function F_t(e,t){return e=e.trim(),e=aEt(e,t),e=iEt(e),e=sEt(e,t),e=e.trim(),e}function Ru(e){return!e||e.toLowerCase()==="x"||e==="*"}function G_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 j_t(e){if(!e)return{};let t=e.match(M_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 H_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 z_t(e,t){if(lY(e)||lY(t))return 0;let[n,r]=H_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=z_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*",$_t=`\\d*[a-zA-Z-]${X1e}*`,V_t="((?:<|>)?=?)",K1e=`(?:${eBe}|${$_t})`,q_t=`(?:-(${K1e}(?:\\.${K1e})*))`,J1e=`${X1e}+`,Y_t=`(?:\\+(${J1e}(?:\\.${J1e})*))`,cY=`${eBe}|x|X|\\*`,cN=`[v=\\s]*(${cY})(?:\\.(${cY})(?:\\.(${cY})(?:${q_t})?${Y_t}?)?)?`,K_t=`^${V_t}\\s*${cN}$`,J_t=new RegExp(K_t),Z_t=`^\\s*(${cN})\\s+-\\s+(${cN})\\s*$`,W_t=new RegExp(Z_t),X_t="(?:~>?)",eEt=`^${X_t}${cN}$`,tEt=new RegExp(eEt),nEt="(?:\\^)",rEt=`^${nEt}${cN}$`,oEt=new RegExp(rEt);function iEt(e){let t=tEt;return e.replace(t,(n,r,o,i,a)=>{let c;return Ru(r)?c="":Ru(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Ru(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 aEt(e,t){let n=oEt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Ru(i)?m="":Ru(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Ru(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 sEt(e,t){let n=J_t;return e.replace(n,(r,o,i,a,c,d)=>{let m=Ru(i),h=m||Ru(a),S=h||Ru(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function uEt(e,t){let n=W_t;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,R)=>(Ru(i)?o="":Ru(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Ru(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Ru(S)?h="":Ru(y)?h=`<${+S+1}.0.0-0`:Ru(C)?h=`<${S}.${+y+1}.0-0`:R?h=`<=${S}.${y}.${C}-${R}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var pY=Q(ds=>{"use strict";A();Object.defineProperty(ds,"__esModule",{value:!0});ds.massUnwrap=ds.unwrap=ds.massWrap=ds.wrap=void 0;var Du=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 cEt=(e,t,n)=>{if(!e||!e[t]){Du("no original function "+String(t)+" to wrap");return}if(!n){Du("no wrapper function"),Du(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Du("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};ds.wrap=cEt;var lEt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ds.wrap)(r,o,n)})})};ds.massWrap=lEt;var dEt=(e,t)=>{if(!e||!e[t]){Du("no function to unwrap."),Du(new Error().stack);return}let n=e[t];if(!n.__unwrap)Du("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ds.unwrap=dEt;var pEt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ds.unwrap)(n,r)})})};ds.massUnwrap=pEt;function dN(e){e&&e.logger&&(typeof e.logger!="function"?Du("new logger isn't a function, not replacing"):Du=e.logger)}ds.default=dN;dN.wrap=ds.wrap;dN.massWrap=ds.massWrap;dN.unwrap=ds.unwrap;dN.massUnwrap=ds.massUnwrap});var nBe=Q(T4=>{"use strict";A();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationAbstract=void 0;var fY=(Le(),we(Je)),fEt=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=fEt.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 AEt=z0(),oBe=Ue("path"),gY=rBe(),mEt=["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 AEt.Hook(null,{internals:!0},(t,n,r)=>{let o=gEt(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 mEt?new e:this._instance=this._instance??new e}};C4.RequireInTheMiddleSingleton=hY;function gEt(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 hEt(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=hEt;async function _Et(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=_Et;function EEt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}E_.isWrapped=EEt});var uBe=Q(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.InstrumentationBase=void 0;var pN=Ue("path"),aBe=Ue("util"),SEt=tBe(),EY=pY(),yEt=nBe(),TEt=iBe(),IEt=Xq(),fN=(Le(),we(Je)),CEt=z0(),bEt=Ue("fs"),vEt=_Y(),SY=class extends yEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=TEt.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,vEt.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,bEt.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 CEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new IEt.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,SEt.satisfies)(t,r,{includePrerelease:n}))}});var cBe=Q(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.normalize=void 0;var REt=Ue("path");Object.defineProperty(v4,"normalize",{enumerable:!0,get:function(){return REt.normalize}})});var lBe=Q(qb=>{"use strict";A();Object.defineProperty(qb,"__esModule",{value:!0});qb.normalize=qb.InstrumentationBase=void 0;var DEt=uBe();Object.defineProperty(qb,"InstrumentationBase",{enumerable:!0,get:function(){return DEt.InstrumentationBase}});var xEt=cBe();Object.defineProperty(qb,"normalize",{enumerable:!0,get:function(){return xEt.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 BEt=yY(),IY=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,BEt.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 NEt(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=NEt});var gBe=Q(zi=>{"use strict";A();Object.defineProperty(zi,"__esModule",{value:!0});zi.semconvStabilityFromStr=zi.SemconvStability=zi.safeExecuteInTheMiddleAsync=zi.safeExecuteInTheMiddle=zi.isWrapped=zi.InstrumentationNodeModuleFile=zi.InstrumentationNodeModuleDefinition=zi.InstrumentationBase=zi.registerInstrumentations=void 0;var OEt=V1e();Object.defineProperty(zi,"registerInstrumentations",{enumerable:!0,get:function(){return OEt.registerInstrumentations}});var wEt=yY();Object.defineProperty(zi,"InstrumentationBase",{enumerable:!0,get:function(){return wEt.InstrumentationBase}});var MEt=pBe();Object.defineProperty(zi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return MEt.InstrumentationNodeModuleDefinition}});var PEt=fBe();Object.defineProperty(zi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return PEt.InstrumentationNodeModuleFile}});var CY=_Y();Object.defineProperty(zi,"isWrapped",{enumerable:!0,get:function(){return CY.isWrapped}});Object.defineProperty(zi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddle}});Object.defineProperty(zi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddleAsync}});var mBe=ABe();Object.defineProperty(zi,"SemconvStability",{enumerable:!0,get:function(){return mBe.SemconvStability}});Object.defineProperty(zi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return mBe.semconvStabilityFromStr}})});function LEt(){let e=Kb[vY];return e?.helper?e.helper:Kb[bY]?.helper}function QEt(e){let t={helper:e};Kb[vY]=t,Kb[bY]=t}function FEt(){delete Kb[vY],delete Kb[bY]}function HEt(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:HEt(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 $Et(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function $Et(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,kEt,UEt,bY,vY,Kb,GEt,jEt,zEt,yBe,_Be,VEt,qEt,TBe,IBe=O(()=>{A();Le();B4=ie(gBe(),1);Le();kEt={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"}},UEt=kEt.version.split(".")[0],bY="PRISMA_INSTRUMENTATION",vY=`V${UEt}_PRISMA_INSTRUMENTATION`,Kb=globalThis;GEt=process.env.PRISMA_SHOW_ALL_TRACES==="true",jEt="00-10-10-00";zEt=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}`:jEt}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&&!GEt)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,VEt=yBe.name,qEt="@prisma/client",TBe=class extends B4.InstrumentationBase{tracerProvider;constructor(e={}){super(VEt,_Be,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new B4.InstrumentationNodeModuleDefinition(qEt,[_Be])]}enable(){let e=this._config;QEt(new zEt({tracerProvider:this.tracerProvider??Ft.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){FEt()}isEnabled(){return LEt()!==void 0}}});function YEt(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 KEt(e){switch(e){case"client":return Wr.CLIENT;case"internal":default:return Wr.INTERNAL}}var CBe,RY,JEt,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();YEt(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=KEt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:xs.SAMPLED}})),S=Ft.setSpanContext(qe.active(),{traceId:m,spanId:c,traceFlags:xs.SAMPLED});qe.with(S,()=>{let y={generateTraceId:()=>m,generateSpanId:()=>d};r._idGenerator=y,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}})}};JEt=it(CBe,e=>new RY(e)),vBe=e=>({name:CBe,setupOnce(){JEt(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(dA=>{"use strict";A();Object.defineProperty(dA,"__esModule",{value:!0});dA.HapiLifecycleMethodNames=dA.HapiLayerType=dA.handlerPatched=dA.HapiComponentName=void 0;dA.HapiComponentName="@hapi/hapi";dA.handlerPatched=Symbol("hapi-handler-patched");dA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};dA.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 ZEt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(ZEt=AN.AttributeNames||(AN.AttributeNames={}))});var OBe=Q($i=>{"use strict";A();Object.defineProperty($i,"__esModule",{value:!0});$i.getPluginFromInput=$i.getExtMetadata=$i.getRouteMetadata=$i.isPatchableExtMethod=$i.isDirectExtInput=$i.isLifecycleExtEventObj=$i.isLifecycleExtType=$i.getPluginName=void 0;var BBe=($n(),we(Nr)),WEt=xBe(),mN=DY(),S_=xY(),NBe=Xt();function XEt(e){return e.name?e.name:e.pkg.name}$i.getPluginName=XEt;var e0t=e=>typeof e=="string"&&mN.HapiLifecycleMethodNames.has(e);$i.isLifecycleExtType=e0t;var t0t=e=>{let t=e?.type;return t!==void 0&&(0,$i.isLifecycleExtType)(t)};$i.isLifecycleExtEventObj=t0t;var n0t=e=>Array.isArray(e)&&e.length<=3&&(0,$i.isLifecycleExtType)(e[0])&&typeof e[1]=="function";$i.isDirectExtInput=n0t;var r0t=e=>!Array.isArray(e);$i.isPatchableExtMethod=r0t;var o0t=(e,t,n)=>{let r={[BBe.ATTR_HTTP_ROUTE]:e.path};t&NBe.SemconvStability.OLD&&(r[WEt.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}};$i.getRouteMetadata=o0t;var i0t=(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}};$i.getExtMetadata=i0t;var a0t=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;$i.getPluginFromInput=a0t});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(),Jm=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,Jm.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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 s0t=PBe();Object.defineProperty(Zb,"HapiInstrumentation",{enumerable:!0,get:function(){return s0t.HapiInstrumentation}});var u0t=xY();Object.defineProperty(Zb,"AttributeNames",{enumerable:!0,get:function(){return u0t.AttributeNames}})});var UBe,LBe,QBe,c0t,FBe,GBe=O(()=>{A();UBe=ie(kBe(),1);fr();LBe="Hapi",QBe=it(LBe,()=>new UBe.HapiInstrumentation),c0t=()=>({name:LBe,setupOnce(){QBe()}}),FBe=c0t});var y_,_N,NY=O(()=>{A();y_={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},_N={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var M4,l0t,d0t,w4,jBe=O(()=>{A();Le();M4=ie(Xt(),1);dt();NY();l0t="@sentry/instrumentation-hono",d0t="0.0.1",w4=class extends M4.InstrumentationBase{constructor(t={}){super(l0t,d0t,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(rs(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 rs(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 p0t(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()){ua&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[bm],i=t[Q0];typeof o=="string"&&typeof i=="string"&&wn().setTransactionName(`${i} ${o}`)}var HBe,zBe,f0t,$Be,VBe=O(()=>{A();$n();dt();fr();_S();NY();jBe();HBe="Hono";zBe=it(HBe,()=>new w4({responseHook:e=>{p0t(e)}})),f0t=()=>({name:HBe,setupOnce(){zBe()}}),$Be=f0t});var P4=Q(EN=>{"use strict";A();Object.defineProperty(EN,"__esModule",{value:!0});EN.KoaLayerType=void 0;var A0t;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(A0t=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 m0t;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(m0t=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(),g0t=($n(),we(Nr)),h0t=(e,t,n,r)=>n?{attributes:{[k4.AttributeNames.KOA_NAME]:r?.toString(),[k4.AttributeNames.KOA_TYPE]:YBe.KoaLayerType.ROUTER,[g0t.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=h0t;var _0t=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Xb.isLayerIgnored=_0t});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 pA=(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){pA.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"?(pA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[tNe.kLayerPatched]=!0,pA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(pA.trace.getSpan(pA.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)(pA.context.active());h?.type===eNe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,yN.safeExecuteInTheMiddle)(()=>S(m,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&pA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=pA.trace.setSpan(pA.context.active(),m);return pA.context.with(y,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 E0t=nNe();Object.defineProperty(T_,"KoaInstrumentation",{enumerable:!0,get:function(){return E0t.KoaInstrumentation}});var S0t=OY();Object.defineProperty(T_,"AttributeNames",{enumerable:!0,get:function(){return S0t.AttributeNames}});var y0t=P4();Object.defineProperty(T_,"KoaLayerType",{enumerable:!0,get:function(){return y0t.KoaLayerType}})});var oNe,iNe,aNe,T0t,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()){ua&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[bm],c=n.context?.request?.method?.toUpperCase()||"GET";a&&wn().setTransactionName(`${c} ${a}`)}})),T0t=(e={})=>({name:iNe,setupOnce(){aNe(e)}}),sNe=T0t});var MY=Q(zp=>{"use strict";A();Object.defineProperty(zp,"__esModule",{value:!0});zp.ConnectNames=zp.ConnectTypes=zp.AttributeNames=void 0;var I0t;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(I0t=zp.AttributeNames||(zp.AttributeNames={}));var C0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(C0t=zp.ConnectTypes||(zp.ConnectTypes={}));var b0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(b0t=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 v0t=(Le(),we(Je)),I_=lNe(),R0t=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():v0t.diag.warn("Connect: Trying to pop the stack multiple time")}};C_.addNewStackLayer=R0t;var D0t=(e,t)=>{t&&e[I_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};C_.replaceCurrentStackRoute=D0t;var x0t=e=>e[I_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);C_.generateRoute=x0t});var ANe=Q(b_=>{"use strict";A();Object.defineProperty(b_,"__esModule",{value:!0});b_.ConnectInstrumentation=b_.ANONYMOUS_NAME=void 0;var B0t=(Le(),we(Je)),pNe=_r(),tv=MY(),fNe=cNe(),F4=Xt(),N0t=($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:{[N0t.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],S=arguments[d];(0,PY.replaceCurrentStackRoute)(m,t);let y=(0,pNe.getRPCMetadata)(B0t.context.active());t&&y?.type===pNe.RPCType.HTTP&&(y.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(S,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,O0t,SNe,yNe=O(()=>{A();hNe=ie(gNe(),1);fr();_Ne="Connect",ENe=it(_Ne,()=>new hNe.ConnectInstrumentation),O0t=()=>({name:_Ne,setupOnce(){ENe()}}),SNe=O0t});var TNe=Q(Ua=>{"use strict";A();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.DB_SYSTEM_VALUE_MSSQL=Ua.ATTR_NET_PEER_PORT=Ua.ATTR_NET_PEER_NAME=Ua.ATTR_DB_USER=Ua.ATTR_DB_SYSTEM=Ua.ATTR_DB_STATEMENT=Ua.ATTR_DB_SQL_TABLE=Ua.ATTR_DB_NAME=void 0;Ua.ATTR_DB_NAME="db.name";Ua.ATTR_DB_SQL_TABLE="db.sql.table";Ua.ATTR_DB_STATEMENT="db.statement";Ua.ATTR_DB_SYSTEM="db.system";Ua.ATTR_DB_USER="db.user";Ua.ATTR_NET_PEER_NAME="net.peer.name";Ua.ATTR_NET_PEER_PORT="net.peer.port";Ua.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 w0t(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=w0t;var M0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};nv.once=M0t});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)),P0t=Ue("events"),fA=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 fA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(vNe.PACKAGE_NAME,vNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,fA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,fA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new fA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of RNe)(0,fA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,fA.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 P0t.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++,S=this[DNe],y=(j=>j.sqlTextOrProcedure==="sp_prepare"&&j.parametersByName?.stmt?.value?j.parametersByName.stmt.value:j.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&fA.SemconvStability.OLD&&(C[v_.ATTR_DB_SYSTEM]=v_.DB_SYSTEM_VALUE_MSSQL,C[v_.ATTR_DB_NAME]=S,C[v_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[v_.ATTR_DB_STATEMENT]=y,C[v_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&fA.SemconvStability.STABLE&&(C[BS.ATTR_DB_NAMESPACE]=S,C[BS.ATTR_DB_SYSTEM_NAME]=BS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[BS.ATTR_DB_QUERY_TEXT]=y,C[BS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&fA.SemconvStability.OLD&&(C[v_.ATTR_NET_PEER_NAME]=this.config?.server,C[v_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&fA.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,S,y,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 k0t=xNe();Object.defineProperty(j4,"TediousInstrumentation",{enumerable:!0,get:function(){return k0t.TediousInstrumentation}})});var NNe,U0t,ONe,wNe,L0t,MNe,PNe=O(()=>{A();NNe=ie(BNe(),1);dt();fr();U0t=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),ONe="Tedious",wNe=it(ONe,()=>new NNe.TediousInstrumentation({})),L0t=()=>{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]||"";U0t.has(i)&&n.setAttribute(Nt,"auto.db.otel.tedious")}))}}},MNe=L0t});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 Q0t=LNe();Object.defineProperty(z4,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return Q0t.GenericPoolInstrumentation}})});var FNe,GNe,jNe,F0t,HNe,zNe=O(()=>{A();FNe=ie(QNe(),1);dt();fr();GNe="GenericPool",jNe=it(GNe,()=>new FNe.GenericPoolInstrumentation({})),F0t=()=>{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=F0t});var GY=Q(AA=>{"use strict";A();Object.defineProperty(AA,"__esModule",{value:!0});AA.ATTR_NET_PEER_PORT=AA.ATTR_NET_PEER_NAME=AA.ATTR_MESSAGING_SYSTEM=AA.ATTR_MESSAGING_OPERATION=void 0;AA.ATTR_MESSAGING_OPERATION="messaging.operation";AA.ATTR_MESSAGING_SYSTEM="messaging.system";AA.ATTR_NET_PEER_NAME="net.peer.name";AA.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 G0t;(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"})(G0t=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"),j0t=e=>e!==""?e:"<default>";ii.normalizeExchange=j0t;var H0t=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",mA=(e,t,n,r)=>n?{[t]:n}:(zY.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),z0t=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[TN.ATTR_MESSAGING_SYSTEM]:t}:{}};ii.getConnectionAttributesFromServer=z0t;var $0t=(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,{...mA(e,V4.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=qNe(r?.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...mA(e,TN.ATTR_NET_PEER_NAME,i,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...mA(e,$4.ATTR_SERVER_ADDRESS,i,"hostname")});let a=$Ne(r.port,o);t&D_.SemconvStability.OLD&&Object.assign(n,mA(e,TN.ATTR_NET_PEER_PORT,a,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,mA(e,$4.ATTR_SERVER_PORT,a,"port"))}else{let r=H0t(e);n[V4.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=VNe(o.protocol);Object.assign(n,{...mA(r,V4.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=qNe(o.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...mA(r,TN.ATTR_NET_PEER_NAME,a,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...mA(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,mA(r,TN.ATTR_NET_PEER_PORT,c,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,mA(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=$0t;var V0t=e=>e.setValue($Y,!0);ii.markConfirmChannelTracing=V0t;var q0t=e=>e.deleteValue($Y);ii.unmarkConfirmChannelTracing=q0t;var Y0t=e=>e.getValue($Y)===!0;ii.isConfirmChannelTracing=Y0t});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(),K0t=GY(),Sl=jY(),xu=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,{...xu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Er.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xu.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,xu.EndOperation.Ack)),(0,Er.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,xu.EndOperation.Nack)),(0,Er.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,xu.EndOperation.Reject)),(0,Er.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,xu.EndOperation.AckAll)),(0,Er.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,xu.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,xu.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,xu.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===xu.EndOperation.Reject?c:d,S=m[ai.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==xu.EndOperation.Reject&&c){for(let C=0;C<=y;C++)o.endConsumerSpan(S[C].msg,t,n,h);S.splice(0,y+1)}else o.endConsumerSpan(a,t,n,h),S.splice(y,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 S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[ai.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[ai.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Go.propagation.extract(Go.ROOT_CONTEXT,S),C=h.fields?.exchange,R;if(r._config.useLinksForConsume){let F=y?Go.trace.getSpan(y)?.spanContext():void 0;y=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,[K0t.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},y),{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=y||Go.ROOT_CONTEXT;Go.context.with(Go.trace.setSpan(M,B),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(B,h,!1,xu.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:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Er.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,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(S,{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&&S.setStatus({code:Go.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},B=(0,ai.markConfirmChannelTracing)(Go.context.active()),N=[...arguments];return N[3]=y,N[4]=Go.context.bind((0,ai.unmarkConfirmChannelTracing)(Go.trace.setSpan(B,S)),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:S}=r.createPublishSpan(r,i,a,m,d),{publishHook:y}=r.getConfig();y&&(0,Er.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),B=>{B&&Go.diag.error("amqplib instrumentation: publishHook error",B)},!0);let C=[...arguments];C[3]=S;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!==xu.EndOperation.ChannelClosed&&r!==xu.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,xu.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 J0t=ZNe();Object.defineProperty(x_,"AmqplibInstrumentation",{enumerable:!0,get:function(){return J0t.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,Z0t,nOe,W0t,rOe,oOe=O(()=>{A();eOe=ie(XNe(),1);fr();tOe="Amqplib",Z0t={consumeEndHook:e=>{Or(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Or(e,"auto.amqplib.otel.publisher")}},nOe=it(tOe,()=>new eOe.AmqplibInstrumentation(Z0t)),W0t=()=>({name:tOe,setupOnce(){nOe()}}),rOe=W0t});var IN,qY=O(()=>{A();IN="VercelAI"});function eSt(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 tSt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(nSt(t.content),rSt(t.content))}function nSt(e){for(let t of e){if(!eSt(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 rSt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&k9(t.toolCallId)}function oSt(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,X0t,iOe,J4,aOe=O(()=>{A();Z4=ie(Xt(),1);dt();qY();X0t=[">=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",X0t,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),S=h?.options,y=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:R}=oSt(S,c,d,y);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"&&Ui(B,"_sentry_active_span",Ed())},()=>{},B=>{tSt(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 iSt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var sOe,aSt,uOe,cOe=O(()=>{A();dt();fr();qY();aOe();sOe=it(IN,()=>new J4({}));aSt=(e={})=>{let t;return{name:IN,options:e,setupOnce(){t=sOe()},afterAllSetup(n){e.force??iSt(n)?rU(n):t?.callWhenPatched(()=>rU(n))}}},uOe=aSt});var X4,sSt,W4,lOe=O(()=>{A();X4=ie(Xt(),1);dt();sSt=[">=4.0.0 <7"],W4=class extends X4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Vn,t)}init(){return new X4.InstrumentationNodeModuleDefinition("openai",sSt,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,uSt,pOe,fOe=O(()=>{A();dt();fr();lOe();dOe=it(Xh,e=>new W4(e)),uSt=(e={})=>({name:Xh,setupOnce(){dOe(e)}}),pOe=uSt});var t3,cSt,e3,AOe=O(()=>{A();t3=ie(Xt(),1);dt();cSt=[">=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",cSt,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,lSt,gOe,hOe=O(()=>{A();dt();fr();AOe();mOe=it(e_,e=>new e3(e)),lSt=(e={})=>({name:e_,options:e,setupOnce(){mOe(e)}}),gOe=lSt});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,dSt,yOe,TOe=O(()=>{A();dt();fr();EOe();SOe=it(t_,e=>new n3(e)),dSt=(e={})=>({name:t_,setupOnce(){SOe(e)}}),yOe=dSt});function pSt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function fSt(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=pSt(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]=fSt(m,n))}}}});var COe,ASt,bOe,vOe=O(()=>{A();dt();fr();IOe();COe=it(cU,e=>new o3(e)),ASt=(e={})=>({name:cU,setupOnce(){COe(e)}}),bOe=ASt});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,mSt,BOe,NOe=O(()=>{A();dt();fr();DOe();xOe=it(fU,e=>new i3(e)),mSt=(e={})=>({name:fU,setupOnce(){xOe(e)}}),BOe=mSt});import*as wOe from"node:net";function MOe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Zm.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&sl.error(S?.message)},!0)});let d=new Zm.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 Zm.InstrumentationNodeModuleFile(h,t,S=>OOe(S,n,r,e,a),S=>POe(S,r)));return d}function OOe(e,t,n,r,o){return POe(e,n),t(e,"addDoc",gSt(r,o)),t(e,"getDocs",_St(r,o)),t(e,"setDoc",ESt(r,o)),t(e,"deleteDoc",hSt(r,o)),e}function POe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Zm.isWrapped)(e[n])&&t(e,n);return e}function gSt(e,t){return function(r){return function(o,i){let a=s3(e,"addDoc",o);return t(a),a3(a,()=>r(o,i))}}}function hSt(e,t){return function(r){return function(o){let i=s3(e,"deleteDoc",o.parent||o);return t(i),a3(i,()=>r(o))}}}function _St(e,t){return function(r){return function(o){let i=s3(e,"getDocs",o);return t(i),a3(i,()=>r(o))}}}function ESt(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,Zm.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 ySt(r,n),r.setAttribute(JI,t),r}function SSt(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 ySt(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}=SSt(i);c&&(a[Uz]=c),d&&(a[Lz]=d),e.setAttributes(a)}var Zm,kOe=O(()=>{A();Le();Zm=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=(y,C)=>{(0,Wm.safeExecuteInTheMiddle)(()=>m(y,C),R=>{R&&sl.error(R?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Wm.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&sl.error(C?.message)},!0)});let h=new Wm.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:y,triggerType:C})=>{h.files.push(new Wm.InstrumentationNodeModuleFile(y,t,R=>TSt(R,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),R=>LOe(R,r)))}),h}function Bu(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",S=e.startSpan(`firebase.function.${n}`,{kind:Wr.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),S.setAttributes(y),t?.requestHook?.(S),qe.with(Ft.setSpan(qe.active(),S),async()=>{let C,R;try{R=await a.apply(this,m)}catch(B){C=B}if(t?.responseHook?.(S,C),C&&S.recordException(C),S.end(),C)throw await t?.errorHook?.(S,C),C;return R})};return c?o.call(this,c,d):o.call(this,d)}}}function TSt(e,t,n,r,o,i){switch(LOe(e,n),i){case"function":t(e,"onRequest",Bu(r,o,"http.request")),t(e,"onCall",Bu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Bu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Bu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Bu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Bu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Bu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Bu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Bu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Bu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Bu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Bu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Bu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Bu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Bu(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,Wm.isWrapped)(e[r])&&t(e,r);return e}var Wm,QOe=O(()=>{A();Le();Wm=ie(Xt(),1)});var GOe,FOe,ISt,CSt,u3,jOe=O(()=>{A();GOe=ie(Xt(),1);dt();kOe();QOe();FOe={},ISt=[">=3.0.0 <5"],CSt=[">=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,ISt,this._wrap,this._unwrap,this.getConfig())),t.push(UOe(this.tracer,CSt,this._wrap,this._unwrap,this.getConfig())),t}}});var HOe,bSt,zOe,vSt,$Oe,VOe=O(()=>{A();dt();fr();jOe();HOe="Firebase",bSt={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(bSt)),vSt=()=>({name:HOe,setupOnce(){zOe()}}),$Oe=vSt});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]=RSt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function RSt(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:DSt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ft.setGlobalTracerProvider(n),vp.setGlobalPropagator(new _L);let r=new fq;return qe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function DSt(e){if(e!=null){if(e>YY)return ua&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${YY}`),YY;if(e<=0||Number.isNaN(e)){ua&&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 xSt(e,XOe)}function xSt(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 BSt}function yl(){return twe}function nwe(){return NSt}var BSt,twe,NSt,Tl=O(()=>{"use strict";A();BSt="prod",twe="0.1.63",NSt=`@tanagram/lore/${twe}`});function MSt(e=""){if(!OSt.test(e))return e!==e.toLowerCase()}function rwe(e,t){let n=t??wSt,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=MSt(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 PSt(e){return e?e[0].toUpperCase()+e.slice(1):""}function kSt(e){return e?e[0].toLowerCase()+e.slice(1):""}function USt(e,t){return e?(Array.isArray(e)?e:rwe(e)).map(n=>PSt(t?.normalize?n.toLowerCase():n)).join(""):""}function bN(e,t){return kSt(USt(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 OSt,wSt,iwe=O(()=>{A();OSt=/\d/,wSt=["-","_","/","."]});import{parseArgs as LSt}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 Kgt(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=Kgt;function Jgt(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=Jgt});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 la=(Le(),we(Je)),Zgt=_r(),x7=YDe(),ls=Xt(),JDe=KDe(),p_=R7(),bS=($n(),we(Nr)),PQ=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Wgt=["remove","count","findOneAndRemove",...PQ],Xgt=["count","findOneAndRemove",...PQ],eht=[...PQ];function ZDe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Wgt:e.startsWith("7.")?Xgt:eht: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 ls.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(JDe.PACKAGE_NAME,JDe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,ls.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,ls.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new ls.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&&la.trace.getSpan(la.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&ls.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&ls.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&&la.trace.getSpan(la.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&ls.SemconvStability.OLD&&(c[p_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&ls.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&&la.trace.getSpan(la.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 y=h(t,d);r._dbSemconvStability&ls.SemconvStability.OLD&&(m[p_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&ls.SemconvStability.STABLE&&(m[bS.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(S,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&la.trace.getSpan(la.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,S=c;typeof a=="function"?(m=a,h=void 0,S=void 0):typeof c=="function"&&(m=c,S=void 0);let y={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&ls.SemconvStability.OLD&&(y[p_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&ls.SemconvStability.STABLE&&(y[bS.ATTR_DB_QUERY_TEXT]=N)}let R=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),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&&la.trace.getSpan(la.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:S}=r.getConfig();if(S){let C=S(t,m);r._dbSemconvStability&ls.SemconvStability.OLD&&(h[p_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&ls.SemconvStability.STABLE&&(h[bS.ATTR_DB_QUERY_TEXT]=C)}let y=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(y,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=la.trace.getSpan(la.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]=la.trace.getSpan(la.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&ls.SemconvStability.OLD&&(a[p_.ATTR_DB_OPERATION]=r,a[p_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&ls.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&ls.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:la.SpanKind.CLIENT,attributes:a},i?la.trace.setSpan(la.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?la.context.with((0,Zgt.suppressTracing)(la.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 tht=exe();Object.defineProperty(kQ,"MongooseInstrumentation",{enumerable:!0,get:function(){return tht.MongooseInstrumentation}})});var nxe,rxe,oxe,nht,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")}})),nht=()=>({name:rxe,setupOnce(){oxe()}}),ixe=nht});var sxe=Q(Hi=>{"use strict";A();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Hi.DB_SYSTEM_VALUE_MYSQL=Hi.ATTR_NET_PEER_PORT=Hi.ATTR_NET_PEER_NAME=Hi.ATTR_DB_USER=Hi.ATTR_DB_SYSTEM=Hi.ATTR_DB_STATEMENT=Hi.ATTR_DB_NAME=Hi.ATTR_DB_CONNECTION_STRING=void 0;Hi.ATTR_DB_CONNECTION_STRING="db.connection_string";Hi.ATTR_DB_NAME="db.name";Hi.ATTR_DB_STATEMENT="db.statement";Hi.ATTR_DB_SYSTEM="db.system";Hi.ATTR_DB_USER="db.user";Hi.ATTR_NET_PEER_NAME="net.peer.name";Hi.ATTR_NET_PEER_PORT="net.peer.port";Hi.DB_SYSTEM_VALUE_MYSQL="mysql";Hi.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 rht;(function(e){e.MYSQL_VALUES="db.mysql.values"})(rht=JB.AttributeNames||(JB.AttributeNames={}))});var cxe=Q(Fs=>{"use strict";A();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.getPoolNameOld=Fs.arrayStringifyHelper=Fs.getSpanName=Fs.getDbValues=Fs.getDbQueryText=Fs.getJDBCString=Fs.getConfig=void 0;function oht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Fs.getConfig=oht;function iht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Fs.getJDBCString=iht;function aht(e){return typeof e=="string"?e:e.sql}Fs.getDbQueryText=aht;function sht(e,t){return N7(typeof e=="string"?t:t||e.values)}Fs.getDbValues=sht;function uht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Fs.getSpanName=uht;function N7(e){return e?`[${e.toString()}]`:""}Fs.arrayStringifyHelper=N7;function cht(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()}Fs.getPoolNameOld=cht});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)),Km=sxe(),lht=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(Km.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:S}=(0,vS.getConfig)(t.config),y=parseInt(m,10),C=(0,vS.getDbQueryText)(o);r._dbSemconvStability&Dd.SemconvStability.OLD&&(c[Km.ATTR_DB_SYSTEM]=Km.DB_SYSTEM_VALUE_MYSQL,c[Km.ATTR_DB_CONNECTION_STRING]=(0,vS.getJDBCString)(d,m,h),c[Km.ATTR_DB_NAME]=h,c[Km.ATTR_DB_USER]=S,c[Km.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[Km.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[Km.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&Dd.SemconvStability.STABLE&&(c[Pb.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Pb.ATTR_SERVER_PORT]=y));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(lht.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 dht=pxe();Object.defineProperty(LQ,"MySQLInstrumentation",{enumerable:!0,get:function(){return dht.MySQLInstrumentation}})});var Axe,mxe,gxe,pht,hxe,_xe=O(()=>{A();Axe=ie(fxe(),1);fr();mxe="Mysql",gxe=it(mxe,()=>new Axe.MySQLInstrumentation({})),pht=()=>({name:mxe,setupOnce(){gxe()}}),hxe=pht});var w7=Q(Pa=>{"use strict";A();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.DB_SYSTEM_VALUE_MYSQL=Pa.ATTR_NET_PEER_PORT=Pa.ATTR_NET_PEER_NAME=Pa.ATTR_DB_USER=Pa.ATTR_DB_SYSTEM=Pa.ATTR_DB_STATEMENT=Pa.ATTR_DB_NAME=Pa.ATTR_DB_CONNECTION_STRING=void 0;Pa.ATTR_DB_CONNECTION_STRING="db.connection_string";Pa.ATTR_DB_NAME="db.name";Pa.ATTR_DB_STATEMENT="db.statement";Pa.ATTR_DB_SYSTEM="db.system";Pa.ATTR_DB_USER="db.user";Pa.ATTR_NET_PEER_NAME="net.peer.name";Pa.ATTR_NET_PEER_PORT="net.peer.port";Pa.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)),fht=_r();function Aht(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function mht(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function ght(e,t){if(typeof t!="string"||t.length===0||Aht(t))return t;let n=new fht.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=mht(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}QQ.addSqlCommenterComment=ght});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 hht(e,t,n){let{host:r,port:o,database:i,user:a}=_ht(e),c={};t&FQ.SemconvStability.OLD&&(c[ZB.ATTR_DB_CONNECTION_STRING]=Eht(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=hht;function _ht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function Eht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Sht(e,t,n,r=!1,o=yht){let[i,a]=typeof e=="string"?[e,n]:[e.sql,Tht(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=Sht;function yht(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function Tht(e){return"values"in e}function Iht(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=Iht;var Cht=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};xd.once=Cht;function bht(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}xd.getConnectionPrototypeToInstrument=bht});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:S}=o.getConfig(),y=(0,Ub.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Ub.getQueryText)(i,t,d,m,h);o._dbSemconvStability&jp.SemconvStability.OLD&&(y[U7.ATTR_DB_SYSTEM]=U7.DB_SYSTEM_VALUE_MYSQL,y[U7.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&jp.SemconvStability.STABLE&&(y[L7.ATTR_DB_SYSTEM_NAME]=L7.DB_SYSTEM_NAME_VALUE_MYSQL,y[L7.ATTR_DB_QUERY_TEXT]=C);let R=o.tracer.startSpan((0,Ub.getSpanName)(i),{kind:yxe.SpanKind.CLIENT,attributes:y});!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 S=="function"&&(0,jp.safeExecuteInTheMiddle)(()=>{S(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 vht=Cxe();Object.defineProperty(jQ,"MySQL2Instrumentation",{enumerable:!0,get:function(){return vht.MySQL2Instrumentation}})});var vxe,Rxe,Dxe,Rht,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")}})),Rht=()=>({name:Rxe,setupOnce(){Dxe()}}),xxe=Rht});var Nxe=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 Oxe=Q(HQ=>{"use strict";A();Object.defineProperty(HQ,"__esModule",{value:!0});HQ.endSpan=void 0;var Dht=(Le(),we(Je)),xht=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:Dht.SpanStatusCode.ERROR,message:t.message})),e.end()};HQ.endSpan=xht});var $Q=Q(zQ=>{"use strict";A();Object.defineProperty(zQ,"__esModule",{value:!0});zQ.defaultDbStatementSerializer=void 0;var Bht=[{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}],Nht=(e,t)=>{if(Array.isArray(t)&&t.length){let n=Bht.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=Nht});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(),Oht=$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||Oht.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,S=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]=S,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]=S),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 y=r.tracer.startSpan(o.name,{kind:f_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,Mxe.safeExecuteInTheMiddle)(()=>C(y,{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?.(y,o.name,o.args,M),F=>{F&&f_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,WB.endSpan)(y,null),B(M)};let N=o.reject;return o.reject=function(M){(0,WB.endSpan)(y,M),N(M)},R}catch(R){throw(0,WB.endSpan)(y,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 wht=Uxe();Object.defineProperty(qQ,"IORedisInstrumentation",{enumerable:!0,get:function(){return wht.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)),Mht=(e,t)=>{t&&e.setStatus({code:XB.SpanStatusCode.ERROR,message:t.message}),e.end()};m_.endSpan=Mht;var Pht=e=>function(){let n=e.apply(this,arguments);return XB.context.bind(XB.context.active(),n)};m_.getTracedCreateClient=Pht;var kht=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=kht});var KQ=Q(js=>{"use strict";A();Object.defineProperty(js,"__esModule",{value:!0});js.DB_SYSTEM_VALUE_REDIS=js.DB_SYSTEM_NAME_VALUE_REDIS=js.ATTR_NET_PEER_PORT=js.ATTR_NET_PEER_NAME=js.ATTR_DB_SYSTEM=js.ATTR_DB_STATEMENT=js.ATTR_DB_CONNECTION_STRING=void 0;js.ATTR_DB_CONNECTION_STRING="db.connection_string";js.ATTR_DB_STATEMENT="db.statement";js.ATTR_DB_SYSTEM="db.system";js.ATTR_NET_PEER_NAME="net.peer.name";js.ATTR_NET_PEER_PORT="net.peer.port";js.DB_SYSTEM_NAME_VALUE_REDIS="redis";js.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(),Uht=$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||Uht.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 y={};t._semconvStability&_l.SemconvStability.OLD&&Object.assign(y,{[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(y,{[tN.ATTR_SERVER_ADDRESS]:this.connection_options.host,[tN.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&_l.SemconvStability.OLD&&h.setAttribute(RS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=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(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,JQ.endSpan)(h,y),y}}}}_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 Lht(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]:Qht(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=Lht;function Qht(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(),Fht=$Q(),$xe=YQ(),z7=($n(),we(Nr)),Ght=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||Fht.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[Ght.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 S=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:Bd.SpanKind.CLIENT,attributes:h}),y=Bd.context.with(Bd.trace.setSpan(Bd.context.active(),S),()=>t.apply(n,r));if(typeof y?.then=="function")y.then(C=>{this._endSpanWithResponse(S,c,d,C,void 0)},C=>{this._endSpanWithResponse(S,c,d,null,C)});else{let C=y;C[nN]=C[nN]||[],C[nN].push({span:S,commandName:c,commandArgs:d})}return y}_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],[S,y]=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,S,y)}}_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 jht=Xt(),Yxe=YQ(),Hht=Gxe(),zht=qxe(),Kxe={requireParentSpan:!1},V7=class extends jht.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 Hht.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new zht.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 $ht=Jxe();Object.defineProperty(t4,"RedisInstrumentation",{enumerable:!0,get:function(){return $ht.RedisInstrumentation}})});function rN(e,t){return e.includes(t.toLowerCase())}function Y7(e){return rN(q7,e)?"cache.get":rN(qht,e)?"cache.put":void 0}function Yht(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(Vht,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(Yht(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 Vht,q7,qht,n1e=O(()=>{A();Vht=["get","set","setex"],q7=["get","mget"],qht=["set","setex"]});var r1e,o1e,n4,oN,i1e,Kht,Jht,a1e,Zht,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)},Kht=it(`${n4}.IORedis`,()=>new r1e.IORedisInstrumentation({responseHook:i1e})),Jht=it(`${n4}.Redis`,()=>new o1e.RedisInstrumentation({responseHook:i1e})),a1e=Object.assign(()=>{Kht(),Jht()},{id:n4}),Zht=(e={})=>({name:n4,setupOnce(){oN=e,a1e()}}),s1e=Zht});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 Wht;(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"})(Wht=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 Xht;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Xht=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 e_t(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=e_t;function t_t(e){return e.requireParentSpan===!0&&g_.trace.getSpan(g_.context.active())===void 0}Xn.shouldSkipInstrumentation=t_t;function n_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=n_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 r_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=r_t;function o_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=o_t;function i_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=i_t;function a_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=a_t;function s_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=s_t;function u_t(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}Xn.getErrorMessage=u_t;function c_t(e){return typeof e=="object"&&typeof e?.text=="string"}Xn.isObjectWithTextString=c_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 vu=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 vu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(S1e.PACKAGE_NAME,S1e.PACKAGE_VERSION,t),this._semconvStability=(0,vu.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 vu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new vu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new vu.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 vu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=jb(c);return(0,vu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=jb(c);(0,vu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=jb(t);return(0,vu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,vu.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,vu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,vu.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&vu.SemconvStability.OLD&&o.push(sN.ATTR_DB_SYSTEM),this._semconvStability&vu.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 S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Fo.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,m);if(y.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(y,C,o[o.length-1],h,S),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,S);N&&(M=Mr.context.bind(Mr.context.active(),M)),o[0].callback=M}}let{requestHook:R}=y;typeof R=="function"&&m&&(0,vu.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),S(),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}),S(),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 l_t=I1e();Object.defineProperty(Hb,"PgInstrumentation",{enumerable:!0,get:function(){return l_t.PgInstrumentation}});var d_t=K7();Object.defineProperty(Hb,"AttributeNames",{enumerable:!0,get:function(){return d_t.AttributeNames}})});var b1e,v1e,R1e,p_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})),p_t=e=>({name:v1e,setupOnce(){R1e(e)}}),D1e=p_t});var h_,tY,B1e,f_t,A_t,N1e,eY,m_t,O1e,w1e=O(()=>{A();Le();h_=ie(Xt(),1);$n();dt();fr();_S();tY="PostgresJs",B1e=[">=3.0.0 <4"],f_t=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,A_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 ua&&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 ua&&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 ua&&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(f_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[A_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 Na({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),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),ua&&Z.error(`Error in requestHook for ${tY} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,C,R)=>{try{n._setOperationName(c,a,R?.[0]?.command),c.end()}catch(B){ua&&Z.error("Error ending span in resolve callback:",B)}return Reflect.apply(y,C,R)}});let S=this.reject;this.reject=new Proxy(S,{apply:(y,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){ua&&Z.error("Error ending span in reject callback:",B)}return Reflect.apply(y,C,R)}});try{return r.apply(this,o)}catch(y){throw c.setStatus({code:2,message:y instanceof Error?y.message:"unknown_error"}),c.end(),y}})},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}},m_t=e=>({name:tY,setupOnce(){N1e(e)}}),O1e=m_t});var M1e=Q(uN=>{"use strict";A();Object.defineProperty(uN,"__esModule",{value:!0});uN.SeverityNumber=void 0;var g_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"})(g_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 h_t=l4(),d4=class{getLogger(t,n,r){return new h_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 __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):__t.NOOP_LOGGER}};f4.ProxyLogger=nY});var iY=Q(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.ProxyLoggerProvider=void 0;var E_t=p4(),S_t=rY(),oY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new S_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:E_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 y_t=P1e();Object.defineProperty(g4,"_globalThis",{enumerable:!0,get:function(){return y_t._globalThis}})});var U1e=Q(h4=>{"use strict";A();Object.defineProperty(h4,"__esModule",{value:!0});h4._globalThis=void 0;var T_t=k1e();Object.defineProperty(h4,"_globalThis",{enumerable:!0,get:function(){return T_t._globalThis}})});var L1e=Q(lA=>{"use strict";A();Object.defineProperty(lA,"__esModule",{value:!0});lA.API_BACKWARDS_COMPATIBILITY_VERSION=lA.makeGetter=lA._global=lA.GLOBAL_LOGS_API_KEY=void 0;var I_t=U1e();lA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");lA._global=I_t._globalThis;function C_t(e,t,n){return r=>r===e?t:n}lA.makeGetter=C_t;lA.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(),b_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,b_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(ka=>{"use strict";A();Object.defineProperty(ka,"__esModule",{value:!0});ka.logs=ka.ProxyLoggerProvider=ka.ProxyLogger=ka.NoopLoggerProvider=ka.NOOP_LOGGER_PROVIDER=ka.NoopLogger=ka.NOOP_LOGGER=ka.SeverityNumber=void 0;var v_t=M1e();Object.defineProperty(ka,"SeverityNumber",{enumerable:!0,get:function(){return v_t.SeverityNumber}});var G1e=l4();Object.defineProperty(ka,"NOOP_LOGGER",{enumerable:!0,get:function(){return G1e.NOOP_LOGGER}});Object.defineProperty(ka,"NoopLogger",{enumerable:!0,get:function(){return G1e.NoopLogger}});var j1e=p4();Object.defineProperty(ka,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return j1e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ka,"NoopLoggerProvider",{enumerable:!0,get:function(){return j1e.NoopLoggerProvider}});var R_t=rY();Object.defineProperty(ka,"ProxyLogger",{enumerable:!0,get:function(){return R_t.ProxyLogger}});var D_t=iY();Object.defineProperty(ka,"ProxyLoggerProvider",{enumerable:!0,get:function(){return D_t.ProxyLoggerProvider}});var x_t=F1e();ka.logs=x_t.LogsAPI.getInstance()});var H1e=Q(Vb=>{"use strict";A();Object.defineProperty(Vb,"__esModule",{value:!0});Vb.disableInstrumentations=Vb.enableInstrumentations=void 0;function B_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=B_t;function N_t(e){e.forEach(t=>t.disable())}Vb.disableInstrumentations=N_t});var V1e=Q(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.registerInstrumentations=void 0;var z1e=(Le(),we(Je)),O_t=sY(),$1e=H1e();function w_t(e){let t=e.tracerProvider||z1e.trace.getTracerProvider(),n=e.meterProvider||z1e.metrics.getMeterProvider(),r=e.loggerProvider||O_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,$1e.enableInstrumentations)(o,t,n,r),()=>{(0,$1e.disableInstrumentations)(o)}}E4.registerInstrumentations=w_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-]+)*))?$/,M_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-]+)*))?$/,P_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function k_t(e,t,n){if(!U_t(e))return dY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=G_t(e);if(!r)return!1;let o=[],i=W1e(r,t,o,n);return i&&!n?.includePrerelease?Q_t(r,o):i}S4.satisfies=k_t;function U_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=uEt(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=F_t(t,r),t.includes(" "))return W1e(e,t,n,r);{let o=j_t(t);return n.push(o),L_t(e,o)}}function L_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 P_t[t.op]?.includes(n)}function Q_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function F_t(e,t){return e=e.trim(),e=aEt(e,t),e=iEt(e),e=sEt(e,t),e=e.trim(),e}function Ru(e){return!e||e.toLowerCase()==="x"||e==="*"}function G_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 j_t(e){if(!e)return{};let t=e.match(M_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 H_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 z_t(e,t){if(lY(e)||lY(t))return 0;let[n,r]=H_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=z_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*",$_t=`\\d*[a-zA-Z-]${X1e}*`,V_t="((?:<|>)?=?)",K1e=`(?:${eBe}|${$_t})`,q_t=`(?:-(${K1e}(?:\\.${K1e})*))`,J1e=`${X1e}+`,Y_t=`(?:\\+(${J1e}(?:\\.${J1e})*))`,cY=`${eBe}|x|X|\\*`,cN=`[v=\\s]*(${cY})(?:\\.(${cY})(?:\\.(${cY})(?:${q_t})?${Y_t}?)?)?`,K_t=`^${V_t}\\s*${cN}$`,J_t=new RegExp(K_t),Z_t=`^\\s*(${cN})\\s+-\\s+(${cN})\\s*$`,W_t=new RegExp(Z_t),X_t="(?:~>?)",eEt=`^${X_t}${cN}$`,tEt=new RegExp(eEt),nEt="(?:\\^)",rEt=`^${nEt}${cN}$`,oEt=new RegExp(rEt);function iEt(e){let t=tEt;return e.replace(t,(n,r,o,i,a)=>{let c;return Ru(r)?c="":Ru(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Ru(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 aEt(e,t){let n=oEt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Ru(i)?m="":Ru(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Ru(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 sEt(e,t){let n=J_t;return e.replace(n,(r,o,i,a,c,d)=>{let m=Ru(i),h=m||Ru(a),S=h||Ru(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function uEt(e,t){let n=W_t;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,R)=>(Ru(i)?o="":Ru(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Ru(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Ru(S)?h="":Ru(y)?h=`<${+S+1}.0.0-0`:Ru(C)?h=`<${S}.${+y+1}.0-0`:R?h=`<=${S}.${y}.${C}-${R}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var pY=Q(ds=>{"use strict";A();Object.defineProperty(ds,"__esModule",{value:!0});ds.massUnwrap=ds.unwrap=ds.massWrap=ds.wrap=void 0;var Du=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 cEt=(e,t,n)=>{if(!e||!e[t]){Du("no original function "+String(t)+" to wrap");return}if(!n){Du("no wrapper function"),Du(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Du("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};ds.wrap=cEt;var lEt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ds.wrap)(r,o,n)})})};ds.massWrap=lEt;var dEt=(e,t)=>{if(!e||!e[t]){Du("no function to unwrap."),Du(new Error().stack);return}let n=e[t];if(!n.__unwrap)Du("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ds.unwrap=dEt;var pEt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ds.unwrap)(n,r)})})};ds.massUnwrap=pEt;function dN(e){e&&e.logger&&(typeof e.logger!="function"?Du("new logger isn't a function, not replacing"):Du=e.logger)}ds.default=dN;dN.wrap=ds.wrap;dN.massWrap=ds.massWrap;dN.unwrap=ds.unwrap;dN.massUnwrap=ds.massUnwrap});var nBe=Q(T4=>{"use strict";A();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationAbstract=void 0;var fY=(Le(),we(Je)),fEt=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=fEt.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 AEt=z0(),oBe=Ue("path"),gY=rBe(),mEt=["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 AEt.Hook(null,{internals:!0},(t,n,r)=>{let o=gEt(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 mEt?new e:this._instance=this._instance??new e}};C4.RequireInTheMiddleSingleton=hY;function gEt(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 hEt(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=hEt;async function _Et(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=_Et;function EEt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}E_.isWrapped=EEt});var uBe=Q(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.InstrumentationBase=void 0;var pN=Ue("path"),aBe=Ue("util"),SEt=tBe(),EY=pY(),yEt=nBe(),TEt=iBe(),IEt=Xq(),fN=(Le(),we(Je)),CEt=z0(),bEt=Ue("fs"),vEt=_Y(),SY=class extends yEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=TEt.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,vEt.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,bEt.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 CEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new IEt.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,SEt.satisfies)(t,r,{includePrerelease:n}))}});var cBe=Q(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.normalize=void 0;var REt=Ue("path");Object.defineProperty(v4,"normalize",{enumerable:!0,get:function(){return REt.normalize}})});var lBe=Q(qb=>{"use strict";A();Object.defineProperty(qb,"__esModule",{value:!0});qb.normalize=qb.InstrumentationBase=void 0;var DEt=uBe();Object.defineProperty(qb,"InstrumentationBase",{enumerable:!0,get:function(){return DEt.InstrumentationBase}});var xEt=cBe();Object.defineProperty(qb,"normalize",{enumerable:!0,get:function(){return xEt.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 BEt=yY(),IY=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,BEt.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 NEt(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=NEt});var gBe=Q(zi=>{"use strict";A();Object.defineProperty(zi,"__esModule",{value:!0});zi.semconvStabilityFromStr=zi.SemconvStability=zi.safeExecuteInTheMiddleAsync=zi.safeExecuteInTheMiddle=zi.isWrapped=zi.InstrumentationNodeModuleFile=zi.InstrumentationNodeModuleDefinition=zi.InstrumentationBase=zi.registerInstrumentations=void 0;var OEt=V1e();Object.defineProperty(zi,"registerInstrumentations",{enumerable:!0,get:function(){return OEt.registerInstrumentations}});var wEt=yY();Object.defineProperty(zi,"InstrumentationBase",{enumerable:!0,get:function(){return wEt.InstrumentationBase}});var MEt=pBe();Object.defineProperty(zi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return MEt.InstrumentationNodeModuleDefinition}});var PEt=fBe();Object.defineProperty(zi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return PEt.InstrumentationNodeModuleFile}});var CY=_Y();Object.defineProperty(zi,"isWrapped",{enumerable:!0,get:function(){return CY.isWrapped}});Object.defineProperty(zi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddle}});Object.defineProperty(zi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return CY.safeExecuteInTheMiddleAsync}});var mBe=ABe();Object.defineProperty(zi,"SemconvStability",{enumerable:!0,get:function(){return mBe.SemconvStability}});Object.defineProperty(zi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return mBe.semconvStabilityFromStr}})});function LEt(){let e=Kb[vY];return e?.helper?e.helper:Kb[bY]?.helper}function QEt(e){let t={helper:e};Kb[vY]=t,Kb[bY]=t}function FEt(){delete Kb[vY],delete Kb[bY]}function HEt(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:HEt(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 $Et(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function $Et(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,kEt,UEt,bY,vY,Kb,GEt,jEt,zEt,yBe,_Be,VEt,qEt,TBe,IBe=O(()=>{A();Le();B4=ie(gBe(),1);Le();kEt={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"}},UEt=kEt.version.split(".")[0],bY="PRISMA_INSTRUMENTATION",vY=`V${UEt}_PRISMA_INSTRUMENTATION`,Kb=globalThis;GEt=process.env.PRISMA_SHOW_ALL_TRACES==="true",jEt="00-10-10-00";zEt=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}`:jEt}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&&!GEt)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,VEt=yBe.name,qEt="@prisma/client",TBe=class extends B4.InstrumentationBase{tracerProvider;constructor(e={}){super(VEt,_Be,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new B4.InstrumentationNodeModuleDefinition(qEt,[_Be])]}enable(){let e=this._config;QEt(new zEt({tracerProvider:this.tracerProvider??Ft.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){FEt()}isEnabled(){return LEt()!==void 0}}});function YEt(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 KEt(e){switch(e){case"client":return Wr.CLIENT;case"internal":default:return Wr.INTERNAL}}var CBe,RY,JEt,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();YEt(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=KEt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:xs.SAMPLED}})),S=Ft.setSpanContext(qe.active(),{traceId:m,spanId:c,traceFlags:xs.SAMPLED});qe.with(S,()=>{let y={generateTraceId:()=>m,generateSpanId:()=>d};r._idGenerator=y,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}})}};JEt=it(CBe,e=>new RY(e)),vBe=e=>({name:CBe,setupOnce(){JEt(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(dA=>{"use strict";A();Object.defineProperty(dA,"__esModule",{value:!0});dA.HapiLifecycleMethodNames=dA.HapiLayerType=dA.handlerPatched=dA.HapiComponentName=void 0;dA.HapiComponentName="@hapi/hapi";dA.handlerPatched=Symbol("hapi-handler-patched");dA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};dA.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 ZEt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(ZEt=AN.AttributeNames||(AN.AttributeNames={}))});var OBe=Q($i=>{"use strict";A();Object.defineProperty($i,"__esModule",{value:!0});$i.getPluginFromInput=$i.getExtMetadata=$i.getRouteMetadata=$i.isPatchableExtMethod=$i.isDirectExtInput=$i.isLifecycleExtEventObj=$i.isLifecycleExtType=$i.getPluginName=void 0;var BBe=($n(),we(Nr)),WEt=xBe(),mN=DY(),S_=xY(),NBe=Xt();function XEt(e){return e.name?e.name:e.pkg.name}$i.getPluginName=XEt;var e0t=e=>typeof e=="string"&&mN.HapiLifecycleMethodNames.has(e);$i.isLifecycleExtType=e0t;var t0t=e=>{let t=e?.type;return t!==void 0&&(0,$i.isLifecycleExtType)(t)};$i.isLifecycleExtEventObj=t0t;var n0t=e=>Array.isArray(e)&&e.length<=3&&(0,$i.isLifecycleExtType)(e[0])&&typeof e[1]=="function";$i.isDirectExtInput=n0t;var r0t=e=>!Array.isArray(e);$i.isPatchableExtMethod=r0t;var o0t=(e,t,n)=>{let r={[BBe.ATTR_HTTP_ROUTE]:e.path};t&NBe.SemconvStability.OLD&&(r[WEt.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}};$i.getRouteMetadata=o0t;var i0t=(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}};$i.getExtMetadata=i0t;var a0t=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;$i.getPluginFromInput=a0t});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(),Jm=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,Jm.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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,Jm.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 s0t=PBe();Object.defineProperty(Zb,"HapiInstrumentation",{enumerable:!0,get:function(){return s0t.HapiInstrumentation}});var u0t=xY();Object.defineProperty(Zb,"AttributeNames",{enumerable:!0,get:function(){return u0t.AttributeNames}})});var UBe,LBe,QBe,c0t,FBe,GBe=O(()=>{A();UBe=ie(kBe(),1);fr();LBe="Hapi",QBe=it(LBe,()=>new UBe.HapiInstrumentation),c0t=()=>({name:LBe,setupOnce(){QBe()}}),FBe=c0t});var y_,_N,NY=O(()=>{A();y_={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},_N={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var M4,l0t,d0t,w4,jBe=O(()=>{A();Le();M4=ie(Xt(),1);dt();NY();l0t="@sentry/instrumentation-hono",d0t="0.0.1",w4=class extends M4.InstrumentationBase{constructor(t={}){super(l0t,d0t,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(rs(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 rs(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 p0t(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()){ua&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[bm],i=t[Q0];typeof o=="string"&&typeof i=="string"&&wn().setTransactionName(`${i} ${o}`)}var HBe,zBe,f0t,$Be,VBe=O(()=>{A();$n();dt();fr();_S();NY();jBe();HBe="Hono";zBe=it(HBe,()=>new w4({responseHook:e=>{p0t(e)}})),f0t=()=>({name:HBe,setupOnce(){zBe()}}),$Be=f0t});var P4=Q(EN=>{"use strict";A();Object.defineProperty(EN,"__esModule",{value:!0});EN.KoaLayerType=void 0;var A0t;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(A0t=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 m0t;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(m0t=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(),g0t=($n(),we(Nr)),h0t=(e,t,n,r)=>n?{attributes:{[k4.AttributeNames.KOA_NAME]:r?.toString(),[k4.AttributeNames.KOA_TYPE]:YBe.KoaLayerType.ROUTER,[g0t.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=h0t;var _0t=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Xb.isLayerIgnored=_0t});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 pA=(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){pA.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"?(pA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[tNe.kLayerPatched]=!0,pA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(pA.trace.getSpan(pA.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)(pA.context.active());h?.type===eNe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,yN.safeExecuteInTheMiddle)(()=>S(m,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&pA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=pA.trace.setSpan(pA.context.active(),m);return pA.context.with(y,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 E0t=nNe();Object.defineProperty(T_,"KoaInstrumentation",{enumerable:!0,get:function(){return E0t.KoaInstrumentation}});var S0t=OY();Object.defineProperty(T_,"AttributeNames",{enumerable:!0,get:function(){return S0t.AttributeNames}});var y0t=P4();Object.defineProperty(T_,"KoaLayerType",{enumerable:!0,get:function(){return y0t.KoaLayerType}})});var oNe,iNe,aNe,T0t,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()){ua&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[bm],c=n.context?.request?.method?.toUpperCase()||"GET";a&&wn().setTransactionName(`${c} ${a}`)}})),T0t=(e={})=>({name:iNe,setupOnce(){aNe(e)}}),sNe=T0t});var MY=Q(zp=>{"use strict";A();Object.defineProperty(zp,"__esModule",{value:!0});zp.ConnectNames=zp.ConnectTypes=zp.AttributeNames=void 0;var I0t;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(I0t=zp.AttributeNames||(zp.AttributeNames={}));var C0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(C0t=zp.ConnectTypes||(zp.ConnectTypes={}));var b0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(b0t=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 v0t=(Le(),we(Je)),I_=lNe(),R0t=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():v0t.diag.warn("Connect: Trying to pop the stack multiple time")}};C_.addNewStackLayer=R0t;var D0t=(e,t)=>{t&&e[I_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};C_.replaceCurrentStackRoute=D0t;var x0t=e=>e[I_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);C_.generateRoute=x0t});var ANe=Q(b_=>{"use strict";A();Object.defineProperty(b_,"__esModule",{value:!0});b_.ConnectInstrumentation=b_.ANONYMOUS_NAME=void 0;var B0t=(Le(),we(Je)),pNe=_r(),tv=MY(),fNe=cNe(),F4=Xt(),N0t=($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:{[N0t.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],S=arguments[d];(0,PY.replaceCurrentStackRoute)(m,t);let y=(0,pNe.getRPCMetadata)(B0t.context.active());t&&y?.type===pNe.RPCType.HTTP&&(y.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(S,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,O0t,SNe,yNe=O(()=>{A();hNe=ie(gNe(),1);fr();_Ne="Connect",ENe=it(_Ne,()=>new hNe.ConnectInstrumentation),O0t=()=>({name:_Ne,setupOnce(){ENe()}}),SNe=O0t});var TNe=Q(Ua=>{"use strict";A();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.DB_SYSTEM_VALUE_MSSQL=Ua.ATTR_NET_PEER_PORT=Ua.ATTR_NET_PEER_NAME=Ua.ATTR_DB_USER=Ua.ATTR_DB_SYSTEM=Ua.ATTR_DB_STATEMENT=Ua.ATTR_DB_SQL_TABLE=Ua.ATTR_DB_NAME=void 0;Ua.ATTR_DB_NAME="db.name";Ua.ATTR_DB_SQL_TABLE="db.sql.table";Ua.ATTR_DB_STATEMENT="db.statement";Ua.ATTR_DB_SYSTEM="db.system";Ua.ATTR_DB_USER="db.user";Ua.ATTR_NET_PEER_NAME="net.peer.name";Ua.ATTR_NET_PEER_PORT="net.peer.port";Ua.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 w0t(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=w0t;var M0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};nv.once=M0t});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)),P0t=Ue("events"),fA=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 fA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(vNe.PACKAGE_NAME,vNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,fA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,fA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new fA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of RNe)(0,fA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,fA.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 P0t.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++,S=this[DNe],y=(j=>j.sqlTextOrProcedure==="sp_prepare"&&j.parametersByName?.stmt?.value?j.parametersByName.stmt.value:j.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&fA.SemconvStability.OLD&&(C[v_.ATTR_DB_SYSTEM]=v_.DB_SYSTEM_VALUE_MSSQL,C[v_.ATTR_DB_NAME]=S,C[v_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[v_.ATTR_DB_STATEMENT]=y,C[v_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&fA.SemconvStability.STABLE&&(C[BS.ATTR_DB_NAMESPACE]=S,C[BS.ATTR_DB_SYSTEM_NAME]=BS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[BS.ATTR_DB_QUERY_TEXT]=y,C[BS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&fA.SemconvStability.OLD&&(C[v_.ATTR_NET_PEER_NAME]=this.config?.server,C[v_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&fA.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,S,y,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 k0t=xNe();Object.defineProperty(j4,"TediousInstrumentation",{enumerable:!0,get:function(){return k0t.TediousInstrumentation}})});var NNe,U0t,ONe,wNe,L0t,MNe,PNe=O(()=>{A();NNe=ie(BNe(),1);dt();fr();U0t=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),ONe="Tedious",wNe=it(ONe,()=>new NNe.TediousInstrumentation({})),L0t=()=>{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]||"";U0t.has(i)&&n.setAttribute(Nt,"auto.db.otel.tedious")}))}}},MNe=L0t});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 Q0t=LNe();Object.defineProperty(z4,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return Q0t.GenericPoolInstrumentation}})});var FNe,GNe,jNe,F0t,HNe,zNe=O(()=>{A();FNe=ie(QNe(),1);dt();fr();GNe="GenericPool",jNe=it(GNe,()=>new FNe.GenericPoolInstrumentation({})),F0t=()=>{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=F0t});var GY=Q(AA=>{"use strict";A();Object.defineProperty(AA,"__esModule",{value:!0});AA.ATTR_NET_PEER_PORT=AA.ATTR_NET_PEER_NAME=AA.ATTR_MESSAGING_SYSTEM=AA.ATTR_MESSAGING_OPERATION=void 0;AA.ATTR_MESSAGING_OPERATION="messaging.operation";AA.ATTR_MESSAGING_SYSTEM="messaging.system";AA.ATTR_NET_PEER_NAME="net.peer.name";AA.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 G0t;(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"})(G0t=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"),j0t=e=>e!==""?e:"<default>";ii.normalizeExchange=j0t;var H0t=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",mA=(e,t,n,r)=>n?{[t]:n}:(zY.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),z0t=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[TN.ATTR_MESSAGING_SYSTEM]:t}:{}};ii.getConnectionAttributesFromServer=z0t;var $0t=(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,{...mA(e,V4.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=qNe(r?.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...mA(e,TN.ATTR_NET_PEER_NAME,i,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...mA(e,$4.ATTR_SERVER_ADDRESS,i,"hostname")});let a=$Ne(r.port,o);t&D_.SemconvStability.OLD&&Object.assign(n,mA(e,TN.ATTR_NET_PEER_PORT,a,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,mA(e,$4.ATTR_SERVER_PORT,a,"port"))}else{let r=H0t(e);n[V4.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=VNe(o.protocol);Object.assign(n,{...mA(r,V4.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=qNe(o.hostname);t&D_.SemconvStability.OLD&&Object.assign(n,{...mA(r,TN.ATTR_NET_PEER_NAME,a,"hostname")}),t&D_.SemconvStability.STABLE&&Object.assign(n,{...mA(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,mA(r,TN.ATTR_NET_PEER_PORT,c,"port")),t&D_.SemconvStability.STABLE&&Object.assign(n,mA(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=$0t;var V0t=e=>e.setValue($Y,!0);ii.markConfirmChannelTracing=V0t;var q0t=e=>e.deleteValue($Y);ii.unmarkConfirmChannelTracing=q0t;var Y0t=e=>e.getValue($Y)===!0;ii.isConfirmChannelTracing=Y0t});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(),K0t=GY(),Sl=jY(),xu=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,{...xu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Er.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xu.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,xu.EndOperation.Ack)),(0,Er.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,xu.EndOperation.Nack)),(0,Er.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,xu.EndOperation.Reject)),(0,Er.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,xu.EndOperation.AckAll)),(0,Er.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,xu.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,xu.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,xu.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===xu.EndOperation.Reject?c:d,S=m[ai.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==xu.EndOperation.Reject&&c){for(let C=0;C<=y;C++)o.endConsumerSpan(S[C].msg,t,n,h);S.splice(0,y+1)}else o.endConsumerSpan(a,t,n,h),S.splice(y,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 S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[ai.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[ai.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Go.propagation.extract(Go.ROOT_CONTEXT,S),C=h.fields?.exchange,R;if(r._config.useLinksForConsume){let F=y?Go.trace.getSpan(y)?.spanContext():void 0;y=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,[K0t.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},y),{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=y||Go.ROOT_CONTEXT;Go.context.with(Go.trace.setSpan(M,B),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(B,h,!1,xu.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:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Er.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,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(S,{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&&S.setStatus({code:Go.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},B=(0,ai.markConfirmChannelTracing)(Go.context.active()),N=[...arguments];return N[3]=y,N[4]=Go.context.bind((0,ai.unmarkConfirmChannelTracing)(Go.trace.setSpan(B,S)),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:S}=r.createPublishSpan(r,i,a,m,d),{publishHook:y}=r.getConfig();y&&(0,Er.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),B=>{B&&Go.diag.error("amqplib instrumentation: publishHook error",B)},!0);let C=[...arguments];C[3]=S;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!==xu.EndOperation.ChannelClosed&&r!==xu.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,xu.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 J0t=ZNe();Object.defineProperty(x_,"AmqplibInstrumentation",{enumerable:!0,get:function(){return J0t.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,Z0t,nOe,W0t,rOe,oOe=O(()=>{A();eOe=ie(XNe(),1);fr();tOe="Amqplib",Z0t={consumeEndHook:e=>{Or(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Or(e,"auto.amqplib.otel.publisher")}},nOe=it(tOe,()=>new eOe.AmqplibInstrumentation(Z0t)),W0t=()=>({name:tOe,setupOnce(){nOe()}}),rOe=W0t});var IN,qY=O(()=>{A();IN="VercelAI"});function eSt(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 tSt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(nSt(t.content),rSt(t.content))}function nSt(e){for(let t of e){if(!eSt(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 rSt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&k9(t.toolCallId)}function oSt(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,X0t,iOe,J4,aOe=O(()=>{A();Z4=ie(Xt(),1);dt();qY();X0t=[">=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",X0t,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),S=h?.options,y=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:R}=oSt(S,c,d,y);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"&&Ui(B,"_sentry_active_span",Ed())},()=>{},B=>{tSt(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 iSt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var sOe,aSt,uOe,cOe=O(()=>{A();dt();fr();qY();aOe();sOe=it(IN,()=>new J4({}));aSt=(e={})=>{let t;return{name:IN,options:e,setupOnce(){t=sOe()},afterAllSetup(n){e.force??iSt(n)?rU(n):t?.callWhenPatched(()=>rU(n))}}},uOe=aSt});var X4,sSt,W4,lOe=O(()=>{A();X4=ie(Xt(),1);dt();sSt=[">=4.0.0 <7"],W4=class extends X4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Vn,t)}init(){return new X4.InstrumentationNodeModuleDefinition("openai",sSt,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,uSt,pOe,fOe=O(()=>{A();dt();fr();lOe();dOe=it(Xh,e=>new W4(e)),uSt=(e={})=>({name:Xh,setupOnce(){dOe(e)}}),pOe=uSt});var t3,cSt,e3,AOe=O(()=>{A();t3=ie(Xt(),1);dt();cSt=[">=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",cSt,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,lSt,gOe,hOe=O(()=>{A();dt();fr();AOe();mOe=it(e_,e=>new e3(e)),lSt=(e={})=>({name:e_,options:e,setupOnce(){mOe(e)}}),gOe=lSt});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,dSt,yOe,TOe=O(()=>{A();dt();fr();EOe();SOe=it(t_,e=>new n3(e)),dSt=(e={})=>({name:t_,setupOnce(){SOe(e)}}),yOe=dSt});function pSt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function fSt(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=pSt(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]=fSt(m,n))}}}});var COe,ASt,bOe,vOe=O(()=>{A();dt();fr();IOe();COe=it(cU,e=>new o3(e)),ASt=(e={})=>({name:cU,setupOnce(){COe(e)}}),bOe=ASt});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,mSt,BOe,NOe=O(()=>{A();dt();fr();DOe();xOe=it(fU,e=>new i3(e)),mSt=(e={})=>({name:fU,setupOnce(){xOe(e)}}),BOe=mSt});import*as wOe from"node:net";function MOe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Zm.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&sl.error(S?.message)},!0)});let d=new Zm.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 Zm.InstrumentationNodeModuleFile(h,t,S=>OOe(S,n,r,e,a),S=>POe(S,r)));return d}function OOe(e,t,n,r,o){return POe(e,n),t(e,"addDoc",gSt(r,o)),t(e,"getDocs",_St(r,o)),t(e,"setDoc",ESt(r,o)),t(e,"deleteDoc",hSt(r,o)),e}function POe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Zm.isWrapped)(e[n])&&t(e,n);return e}function gSt(e,t){return function(r){return function(o,i){let a=s3(e,"addDoc",o);return t(a),a3(a,()=>r(o,i))}}}function hSt(e,t){return function(r){return function(o){let i=s3(e,"deleteDoc",o.parent||o);return t(i),a3(i,()=>r(o))}}}function _St(e,t){return function(r){return function(o){let i=s3(e,"getDocs",o);return t(i),a3(i,()=>r(o))}}}function ESt(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,Zm.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 ySt(r,n),r.setAttribute(JI,t),r}function SSt(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 ySt(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}=SSt(i);c&&(a[Uz]=c),d&&(a[Lz]=d),e.setAttributes(a)}var Zm,kOe=O(()=>{A();Le();Zm=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=(y,C)=>{(0,Wm.safeExecuteInTheMiddle)(()=>m(y,C),R=>{R&&sl.error(R?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Wm.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&sl.error(C?.message)},!0)});let h=new Wm.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:y,triggerType:C})=>{h.files.push(new Wm.InstrumentationNodeModuleFile(y,t,R=>TSt(R,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),R=>LOe(R,r)))}),h}function Bu(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",S=e.startSpan(`firebase.function.${n}`,{kind:Wr.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),S.setAttributes(y),t?.requestHook?.(S),qe.with(Ft.setSpan(qe.active(),S),async()=>{let C,R;try{R=await a.apply(this,m)}catch(B){C=B}if(t?.responseHook?.(S,C),C&&S.recordException(C),S.end(),C)throw await t?.errorHook?.(S,C),C;return R})};return c?o.call(this,c,d):o.call(this,d)}}}function TSt(e,t,n,r,o,i){switch(LOe(e,n),i){case"function":t(e,"onRequest",Bu(r,o,"http.request")),t(e,"onCall",Bu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Bu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Bu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Bu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Bu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Bu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Bu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Bu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Bu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Bu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Bu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Bu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Bu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Bu(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,Wm.isWrapped)(e[r])&&t(e,r);return e}var Wm,QOe=O(()=>{A();Le();Wm=ie(Xt(),1)});var GOe,FOe,ISt,CSt,u3,jOe=O(()=>{A();GOe=ie(Xt(),1);dt();kOe();QOe();FOe={},ISt=[">=3.0.0 <5"],CSt=[">=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,ISt,this._wrap,this._unwrap,this.getConfig())),t.push(UOe(this.tracer,CSt,this._wrap,this._unwrap,this.getConfig())),t}}});var HOe,bSt,zOe,vSt,$Oe,VOe=O(()=>{A();dt();fr();jOe();HOe="Firebase",bSt={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(bSt)),vSt=()=>({name:HOe,setupOnce(){zOe()}}),$Oe=vSt});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]=RSt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function RSt(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:DSt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ft.setGlobalTracerProvider(n),vp.setGlobalPropagator(new _L);let r=new fq;return qe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function DSt(e){if(e!=null){if(e>YY)return ua&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${YY}`),YY;if(e<=0||Number.isNaN(e)){ua&&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 xSt(e,XOe)}function xSt(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 BSt}function yl(){return twe}function nwe(){return NSt}var BSt,twe,NSt,Tl=O(()=>{"use strict";A();BSt="prod",twe="0.1.64",NSt=`@tanagram/lore/${twe}`});function MSt(e=""){if(!OSt.test(e))return e!==e.toLowerCase()}function rwe(e,t){let n=t??wSt,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=MSt(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 PSt(e){return e?e[0].toUpperCase()+e.slice(1):""}function kSt(e){return e?e[0].toLowerCase()+e.slice(1):""}function USt(e,t){return e?(Array.isArray(e)?e:rwe(e)).map(n=>PSt(t?.normalize?n.toLowerCase():n)).join(""):""}function bN(e,t){return kSt(USt(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 OSt,wSt,iwe=O(()=>{A();OSt=/\d/,wSt=["-","_","/","."]});import{parseArgs as LSt}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 QSt(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 S=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let N of S)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 y=[],C={};for(let N=0;N<e.length;N++){let M=e[N];if(M==="--"){y.push(...e.slice(N));break}if(M.startsWith("--no-")){let F=M.slice(5);C[F]=!0;continue}y.push(M)}let R;try{R=LSt({args:y,options:Object.keys(d).length>0?d:void 0,allowPositionals:!0,strict:!1})}catch{R={values:{},positionals:y}}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 GSt(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=QSt(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 jSt(e){return Promise.all(e.map(t=>Il(t)))}async function N_(e,t){let n=await Il(e.args||{}),r=GSt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await jSt(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=HSt(t.rawArgs,n),S=t.rawArgs[h];if(S){let y=await awe(m,S);if(!y)throw new wS(`Unknown command ${$p(S)}`,"E_UNKNOWN_COMMAND");await N_(y,{rawArgs:t.rawArgs.slice(h+1)})}else{let y=await Il(e.default);if(y){if(e.run)throw new wS("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let C=await awe(m,y);if(!C)throw new wS(`Default sub command ${$p(y)} 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 HSt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&zSt(r,t)&&n++;continue}return n}return-1}function zSt(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)&&!$St.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=[],S=n.version||o.version;h.push(A3(`${n.description} (${i+(S?` v${S}`:"")})`),"");let y=a.length>0||c.length>0;return h.push(`${f3(p3("USAGE"))} ${$p(`${i}${y?" [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,FSt,g3,p3,$p,A3,f3,$St,XY=O(()=>{A();iwe();wS=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};FSt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),g3=(e,t=39)=>n=>FSt?n:`\x1B[${e}m${n}\x1B[${t}m`,p3=g3(1,22),$p=g3(36),A3=g3(90),f3=g3(4,24);$St=/^no[-A-Z]/});function qSt(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 oyt(e,t){return!!((t==="v4"||!t)&&tyt.test(e)||(t==="v6"||!t)&&nyt.test(e))}function iyt(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 $s){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Vp.create(lv(r))}return new $s({...e._def,shape:()=>t})}else return e instanceof eg?new eg({...e._def,type:lv(e.element)}):e instanceof Vp?Vp.create(lv(e.unwrap())):e instanceof tg?tg.create(lv(e.unwrap())):e instanceof gA?gA.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,VSt,Ic,vN,pwe,E3,YSt,zs,ln,fwe,Nu,rK,oK,RN,S3,wt,Pd,cwe,yn,KSt,JSt,ZSt,WSt,XSt,eyt,tyt,nyt,ryt,w_,MS,PS,kS,US,dv,LS,QS,M_,Xm,qp,pv,eg,$s,FS,h3,y3,GS,gA,T3,fv,Av,I3,jS,HS,zS,$S,P_,Cl,Vp,tg,VS,mv,gv,ayt,C3,DN,hv,mwe,syt,Ht,uyt,gwe,hwe,cyt,lyt,_we,dyt,pyt,fyt,Ayt,myt,gyt,hyt,_yt,Eyt,Syt,yyt,Tyt,Iyt,Cyt,byt,vyt,Ryt,Dyt,xyt,Byt,Nyt,Oyt,wyt,Myt,lwe,Pyt,kyt,Uyt,Lyt,Qyt,Fyt,Gyt,jyt,Hyt,Hs,zyt,eK,$yt,Md,aK,Vgn,qgn,Ygn,Ewe,Vyt,qyt,Yyt,Kyt,Swe,ywe,Twe,tK,Vs,Jyt,Zyt,Wyt,Xyt,sK,uK,cK,eTt,dwe,tTt,nTt,rTt,oTt,lK,hA=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"]),VSt=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}},YSt=[];zs=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}),Nu=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 zs,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 tg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eg.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}},KSt=/^c[^\s-]{8,}$/i,JSt=/^[a-z][a-z0-9]*$/,ZSt=/[0-9A-HJKMNP-TV-Z]{26}/,WSt=/^[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,XSt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eyt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),tyt=/^(((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=/^(([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})))$/,ryt=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 zs,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")XSt.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")eyt.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")WSt.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")KSt.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")JSt.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")ZSt.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"?ryt(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"?oyt(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 zs;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"?iyt(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 zs;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 Nu(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 zs,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 Nu(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 Nu(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 Nu(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 Nu(t.data)}};M_.create=e=>new M_({typeName:Ht.ZodAny,...Sn(e)});Xm=class extends yn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Nu(t.data)}};Xm.create=e=>new Xm({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 Nu(t.data)}};pv.create=e=>new pv({typeName:Ht.ZodVoid,...Sn(e)});eg=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=>zs.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new Pd(n,a,n.path,c)));return zs.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)}};eg.create=(e,t)=>new eg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ht.ZodArray,...Sn(t)});$s=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],S=o.data[m];d.push({key:{status:"valid",value:m},value:h._parse(new Pd(o,S,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 S=o.data[h];d.push({key:{status:"valid",value:h},value:m._parse(new Pd(o,S,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let m=[];for(let h of d){let S=await h.key;m.push({key:S,value:await h.value,alwaysSet:h.alwaysSet})}return m}).then(m=>zs.mergeObjectSync(r,m)):zs.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))}};$s.create=(e,t)=>new $s({shape:()=>e,unknownKeys:"strip",catchall:qp.create(),typeName:Ht.ZodObject,...Sn(t)});$s.strictCreate=(e,t)=>new $s({shape:()=>e,unknownKeys:"strict",catchall:qp.create(),typeName:Ht.ZodObject,...Sn(t)});$s.lazycreate=(e,t)=>new $s({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)});gA=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=>zs.mergeArray(n,a)):zs.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};gA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gA({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?zs.mergeObjectAsync(n,o):zs.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 Nu(async function(...d){let m=new Ic([]),h=await c._def.args.parseAsync(d,i).catch(C=>{throw m.addIssue(r(d,C)),m}),S=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(S,i).catch(C=>{throw m.addIssue(o(S,C)),m})})}else{let c=this;return Nu(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),S=c._def.returns.safeParse(h,i);if(!S.success)throw new Ic([o(h,S.error)]);return S.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:gA.create(t).rest(Xm.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||gA.create([]).rest(Xm.create()),returns:n||Xm.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 Nu(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 Nu(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 Nu(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?Nu(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)});tg=class extends yn{_parse(t){return this._getType(t)===ot.null?Nu(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};tg.create=(e,t)=>new tg({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)});ayt=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(),syt={object:$s.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={}));uyt=(e,t={message:`Input not instance of ${e.name}`})=>mwe(n=>n instanceof e,t),gwe=w_.create,hwe=MS.create,cyt=gv.create,lyt=PS.create,_we=kS.create,dyt=US.create,pyt=dv.create,fyt=LS.create,Ayt=QS.create,myt=M_.create,gyt=Xm.create,hyt=qp.create,_yt=pv.create,Eyt=eg.create,Syt=$s.create,yyt=$s.strictCreate,Tyt=FS.create,Iyt=y3.create,Cyt=GS.create,byt=gA.create,vyt=T3.create,Ryt=fv.create,Dyt=Av.create,xyt=I3.create,Byt=jS.create,Nyt=HS.create,Oyt=zS.create,wyt=$S.create,Myt=P_.create,lwe=Cl.create,Pyt=Vp.create,kyt=tg.create,Uyt=Cl.createWithPreprocess,Lyt=DN.create,Qyt=()=>gwe().optional(),Fyt=()=>hwe().optional(),Gyt=()=>_we().optional(),jyt={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})},Hyt=ln,Hs=Object.freeze({__proto__:null,defaultErrorMap:vN,setErrorMap:qSt,getErrorMap:_3,makeIssue:E3,EMPTY_PATH:YSt,addIssueToContext:at,ParseStatus:zs,INVALID:ln,DIRTY:fwe,OK:Nu,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:Xm,ZodNever:qp,ZodVoid:pv,ZodArray:eg,ZodObject:$s,ZodUnion:FS,ZodDiscriminatedUnion:y3,ZodIntersection:GS,ZodTuple:gA,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:tg,ZodDefault:VS,ZodCatch:mv,ZodNaN:gv,BRAND:ayt,ZodBranded:C3,ZodPipeline:DN,ZodReadonly:hv,custom:mwe,Schema:yn,ZodSchema:yn,late:syt,get ZodFirstPartyTypeKind(){return Ht},coerce:jyt,any:myt,array:Eyt,bigint:lyt,boolean:_we,date:dyt,discriminatedUnion:Iyt,effect:lwe,enum:Oyt,function:xyt,instanceof:uyt,intersection:Cyt,lazy:Byt,literal:Nyt,map:Ryt,nan:cyt,nativeEnum:wyt,never:hyt,null:Ayt,nullable:kyt,number:hwe,object:Syt,oboolean:Gyt,onumber:Fyt,optional:Pyt,ostring:Qyt,pipeline:Lyt,preprocess:Uyt,promise:Myt,record:vyt,set:Dyt,strictObject:yyt,string:gwe,symbol:pyt,transformer:lwe,tuple:byt,undefined:fyt,union:Tyt,unknown:gyt,void:_yt,NEVER:Hyt,ZodIssueCode:ze,quotelessJson:VSt,ZodError:Ic}),zyt=e=>typeof e?.safeParse=="function",eK=e=>typeof e?.passthrough=="function",$yt=(e,t)=>eK(e)?eK(t)?e.merge(t):e:eK(t)?t:Object.assign({},e,t),Md=Hs.object({name:Hs.literal("ZodError"),issues:Hs.array(Hs.object({path:Hs.array(Hs.union([Hs.string(),Hs.number()])),message:Hs.string().optional(),code:Hs.nativeEnum(Hs.ZodIssueCode)}).catchall(Hs.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}},Vgn=Hs.object({message:Hs.literal("Request validation failed"),pathParameterErrors:Md.nullable(),headerErrors:Md.nullable(),queryParameterErrors:Md.nullable(),bodyErrors:Md.nullable()}),qgn=Hs.object({pathParameterErrors:Md.nullable(),headerErrors:Md.nullable(),queryParameterErrors:Md.nullable(),bodyErrors:Md.nullable()}),Ygn=Hs.object({paramsResult:Md.nullable(),headersResult:Md.nullable(),queryResult:Md.nullable(),bodyResult:Md.nullable()}),Ewe="zod-ts-rest-polyfill",Vyt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},qyt=e=>Vyt(e)?e:zyt(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,Yyt=(e,t)=>e?t?e instanceof $s&&t instanceof $s?$yt(e,t):{...e,...t}:e:t,Kyt=(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:Yyt(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"),Vs=()=>({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}),Jyt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},Zyt=(e,t=!1)=>{let n=t?Wyt(e):Xyt(e);return n?.length>0?"?"+n:""},Wyt=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("&"):"",Xyt=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},S=qyt(m);if(S&&(i??e.validateResponseOnClient)){let y=Kyt(h.body,S);if(y.error)throw y.error;return{...h,body:y.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}},eTt=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])),tTt=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])),S={...h&&dwe(h),...dwe(c)};Object.keys(S).forEach(C=>{S[C]===void 0&&delete S[C]});let y={route:r,path:t,method:r.method,headers:S,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"?y={...y,contentType:"multipart/form-data",body:o instanceof FormData?o:eTt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?y={...y,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...y.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(y={...y,contentType:"application/json",headers:{"content-type":"application/json",...y.headers},body:JSON.stringify(o)})),m({...y,...a})},nTt=(e,t,n)=>{let{query:r,params:o,body:i,headers:a,extraHeaders:c,overrideClientOptions:d,fetchOptions:m,cache:h,next:S,...y}=n||{},C={...t,...d},R=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([N,M])=>[N,String(M)])):{};return{path:rTt(r,C.baseUrl,R,e,!!C.jsonQuery),clientArgs:C,route:e,body:i,query:r,extraInputArgs:y,fetchOptions:{...h&&{cache:h},...S&&{next:S},...m},headers:{...c,...a}}},rTt=(e,t,n,r,o)=>{let i=Jyt({path:r.path,params:n}),a=Zyt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},oTt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=nTt(e,t,r),i=await tTt(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,oTt(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 S=0;S<h.length;S++){let y=h[S];y in c||(c[y]=m[y].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={};ts(Me,{BIGINT_FORMAT_RANGES:()=>TK,Class:()=>AK,NUMBER_FORMAT_RANGES:()=>yK,aborted:()=>F_,allowsEval:()=>hK,assert:()=>cTt,assertEqual:()=>iTt,assertIs:()=>sTt,assertNever:()=>uTt,assertNotEqual:()=>aTt,assignProp:()=>L_,base64ToUint8Array:()=>bwe,base64urlToUint8Array:()=>vTt,cached:()=>Ev,captureStackTrace:()=>v3,cleanEnum:()=>bTt,cleanRegex:()=>NN,clone:()=>Ou,cloneDef:()=>dTt,createTransparentProxy:()=>hTt,defineLazy:()=>Ln,esc:()=>b3,escapeRegex:()=>kd,explicitlyAborted:()=>IK,extend:()=>STt,finalizeIssue:()=>wu,floatSafeRemainder:()=>mK,getElementAtPath:()=>pTt,getEnumValues:()=>BN,getLengthableOrigin:()=>MN,getParsedType:()=>gTt,getSizableOrigin:()=>wN,hexToUint8Array:()=>DTt,isObject:()=>KS,isPlainObject:()=>Q_,issue:()=>Sv,joinValues:()=>ue,jsonStringifyReplacer:()=>_v,merge:()=>TTt,mergeDefs:()=>ng,normalizeParams:()=>Fe,nullish:()=>U_,numKeys:()=>mTt,objectClone:()=>lTt,omit:()=>ETt,optionalKeys:()=>SK,parsedType:()=>Ne,partial:()=>ITt,pick:()=>_Tt,prefixIssues:()=>Cc,primitiveTypes:()=>EK,promiseAllObject:()=>fTt,propertyKeyTypes:()=>ON,randomString:()=>ATt,required:()=>CTt,safeExtend:()=>yTt,shallowClone:()=>_K,slugify:()=>gK,stringifyPrimitive:()=>xe,uint8ArrayToBase64:()=>vwe,uint8ArrayToBase64url:()=>RTt,uint8ArrayToHex:()=>xTt,unwrapMessage:()=>xN});function iTt(e){return e}function aTt(e){return e}function sTt(e){}function uTt(e){throw new Error("Unexpected value in exhaustive check")}function cTt(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 lTt(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 ng(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function dTt(e){return ng(e._zod.def)}function pTt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function fTt(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 ATt(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 mTt(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 Ou(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 hTt(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 _Tt(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=ng(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 Ou(e,i)}function ETt(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=ng(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 Ou(e,i)}function STt(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=ng(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return L_(this,"shape",i),i}});return Ou(e,o)}function yTt(e,t){if(!Q_(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=ng(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return L_(this,"shape",r),r}});return Ou(e,n)}function TTt(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=ng(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 Ou(e,n)}function ITt(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=ng(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 Ou(t,a)}function CTt(e,t,n){let r=ng(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 Ou(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 wu(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 bTt(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 vTt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return bwe(t+n)}function RTt(e){return vwe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function DTt(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 xTt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Cwe,v3,hK,gTt,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}});gTt=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,S=0;for(;S<m.length;){let y=m[S],C=S===m.length-1;typeof y=="string"?(h.properties??(h.properties={}),(a=h.properties)[y]??(a[y]={errors:[]}),h=h.properties[y]):(h.items??(h.items=[]),(c=h.items)[y]??(c[y]={errors:[]}),h=h.items[y]),C&&h.errors.push(t(d)),S++}}};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,NTt,B3,OTt,N3,wTt,O3,MTt,w3,PTt,M3,kTt,P3,UTt,k3,LTt,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=>wu(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=>wu(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=>wu(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=>wu(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)},NTt=x3(bc),B3=e=>(t,n,r)=>yv(e)(t,n,r),OTt=B3(bc),N3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Tv(e)(t,n,o)},wTt=N3(bc),O3=e=>async(t,n,r)=>Tv(e)(t,n,r),MTt=O3(bc),w3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Iv(e)(t,n,o)},PTt=w3(bc),M3=e=>(t,n,r)=>Iv(e)(t,n,r),kTt=M3(bc),P3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Cv(e)(t,n,o)},UTt=P3(bc),k3=e=>async(t,n,r)=>Cv(e)(t,n,r),LTt=k3(bc)});var bl={};ts(bl,{base64:()=>$K,base64url:()=>U3,bigint:()=>WK,boolean:()=>eJ,browserEmail:()=>VTt,cidrv4:()=>HK,cidrv6:()=>zK,cuid:()=>BK,cuid2:()=>NK,date:()=>YK,datetime:()=>JK,domain:()=>KTt,duration:()=>kK,e164:()=>qK,email:()=>LK,emoji:()=>QK,extendedDuration:()=>QTt,guid:()=>UK,hex:()=>JTt,hostname:()=>YTt,html5Email:()=>HTt,httpProtocol:()=>VK,idnEmail:()=>$Tt,integer:()=>XK,ipv4:()=>FK,ipv6:()=>GK,ksuid:()=>MK,lowercase:()=>rJ,mac:()=>jK,md5_base64:()=>WTt,md5_base64url:()=>XTt,md5_hex:()=>ZTt,nanoid:()=>PK,null:()=>tJ,number:()=>L3,rfc5322Email:()=>zTt,sha1_base64:()=>tIt,sha1_base64url:()=>nIt,sha1_hex:()=>eIt,sha256_base64:()=>oIt,sha256_base64url:()=>iIt,sha256_hex:()=>rIt,sha384_base64:()=>sIt,sha384_base64url:()=>uIt,sha384_hex:()=>aIt,sha512_base64:()=>lIt,sha512_base64url:()=>dIt,sha512_hex:()=>cIt,string:()=>ZK,time:()=>KK,ulid:()=>OK,undefined:()=>nJ,unicodeEmail:()=>xwe,uppercase:()=>oJ,uuid:()=>JS,uuid4:()=>FTt,uuid6:()=>GTt,uuid7:()=>jTt,xid:()=>wK});function QK(){return new RegExp(qTt,"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,QTt,UK,JS,FTt,GTt,jTt,LK,HTt,zTt,xwe,$Tt,VTt,qTt,FK,GK,jK,HK,zK,$K,U3,YTt,KTt,VK,qK,Bwe,YK,ZK,WK,XK,L3,eJ,tJ,nJ,rJ,oJ,JTt,ZTt,WTt,XTt,eIt,tIt,nIt,rIt,oIt,iIt,aIt,sIt,uIt,cIt,lIt,dIt,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)?)?)$/,QTt=/^[-+]?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)$/,FTt=JS(4),GTt=JS(6),jTt=JS(7),LK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HTt=/^[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])?)*$/,zTt=/^(([^<>()\[\]\\.,;:\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,$Tt=xwe,VTt=/^[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])?)*$/,qTt="^(\\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_-]*$/,YTt=/^(?=.{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])?)*\.?$/,KTt=/^([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]*$/,JTt=/^[0-9a-fA-F]*$/;ZTt=/^[0-9a-fA-F]{32}$/,WTt=LN(22,"=="),XTt=QN(22),eIt=/^[0-9a-fA-F]{40}$/,tIt=LN(27,"="),nIt=QN(27),rIt=/^[0-9a-fA-F]{64}$/,oIt=LN(43,"="),iIt=QN(43),aIt=/^[0-9a-fA-F]{96}$/,sIt=LN(64,""),uIt=QN(64),cIt=/^[0-9a-fA-F]{128}$/,lIt=LN(86,"=="),dIt=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 lHe={};ts(lHe,{getOpenBrowserCommand:()=>HHe,loginCommand:()=>Iie,openBrowser:()=>jHe,pollForTokens:()=>GHe,requestDeviceAuthorization:()=>FHe,runLogin:()=>zHe});import{spawn as _Lt}from"node:child_process";async function yLt(e){let n=await lr({token:e}).whoAmI({headers:{}});n.status===200&&AUe(`lore_${n.body.user.id}`)}async function UHe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function LHe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function QHe(e,t){return new URL(t,e).toString()}async function FHe({clientId:e,workosApiOrigin:t}){let n=await fetch(QHe(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await UHe(n);if(!n.ok)throw new Error(LHe(r));return r}async function GHe({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(QHe(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:SLt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let m=await UHe(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await kHe(c*1e3);break;case"slow_down":c+=1,await kHe(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(LHe(h))}}}async function jHe(e){let{command:t,args:n}=HHe(process.platform,e);await new Promise((r,o)=>{let i=_Lt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function HHe(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 TLt(e){if(!await Ur())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function ILt(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 zHe({client:e=lr(),enableLaunchAgent:t=$8,openBrowser:n=jHe,platform:r=process.platform,pollForTokens:o=GHe,requestDeviceAuthorization:i=FHe,setAccessToken:a=v6,setRefreshToken:c=R6,cacheAnalyticsDistinctId:d=yLt,timeoutMs:m=ELt,progress:h=MHe}={}){if(await TLt(e)){h({kind:"already_logged_in"});return}let S=await e.getCliAuthConfig();if(S.status!==200)throw new Error("WorkOS CLI Auth is not configured.");try{let y=await i({clientId:S.body.workos_client_id,workosApiOrigin:S.body.workos_api_origin});h({kind:"device_authorized",userCode:y.user_code,verificationUri:y.verification_uri,verificationUriComplete:y.verification_uri_complete});try{await n(y.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:y.verification_uri_complete}),h({kind:"waiting_for_authorization"});let C=await o({clientId:S.body.workos_client_id,deviceCode:y.device_code,expiresIn:y.expires_in,interval:y.interval,timeoutMs:m,workosApiOrigin:S.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 ILt(t,r,h)}catch(y){throw y instanceof Error&&y.message==="authorization timed out"?h({kind:"authorization_timed_out"}):y instanceof Error&&y.message==="Authorization denied"?h({kind:"authorization_denied"}):y instanceof Error&&y.message==="Authorization expired"&&h({kind:"authorization_expired"}),y}}var ELt,SLt,kHe,Iie,pie=O(async()=>{"use strict";A();fs();ms();Ks();sy();await rHe();await cHe();Cw();Xv();PHe();ELt=5*60*1e3,SLt="urn:ietf:params:oauth:grant-type:device_code";kHe=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 uHe(t),await nHe({skipIfAlreadyConfigured:!0});return}await zHe({...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]="322255b7-a1fc-4ccb-9644-634a0e1dac41",e._sentryDebugIdIdentifier="sentry-dbid-322255b7-a1fc-4ccb-9644-634a0e1dac41")}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 T4t}from"node:fs";import{fileURLToPath as I4t,pathToFileURL as l5e}from"node:url";A();A();jee();fs();As();ms();A();function hO(e){let t=e;return t._def??t.def??{}}function Oxt(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=Oxt(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 wxt(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 Mxt(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:wxt(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}=Mxt(i,t);n[o]=a,r[o]={isArray:c,leafKind:Pxt(i)}}return{args:n,fields:r}}function Jee(e,t={}){let n=Yee(e);return n?Kee(n,t):{args:{},fields:{}}}function Pxt(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 kxt(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 Uxt(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 Lxt(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 Qxt(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=>Qxt(n,a))}function Fxt(e,t,n){return e.resource==="threads"&&t==="id"?Lxt(n):n}function DUe(e){let t=kxt(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:S}){gt.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=S;if(!await(y?.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]=Fxt(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 lHe={};ts(lHe,{getOpenBrowserCommand:()=>HHe,loginCommand:()=>Iie,openBrowser:()=>jHe,pollForTokens:()=>GHe,requestDeviceAuthorization:()=>FHe,runLogin:()=>zHe});import{spawn as _Lt}from"node:child_process";async function yLt(e){let n=await lr({token:e}).whoAmI({headers:{}});n.status===200&&AUe(`lore_${n.body.user.id}`)}async function UHe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function LHe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function QHe(e,t){return new URL(t,e).toString()}async function FHe({clientId:e,workosApiOrigin:t}){let n=await fetch(QHe(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await UHe(n);if(!n.ok)throw new Error(LHe(r));return r}async function GHe({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(QHe(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:SLt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let m=await UHe(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await kHe(c*1e3);break;case"slow_down":c+=1,await kHe(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(LHe(h))}}}async function jHe(e){let{command:t,args:n}=HHe(process.platform,e);await new Promise((r,o)=>{let i=_Lt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function HHe(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 TLt(e){if(!await Ur())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function ILt(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 zHe({client:e=lr(),enableLaunchAgent:t=$8,openBrowser:n=jHe,platform:r=process.platform,pollForTokens:o=GHe,requestDeviceAuthorization:i=FHe,setAccessToken:a=v6,setRefreshToken:c=R6,cacheAnalyticsDistinctId:d=yLt,timeoutMs:m=ELt,progress:h=MHe}={}){if(await TLt(e)){h({kind:"already_logged_in"});return}let S=await e.getCliAuthConfig();if(S.status!==200)throw new Error("WorkOS CLI Auth is not configured.");try{let y=await i({clientId:S.body.workos_client_id,workosApiOrigin:S.body.workos_api_origin});h({kind:"device_authorized",userCode:y.user_code,verificationUri:y.verification_uri,verificationUriComplete:y.verification_uri_complete});try{await n(y.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:y.verification_uri_complete}),h({kind:"waiting_for_authorization"});let C=await o({clientId:S.body.workos_client_id,deviceCode:y.device_code,expiresIn:y.expires_in,interval:y.interval,timeoutMs:m,workosApiOrigin:S.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 ILt(t,r,h)}catch(y){throw y instanceof Error&&y.message==="authorization timed out"?h({kind:"authorization_timed_out"}):y instanceof Error&&y.message==="Authorization denied"?h({kind:"authorization_denied"}):y instanceof Error&&y.message==="Authorization expired"&&h({kind:"authorization_expired"}),y}}var ELt,SLt,kHe,Iie,pie=O(async()=>{"use strict";A();fs();ms();Ks();sy();await rHe();await cHe();Cw();Xv();PHe();ELt=5*60*1e3,SLt="urn:ietf:params:oauth:grant-type:device_code";kHe=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 uHe(t),await nHe({skipIfAlreadyConfigured:!0});return}await zHe({...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]="e6eb85a8-e08b-4ca0-a224-24bc089b8517",e._sentryDebugIdIdentifier="sentry-dbid-e6eb85a8-e08b-4ca0-a224-24bc089b8517")}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 T4t}from"node:fs";import{fileURLToPath as I4t,pathToFileURL as l5e}from"node:url";A();A();jee();fs();As();ms();A();function hO(e){let t=e;return t._def??t.def??{}}function Oxt(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=Oxt(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 wxt(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 Mxt(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:wxt(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}=Mxt(i,t);n[o]=a,r[o]={isArray:c,leafKind:Pxt(i)}}return{args:n,fields:r}}function Jee(e,t={}){let n=Yee(e);return n?Kee(n,t):{args:{},fields:{}}}function Pxt(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 kxt(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 Uxt(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 Lxt(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 Qxt(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=>Qxt(n,a))}function Fxt(e,t,n){return e.resource==="threads"&&t==="id"?Lxt(n):n}function DUe(e){let t=kxt(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:S}){gt.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=S;if(!await(y?.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]=Fxt(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=y?.client??lr(),H=Uxt(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();ms();A();ms();Ks();import{createHash as BLt}from"node:crypto";import Z8 from"node:fs/promises";import NLt from"node:path";A();import bw from"node:fs/promises";import CLt from"node:os";import rf from"node:path";var bLt=rf.join(CLt.homedir(),".claude","skills"),ZR=()=>bLt,Cie=(e=process.cwd())=>rf.join(e,".claude","skills"),Y8="SKILL.md",vLt=/^[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)||!vLt.test(e))return!1;for(let t of e.split(":"))if(t===""||t==="."||t==="..")return!1;return!0},K8=(e,t)=>{let n=rf.resolve(e),r=rf.resolve(t),o=rf.relative(n,r);if(o===""||o.startsWith("..")||rf.isAbsolute(o))throw new Error(`refused to use a skill path outside ${n}: ${r}`);return r},RLt=(e,t)=>vw(e)?[K8(Cie(t),rf.join(Cie(t),e,Y8)),K8(ZR(),rf.join(ZR(),e,Y8))]:[],$He=async e=>{try{return await bw.access(e),!0}catch{return!1}},WR=async(e,t=process.cwd())=>{for(let n of RLt(e,t))if(await $He(n)){let r=await bw.readFile(n,"utf8"),o=xLt(r);return{name:o.name??e,description:o.description??null,bodyMd:r,filePath:n}}return null},DLt=/^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/,xLt=e=>{let t=DLt.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},VHe=async(e,t)=>{if(!vw(e))throw new Error(`refusing to install skill with invalid name: ${JSON.stringify(e)}`);let n=K8(ZR(),rf.join(ZR(),e)),r=K8(ZR(),rf.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=rf.join(n,o.name,Y8);await $He(i)&&t.add(o.name)}}catch{}return[...t].sort()};var OLt=e=>BLt("sha256").update(e,"utf8").digest("hex"),wLt=async()=>{try{let e=await Z8.readFile(C6(),"utf8");return{pushedHashes:JSON.parse(e).pushedHashes??{}}}catch{return{pushedHashes:{}}}},MLt=async e=>{let t=C6();await Z8.mkdir(NLt.dirname(t),{recursive:!0,mode:448}),await Z8.writeFile(t,`${JSON.stringify(e,null,2)}
|