@tanagram/lore 0.1.128 → 0.1.129

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 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 o7e=Object.create;var qP=Object.defineProperty;var i7e=Object.getOwnPropertyDescriptor;var a7e=Object.getOwnPropertyNames;var s7e=Object.getPrototypeOf,u7e=Object.prototype.hasOwnProperty;var Ge=(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 F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),za=(e,t)=>{for(var n in t)qP(e,n,{get:t[n],enumerable:!0})},Tle=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of a7e(t))!u7e.call(e,o)&&o!==n&&qP(e,o,{get:()=>t[o],enumerable:!(r=i7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?o7e(s7e(e)):{},Tle(t||!e||!e.__esModule?qP(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>Tle(qP({},"__esModule",{value:!0}),e);var m=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.128"}}catch{}})()});var Xm,f$=O(()=>{m();Xm="1.9.1"});function c7e(e){let t=new Set([e]),n=new Set,r=e.match(ble);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 g=d.match(ble);if(!g)return i(d);let h={major:+g[1],minor:+g[2],patch:+g[3],prerelease:g[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 ble,vle,Rle=O(()=>{m();f$();ble=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;vle=c7e(Xm)});function oA(e,t,n,r=!1){var o;let i=K1[Y1]=(o=K1[Y1])!==null&&o!==void 0?o:{version:Xm};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!==Xm){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Xm}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Xm}.`),!0}function Cl(e){var t,n;let r=(t=K1[Y1])===null||t===void 0?void 0:t.version;if(!(!r||!vle(r)))return(n=K1[Y1])===null||n===void 0?void 0:n[e]}function iA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Xm}.`);let n=K1[Y1];n&&delete n[e]}var l7e,Y1,K1,IS=O(()=>{m();f$();Rle();l7e=Xm.split(".")[0],Y1=Symbol.for(`opentelemetry.js.api.${l7e}`),K1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function J1(e,t,n){let r=Cl("diag");if(r)return r[e](t,...n)}var YP,xle=O(()=>{m();IS();YP=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return J1("debug",this._namespace,t)}error(...t){return J1("error",this._namespace,t)}info(...t){return J1("info",this._namespace,t)}warn(...t){return J1("warn",this._namespace,t)}verbose(...t){return J1("verbose",this._namespace,t)}}});var _a,KP=O(()=>{m();(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"})(_a||(_a={}))});function Dle(e,t){e<_a.NONE?e=_a.NONE:e>_a.ALL&&(e=_a.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",_a.ERROR),warn:n("warn",_a.WARN),info:n("info",_a.INFO),debug:n("debug",_a.DEBUG),verbose:n("verbose",_a.VERBOSE)}}var Ble=O(()=>{m();KP()});var d7e,$a,CS=O(()=>{m();xle();Ble();KP();IS();d7e="diag",$a=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=Cl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:_a.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 g=Cl("diag"),h=Dle((c=i.logLevel)!==null&&c!==void 0?c:_a.INFO,o);if(g&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";g.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return oA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{iA(d7e,n)},n.createComponentLogger=o=>new YP(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var JP,Nle=O(()=>{m();JP=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 Ole,wle=O(()=>{m();Ole=Symbol("BaggageEntryMetadata")});function kle(e={}){return new JP(new Map(Object.entries(e)))}function Mle(e){return typeof e!="string"&&(p7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Ole,toString(){return e}}}var p7e,A$=O(()=>{m();CS();Nle();wle();p7e=$a.instance()});function bl(e){return Symbol.for(e)}var m$,QC,Z1=O(()=>{m();m$=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}}},QC=new m$});var g$,h$,ZP,Ple=O(()=>{m();g$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],h$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(h$[t]=console[t])}ZP=class{constructor(){function t(n){return function(...r){let o=h$[n];if(typeof o!="function"&&(o=h$.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<g$.length;n++)this[g$[n].n]=t(g$[n].c)}}});function Ule(){return v$}var _$,FC,E$,S$,y$,T$,W1,I$,C$,b$,v$,f7e,A7e,m7e,g7e,h7e,_7e,E7e,R$=O(()=>{m();_$=class{constructor(){}createGauge(t,n){return A7e}createHistogram(t,n){return m7e}createCounter(t,n){return f7e}createUpDownCounter(t,n){return g7e}createObservableGauge(t,n){return _7e}createObservableCounter(t,n){return h7e}createObservableUpDownCounter(t,n){return E7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},FC=class{},E$=class extends FC{add(t,n){}},S$=class extends FC{add(t,n){}},y$=class extends FC{record(t,n){}},T$=class extends FC{record(t,n){}},W1=class{addCallback(t){}removeCallback(t){}},I$=class extends W1{},C$=class extends W1{},b$=class extends W1{},v$=new _$,f7e=new E$,A7e=new y$,m7e=new T$,g7e=new S$,h7e=new I$,_7e=new C$,E7e=new b$});var WP,Lle=O(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(WP||(WP={}))});var XP,e2,x$=O(()=>{m();XP={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},e2={set(e,t,n){e!=null&&(e[t]=n)}}});var t2,Qle=O(()=>{m();Z1();t2=class{active(){return QC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var D$,S7e,aA,X1=O(()=>{m();Qle();IS();CS();D$="context",S7e=new t2,aA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return oA(D$,t,$a.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 Cl(D$)||S7e}disable(){this._getContextManager().disable(),iA(D$,$a.instance())}}});var Ks,B$=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ks||(Ks={}))});var eB,bS,n2,r2=O(()=>{m();B$();eB="0000000000000000",bS="00000000000000000000000000000000",n2={traceId:bS,spanId:eB,traceFlags:Ks.NONE}});var sA,o2=O(()=>{m();r2();sA=class{constructor(t=n2){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 i2(e){return e.getValue(N$)||void 0}function Fle(){return i2(aA.getInstance().active())}function tB(e,t){return e.setValue(N$,t)}function Gle(e){return e.deleteValue(N$)}function jle(e,t){return tB(e,new sA(t))}function a2(e){var t;return(t=i2(e))===null||t===void 0?void 0:t.spanContext()}var N$,O$=O(()=>{m();Z1();o2();X1();N$=bl("OpenTelemetry Context Key SPAN")});function Hle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(s2[e.charCodeAt(r)]|0)+(s2[e.charCodeAt(r+1)]|0)+(s2[e.charCodeAt(r+2)]|0)+(s2[e.charCodeAt(r+3)]|0);return n===t}function w$(e){return Hle(e,32)&&e!==bS}function k$(e){return Hle(e,16)&&e!==eB}function eg(e){return w$(e.traceId)&&k$(e.spanId)}function zle(e){return new sA(e)}var s2,u2=O(()=>{m();r2();o2();s2=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 y7e(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 M$,GC,P$=O(()=>{m();X1();O$();o2();u2();M$=aA.getInstance(),GC=class{startSpan(t,n,r=M$.active()){if(!!n?.root)return new sA;let i=r&&a2(r);return y7e(i)&&eg(i)?new sA(i):new sA}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??M$.active(),g=this.startSpan(t,i,d),h=tB(d,g);return M$.with(h,c,void 0,g)}}});var T7e,jC,U$=O(()=>{m();P$();T7e=new GC,jC=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):T7e}}});var c2,$le=O(()=>{m();P$();c2=class{getTracer(t,n,r){return new GC}}});var I7e,vS,L$=O(()=>{m();U$();$le();I7e=new c2,vS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new jC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:I7e}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 l2,Vle=O(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(l2||(l2={}))});var io,qle=O(()=>{m();(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"})(io||(io={}))});var ui,Yle=O(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ui||(ui={}))});function Kle(e){return v7e.test(e)}function Jle(e){return R7e.test(e)&&!x7e.test(e)}var Q$,C7e,b7e,v7e,R7e,x7e,Zle=O(()=>{m();Q$="[_0-9a-z-*/]",C7e=`[a-z]${Q$}{0,255}`,b7e=`[a-z0-9]${Q$}{0,240}@[a-z]${Q$}{0,13}`,v7e=new RegExp(`^(?:${C7e}|${b7e})$`),R7e=/^[ -~]{0,255}[!-~]$/,x7e=/,|=/});var Wle,D7e,Xle,ede,d2,tde=O(()=>{m();Zle();Wle=32,D7e=512,Xle=",",ede="=",d2=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+ede+this.get(n)),t),[]).join(Xle)}_parse(t){t.length>D7e||(this._internalState=t.split(Xle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(ede);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Kle(a)&&Jle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Wle&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Wle))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function nde(e){return new d2(e)}var rde=O(()=>{m();tde()});var Ke,ode=O(()=>{m();X1();Ke=aA.getInstance()});var vl,ide=O(()=>{m();CS();vl=$a.instance()});var F$,ade,sde=O(()=>{m();R$();F$=class{getMeter(t,n,r){return v$}},ade=new F$});var G$,p2,ude=O(()=>{m();sde();IS();CS();G$="metrics",p2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return oA(G$,t,$a.instance())}getMeterProvider(){return Cl(G$)||ade}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){iA(G$,$a.instance())}}});var j$,cde=O(()=>{m();ude();j$=p2.getInstance()});var f2,lde=O(()=>{m();f2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function z$(e){return e.getValue(H$)||void 0}function dde(){return z$(aA.getInstance().active())}function pde(e,t){return e.setValue(H$,t)}function fde(e){return e.deleteValue(H$)}var H$,Ade=O(()=>{m();X1();Z1();H$=bl("OpenTelemetry Baggage Key")});var $$,B7e,A2,mde=O(()=>{m();IS();lde();x$();Ade();A$();CS();$$="propagation",B7e=new f2,A2=class e{constructor(){this.createBaggage=kle,this.getBaggage=z$,this.getActiveBaggage=dde,this.setBaggage=pde,this.deleteBaggage=fde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return oA($$,t,$a.instance())}inject(t,n,r=e2){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=XP){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){iA($$,$a.instance())}_getGlobalPropagator(){return Cl($$)||B7e}}});var Vp,gde=O(()=>{m();mde();Vp=A2.getInstance()});var V$,m2,hde=O(()=>{m();IS();L$();u2();O$();CS();V$="trace",m2=class e{constructor(){this._proxyTracerProvider=new vS,this.wrapSpanContext=zle,this.isSpanContextValid=eg,this.deleteSpan=Gle,this.getSpan=i2,this.getActiveSpan=Fle,this.getSpanContext=a2,this.setSpan=tB,this.setSpanContext=jle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=oA(V$,this._proxyTracerProvider,$a.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Cl(V$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){iA(V$,$a.instance()),this._proxyTracerProvider=new vS}}});var Ht,_de=O(()=>{m();hde();Ht=m2.getInstance()});var We={};za(We,{DiagConsoleLogger:()=>ZP,DiagLogLevel:()=>_a,INVALID_SPANID:()=>eB,INVALID_SPAN_CONTEXT:()=>n2,INVALID_TRACEID:()=>bS,ProxyTracer:()=>jC,ProxyTracerProvider:()=>vS,ROOT_CONTEXT:()=>QC,SamplingDecision:()=>l2,SpanKind:()=>io,SpanStatusCode:()=>ui,TraceFlags:()=>Ks,ValueType:()=>WP,baggageEntryMetadataFromString:()=>Mle,context:()=>Ke,createContextKey:()=>bl,createNoopMeter:()=>Ule,createTraceState:()=>nde,default:()=>N7e,defaultTextMapGetter:()=>XP,defaultTextMapSetter:()=>e2,diag:()=>vl,isSpanContextValid:()=>eg,isValidSpanId:()=>k$,isValidTraceId:()=>w$,metrics:()=>j$,propagation:()=>Vp,trace:()=>Ht});var N7e,je=O(()=>{m();A$();Z1();Ple();KP();R$();Lle();x$();U$();L$();Vle();qle();Yle();B$();rde();u2();r2();ode();ide();cde();gde();_de();N7e={context:Ke,diag:vl,metrics:j$,propagation:Vp,trace:Ht}});var nB=F(Xh=>{"use strict";m();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.isTracingSuppressed=Xh.unsuppressTracing=Xh.suppressTracing=void 0;var O7e=(je(),Me(We)),q$=(0,O7e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function w7e(e){return e.setValue(q$,!0)}Xh.suppressTracing=w7e;function k7e(e){return e.deleteValue(q$)}Xh.unsuppressTracing=k7e;function M7e(e){return e.getValue(q$)===!0}Xh.isTracingSuppressed=M7e});var Y$=F(Js=>{"use strict";m();Object.defineProperty(Js,"__esModule",{value:!0});Js.BAGGAGE_MAX_TOTAL_LENGTH=Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=Js.BAGGAGE_HEADER=Js.BAGGAGE_ITEMS_SEPARATOR=Js.BAGGAGE_PROPERTIES_SEPARATOR=Js.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Js.BAGGAGE_KEY_PAIR_SEPARATOR="=";Js.BAGGAGE_PROPERTIES_SEPARATOR=";";Js.BAGGAGE_ITEMS_SEPARATOR=",";Js.BAGGAGE_HEADER="baggage";Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Js.BAGGAGE_MAX_TOTAL_LENGTH=8192});var K$=F(uA=>{"use strict";m();Object.defineProperty(uA,"__esModule",{value:!0});uA.parseKeyPairsIntoRecord=uA.parsePairKeyValue=uA.getKeyPairs=uA.serializeKeyPairs=void 0;var P7e=(je(),Me(We)),HC=Y$();function U7e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?HC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>HC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}uA.serializeKeyPairs=U7e;function L7e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=HC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}uA.getKeyPairs=L7e;function Ede(e){if(!e)return;let t=e.indexOf(HC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(HC.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 g=e.substring(t+1);d=(0,P7e.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}uA.parsePairKeyValue=Ede;function Q7e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(HC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Ede(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}uA.parseKeyPairsIntoRecord=Q7e});var Sde=F(g2=>{"use strict";m();Object.defineProperty(g2,"__esModule",{value:!0});g2.W3CBaggagePropagator=void 0;var J$=(je(),Me(We)),F7e=nB(),RS=Y$(),Z$=K$(),W$=class{inject(t,n,r){let o=J$.propagation.getBaggage(t);if(!o||(0,F7e.isTracingSuppressed)(t))return;let i=(0,Z$.getKeyPairs)(o).filter(c=>c.length<=RS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,RS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,Z$.serializeKeyPairs)(i);a.length>0&&r.set(n,RS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,RS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(RS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(RS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,Z$.parsePairKeyValue)(d);if(g){let h={value:g.value};g.metadata&&(h.metadata=g.metadata),a[g.key]=h}}),Object.entries(a).length===0)?t:J$.propagation.setBaggage(t,J$.propagation.createBaggage(a))}fields(){return[RS.BAGGAGE_HEADER]}};g2.W3CBaggagePropagator=W$});var yde=F(h2=>{"use strict";m();Object.defineProperty(h2,"__esModule",{value:!0});h2.AnchoredClock=void 0;var X$=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}};h2.AnchoredClock=X$});var vde=F(e_=>{"use strict";m();Object.defineProperty(e_,"__esModule",{value:!0});e_.isAttributeValue=e_.isAttributeKey=e_.sanitizeAttributes=void 0;var Tde=(je(),Me(We));function G7e(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(!Ide(n)){Tde.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Cde(r)){Tde.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}e_.sanitizeAttributes=G7e;function Ide(e){return typeof e=="string"&&e!==""}e_.isAttributeKey=Ide;function Cde(e){return e==null?!0:Array.isArray(e)?j7e(e):bde(typeof e)}e_.isAttributeValue=Cde;function j7e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(bde(r)){t=r;continue}return!1}return!1}}return!0}function bde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var e5=F(_2=>{"use strict";m();Object.defineProperty(_2,"__esModule",{value:!0});_2.loggingErrorHandler=void 0;var H7e=(je(),Me(We));function z7e(){return e=>{H7e.diag.error($7e(e))}}_2.loggingErrorHandler=z7e;function $7e(e){return typeof e=="string"?e:JSON.stringify(V7e(e))}function V7e(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 xde=F(zC=>{"use strict";m();Object.defineProperty(zC,"__esModule",{value:!0});zC.globalErrorHandler=zC.setGlobalErrorHandler=void 0;var q7e=e5(),Rde=(0,q7e.loggingErrorHandler)();function Y7e(e){Rde=e}zC.setGlobalErrorHandler=Y7e;function K7e(e){try{Rde(e)}catch{}}zC.globalErrorHandler=K7e});var Ode=F(cA=>{"use strict";m();Object.defineProperty(cA,"__esModule",{value:!0});cA.getStringListFromEnv=cA.getBooleanFromEnv=cA.getStringFromEnv=cA.getNumberFromEnv=void 0;var Dde=(je(),Me(We)),Bde=Ge("util");function J7e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}cA.getNumberFromEnv=J7e;function Nde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}cA.getStringFromEnv=Nde;function Z7e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}cA.getBooleanFromEnv=Z7e;function W7e(e){return Nde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}cA.getStringListFromEnv=W7e});var wde=F(E2=>{"use strict";m();Object.defineProperty(E2,"__esModule",{value:!0});E2._globalThis=void 0;E2._globalThis=globalThis});var kde=F(S2=>{"use strict";m();Object.defineProperty(S2,"__esModule",{value:!0});S2.VERSION=void 0;S2.VERSION="2.6.1"});function bi(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 t5=O(()=>{m()});var Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,X7e,n5,eYe,tYe,nYe,rYe,r5,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,o5,TYe,IYe,CYe,bYe,vYe,RYe,xYe,DYe,BYe,NYe,OYe,wYe,i5,kYe,MYe,a5,s5,PYe,UYe,LYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,rB,$C,u5,XYe,eKe,xS,tKe,nKe,rKe,oKe,c5,l5,iKe,d5,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,xKe,p5,DKe,BKe,NKe,OKe,wKe,kKe,MKe,PKe,UKe,LKe,QKe,FKe,GKe,jKe,HKe,zKe,$Ke,VKe,qKe,f5,YKe,A5,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,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,xAe,DAe,BAe,NAe,OAe,wAe,kAe,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,MJe,PJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,ime,ame,sme,ume,cme,lZe,dZe,pZe,fZe,AZe,mZe,lme,dme,pme,gZe,hZe,_Ze,EZe,fme,Ame,mme,gme,SZe,yZe,TZe,IZe,CZe,hme,_me,Eme,Sme,yme,Tme,Ime,bZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,Cme,bme,vme,Rme,xme,wZe,kZe,MZe,PZe,UZe,LZe,Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,Jme,Zme,Wme,Xme,ege,sWe,uWe,cWe,lWe,dWe,pWe,tge,nge,fWe,AWe,mWe,rge,oge,gWe,hWe,_We,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,kWe,MWe,PWe,Tge,Ige,UWe,LWe,QWe,Cge=O(()=>{m();t5();Mde="aws.lambda.invoked_arn",Pde="db.system",Ude="db.connection_string",Lde="db.user",Qde="db.jdbc.driver_classname",Fde="db.name",Gde="db.statement",jde="db.operation",Hde="db.mssql.instance_name",zde="db.cassandra.keyspace",$de="db.cassandra.page_size",Vde="db.cassandra.consistency_level",qde="db.cassandra.table",Yde="db.cassandra.idempotence",Kde="db.cassandra.speculative_execution_count",Jde="db.cassandra.coordinator.id",Zde="db.cassandra.coordinator.dc",Wde="db.hbase.namespace",Xde="db.redis.database_index",epe="db.mongodb.collection",tpe="db.sql.table",npe="exception.type",rpe="exception.message",ope="exception.stacktrace",ipe="exception.escaped",ape="faas.trigger",spe="faas.execution",upe="faas.document.collection",cpe="faas.document.operation",lpe="faas.document.time",dpe="faas.document.name",ppe="faas.time",fpe="faas.cron",Ape="faas.coldstart",mpe="faas.invoked_name",gpe="faas.invoked_provider",hpe="faas.invoked_region",_pe="net.transport",Epe="net.peer.ip",Spe="net.peer.port",ype="net.peer.name",Tpe="net.host.ip",Ipe="net.host.port",Cpe="net.host.name",bpe="net.host.connection.type",vpe="net.host.connection.subtype",Rpe="net.host.carrier.name",xpe="net.host.carrier.mcc",Dpe="net.host.carrier.mnc",Bpe="net.host.carrier.icc",Npe="peer.service",Ope="enduser.id",wpe="enduser.role",kpe="enduser.scope",Mpe="thread.id",Ppe="thread.name",Upe="code.function",Lpe="code.namespace",Qpe="code.filepath",Fpe="code.lineno",Gpe="http.method",jpe="http.url",Hpe="http.target",zpe="http.host",$pe="http.scheme",Vpe="http.status_code",qpe="http.flavor",Ype="http.user_agent",Kpe="http.request_content_length",Jpe="http.request_content_length_uncompressed",Zpe="http.response_content_length",Wpe="http.response_content_length_uncompressed",Xpe="http.server_name",efe="http.route",tfe="http.client_ip",nfe="aws.dynamodb.table_names",rfe="aws.dynamodb.consumed_capacity",ofe="aws.dynamodb.item_collection_metrics",ife="aws.dynamodb.provisioned_read_capacity",afe="aws.dynamodb.provisioned_write_capacity",sfe="aws.dynamodb.consistent_read",ufe="aws.dynamodb.projection",cfe="aws.dynamodb.limit",lfe="aws.dynamodb.attributes_to_get",dfe="aws.dynamodb.index_name",pfe="aws.dynamodb.select",ffe="aws.dynamodb.global_secondary_indexes",Afe="aws.dynamodb.local_secondary_indexes",mfe="aws.dynamodb.exclusive_start_table",gfe="aws.dynamodb.table_count",hfe="aws.dynamodb.scan_forward",_fe="aws.dynamodb.segment",Efe="aws.dynamodb.total_segments",Sfe="aws.dynamodb.count",yfe="aws.dynamodb.scanned_count",Tfe="aws.dynamodb.attribute_definitions",Ife="aws.dynamodb.global_secondary_index_updates",Cfe="messaging.system",bfe="messaging.destination",vfe="messaging.destination_kind",Rfe="messaging.temp_destination",xfe="messaging.protocol",Dfe="messaging.protocol_version",Bfe="messaging.url",Nfe="messaging.message_id",Ofe="messaging.conversation_id",wfe="messaging.message_payload_size_bytes",kfe="messaging.message_payload_compressed_size_bytes",Mfe="messaging.operation",Pfe="messaging.consumer_id",Ufe="messaging.rabbitmq.routing_key",Lfe="messaging.kafka.message_key",Qfe="messaging.kafka.consumer_group",Ffe="messaging.kafka.client_id",Gfe="messaging.kafka.partition",jfe="messaging.kafka.tombstone",Hfe="rpc.system",zfe="rpc.service",$fe="rpc.method",Vfe="rpc.grpc.status_code",qfe="rpc.jsonrpc.version",Yfe="rpc.jsonrpc.request_id",Kfe="rpc.jsonrpc.error_code",Jfe="rpc.jsonrpc.error_message",Zfe="message.type",Wfe="message.id",Xfe="message.compressed_size",eAe="message.uncompressed_size",X7e=Mde,n5=Pde,eYe=Ude,tYe=Lde,nYe=Qde,rYe=Fde,r5=Gde,oYe=jde,iYe=Hde,aYe=zde,sYe=$de,uYe=Vde,cYe=qde,lYe=Yde,dYe=Kde,pYe=Jde,fYe=Zde,AYe=Wde,mYe=Xde,gYe=epe,hYe=tpe,_Ye=npe,EYe=rpe,SYe=ope,yYe=ipe,o5=ape,TYe=spe,IYe=upe,CYe=cpe,bYe=lpe,vYe=dpe,RYe=ppe,xYe=fpe,DYe=Ape,BYe=mpe,NYe=gpe,OYe=hpe,wYe=_pe,i5=Epe,kYe=Spe,MYe=ype,a5=Tpe,s5=Ipe,PYe=Cpe,UYe=bpe,LYe=vpe,QYe=Rpe,FYe=xpe,GYe=Dpe,jYe=Bpe,HYe=Npe,zYe=Ope,$Ye=wpe,VYe=kpe,qYe=Mpe,YYe=Ppe,KYe=Upe,JYe=Lpe,ZYe=Qpe,WYe=Fpe,rB=Gpe,$C=jpe,u5=Hpe,XYe=zpe,eKe=$pe,xS=Vpe,tKe=qpe,nKe=Ype,rKe=Kpe,oKe=Jpe,c5=Zpe,l5=Wpe,iKe=Xpe,d5=efe,aKe=tfe,sKe=nfe,uKe=rfe,cKe=ofe,lKe=ife,dKe=afe,pKe=sfe,fKe=ufe,AKe=cfe,mKe=lfe,gKe=dfe,hKe=pfe,_Ke=ffe,EKe=Afe,SKe=mfe,yKe=gfe,TKe=hfe,IKe=_fe,CKe=Efe,bKe=Sfe,vKe=yfe,RKe=Tfe,xKe=Ife,p5=Cfe,DKe=bfe,BKe=vfe,NKe=Rfe,OKe=xfe,wKe=Dfe,kKe=Bfe,MKe=Nfe,PKe=Ofe,UKe=wfe,LKe=kfe,QKe=Mfe,FKe=Pfe,GKe=Ufe,jKe=Lfe,HKe=Qfe,zKe=Ffe,$Ke=Gfe,VKe=jfe,qKe=Hfe,f5=zfe,YKe=$fe,A5=Vfe,KKe=qfe,JKe=Yfe,ZKe=Kfe,WKe=Jfe,XKe=Zfe,eJe=Wfe,tJe=Xfe,nJe=eAe,rJe=bi([Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe]),tAe="other_sql",nAe="mssql",rAe="mysql",oAe="oracle",iAe="db2",aAe="postgresql",sAe="redshift",uAe="hive",cAe="cloudscape",lAe="hsqldb",dAe="progress",pAe="maxdb",fAe="hanadb",AAe="ingres",mAe="firstsql",gAe="edb",hAe="cache",_Ae="adabas",EAe="firebird",SAe="derby",yAe="filemaker",TAe="informix",IAe="instantdb",CAe="interbase",bAe="mariadb",vAe="netezza",RAe="pervasive",xAe="pointbase",DAe="sqlite",BAe="sybase",NAe="teradata",OAe="vertica",wAe="h2",kAe="coldfusion",MAe="cassandra",PAe="hbase",UAe="mongodb",LAe="redis",QAe="couchbase",FAe="couchdb",GAe="cosmosdb",jAe="dynamodb",HAe="neo4j",zAe="geode",$Ae="elasticsearch",VAe="memcached",qAe="cockroachdb",oJe=tAe,iJe=nAe,aJe=rAe,sJe=oAe,uJe=iAe,cJe=aAe,lJe=sAe,dJe=uAe,pJe=cAe,fJe=lAe,AJe=dAe,mJe=pAe,gJe=fAe,hJe=AAe,_Je=mAe,EJe=gAe,SJe=hAe,yJe=_Ae,TJe=EAe,IJe=SAe,CJe=yAe,bJe=TAe,vJe=IAe,RJe=CAe,xJe=bAe,DJe=vAe,BJe=RAe,NJe=xAe,OJe=DAe,wJe=BAe,kJe=NAe,MJe=OAe,PJe=wAe,UJe=kAe,LJe=MAe,QJe=PAe,FJe=UAe,GJe=LAe,jJe=QAe,HJe=FAe,zJe=GAe,$Je=jAe,VJe=HAe,qJe=zAe,YJe=$Ae,KJe=VAe,JJe=qAe,ZJe=bi([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,xAe,DAe,BAe,NAe,OAe,wAe,kAe,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe]),YAe="all",KAe="each_quorum",JAe="quorum",ZAe="local_quorum",WAe="one",XAe="two",eme="three",tme="local_one",nme="any",rme="serial",ome="local_serial",WJe=YAe,XJe=KAe,eZe=JAe,tZe=ZAe,nZe=WAe,rZe=XAe,oZe=eme,iZe=tme,aZe=nme,sZe=rme,uZe=ome,cZe=bi([YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome]),ime="datasource",ame="http",sme="pubsub",ume="timer",cme="other",lZe=ime,dZe=ame,pZe=sme,fZe=ume,AZe=cme,mZe=bi([ime,ame,sme,ume,cme]),lme="insert",dme="edit",pme="delete",gZe=lme,hZe=dme,_Ze=pme,EZe=bi([lme,dme,pme]),fme="alibaba_cloud",Ame="aws",mme="azure",gme="gcp",SZe=fme,yZe=Ame,TZe=mme,IZe=gme,CZe=bi([fme,Ame,mme,gme]),hme="ip_tcp",_me="ip_udp",Eme="ip",Sme="unix",yme="pipe",Tme="inproc",Ime="other",bZe=hme,vZe=_me,RZe=Eme,xZe=Sme,DZe=yme,BZe=Tme,NZe=Ime,OZe=bi([hme,_me,Eme,Sme,yme,Tme,Ime]),Cme="wifi",bme="wired",vme="cell",Rme="unavailable",xme="unknown",wZe=Cme,kZe=bme,MZe=vme,PZe=Rme,UZe=xme,LZe=bi([Cme,bme,vme,Rme,xme]),Dme="gprs",Bme="edge",Nme="umts",Ome="cdma",wme="evdo_0",kme="evdo_a",Mme="cdma2000_1xrtt",Pme="hsdpa",Ume="hsupa",Lme="hspa",Qme="iden",Fme="evdo_b",Gme="lte",jme="ehrpd",Hme="hspap",zme="gsm",$me="td_scdma",Vme="iwlan",qme="nr",Yme="nrnsa",Kme="lte_ca",QZe=Dme,FZe=Bme,GZe=Nme,jZe=Ome,HZe=wme,zZe=kme,$Ze=Mme,VZe=Pme,qZe=Ume,YZe=Lme,KZe=Qme,JZe=Fme,ZZe=Gme,WZe=jme,XZe=Hme,eWe=zme,tWe=$me,nWe=Vme,rWe=qme,oWe=Yme,iWe=Kme,aWe=bi([Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme]),Jme="1.0",Zme="1.1",Wme="2.0",Xme="SPDY",ege="QUIC",sWe=Jme,uWe=Zme,cWe=Wme,lWe=Xme,dWe=ege,pWe={HTTP_1_0:Jme,HTTP_1_1:Zme,HTTP_2_0:Wme,SPDY:Xme,QUIC:ege},tge="queue",nge="topic",fWe=tge,AWe=nge,mWe=bi([tge,nge]),rge="receive",oge="process",gWe=rge,hWe=oge,_We=bi([rge,oge]),ige=0,age=1,sge=2,uge=3,cge=4,lge=5,dge=6,pge=7,fge=8,Age=9,mge=10,gge=11,hge=12,_ge=13,Ege=14,Sge=15,yge=16,EWe=ige,SWe=age,yWe=sge,TWe=uge,IWe=cge,CWe=lge,bWe=dge,vWe=pge,RWe=fge,xWe=Age,DWe=mge,BWe=gge,NWe=hge,OWe=_ge,wWe=Ege,kWe=Sge,MWe=yge,PWe={OK:ige,CANCELLED:age,UNKNOWN:sge,INVALID_ARGUMENT:uge,DEADLINE_EXCEEDED:cge,NOT_FOUND:lge,ALREADY_EXISTS:dge,PERMISSION_DENIED:pge,RESOURCE_EXHAUSTED:fge,FAILED_PRECONDITION:Age,ABORTED:mge,OUT_OF_RANGE:gge,UNIMPLEMENTED:hge,INTERNAL:_ge,UNAVAILABLE:Ege,DATA_LOSS:Sge,UNAUTHENTICATED:yge},Tge="SENT",Ige="RECEIVED",UWe=Tge,LWe=Ige,QWe=bi([Tge,Ige])});var bge=O(()=>{m();Cge()});var vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,FWe,GWe,jWe,HWe,zWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,kXe,MXe,PXe,UXe,LXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,m5,ret,oet,iet,aet,set,uet,cet,det,pet,fet,Xhe,e_e,t_e,n_e,Aet,met,get,het,_et,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,Bet,Net,Oet,wet,ket,Met,Pet,Uet,S_e,y_e,Let,Qet,Fet,T_e,I_e,C_e,b_e,v_e,R_e,x_e,Get,jet,Het,zet,$et,Vet,qet,Yet,D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e,Q_e,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e,stt,utt,ctt,ltt,dtt,ptt,ftt,Att,mtt,gtt,htt,J_e=O(()=>{m();t5();vge="cloud.provider",Rge="cloud.account.id",xge="cloud.region",Dge="cloud.availability_zone",Bge="cloud.platform",Nge="aws.ecs.container.arn",Oge="aws.ecs.cluster.arn",wge="aws.ecs.launchtype",kge="aws.ecs.task.arn",Mge="aws.ecs.task.family",Pge="aws.ecs.task.revision",Uge="aws.eks.cluster.arn",Lge="aws.log.group.names",Qge="aws.log.group.arns",Fge="aws.log.stream.names",Gge="aws.log.stream.arns",jge="container.name",Hge="container.id",zge="container.runtime",$ge="container.image.name",Vge="container.image.tag",qge="deployment.environment",Yge="device.id",Kge="device.model.identifier",Jge="device.model.name",Zge="faas.name",Wge="faas.id",Xge="faas.version",ehe="faas.instance",the="faas.max_memory",nhe="host.id",rhe="host.name",ohe="host.type",ihe="host.arch",ahe="host.image.name",she="host.image.id",uhe="host.image.version",che="k8s.cluster.name",lhe="k8s.node.name",dhe="k8s.node.uid",phe="k8s.namespace.name",fhe="k8s.pod.uid",Ahe="k8s.pod.name",mhe="k8s.container.name",ghe="k8s.replicaset.uid",hhe="k8s.replicaset.name",_he="k8s.deployment.uid",Ehe="k8s.deployment.name",She="k8s.statefulset.uid",yhe="k8s.statefulset.name",The="k8s.daemonset.uid",Ihe="k8s.daemonset.name",Che="k8s.job.uid",bhe="k8s.job.name",vhe="k8s.cronjob.uid",Rhe="k8s.cronjob.name",xhe="os.type",Dhe="os.description",Bhe="os.name",Nhe="os.version",Ohe="process.pid",whe="process.executable.name",khe="process.executable.path",Mhe="process.command",Phe="process.command_line",Uhe="process.command_args",Lhe="process.owner",Qhe="process.runtime.name",Fhe="process.runtime.version",Ghe="process.runtime.description",jhe="service.name",Hhe="service.namespace",zhe="service.instance.id",$he="service.version",Vhe="telemetry.sdk.name",qhe="telemetry.sdk.language",Yhe="telemetry.sdk.version",Khe="telemetry.auto.version",Jhe="webengine.name",Zhe="webengine.version",Whe="webengine.description",FWe=vge,GWe=Rge,jWe=xge,HWe=Dge,zWe=Bge,$We=Nge,VWe=Oge,qWe=wge,YWe=kge,KWe=Mge,JWe=Pge,ZWe=Uge,WWe=Lge,XWe=Qge,eXe=Fge,tXe=Gge,nXe=jge,rXe=Hge,oXe=zge,iXe=$ge,aXe=Vge,sXe=qge,uXe=Yge,cXe=Kge,lXe=Jge,dXe=Zge,pXe=Wge,fXe=Xge,AXe=ehe,mXe=the,gXe=nhe,hXe=rhe,_Xe=ohe,EXe=ihe,SXe=ahe,yXe=she,TXe=uhe,IXe=che,CXe=lhe,bXe=dhe,vXe=phe,RXe=fhe,xXe=Ahe,DXe=mhe,BXe=ghe,NXe=hhe,OXe=_he,wXe=Ehe,kXe=She,MXe=yhe,PXe=The,UXe=Ihe,LXe=Che,QXe=bhe,FXe=vhe,GXe=Rhe,jXe=xhe,HXe=Dhe,zXe=Bhe,$Xe=Nhe,VXe=Ohe,qXe=whe,YXe=khe,KXe=Mhe,JXe=Phe,ZXe=Uhe,WXe=Lhe,XXe=Qhe,eet=Fhe,tet=Ghe,net=jhe,m5=Hhe,ret=zhe,oet=$he,iet=Vhe,aet=qhe,set=Yhe,uet=Khe,cet=Jhe,det=Zhe,pet=Whe,fet=bi([vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe]),Xhe="alibaba_cloud",e_e="aws",t_e="azure",n_e="gcp",Aet=Xhe,met=e_e,get=t_e,het=n_e,_et=bi([Xhe,e_e,t_e,n_e]),r_e="alibaba_cloud_ecs",o_e="alibaba_cloud_fc",i_e="aws_ec2",a_e="aws_ecs",s_e="aws_eks",u_e="aws_lambda",c_e="aws_elastic_beanstalk",l_e="azure_vm",d_e="azure_container_instances",p_e="azure_aks",f_e="azure_functions",A_e="azure_app_service",m_e="gcp_compute_engine",g_e="gcp_cloud_run",h_e="gcp_kubernetes_engine",__e="gcp_cloud_functions",E_e="gcp_app_engine",Eet=r_e,yet=o_e,Tet=i_e,Iet=a_e,Cet=s_e,bet=u_e,vet=c_e,Ret=l_e,xet=d_e,Det=p_e,Bet=f_e,Net=A_e,Oet=m_e,wet=g_e,ket=h_e,Met=__e,Pet=E_e,Uet=bi([r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e]),S_e="ec2",y_e="fargate",Let=S_e,Qet=y_e,Fet=bi([S_e,y_e]),T_e="amd64",I_e="arm32",C_e="arm64",b_e="ia64",v_e="ppc32",R_e="ppc64",x_e="x86",Get=T_e,jet=I_e,Het=C_e,zet=b_e,$et=v_e,Vet=R_e,qet=x_e,Yet=bi([T_e,I_e,C_e,b_e,v_e,R_e,x_e]),D_e="windows",B_e="linux",N_e="darwin",O_e="freebsd",w_e="netbsd",k_e="openbsd",M_e="dragonflybsd",P_e="hpux",U_e="aix",L_e="solaris",Q_e="z_os",Ket=D_e,Jet=B_e,Zet=N_e,Wet=O_e,Xet=w_e,ett=k_e,ttt=M_e,ntt=P_e,rtt=U_e,ott=L_e,itt=Q_e,att=bi([D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e,Q_e]),F_e="cpp",G_e="dotnet",j_e="erlang",H_e="go",z_e="java",$_e="nodejs",V_e="php",q_e="python",Y_e="ruby",K_e="webjs",stt=F_e,utt=G_e,ctt=j_e,ltt=H_e,dtt=z_e,ptt=$_e,ftt=V_e,Att=q_e,mtt=Y_e,gtt=K_e,htt=bi([F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e])});var Z_e=O(()=>{m();J_e()});var _tt,Ett,Stt,ytt,Ttt,Itt,Ctt,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Mtt,Ptt,Utt,Ltt,Qtt,Ftt,Gtt,jtt,g5,h5,Htt,VC,ztt,_5,E5,$tt,DS,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,S5,nnt,rnt,ont,int,ant,snt,BS,unt,cnt,lnt,dnt,pnt,fnt,Ant,mnt,gnt,hnt,_nt,Ent,Snt,tg,ng,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,Ont,wnt,knt,Mnt,Pnt,y5,T5,Unt,I5,C5,Lnt,Qnt,Fnt,Gnt,jnt,Hnt,znt,$nt,Vnt,qnt,Ynt,Knt,Jnt,Znt,b5,v5,Wnt,R5,Xnt,x5,ert,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,Srt,yrt,Trt,Irt,t_,Crt,brt,vrt,D5,W_e=O(()=>{m();_tt="aspnetcore.diagnostics.exception.result",Ett="aborted",Stt="handled",ytt="skipped",Ttt="unhandled",Itt="aspnetcore.diagnostics.handler.type",Ctt="aspnetcore.rate_limiting.policy",btt="aspnetcore.rate_limiting.result",vtt="acquired",Rtt="endpoint_limiter",xtt="global_limiter",Dtt="request_canceled",Btt="aspnetcore.request.is_unhandled",Ntt="aspnetcore.routing.is_fallback",Ott="aspnetcore.routing.match_status",wtt="failure",ktt="success",Mtt="aspnetcore.user.is_authenticated",Ptt="client.address",Utt="client.port",Ltt="code.column.number",Qtt="code.file.path",Ftt="code.function.name",Gtt="code.line.number",jtt="code.stacktrace",g5="db.collection.name",h5="db.namespace",Htt="db.operation.batch.size",VC="db.operation.name",ztt="db.query.summary",_5="db.query.text",E5="db.response.status_code",$tt="db.stored_procedure.name",DS="db.system.name",Vtt="mariadb",qtt="microsoft.sql_server",Ytt="mysql",Ktt="postgresql",Jtt="dotnet.gc.heap.generation",Ztt="gen0",Wtt="gen1",Xtt="gen2",ent="loh",tnt="poh",S5="error.type",nnt="_OTHER",rnt="exception.escaped",ont="exception.message",int="exception.stacktrace",ant="exception.type",snt=e=>`http.request.header.${e}`,BS="http.request.method",unt="_OTHER",cnt="CONNECT",lnt="DELETE",dnt="GET",pnt="HEAD",fnt="OPTIONS",Ant="PATCH",mnt="POST",gnt="PUT",hnt="TRACE",_nt="http.request.method_original",Ent="http.request.resend_count",Snt=e=>`http.response.header.${e}`,tg="http.response.status_code",ng="http.route",ynt="jvm.gc.action",Tnt="jvm.gc.name",Int="jvm.memory.pool.name",Cnt="jvm.memory.type",bnt="heap",vnt="non_heap",Rnt="jvm.thread.daemon",xnt="jvm.thread.state",Dnt="blocked",Bnt="new",Nnt="runnable",Ont="terminated",wnt="timed_waiting",knt="waiting",Mnt="network.local.address",Pnt="network.local.port",y5="network.peer.address",T5="network.peer.port",Unt="network.protocol.name",I5="network.protocol.version",C5="network.transport",Lnt="pipe",Qnt="quic",Fnt="tcp",Gnt="udp",jnt="unix",Hnt="network.type",znt="ipv4",$nt="ipv6",Vnt="otel.scope.name",qnt="otel.scope.version",Ynt="otel.status_code",Knt="ERROR",Jnt="OK",Znt="otel.status_description",b5="server.address",v5="server.port",Wnt="service.instance.id",R5="service.name",Xnt="service.namespace",x5="service.version",ert="signalr.connection.status",trt="app_shutdown",nrt="normal_closure",rrt="timeout",ort="signalr.transport",irt="long_polling",art="server_sent_events",srt="web_sockets",urt="telemetry.sdk.language",crt="cpp",lrt="dotnet",drt="erlang",prt="go",frt="java",Art="nodejs",mrt="php",grt="python",hrt="ruby",_rt="rust",Ert="swift",Srt="webjs",yrt="telemetry.sdk.name",Trt="telemetry.sdk.version",Irt="url.fragment",t_="url.full",Crt="url.path",brt="url.query",vrt="url.scheme",D5="user_agent.original"});var Rrt,xrt,Drt,Brt,Nrt,Ort,wrt,krt,Mrt,Prt,Urt,Lrt,Qrt,Frt,Grt,jrt,Hrt,zrt,$rt,Vrt,qrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,oot,iot,aot,sot,uot,cot,lot,dot,pot,fot,Aot,mot,got,hot,_ot,Eot,Sot,yot,Tot,Iot,X_e=O(()=>{m();Rrt="aspnetcore.diagnostics.exceptions",xrt="aspnetcore.rate_limiting.active_request_leases",Drt="aspnetcore.rate_limiting.queued_requests",Brt="aspnetcore.rate_limiting.request.time_in_queue",Nrt="aspnetcore.rate_limiting.request_lease.duration",Ort="aspnetcore.rate_limiting.requests",wrt="aspnetcore.routing.match_attempts",krt="db.client.operation.duration",Mrt="dotnet.assembly.count",Prt="dotnet.exceptions",Urt="dotnet.gc.collections",Lrt="dotnet.gc.heap.total_allocated",Qrt="dotnet.gc.last_collection.heap.fragmentation.size",Frt="dotnet.gc.last_collection.heap.size",Grt="dotnet.gc.last_collection.memory.committed_size",jrt="dotnet.gc.pause.time",Hrt="dotnet.jit.compilation.time",zrt="dotnet.jit.compiled_il.size",$rt="dotnet.jit.compiled_methods",Vrt="dotnet.monitor.lock_contentions",qrt="dotnet.process.cpu.count",Yrt="dotnet.process.cpu.time",Krt="dotnet.process.memory.working_set",Jrt="dotnet.thread_pool.queue.length",Zrt="dotnet.thread_pool.thread.count",Wrt="dotnet.thread_pool.work_item.count",Xrt="dotnet.timer.count",eot="http.client.request.duration",tot="http.server.request.duration",not="jvm.class.count",rot="jvm.class.loaded",oot="jvm.class.unloaded",iot="jvm.cpu.count",aot="jvm.cpu.recent_utilization",sot="jvm.cpu.time",uot="jvm.gc.duration",cot="jvm.memory.committed",lot="jvm.memory.limit",dot="jvm.memory.used",pot="jvm.memory.used_after_last_gc",fot="jvm.thread.count",Aot="kestrel.active_connections",mot="kestrel.active_tls_handshakes",got="kestrel.connection.duration",hot="kestrel.queued_connections",_ot="kestrel.queued_requests",Eot="kestrel.rejected_connections",Sot="kestrel.tls_handshake.duration",yot="kestrel.upgraded_connections",Tot="signalr.server.active_connections",Iot="signalr.server.connection.duration"});var Cot,eEe=O(()=>{m();Cot="exception"});var Ur={};za(Ur,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Ett,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Stt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>ytt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Ttt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>vtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Rtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>xtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Dtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>wtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>ktt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>_tt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Itt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Ctt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>btt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>Btt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Ntt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Ott,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Mtt,ATTR_CLIENT_ADDRESS:()=>Ptt,ATTR_CLIENT_PORT:()=>Utt,ATTR_CODE_COLUMN_NUMBER:()=>Ltt,ATTR_CODE_FILE_PATH:()=>Qtt,ATTR_CODE_FUNCTION_NAME:()=>Ftt,ATTR_CODE_LINE_NUMBER:()=>Gtt,ATTR_CODE_STACKTRACE:()=>jtt,ATTR_DB_COLLECTION_NAME:()=>g5,ATTR_DB_NAMESPACE:()=>h5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Htt,ATTR_DB_OPERATION_NAME:()=>VC,ATTR_DB_QUERY_SUMMARY:()=>ztt,ATTR_DB_QUERY_TEXT:()=>_5,ATTR_DB_RESPONSE_STATUS_CODE:()=>E5,ATTR_DB_STORED_PROCEDURE_NAME:()=>$tt,ATTR_DB_SYSTEM_NAME:()=>DS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Jtt,ATTR_ERROR_TYPE:()=>S5,ATTR_EXCEPTION_ESCAPED:()=>rnt,ATTR_EXCEPTION_MESSAGE:()=>ont,ATTR_EXCEPTION_STACKTRACE:()=>int,ATTR_EXCEPTION_TYPE:()=>ant,ATTR_HTTP_REQUEST_HEADER:()=>snt,ATTR_HTTP_REQUEST_METHOD:()=>BS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>_nt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Ent,ATTR_HTTP_RESPONSE_HEADER:()=>Snt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>tg,ATTR_HTTP_ROUTE:()=>ng,ATTR_JVM_GC_ACTION:()=>ynt,ATTR_JVM_GC_NAME:()=>Tnt,ATTR_JVM_MEMORY_POOL_NAME:()=>Int,ATTR_JVM_MEMORY_TYPE:()=>Cnt,ATTR_JVM_THREAD_DAEMON:()=>Rnt,ATTR_JVM_THREAD_STATE:()=>xnt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Mnt,ATTR_NETWORK_LOCAL_PORT:()=>Pnt,ATTR_NETWORK_PEER_ADDRESS:()=>y5,ATTR_NETWORK_PEER_PORT:()=>T5,ATTR_NETWORK_PROTOCOL_NAME:()=>Unt,ATTR_NETWORK_PROTOCOL_VERSION:()=>I5,ATTR_NETWORK_TRANSPORT:()=>C5,ATTR_NETWORK_TYPE:()=>Hnt,ATTR_OTEL_SCOPE_NAME:()=>Vnt,ATTR_OTEL_SCOPE_VERSION:()=>qnt,ATTR_OTEL_STATUS_CODE:()=>Ynt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Znt,ATTR_SERVER_ADDRESS:()=>b5,ATTR_SERVER_PORT:()=>v5,ATTR_SERVICE_INSTANCE_ID:()=>Wnt,ATTR_SERVICE_NAME:()=>R5,ATTR_SERVICE_NAMESPACE:()=>Xnt,ATTR_SERVICE_VERSION:()=>x5,ATTR_SIGNALR_CONNECTION_STATUS:()=>ert,ATTR_SIGNALR_TRANSPORT:()=>ort,ATTR_TELEMETRY_SDK_LANGUAGE:()=>urt,ATTR_TELEMETRY_SDK_NAME:()=>yrt,ATTR_TELEMETRY_SDK_VERSION:()=>Trt,ATTR_URL_FRAGMENT:()=>Irt,ATTR_URL_FULL:()=>t_,ATTR_URL_PATH:()=>Crt,ATTR_URL_QUERY:()=>brt,ATTR_URL_SCHEME:()=>vrt,ATTR_USER_AGENT_ORIGINAL:()=>D5,AWSECSLAUNCHTYPEVALUES_EC2:()=>Let,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Qet,AwsEcsLaunchtypeValues:()=>Fet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Eet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>yet,CLOUDPLATFORMVALUES_AWS_EC2:()=>Tet,CLOUDPLATFORMVALUES_AWS_ECS:()=>Iet,CLOUDPLATFORMVALUES_AWS_EKS:()=>Cet,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>vet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>bet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Det,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Net,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>xet,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Bet,CLOUDPLATFORMVALUES_AZURE_VM:()=>Ret,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Pet,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Met,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>wet,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Oet,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>ket,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Aet,CLOUDPROVIDERVALUES_AWS:()=>met,CLOUDPROVIDERVALUES_AZURE:()=>get,CLOUDPROVIDERVALUES_GCP:()=>het,CloudPlatformValues:()=>Uet,CloudProviderValues:()=>_et,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>WJe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>aZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>XJe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>iZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>tZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>uZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>nZe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>eZe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>sZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>oZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>rZe,DBSYSTEMVALUES_ADABAS:()=>yJe,DBSYSTEMVALUES_CACHE:()=>SJe,DBSYSTEMVALUES_CASSANDRA:()=>LJe,DBSYSTEMVALUES_CLOUDSCAPE:()=>pJe,DBSYSTEMVALUES_COCKROACHDB:()=>JJe,DBSYSTEMVALUES_COLDFUSION:()=>UJe,DBSYSTEMVALUES_COSMOSDB:()=>zJe,DBSYSTEMVALUES_COUCHBASE:()=>jJe,DBSYSTEMVALUES_COUCHDB:()=>HJe,DBSYSTEMVALUES_DB2:()=>uJe,DBSYSTEMVALUES_DERBY:()=>IJe,DBSYSTEMVALUES_DYNAMODB:()=>$Je,DBSYSTEMVALUES_EDB:()=>EJe,DBSYSTEMVALUES_ELASTICSEARCH:()=>YJe,DBSYSTEMVALUES_FILEMAKER:()=>CJe,DBSYSTEMVALUES_FIREBIRD:()=>TJe,DBSYSTEMVALUES_FIRSTSQL:()=>_Je,DBSYSTEMVALUES_GEODE:()=>qJe,DBSYSTEMVALUES_H2:()=>PJe,DBSYSTEMVALUES_HANADB:()=>gJe,DBSYSTEMVALUES_HBASE:()=>QJe,DBSYSTEMVALUES_HIVE:()=>dJe,DBSYSTEMVALUES_HSQLDB:()=>fJe,DBSYSTEMVALUES_INFORMIX:()=>bJe,DBSYSTEMVALUES_INGRES:()=>hJe,DBSYSTEMVALUES_INSTANTDB:()=>vJe,DBSYSTEMVALUES_INTERBASE:()=>RJe,DBSYSTEMVALUES_MARIADB:()=>xJe,DBSYSTEMVALUES_MAXDB:()=>mJe,DBSYSTEMVALUES_MEMCACHED:()=>KJe,DBSYSTEMVALUES_MONGODB:()=>FJe,DBSYSTEMVALUES_MSSQL:()=>iJe,DBSYSTEMVALUES_MYSQL:()=>aJe,DBSYSTEMVALUES_NEO4J:()=>VJe,DBSYSTEMVALUES_NETEZZA:()=>DJe,DBSYSTEMVALUES_ORACLE:()=>sJe,DBSYSTEMVALUES_OTHER_SQL:()=>oJe,DBSYSTEMVALUES_PERVASIVE:()=>BJe,DBSYSTEMVALUES_POINTBASE:()=>NJe,DBSYSTEMVALUES_POSTGRESQL:()=>cJe,DBSYSTEMVALUES_PROGRESS:()=>AJe,DBSYSTEMVALUES_REDIS:()=>GJe,DBSYSTEMVALUES_REDSHIFT:()=>lJe,DBSYSTEMVALUES_SQLITE:()=>OJe,DBSYSTEMVALUES_SYBASE:()=>wJe,DBSYSTEMVALUES_TERADATA:()=>kJe,DBSYSTEMVALUES_VERTICA:()=>MJe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Vtt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>qtt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Ytt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Ktt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Ztt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Wtt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Xtt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>ent,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>tnt,DbCassandraConsistencyLevelValues:()=>cZe,DbSystemValues:()=>ZJe,ERROR_TYPE_VALUE_OTHER:()=>nnt,EVENT_EXCEPTION:()=>Cot,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>_Ze,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>hZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>gZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>SZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>yZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>TZe,FAASINVOKEDPROVIDERVALUES_GCP:()=>IZe,FAASTRIGGERVALUES_DATASOURCE:()=>lZe,FAASTRIGGERVALUES_HTTP:()=>dZe,FAASTRIGGERVALUES_OTHER:()=>AZe,FAASTRIGGERVALUES_PUBSUB:()=>pZe,FAASTRIGGERVALUES_TIMER:()=>fZe,FaasDocumentOperationValues:()=>EZe,FaasInvokedProviderValues:()=>CZe,FaasTriggerValues:()=>mZe,HOSTARCHVALUES_AMD64:()=>Get,HOSTARCHVALUES_ARM32:()=>jet,HOSTARCHVALUES_ARM64:()=>Het,HOSTARCHVALUES_IA64:()=>zet,HOSTARCHVALUES_PPC32:()=>$et,HOSTARCHVALUES_PPC64:()=>Vet,HOSTARCHVALUES_X86:()=>qet,HTTPFLAVORVALUES_HTTP_1_0:()=>sWe,HTTPFLAVORVALUES_HTTP_1_1:()=>uWe,HTTPFLAVORVALUES_HTTP_2_0:()=>cWe,HTTPFLAVORVALUES_QUIC:()=>dWe,HTTPFLAVORVALUES_SPDY:()=>lWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>cnt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>lnt,HTTP_REQUEST_METHOD_VALUE_GET:()=>dnt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>pnt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>fnt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>unt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Ant,HTTP_REQUEST_METHOD_VALUE_POST:()=>mnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>gnt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>hnt,HostArchValues:()=>Yet,HttpFlavorValues:()=>pWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>bnt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>vnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Dnt,JVM_THREAD_STATE_VALUE_NEW:()=>Bnt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Nnt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Ont,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>wnt,JVM_THREAD_STATE_VALUE_WAITING:()=>knt,MESSAGETYPEVALUES_RECEIVED:()=>LWe,MESSAGETYPEVALUES_SENT:()=>UWe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>fWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>AWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>hWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>gWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Rrt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>xrt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Drt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ort,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Nrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Brt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>wrt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>krt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Mrt,METRIC_DOTNET_EXCEPTIONS:()=>Prt,METRIC_DOTNET_GC_COLLECTIONS:()=>Urt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Lrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Qrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Frt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Grt,METRIC_DOTNET_GC_PAUSE_TIME:()=>jrt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Hrt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>zrt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>$rt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Vrt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>qrt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Yrt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Krt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Jrt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Zrt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Wrt,METRIC_DOTNET_TIMER_COUNT:()=>Xrt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>eot,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>tot,METRIC_JVM_CLASS_COUNT:()=>not,METRIC_JVM_CLASS_LOADED:()=>rot,METRIC_JVM_CLASS_UNLOADED:()=>oot,METRIC_JVM_CPU_COUNT:()=>iot,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>aot,METRIC_JVM_CPU_TIME:()=>sot,METRIC_JVM_GC_DURATION:()=>uot,METRIC_JVM_MEMORY_COMMITTED:()=>cot,METRIC_JVM_MEMORY_LIMIT:()=>lot,METRIC_JVM_MEMORY_USED:()=>dot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>pot,METRIC_JVM_THREAD_COUNT:()=>fot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Aot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>mot,METRIC_KESTREL_CONNECTION_DURATION:()=>got,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>hot,METRIC_KESTREL_QUEUED_REQUESTS:()=>_ot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Eot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Sot,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>yot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Tot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Iot,MessageTypeValues:()=>QWe,MessagingDestinationKindValues:()=>mWe,MessagingOperationValues:()=>_We,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>jZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>$Ze,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>FZe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>WZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>HZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>zZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>JZe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>QZe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>eWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>VZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>YZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>XZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>qZe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>KZe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>nWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>ZZe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>iWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>rWe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>oWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>tWe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>GZe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>MZe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>PZe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>UZe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>wZe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>kZe,NETTRANSPORTVALUES_INPROC:()=>BZe,NETTRANSPORTVALUES_IP:()=>RZe,NETTRANSPORTVALUES_IP_TCP:()=>bZe,NETTRANSPORTVALUES_IP_UDP:()=>vZe,NETTRANSPORTVALUES_OTHER:()=>NZe,NETTRANSPORTVALUES_PIPE:()=>DZe,NETTRANSPORTVALUES_UNIX:()=>xZe,NETWORK_TRANSPORT_VALUE_PIPE:()=>Lnt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Qnt,NETWORK_TRANSPORT_VALUE_TCP:()=>Fnt,NETWORK_TRANSPORT_VALUE_UDP:()=>Gnt,NETWORK_TRANSPORT_VALUE_UNIX:()=>jnt,NETWORK_TYPE_VALUE_IPV4:()=>znt,NETWORK_TYPE_VALUE_IPV6:()=>$nt,NetHostConnectionSubtypeValues:()=>aWe,NetHostConnectionTypeValues:()=>LZe,NetTransportValues:()=>OZe,OSTYPEVALUES_AIX:()=>rtt,OSTYPEVALUES_DARWIN:()=>Zet,OSTYPEVALUES_DRAGONFLYBSD:()=>ttt,OSTYPEVALUES_FREEBSD:()=>Wet,OSTYPEVALUES_HPUX:()=>ntt,OSTYPEVALUES_LINUX:()=>Jet,OSTYPEVALUES_NETBSD:()=>Xet,OSTYPEVALUES_OPENBSD:()=>ett,OSTYPEVALUES_SOLARIS:()=>ott,OSTYPEVALUES_WINDOWS:()=>Ket,OSTYPEVALUES_Z_OS:()=>itt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Knt,OTEL_STATUS_CODE_VALUE_OK:()=>Jnt,OsTypeValues:()=>att,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>DWe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>bWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>SWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>kWe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>IWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>xWe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>OWe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>TWe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>CWe,RPCGRPCSTATUSCODEVALUES_OK:()=>EWe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>BWe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>vWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>RWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>MWe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>wWe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>NWe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>yWe,RpcGrpcStatusCodeValues:()=>PWe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>mKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>RKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>pKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>uKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>bKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>SKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>_Ke,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>xKe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>gKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>cKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>AKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>EKe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>fKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>lKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>dKe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>vKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>TKe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>IKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>hKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>yKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>sKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>CKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>X7e,SEMATTRS_CODE_FILEPATH:()=>ZYe,SEMATTRS_CODE_FUNCTION:()=>KYe,SEMATTRS_CODE_LINENO:()=>WYe,SEMATTRS_CODE_NAMESPACE:()=>JYe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>uYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>fYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>pYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>lYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>aYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>sYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>dYe,SEMATTRS_DB_CASSANDRA_TABLE:()=>cYe,SEMATTRS_DB_CONNECTION_STRING:()=>eYe,SEMATTRS_DB_HBASE_NAMESPACE:()=>AYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>nYe,SEMATTRS_DB_MONGODB_COLLECTION:()=>gYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>iYe,SEMATTRS_DB_NAME:()=>rYe,SEMATTRS_DB_OPERATION:()=>oYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>mYe,SEMATTRS_DB_SQL_TABLE:()=>hYe,SEMATTRS_DB_STATEMENT:()=>r5,SEMATTRS_DB_SYSTEM:()=>n5,SEMATTRS_DB_USER:()=>tYe,SEMATTRS_ENDUSER_ID:()=>zYe,SEMATTRS_ENDUSER_ROLE:()=>$Ye,SEMATTRS_ENDUSER_SCOPE:()=>VYe,SEMATTRS_EXCEPTION_ESCAPED:()=>yYe,SEMATTRS_EXCEPTION_MESSAGE:()=>EYe,SEMATTRS_EXCEPTION_STACKTRACE:()=>SYe,SEMATTRS_EXCEPTION_TYPE:()=>_Ye,SEMATTRS_FAAS_COLDSTART:()=>DYe,SEMATTRS_FAAS_CRON:()=>xYe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>IYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>vYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>CYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>bYe,SEMATTRS_FAAS_EXECUTION:()=>TYe,SEMATTRS_FAAS_INVOKED_NAME:()=>BYe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>NYe,SEMATTRS_FAAS_INVOKED_REGION:()=>OYe,SEMATTRS_FAAS_TIME:()=>RYe,SEMATTRS_FAAS_TRIGGER:()=>o5,SEMATTRS_HTTP_CLIENT_IP:()=>aKe,SEMATTRS_HTTP_FLAVOR:()=>tKe,SEMATTRS_HTTP_HOST:()=>XYe,SEMATTRS_HTTP_METHOD:()=>rB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>rKe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>oKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>c5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>l5,SEMATTRS_HTTP_ROUTE:()=>d5,SEMATTRS_HTTP_SCHEME:()=>eKe,SEMATTRS_HTTP_SERVER_NAME:()=>iKe,SEMATTRS_HTTP_STATUS_CODE:()=>xS,SEMATTRS_HTTP_TARGET:()=>u5,SEMATTRS_HTTP_URL:()=>$C,SEMATTRS_HTTP_USER_AGENT:()=>nKe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>tJe,SEMATTRS_MESSAGE_ID:()=>eJe,SEMATTRS_MESSAGE_TYPE:()=>XKe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>nJe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>FKe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>PKe,SEMATTRS_MESSAGING_DESTINATION:()=>DKe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>BKe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>zKe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>HKe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>jKe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>$Ke,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>VKe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>MKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>LKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>UKe,SEMATTRS_MESSAGING_OPERATION:()=>QKe,SEMATTRS_MESSAGING_PROTOCOL:()=>OKe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>wKe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>GKe,SEMATTRS_MESSAGING_SYSTEM:()=>p5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>NKe,SEMATTRS_MESSAGING_URL:()=>kKe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>jYe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>FYe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>GYe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>QYe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>LYe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>UYe,SEMATTRS_NET_HOST_IP:()=>a5,SEMATTRS_NET_HOST_NAME:()=>PYe,SEMATTRS_NET_HOST_PORT:()=>s5,SEMATTRS_NET_PEER_IP:()=>i5,SEMATTRS_NET_PEER_NAME:()=>MYe,SEMATTRS_NET_PEER_PORT:()=>kYe,SEMATTRS_NET_TRANSPORT:()=>wYe,SEMATTRS_PEER_SERVICE:()=>HYe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>A5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>ZKe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>WKe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>JKe,SEMATTRS_RPC_JSONRPC_VERSION:()=>KKe,SEMATTRS_RPC_METHOD:()=>YKe,SEMATTRS_RPC_SERVICE:()=>f5,SEMATTRS_RPC_SYSTEM:()=>qKe,SEMATTRS_THREAD_ID:()=>qYe,SEMATTRS_THREAD_NAME:()=>YYe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>VWe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>$We,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>qWe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>YWe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>KWe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>JWe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>ZWe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>XWe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>WWe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>tXe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>eXe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>GWe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>HWe,SEMRESATTRS_CLOUD_PLATFORM:()=>zWe,SEMRESATTRS_CLOUD_PROVIDER:()=>FWe,SEMRESATTRS_CLOUD_REGION:()=>jWe,SEMRESATTRS_CONTAINER_ID:()=>rXe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>iXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>aXe,SEMRESATTRS_CONTAINER_NAME:()=>nXe,SEMRESATTRS_CONTAINER_RUNTIME:()=>oXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>sXe,SEMRESATTRS_DEVICE_ID:()=>uXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>cXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>lXe,SEMRESATTRS_FAAS_ID:()=>pXe,SEMRESATTRS_FAAS_INSTANCE:()=>AXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>mXe,SEMRESATTRS_FAAS_NAME:()=>dXe,SEMRESATTRS_FAAS_VERSION:()=>fXe,SEMRESATTRS_HOST_ARCH:()=>EXe,SEMRESATTRS_HOST_ID:()=>gXe,SEMRESATTRS_HOST_IMAGE_ID:()=>yXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>SXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>TXe,SEMRESATTRS_HOST_NAME:()=>hXe,SEMRESATTRS_HOST_TYPE:()=>_Xe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>IXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>DXe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>GXe,SEMRESATTRS_K8S_CRONJOB_UID:()=>FXe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>UXe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>PXe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>wXe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>OXe,SEMRESATTRS_K8S_JOB_NAME:()=>QXe,SEMRESATTRS_K8S_JOB_UID:()=>LXe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>vXe,SEMRESATTRS_K8S_NODE_NAME:()=>CXe,SEMRESATTRS_K8S_NODE_UID:()=>bXe,SEMRESATTRS_K8S_POD_NAME:()=>xXe,SEMRESATTRS_K8S_POD_UID:()=>RXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>NXe,SEMRESATTRS_K8S_REPLICASET_UID:()=>BXe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>MXe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>kXe,SEMRESATTRS_OS_DESCRIPTION:()=>HXe,SEMRESATTRS_OS_NAME:()=>zXe,SEMRESATTRS_OS_TYPE:()=>jXe,SEMRESATTRS_OS_VERSION:()=>$Xe,SEMRESATTRS_PROCESS_COMMAND:()=>KXe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>ZXe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>JXe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>qXe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>YXe,SEMRESATTRS_PROCESS_OWNER:()=>WXe,SEMRESATTRS_PROCESS_PID:()=>VXe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>tet,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>XXe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>eet,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>ret,SEMRESATTRS_SERVICE_NAME:()=>net,SEMRESATTRS_SERVICE_NAMESPACE:()=>m5,SEMRESATTRS_SERVICE_VERSION:()=>oet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>uet,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>aet,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>iet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>set,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>pet,SEMRESATTRS_WEBENGINE_NAME:()=>cet,SEMRESATTRS_WEBENGINE_VERSION:()=>det,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>trt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>nrt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>rrt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>irt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>art,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>srt,SemanticAttributes:()=>rJe,SemanticResourceAttributes:()=>fet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>stt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>utt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>ctt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>ltt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>dtt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>ptt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>ftt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Att,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>mtt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>gtt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>crt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>lrt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>drt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>prt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>frt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Art,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>mrt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>grt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>hrt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>_rt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Ert,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Srt,TelemetrySdkLanguageValues:()=>htt});var Zn=O(()=>{m();bge();Z_e();W_e();X_e();eEe()});var tEe=F(y2=>{"use strict";m();Object.defineProperty(y2,"__esModule",{value:!0});y2.ATTR_PROCESS_RUNTIME_NAME=void 0;y2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var nEe=F(I2=>{"use strict";m();Object.defineProperty(I2,"__esModule",{value:!0});I2.SDK_INFO=void 0;var bot=kde(),T2=(Zn(),Me(Ur)),vot=tEe();I2.SDK_INFO={[T2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[vot.ATTR_PROCESS_RUNTIME_NAME]:"node",[T2.ATTR_TELEMETRY_SDK_LANGUAGE]:T2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[T2.ATTR_TELEMETRY_SDK_VERSION]:bot.VERSION}});var rEe=F(Zs=>{"use strict";m();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.otperformance=Zs.SDK_INFO=Zs._globalThis=Zs.getStringListFromEnv=Zs.getNumberFromEnv=Zs.getBooleanFromEnv=Zs.getStringFromEnv=void 0;var C2=Ode();Object.defineProperty(Zs,"getStringFromEnv",{enumerable:!0,get:function(){return C2.getStringFromEnv}});Object.defineProperty(Zs,"getBooleanFromEnv",{enumerable:!0,get:function(){return C2.getBooleanFromEnv}});Object.defineProperty(Zs,"getNumberFromEnv",{enumerable:!0,get:function(){return C2.getNumberFromEnv}});Object.defineProperty(Zs,"getStringListFromEnv",{enumerable:!0,get:function(){return C2.getStringListFromEnv}});var Rot=wde();Object.defineProperty(Zs,"_globalThis",{enumerable:!0,get:function(){return Rot._globalThis}});var xot=nEe();Object.defineProperty(Zs,"SDK_INFO",{enumerable:!0,get:function(){return xot.SDK_INFO}});Zs.otperformance=performance});var B5=F(Ws=>{"use strict";m();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getStringFromEnv=Ws.getBooleanFromEnv=Ws.otperformance=Ws._globalThis=Ws.SDK_INFO=void 0;var NS=rEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return NS.SDK_INFO}});Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return NS._globalThis}});Object.defineProperty(Ws,"otperformance",{enumerable:!0,get:function(){return NS.otperformance}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return NS.getBooleanFromEnv}});Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return NS.getStringFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return NS.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return NS.getStringListFromEnv}})});var sEe=F(ao=>{"use strict";m();Object.defineProperty(ao,"__esModule",{value:!0});ao.addHrTimes=ao.isTimeInput=ao.isTimeInputHrTime=ao.hrTimeToMicroseconds=ao.hrTimeToMilliseconds=ao.hrTimeToNanoseconds=ao.hrTimeToTimeStamp=ao.hrTimeDuration=ao.timeInputToHrTime=ao.hrTime=ao.getTimeOrigin=ao.millisToHrTime=void 0;var b2=B5(),oEe=9,Dot=6,Bot=Math.pow(10,Dot),v2=Math.pow(10,oEe);function oB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Bot);return[n,r]}ao.millisToHrTime=oB;function Not(){return b2.otperformance.timeOrigin}ao.getTimeOrigin=Not;function iEe(e){let t=oB(b2.otperformance.timeOrigin),n=oB(typeof e=="number"?e:b2.otperformance.now());return aEe(t,n)}ao.hrTime=iEe;function Oot(e){if(N5(e))return e;if(typeof e=="number")return e<b2.otperformance.timeOrigin?iEe(e):oB(e);if(e instanceof Date)return oB(e.getTime());throw TypeError("Invalid input type")}ao.timeInputToHrTime=Oot;function wot(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=v2),[n,r]}ao.hrTimeDuration=wot;function kot(e){let t=oEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}ao.hrTimeToTimeStamp=kot;function Mot(e){return e[0]*v2+e[1]}ao.hrTimeToNanoseconds=Mot;function Pot(e){return e[0]*1e3+e[1]/1e6}ao.hrTimeToMilliseconds=Pot;function Uot(e){return e[0]*1e6+e[1]/1e3}ao.hrTimeToMicroseconds=Uot;function N5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}ao.isTimeInputHrTime=N5;function Lot(e){return N5(e)||typeof e=="number"||e instanceof Date}ao.isTimeInput=Lot;function aEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=v2&&(n[1]-=v2,n[0]+=1),n}ao.addHrTimes=aEe});var uEe=F(R2=>{"use strict";m();Object.defineProperty(R2,"__esModule",{value:!0});R2.unrefTimer=void 0;function Qot(e){typeof e!="number"&&e.unref()}R2.unrefTimer=Qot});var cEe=F(iB=>{"use strict";m();Object.defineProperty(iB,"__esModule",{value:!0});iB.ExportResultCode=void 0;var Fot;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Fot=iB.ExportResultCode||(iB.ExportResultCode={}))});var dEe=F(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.CompositePropagator=void 0;var lEe=(je(),Me(We)),O5=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){lEe.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){lEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};x2.CompositePropagator=O5});var pEe=F(qC=>{"use strict";m();Object.defineProperty(qC,"__esModule",{value:!0});qC.validateValue=qC.validateKey=void 0;var w5="[_0-9a-z-*/]",Got=`[a-z]${w5}{0,255}`,jot=`[a-z0-9]${w5}{0,240}@[a-z]${w5}{0,13}`,Hot=new RegExp(`^(?:${Got}|${jot})$`),zot=/^[ -~]{0,255}[!-~]$/,$ot=/,|=/;function Vot(e){return Hot.test(e)}qC.validateKey=Vot;function qot(e){return zot.test(e)&&!$ot.test(e)}qC.validateValue=qot});var M5=F(D2=>{"use strict";m();Object.defineProperty(D2,"__esModule",{value:!0});D2.TraceState=void 0;var fEe=pEe(),AEe=32,Yot=512,mEe=",",gEe="=",k5=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+gEe+this.get(n)),t),[]).join(mEe)}_parse(t){t.length>Yot||(this._internalState=t.split(mEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(gEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,fEe.validateKey)(a)&&(0,fEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>AEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,AEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};D2.TraceState=k5});var _Ee=F(Xs=>{"use strict";m();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.W3CTraceContextPropagator=Xs.parseTraceParent=Xs.TRACE_STATE_HEADER=Xs.TRACE_PARENT_HEADER=void 0;var B2=(je(),Me(We)),Kot=nB(),Jot=M5();Xs.TRACE_PARENT_HEADER="traceparent";Xs.TRACE_STATE_HEADER="tracestate";var Zot="00",Wot="(?!ff)[\\da-f]{2}",Xot="(?![0]{32})[\\da-f]{32}",eit="(?![0]{16})[\\da-f]{16}",tit="[\\da-f]{2}",nit=new RegExp(`^\\s?(${Wot})-(${Xot})-(${eit})-(${tit})(-.*)?\\s?$`);function hEe(e){let t=nit.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Xs.parseTraceParent=hEe;var P5=class{inject(t,n,r){let o=B2.trace.getSpanContext(t);if(!o||(0,Kot.isTracingSuppressed)(t)||!(0,B2.isSpanContextValid)(o))return;let i=`${Zot}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||B2.TraceFlags.NONE).toString(16)}`;r.set(n,Xs.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Xs.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Xs.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=hEe(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Xs.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new Jot.TraceState(typeof d=="string"?d:void 0)}return B2.trace.setSpanContext(t,a)}fields(){return[Xs.TRACE_PARENT_HEADER,Xs.TRACE_STATE_HEADER]}};Xs.W3CTraceContextPropagator=P5});var EEe=F(qp=>{"use strict";m();Object.defineProperty(qp,"__esModule",{value:!0});qp.getRPCMetadata=qp.deleteRPCMetadata=qp.setRPCMetadata=qp.RPCType=void 0;var rit=(je(),Me(We)),U5=(0,rit.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),oit;(function(e){e.HTTP="http"})(oit=qp.RPCType||(qp.RPCType={}));function iit(e,t){return e.setValue(U5,t)}qp.setRPCMetadata=iit;function ait(e){return e.deleteValue(U5)}qp.deleteRPCMetadata=ait;function sit(e){return e.getValue(U5)}qp.getRPCMetadata=sit});var CEe=F(N2=>{"use strict";m();Object.defineProperty(N2,"__esModule",{value:!0});N2.isPlainObject=void 0;var uit="[object Object]",cit="[object Null]",lit="[object Undefined]",dit=Function.prototype,SEe=dit.toString,pit=SEe.call(Object),fit=Object.getPrototypeOf,yEe=Object.prototype,TEe=yEe.hasOwnProperty,OS=Symbol?Symbol.toStringTag:void 0,IEe=yEe.toString;function Ait(e){if(!mit(e)||git(e)!==uit)return!1;let t=fit(e);if(t===null)return!0;let n=TEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&SEe.call(n)===pit}N2.isPlainObject=Ait;function mit(e){return e!=null&&typeof e=="object"}function git(e){return e==null?e===void 0?lit:cit:OS&&OS in Object(e)?hit(e):_it(e)}function hit(e){let t=TEe.call(e,OS),n=e[OS],r=!1;try{e[OS]=void 0,r=!0}catch{}let o=IEe.call(e);return r&&(t?e[OS]=n:delete e[OS]),o}function _it(e){return IEe.call(e)}});var DEe=F(k2=>{"use strict";m();Object.defineProperty(k2,"__esModule",{value:!0});k2.merge=void 0;var bEe=CEe(),Eit=20;function Sit(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=REe(t,e.shift(),0,n);return t}k2.merge=Sit;function L5(e){return w2(e)?e.slice():e}function REe(e,t,n=0,r){let o;if(!(n>Eit)){if(n++,O2(e)||O2(t)||xEe(t))o=L5(t);else if(w2(e)){if(o=e.slice(),w2(t))for(let i=0,a=t.length;i<a;i++)o.push(L5(t[i]));else if(aB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=L5(t[d])}}}else if(aB(e))if(aB(t)){if(!yit(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],g=t[d];if(O2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(vEe(e,d,r)||vEe(t,d,r))delete o[d];else{if(aB(h)&&aB(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]=REe(o[d],g,n,r)}}}}else o=t;return o}}function vEe(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 w2(e){return Array.isArray(e)}function xEe(e){return typeof e=="function"}function aB(e){return!O2(e)&&!w2(e)&&!xEe(e)&&typeof e=="object"}function O2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function yit(e,t){return!(!(0,bEe.isPlainObject)(e)||!(0,bEe.isPlainObject)(t))}});var BEe=F(YC=>{"use strict";m();Object.defineProperty(YC,"__esModule",{value:!0});YC.callWithTimeout=YC.TimeoutError=void 0;var M2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};YC.TimeoutError=M2;function Tit(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new M2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}YC.callWithTimeout=Tit});var OEe=F(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.isUrlIgnored=KC.urlMatches=void 0;function NEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}KC.urlMatches=NEe;function Iit(e,t){if(!t)return!1;for(let n of t)if(NEe(e,n))return!0;return!1}KC.isUrlIgnored=Iit});var wEe=F(P2=>{"use strict";m();Object.defineProperty(P2,"__esModule",{value:!0});P2.Deferred=void 0;var Q5=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)}};P2.Deferred=Q5});var kEe=F(U2=>{"use strict";m();Object.defineProperty(U2,"__esModule",{value:!0});U2.BindOnceFuture=void 0;var Cit=wEe(),F5=class{_isCalled=!1;_deferred=new Cit.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}};U2.BindOnceFuture=F5});var PEe=F(L2=>{"use strict";m();Object.defineProperty(L2,"__esModule",{value:!0});L2.diagLogLevelFromString=void 0;var rg=(je(),Me(We)),MEe={ALL:rg.DiagLogLevel.ALL,VERBOSE:rg.DiagLogLevel.VERBOSE,DEBUG:rg.DiagLogLevel.DEBUG,INFO:rg.DiagLogLevel.INFO,WARN:rg.DiagLogLevel.WARN,ERROR:rg.DiagLogLevel.ERROR,NONE:rg.DiagLogLevel.NONE};function bit(e){if(e==null)return;let t=MEe[e.toUpperCase()];return t??(rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(MEe)}, using default`),rg.DiagLogLevel.INFO)}L2.diagLogLevelFromString=bit});var LEe=F(Q2=>{"use strict";m();Object.defineProperty(Q2,"__esModule",{value:!0});Q2._export=void 0;var UEe=(je(),Me(We)),vit=nB();function Rit(e,t){return new Promise(n=>{UEe.context.with((0,vit.suppressTracing)(UEe.context.active()),()=>{e.export(t,n)})})}Q2._export=Rit});var Tr=F(Oe=>{"use strict";m();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.internal=Oe.diagLogLevelFromString=Oe.BindOnceFuture=Oe.urlMatches=Oe.isUrlIgnored=Oe.callWithTimeout=Oe.TimeoutError=Oe.merge=Oe.TraceState=Oe.unsuppressTracing=Oe.suppressTracing=Oe.isTracingSuppressed=Oe.setRPCMetadata=Oe.getRPCMetadata=Oe.deleteRPCMetadata=Oe.RPCType=Oe.parseTraceParent=Oe.W3CTraceContextPropagator=Oe.TRACE_STATE_HEADER=Oe.TRACE_PARENT_HEADER=Oe.CompositePropagator=Oe.otperformance=Oe.getStringListFromEnv=Oe.getNumberFromEnv=Oe.getBooleanFromEnv=Oe.getStringFromEnv=Oe._globalThis=Oe.SDK_INFO=Oe.parseKeyPairsIntoRecord=Oe.ExportResultCode=Oe.unrefTimer=Oe.timeInputToHrTime=Oe.millisToHrTime=Oe.isTimeInputHrTime=Oe.isTimeInput=Oe.hrTimeToTimeStamp=Oe.hrTimeToNanoseconds=Oe.hrTimeToMilliseconds=Oe.hrTimeToMicroseconds=Oe.hrTimeDuration=Oe.hrTime=Oe.getTimeOrigin=Oe.addHrTimes=Oe.loggingErrorHandler=Oe.setGlobalErrorHandler=Oe.globalErrorHandler=Oe.sanitizeAttributes=Oe.isAttributeValue=Oe.AnchoredClock=Oe.W3CBaggagePropagator=void 0;var xit=Sde();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return xit.W3CBaggagePropagator}});var Dit=yde();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return Dit.AnchoredClock}});var QEe=vde();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return QEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return QEe.sanitizeAttributes}});var FEe=xde();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return FEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return FEe.setGlobalErrorHandler}});var Bit=e5();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return Bit.loggingErrorHandler}});var Dd=sEe();Object.defineProperty(Oe,"addHrTimes",{enumerable:!0,get:function(){return Dd.addHrTimes}});Object.defineProperty(Oe,"getTimeOrigin",{enumerable:!0,get:function(){return Dd.getTimeOrigin}});Object.defineProperty(Oe,"hrTime",{enumerable:!0,get:function(){return Dd.hrTime}});Object.defineProperty(Oe,"hrTimeDuration",{enumerable:!0,get:function(){return Dd.hrTimeDuration}});Object.defineProperty(Oe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMicroseconds}});Object.defineProperty(Oe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMilliseconds}});Object.defineProperty(Oe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Dd.hrTimeToNanoseconds}});Object.defineProperty(Oe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Dd.hrTimeToTimeStamp}});Object.defineProperty(Oe,"isTimeInput",{enumerable:!0,get:function(){return Dd.isTimeInput}});Object.defineProperty(Oe,"isTimeInputHrTime",{enumerable:!0,get:function(){return Dd.isTimeInputHrTime}});Object.defineProperty(Oe,"millisToHrTime",{enumerable:!0,get:function(){return Dd.millisToHrTime}});Object.defineProperty(Oe,"timeInputToHrTime",{enumerable:!0,get:function(){return Dd.timeInputToHrTime}});var Nit=uEe();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return Nit.unrefTimer}});var Oit=cEe();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return Oit.ExportResultCode}});var wit=K$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return wit.parseKeyPairsIntoRecord}});var wS=B5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return wS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return wS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return wS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return wS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return wS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return wS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return wS.otperformance}});var kit=dEe();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return kit.CompositePropagator}});var F2=_Ee();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return F2.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return F2.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return F2.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return F2.parseTraceParent}});var G2=EEe();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return G2.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return G2.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return G2.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return G2.setRPCMetadata}});var G5=nB();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return G5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return G5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return G5.unsuppressTracing}});var Mit=M5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return Mit.TraceState}});var Pit=DEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return Pit.merge}});var GEe=BEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return GEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return GEe.callWithTimeout}});var jEe=OEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return jEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return jEe.urlMatches}});var Uit=kEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return Uit.BindOnceFuture}});var Lit=PEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return Lit.diagLogLevelFromString}});var Qit=LEe();Oe.internal={_export:Qit._export}});var HEe=F(j2=>{"use strict";m();Object.defineProperty(j2,"__esModule",{value:!0});j2.VERSION=void 0;j2.VERSION="0.214.0"});var zEe=F(sB=>{"use strict";m();Object.defineProperty(sB,"__esModule",{value:!0});sB.SeverityNumber=void 0;var Fit;(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"})(Fit=sB.SeverityNumber||(sB.SeverityNumber={}))});var z2=F(JC=>{"use strict";m();Object.defineProperty(JC,"__esModule",{value:!0});JC.NOOP_LOGGER=JC.NoopLogger=void 0;var H2=class{emit(t){}};JC.NoopLogger=H2;JC.NOOP_LOGGER=new H2});var $Ee=F(lA=>{"use strict";m();Object.defineProperty(lA,"__esModule",{value:!0});lA.API_BACKWARDS_COMPATIBILITY_VERSION=lA.makeGetter=lA._global=lA.GLOBAL_LOGS_API_KEY=void 0;lA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");lA._global=globalThis;function Git(e,t,n){return r=>r===e?t:n}lA.makeGetter=Git;lA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var j5=F(ZC=>{"use strict";m();Object.defineProperty(ZC,"__esModule",{value:!0});ZC.NOOP_LOGGER_PROVIDER=ZC.NoopLoggerProvider=void 0;var jit=z2(),$2=class{getLogger(t,n,r){return new jit.NoopLogger}};ZC.NoopLoggerProvider=$2;ZC.NOOP_LOGGER_PROVIDER=new $2});var VEe=F(V2=>{"use strict";m();Object.defineProperty(V2,"__esModule",{value:!0});V2.ProxyLogger=void 0;var Hit=z2(),H5=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):Hit.NOOP_LOGGER}};V2.ProxyLogger=H5});var qEe=F(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.ProxyLoggerProvider=void 0;var zit=j5(),$it=VEe(),z5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new $it.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:zit.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)}};q2.ProxyLoggerProvider=z5});var KEe=F(Y2=>{"use strict";m();Object.defineProperty(Y2,"__esModule",{value:!0});Y2.LogsAPI=void 0;var Bd=$Ee(),Vit=j5(),YEe=qEe(),$5=class e{constructor(){this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Bd._global[Bd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Bd._global[Bd.GLOBAL_LOGS_API_KEY]=(0,Bd.makeGetter)(Bd.API_BACKWARDS_COMPATIBILITY_VERSION,t,Vit.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Bd._global[Bd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Bd._global,Bd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Bd._global[Bd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}};Y2.LogsAPI=$5});var V5=F(dA=>{"use strict";m();Object.defineProperty(dA,"__esModule",{value:!0});dA.logs=dA.NoopLogger=dA.NOOP_LOGGER=dA.SeverityNumber=void 0;var qit=zEe();Object.defineProperty(dA,"SeverityNumber",{enumerable:!0,get:function(){return qit.SeverityNumber}});var JEe=z2();Object.defineProperty(dA,"NOOP_LOGGER",{enumerable:!0,get:function(){return JEe.NOOP_LOGGER}});Object.defineProperty(dA,"NoopLogger",{enumerable:!0,get:function(){return JEe.NoopLogger}});var Yit=KEe();dA.logs=Yit.LogsAPI.getInstance()});var ZEe=F(WC=>{"use strict";m();Object.defineProperty(WC,"__esModule",{value:!0});WC.disableInstrumentations=WC.enableInstrumentations=void 0;function Kit(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()}}WC.enableInstrumentations=Kit;function Jit(e){e.forEach(t=>t.disable())}WC.disableInstrumentations=Jit});var e0e=F(K2=>{"use strict";m();Object.defineProperty(K2,"__esModule",{value:!0});K2.registerInstrumentations=void 0;var WEe=(je(),Me(We)),Zit=V5(),XEe=ZEe();function Wit(e){let t=e.tracerProvider||WEe.trace.getTracerProvider(),n=e.meterProvider||WEe.metrics.getMeterProvider(),r=e.loggerProvider||Zit.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,XEe.enableInstrumentations)(o,t,n,r),()=>{(0,XEe.disableInstrumentations)(o)}}K2.registerInstrumentations=Wit});var c0e=F(J2=>{"use strict";m();Object.defineProperty(J2,"__esModule",{value:!0});J2.satisfies=void 0;var J5=(je(),Me(We)),i0e=/^(?: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-]+)*))?$/,Xit=/^(?<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-]+)*))?$/,eat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function tat(e,t,n){if(!nat(e))return J5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=aat(e);if(!r)return!1;let o=[],i=a0e(r,t,o,n);return i&&!n?.includePrerelease?oat(r,o):i}J2.satisfies=tat;function nat(e){return typeof e=="string"&&i0e.test(e)}function a0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(q5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Rat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!q5(e,i,n,r))return!1;return!0}return q5(e,t,n,r)}function q5(e,t,n,r){if(t=iat(t,r),t.includes(" "))return a0e(e,t,n,r);{let o=sat(t);return n.push(o),rat(e,o)}}function rat(e,t){if(t.invalid)return!1;if(!t.version||K5(t.version))return!0;let n=n0e(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=n0e(r,o)}return eat[t.op]?.includes(n)}function oat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function iat(e,t){return e=e.trim(),e=bat(e,t),e=Cat(e),e=vat(e,t),e=e.trim(),e}function wu(e){return!e||e.toLowerCase()==="x"||e==="*"}function aat(e){let t=e.match(i0e);if(!t){J5.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 sat(e){if(!e)return{};let t=e.match(Xit);if(!t)return J5.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 K5(e){return e==="*"||e==="x"||e==="X"}function t0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function uat(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 cat(e,t){if(K5(e)||K5(t))return 0;let[n,r]=uat(t0e(e),t0e(t));return n>r?1:n<r?-1:0}function n0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=cat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var s0e="[a-zA-Z0-9-]",u0e="0|[1-9]\\d*",lat=`\\d*[a-zA-Z-]${s0e}*`,dat="((?:<|>)?=?)",r0e=`(?:${u0e}|${lat})`,pat=`(?:-(${r0e}(?:\\.${r0e})*))`,o0e=`${s0e}+`,fat=`(?:\\+(${o0e}(?:\\.${o0e})*))`,Y5=`${u0e}|x|X|\\*`,uB=`[v=\\s]*(${Y5})(?:\\.(${Y5})(?:\\.(${Y5})(?:${pat})?${fat}?)?)?`,Aat=`^${dat}\\s*${uB}$`,mat=new RegExp(Aat),gat=`^\\s*(${uB})\\s+-\\s+(${uB})\\s*$`,hat=new RegExp(gat),_at="(?:~>?)",Eat=`^${_at}${uB}$`,Sat=new RegExp(Eat),yat="(?:\\^)",Tat=`^${yat}${uB}$`,Iat=new RegExp(Tat);function Cat(e){let t=Sat;return e.replace(t,(n,r,o,i,a)=>{let c;return wu(r)?c="":wu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:wu(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 bat(e,t){let n=Iat,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return wu(i)?g="":wu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:wu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function vat(e,t){let n=mat;return e.replace(n,(r,o,i,a,c,d)=>{let g=wu(i),h=g||wu(a),S=h||wu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?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 Rat(e,t){let n=hat;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(wu(i)?o="":wu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:wu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,wu(S)?h="":wu(y)?h=`<${+S+1}.0.0-0`:wu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var Z5=F(Ts=>{"use strict";m();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.massUnwrap=Ts.unwrap=Ts.massWrap=Ts.wrap=void 0;var ku=console.error.bind(console);function cB(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 xat=(e,t,n)=>{if(!e||!e[t]){ku("no original function "+String(t)+" to wrap");return}if(!n){ku("no wrapper function"),ku(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ku("original object and wrapper must be functions");return}let o=n(r,t);return cB(o,"__original",r),cB(o,"__unwrap",()=>{e[t]===o&&cB(e,t,r)}),cB(o,"__wrapped",!0),cB(e,t,o),o};Ts.wrap=xat;var Dat=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ts.wrap)(r,o,n)})})};Ts.massWrap=Dat;var Bat=(e,t)=>{if(!e||!e[t]){ku("no function to unwrap."),ku(new Error().stack);return}let n=e[t];if(!n.__unwrap)ku("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ts.unwrap=Bat;var Nat=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ts.unwrap)(n,r)})})};Ts.massUnwrap=Nat;function lB(e){e&&e.logger&&(typeof e.logger!="function"?ku("new logger isn't a function, not replacing"):ku=e.logger)}Ts.default=lB;lB.wrap=Ts.wrap;lB.massWrap=Ts.massWrap;lB.unwrap=Ts.unwrap;lB.massUnwrap=Ts.massUnwrap});var l0e=F(W2=>{"use strict";m();Object.defineProperty(W2,"__esModule",{value:!0});W2.InstrumentationAbstract=void 0;var W5=(je(),Me(We)),Oat=V5(),Z2=Z5(),X5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=W5.diag.createComponentLogger({namespace:t}),this._tracer=W5.trace.getTracer(t,n),this._meter=W5.metrics.getMeter(t,n),this._logger=Oat.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=Z2.wrap;_unwrap=Z2.unwrap;_massWrap=Z2.massWrap;_massUnwrap=Z2.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)}}};W2.InstrumentationAbstract=X5});var p0e=F((m7t,d0e)=>{m();var XC=1e3,eb=XC*60,tb=eb*60,kS=tb*24,wat=kS*7,kat=kS*365.25;d0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Mat(e);if(n==="number"&&isFinite(e))return t.long?Uat(e):Pat(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Mat(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*kat;case"weeks":case"week":case"w":return n*wat;case"days":case"day":case"d":return n*kS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*tb;case"minutes":case"minute":case"mins":case"min":case"m":return n*eb;case"seconds":case"second":case"secs":case"sec":case"s":return n*XC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Pat(e){var t=Math.abs(e);return t>=kS?Math.round(e/kS)+"d":t>=tb?Math.round(e/tb)+"h":t>=eb?Math.round(e/eb)+"m":t>=XC?Math.round(e/XC)+"s":e+"ms"}function Uat(e){var t=Math.abs(e);return t>=kS?X2(e,t,kS,"day"):t>=tb?X2(e,t,tb,"hour"):t>=eb?X2(e,t,eb,"minute"):t>=XC?X2(e,t,XC,"second"):e+" ms"}function X2(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var e9=F((h7t,f0e)=>{m();function Lat(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=p0e(),n.destroy=g,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,v;function x(...N){if(!x.enabled)return;let k=x,Q=Number(new Date),j=Q-(S||Q);k.diff=j,k.prev=S,k.curr=Q,S=Q,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let G=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(oe,ge)=>{if(oe==="%%")return"%";G++;let ye=n.formatters[ge];if(typeof ye=="function"){let be=N[G];oe=ye.call(k,be),N.splice(G,1),G--}return oe}),n.formatArgs.call(k,N),(k.log||n.log).apply(k,N)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(C!==n.namespaces&&(C=n.namespaces,v=n.enabled(h)),v),set:N=>{y=N}}),typeof n.init=="function"&&n.init(x),x}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,v=-1,x=0;for(;y<h.length;)if(C<S.length&&(S[C]===h[y]||S[C]==="*"))S[C]==="*"?(v=C,x=y,C++):(y++,C++);else if(v!==-1)C=v+1,x++,y=x;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 g(){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}f0e.exports=Lat});var A0e=F((xc,eU)=>{m();xc.formatArgs=Fat;xc.save=Gat;xc.load=jat;xc.useColors=Qat;xc.storage=Hat();xc.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`."))}})();xc.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 Qat(){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 Fat(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+eU.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)}xc.log=console.debug||console.log||(()=>{});function Gat(e){try{e?xc.storage.setItem("debug",e):xc.storage.removeItem("debug")}catch{}}function jat(){let e;try{e=xc.storage.getItem("debug")||xc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Hat(){try{return localStorage}catch{}}eU.exports=e9()(xc);var{formatters:zat}=eU.exports;zat.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var g0e=F((S7t,m0e)=>{"use strict";m();m0e.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 E0e=F((T7t,_0e)=>{"use strict";m();var $at=Ge("os"),h0e=Ge("tty"),Nd=g0e(),{env:Va}=process,n_;Nd("no-color")||Nd("no-colors")||Nd("color=false")||Nd("color=never")?n_=0:(Nd("color")||Nd("colors")||Nd("color=true")||Nd("color=always"))&&(n_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?n_=1:Va.FORCE_COLOR==="false"?n_=0:n_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function t9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function n9(e,t){if(n_===0)return 0;if(Nd("color=16m")||Nd("color=full")||Nd("color=truecolor"))return 3;if(Nd("color=256"))return 2;if(e&&!t&&n_===void 0)return 0;let n=n_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=$at.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Va)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Va)||Va.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Va)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Va.TEAMCITY_VERSION)?1:0;if(Va.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Va){let r=parseInt((Va.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Va.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Va.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Va.TERM)||"COLORTERM"in Va?1:n}function Vat(e){let t=n9(e,e&&e.isTTY);return t9(t)}_0e.exports={supportsColor:Vat,stdout:t9(n9(!0,h0e.isatty(1))),stderr:t9(n9(!0,h0e.isatty(2)))}});var y0e=F((qa,nU)=>{m();var qat=Ge("tty"),tU=Ge("util");qa.init=est;qa.log=Zat;qa.formatArgs=Kat;qa.save=Wat;qa.load=Xat;qa.useColors=Yat;qa.destroy=tU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");qa.colors=[6,2,3,4,5,1];try{let e=E0e();e&&(e.stderr||e).level>=2&&(qa.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{}qa.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 Yat(){return"colors"in qa.inspectOpts?!!qa.inspectOpts.colors:qat.isatty(process.stderr.fd)}function Kat(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 o7e=Object.create;var qP=Object.defineProperty;var i7e=Object.getOwnPropertyDescriptor;var a7e=Object.getOwnPropertyNames;var s7e=Object.getPrototypeOf,u7e=Object.prototype.hasOwnProperty;var Ge=(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 F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),za=(e,t)=>{for(var n in t)qP(e,n,{get:t[n],enumerable:!0})},Tle=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of a7e(t))!u7e.call(e,o)&&o!==n&&qP(e,o,{get:()=>t[o],enumerable:!(r=i7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?o7e(s7e(e)):{},Tle(t||!e||!e.__esModule?qP(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>Tle(qP({},"__esModule",{value:!0}),e);var m=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.129"}}catch{}})()});var Xm,f$=O(()=>{m();Xm="1.9.1"});function c7e(e){let t=new Set([e]),n=new Set,r=e.match(ble);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 g=d.match(ble);if(!g)return i(d);let h={major:+g[1],minor:+g[2],patch:+g[3],prerelease:g[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 ble,vle,Rle=O(()=>{m();f$();ble=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;vle=c7e(Xm)});function oA(e,t,n,r=!1){var o;let i=K1[Y1]=(o=K1[Y1])!==null&&o!==void 0?o:{version:Xm};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!==Xm){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Xm}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Xm}.`),!0}function Cl(e){var t,n;let r=(t=K1[Y1])===null||t===void 0?void 0:t.version;if(!(!r||!vle(r)))return(n=K1[Y1])===null||n===void 0?void 0:n[e]}function iA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Xm}.`);let n=K1[Y1];n&&delete n[e]}var l7e,Y1,K1,IS=O(()=>{m();f$();Rle();l7e=Xm.split(".")[0],Y1=Symbol.for(`opentelemetry.js.api.${l7e}`),K1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function J1(e,t,n){let r=Cl("diag");if(r)return r[e](t,...n)}var YP,xle=O(()=>{m();IS();YP=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return J1("debug",this._namespace,t)}error(...t){return J1("error",this._namespace,t)}info(...t){return J1("info",this._namespace,t)}warn(...t){return J1("warn",this._namespace,t)}verbose(...t){return J1("verbose",this._namespace,t)}}});var _a,KP=O(()=>{m();(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"})(_a||(_a={}))});function Dle(e,t){e<_a.NONE?e=_a.NONE:e>_a.ALL&&(e=_a.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",_a.ERROR),warn:n("warn",_a.WARN),info:n("info",_a.INFO),debug:n("debug",_a.DEBUG),verbose:n("verbose",_a.VERBOSE)}}var Ble=O(()=>{m();KP()});var d7e,$a,CS=O(()=>{m();xle();Ble();KP();IS();d7e="diag",$a=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=Cl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:_a.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 g=Cl("diag"),h=Dle((c=i.logLevel)!==null&&c!==void 0?c:_a.INFO,o);if(g&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";g.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return oA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{iA(d7e,n)},n.createComponentLogger=o=>new YP(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var JP,Nle=O(()=>{m();JP=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 Ole,wle=O(()=>{m();Ole=Symbol("BaggageEntryMetadata")});function kle(e={}){return new JP(new Map(Object.entries(e)))}function Mle(e){return typeof e!="string"&&(p7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Ole,toString(){return e}}}var p7e,A$=O(()=>{m();CS();Nle();wle();p7e=$a.instance()});function bl(e){return Symbol.for(e)}var m$,QC,Z1=O(()=>{m();m$=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}}},QC=new m$});var g$,h$,ZP,Ple=O(()=>{m();g$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],h$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(h$[t]=console[t])}ZP=class{constructor(){function t(n){return function(...r){let o=h$[n];if(typeof o!="function"&&(o=h$.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<g$.length;n++)this[g$[n].n]=t(g$[n].c)}}});function Ule(){return v$}var _$,FC,E$,S$,y$,T$,W1,I$,C$,b$,v$,f7e,A7e,m7e,g7e,h7e,_7e,E7e,R$=O(()=>{m();_$=class{constructor(){}createGauge(t,n){return A7e}createHistogram(t,n){return m7e}createCounter(t,n){return f7e}createUpDownCounter(t,n){return g7e}createObservableGauge(t,n){return _7e}createObservableCounter(t,n){return h7e}createObservableUpDownCounter(t,n){return E7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},FC=class{},E$=class extends FC{add(t,n){}},S$=class extends FC{add(t,n){}},y$=class extends FC{record(t,n){}},T$=class extends FC{record(t,n){}},W1=class{addCallback(t){}removeCallback(t){}},I$=class extends W1{},C$=class extends W1{},b$=class extends W1{},v$=new _$,f7e=new E$,A7e=new y$,m7e=new T$,g7e=new S$,h7e=new I$,_7e=new C$,E7e=new b$});var WP,Lle=O(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(WP||(WP={}))});var XP,e2,x$=O(()=>{m();XP={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},e2={set(e,t,n){e!=null&&(e[t]=n)}}});var t2,Qle=O(()=>{m();Z1();t2=class{active(){return QC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var D$,S7e,aA,X1=O(()=>{m();Qle();IS();CS();D$="context",S7e=new t2,aA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return oA(D$,t,$a.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 Cl(D$)||S7e}disable(){this._getContextManager().disable(),iA(D$,$a.instance())}}});var Ks,B$=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ks||(Ks={}))});var eB,bS,n2,r2=O(()=>{m();B$();eB="0000000000000000",bS="00000000000000000000000000000000",n2={traceId:bS,spanId:eB,traceFlags:Ks.NONE}});var sA,o2=O(()=>{m();r2();sA=class{constructor(t=n2){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 i2(e){return e.getValue(N$)||void 0}function Fle(){return i2(aA.getInstance().active())}function tB(e,t){return e.setValue(N$,t)}function Gle(e){return e.deleteValue(N$)}function jle(e,t){return tB(e,new sA(t))}function a2(e){var t;return(t=i2(e))===null||t===void 0?void 0:t.spanContext()}var N$,O$=O(()=>{m();Z1();o2();X1();N$=bl("OpenTelemetry Context Key SPAN")});function Hle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(s2[e.charCodeAt(r)]|0)+(s2[e.charCodeAt(r+1)]|0)+(s2[e.charCodeAt(r+2)]|0)+(s2[e.charCodeAt(r+3)]|0);return n===t}function w$(e){return Hle(e,32)&&e!==bS}function k$(e){return Hle(e,16)&&e!==eB}function eg(e){return w$(e.traceId)&&k$(e.spanId)}function zle(e){return new sA(e)}var s2,u2=O(()=>{m();r2();o2();s2=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 y7e(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 M$,GC,P$=O(()=>{m();X1();O$();o2();u2();M$=aA.getInstance(),GC=class{startSpan(t,n,r=M$.active()){if(!!n?.root)return new sA;let i=r&&a2(r);return y7e(i)&&eg(i)?new sA(i):new sA}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??M$.active(),g=this.startSpan(t,i,d),h=tB(d,g);return M$.with(h,c,void 0,g)}}});var T7e,jC,U$=O(()=>{m();P$();T7e=new GC,jC=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):T7e}}});var c2,$le=O(()=>{m();P$();c2=class{getTracer(t,n,r){return new GC}}});var I7e,vS,L$=O(()=>{m();U$();$le();I7e=new c2,vS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new jC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:I7e}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 l2,Vle=O(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(l2||(l2={}))});var io,qle=O(()=>{m();(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"})(io||(io={}))});var ui,Yle=O(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ui||(ui={}))});function Kle(e){return v7e.test(e)}function Jle(e){return R7e.test(e)&&!x7e.test(e)}var Q$,C7e,b7e,v7e,R7e,x7e,Zle=O(()=>{m();Q$="[_0-9a-z-*/]",C7e=`[a-z]${Q$}{0,255}`,b7e=`[a-z0-9]${Q$}{0,240}@[a-z]${Q$}{0,13}`,v7e=new RegExp(`^(?:${C7e}|${b7e})$`),R7e=/^[ -~]{0,255}[!-~]$/,x7e=/,|=/});var Wle,D7e,Xle,ede,d2,tde=O(()=>{m();Zle();Wle=32,D7e=512,Xle=",",ede="=",d2=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+ede+this.get(n)),t),[]).join(Xle)}_parse(t){t.length>D7e||(this._internalState=t.split(Xle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(ede);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Kle(a)&&Jle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Wle&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Wle))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function nde(e){return new d2(e)}var rde=O(()=>{m();tde()});var Ke,ode=O(()=>{m();X1();Ke=aA.getInstance()});var vl,ide=O(()=>{m();CS();vl=$a.instance()});var F$,ade,sde=O(()=>{m();R$();F$=class{getMeter(t,n,r){return v$}},ade=new F$});var G$,p2,ude=O(()=>{m();sde();IS();CS();G$="metrics",p2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return oA(G$,t,$a.instance())}getMeterProvider(){return Cl(G$)||ade}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){iA(G$,$a.instance())}}});var j$,cde=O(()=>{m();ude();j$=p2.getInstance()});var f2,lde=O(()=>{m();f2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function z$(e){return e.getValue(H$)||void 0}function dde(){return z$(aA.getInstance().active())}function pde(e,t){return e.setValue(H$,t)}function fde(e){return e.deleteValue(H$)}var H$,Ade=O(()=>{m();X1();Z1();H$=bl("OpenTelemetry Baggage Key")});var $$,B7e,A2,mde=O(()=>{m();IS();lde();x$();Ade();A$();CS();$$="propagation",B7e=new f2,A2=class e{constructor(){this.createBaggage=kle,this.getBaggage=z$,this.getActiveBaggage=dde,this.setBaggage=pde,this.deleteBaggage=fde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return oA($$,t,$a.instance())}inject(t,n,r=e2){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=XP){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){iA($$,$a.instance())}_getGlobalPropagator(){return Cl($$)||B7e}}});var Vp,gde=O(()=>{m();mde();Vp=A2.getInstance()});var V$,m2,hde=O(()=>{m();IS();L$();u2();O$();CS();V$="trace",m2=class e{constructor(){this._proxyTracerProvider=new vS,this.wrapSpanContext=zle,this.isSpanContextValid=eg,this.deleteSpan=Gle,this.getSpan=i2,this.getActiveSpan=Fle,this.getSpanContext=a2,this.setSpan=tB,this.setSpanContext=jle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=oA(V$,this._proxyTracerProvider,$a.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Cl(V$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){iA(V$,$a.instance()),this._proxyTracerProvider=new vS}}});var Ht,_de=O(()=>{m();hde();Ht=m2.getInstance()});var We={};za(We,{DiagConsoleLogger:()=>ZP,DiagLogLevel:()=>_a,INVALID_SPANID:()=>eB,INVALID_SPAN_CONTEXT:()=>n2,INVALID_TRACEID:()=>bS,ProxyTracer:()=>jC,ProxyTracerProvider:()=>vS,ROOT_CONTEXT:()=>QC,SamplingDecision:()=>l2,SpanKind:()=>io,SpanStatusCode:()=>ui,TraceFlags:()=>Ks,ValueType:()=>WP,baggageEntryMetadataFromString:()=>Mle,context:()=>Ke,createContextKey:()=>bl,createNoopMeter:()=>Ule,createTraceState:()=>nde,default:()=>N7e,defaultTextMapGetter:()=>XP,defaultTextMapSetter:()=>e2,diag:()=>vl,isSpanContextValid:()=>eg,isValidSpanId:()=>k$,isValidTraceId:()=>w$,metrics:()=>j$,propagation:()=>Vp,trace:()=>Ht});var N7e,je=O(()=>{m();A$();Z1();Ple();KP();R$();Lle();x$();U$();L$();Vle();qle();Yle();B$();rde();u2();r2();ode();ide();cde();gde();_de();N7e={context:Ke,diag:vl,metrics:j$,propagation:Vp,trace:Ht}});var nB=F(Xh=>{"use strict";m();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.isTracingSuppressed=Xh.unsuppressTracing=Xh.suppressTracing=void 0;var O7e=(je(),Me(We)),q$=(0,O7e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function w7e(e){return e.setValue(q$,!0)}Xh.suppressTracing=w7e;function k7e(e){return e.deleteValue(q$)}Xh.unsuppressTracing=k7e;function M7e(e){return e.getValue(q$)===!0}Xh.isTracingSuppressed=M7e});var Y$=F(Js=>{"use strict";m();Object.defineProperty(Js,"__esModule",{value:!0});Js.BAGGAGE_MAX_TOTAL_LENGTH=Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=Js.BAGGAGE_HEADER=Js.BAGGAGE_ITEMS_SEPARATOR=Js.BAGGAGE_PROPERTIES_SEPARATOR=Js.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Js.BAGGAGE_KEY_PAIR_SEPARATOR="=";Js.BAGGAGE_PROPERTIES_SEPARATOR=";";Js.BAGGAGE_ITEMS_SEPARATOR=",";Js.BAGGAGE_HEADER="baggage";Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Js.BAGGAGE_MAX_TOTAL_LENGTH=8192});var K$=F(uA=>{"use strict";m();Object.defineProperty(uA,"__esModule",{value:!0});uA.parseKeyPairsIntoRecord=uA.parsePairKeyValue=uA.getKeyPairs=uA.serializeKeyPairs=void 0;var P7e=(je(),Me(We)),HC=Y$();function U7e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?HC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>HC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}uA.serializeKeyPairs=U7e;function L7e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=HC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}uA.getKeyPairs=L7e;function Ede(e){if(!e)return;let t=e.indexOf(HC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(HC.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 g=e.substring(t+1);d=(0,P7e.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}uA.parsePairKeyValue=Ede;function Q7e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(HC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Ede(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}uA.parseKeyPairsIntoRecord=Q7e});var Sde=F(g2=>{"use strict";m();Object.defineProperty(g2,"__esModule",{value:!0});g2.W3CBaggagePropagator=void 0;var J$=(je(),Me(We)),F7e=nB(),RS=Y$(),Z$=K$(),W$=class{inject(t,n,r){let o=J$.propagation.getBaggage(t);if(!o||(0,F7e.isTracingSuppressed)(t))return;let i=(0,Z$.getKeyPairs)(o).filter(c=>c.length<=RS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,RS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,Z$.serializeKeyPairs)(i);a.length>0&&r.set(n,RS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,RS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(RS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(RS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,Z$.parsePairKeyValue)(d);if(g){let h={value:g.value};g.metadata&&(h.metadata=g.metadata),a[g.key]=h}}),Object.entries(a).length===0)?t:J$.propagation.setBaggage(t,J$.propagation.createBaggage(a))}fields(){return[RS.BAGGAGE_HEADER]}};g2.W3CBaggagePropagator=W$});var yde=F(h2=>{"use strict";m();Object.defineProperty(h2,"__esModule",{value:!0});h2.AnchoredClock=void 0;var X$=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}};h2.AnchoredClock=X$});var vde=F(e_=>{"use strict";m();Object.defineProperty(e_,"__esModule",{value:!0});e_.isAttributeValue=e_.isAttributeKey=e_.sanitizeAttributes=void 0;var Tde=(je(),Me(We));function G7e(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(!Ide(n)){Tde.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Cde(r)){Tde.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}e_.sanitizeAttributes=G7e;function Ide(e){return typeof e=="string"&&e!==""}e_.isAttributeKey=Ide;function Cde(e){return e==null?!0:Array.isArray(e)?j7e(e):bde(typeof e)}e_.isAttributeValue=Cde;function j7e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(bde(r)){t=r;continue}return!1}return!1}}return!0}function bde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var e5=F(_2=>{"use strict";m();Object.defineProperty(_2,"__esModule",{value:!0});_2.loggingErrorHandler=void 0;var H7e=(je(),Me(We));function z7e(){return e=>{H7e.diag.error($7e(e))}}_2.loggingErrorHandler=z7e;function $7e(e){return typeof e=="string"?e:JSON.stringify(V7e(e))}function V7e(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 xde=F(zC=>{"use strict";m();Object.defineProperty(zC,"__esModule",{value:!0});zC.globalErrorHandler=zC.setGlobalErrorHandler=void 0;var q7e=e5(),Rde=(0,q7e.loggingErrorHandler)();function Y7e(e){Rde=e}zC.setGlobalErrorHandler=Y7e;function K7e(e){try{Rde(e)}catch{}}zC.globalErrorHandler=K7e});var Ode=F(cA=>{"use strict";m();Object.defineProperty(cA,"__esModule",{value:!0});cA.getStringListFromEnv=cA.getBooleanFromEnv=cA.getStringFromEnv=cA.getNumberFromEnv=void 0;var Dde=(je(),Me(We)),Bde=Ge("util");function J7e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}cA.getNumberFromEnv=J7e;function Nde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}cA.getStringFromEnv=Nde;function Z7e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}cA.getBooleanFromEnv=Z7e;function W7e(e){return Nde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}cA.getStringListFromEnv=W7e});var wde=F(E2=>{"use strict";m();Object.defineProperty(E2,"__esModule",{value:!0});E2._globalThis=void 0;E2._globalThis=globalThis});var kde=F(S2=>{"use strict";m();Object.defineProperty(S2,"__esModule",{value:!0});S2.VERSION=void 0;S2.VERSION="2.6.1"});function bi(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 t5=O(()=>{m()});var Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,X7e,n5,eYe,tYe,nYe,rYe,r5,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,o5,TYe,IYe,CYe,bYe,vYe,RYe,xYe,DYe,BYe,NYe,OYe,wYe,i5,kYe,MYe,a5,s5,PYe,UYe,LYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,rB,$C,u5,XYe,eKe,xS,tKe,nKe,rKe,oKe,c5,l5,iKe,d5,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,xKe,p5,DKe,BKe,NKe,OKe,wKe,kKe,MKe,PKe,UKe,LKe,QKe,FKe,GKe,jKe,HKe,zKe,$Ke,VKe,qKe,f5,YKe,A5,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,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,xAe,DAe,BAe,NAe,OAe,wAe,kAe,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,MJe,PJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,ime,ame,sme,ume,cme,lZe,dZe,pZe,fZe,AZe,mZe,lme,dme,pme,gZe,hZe,_Ze,EZe,fme,Ame,mme,gme,SZe,yZe,TZe,IZe,CZe,hme,_me,Eme,Sme,yme,Tme,Ime,bZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,Cme,bme,vme,Rme,xme,wZe,kZe,MZe,PZe,UZe,LZe,Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,Jme,Zme,Wme,Xme,ege,sWe,uWe,cWe,lWe,dWe,pWe,tge,nge,fWe,AWe,mWe,rge,oge,gWe,hWe,_We,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,kWe,MWe,PWe,Tge,Ige,UWe,LWe,QWe,Cge=O(()=>{m();t5();Mde="aws.lambda.invoked_arn",Pde="db.system",Ude="db.connection_string",Lde="db.user",Qde="db.jdbc.driver_classname",Fde="db.name",Gde="db.statement",jde="db.operation",Hde="db.mssql.instance_name",zde="db.cassandra.keyspace",$de="db.cassandra.page_size",Vde="db.cassandra.consistency_level",qde="db.cassandra.table",Yde="db.cassandra.idempotence",Kde="db.cassandra.speculative_execution_count",Jde="db.cassandra.coordinator.id",Zde="db.cassandra.coordinator.dc",Wde="db.hbase.namespace",Xde="db.redis.database_index",epe="db.mongodb.collection",tpe="db.sql.table",npe="exception.type",rpe="exception.message",ope="exception.stacktrace",ipe="exception.escaped",ape="faas.trigger",spe="faas.execution",upe="faas.document.collection",cpe="faas.document.operation",lpe="faas.document.time",dpe="faas.document.name",ppe="faas.time",fpe="faas.cron",Ape="faas.coldstart",mpe="faas.invoked_name",gpe="faas.invoked_provider",hpe="faas.invoked_region",_pe="net.transport",Epe="net.peer.ip",Spe="net.peer.port",ype="net.peer.name",Tpe="net.host.ip",Ipe="net.host.port",Cpe="net.host.name",bpe="net.host.connection.type",vpe="net.host.connection.subtype",Rpe="net.host.carrier.name",xpe="net.host.carrier.mcc",Dpe="net.host.carrier.mnc",Bpe="net.host.carrier.icc",Npe="peer.service",Ope="enduser.id",wpe="enduser.role",kpe="enduser.scope",Mpe="thread.id",Ppe="thread.name",Upe="code.function",Lpe="code.namespace",Qpe="code.filepath",Fpe="code.lineno",Gpe="http.method",jpe="http.url",Hpe="http.target",zpe="http.host",$pe="http.scheme",Vpe="http.status_code",qpe="http.flavor",Ype="http.user_agent",Kpe="http.request_content_length",Jpe="http.request_content_length_uncompressed",Zpe="http.response_content_length",Wpe="http.response_content_length_uncompressed",Xpe="http.server_name",efe="http.route",tfe="http.client_ip",nfe="aws.dynamodb.table_names",rfe="aws.dynamodb.consumed_capacity",ofe="aws.dynamodb.item_collection_metrics",ife="aws.dynamodb.provisioned_read_capacity",afe="aws.dynamodb.provisioned_write_capacity",sfe="aws.dynamodb.consistent_read",ufe="aws.dynamodb.projection",cfe="aws.dynamodb.limit",lfe="aws.dynamodb.attributes_to_get",dfe="aws.dynamodb.index_name",pfe="aws.dynamodb.select",ffe="aws.dynamodb.global_secondary_indexes",Afe="aws.dynamodb.local_secondary_indexes",mfe="aws.dynamodb.exclusive_start_table",gfe="aws.dynamodb.table_count",hfe="aws.dynamodb.scan_forward",_fe="aws.dynamodb.segment",Efe="aws.dynamodb.total_segments",Sfe="aws.dynamodb.count",yfe="aws.dynamodb.scanned_count",Tfe="aws.dynamodb.attribute_definitions",Ife="aws.dynamodb.global_secondary_index_updates",Cfe="messaging.system",bfe="messaging.destination",vfe="messaging.destination_kind",Rfe="messaging.temp_destination",xfe="messaging.protocol",Dfe="messaging.protocol_version",Bfe="messaging.url",Nfe="messaging.message_id",Ofe="messaging.conversation_id",wfe="messaging.message_payload_size_bytes",kfe="messaging.message_payload_compressed_size_bytes",Mfe="messaging.operation",Pfe="messaging.consumer_id",Ufe="messaging.rabbitmq.routing_key",Lfe="messaging.kafka.message_key",Qfe="messaging.kafka.consumer_group",Ffe="messaging.kafka.client_id",Gfe="messaging.kafka.partition",jfe="messaging.kafka.tombstone",Hfe="rpc.system",zfe="rpc.service",$fe="rpc.method",Vfe="rpc.grpc.status_code",qfe="rpc.jsonrpc.version",Yfe="rpc.jsonrpc.request_id",Kfe="rpc.jsonrpc.error_code",Jfe="rpc.jsonrpc.error_message",Zfe="message.type",Wfe="message.id",Xfe="message.compressed_size",eAe="message.uncompressed_size",X7e=Mde,n5=Pde,eYe=Ude,tYe=Lde,nYe=Qde,rYe=Fde,r5=Gde,oYe=jde,iYe=Hde,aYe=zde,sYe=$de,uYe=Vde,cYe=qde,lYe=Yde,dYe=Kde,pYe=Jde,fYe=Zde,AYe=Wde,mYe=Xde,gYe=epe,hYe=tpe,_Ye=npe,EYe=rpe,SYe=ope,yYe=ipe,o5=ape,TYe=spe,IYe=upe,CYe=cpe,bYe=lpe,vYe=dpe,RYe=ppe,xYe=fpe,DYe=Ape,BYe=mpe,NYe=gpe,OYe=hpe,wYe=_pe,i5=Epe,kYe=Spe,MYe=ype,a5=Tpe,s5=Ipe,PYe=Cpe,UYe=bpe,LYe=vpe,QYe=Rpe,FYe=xpe,GYe=Dpe,jYe=Bpe,HYe=Npe,zYe=Ope,$Ye=wpe,VYe=kpe,qYe=Mpe,YYe=Ppe,KYe=Upe,JYe=Lpe,ZYe=Qpe,WYe=Fpe,rB=Gpe,$C=jpe,u5=Hpe,XYe=zpe,eKe=$pe,xS=Vpe,tKe=qpe,nKe=Ype,rKe=Kpe,oKe=Jpe,c5=Zpe,l5=Wpe,iKe=Xpe,d5=efe,aKe=tfe,sKe=nfe,uKe=rfe,cKe=ofe,lKe=ife,dKe=afe,pKe=sfe,fKe=ufe,AKe=cfe,mKe=lfe,gKe=dfe,hKe=pfe,_Ke=ffe,EKe=Afe,SKe=mfe,yKe=gfe,TKe=hfe,IKe=_fe,CKe=Efe,bKe=Sfe,vKe=yfe,RKe=Tfe,xKe=Ife,p5=Cfe,DKe=bfe,BKe=vfe,NKe=Rfe,OKe=xfe,wKe=Dfe,kKe=Bfe,MKe=Nfe,PKe=Ofe,UKe=wfe,LKe=kfe,QKe=Mfe,FKe=Pfe,GKe=Ufe,jKe=Lfe,HKe=Qfe,zKe=Ffe,$Ke=Gfe,VKe=jfe,qKe=Hfe,f5=zfe,YKe=$fe,A5=Vfe,KKe=qfe,JKe=Yfe,ZKe=Kfe,WKe=Jfe,XKe=Zfe,eJe=Wfe,tJe=Xfe,nJe=eAe,rJe=bi([Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe]),tAe="other_sql",nAe="mssql",rAe="mysql",oAe="oracle",iAe="db2",aAe="postgresql",sAe="redshift",uAe="hive",cAe="cloudscape",lAe="hsqldb",dAe="progress",pAe="maxdb",fAe="hanadb",AAe="ingres",mAe="firstsql",gAe="edb",hAe="cache",_Ae="adabas",EAe="firebird",SAe="derby",yAe="filemaker",TAe="informix",IAe="instantdb",CAe="interbase",bAe="mariadb",vAe="netezza",RAe="pervasive",xAe="pointbase",DAe="sqlite",BAe="sybase",NAe="teradata",OAe="vertica",wAe="h2",kAe="coldfusion",MAe="cassandra",PAe="hbase",UAe="mongodb",LAe="redis",QAe="couchbase",FAe="couchdb",GAe="cosmosdb",jAe="dynamodb",HAe="neo4j",zAe="geode",$Ae="elasticsearch",VAe="memcached",qAe="cockroachdb",oJe=tAe,iJe=nAe,aJe=rAe,sJe=oAe,uJe=iAe,cJe=aAe,lJe=sAe,dJe=uAe,pJe=cAe,fJe=lAe,AJe=dAe,mJe=pAe,gJe=fAe,hJe=AAe,_Je=mAe,EJe=gAe,SJe=hAe,yJe=_Ae,TJe=EAe,IJe=SAe,CJe=yAe,bJe=TAe,vJe=IAe,RJe=CAe,xJe=bAe,DJe=vAe,BJe=RAe,NJe=xAe,OJe=DAe,wJe=BAe,kJe=NAe,MJe=OAe,PJe=wAe,UJe=kAe,LJe=MAe,QJe=PAe,FJe=UAe,GJe=LAe,jJe=QAe,HJe=FAe,zJe=GAe,$Je=jAe,VJe=HAe,qJe=zAe,YJe=$Ae,KJe=VAe,JJe=qAe,ZJe=bi([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,xAe,DAe,BAe,NAe,OAe,wAe,kAe,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe]),YAe="all",KAe="each_quorum",JAe="quorum",ZAe="local_quorum",WAe="one",XAe="two",eme="three",tme="local_one",nme="any",rme="serial",ome="local_serial",WJe=YAe,XJe=KAe,eZe=JAe,tZe=ZAe,nZe=WAe,rZe=XAe,oZe=eme,iZe=tme,aZe=nme,sZe=rme,uZe=ome,cZe=bi([YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome]),ime="datasource",ame="http",sme="pubsub",ume="timer",cme="other",lZe=ime,dZe=ame,pZe=sme,fZe=ume,AZe=cme,mZe=bi([ime,ame,sme,ume,cme]),lme="insert",dme="edit",pme="delete",gZe=lme,hZe=dme,_Ze=pme,EZe=bi([lme,dme,pme]),fme="alibaba_cloud",Ame="aws",mme="azure",gme="gcp",SZe=fme,yZe=Ame,TZe=mme,IZe=gme,CZe=bi([fme,Ame,mme,gme]),hme="ip_tcp",_me="ip_udp",Eme="ip",Sme="unix",yme="pipe",Tme="inproc",Ime="other",bZe=hme,vZe=_me,RZe=Eme,xZe=Sme,DZe=yme,BZe=Tme,NZe=Ime,OZe=bi([hme,_me,Eme,Sme,yme,Tme,Ime]),Cme="wifi",bme="wired",vme="cell",Rme="unavailable",xme="unknown",wZe=Cme,kZe=bme,MZe=vme,PZe=Rme,UZe=xme,LZe=bi([Cme,bme,vme,Rme,xme]),Dme="gprs",Bme="edge",Nme="umts",Ome="cdma",wme="evdo_0",kme="evdo_a",Mme="cdma2000_1xrtt",Pme="hsdpa",Ume="hsupa",Lme="hspa",Qme="iden",Fme="evdo_b",Gme="lte",jme="ehrpd",Hme="hspap",zme="gsm",$me="td_scdma",Vme="iwlan",qme="nr",Yme="nrnsa",Kme="lte_ca",QZe=Dme,FZe=Bme,GZe=Nme,jZe=Ome,HZe=wme,zZe=kme,$Ze=Mme,VZe=Pme,qZe=Ume,YZe=Lme,KZe=Qme,JZe=Fme,ZZe=Gme,WZe=jme,XZe=Hme,eWe=zme,tWe=$me,nWe=Vme,rWe=qme,oWe=Yme,iWe=Kme,aWe=bi([Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme]),Jme="1.0",Zme="1.1",Wme="2.0",Xme="SPDY",ege="QUIC",sWe=Jme,uWe=Zme,cWe=Wme,lWe=Xme,dWe=ege,pWe={HTTP_1_0:Jme,HTTP_1_1:Zme,HTTP_2_0:Wme,SPDY:Xme,QUIC:ege},tge="queue",nge="topic",fWe=tge,AWe=nge,mWe=bi([tge,nge]),rge="receive",oge="process",gWe=rge,hWe=oge,_We=bi([rge,oge]),ige=0,age=1,sge=2,uge=3,cge=4,lge=5,dge=6,pge=7,fge=8,Age=9,mge=10,gge=11,hge=12,_ge=13,Ege=14,Sge=15,yge=16,EWe=ige,SWe=age,yWe=sge,TWe=uge,IWe=cge,CWe=lge,bWe=dge,vWe=pge,RWe=fge,xWe=Age,DWe=mge,BWe=gge,NWe=hge,OWe=_ge,wWe=Ege,kWe=Sge,MWe=yge,PWe={OK:ige,CANCELLED:age,UNKNOWN:sge,INVALID_ARGUMENT:uge,DEADLINE_EXCEEDED:cge,NOT_FOUND:lge,ALREADY_EXISTS:dge,PERMISSION_DENIED:pge,RESOURCE_EXHAUSTED:fge,FAILED_PRECONDITION:Age,ABORTED:mge,OUT_OF_RANGE:gge,UNIMPLEMENTED:hge,INTERNAL:_ge,UNAVAILABLE:Ege,DATA_LOSS:Sge,UNAUTHENTICATED:yge},Tge="SENT",Ige="RECEIVED",UWe=Tge,LWe=Ige,QWe=bi([Tge,Ige])});var bge=O(()=>{m();Cge()});var vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,FWe,GWe,jWe,HWe,zWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,kXe,MXe,PXe,UXe,LXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,m5,ret,oet,iet,aet,set,uet,cet,det,pet,fet,Xhe,e_e,t_e,n_e,Aet,met,get,het,_et,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,Bet,Net,Oet,wet,ket,Met,Pet,Uet,S_e,y_e,Let,Qet,Fet,T_e,I_e,C_e,b_e,v_e,R_e,x_e,Get,jet,Het,zet,$et,Vet,qet,Yet,D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e,Q_e,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e,stt,utt,ctt,ltt,dtt,ptt,ftt,Att,mtt,gtt,htt,J_e=O(()=>{m();t5();vge="cloud.provider",Rge="cloud.account.id",xge="cloud.region",Dge="cloud.availability_zone",Bge="cloud.platform",Nge="aws.ecs.container.arn",Oge="aws.ecs.cluster.arn",wge="aws.ecs.launchtype",kge="aws.ecs.task.arn",Mge="aws.ecs.task.family",Pge="aws.ecs.task.revision",Uge="aws.eks.cluster.arn",Lge="aws.log.group.names",Qge="aws.log.group.arns",Fge="aws.log.stream.names",Gge="aws.log.stream.arns",jge="container.name",Hge="container.id",zge="container.runtime",$ge="container.image.name",Vge="container.image.tag",qge="deployment.environment",Yge="device.id",Kge="device.model.identifier",Jge="device.model.name",Zge="faas.name",Wge="faas.id",Xge="faas.version",ehe="faas.instance",the="faas.max_memory",nhe="host.id",rhe="host.name",ohe="host.type",ihe="host.arch",ahe="host.image.name",she="host.image.id",uhe="host.image.version",che="k8s.cluster.name",lhe="k8s.node.name",dhe="k8s.node.uid",phe="k8s.namespace.name",fhe="k8s.pod.uid",Ahe="k8s.pod.name",mhe="k8s.container.name",ghe="k8s.replicaset.uid",hhe="k8s.replicaset.name",_he="k8s.deployment.uid",Ehe="k8s.deployment.name",She="k8s.statefulset.uid",yhe="k8s.statefulset.name",The="k8s.daemonset.uid",Ihe="k8s.daemonset.name",Che="k8s.job.uid",bhe="k8s.job.name",vhe="k8s.cronjob.uid",Rhe="k8s.cronjob.name",xhe="os.type",Dhe="os.description",Bhe="os.name",Nhe="os.version",Ohe="process.pid",whe="process.executable.name",khe="process.executable.path",Mhe="process.command",Phe="process.command_line",Uhe="process.command_args",Lhe="process.owner",Qhe="process.runtime.name",Fhe="process.runtime.version",Ghe="process.runtime.description",jhe="service.name",Hhe="service.namespace",zhe="service.instance.id",$he="service.version",Vhe="telemetry.sdk.name",qhe="telemetry.sdk.language",Yhe="telemetry.sdk.version",Khe="telemetry.auto.version",Jhe="webengine.name",Zhe="webengine.version",Whe="webengine.description",FWe=vge,GWe=Rge,jWe=xge,HWe=Dge,zWe=Bge,$We=Nge,VWe=Oge,qWe=wge,YWe=kge,KWe=Mge,JWe=Pge,ZWe=Uge,WWe=Lge,XWe=Qge,eXe=Fge,tXe=Gge,nXe=jge,rXe=Hge,oXe=zge,iXe=$ge,aXe=Vge,sXe=qge,uXe=Yge,cXe=Kge,lXe=Jge,dXe=Zge,pXe=Wge,fXe=Xge,AXe=ehe,mXe=the,gXe=nhe,hXe=rhe,_Xe=ohe,EXe=ihe,SXe=ahe,yXe=she,TXe=uhe,IXe=che,CXe=lhe,bXe=dhe,vXe=phe,RXe=fhe,xXe=Ahe,DXe=mhe,BXe=ghe,NXe=hhe,OXe=_he,wXe=Ehe,kXe=She,MXe=yhe,PXe=The,UXe=Ihe,LXe=Che,QXe=bhe,FXe=vhe,GXe=Rhe,jXe=xhe,HXe=Dhe,zXe=Bhe,$Xe=Nhe,VXe=Ohe,qXe=whe,YXe=khe,KXe=Mhe,JXe=Phe,ZXe=Uhe,WXe=Lhe,XXe=Qhe,eet=Fhe,tet=Ghe,net=jhe,m5=Hhe,ret=zhe,oet=$he,iet=Vhe,aet=qhe,set=Yhe,uet=Khe,cet=Jhe,det=Zhe,pet=Whe,fet=bi([vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe]),Xhe="alibaba_cloud",e_e="aws",t_e="azure",n_e="gcp",Aet=Xhe,met=e_e,get=t_e,het=n_e,_et=bi([Xhe,e_e,t_e,n_e]),r_e="alibaba_cloud_ecs",o_e="alibaba_cloud_fc",i_e="aws_ec2",a_e="aws_ecs",s_e="aws_eks",u_e="aws_lambda",c_e="aws_elastic_beanstalk",l_e="azure_vm",d_e="azure_container_instances",p_e="azure_aks",f_e="azure_functions",A_e="azure_app_service",m_e="gcp_compute_engine",g_e="gcp_cloud_run",h_e="gcp_kubernetes_engine",__e="gcp_cloud_functions",E_e="gcp_app_engine",Eet=r_e,yet=o_e,Tet=i_e,Iet=a_e,Cet=s_e,bet=u_e,vet=c_e,Ret=l_e,xet=d_e,Det=p_e,Bet=f_e,Net=A_e,Oet=m_e,wet=g_e,ket=h_e,Met=__e,Pet=E_e,Uet=bi([r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e]),S_e="ec2",y_e="fargate",Let=S_e,Qet=y_e,Fet=bi([S_e,y_e]),T_e="amd64",I_e="arm32",C_e="arm64",b_e="ia64",v_e="ppc32",R_e="ppc64",x_e="x86",Get=T_e,jet=I_e,Het=C_e,zet=b_e,$et=v_e,Vet=R_e,qet=x_e,Yet=bi([T_e,I_e,C_e,b_e,v_e,R_e,x_e]),D_e="windows",B_e="linux",N_e="darwin",O_e="freebsd",w_e="netbsd",k_e="openbsd",M_e="dragonflybsd",P_e="hpux",U_e="aix",L_e="solaris",Q_e="z_os",Ket=D_e,Jet=B_e,Zet=N_e,Wet=O_e,Xet=w_e,ett=k_e,ttt=M_e,ntt=P_e,rtt=U_e,ott=L_e,itt=Q_e,att=bi([D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e,Q_e]),F_e="cpp",G_e="dotnet",j_e="erlang",H_e="go",z_e="java",$_e="nodejs",V_e="php",q_e="python",Y_e="ruby",K_e="webjs",stt=F_e,utt=G_e,ctt=j_e,ltt=H_e,dtt=z_e,ptt=$_e,ftt=V_e,Att=q_e,mtt=Y_e,gtt=K_e,htt=bi([F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e])});var Z_e=O(()=>{m();J_e()});var _tt,Ett,Stt,ytt,Ttt,Itt,Ctt,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Mtt,Ptt,Utt,Ltt,Qtt,Ftt,Gtt,jtt,g5,h5,Htt,VC,ztt,_5,E5,$tt,DS,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,S5,nnt,rnt,ont,int,ant,snt,BS,unt,cnt,lnt,dnt,pnt,fnt,Ant,mnt,gnt,hnt,_nt,Ent,Snt,tg,ng,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,Ont,wnt,knt,Mnt,Pnt,y5,T5,Unt,I5,C5,Lnt,Qnt,Fnt,Gnt,jnt,Hnt,znt,$nt,Vnt,qnt,Ynt,Knt,Jnt,Znt,b5,v5,Wnt,R5,Xnt,x5,ert,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,Srt,yrt,Trt,Irt,t_,Crt,brt,vrt,D5,W_e=O(()=>{m();_tt="aspnetcore.diagnostics.exception.result",Ett="aborted",Stt="handled",ytt="skipped",Ttt="unhandled",Itt="aspnetcore.diagnostics.handler.type",Ctt="aspnetcore.rate_limiting.policy",btt="aspnetcore.rate_limiting.result",vtt="acquired",Rtt="endpoint_limiter",xtt="global_limiter",Dtt="request_canceled",Btt="aspnetcore.request.is_unhandled",Ntt="aspnetcore.routing.is_fallback",Ott="aspnetcore.routing.match_status",wtt="failure",ktt="success",Mtt="aspnetcore.user.is_authenticated",Ptt="client.address",Utt="client.port",Ltt="code.column.number",Qtt="code.file.path",Ftt="code.function.name",Gtt="code.line.number",jtt="code.stacktrace",g5="db.collection.name",h5="db.namespace",Htt="db.operation.batch.size",VC="db.operation.name",ztt="db.query.summary",_5="db.query.text",E5="db.response.status_code",$tt="db.stored_procedure.name",DS="db.system.name",Vtt="mariadb",qtt="microsoft.sql_server",Ytt="mysql",Ktt="postgresql",Jtt="dotnet.gc.heap.generation",Ztt="gen0",Wtt="gen1",Xtt="gen2",ent="loh",tnt="poh",S5="error.type",nnt="_OTHER",rnt="exception.escaped",ont="exception.message",int="exception.stacktrace",ant="exception.type",snt=e=>`http.request.header.${e}`,BS="http.request.method",unt="_OTHER",cnt="CONNECT",lnt="DELETE",dnt="GET",pnt="HEAD",fnt="OPTIONS",Ant="PATCH",mnt="POST",gnt="PUT",hnt="TRACE",_nt="http.request.method_original",Ent="http.request.resend_count",Snt=e=>`http.response.header.${e}`,tg="http.response.status_code",ng="http.route",ynt="jvm.gc.action",Tnt="jvm.gc.name",Int="jvm.memory.pool.name",Cnt="jvm.memory.type",bnt="heap",vnt="non_heap",Rnt="jvm.thread.daemon",xnt="jvm.thread.state",Dnt="blocked",Bnt="new",Nnt="runnable",Ont="terminated",wnt="timed_waiting",knt="waiting",Mnt="network.local.address",Pnt="network.local.port",y5="network.peer.address",T5="network.peer.port",Unt="network.protocol.name",I5="network.protocol.version",C5="network.transport",Lnt="pipe",Qnt="quic",Fnt="tcp",Gnt="udp",jnt="unix",Hnt="network.type",znt="ipv4",$nt="ipv6",Vnt="otel.scope.name",qnt="otel.scope.version",Ynt="otel.status_code",Knt="ERROR",Jnt="OK",Znt="otel.status_description",b5="server.address",v5="server.port",Wnt="service.instance.id",R5="service.name",Xnt="service.namespace",x5="service.version",ert="signalr.connection.status",trt="app_shutdown",nrt="normal_closure",rrt="timeout",ort="signalr.transport",irt="long_polling",art="server_sent_events",srt="web_sockets",urt="telemetry.sdk.language",crt="cpp",lrt="dotnet",drt="erlang",prt="go",frt="java",Art="nodejs",mrt="php",grt="python",hrt="ruby",_rt="rust",Ert="swift",Srt="webjs",yrt="telemetry.sdk.name",Trt="telemetry.sdk.version",Irt="url.fragment",t_="url.full",Crt="url.path",brt="url.query",vrt="url.scheme",D5="user_agent.original"});var Rrt,xrt,Drt,Brt,Nrt,Ort,wrt,krt,Mrt,Prt,Urt,Lrt,Qrt,Frt,Grt,jrt,Hrt,zrt,$rt,Vrt,qrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,oot,iot,aot,sot,uot,cot,lot,dot,pot,fot,Aot,mot,got,hot,_ot,Eot,Sot,yot,Tot,Iot,X_e=O(()=>{m();Rrt="aspnetcore.diagnostics.exceptions",xrt="aspnetcore.rate_limiting.active_request_leases",Drt="aspnetcore.rate_limiting.queued_requests",Brt="aspnetcore.rate_limiting.request.time_in_queue",Nrt="aspnetcore.rate_limiting.request_lease.duration",Ort="aspnetcore.rate_limiting.requests",wrt="aspnetcore.routing.match_attempts",krt="db.client.operation.duration",Mrt="dotnet.assembly.count",Prt="dotnet.exceptions",Urt="dotnet.gc.collections",Lrt="dotnet.gc.heap.total_allocated",Qrt="dotnet.gc.last_collection.heap.fragmentation.size",Frt="dotnet.gc.last_collection.heap.size",Grt="dotnet.gc.last_collection.memory.committed_size",jrt="dotnet.gc.pause.time",Hrt="dotnet.jit.compilation.time",zrt="dotnet.jit.compiled_il.size",$rt="dotnet.jit.compiled_methods",Vrt="dotnet.monitor.lock_contentions",qrt="dotnet.process.cpu.count",Yrt="dotnet.process.cpu.time",Krt="dotnet.process.memory.working_set",Jrt="dotnet.thread_pool.queue.length",Zrt="dotnet.thread_pool.thread.count",Wrt="dotnet.thread_pool.work_item.count",Xrt="dotnet.timer.count",eot="http.client.request.duration",tot="http.server.request.duration",not="jvm.class.count",rot="jvm.class.loaded",oot="jvm.class.unloaded",iot="jvm.cpu.count",aot="jvm.cpu.recent_utilization",sot="jvm.cpu.time",uot="jvm.gc.duration",cot="jvm.memory.committed",lot="jvm.memory.limit",dot="jvm.memory.used",pot="jvm.memory.used_after_last_gc",fot="jvm.thread.count",Aot="kestrel.active_connections",mot="kestrel.active_tls_handshakes",got="kestrel.connection.duration",hot="kestrel.queued_connections",_ot="kestrel.queued_requests",Eot="kestrel.rejected_connections",Sot="kestrel.tls_handshake.duration",yot="kestrel.upgraded_connections",Tot="signalr.server.active_connections",Iot="signalr.server.connection.duration"});var Cot,eEe=O(()=>{m();Cot="exception"});var Ur={};za(Ur,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Ett,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Stt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>ytt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Ttt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>vtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Rtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>xtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Dtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>wtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>ktt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>_tt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Itt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Ctt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>btt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>Btt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Ntt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Ott,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Mtt,ATTR_CLIENT_ADDRESS:()=>Ptt,ATTR_CLIENT_PORT:()=>Utt,ATTR_CODE_COLUMN_NUMBER:()=>Ltt,ATTR_CODE_FILE_PATH:()=>Qtt,ATTR_CODE_FUNCTION_NAME:()=>Ftt,ATTR_CODE_LINE_NUMBER:()=>Gtt,ATTR_CODE_STACKTRACE:()=>jtt,ATTR_DB_COLLECTION_NAME:()=>g5,ATTR_DB_NAMESPACE:()=>h5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Htt,ATTR_DB_OPERATION_NAME:()=>VC,ATTR_DB_QUERY_SUMMARY:()=>ztt,ATTR_DB_QUERY_TEXT:()=>_5,ATTR_DB_RESPONSE_STATUS_CODE:()=>E5,ATTR_DB_STORED_PROCEDURE_NAME:()=>$tt,ATTR_DB_SYSTEM_NAME:()=>DS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Jtt,ATTR_ERROR_TYPE:()=>S5,ATTR_EXCEPTION_ESCAPED:()=>rnt,ATTR_EXCEPTION_MESSAGE:()=>ont,ATTR_EXCEPTION_STACKTRACE:()=>int,ATTR_EXCEPTION_TYPE:()=>ant,ATTR_HTTP_REQUEST_HEADER:()=>snt,ATTR_HTTP_REQUEST_METHOD:()=>BS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>_nt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Ent,ATTR_HTTP_RESPONSE_HEADER:()=>Snt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>tg,ATTR_HTTP_ROUTE:()=>ng,ATTR_JVM_GC_ACTION:()=>ynt,ATTR_JVM_GC_NAME:()=>Tnt,ATTR_JVM_MEMORY_POOL_NAME:()=>Int,ATTR_JVM_MEMORY_TYPE:()=>Cnt,ATTR_JVM_THREAD_DAEMON:()=>Rnt,ATTR_JVM_THREAD_STATE:()=>xnt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Mnt,ATTR_NETWORK_LOCAL_PORT:()=>Pnt,ATTR_NETWORK_PEER_ADDRESS:()=>y5,ATTR_NETWORK_PEER_PORT:()=>T5,ATTR_NETWORK_PROTOCOL_NAME:()=>Unt,ATTR_NETWORK_PROTOCOL_VERSION:()=>I5,ATTR_NETWORK_TRANSPORT:()=>C5,ATTR_NETWORK_TYPE:()=>Hnt,ATTR_OTEL_SCOPE_NAME:()=>Vnt,ATTR_OTEL_SCOPE_VERSION:()=>qnt,ATTR_OTEL_STATUS_CODE:()=>Ynt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Znt,ATTR_SERVER_ADDRESS:()=>b5,ATTR_SERVER_PORT:()=>v5,ATTR_SERVICE_INSTANCE_ID:()=>Wnt,ATTR_SERVICE_NAME:()=>R5,ATTR_SERVICE_NAMESPACE:()=>Xnt,ATTR_SERVICE_VERSION:()=>x5,ATTR_SIGNALR_CONNECTION_STATUS:()=>ert,ATTR_SIGNALR_TRANSPORT:()=>ort,ATTR_TELEMETRY_SDK_LANGUAGE:()=>urt,ATTR_TELEMETRY_SDK_NAME:()=>yrt,ATTR_TELEMETRY_SDK_VERSION:()=>Trt,ATTR_URL_FRAGMENT:()=>Irt,ATTR_URL_FULL:()=>t_,ATTR_URL_PATH:()=>Crt,ATTR_URL_QUERY:()=>brt,ATTR_URL_SCHEME:()=>vrt,ATTR_USER_AGENT_ORIGINAL:()=>D5,AWSECSLAUNCHTYPEVALUES_EC2:()=>Let,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Qet,AwsEcsLaunchtypeValues:()=>Fet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Eet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>yet,CLOUDPLATFORMVALUES_AWS_EC2:()=>Tet,CLOUDPLATFORMVALUES_AWS_ECS:()=>Iet,CLOUDPLATFORMVALUES_AWS_EKS:()=>Cet,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>vet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>bet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Det,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Net,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>xet,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Bet,CLOUDPLATFORMVALUES_AZURE_VM:()=>Ret,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Pet,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Met,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>wet,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Oet,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>ket,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Aet,CLOUDPROVIDERVALUES_AWS:()=>met,CLOUDPROVIDERVALUES_AZURE:()=>get,CLOUDPROVIDERVALUES_GCP:()=>het,CloudPlatformValues:()=>Uet,CloudProviderValues:()=>_et,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>WJe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>aZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>XJe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>iZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>tZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>uZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>nZe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>eZe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>sZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>oZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>rZe,DBSYSTEMVALUES_ADABAS:()=>yJe,DBSYSTEMVALUES_CACHE:()=>SJe,DBSYSTEMVALUES_CASSANDRA:()=>LJe,DBSYSTEMVALUES_CLOUDSCAPE:()=>pJe,DBSYSTEMVALUES_COCKROACHDB:()=>JJe,DBSYSTEMVALUES_COLDFUSION:()=>UJe,DBSYSTEMVALUES_COSMOSDB:()=>zJe,DBSYSTEMVALUES_COUCHBASE:()=>jJe,DBSYSTEMVALUES_COUCHDB:()=>HJe,DBSYSTEMVALUES_DB2:()=>uJe,DBSYSTEMVALUES_DERBY:()=>IJe,DBSYSTEMVALUES_DYNAMODB:()=>$Je,DBSYSTEMVALUES_EDB:()=>EJe,DBSYSTEMVALUES_ELASTICSEARCH:()=>YJe,DBSYSTEMVALUES_FILEMAKER:()=>CJe,DBSYSTEMVALUES_FIREBIRD:()=>TJe,DBSYSTEMVALUES_FIRSTSQL:()=>_Je,DBSYSTEMVALUES_GEODE:()=>qJe,DBSYSTEMVALUES_H2:()=>PJe,DBSYSTEMVALUES_HANADB:()=>gJe,DBSYSTEMVALUES_HBASE:()=>QJe,DBSYSTEMVALUES_HIVE:()=>dJe,DBSYSTEMVALUES_HSQLDB:()=>fJe,DBSYSTEMVALUES_INFORMIX:()=>bJe,DBSYSTEMVALUES_INGRES:()=>hJe,DBSYSTEMVALUES_INSTANTDB:()=>vJe,DBSYSTEMVALUES_INTERBASE:()=>RJe,DBSYSTEMVALUES_MARIADB:()=>xJe,DBSYSTEMVALUES_MAXDB:()=>mJe,DBSYSTEMVALUES_MEMCACHED:()=>KJe,DBSYSTEMVALUES_MONGODB:()=>FJe,DBSYSTEMVALUES_MSSQL:()=>iJe,DBSYSTEMVALUES_MYSQL:()=>aJe,DBSYSTEMVALUES_NEO4J:()=>VJe,DBSYSTEMVALUES_NETEZZA:()=>DJe,DBSYSTEMVALUES_ORACLE:()=>sJe,DBSYSTEMVALUES_OTHER_SQL:()=>oJe,DBSYSTEMVALUES_PERVASIVE:()=>BJe,DBSYSTEMVALUES_POINTBASE:()=>NJe,DBSYSTEMVALUES_POSTGRESQL:()=>cJe,DBSYSTEMVALUES_PROGRESS:()=>AJe,DBSYSTEMVALUES_REDIS:()=>GJe,DBSYSTEMVALUES_REDSHIFT:()=>lJe,DBSYSTEMVALUES_SQLITE:()=>OJe,DBSYSTEMVALUES_SYBASE:()=>wJe,DBSYSTEMVALUES_TERADATA:()=>kJe,DBSYSTEMVALUES_VERTICA:()=>MJe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Vtt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>qtt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Ytt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Ktt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Ztt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Wtt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Xtt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>ent,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>tnt,DbCassandraConsistencyLevelValues:()=>cZe,DbSystemValues:()=>ZJe,ERROR_TYPE_VALUE_OTHER:()=>nnt,EVENT_EXCEPTION:()=>Cot,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>_Ze,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>hZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>gZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>SZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>yZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>TZe,FAASINVOKEDPROVIDERVALUES_GCP:()=>IZe,FAASTRIGGERVALUES_DATASOURCE:()=>lZe,FAASTRIGGERVALUES_HTTP:()=>dZe,FAASTRIGGERVALUES_OTHER:()=>AZe,FAASTRIGGERVALUES_PUBSUB:()=>pZe,FAASTRIGGERVALUES_TIMER:()=>fZe,FaasDocumentOperationValues:()=>EZe,FaasInvokedProviderValues:()=>CZe,FaasTriggerValues:()=>mZe,HOSTARCHVALUES_AMD64:()=>Get,HOSTARCHVALUES_ARM32:()=>jet,HOSTARCHVALUES_ARM64:()=>Het,HOSTARCHVALUES_IA64:()=>zet,HOSTARCHVALUES_PPC32:()=>$et,HOSTARCHVALUES_PPC64:()=>Vet,HOSTARCHVALUES_X86:()=>qet,HTTPFLAVORVALUES_HTTP_1_0:()=>sWe,HTTPFLAVORVALUES_HTTP_1_1:()=>uWe,HTTPFLAVORVALUES_HTTP_2_0:()=>cWe,HTTPFLAVORVALUES_QUIC:()=>dWe,HTTPFLAVORVALUES_SPDY:()=>lWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>cnt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>lnt,HTTP_REQUEST_METHOD_VALUE_GET:()=>dnt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>pnt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>fnt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>unt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Ant,HTTP_REQUEST_METHOD_VALUE_POST:()=>mnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>gnt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>hnt,HostArchValues:()=>Yet,HttpFlavorValues:()=>pWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>bnt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>vnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Dnt,JVM_THREAD_STATE_VALUE_NEW:()=>Bnt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Nnt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Ont,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>wnt,JVM_THREAD_STATE_VALUE_WAITING:()=>knt,MESSAGETYPEVALUES_RECEIVED:()=>LWe,MESSAGETYPEVALUES_SENT:()=>UWe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>fWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>AWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>hWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>gWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Rrt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>xrt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Drt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ort,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Nrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Brt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>wrt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>krt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Mrt,METRIC_DOTNET_EXCEPTIONS:()=>Prt,METRIC_DOTNET_GC_COLLECTIONS:()=>Urt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Lrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Qrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Frt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Grt,METRIC_DOTNET_GC_PAUSE_TIME:()=>jrt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Hrt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>zrt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>$rt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Vrt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>qrt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Yrt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Krt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Jrt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Zrt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Wrt,METRIC_DOTNET_TIMER_COUNT:()=>Xrt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>eot,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>tot,METRIC_JVM_CLASS_COUNT:()=>not,METRIC_JVM_CLASS_LOADED:()=>rot,METRIC_JVM_CLASS_UNLOADED:()=>oot,METRIC_JVM_CPU_COUNT:()=>iot,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>aot,METRIC_JVM_CPU_TIME:()=>sot,METRIC_JVM_GC_DURATION:()=>uot,METRIC_JVM_MEMORY_COMMITTED:()=>cot,METRIC_JVM_MEMORY_LIMIT:()=>lot,METRIC_JVM_MEMORY_USED:()=>dot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>pot,METRIC_JVM_THREAD_COUNT:()=>fot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Aot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>mot,METRIC_KESTREL_CONNECTION_DURATION:()=>got,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>hot,METRIC_KESTREL_QUEUED_REQUESTS:()=>_ot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Eot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Sot,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>yot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Tot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Iot,MessageTypeValues:()=>QWe,MessagingDestinationKindValues:()=>mWe,MessagingOperationValues:()=>_We,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>jZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>$Ze,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>FZe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>WZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>HZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>zZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>JZe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>QZe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>eWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>VZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>YZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>XZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>qZe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>KZe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>nWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>ZZe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>iWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>rWe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>oWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>tWe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>GZe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>MZe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>PZe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>UZe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>wZe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>kZe,NETTRANSPORTVALUES_INPROC:()=>BZe,NETTRANSPORTVALUES_IP:()=>RZe,NETTRANSPORTVALUES_IP_TCP:()=>bZe,NETTRANSPORTVALUES_IP_UDP:()=>vZe,NETTRANSPORTVALUES_OTHER:()=>NZe,NETTRANSPORTVALUES_PIPE:()=>DZe,NETTRANSPORTVALUES_UNIX:()=>xZe,NETWORK_TRANSPORT_VALUE_PIPE:()=>Lnt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Qnt,NETWORK_TRANSPORT_VALUE_TCP:()=>Fnt,NETWORK_TRANSPORT_VALUE_UDP:()=>Gnt,NETWORK_TRANSPORT_VALUE_UNIX:()=>jnt,NETWORK_TYPE_VALUE_IPV4:()=>znt,NETWORK_TYPE_VALUE_IPV6:()=>$nt,NetHostConnectionSubtypeValues:()=>aWe,NetHostConnectionTypeValues:()=>LZe,NetTransportValues:()=>OZe,OSTYPEVALUES_AIX:()=>rtt,OSTYPEVALUES_DARWIN:()=>Zet,OSTYPEVALUES_DRAGONFLYBSD:()=>ttt,OSTYPEVALUES_FREEBSD:()=>Wet,OSTYPEVALUES_HPUX:()=>ntt,OSTYPEVALUES_LINUX:()=>Jet,OSTYPEVALUES_NETBSD:()=>Xet,OSTYPEVALUES_OPENBSD:()=>ett,OSTYPEVALUES_SOLARIS:()=>ott,OSTYPEVALUES_WINDOWS:()=>Ket,OSTYPEVALUES_Z_OS:()=>itt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Knt,OTEL_STATUS_CODE_VALUE_OK:()=>Jnt,OsTypeValues:()=>att,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>DWe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>bWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>SWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>kWe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>IWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>xWe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>OWe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>TWe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>CWe,RPCGRPCSTATUSCODEVALUES_OK:()=>EWe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>BWe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>vWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>RWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>MWe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>wWe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>NWe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>yWe,RpcGrpcStatusCodeValues:()=>PWe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>mKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>RKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>pKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>uKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>bKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>SKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>_Ke,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>xKe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>gKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>cKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>AKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>EKe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>fKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>lKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>dKe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>vKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>TKe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>IKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>hKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>yKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>sKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>CKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>X7e,SEMATTRS_CODE_FILEPATH:()=>ZYe,SEMATTRS_CODE_FUNCTION:()=>KYe,SEMATTRS_CODE_LINENO:()=>WYe,SEMATTRS_CODE_NAMESPACE:()=>JYe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>uYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>fYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>pYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>lYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>aYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>sYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>dYe,SEMATTRS_DB_CASSANDRA_TABLE:()=>cYe,SEMATTRS_DB_CONNECTION_STRING:()=>eYe,SEMATTRS_DB_HBASE_NAMESPACE:()=>AYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>nYe,SEMATTRS_DB_MONGODB_COLLECTION:()=>gYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>iYe,SEMATTRS_DB_NAME:()=>rYe,SEMATTRS_DB_OPERATION:()=>oYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>mYe,SEMATTRS_DB_SQL_TABLE:()=>hYe,SEMATTRS_DB_STATEMENT:()=>r5,SEMATTRS_DB_SYSTEM:()=>n5,SEMATTRS_DB_USER:()=>tYe,SEMATTRS_ENDUSER_ID:()=>zYe,SEMATTRS_ENDUSER_ROLE:()=>$Ye,SEMATTRS_ENDUSER_SCOPE:()=>VYe,SEMATTRS_EXCEPTION_ESCAPED:()=>yYe,SEMATTRS_EXCEPTION_MESSAGE:()=>EYe,SEMATTRS_EXCEPTION_STACKTRACE:()=>SYe,SEMATTRS_EXCEPTION_TYPE:()=>_Ye,SEMATTRS_FAAS_COLDSTART:()=>DYe,SEMATTRS_FAAS_CRON:()=>xYe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>IYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>vYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>CYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>bYe,SEMATTRS_FAAS_EXECUTION:()=>TYe,SEMATTRS_FAAS_INVOKED_NAME:()=>BYe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>NYe,SEMATTRS_FAAS_INVOKED_REGION:()=>OYe,SEMATTRS_FAAS_TIME:()=>RYe,SEMATTRS_FAAS_TRIGGER:()=>o5,SEMATTRS_HTTP_CLIENT_IP:()=>aKe,SEMATTRS_HTTP_FLAVOR:()=>tKe,SEMATTRS_HTTP_HOST:()=>XYe,SEMATTRS_HTTP_METHOD:()=>rB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>rKe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>oKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>c5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>l5,SEMATTRS_HTTP_ROUTE:()=>d5,SEMATTRS_HTTP_SCHEME:()=>eKe,SEMATTRS_HTTP_SERVER_NAME:()=>iKe,SEMATTRS_HTTP_STATUS_CODE:()=>xS,SEMATTRS_HTTP_TARGET:()=>u5,SEMATTRS_HTTP_URL:()=>$C,SEMATTRS_HTTP_USER_AGENT:()=>nKe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>tJe,SEMATTRS_MESSAGE_ID:()=>eJe,SEMATTRS_MESSAGE_TYPE:()=>XKe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>nJe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>FKe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>PKe,SEMATTRS_MESSAGING_DESTINATION:()=>DKe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>BKe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>zKe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>HKe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>jKe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>$Ke,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>VKe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>MKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>LKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>UKe,SEMATTRS_MESSAGING_OPERATION:()=>QKe,SEMATTRS_MESSAGING_PROTOCOL:()=>OKe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>wKe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>GKe,SEMATTRS_MESSAGING_SYSTEM:()=>p5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>NKe,SEMATTRS_MESSAGING_URL:()=>kKe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>jYe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>FYe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>GYe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>QYe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>LYe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>UYe,SEMATTRS_NET_HOST_IP:()=>a5,SEMATTRS_NET_HOST_NAME:()=>PYe,SEMATTRS_NET_HOST_PORT:()=>s5,SEMATTRS_NET_PEER_IP:()=>i5,SEMATTRS_NET_PEER_NAME:()=>MYe,SEMATTRS_NET_PEER_PORT:()=>kYe,SEMATTRS_NET_TRANSPORT:()=>wYe,SEMATTRS_PEER_SERVICE:()=>HYe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>A5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>ZKe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>WKe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>JKe,SEMATTRS_RPC_JSONRPC_VERSION:()=>KKe,SEMATTRS_RPC_METHOD:()=>YKe,SEMATTRS_RPC_SERVICE:()=>f5,SEMATTRS_RPC_SYSTEM:()=>qKe,SEMATTRS_THREAD_ID:()=>qYe,SEMATTRS_THREAD_NAME:()=>YYe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>VWe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>$We,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>qWe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>YWe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>KWe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>JWe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>ZWe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>XWe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>WWe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>tXe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>eXe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>GWe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>HWe,SEMRESATTRS_CLOUD_PLATFORM:()=>zWe,SEMRESATTRS_CLOUD_PROVIDER:()=>FWe,SEMRESATTRS_CLOUD_REGION:()=>jWe,SEMRESATTRS_CONTAINER_ID:()=>rXe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>iXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>aXe,SEMRESATTRS_CONTAINER_NAME:()=>nXe,SEMRESATTRS_CONTAINER_RUNTIME:()=>oXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>sXe,SEMRESATTRS_DEVICE_ID:()=>uXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>cXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>lXe,SEMRESATTRS_FAAS_ID:()=>pXe,SEMRESATTRS_FAAS_INSTANCE:()=>AXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>mXe,SEMRESATTRS_FAAS_NAME:()=>dXe,SEMRESATTRS_FAAS_VERSION:()=>fXe,SEMRESATTRS_HOST_ARCH:()=>EXe,SEMRESATTRS_HOST_ID:()=>gXe,SEMRESATTRS_HOST_IMAGE_ID:()=>yXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>SXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>TXe,SEMRESATTRS_HOST_NAME:()=>hXe,SEMRESATTRS_HOST_TYPE:()=>_Xe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>IXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>DXe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>GXe,SEMRESATTRS_K8S_CRONJOB_UID:()=>FXe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>UXe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>PXe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>wXe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>OXe,SEMRESATTRS_K8S_JOB_NAME:()=>QXe,SEMRESATTRS_K8S_JOB_UID:()=>LXe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>vXe,SEMRESATTRS_K8S_NODE_NAME:()=>CXe,SEMRESATTRS_K8S_NODE_UID:()=>bXe,SEMRESATTRS_K8S_POD_NAME:()=>xXe,SEMRESATTRS_K8S_POD_UID:()=>RXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>NXe,SEMRESATTRS_K8S_REPLICASET_UID:()=>BXe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>MXe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>kXe,SEMRESATTRS_OS_DESCRIPTION:()=>HXe,SEMRESATTRS_OS_NAME:()=>zXe,SEMRESATTRS_OS_TYPE:()=>jXe,SEMRESATTRS_OS_VERSION:()=>$Xe,SEMRESATTRS_PROCESS_COMMAND:()=>KXe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>ZXe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>JXe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>qXe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>YXe,SEMRESATTRS_PROCESS_OWNER:()=>WXe,SEMRESATTRS_PROCESS_PID:()=>VXe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>tet,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>XXe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>eet,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>ret,SEMRESATTRS_SERVICE_NAME:()=>net,SEMRESATTRS_SERVICE_NAMESPACE:()=>m5,SEMRESATTRS_SERVICE_VERSION:()=>oet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>uet,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>aet,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>iet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>set,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>pet,SEMRESATTRS_WEBENGINE_NAME:()=>cet,SEMRESATTRS_WEBENGINE_VERSION:()=>det,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>trt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>nrt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>rrt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>irt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>art,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>srt,SemanticAttributes:()=>rJe,SemanticResourceAttributes:()=>fet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>stt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>utt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>ctt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>ltt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>dtt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>ptt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>ftt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Att,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>mtt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>gtt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>crt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>lrt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>drt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>prt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>frt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Art,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>mrt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>grt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>hrt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>_rt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Ert,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Srt,TelemetrySdkLanguageValues:()=>htt});var Zn=O(()=>{m();bge();Z_e();W_e();X_e();eEe()});var tEe=F(y2=>{"use strict";m();Object.defineProperty(y2,"__esModule",{value:!0});y2.ATTR_PROCESS_RUNTIME_NAME=void 0;y2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var nEe=F(I2=>{"use strict";m();Object.defineProperty(I2,"__esModule",{value:!0});I2.SDK_INFO=void 0;var bot=kde(),T2=(Zn(),Me(Ur)),vot=tEe();I2.SDK_INFO={[T2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[vot.ATTR_PROCESS_RUNTIME_NAME]:"node",[T2.ATTR_TELEMETRY_SDK_LANGUAGE]:T2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[T2.ATTR_TELEMETRY_SDK_VERSION]:bot.VERSION}});var rEe=F(Zs=>{"use strict";m();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.otperformance=Zs.SDK_INFO=Zs._globalThis=Zs.getStringListFromEnv=Zs.getNumberFromEnv=Zs.getBooleanFromEnv=Zs.getStringFromEnv=void 0;var C2=Ode();Object.defineProperty(Zs,"getStringFromEnv",{enumerable:!0,get:function(){return C2.getStringFromEnv}});Object.defineProperty(Zs,"getBooleanFromEnv",{enumerable:!0,get:function(){return C2.getBooleanFromEnv}});Object.defineProperty(Zs,"getNumberFromEnv",{enumerable:!0,get:function(){return C2.getNumberFromEnv}});Object.defineProperty(Zs,"getStringListFromEnv",{enumerable:!0,get:function(){return C2.getStringListFromEnv}});var Rot=wde();Object.defineProperty(Zs,"_globalThis",{enumerable:!0,get:function(){return Rot._globalThis}});var xot=nEe();Object.defineProperty(Zs,"SDK_INFO",{enumerable:!0,get:function(){return xot.SDK_INFO}});Zs.otperformance=performance});var B5=F(Ws=>{"use strict";m();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getStringFromEnv=Ws.getBooleanFromEnv=Ws.otperformance=Ws._globalThis=Ws.SDK_INFO=void 0;var NS=rEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return NS.SDK_INFO}});Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return NS._globalThis}});Object.defineProperty(Ws,"otperformance",{enumerable:!0,get:function(){return NS.otperformance}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return NS.getBooleanFromEnv}});Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return NS.getStringFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return NS.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return NS.getStringListFromEnv}})});var sEe=F(ao=>{"use strict";m();Object.defineProperty(ao,"__esModule",{value:!0});ao.addHrTimes=ao.isTimeInput=ao.isTimeInputHrTime=ao.hrTimeToMicroseconds=ao.hrTimeToMilliseconds=ao.hrTimeToNanoseconds=ao.hrTimeToTimeStamp=ao.hrTimeDuration=ao.timeInputToHrTime=ao.hrTime=ao.getTimeOrigin=ao.millisToHrTime=void 0;var b2=B5(),oEe=9,Dot=6,Bot=Math.pow(10,Dot),v2=Math.pow(10,oEe);function oB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Bot);return[n,r]}ao.millisToHrTime=oB;function Not(){return b2.otperformance.timeOrigin}ao.getTimeOrigin=Not;function iEe(e){let t=oB(b2.otperformance.timeOrigin),n=oB(typeof e=="number"?e:b2.otperformance.now());return aEe(t,n)}ao.hrTime=iEe;function Oot(e){if(N5(e))return e;if(typeof e=="number")return e<b2.otperformance.timeOrigin?iEe(e):oB(e);if(e instanceof Date)return oB(e.getTime());throw TypeError("Invalid input type")}ao.timeInputToHrTime=Oot;function wot(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=v2),[n,r]}ao.hrTimeDuration=wot;function kot(e){let t=oEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}ao.hrTimeToTimeStamp=kot;function Mot(e){return e[0]*v2+e[1]}ao.hrTimeToNanoseconds=Mot;function Pot(e){return e[0]*1e3+e[1]/1e6}ao.hrTimeToMilliseconds=Pot;function Uot(e){return e[0]*1e6+e[1]/1e3}ao.hrTimeToMicroseconds=Uot;function N5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}ao.isTimeInputHrTime=N5;function Lot(e){return N5(e)||typeof e=="number"||e instanceof Date}ao.isTimeInput=Lot;function aEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=v2&&(n[1]-=v2,n[0]+=1),n}ao.addHrTimes=aEe});var uEe=F(R2=>{"use strict";m();Object.defineProperty(R2,"__esModule",{value:!0});R2.unrefTimer=void 0;function Qot(e){typeof e!="number"&&e.unref()}R2.unrefTimer=Qot});var cEe=F(iB=>{"use strict";m();Object.defineProperty(iB,"__esModule",{value:!0});iB.ExportResultCode=void 0;var Fot;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Fot=iB.ExportResultCode||(iB.ExportResultCode={}))});var dEe=F(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.CompositePropagator=void 0;var lEe=(je(),Me(We)),O5=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){lEe.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){lEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};x2.CompositePropagator=O5});var pEe=F(qC=>{"use strict";m();Object.defineProperty(qC,"__esModule",{value:!0});qC.validateValue=qC.validateKey=void 0;var w5="[_0-9a-z-*/]",Got=`[a-z]${w5}{0,255}`,jot=`[a-z0-9]${w5}{0,240}@[a-z]${w5}{0,13}`,Hot=new RegExp(`^(?:${Got}|${jot})$`),zot=/^[ -~]{0,255}[!-~]$/,$ot=/,|=/;function Vot(e){return Hot.test(e)}qC.validateKey=Vot;function qot(e){return zot.test(e)&&!$ot.test(e)}qC.validateValue=qot});var M5=F(D2=>{"use strict";m();Object.defineProperty(D2,"__esModule",{value:!0});D2.TraceState=void 0;var fEe=pEe(),AEe=32,Yot=512,mEe=",",gEe="=",k5=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+gEe+this.get(n)),t),[]).join(mEe)}_parse(t){t.length>Yot||(this._internalState=t.split(mEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(gEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,fEe.validateKey)(a)&&(0,fEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>AEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,AEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};D2.TraceState=k5});var _Ee=F(Xs=>{"use strict";m();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.W3CTraceContextPropagator=Xs.parseTraceParent=Xs.TRACE_STATE_HEADER=Xs.TRACE_PARENT_HEADER=void 0;var B2=(je(),Me(We)),Kot=nB(),Jot=M5();Xs.TRACE_PARENT_HEADER="traceparent";Xs.TRACE_STATE_HEADER="tracestate";var Zot="00",Wot="(?!ff)[\\da-f]{2}",Xot="(?![0]{32})[\\da-f]{32}",eit="(?![0]{16})[\\da-f]{16}",tit="[\\da-f]{2}",nit=new RegExp(`^\\s?(${Wot})-(${Xot})-(${eit})-(${tit})(-.*)?\\s?$`);function hEe(e){let t=nit.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Xs.parseTraceParent=hEe;var P5=class{inject(t,n,r){let o=B2.trace.getSpanContext(t);if(!o||(0,Kot.isTracingSuppressed)(t)||!(0,B2.isSpanContextValid)(o))return;let i=`${Zot}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||B2.TraceFlags.NONE).toString(16)}`;r.set(n,Xs.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Xs.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Xs.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=hEe(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Xs.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new Jot.TraceState(typeof d=="string"?d:void 0)}return B2.trace.setSpanContext(t,a)}fields(){return[Xs.TRACE_PARENT_HEADER,Xs.TRACE_STATE_HEADER]}};Xs.W3CTraceContextPropagator=P5});var EEe=F(qp=>{"use strict";m();Object.defineProperty(qp,"__esModule",{value:!0});qp.getRPCMetadata=qp.deleteRPCMetadata=qp.setRPCMetadata=qp.RPCType=void 0;var rit=(je(),Me(We)),U5=(0,rit.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),oit;(function(e){e.HTTP="http"})(oit=qp.RPCType||(qp.RPCType={}));function iit(e,t){return e.setValue(U5,t)}qp.setRPCMetadata=iit;function ait(e){return e.deleteValue(U5)}qp.deleteRPCMetadata=ait;function sit(e){return e.getValue(U5)}qp.getRPCMetadata=sit});var CEe=F(N2=>{"use strict";m();Object.defineProperty(N2,"__esModule",{value:!0});N2.isPlainObject=void 0;var uit="[object Object]",cit="[object Null]",lit="[object Undefined]",dit=Function.prototype,SEe=dit.toString,pit=SEe.call(Object),fit=Object.getPrototypeOf,yEe=Object.prototype,TEe=yEe.hasOwnProperty,OS=Symbol?Symbol.toStringTag:void 0,IEe=yEe.toString;function Ait(e){if(!mit(e)||git(e)!==uit)return!1;let t=fit(e);if(t===null)return!0;let n=TEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&SEe.call(n)===pit}N2.isPlainObject=Ait;function mit(e){return e!=null&&typeof e=="object"}function git(e){return e==null?e===void 0?lit:cit:OS&&OS in Object(e)?hit(e):_it(e)}function hit(e){let t=TEe.call(e,OS),n=e[OS],r=!1;try{e[OS]=void 0,r=!0}catch{}let o=IEe.call(e);return r&&(t?e[OS]=n:delete e[OS]),o}function _it(e){return IEe.call(e)}});var DEe=F(k2=>{"use strict";m();Object.defineProperty(k2,"__esModule",{value:!0});k2.merge=void 0;var bEe=CEe(),Eit=20;function Sit(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=REe(t,e.shift(),0,n);return t}k2.merge=Sit;function L5(e){return w2(e)?e.slice():e}function REe(e,t,n=0,r){let o;if(!(n>Eit)){if(n++,O2(e)||O2(t)||xEe(t))o=L5(t);else if(w2(e)){if(o=e.slice(),w2(t))for(let i=0,a=t.length;i<a;i++)o.push(L5(t[i]));else if(aB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=L5(t[d])}}}else if(aB(e))if(aB(t)){if(!yit(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],g=t[d];if(O2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(vEe(e,d,r)||vEe(t,d,r))delete o[d];else{if(aB(h)&&aB(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]=REe(o[d],g,n,r)}}}}else o=t;return o}}function vEe(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 w2(e){return Array.isArray(e)}function xEe(e){return typeof e=="function"}function aB(e){return!O2(e)&&!w2(e)&&!xEe(e)&&typeof e=="object"}function O2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function yit(e,t){return!(!(0,bEe.isPlainObject)(e)||!(0,bEe.isPlainObject)(t))}});var BEe=F(YC=>{"use strict";m();Object.defineProperty(YC,"__esModule",{value:!0});YC.callWithTimeout=YC.TimeoutError=void 0;var M2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};YC.TimeoutError=M2;function Tit(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new M2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}YC.callWithTimeout=Tit});var OEe=F(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.isUrlIgnored=KC.urlMatches=void 0;function NEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}KC.urlMatches=NEe;function Iit(e,t){if(!t)return!1;for(let n of t)if(NEe(e,n))return!0;return!1}KC.isUrlIgnored=Iit});var wEe=F(P2=>{"use strict";m();Object.defineProperty(P2,"__esModule",{value:!0});P2.Deferred=void 0;var Q5=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)}};P2.Deferred=Q5});var kEe=F(U2=>{"use strict";m();Object.defineProperty(U2,"__esModule",{value:!0});U2.BindOnceFuture=void 0;var Cit=wEe(),F5=class{_isCalled=!1;_deferred=new Cit.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}};U2.BindOnceFuture=F5});var PEe=F(L2=>{"use strict";m();Object.defineProperty(L2,"__esModule",{value:!0});L2.diagLogLevelFromString=void 0;var rg=(je(),Me(We)),MEe={ALL:rg.DiagLogLevel.ALL,VERBOSE:rg.DiagLogLevel.VERBOSE,DEBUG:rg.DiagLogLevel.DEBUG,INFO:rg.DiagLogLevel.INFO,WARN:rg.DiagLogLevel.WARN,ERROR:rg.DiagLogLevel.ERROR,NONE:rg.DiagLogLevel.NONE};function bit(e){if(e==null)return;let t=MEe[e.toUpperCase()];return t??(rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(MEe)}, using default`),rg.DiagLogLevel.INFO)}L2.diagLogLevelFromString=bit});var LEe=F(Q2=>{"use strict";m();Object.defineProperty(Q2,"__esModule",{value:!0});Q2._export=void 0;var UEe=(je(),Me(We)),vit=nB();function Rit(e,t){return new Promise(n=>{UEe.context.with((0,vit.suppressTracing)(UEe.context.active()),()=>{e.export(t,n)})})}Q2._export=Rit});var Tr=F(Oe=>{"use strict";m();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.internal=Oe.diagLogLevelFromString=Oe.BindOnceFuture=Oe.urlMatches=Oe.isUrlIgnored=Oe.callWithTimeout=Oe.TimeoutError=Oe.merge=Oe.TraceState=Oe.unsuppressTracing=Oe.suppressTracing=Oe.isTracingSuppressed=Oe.setRPCMetadata=Oe.getRPCMetadata=Oe.deleteRPCMetadata=Oe.RPCType=Oe.parseTraceParent=Oe.W3CTraceContextPropagator=Oe.TRACE_STATE_HEADER=Oe.TRACE_PARENT_HEADER=Oe.CompositePropagator=Oe.otperformance=Oe.getStringListFromEnv=Oe.getNumberFromEnv=Oe.getBooleanFromEnv=Oe.getStringFromEnv=Oe._globalThis=Oe.SDK_INFO=Oe.parseKeyPairsIntoRecord=Oe.ExportResultCode=Oe.unrefTimer=Oe.timeInputToHrTime=Oe.millisToHrTime=Oe.isTimeInputHrTime=Oe.isTimeInput=Oe.hrTimeToTimeStamp=Oe.hrTimeToNanoseconds=Oe.hrTimeToMilliseconds=Oe.hrTimeToMicroseconds=Oe.hrTimeDuration=Oe.hrTime=Oe.getTimeOrigin=Oe.addHrTimes=Oe.loggingErrorHandler=Oe.setGlobalErrorHandler=Oe.globalErrorHandler=Oe.sanitizeAttributes=Oe.isAttributeValue=Oe.AnchoredClock=Oe.W3CBaggagePropagator=void 0;var xit=Sde();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return xit.W3CBaggagePropagator}});var Dit=yde();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return Dit.AnchoredClock}});var QEe=vde();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return QEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return QEe.sanitizeAttributes}});var FEe=xde();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return FEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return FEe.setGlobalErrorHandler}});var Bit=e5();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return Bit.loggingErrorHandler}});var Dd=sEe();Object.defineProperty(Oe,"addHrTimes",{enumerable:!0,get:function(){return Dd.addHrTimes}});Object.defineProperty(Oe,"getTimeOrigin",{enumerable:!0,get:function(){return Dd.getTimeOrigin}});Object.defineProperty(Oe,"hrTime",{enumerable:!0,get:function(){return Dd.hrTime}});Object.defineProperty(Oe,"hrTimeDuration",{enumerable:!0,get:function(){return Dd.hrTimeDuration}});Object.defineProperty(Oe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMicroseconds}});Object.defineProperty(Oe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMilliseconds}});Object.defineProperty(Oe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Dd.hrTimeToNanoseconds}});Object.defineProperty(Oe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Dd.hrTimeToTimeStamp}});Object.defineProperty(Oe,"isTimeInput",{enumerable:!0,get:function(){return Dd.isTimeInput}});Object.defineProperty(Oe,"isTimeInputHrTime",{enumerable:!0,get:function(){return Dd.isTimeInputHrTime}});Object.defineProperty(Oe,"millisToHrTime",{enumerable:!0,get:function(){return Dd.millisToHrTime}});Object.defineProperty(Oe,"timeInputToHrTime",{enumerable:!0,get:function(){return Dd.timeInputToHrTime}});var Nit=uEe();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return Nit.unrefTimer}});var Oit=cEe();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return Oit.ExportResultCode}});var wit=K$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return wit.parseKeyPairsIntoRecord}});var wS=B5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return wS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return wS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return wS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return wS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return wS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return wS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return wS.otperformance}});var kit=dEe();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return kit.CompositePropagator}});var F2=_Ee();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return F2.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return F2.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return F2.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return F2.parseTraceParent}});var G2=EEe();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return G2.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return G2.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return G2.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return G2.setRPCMetadata}});var G5=nB();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return G5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return G5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return G5.unsuppressTracing}});var Mit=M5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return Mit.TraceState}});var Pit=DEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return Pit.merge}});var GEe=BEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return GEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return GEe.callWithTimeout}});var jEe=OEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return jEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return jEe.urlMatches}});var Uit=kEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return Uit.BindOnceFuture}});var Lit=PEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return Lit.diagLogLevelFromString}});var Qit=LEe();Oe.internal={_export:Qit._export}});var HEe=F(j2=>{"use strict";m();Object.defineProperty(j2,"__esModule",{value:!0});j2.VERSION=void 0;j2.VERSION="0.214.0"});var zEe=F(sB=>{"use strict";m();Object.defineProperty(sB,"__esModule",{value:!0});sB.SeverityNumber=void 0;var Fit;(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"})(Fit=sB.SeverityNumber||(sB.SeverityNumber={}))});var z2=F(JC=>{"use strict";m();Object.defineProperty(JC,"__esModule",{value:!0});JC.NOOP_LOGGER=JC.NoopLogger=void 0;var H2=class{emit(t){}};JC.NoopLogger=H2;JC.NOOP_LOGGER=new H2});var $Ee=F(lA=>{"use strict";m();Object.defineProperty(lA,"__esModule",{value:!0});lA.API_BACKWARDS_COMPATIBILITY_VERSION=lA.makeGetter=lA._global=lA.GLOBAL_LOGS_API_KEY=void 0;lA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");lA._global=globalThis;function Git(e,t,n){return r=>r===e?t:n}lA.makeGetter=Git;lA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var j5=F(ZC=>{"use strict";m();Object.defineProperty(ZC,"__esModule",{value:!0});ZC.NOOP_LOGGER_PROVIDER=ZC.NoopLoggerProvider=void 0;var jit=z2(),$2=class{getLogger(t,n,r){return new jit.NoopLogger}};ZC.NoopLoggerProvider=$2;ZC.NOOP_LOGGER_PROVIDER=new $2});var VEe=F(V2=>{"use strict";m();Object.defineProperty(V2,"__esModule",{value:!0});V2.ProxyLogger=void 0;var Hit=z2(),H5=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):Hit.NOOP_LOGGER}};V2.ProxyLogger=H5});var qEe=F(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.ProxyLoggerProvider=void 0;var zit=j5(),$it=VEe(),z5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new $it.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:zit.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)}};q2.ProxyLoggerProvider=z5});var KEe=F(Y2=>{"use strict";m();Object.defineProperty(Y2,"__esModule",{value:!0});Y2.LogsAPI=void 0;var Bd=$Ee(),Vit=j5(),YEe=qEe(),$5=class e{constructor(){this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Bd._global[Bd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Bd._global[Bd.GLOBAL_LOGS_API_KEY]=(0,Bd.makeGetter)(Bd.API_BACKWARDS_COMPATIBILITY_VERSION,t,Vit.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Bd._global[Bd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Bd._global,Bd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Bd._global[Bd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}};Y2.LogsAPI=$5});var V5=F(dA=>{"use strict";m();Object.defineProperty(dA,"__esModule",{value:!0});dA.logs=dA.NoopLogger=dA.NOOP_LOGGER=dA.SeverityNumber=void 0;var qit=zEe();Object.defineProperty(dA,"SeverityNumber",{enumerable:!0,get:function(){return qit.SeverityNumber}});var JEe=z2();Object.defineProperty(dA,"NOOP_LOGGER",{enumerable:!0,get:function(){return JEe.NOOP_LOGGER}});Object.defineProperty(dA,"NoopLogger",{enumerable:!0,get:function(){return JEe.NoopLogger}});var Yit=KEe();dA.logs=Yit.LogsAPI.getInstance()});var ZEe=F(WC=>{"use strict";m();Object.defineProperty(WC,"__esModule",{value:!0});WC.disableInstrumentations=WC.enableInstrumentations=void 0;function Kit(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()}}WC.enableInstrumentations=Kit;function Jit(e){e.forEach(t=>t.disable())}WC.disableInstrumentations=Jit});var e0e=F(K2=>{"use strict";m();Object.defineProperty(K2,"__esModule",{value:!0});K2.registerInstrumentations=void 0;var WEe=(je(),Me(We)),Zit=V5(),XEe=ZEe();function Wit(e){let t=e.tracerProvider||WEe.trace.getTracerProvider(),n=e.meterProvider||WEe.metrics.getMeterProvider(),r=e.loggerProvider||Zit.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,XEe.enableInstrumentations)(o,t,n,r),()=>{(0,XEe.disableInstrumentations)(o)}}K2.registerInstrumentations=Wit});var c0e=F(J2=>{"use strict";m();Object.defineProperty(J2,"__esModule",{value:!0});J2.satisfies=void 0;var J5=(je(),Me(We)),i0e=/^(?: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-]+)*))?$/,Xit=/^(?<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-]+)*))?$/,eat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function tat(e,t,n){if(!nat(e))return J5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=aat(e);if(!r)return!1;let o=[],i=a0e(r,t,o,n);return i&&!n?.includePrerelease?oat(r,o):i}J2.satisfies=tat;function nat(e){return typeof e=="string"&&i0e.test(e)}function a0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(q5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Rat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!q5(e,i,n,r))return!1;return!0}return q5(e,t,n,r)}function q5(e,t,n,r){if(t=iat(t,r),t.includes(" "))return a0e(e,t,n,r);{let o=sat(t);return n.push(o),rat(e,o)}}function rat(e,t){if(t.invalid)return!1;if(!t.version||K5(t.version))return!0;let n=n0e(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=n0e(r,o)}return eat[t.op]?.includes(n)}function oat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function iat(e,t){return e=e.trim(),e=bat(e,t),e=Cat(e),e=vat(e,t),e=e.trim(),e}function wu(e){return!e||e.toLowerCase()==="x"||e==="*"}function aat(e){let t=e.match(i0e);if(!t){J5.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 sat(e){if(!e)return{};let t=e.match(Xit);if(!t)return J5.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 K5(e){return e==="*"||e==="x"||e==="X"}function t0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function uat(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 cat(e,t){if(K5(e)||K5(t))return 0;let[n,r]=uat(t0e(e),t0e(t));return n>r?1:n<r?-1:0}function n0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=cat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var s0e="[a-zA-Z0-9-]",u0e="0|[1-9]\\d*",lat=`\\d*[a-zA-Z-]${s0e}*`,dat="((?:<|>)?=?)",r0e=`(?:${u0e}|${lat})`,pat=`(?:-(${r0e}(?:\\.${r0e})*))`,o0e=`${s0e}+`,fat=`(?:\\+(${o0e}(?:\\.${o0e})*))`,Y5=`${u0e}|x|X|\\*`,uB=`[v=\\s]*(${Y5})(?:\\.(${Y5})(?:\\.(${Y5})(?:${pat})?${fat}?)?)?`,Aat=`^${dat}\\s*${uB}$`,mat=new RegExp(Aat),gat=`^\\s*(${uB})\\s+-\\s+(${uB})\\s*$`,hat=new RegExp(gat),_at="(?:~>?)",Eat=`^${_at}${uB}$`,Sat=new RegExp(Eat),yat="(?:\\^)",Tat=`^${yat}${uB}$`,Iat=new RegExp(Tat);function Cat(e){let t=Sat;return e.replace(t,(n,r,o,i,a)=>{let c;return wu(r)?c="":wu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:wu(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 bat(e,t){let n=Iat,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return wu(i)?g="":wu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:wu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function vat(e,t){let n=mat;return e.replace(n,(r,o,i,a,c,d)=>{let g=wu(i),h=g||wu(a),S=h||wu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?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 Rat(e,t){let n=hat;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(wu(i)?o="":wu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:wu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,wu(S)?h="":wu(y)?h=`<${+S+1}.0.0-0`:wu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var Z5=F(Ts=>{"use strict";m();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.massUnwrap=Ts.unwrap=Ts.massWrap=Ts.wrap=void 0;var ku=console.error.bind(console);function cB(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 xat=(e,t,n)=>{if(!e||!e[t]){ku("no original function "+String(t)+" to wrap");return}if(!n){ku("no wrapper function"),ku(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ku("original object and wrapper must be functions");return}let o=n(r,t);return cB(o,"__original",r),cB(o,"__unwrap",()=>{e[t]===o&&cB(e,t,r)}),cB(o,"__wrapped",!0),cB(e,t,o),o};Ts.wrap=xat;var Dat=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ts.wrap)(r,o,n)})})};Ts.massWrap=Dat;var Bat=(e,t)=>{if(!e||!e[t]){ku("no function to unwrap."),ku(new Error().stack);return}let n=e[t];if(!n.__unwrap)ku("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ts.unwrap=Bat;var Nat=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ts.unwrap)(n,r)})})};Ts.massUnwrap=Nat;function lB(e){e&&e.logger&&(typeof e.logger!="function"?ku("new logger isn't a function, not replacing"):ku=e.logger)}Ts.default=lB;lB.wrap=Ts.wrap;lB.massWrap=Ts.massWrap;lB.unwrap=Ts.unwrap;lB.massUnwrap=Ts.massUnwrap});var l0e=F(W2=>{"use strict";m();Object.defineProperty(W2,"__esModule",{value:!0});W2.InstrumentationAbstract=void 0;var W5=(je(),Me(We)),Oat=V5(),Z2=Z5(),X5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=W5.diag.createComponentLogger({namespace:t}),this._tracer=W5.trace.getTracer(t,n),this._meter=W5.metrics.getMeter(t,n),this._logger=Oat.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=Z2.wrap;_unwrap=Z2.unwrap;_massWrap=Z2.massWrap;_massUnwrap=Z2.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)}}};W2.InstrumentationAbstract=X5});var p0e=F((m7t,d0e)=>{m();var XC=1e3,eb=XC*60,tb=eb*60,kS=tb*24,wat=kS*7,kat=kS*365.25;d0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Mat(e);if(n==="number"&&isFinite(e))return t.long?Uat(e):Pat(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Mat(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*kat;case"weeks":case"week":case"w":return n*wat;case"days":case"day":case"d":return n*kS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*tb;case"minutes":case"minute":case"mins":case"min":case"m":return n*eb;case"seconds":case"second":case"secs":case"sec":case"s":return n*XC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Pat(e){var t=Math.abs(e);return t>=kS?Math.round(e/kS)+"d":t>=tb?Math.round(e/tb)+"h":t>=eb?Math.round(e/eb)+"m":t>=XC?Math.round(e/XC)+"s":e+"ms"}function Uat(e){var t=Math.abs(e);return t>=kS?X2(e,t,kS,"day"):t>=tb?X2(e,t,tb,"hour"):t>=eb?X2(e,t,eb,"minute"):t>=XC?X2(e,t,XC,"second"):e+" ms"}function X2(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var e9=F((h7t,f0e)=>{m();function Lat(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=p0e(),n.destroy=g,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,v;function x(...N){if(!x.enabled)return;let k=x,Q=Number(new Date),j=Q-(S||Q);k.diff=j,k.prev=S,k.curr=Q,S=Q,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let G=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(oe,ge)=>{if(oe==="%%")return"%";G++;let ye=n.formatters[ge];if(typeof ye=="function"){let be=N[G];oe=ye.call(k,be),N.splice(G,1),G--}return oe}),n.formatArgs.call(k,N),(k.log||n.log).apply(k,N)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(C!==n.namespaces&&(C=n.namespaces,v=n.enabled(h)),v),set:N=>{y=N}}),typeof n.init=="function"&&n.init(x),x}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,v=-1,x=0;for(;y<h.length;)if(C<S.length&&(S[C]===h[y]||S[C]==="*"))S[C]==="*"?(v=C,x=y,C++):(y++,C++);else if(v!==-1)C=v+1,x++,y=x;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 g(){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}f0e.exports=Lat});var A0e=F((xc,eU)=>{m();xc.formatArgs=Fat;xc.save=Gat;xc.load=jat;xc.useColors=Qat;xc.storage=Hat();xc.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`."))}})();xc.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 Qat(){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 Fat(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+eU.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)}xc.log=console.debug||console.log||(()=>{});function Gat(e){try{e?xc.storage.setItem("debug",e):xc.storage.removeItem("debug")}catch{}}function jat(){let e;try{e=xc.storage.getItem("debug")||xc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Hat(){try{return localStorage}catch{}}eU.exports=e9()(xc);var{formatters:zat}=eU.exports;zat.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var g0e=F((S7t,m0e)=>{"use strict";m();m0e.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 E0e=F((T7t,_0e)=>{"use strict";m();var $at=Ge("os"),h0e=Ge("tty"),Nd=g0e(),{env:Va}=process,n_;Nd("no-color")||Nd("no-colors")||Nd("color=false")||Nd("color=never")?n_=0:(Nd("color")||Nd("colors")||Nd("color=true")||Nd("color=always"))&&(n_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?n_=1:Va.FORCE_COLOR==="false"?n_=0:n_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function t9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function n9(e,t){if(n_===0)return 0;if(Nd("color=16m")||Nd("color=full")||Nd("color=truecolor"))return 3;if(Nd("color=256"))return 2;if(e&&!t&&n_===void 0)return 0;let n=n_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=$at.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Va)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Va)||Va.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Va)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Va.TEAMCITY_VERSION)?1:0;if(Va.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Va){let r=parseInt((Va.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Va.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Va.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Va.TERM)||"COLORTERM"in Va?1:n}function Vat(e){let t=n9(e,e&&e.isTTY);return t9(t)}_0e.exports={supportsColor:Vat,stdout:t9(n9(!0,h0e.isatty(1))),stderr:t9(n9(!0,h0e.isatty(2)))}});var y0e=F((qa,nU)=>{m();var qat=Ge("tty"),tU=Ge("util");qa.init=est;qa.log=Zat;qa.formatArgs=Kat;qa.save=Wat;qa.load=Xat;qa.useColors=Yat;qa.destroy=tU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");qa.colors=[6,2,3,4,5,1];try{let e=E0e();e&&(e.stderr||e).level>=2&&(qa.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{}qa.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 Yat(){return"colors"in qa.inspectOpts?!!qa.inspectOpts.colors:qat.isatty(process.stderr.fd)}function Kat(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+"+nU.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Jat()+t+" "+e[0]}function Jat(){return qa.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Zat(...e){return process.stderr.write(tU.formatWithOptions(qa.inspectOpts,...e)+`
6
6
  `)}function Wat(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Xat(){return process.env.DEBUG}function est(e){e.inspectOpts={};let t=Object.keys(qa.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=qa.inspectOpts[t[n]]}nU.exports=e9()(qa);var{formatters:S0e}=nU.exports;S0e.o=function(e){return this.inspectOpts.colors=this.useColors,tU.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${fL(e)}`),!0}return!1}function glt(e,t){return t?.length?uL(e).some(n=>p_(
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,vN.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),oe=>oe&&this._diag.error("caught ignoreRequestHook error: ",oe),!0))return;let i=(0,n4.hrTime)(),a;try{a=new Sht.URL(t.path,t.origin)}catch(oe){this._diag.warn("could not determine url.full:",oe);return}let c=a.protocol.replace(":",""),d=this.getRequestMethod(t.method),g={[Zi.ATTR_HTTP_REQUEST_METHOD]:d,[Zi.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[Zi.ATTR_URL_FULL]:a.toString(),[Zi.ATTR_URL_PATH]:a.pathname,[Zi.ATTR_URL_QUERY]:a.search,[Zi.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},S=a.hostname,y=a.port||h[c];g[Zi.ATTR_SERVER_ADDRESS]=S,y&&!isNaN(Number(y))&&(g[Zi.ATTR_SERVER_PORT]=Number(y));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let oe=Array.isArray(v)?v[v.length-1]:v;g[Zi.ATTR_USER_AGENT_ORIGINAL]=oe}let x=(0,vN.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),oe=>oe&&this._diag.error("caught startSpanHook error: ",oe),!0);x&&Object.entries(x).forEach(([oe,ge])=>{g[oe]=ge});let N=Pl.context.active(),k=Pl.trace.getSpan(N),Q;n.requireParentforSpans&&(!k||!Pl.trace.isSpanContextValid(k.spanContext()))?Q=Pl.trace.wrapSpanContext(Pl.INVALID_SPAN_CONTEXT):Q=this.tracer.startSpan(d==="_OTHER"?"HTTP":d,{kind:Pl.SpanKind.CLIENT,attributes:g},N),(0,vN.safeExecuteInTheMiddle)(()=>n.requestHook?.(Q,t),oe=>oe&&this._diag.error("caught requestHook error: ",oe),!0);let j=Pl.trace.setSpan(Pl.context.active(),Q),G={};Pl.propagation.inject(j,G);let q=Object.entries(G);for(let oe=0;oe<q.length;oe++){let[ge,ye]=q[oe];typeof t.addHeader=="function"?t.addHeader(ge,ye):typeof t.headers=="string"?t.headers+=`${ge}: ${ye}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ge,ye)}this._recordFromReq.set(t,{span:Q,attributes:g,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={[Zi.ATTR_NETWORK_PEER_ADDRESS]:a,[Zi.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let g=new Set(o.headersToSpanAttributes.requestHeaders.map(S=>S.toLowerCase())),h=this.parseRequestHeaders(t);for(let[S,y]of h.entries())if(g.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={[Zi.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,vN.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(g=>d.add(g.toLowerCase()));for(let g=0;g<n.headers.length;g=g+2){let h=n.headers[g].toString().toLowerCase(),S=n.headers[g+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?Pl.SpanStatusCode.ERROR:Pl.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:Pl.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[Zi.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[Zi.ATTR_HTTP_RESPONSE_STATUS_CODE,Zi.ATTR_HTTP_REQUEST_METHOD,Zi.ATTR_SERVER_ADDRESS,Zi.ATTR_SERVER_PORT,Zi.ATTR_URL_SCHEME,Zi.ATTR_ERROR_TYPE].forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,n4.hrTimeToMilliseconds)((0,n4.hrTimeDuration)(n,(0,n4.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"}};r4.UndiciInstrumentation=PY});var Ixe=F(o4=>{"use strict";m();Object.defineProperty(o4,"__esModule",{value:!0});o4.UndiciInstrumentation=void 0;var yht=Txe();Object.defineProperty(o4,"UndiciInstrumentation",{enumerable:!0,get:function(){return yht.UndiciInstrumentation}})});function Cxe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function bht(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&xi(t)}function vht(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=Cxe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=Cxe(n.origin,n.path);if(r.startsWith("data:")){let o=wb(r);return{[kt]:"auto.http.otel.node_fetch","http.url":o,[h_]:o,[Md]:`${n.method||"GET"} ${o}`}}return{[kt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var bxe,vxe,Tht,Iht,Cht,Rxe,xxe=O(()=>{m();bxe=ie(Ixe(),1);dt();mr();vxe="NodeFetch",Tht=st(vxe,bxe.UndiciInstrumentation,e=>vht(e)),Iht=st(`${vxe}.sentry`,ry,e=>e),Cht=(e={})=>({name:"NodeFetch",setupOnce(){bht(e,gt()?.getOptions())&&Tht(e),Iht(e)}}),Rxe=Cht});var i4=F(RN=>{"use strict";m();Object.defineProperty(RN,"__esModule",{value:!0});RN.ExpressLayerType=void 0;var Rht;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(Rht=RN.ExpressLayerType||(RN.ExpressLayerType={}))});var a4=F(xN=>{"use strict";m();Object.defineProperty(xN,"__esModule",{value:!0});xN.AttributeNames=void 0;var xht;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(xht=xN.AttributeNames||(xN.AttributeNames={}))});var UY=F(lv=>{"use strict";m();Object.defineProperty(lv,"__esModule",{value:!0});lv._LAYERS_STORE_PROPERTY=lv.kLayerPatched=void 0;lv.kLayerPatched=Symbol("express-layer-patched");lv._LAYERS_STORE_PROPERTY="__ot_middlewares"});var Nxe=F(Wi=>{"use strict";m();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.getActualMatchedRoute=Wi.getConstructedRoute=Wi.getLayerPath=Wi.asErrorAndMessage=Wi.isLayerIgnored=Wi.getLayerMetadata=Wi.getRouterPath=Wi.storeLayerPath=void 0;var LY=i4(),dv=a4(),cy=UY(),Dht=(e,t)=>(Array.isArray(e[cy._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,cy._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[cy._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));Wi.storeLayerPath=Dht;var Bht=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,Wi.getRouterPath)(e,n):e};Wi.getRouterPath=Bht;var Nht=(e,t,n)=>{if(t.name==="router"){let r=(0,Wi.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[dv.AttributeNames.EXPRESS_NAME]:o,[dv.AttributeNames.EXPRESS_TYPE]:LY.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[dv.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[dv.AttributeNames.EXPRESS_TYPE]:LY.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[dv.AttributeNames.EXPRESS_NAME]:t.name,[dv.AttributeNames.EXPRESS_TYPE]:LY.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};Wi.getLayerMetadata=Nht;var Oht=(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")},wht=(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(Oht(e,r))return!0}catch{}return!1};Wi.isLayerIgnored=wht;var kht=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];Wi.asErrorAndMessage=kht;var Mht=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>Dxe(n)||"").join(","):Dxe(t)};Wi.getLayerPath=Mht;var Dxe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function Bxe(e){let n=(Array.isArray(e[cy._LAYERS_STORE_PROPERTY])?e[cy._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}Wi.getConstructedRoute=Bxe;function Pht(e){let t=Array.isArray(e[cy._LAYERS_STORE_PROPERTY])?e[cy._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=Bxe(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)||Uht(r))?r:void 0}Wi.getActualMatchedRoute=Pht;function Uht(e){return e.includes(":")||e.includes("*")}});var Oxe=F(pv=>{"use strict";m();Object.defineProperty(pv,"__esModule",{value:!0});pv.PACKAGE_NAME=pv.PACKAGE_VERSION=void 0;pv.PACKAGE_VERSION="0.62.0";pv.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var Uxe=F(u4=>{"use strict";m();Object.defineProperty(u4,"__esModule",{value:!0});u4.ExpressInstrumentation=void 0;var wxe=Tr(),Mc=(je(),Me(We)),kxe=i4(),Mxe=a4(),NA=Nxe(),Pxe=Oxe(),fv=rn(),Lht=(Zn(),Me(Ur)),s4=UY(),QY=class extends fv.InstrumentationBase{constructor(t={}){super(Pxe.PACKAGE_NAME,Pxe.PACKAGE_VERSION,t)}init(){return[new fv.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,fv.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,fv.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,fv.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,NA.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,NA.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,NA.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[s4.kLayerPatched]!==!0&&(t[s4.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:d}=(0,NA.storeLayerPath)(a,n),g=(0,NA.getConstructedRoute)(a),h=(0,NA.getActualMatchedRoute)(a),S={[Lht.ATTR_HTTP_ROUTE]:h},y=(0,NA.getLayerMetadata)(g,t,n),C=y.attributes[Mxe.AttributeNames.EXPRESS_TYPE],v=(0,wxe.getRPCMetadata)(Mc.context.active());if(v?.type===wxe.RPCType.HTTP&&(v.route=h),(0,NA.isLayerIgnored)(y.name,C,r.getConfig()))return C===kxe.ExpressLayerType.MIDDLEWARE&&a[s4._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Mc.trace.getSpan(Mc.context.active())===void 0)return o.apply(this,arguments);let x=r._getSpanName({request:a,layerType:C,route:g},y.name),N=r.tracer.startSpan(x,{attributes:Object.assign(S,y.attributes)}),k=Mc.context.active(),Q=Mc.trace.setSpan(k,N),{requestHook:j}=r.getConfig();j&&(0,fv.safeExecuteInTheMiddle)(()=>j(N,{request:a,layerType:C,route:g}),ye=>{ye&&Mc.diag.error("express instrumentation: request hook failed",ye)},!0);let G=!1;y.attributes[Mxe.AttributeNames.EXPRESS_TYPE]===kxe.ExpressLayerType.ROUTER&&(N.end(),G=!0,Q=k);let q=()=>{G===!1&&(G=!0,N.end())},oe=Array.from(arguments),ge=oe.findIndex(ye=>typeof ye=="function");ge>=0&&(arguments[ge]=function(){let ye=arguments[0],be=![void 0,null,"route","router"].includes(ye);if(!G&&be){let[dn,xe]=(0,NA.asErrorAndMessage)(ye);N.recordException(dn),N.setStatus({code:Mc.SpanStatusCode.ERROR,message:xe})}G===!1&&(G=!0,a.res?.removeListener("finish",q),N.end()),!(a.route&&be)&&d&&a[s4._LAYERS_STORE_PROPERTY].pop();let Xe=oe[ge],wt=Mc.context.active(),nt=Mc.trace.getSpan(k),Vt=nt?Mc.trace.setSpan(wt,nt):wt;return Mc.context.bind(Vt,Xe).apply(this,arguments)});try{return Mc.context.bind(Q,o).apply(this,arguments)}catch(ye){let[be,Xe]=(0,NA.asErrorAndMessage)(ye);throw N.recordException(be),N.setStatus({code:Mc.SpanStatusCode.ERROR,message:Xe}),ye}finally{G||c.once("finish",q)}};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 Mc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};u4.ExpressInstrumentation=QY});var Lxe=F(Q_=>{"use strict";m();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.AttributeNames=Q_.ExpressLayerType=Q_.ExpressInstrumentation=void 0;var Qht=Uxe();Object.defineProperty(Q_,"ExpressInstrumentation",{enumerable:!0,get:function(){return Qht.ExpressInstrumentation}});var Fht=i4();Object.defineProperty(Q_,"ExpressLayerType",{enumerable:!0,get:function(){return Fht.ExpressLayerType}});var Ght=a4();Object.defineProperty(Q_,"AttributeNames",{enumerable:!0,get:function(){return Ght.AttributeNames}})});var Ta,ly=O(()=>{m();Ta=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function jht(e){Lr(e,"auto.http.otel.express");let t=Ot(e).data,n=t["express.type"];n&&e.setAttribute(Wt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function Hht(e,t){if(Cn()===kd())return Ta&&J.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";Cn().setTransactionName(`${r} ${e.route}`)}return t}var Qxe,Fxe,Gxe,zht,jxe,Hxe=O(()=>{m();Qxe=ie(Lxe(),1);dt();mr();ly();Fxe="Express";Gxe=st(Fxe,()=>new Qxe.ExpressInstrumentation({requestHook:e=>jht(e),spanNameHook:(e,t)=>Hht(e,t)})),zht=()=>({name:Fxe,setupOnce(){Gxe()}}),jxe=zht});var zxe=F(DN=>{"use strict";m();Object.defineProperty(DN,"__esModule",{value:!0});DN.SeverityNumber=void 0;var $ht;(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"})($ht=DN.SeverityNumber||(DN.SeverityNumber={}))});var d4=F(Av=>{"use strict";m();Object.defineProperty(Av,"__esModule",{value:!0});Av.NOOP_LOGGER=Av.NoopLogger=void 0;var l4=class{emit(t){}};Av.NoopLogger=l4;Av.NOOP_LOGGER=new l4});var $xe=F(OA=>{"use strict";m();Object.defineProperty(OA,"__esModule",{value:!0});OA.API_BACKWARDS_COMPATIBILITY_VERSION=OA.makeGetter=OA._global=OA.GLOBAL_LOGS_API_KEY=void 0;OA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");OA._global=globalThis;function Vht(e,t,n){return r=>r===e?t:n}OA.makeGetter=Vht;OA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var FY=F(mv=>{"use strict";m();Object.defineProperty(mv,"__esModule",{value:!0});mv.NOOP_LOGGER_PROVIDER=mv.NoopLoggerProvider=void 0;var qht=d4(),p4=class{getLogger(t,n,r){return new qht.NoopLogger}};mv.NoopLoggerProvider=p4;mv.NOOP_LOGGER_PROVIDER=new p4});var Vxe=F(f4=>{"use strict";m();Object.defineProperty(f4,"__esModule",{value:!0});f4.ProxyLogger=void 0;var Yht=d4(),GY=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):Yht.NOOP_LOGGER}};f4.ProxyLogger=GY});var qxe=F(A4=>{"use strict";m();Object.defineProperty(A4,"__esModule",{value:!0});A4.ProxyLoggerProvider=void 0;var Kht=FY(),Jht=Vxe(),jY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Jht.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Kht.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=jY});var Kxe=F(m4=>{"use strict";m();Object.defineProperty(m4,"__esModule",{value:!0});m4.LogsAPI=void 0;var Gd=$xe(),Zht=FY(),Yxe=qxe(),HY=class e{constructor(){this._proxyLoggerProvider=new Yxe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Gd._global[Gd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Gd._global[Gd.GLOBAL_LOGS_API_KEY]=(0,Gd.makeGetter)(Gd.API_BACKWARDS_COMPATIBILITY_VERSION,t,Zht.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Gd._global[Gd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Gd._global,Gd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Gd._global[Gd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Yxe.ProxyLoggerProvider}};m4.LogsAPI=HY});var zY=F(wA=>{"use strict";m();Object.defineProperty(wA,"__esModule",{value:!0});wA.logs=wA.NoopLogger=wA.NOOP_LOGGER=wA.SeverityNumber=void 0;var Wht=zxe();Object.defineProperty(wA,"SeverityNumber",{enumerable:!0,get:function(){return Wht.SeverityNumber}});var Jxe=d4();Object.defineProperty(wA,"NOOP_LOGGER",{enumerable:!0,get:function(){return Jxe.NOOP_LOGGER}});Object.defineProperty(wA,"NoopLogger",{enumerable:!0,get:function(){return Jxe.NoopLogger}});var Xht=Kxe();wA.logs=Xht.LogsAPI.getInstance()});var Zxe=F(gv=>{"use strict";m();Object.defineProperty(gv,"__esModule",{value:!0});gv.disableInstrumentations=gv.enableInstrumentations=void 0;function e_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()}}gv.enableInstrumentations=e_t;function t_t(e){e.forEach(t=>t.disable())}gv.disableInstrumentations=t_t});var eDe=F(g4=>{"use strict";m();Object.defineProperty(g4,"__esModule",{value:!0});g4.registerInstrumentations=void 0;var Wxe=(je(),Me(We)),n_t=zY(),Xxe=Zxe();function r_t(e){let t=e.tracerProvider||Wxe.trace.getTracerProvider(),n=e.meterProvider||Wxe.metrics.getMeterProvider(),r=e.loggerProvider||n_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Xxe.enableInstrumentations)(o,t,n,r),()=>{(0,Xxe.disableInstrumentations)(o)}}g4.registerInstrumentations=r_t});var cDe=F(h4=>{"use strict";m();Object.defineProperty(h4,"__esModule",{value:!0});h4.satisfies=void 0;var YY=(je(),Me(We)),iDe=/^(?: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-]+)*))?$/,o_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-]+)*))?$/,i_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function a_t(e,t,n){if(!s_t(e))return YY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=d_t(e);if(!r)return!1;let o=[],i=aDe(r,t,o,n);return i&&!n?.includePrerelease?c_t(r,o):i}h4.satisfies=a_t;function s_t(e){return typeof e=="string"&&iDe.test(e)}function aDe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if($Y(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=O_t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!$Y(e,i,n,r))return!1;return!0}return $Y(e,t,n,r)}function $Y(e,t,n,r){if(t=l_t(t,r),t.includes(" "))return aDe(e,t,n,r);{let o=p_t(t);return n.push(o),u_t(e,o)}}function u_t(e,t){if(t.invalid)return!1;if(!t.version||qY(t.version))return!0;let n=nDe(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=nDe(r,o)}return i_t[t.op]?.includes(n)}function c_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function l_t(e,t){return e=e.trim(),e=B_t(e,t),e=D_t(e),e=N_t(e,t),e=e.trim(),e}function Gu(e){return!e||e.toLowerCase()==="x"||e==="*"}function d_t(e){let t=e.match(iDe);if(!t){YY.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 p_t(e){if(!e)return{};let t=e.match(o_t);if(!t)return YY.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 qY(e){return e==="*"||e==="x"||e==="X"}function tDe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function f_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 A_t(e,t){if(qY(e)||qY(t))return 0;let[n,r]=f_t(tDe(e),tDe(t));return n>r?1:n<r?-1:0}function nDe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=A_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var sDe="[a-zA-Z0-9-]",uDe="0|[1-9]\\d*",m_t=`\\d*[a-zA-Z-]${sDe}*`,g_t="((?:<|>)?=?)",rDe=`(?:${uDe}|${m_t})`,h_t=`(?:-(${rDe}(?:\\.${rDe})*))`,oDe=`${sDe}+`,__t=`(?:\\+(${oDe}(?:\\.${oDe})*))`,VY=`${uDe}|x|X|\\*`,BN=`[v=\\s]*(${VY})(?:\\.(${VY})(?:\\.(${VY})(?:${h_t})?${__t}?)?)?`,E_t=`^${g_t}\\s*${BN}$`,S_t=new RegExp(E_t),y_t=`^\\s*(${BN})\\s+-\\s+(${BN})\\s*$`,T_t=new RegExp(y_t),I_t="(?:~>?)",C_t=`^${I_t}${BN}$`,b_t=new RegExp(C_t),v_t="(?:\\^)",R_t=`^${v_t}${BN}$`,x_t=new RegExp(R_t);function D_t(e){let t=b_t;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 B_t(e,t){let n=x_t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Gu(i)?g="":Gu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Gu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function N_t(e,t){let n=S_t;return e.replace(n,(r,o,i,a,c,d)=>{let g=Gu(i),h=g||Gu(a),S=h||Gu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?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 O_t(e,t){let n=T_t;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(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`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var KY=F(Bs=>{"use strict";m();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.massUnwrap=Bs.unwrap=Bs.massWrap=Bs.wrap=void 0;var ju=console.error.bind(console);function NN(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 w_t=(e,t,n)=>{if(!e||!e[t]){ju("no original function "+String(t)+" to wrap");return}if(!n){ju("no wrapper function"),ju(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ju("original object and wrapper must be functions");return}let o=n(r,t);return NN(o,"__original",r),NN(o,"__unwrap",()=>{e[t]===o&&NN(e,t,r)}),NN(o,"__wrapped",!0),NN(e,t,o),o};Bs.wrap=w_t;var k_t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ju("must provide one or more modules to patch"),ju(new Error().stack);return}if(!(t&&Array.isArray(t))){ju("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Bs.wrap)(r,o,n)})})};Bs.massWrap=k_t;var M_t=(e,t)=>{if(!e||!e[t]){ju("no function to unwrap."),ju(new Error().stack);return}let n=e[t];if(!n.__unwrap)ju("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Bs.unwrap=M_t;var P_t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ju("must provide one or more modules to patch"),ju(new Error().stack);return}if(!(t&&Array.isArray(t))){ju("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Bs.unwrap)(n,r)})})};Bs.massUnwrap=P_t;function ON(e){e&&e.logger&&(typeof e.logger!="function"?ju("new logger isn't a function, not replacing"):ju=e.logger)}Bs.default=ON;ON.wrap=Bs.wrap;ON.massWrap=Bs.massWrap;ON.unwrap=Bs.unwrap;ON.massUnwrap=Bs.massUnwrap});var lDe=F(E4=>{"use strict";m();Object.defineProperty(E4,"__esModule",{value:!0});E4.InstrumentationAbstract=void 0;var JY=(je(),Me(We)),U_t=zY(),_4=KY(),ZY=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=JY.diag.createComponentLogger({namespace:t}),this._tracer=JY.trace.getTracer(t,n),this._meter=JY.metrics.getMeter(t,n),this._logger=U_t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=_4.wrap;_unwrap=_4.unwrap;_massWrap=_4.massWrap;_massUnwrap=_4.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)}}};E4.InstrumentationAbstract=ZY});var dDe=F(F_=>{"use strict";m();Object.defineProperty(F_,"__esModule",{value:!0});F_.ModuleNameTrie=F_.ModuleNameSeparator=void 0;F_.ModuleNameSeparator="/";var S4=class{hooks=[];children=new Map},WY=class{_trie=new S4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(F_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new S4,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(F_.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))}};F_.ModuleNameTrie=WY});var fDe=F(y4=>{"use strict";m();Object.defineProperty(y4,"__esModule",{value:!0});y4.RequireInTheMiddleSingleton=void 0;var L_t=MS(),pDe=Ge("path"),XY=dDe(),Q_t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),eK=class e{_moduleNameTrie=new XY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new L_t.Hook(null,{internals:!0},(t,n,r)=>{let o=F_t(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 Q_t?new e:this._instance=this._instance??new e}};y4.RequireInTheMiddleSingleton=eK;function F_t(e){return pDe.sep!==XY.ModuleNameSeparator?e.split(pDe.sep).join(XY.ModuleNameSeparator):e}});var _De=F(wN=>{m();var ADe=[],tK=new WeakMap,mDe=new WeakMap,gDe=new Map,hDe=[],G_t={set(e,t,n){let r=tK.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=mDe.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=tK.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function j_t(e,t,n,r,o){gDe.set(e,o),tK.set(t,n),mDe.set(t,r);let i=new Proxy(t,G_t);ADe.forEach(a=>a(e,i,o)),hDe.push([e,i,o])}wN.register=j_t;wN.importHooks=ADe;wN.specifiers=gDe;wN.toHook=hDe});var iK=F((Omn,_v)=>{m();var EDe=Ge("path"),H_t=rU(),{fileURLToPath:z_t}=Ge("url"),{MessageChannel:$_t}=Ge("worker_threads"),{isBuiltin:nK}=Ge("module");nK||(nK=()=>!0);var{importHooks:rK,specifiers:V_t,toHook:q_t}=_De();function SDe(e){rK.push(e),q_t.forEach(([t,n,r])=>e(t,n,r))}function yDe(e){let t=rK.indexOf(e);t>-1&&rK.splice(t,1)}function hv(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var oK;function Y_t(){let{port1:e,port2:t}=new $_t,n=0,r;oK=c=>{n++,e.postMessage(c)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let c=setInterval(()=>{},1e3),d=new Promise(g=>{r=g}).then(()=>{clearInterval(c)});return n===0&&r(),d}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function kN(e,t,n){if(!(this instanceof kN))return new kN(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;oK&&Array.isArray(e)&&oK(e),this._iitmHook=(o,i,a)=>{let c=o,d=c.startsWith("node:"),g,h;if(d){let S=o.slice(5);nK(S)&&(o=S)}else if(c.startsWith("file://")){let S=Error.stackTraceLimit;Error.stackTraceLimit=0;try{g=z_t(o),o=g}catch{}if(Error.stackTraceLimit=S,g){let y=H_t(g);y&&(o=y.name,h=y.basedir)}}if(e)for(let S of e)if(g&&S===g)hv(n,i,g,void 0);else if(S===o){if(!h)hv(n,i,o,h);else if(h.endsWith(V_t.get(c)))hv(n,i,o,h);else if(r){let y=o+EDe.sep+EDe.relative(h,g);hv(n,i,y,h)}}else S===a&&hv(n,i,a,h);else hv(n,i,o,h)},SDe(this._iitmHook)}kN.prototype.unhook=function(){yDe(this._iitmHook)};_v.exports=kN;_v.exports.Hook=kN;_v.exports.addHook=SDe;_v.exports.removeHook=yDe;_v.exports.createAddHookMessageChannel=Y_t});var aK=F(G_=>{"use strict";m();Object.defineProperty(G_,"__esModule",{value:!0});G_.isWrapped=G_.safeExecuteInTheMiddleAsync=G_.safeExecuteInTheMiddle=void 0;function K_t(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}G_.safeExecuteInTheMiddle=K_t;async function J_t(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}}G_.safeExecuteInTheMiddleAsync=J_t;function Z_t(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}G_.isWrapped=Z_t});var CDe=F(T4=>{"use strict";m();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationBase=void 0;var MN=Ge("path"),TDe=Ge("util"),W_t=cDe(),sK=KY(),X_t=lDe(),eEt=fDe(),tEt=iK(),PN=(je(),Me(We)),nEt=MS(),rEt=Ge("fs"),oEt=aK(),uK=class extends X_t.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=eEt.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,oEt.isWrapped)(t[n])&&this._unwrap(t,n),TDe.types.isProxy(t)){let o=(0,sK.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,sK.wrap)(t,n,r)};_unwrap=(t,n)=>TDe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,sK.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{PN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){PN.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{PN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){PN.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=Ge.resolve(n);Ge.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,rEt.readFileSync)(MN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{PN.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 IDe(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=MN.normalize(r);return a.filter(g=>g.name===c&&IDe(g.supportedVersions,i,t.includePrerelease)).reduce((g,h)=>(h.moduleExports=g,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(g,t.moduleVersion)):g),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&&MN.isAbsolute(c)){let g=MN.parse(c);c=g.name,d=g.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=MN.isAbsolute(t.name)?new nEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new tEt.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}};T4.InstrumentationBase=uK;function IDe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,W_t.satisfies)(t,r,{includePrerelease:n}))}});var bDe=F(I4=>{"use strict";m();Object.defineProperty(I4,"__esModule",{value:!0});I4.normalize=void 0;var iEt=Ge("path");Object.defineProperty(I4,"normalize",{enumerable:!0,get:function(){return iEt.normalize}})});var vDe=F(Ev=>{"use strict";m();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.normalize=Ev.InstrumentationBase=void 0;var aEt=CDe();Object.defineProperty(Ev,"InstrumentationBase",{enumerable:!0,get:function(){return aEt.InstrumentationBase}});var sEt=bDe();Object.defineProperty(Ev,"normalize",{enumerable:!0,get:function(){return sEt.normalize}})});var cK=F(Sv=>{"use strict";m();Object.defineProperty(Sv,"__esModule",{value:!0});Sv.normalize=Sv.InstrumentationBase=void 0;var RDe=vDe();Object.defineProperty(Sv,"InstrumentationBase",{enumerable:!0,get:function(){return RDe.InstrumentationBase}});Object.defineProperty(Sv,"normalize",{enumerable:!0,get:function(){return RDe.normalize}})});var xDe=F(C4=>{"use strict";m();Object.defineProperty(C4,"__esModule",{value:!0});C4.InstrumentationNodeModuleDefinition=void 0;var lK=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}};C4.InstrumentationNodeModuleDefinition=lK});var DDe=F(b4=>{"use strict";m();Object.defineProperty(b4,"__esModule",{value:!0});b4.InstrumentationNodeModuleFile=void 0;var uEt=cK(),dK=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,uEt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};b4.InstrumentationNodeModuleFile=dK});var BDe=F(dy=>{"use strict";m();Object.defineProperty(dy,"__esModule",{value:!0});dy.semconvStabilityFromStr=dy.SemconvStability=void 0;var v4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(v4=dy.SemconvStability||(dy.SemconvStability={}));function cEt(e,t){let n=v4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=v4.DUPLICATE;break}else o.toLowerCase()===e&&(n=v4.STABLE);return n}dy.semconvStabilityFromStr=cEt});var ODe=F(Xi=>{"use strict";m();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.semconvStabilityFromStr=Xi.SemconvStability=Xi.safeExecuteInTheMiddleAsync=Xi.safeExecuteInTheMiddle=Xi.isWrapped=Xi.InstrumentationNodeModuleFile=Xi.InstrumentationNodeModuleDefinition=Xi.InstrumentationBase=Xi.registerInstrumentations=void 0;var lEt=eDe();Object.defineProperty(Xi,"registerInstrumentations",{enumerable:!0,get:function(){return lEt.registerInstrumentations}});var dEt=cK();Object.defineProperty(Xi,"InstrumentationBase",{enumerable:!0,get:function(){return dEt.InstrumentationBase}});var pEt=xDe();Object.defineProperty(Xi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return pEt.InstrumentationNodeModuleDefinition}});var fEt=DDe();Object.defineProperty(Xi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return fEt.InstrumentationNodeModuleFile}});var pK=aK();Object.defineProperty(Xi,"isWrapped",{enumerable:!0,get:function(){return pK.isWrapped}});Object.defineProperty(Xi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return pK.safeExecuteInTheMiddle}});Object.defineProperty(Xi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return pK.safeExecuteInTheMiddleAsync}});var NDe=BDe();Object.defineProperty(Xi,"SemconvStability",{enumerable:!0,get:function(){return NDe.SemconvStability}});Object.defineProperty(Xi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return NDe.semconvStabilityFromStr}})});var wDe=F((Xmn,AEt)=>{AEt.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 MDe=F(py=>{"use strict";m();Object.defineProperty(py,"__esModule",{value:!0});py.range=py.balanced=void 0;var mEt=(e,t,n)=>{let r=e instanceof RegExp?kDe(e,n):e,o=t instanceof RegExp?kDe(t,n):t,i=r!==null&&o!=null&&(0,py.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)}};py.balanced=mEt;var kDe=(e,t)=>{let n=t.match(e);return n?n[0]:null},gEt=(e,t,n)=>{let r,o,i,a,c,d=n.indexOf(e),g=n.indexOf(t,d+1),h=d;if(d>=0&&g>0){if(e===t)return[d,g];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,g])}else o=r.pop(),o!==void 0&&o<i&&(i=o,a=g),g=n.indexOf(t,h+1);h=d<g&&d>=0?d:g}r.length&&a!==void 0&&(c=[i,a])}return c};py.range=gEt});var jDe=F(yv=>{"use strict";m();Object.defineProperty(yv,"__esModule",{value:!0});yv.EXPANSION_MAX=void 0;yv.expand=DEt;var PDe=MDe(),UDe="\0SLASH"+Math.random()+"\0",LDe="\0OPEN"+Math.random()+"\0",AK="\0CLOSE"+Math.random()+"\0",QDe="\0COMMA"+Math.random()+"\0",FDe="\0PERIOD"+Math.random()+"\0",hEt=new RegExp(UDe,"g"),_Et=new RegExp(LDe,"g"),EEt=new RegExp(AK,"g"),SEt=new RegExp(QDe,"g"),yEt=new RegExp(FDe,"g"),TEt=/\\\\/g,IEt=/\\{/g,CEt=/\\}/g,bEt=/\\,/g,vEt=/\\\./g;yv.EXPANSION_MAX=1e5;function fK(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function REt(e){return e.replace(TEt,UDe).replace(IEt,LDe).replace(CEt,AK).replace(bEt,QDe).replace(vEt,FDe)}function xEt(e){return e.replace(hEt,"\\").replace(_Et,"{").replace(EEt,"}").replace(SEt,",").replace(yEt,".")}function GDe(e){if(!e)return[""];let t=[],n=(0,PDe.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=GDe(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function DEt(e,t={}){if(!e)return[];let{max:n=yv.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),UN(REt(e),n,!0).map(xEt)}function BEt(e){return"{"+e+"}"}function NEt(e){return/^-?0\d/.test(e)}function OEt(e,t){return e<=t}function wEt(e,t){return e>=t}function UN(e,t,n){let r=[],o=(0,PDe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?UN(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),g=c||d,h=o.body.indexOf(",")>=0;if(!g&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+AK+o.post,UN(e,t,!0)):[e];let S;if(g)S=o.body.split(/\.\./);else if(S=GDe(o.body),S.length===1&&S[0]!==void 0&&(S=UN(S[0],t,!1).map(BEt),S.length===1))return a.map(C=>o.pre+S[0]+C);let y;if(g&&S[0]!==void 0&&S[1]!==void 0){let C=fK(S[0]),v=fK(S[1]),x=Math.max(S[0].length,S[1].length),N=S.length===3&&S[2]!==void 0?Math.abs(fK(S[2])):1,k=OEt;v<C&&(N*=-1,k=wEt);let j=S.some(NEt);y=[];for(let G=C;k(G,v);G+=N){let q;if(d)q=String.fromCharCode(G),q==="\\"&&(q="");else if(q=String(G),j){let oe=x-q.length;if(oe>0){let ge=new Array(oe+1).join("0");G<0?q="-"+ge+q.slice(1):q=ge+q}}y.push(q)}}else{y=[];for(let C=0;C<S.length;C++)y.push.apply(y,UN(S[C],t,!1))}for(let C=0;C<y.length;C++)for(let v=0;v<a.length&&r.length<t;v++){let x=i+y[C]+a[v];(!n||g||x)&&r.push(x)}}return r}});var HDe=F(R4=>{"use strict";m();Object.defineProperty(R4,"__esModule",{value:!0});R4.assertValidPattern=void 0;var kEt=1024*64,MEt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>kEt)throw new TypeError("pattern is too long")};R4.assertValidPattern=MEt});var $De=F(x4=>{"use strict";m();Object.defineProperty(x4,"__esModule",{value:!0});x4.parseClass=void 0;var PEt={"[: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]},LN=e=>e.replace(/[[\]\\-]/g,"\\$&"),UEt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),zDe=e=>e.join(""),LEt=(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,g=!1,h=n,S="";e:for(;i<e.length;){let x=e.charAt(i);if((x==="!"||x==="^")&&i===n+1){g=!0,i++;continue}if(x==="]"&&a&&!d){h=i+1;break}if(a=!0,x==="\\"&&!d){d=!0,i++;continue}if(x==="["&&!d){for(let[N,[k,Q,j]]of Object.entries(PEt))if(e.startsWith(N,i)){if(S)return["$.",!1,e.length-n,!0];i+=N.length,j?o.push(k):r.push(k),c=c||Q;continue e}}if(d=!1,S){x>S?r.push(LN(S)+"-"+LN(x)):x===S&&r.push(LN(x)),S="",i++;continue}if(e.startsWith("-]",i+1)){r.push(LN(x+"-")),i+=2;continue}if(e.startsWith("-",i+1)){S=x,i+=2;continue}r.push(LN(x)),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])&&!g){let x=r[0].length===2?r[0].slice(-1):r[0];return[UEt(x),!1,h-n,!1]}let y="["+(g?"^":"")+zDe(r)+"]",C="["+(g?"":"^")+zDe(o)+"]";return[r.length&&o.length?"("+y+"|"+C+")":r.length?y:C,c,h-n,!0]};x4.parseClass=LEt});var B4=F(D4=>{"use strict";m();Object.defineProperty(D4,"__esModule",{value:!0});D4.unescape=void 0;var QEt=(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");D4.unescape=QEt});var hK=F(k4=>{"use strict";m();var Pc;Object.defineProperty(k4,"__esModule",{value:!0});k4.AST=void 0;var FEt=$De(),N4=B4(),GEt=new Set(["!","?","+","*","@"]),mK=e=>GEt.has(e),VDe=e=>mK(e.type),jEt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),HEt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),zEt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),qDe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),$Et="(?!(?:^|/)\\.\\.?(?:$|/))",O4="(?!\\.)",VEt=new Set(["[","."]),qEt=new Set(["..","."]),YEt=new Set("().*{}+?[]^$\\!"),KEt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gK="[^/]",YDe=gK+"*?",KDe=gK+"+?",JEt=0,w4=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++JEt;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 Pc&&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 Pc&&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 Pc(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,g=-1,h=!1;if(n.type===null){let x=r,N="";for(;x<t.length;){let k=t.charAt(x++);if(c||k==="\\"){c=!c,N+=k;continue}if(d){x===g+1?(k==="^"||k==="!")&&(h=!0):k==="]"&&!(x===g+2&&h)&&(d=!1),N+=k;continue}else if(k==="["){d=!0,g=x,h=!1,N+=k;continue}if(!o.noext&&mK(k)&&t.charAt(x)==="("&&i<=a){n.push(N),N="";let j=new Pc(k,n);x=Pc.#d(t,j,x,o,i+1),n.push(j);continue}N+=k}return n.push(N),x}let S=r+1,y=new Pc(null,n),C=[],v="";for(;S<t.length;){let x=t.charAt(S++);if(c||x==="\\"){c=!c,v+=x;continue}if(d){S===g+1?(x==="^"||x==="!")&&(h=!0):x==="]"&&!(S===g+2&&h)&&(d=!1),v+=x;continue}else if(x==="["){d=!0,g=S,h=!1,v+=x;continue}if(!o.noext&&mK(x)&&t.charAt(S)==="("&&(i<=a||n&&n.#p(x))){let k=n&&n.#p(x)?0:1;y.push(v),v="";let Q=new Pc(x,y);y.push(Q),S=Pc.#d(t,Q,S,o,i+k);continue}if(x==="|"){y.push(v),v="",C.push(y),y=new Pc(null,n);continue}if(x===")")return v===""&&n.#e.length===0&&(n.#l=!0),y.push(v),v="",n.push(...C,y),S;v+=x}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],S}#_(t){return this.#A(t,HEt)}#A(t,n=jEt){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=zEt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Pc(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!!qDe.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=qDe.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 Pc(null,void 0,n);return Pc.#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()),!VDe(this)){let d=this.isStart()&&this.isEnd()&&!this.#e.some(C=>typeof C!="string"),g=this.#e.map(C=>{let[v,x,N,k]=typeof C=="string"?Pc.#I(C,this.#r,d):C.toRegExpSource(t);return this.#r=this.#r||N,this.#o=this.#o||k,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&qEt.has(this.#e[0]))){let v=VEt,x=n&&v.has(g.charAt(0))||g.startsWith("\\.")&&v.has(g.charAt(2))||g.startsWith("\\.\\.")&&v.has(g.charAt(4)),N=!n&&!t&&v.has(g.charAt(0));h=x?$Et:N?O4:""}let S="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(S="(?:$|\\/)"),[h+g+S,(0,N4.unescape)(g),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(),g=this;return g.#e=[d],g.type=null,g.#r=void 0,[d,(0,N4.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!O4?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?O4:"")+KDe;else{let d=this.type==="!"?"))"+(this.isStart()&&!n&&!t?O4:"")+YDe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+d}return[c,(0,N4.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(VDe(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 g=t.charAt(d);if(o){o=!1,i+=(YEt.has(g)?"\\":"")+g;continue}if(g==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?KDe:YDe,n=!0;continue}else c=!1;if(g==="\\"){d===t.length-1?i+="\\\\":o=!0;continue}if(g==="["){let[h,S,y,C]=(0,FEt.parseClass)(t,d);if(y){i+=h,a=a||S,d+=y-1,n=n||C;continue}}if(g==="?"){i+=gK,n=!0;continue}i+=KEt(g)}return[i,(0,N4.unescape)(t),!!n,a]}};k4.AST=w4;Pc=w4});var _K=F(M4=>{"use strict";m();Object.defineProperty(M4,"__esModule",{value:!0});M4.escape=void 0;var ZEt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");M4.escape=ZEt});var n1e=F(ft=>{"use strict";m();Object.defineProperty(ft,"__esModule",{value:!0});ft.unescape=ft.escape=ft.AST=ft.Minimatch=ft.match=ft.makeRe=ft.braceExpand=ft.defaults=ft.filter=ft.GLOBSTAR=ft.sep=ft.minimatch=void 0;var WEt=jDe(),P4=HDe(),WDe=hK(),XEt=_K(),e0t=B4(),t0t=(e,t,n={})=>((0,P4.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new fy(t,n).match(e));ft.minimatch=t0t;var n0t=/^\*+([^+@!?\*\[\(]*)$/,r0t=e=>t=>!t.startsWith(".")&&t.endsWith(e),o0t=e=>t=>t.endsWith(e),i0t=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),a0t=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),s0t=/^\*+\.\*+$/,u0t=e=>!e.startsWith(".")&&e.includes("."),c0t=e=>e!=="."&&e!==".."&&e.includes("."),l0t=/^\.\*+$/,d0t=e=>e!=="."&&e!==".."&&e.startsWith("."),p0t=/^\*+$/,f0t=e=>e.length!==0&&!e.startsWith("."),A0t=e=>e.length!==0&&e!=="."&&e!=="..",m0t=/^\?+([^+@!?\*\[\(]*)?$/,g0t=([e,t=""])=>{let n=XDe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},h0t=([e,t=""])=>{let n=e1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},_0t=([e,t=""])=>{let n=e1e([e]);return t?r=>n(r)&&r.endsWith(t):n},E0t=([e,t=""])=>{let n=XDe([e]);return t?r=>n(r)&&r.endsWith(t):n},XDe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},e1e=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},t1e=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",JDe={win32:{sep:"\\"},posix:{sep:"/"}};ft.sep=t1e==="win32"?JDe.win32.sep:JDe.posix.sep;ft.minimatch.sep=ft.sep;ft.GLOBSTAR=Symbol("globstar **");ft.minimatch.GLOBSTAR=ft.GLOBSTAR;var S0t="[^/]",y0t=S0t+"*?",T0t="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",I0t="(?:(?!(?:\\/|^)\\.).)*?",C0t=(e,t={})=>n=>(0,ft.minimatch)(n,e,t);ft.filter=C0t;ft.minimatch.filter=ft.filter;var jd=(e,t={})=>Object.assign({},e,t),b0t=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ft.minimatch;let t=ft.minimatch;return Object.assign((r,o,i={})=>t(r,o,jd(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,jd(e,i))}static defaults(o){return t.defaults(jd(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,jd(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,jd(e,i))}},unescape:(r,o={})=>t.unescape(r,jd(e,o)),escape:(r,o={})=>t.escape(r,jd(e,o)),filter:(r,o={})=>t.filter(r,jd(e,o)),defaults:r=>t.defaults(jd(e,r)),makeRe:(r,o={})=>t.makeRe(r,jd(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,jd(e,o)),match:(r,o,i={})=>t.match(r,o,jd(e,i)),sep:t.sep,GLOBSTAR:ft.GLOBSTAR})};ft.defaults=b0t;ft.minimatch.defaults=ft.defaults;var v0t=(e,t={})=>((0,P4.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,WEt.expand)(e,{max:t.braceExpandMax}));ft.braceExpand=v0t;ft.minimatch.braceExpand=ft.braceExpand;var R0t=(e,t={})=>new fy(e,t).makeRe();ft.makeRe=R0t;ft.minimatch.makeRe=ft.makeRe;var x0t=(e,t,n={})=>{let r=new fy(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};ft.match=x0t;ft.minimatch.match=ft.match;var ZDe=/[?*]|[+@!]\(.*?\)|\[|\]/,D0t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fy=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,P4.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||t1e,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]==="?"||!ZDe.test(i[2]))&&!ZDe.test(i[3]),g=/^[a-z]:/i.test(i[0]);if(d)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(g)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],g=r[o+3];if(c!==".."||!d||d==="."||d===".."||!g||g==="."||g==="..")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]),g=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!g&&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:g?0:void 0;if(typeof S=="number"&&typeof y=="number"){let[C,v]=[t[S],n[y]];C.toLowerCase()===v.toLowerCase()&&(n[y]=C,i=y,o=S)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(ft.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(ft.GLOBSTAR,i),c=n.lastIndexOf(ft.GLOBSTAR),[d,g,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 Q=t.slice(o,o+d.length);if(!this.#o(Q,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 Q=t.length-h.length;if(this.#o(t,h,r,Q,0))S=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(Q--,!this.#o(t,h,r,Q,0)))return!1;S=h.length+1}}if(!g.length){let Q=!!S;for(let j=o;j<t.length-S;j++){let G=String(t[j]);if(Q=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||Q}let y=[[[],0]],C=y[0],v=0,x=[0];for(let Q of g)Q===ft.GLOBSTAR?(x.push(v),C=[[],0],y.push(C)):(C[0].push(Q),v++);let N=y.length-1,k=t.length-S;for(let Q of y)Q[1]=k-(x[N--]+Q[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[g,h]=d;for(;r<=h;){if(this.#o(t.slice(0,r+g.length),g,i,r,0)&&a<this.maxGlobstarRecursion){let C=this.#r(t,n,r+g.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,g;for(a=o,c=i,g=t.length,d=n.length;a<g&&c<d;a++,c++){this.debug("matchOne loop");let h=n[c],S=t[a];if(this.debug(n,h,S),h===!1||h===ft.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===g&&c===d)return!0;if(a===g)return r;if(c===d)return a===g-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,ft.braceExpand)(this.pattern,this.options)}parse(t){(0,P4.assertValidPattern)(t);let n=this.options;if(t==="**")return ft.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(p0t))?o=n.dot?A0t:f0t:(r=t.match(n0t))?o=(n.nocase?n.dot?a0t:i0t:n.dot?o0t:r0t)(r[1]):(r=t.match(m0t))?o=(n.nocase?n.dot?h0t:g0t:n.dot?_0t:E0t)(r):(r=t.match(s0t))?o=n.dot?c0t:u0t:(r=t.match(l0t))&&(o=d0t);let i=WDe.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?y0t:n.dot?T0t:I0t,o=new Set(n.nocase?["i"]:[]),i=t.map(d=>{let g=d.map(S=>{if(S instanceof RegExp)for(let y of S.flags.split(""))o.add(y);return typeof S=="string"?D0t(S):S===ft.GLOBSTAR?ft.GLOBSTAR:S._src});g.forEach((S,y)=>{let C=g[y+1],v=g[y-1];S!==ft.GLOBSTAR||v===ft.GLOBSTAR||(v===void 0?C!==void 0&&C!==ft.GLOBSTAR?g[y+1]="(?:\\/|"+r+"\\/)?"+C:g[y]=r:C===void 0?g[y-1]=v+"(?:\\/|\\/"+r+")?":C!==ft.GLOBSTAR&&(g[y-1]=v+"(?:\\/|\\/"+r+"\\/)"+C,g[y+1]=ft.GLOBSTAR))});let h=g.filter(S=>S!==ft.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],g=o;if(r.matchBase&&d.length===1&&(g=[a]),this.matchOne(g,d,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ft.minimatch.defaults(t).Minimatch}};ft.Minimatch=fy;var B0t=hK();Object.defineProperty(ft,"AST",{enumerable:!0,get:function(){return B0t.AST}});var N0t=_K();Object.defineProperty(ft,"escape",{enumerable:!0,get:function(){return N0t.escape}});var O0t=B4();Object.defineProperty(ft,"unescape",{enumerable:!0,get:function(){return O0t.unescape}});ft.minimatch.AST=WDe.AST;ft.minimatch.Minimatch=fy;ft.minimatch.escape=XEt.escape;ft.minimatch.unescape=e0t.unescape});var c1e=F((_gn,yK)=>{"use strict";m();var r1e=Ge("node:diagnostics_channel"),{context:U4,trace:EK,SpanStatusCode:L4,propagation:SK,diag:w0t}=(je(),Me(We)),{getRPCMetadata:k0t,RPCType:M0t}=Tr(),{ATTR_HTTP_ROUTE:Q4,ATTR_HTTP_RESPONSE_STATUS_CODE:o1e,ATTR_HTTP_REQUEST_METHOD:P0t,ATTR_URL_PATH:U0t}=(Zn(),Me(Ur)),{InstrumentationBase:L0t}=ODe(),{version:Q0t,name:i1e}=wDe(),F0t=">=4.0.0 <6",a1e=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],Eo={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},j_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Ig="anonymous",H_=Symbol("fastify otel instance"),z_=Symbol("fastify otel request spans"),QN=Symbol("fastify otel request context"),s1e=Symbol("fastify otel addhook original"),u1e=Symbol("fastify otel setnotfound original"),FN=Symbol("fastify otel ignore path"),GN=Symbol("fastify otel record exceptions"),F4=class extends L0t{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(i1e,Q0t,t),this.logger=w0t.createComponentLogger({namespace:i1e}),this[FN]=null,this[GN]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[GN]=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[FN]=o=>typeof n=="function"?n(o):(r==null&&(r=n1e().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)},r1e.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(r1e.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:F0t,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(H_,t),r.decorate(s1e,r.addHook),r.decorate(u1e,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let C=this[QN],v=this[z_];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:C,inject:(x,N)=>SK.inject(C,x,N),extract:(x,N)=>SK.extract(C,x,N)}}),r.decorateRequest(z_,null),r.decorateRequest(QN,null),r.addHook("onRoute",function(C){if(t[FN]?.(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 v of a1e)if(C[v]!=null){let x=C[v];if(typeof x=="function")C[v]=S(x,v,{[Eo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Eo.FASTIFY_TYPE]:j_.ROUTE,[Q4]:C.url,[Eo.HOOK_CALLBACK_NAME]:x.name?.length>0?x.name:Ig});else if(Array.isArray(x)){let N=[];for(let k of x)N.push(S(k,v,{[Eo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Eo.FASTIFY_TYPE]:j_.ROUTE,[Q4]:C.url,[Eo.HOOK_CALLBACK_NAME]:k.name?.length>0?k.name:Ig}));C[v]=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",{[Eo.HOOK_NAME]:`${this.pluginName} - route-handler`,[Eo.FASTIFY_TYPE]:j_.HANDLER,[Q4]:C.url,[Eo.HOOK_CALLBACK_NAME]:C.handler.name.length>0?C.handler.name:Ig})}),r.addHook("onRequest",function(C,v,x){if(this[H_].isEnabled()===!1||C.routeOptions.config?.otel===!1)return x();if(this[H_][FN]?.({url:C.url,method:C.method})===!0)return this[H_].logger.debug(`Ignoring request ${C.method} ${C.url} because it matches the ignore path`),x();let N=U4.active();EK.getSpan(N)==null&&(N=SK.extract(N,C.headers));let k=k0t(N);C.routeOptions.url!=null&&k?.type===M0t.HTTP&&(k.route=C.routeOptions.url);let Q={[Eo.ROOT]:"@fastify/otel",[P0t]:C.method,[U0t]:C.url};C.routeOptions.url!=null&&(Q[Q4]=C.routeOptions.url);let j=this[H_].tracer.startSpan("request",{attributes:Q},N);try{this[H_]._requestHook?.(j,C)}catch(G){this[H_].logger.error({err:G},"requestHook threw")}C[QN]=EK.setSpan(N,j),C[z_]=j,U4.with(C[QN],()=>{x()})}),r.addHook("onResponse",function(C,v,x){let N=C[z_];N!=null&&(N.setAttributes({[o1e]:v.statusCode}),N.end()),C[z_]=null,x()}),r.addHook=d,r.setNotFoundHandler=g,i();function a(y,C,v,x){let N=y[z_];N!=null&&(C.statusCode>=500&&N.setStatus({code:L4.ERROR}),N.setAttributes({[o1e]:C.statusCode}),N.end()),y[z_]=null,x(null,v)}function c(y,C,v,x){let N=y[z_];N!=null&&(N.setStatus({code:L4.ERROR,message:v.message}),t[GN]!==!1&&N.recordException(v)),x()}function d(y,C){let v=this[s1e];return a1e.includes(y)?v.call(this,y,S(C,y,{[Eo.HOOK_NAME]:`${this.pluginName} - ${y}`,[Eo.FASTIFY_TYPE]:j_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Ig})):v.call(this,y,C)}function g(y,C){let v=this[u1e];typeof y=="function"?(C=S(y,"notFoundHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Eo.FASTIFY_TYPE]:j_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.name?.length>0?y.name:Ig}),v.call(this,C)):(y.preValidation!=null&&(y.preValidation=S(y.preValidation,"notFoundHandler - preValidation",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[Eo.FASTIFY_TYPE]:j_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.preValidation.name?.length>0?y.preValidation.name:Ig})),y.preHandler!=null&&(y.preHandler=S(y.preHandler,"notFoundHandler - preHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[Eo.FASTIFY_TYPE]:j_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.preHandler.name?.length>0?y.preHandler.name:Ig})),C=S(C,"notFoundHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Eo.FASTIFY_TYPE]:j_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Ig}),v.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,v={}){return function(...N){let k=this[H_],Q=h(N);if(Q===null)return k.logger.debug(`Ignoring route instrumentation because ${C} was called without a Fastify request argument`),y.call(this,...N);if(k.isEnabled()===!1||Q.routeOptions.config?.otel===!1)return k.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it is disabled`),y.call(this,...N);if(k[FN]?.({url:Q.url,method:Q.method})===!0)return k.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it matches the ignore path`),y.call(this,...N);let j=Q[QN]??U4.active(),G=y.name?.length>0?y.name:this.pluginName??Ig,q=k.tracer.startSpan(`${C} - ${G}`,{attributes:v},j);if(k._lifecycleHook!=null)try{k._lifecycleHook(q,{hookName:C,request:Q,handler:G})}catch(oe){k.logger.error({err:oe},"Execution of lifecycleHook failed")}return U4.with(EK.setSpan(j,q),function(){try{let oe=y.call(this,...N);return typeof oe?.then=="function"?oe.then(ge=>(q.end(),ge),ge=>(q.setStatus({code:L4.ERROR,message:ge.message}),k[GN]!==!1&&q.recordException(ge),q.end(),Promise.reject(ge))):(q.end(),oe)}catch(oe){throw q.setStatus({code:L4.ERROR,message:oe.message}),k[GN]!==!1&&q.recordException(oe),q.end(),oe}},this)}}}}};yK.exports=F4;yK.exports.FastifyOtelInstrumentation=F4});var Cg,jN,HN,l1e=O(()=>{m();(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})(Cg||(Cg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(jN||(jN={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(HN||(HN={}))});var zN,d1e=O(()=>{m();zN=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function TK(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[zN]||[];return i.push(o),Object.defineProperty(e,zN,{enumerable:!1,configurable:!0,value:i}),o}function G4(e,t){let n=e[zN]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:ui.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[zN])}function f1e(e,t,n){let r,o;try{o=e(),p1e(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!p1e(o)&&(t(r,o),r))throw r;return o}}function p1e(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var A1e=O(()=>{m();je();d1e()});function z0t(){let e=gt();e&&e.on("spanStart",t=>{g1e(t)})}function g1e(e){let t=Ot(e).data,n=t["fastify.type"];if(t[Wt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.fastify",[Wt]:`${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 H4,Ay,G0t,j0t,m1e,H0t,j4,h1e=O(()=>{m();je();H4=ie(Tr(),1),Ay=ie(rn(),1);Zn();dt();l1e();A1e();G0t="0.1.0",j0t="@sentry/instrumentation-fastify-v3",m1e="anonymous",H0t=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),j4=class extends Ay.InstrumentationBase{constructor(t={}){super(j0t,G0t,t)}init(){return[new Ay.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,H4.getRPCMetadata)(Ke.active()),d=a.routeOptions?a.routeOptions.url:r.routerPath;d&&c?.type===H4.RPCType.HTTP&&(c.route=d);let g=r.method||"GET";Cn().setTransactionName(`${g} ${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||m1e,d=`${HN.MIDDLEWARE} - ${c}`,g=a[1],h=TK(g,i.tracer,d,{[Cg.FASTIFY_TYPE]:jN.MIDDLEWARE,[Cg.PLUGIN_NAME]:t,[Cg.HOOK_NAME]:n}),S=o&&a[a.length-1];return S&&(a[a.length-1]=function(...y){G4(g),S.apply(this,y)}),Ke.with(Ht.setSpan(Ke.active(),h),()=>f1e(()=>r.apply(this,a),y=>{y instanceof Error&&(h.setStatus({code:ui.ERROR,message:y.message}),h.recordException(y)),o||G4(g)}))}}_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(!H0t.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()),z0t(),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,Ay.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),G4(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,g=`${HN.REQUEST_HANDLER} - ${d||this.pluginName||m1e}`,h={[Cg.PLUGIN_NAME]:this.pluginName,[Cg.FASTIFY_TYPE]:jN.REQUEST_HANDLER,[d5]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[Cg.FASTIFY_NAME]=d);let S=TK(o,t.tracer,g,h);g1e(S);let{requestHook:y}=t.getConfig();return y&&(0,Ay.safeExecuteInTheMiddle)(()=>y(S,{request:r}),C=>{C&&t._diag.error("request hook failed",C)},!0),Ke.with(Ht.setSpan(Ke.active(),S),()=>{i()})}}}});import*as IK from"node:diagnostics_channel";function $0t(){let e=gt();if(e)return e.getIntegrationByName(z4)}function _1e(e,t,n,r){let o=$0t()?.getShouldHandleError()||I1e;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){Ta&&J.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)&&tn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function I1e(e,t,n){let r=n.statusCode;return r>=500||r<=299}function C1e(e){let t=Ot(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[Wt]||!a&&!c&&!i)return;let d=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[kt]:"auto.http.otel.fastify",[Wt]:`${d}.fastify`});let g=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof g=="string"){let h=g.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function q0t(){let e=gt();e&&e.on("spanStart",t=>{C1e(t)})}function Y0t(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&C1e(i)}let r=t.routeOptions?.url,o=t.method||"GET";Cn().setTransactionName(`${o} ${r}`)})}var E1e,z4,S1e,y1e,V0t,T1e,b1e=O(()=>{m();E1e=ie(c1e(),1);dt();mr();ly();h1e();z4="Fastify",S1e=st(`${z4}.v3`,()=>new j4);y1e=st(`${z4}.v5`,()=>{let e=new E1e.FastifyOtelInstrumentation,t=e.plugin();return IK.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?Ta&&J.error("Failed to setup Fastify instrumentation",o):(q0t(),r&&Y0t(r))})}),IK.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;_1e.call(_1e,r,o,i,"diagnostics-channel")}),e}),V0t=({shouldHandleError:e})=>{let t;return{name:z4,setupOnce(){t=e||I1e,S1e(),y1e()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},T1e=(e={})=>V0t(e)});var CK=F(af=>{"use strict";m();Object.defineProperty(af,"__esModule",{value:!0});af.SpanNames=af.TokenKind=af.AllowedOperationTypes=void 0;var K0t;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(K0t=af.AllowedOperationTypes||(af.AllowedOperationTypes={}));var J0t;(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"})(J0t=af.TokenKind||(af.TokenKind={}));var Z0t;(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"})(Z0t=af.SpanNames||(af.SpanNames={}))});var bK=F($N=>{"use strict";m();Object.defineProperty($N,"__esModule",{value:!0});$N.AttributeNames=void 0;var W0t;(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"})(W0t=$N.AttributeNames||($N.AttributeNames={}))});var $4=F(Tv=>{"use strict";m();Object.defineProperty(Tv,"__esModule",{value:!0});Tv.OTEL_GRAPHQL_DATA_SYMBOL=Tv.OTEL_PATCHED_SYMBOL=void 0;Tv.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");Tv.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var v1e=F(V4=>{"use strict";m();Object.defineProperty(V4,"__esModule",{value:!0});V4.OPERATION_NOT_SUPPORTED=void 0;var qgn=$4();V4.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var F1e=F(Ia=>{"use strict";m();Object.defineProperty(Ia,"__esModule",{value:!0});Ia.wrapFieldResolver=Ia.wrapFields=Ia.getSourceFromLocation=Ia.getOperation=Ia.endSpan=Ia.addSpanSource=Ia.addInputVariableAttributes=Ia.isPromise=void 0;var Iv=(je(),Me(We)),$_=CK(),my=bK(),bg=$4(),R1e=Object.values($_.AllowedOperationTypes),X0t=e=>typeof e?.then=="function";Ia.isPromise=X0t;var eSt=e=>typeof e=="object"&&e!==null;function vK(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{vK(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{vK(e,`${t}.${r}`,o)}):e.setAttribute(`${my.AttributeNames.VARIABLES}${String(t)}`,n)}function tSt(e,t){Object.entries(t).forEach(([n,r])=>{vK(e,n,r)})}Ia.addInputVariableAttributes=tSt;function N1e(e,t,n,r,o){let i=P1e(t,n,r,o);e.setAttribute(my.AttributeNames.SOURCE,i)}Ia.addSpanSource=N1e;function nSt(e,t,n,r,o){let i=O1e(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?k1e(n):w1e(n,o);return i={span:rSt(e,t,n,r,o,c)},aSt(n,o,i),{field:i,spanAdded:!0}}function rSt(e,t,n,r,o,i){let a={[my.AttributeNames.FIELD_NAME]:r.fieldName,[my.AttributeNames.FIELD_PATH]:o.join("."),[my.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[my.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${$_.SpanNames.RESOLVE} ${a[my.AttributeNames.FIELD_PATH]}`,{attributes:a},i?Iv.trace.setSpan(Iv.context.active(),i):void 0),d=n[bg.OTEL_GRAPHQL_DATA_SYMBOL].source,g=r.fieldNodes.find(h=>h.kind==="Field");return g&&N1e(c,d.loc,t().allowValues,g.loc?.start,g.loc?.end),c}function oSt(e,t){t&&e.recordException(t),e.end()}Ia.endSpan=oSt;function iSt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>R1e.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>R1e.indexOf(n?.operation)!==-1)}Ia.getOperation=iSt;function aSt(e,t,n){return e[bg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function O1e(e,t){return e[bg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function w1e(e,t){for(let n=t.length-1;n>0;n--){let r=O1e(e,t.slice(0,n));if(r)return r.span}return k1e(e)}function k1e(e){return e[bg.OTEL_GRAPHQL_DATA_SYMBOL].span}function sSt(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 uSt(e){return M1e(`
37
37
  `,e)}function x1e(e){return M1e(" ",e)}function M1e(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var cSt=[$_.TokenKind.FLOAT,$_.TokenKind.STRING,$_.TokenKind.INT,$_.TokenKind.BLOCK_STRING];function P1e(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 g=c.value||c.kind,h="";!t&&cSt.indexOf(c.kind)>=0&&(g="*"),c.kind===$_.TokenKind.STRING&&(g=`"${g}"`),c.kind===$_.TokenKind.EOF&&(g=""),c.line>d?(o+=uSt(c.line-d),d=c.line,h=x1e(c.column-1)):c.line===c.prev?.line&&(h=x1e(c.start-(c.prev?.end||0))),o+=h+g,c&&(c=c.next)}}return o}Ia.getSourceFromLocation=P1e;function U1e(e,t,n){if(!e||e[bg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[bg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=Q1e(t,n,i.resolve)),i.type)){let a=L1e(i.type);for(let c of a)U1e(c,t,n)}})}Ia.wrapFields=U1e;function L1e(e){return"ofType"in e?L1e(e.ofType):lSt(e)?e.getTypes():dSt(e)?[e]:[]}function lSt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function dSt(e){return"getFields"in e&&typeof e.getFields=="function"}var D1e=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:Iv.SpanStatusCode.ERROR,message:t.message}),e.end())},B1e=(e,t)=>{t&&e.end()};function Q1e(e,t,n,r=!1){if(o[bg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let g=t();if(g.ignoreTrivialResolveSpans&&r&&(eSt(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[bg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=sSt(g.mergeItems,d&&d.path),S=h.filter(v=>typeof v=="string").length,y,C=!1;if(g.depth>=0&&g.depth<S)y=w1e(c,h);else{let{field:v,spanAdded:x}=nSt(e,t,c,d,h);y=v.span,C=x}return Iv.context.with(Iv.trace.setSpan(Iv.context.active(),y),()=>{try{let v=n.call(this,i,a,c,d);return(0,Ia.isPromise)(v)?v.then(x=>(B1e(y,C),x),x=>{throw D1e(y,x,C),x}):(B1e(y,C),v)}catch(v){throw D1e(y,v,C),v}})}return o[bg.OTEL_PATCHED_SYMBOL]=!0,o}Ia.wrapFieldResolver=Q1e});var G1e=F(Cv=>{"use strict";m();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.PACKAGE_NAME=Cv.PACKAGE_VERSION=void 0;Cv.PACKAGE_VERSION="0.62.0";Cv.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var z1e=F(K4=>{"use strict";m();Object.defineProperty(K4,"__esModule",{value:!0});K4.GraphQLInstrumentation=void 0;var vg=(je(),Me(We)),Hd=rn(),VN=CK(),q4=bK(),RK=$4(),pSt=v1e(),ou=F1e(),j1e=G1e(),H1e={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},Y4=[">=14.0.0 <17"],xK=class extends Hd.InstrumentationBase{constructor(t={}){super(j1e.PACKAGE_NAME,j1e.PACKAGE_VERSION,{...H1e,...t})}setConfig(t={}){super.setConfig({...H1e,...t})}init(){let t=new Hd.InstrumentationNodeModuleDefinition("graphql",Y4);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new Hd.InstrumentationNodeModuleFile("graphql/execution/execute.js",Y4,t=>((0,Hd.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 Hd.InstrumentationNodeModuleFile("graphql/language/parser.js",Y4,t=>((0,Hd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new Hd.InstrumentationNodeModuleFile("graphql/validation/validate.js",Y4,t=>((0,Hd.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 g=arguments;a=n._wrapExecuteArgs(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],t)}else{let g=arguments[0];a=n._wrapExecuteArgs(g.schema,g.document,g.rootValue,g.contextValue,g.variableValues,g.operationName,g.fieldResolver,g.typeResolver,t)}let c=(0,ou.getOperation)(a.document,a.operationName),d=n._createExecuteSpan(c,a);return a.contextValue[RK.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[RK.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:d,fields:{}},vg.context.with(vg.trace.setSpan(vg.context.active(),d),()=>(0,Hd.safeExecuteInTheMiddle)(()=>o.apply(this,[a]),(g,h)=>{n._handleExecutionResult(d,g,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,ou.endSpan)(t,n);return}if((0,ou.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,ou.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,ou.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,ou.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,Hd.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,ou.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,g){return t._validate(this,r,i,a,c,g,d)}}}_parse(t,n,r,o){let i=this.getConfig(),a=this.tracer.startSpan(VN.SpanNames.PARSE);return vg.context.with(vg.trace.setSpan(vg.context.active(),a),()=>(0,Hd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,d)=>{d&&((0,ou.getOperation)(d)?d.loc&&(0,ou.addSpanSource)(a,d.loc,i.allowValues):a.updateName(VN.SpanNames.SCHEMA_PARSE)),(0,ou.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan(VN.SpanNames.VALIDATE,{});return vg.context.with(vg.trace.setSpan(vg.context.active(),d),()=>(0,Hd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(g,h)=>{o.loc||d.updateName(VN.SpanNames.SCHEMA_VALIDATE),h&&h.length&&d.recordException({name:q4.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,ou.endSpan)(d,g)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(VN.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(q4.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(q4.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=pSt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(q4.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,ou.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,ou.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,a,c,d,g){if(o||(o={}),o[RK.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??g;return c=(0,ou.wrapFieldResolver)(this.tracer,()=>this.getConfig(),S,h),t&&((0,ou.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,ou.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d}}};K4.GraphQLInstrumentation=xK});var $1e=F(J4=>{"use strict";m();Object.defineProperty(J4,"__esModule",{value:!0});J4.GraphQLInstrumentation=void 0;var fSt=z1e();Object.defineProperty(J4,"GraphQLInstrumentation",{enumerable:!0,get:function(){return fSt.GraphQLInstrumentation}})});function J1e(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function mSt(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 V1e,q1e,Y1e,ASt,K1e,Z1e=O(()=>{m();je();V1e=ie($1e(),1);dt();mr();uv();q1e="Graphql",Y1e=st(q1e,V1e.GraphQLInstrumentation,e=>{let t=J1e(e);return{...t,responseHook(n,r){Lr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Ot(n).status&&n.setStatus({code:ui.ERROR});let i=Ot(n).data,a=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&a){let d=ci(n),h=Ot(d).data[av]||[],S=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(S),d.setAttribute(av,h)):typeof h=="string"?d.setAttribute(av,[h,S]):d.setAttribute(av,S),Ot(d).data["original-description"]||d.setAttribute("original-description",Ot(d).description),d.updateName(`${Ot(d).data["original-description"]} (${mSt(h)})`)}}}}),ASt=(e={})=>({name:q1e,setupOnce(){Y1e(J1e(e))}}),K1e=ASt});var W1e=F(Z4=>{"use strict";m();Object.defineProperty(Z4,"__esModule",{value:!0});Z4.EVENT_LISTENERS_SET=void 0;Z4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var X1e=F(W4=>{"use strict";m();Object.defineProperty(W4,"__esModule",{value:!0});W4.bufferTextMapGetter=void 0;W4.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 eBe=F(nr=>{"use strict";m();Object.defineProperty(nr,"__esModule",{value:!0});nr.METRIC_MESSAGING_PROCESS_DURATION=nr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=nr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=nr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=nr.MESSAGING_SYSTEM_VALUE_KAFKA=nr.MESSAGING_OPERATION_TYPE_VALUE_SEND=nr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=nr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=nr.ATTR_MESSAGING_SYSTEM=nr.ATTR_MESSAGING_OPERATION_TYPE=nr.ATTR_MESSAGING_OPERATION_NAME=nr.ATTR_MESSAGING_KAFKA_OFFSET=nr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=nr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=nr.ATTR_MESSAGING_DESTINATION_PARTITION_ID=nr.ATTR_MESSAGING_DESTINATION_NAME=nr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;nr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";nr.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";nr.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";nr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";nr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";nr.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";nr.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";nr.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";nr.ATTR_MESSAGING_SYSTEM="messaging.system";nr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";nr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";nr.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";nr.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";nr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";nr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";nr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";nr.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var tBe=F(bv=>{"use strict";m();Object.defineProperty(bv,"__esModule",{value:!0});bv.PACKAGE_NAME=bv.PACKAGE_VERSION=void 0;bv.PACKAGE_VERSION="0.23.0";bv.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var sBe=F(eF=>{"use strict";m();Object.defineProperty(eF,"__esModule",{value:!0});eF.KafkaJsInstrumentation=void 0;var Qr=(je(),Me(We)),zd=rn(),vv=(Zn(),Me(Ur)),nBe=W1e(),rBe=X1e(),At=eBe(),oBe=tBe();function X4(e,t,n){return r=>{e.add(t,{...n,...r?{[vv.ATTR_ERROR_TYPE]:r}:{}})}}function iBe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[vv.ATTR_ERROR_TYPE]:r}:{}})}}var aBe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],DK=class extends zd.InstrumentationBase{constructor(t={}){super(oBe.PACKAGE_NAME,oBe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(At.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:aBe}}),this._sentMessages=this.meter.createCounter(At.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(At.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(At.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:aBe}})}init(){let t=r=>{(0,zd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,zd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new zd.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,zd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[nBe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[nBe.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[vv.ATTR_SERVER_ADDRESS]:n,[vv.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,zd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,zd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,zd.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,zd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,zd.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=Qr.propagation.extract(Qr.ROOT_CONTEXT,i.message.headers,rBe.bufferTextMapGetter),c=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:a,attributes:{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),d=[iBe(t._processDuration,Date.now(),{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),X4(t._consumedMessages,1,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],g=Qr.context.with(Qr.trace.setSpan(a,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],d,g)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],a=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:Qr.ROOT_CONTEXT,attributes:{[At.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Qr.context.with(Qr.trace.setSpan(Qr.context.active(),a),()=>{let c=Date.now(),d=[],g=[X4(n._consumedMessages,i.batch.messages.length,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(S=>{let y=Qr.propagation.extract(Qr.ROOT_CONTEXT,S.headers,rBe.bufferTextMapGetter),C=Qr.trace.getSpan(y)?.spanContext(),v;C&&(v={context:C}),d.push(n._startConsumerSpan({topic:i.batch.topic,message:S,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),g.push(iBe(n._processDuration,c,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return d.unshift(a),n._endSpansOnPromise(d,g,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 Qr.context.with(Qr.trace.setSpan(Qr.context.active(),i),()=>t._getSendPatch()(d).apply(this,C).catch(x=>{throw i.setStatus({code:Qr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let g=c.sendBatch;c.sendBatch=function(...C){return Qr.context.with(Qr.trace.setSpan(Qr.context.active(),i),()=>t._getSendBatchPatch()(g).apply(this,C).catch(x=>{throw i.setStatus({code:Qr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let h=c.commit;c.commit=function(...C){let v=h.apply(this,C).then(()=>{i.setStatus({code:Qr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let S=c.abort;c.abort=function(...C){let v=S.apply(this,C);return t._endSpansOnPromise([i],[],v)}}).catch(c=>{i.setStatus({code:Qr.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(X4(t._sentMessages,1,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"send",[At.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...S.partition!==void 0?{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(S.partition)}:{}}))})});let g=n.apply(this,o);return t._endSpansOnPromise(c,d,g)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],a=i.messages.map(g=>t._startProducerSpan(i.topic,g)),c=i.messages.map(g=>X4(t._sentMessages,1,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"send",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...g.partition!==void 0?{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(g.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=vv.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(vv.ATTR_ERROR_TYPE,a),c.setStatus({code:Qr.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===At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,d=this.tracer.startSpan(`${c} ${t}`,{kind:r===At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?Qr.SpanKind.CLIENT:Qr.SpanKind.CONSUMER,attributes:{...a,[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_DESTINATION_NAME]:t,[At.ATTR_MESSAGING_OPERATION_TYPE]:r,[At.ATTR_MESSAGING_OPERATION_NAME]:c,[At.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[At.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[At.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:g}=this.getConfig();return g&&n&&(0,zd.safeExecuteInTheMiddle)(()=>g(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:Qr.SpanKind.PRODUCER,attributes:{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_DESTINATION_NAME]:t,[At.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[At.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[At.ATTR_MESSAGING_OPERATION_NAME]:"send",[At.ATTR_MESSAGING_OPERATION_TYPE]:At.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},Qr.propagation.inject(Qr.trace.setSpan(Qr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,zd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};eF.KafkaJsInstrumentation=DK});var uBe=F(tF=>{"use strict";m();Object.defineProperty(tF,"__esModule",{value:!0});tF.KafkaJsInstrumentation=void 0;var gSt=sBe();Object.defineProperty(tF,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return gSt.KafkaJsInstrumentation}})});var cBe,lBe,dBe,hSt,pBe,fBe=O(()=>{m();cBe=ie(uBe(),1);mr();lBe="Kafka",dBe=st(lBe,()=>new cBe.KafkaJsInstrumentation({consumerHook(e){Lr(e,"auto.kafkajs.otel.consumer")},producerHook(e){Lr(e,"auto.kafkajs.otel.producer")}})),hSt=()=>({name:lBe,setupOnce(){dBe()}}),pBe=hSt});var ABe=F(Rv=>{"use strict";m();Object.defineProperty(Rv,"__esModule",{value:!0});Rv.PACKAGE_NAME=Rv.PACKAGE_VERSION=void 0;Rv.PACKAGE_VERSION="0.58.0";Rv.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var _Be=F(nF=>{"use strict";m();Object.defineProperty(nF,"__esModule",{value:!0});nF.LruMemoizerInstrumentation=void 0;var mBe=(je(),Me(We)),gBe=rn(),hBe=ABe(),BK=class extends gBe.InstrumentationBase{constructor(t={}){super(hBe.PACKAGE_NAME,hBe.PACKAGE_VERSION,t)}init(){return[new gBe.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"?mBe.context.bind(mBe.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};nF.LruMemoizerInstrumentation=BK});var EBe=F(rF=>{"use strict";m();Object.defineProperty(rF,"__esModule",{value:!0});rF.LruMemoizerInstrumentation=void 0;var _St=_Be();Object.defineProperty(rF,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return _St.LruMemoizerInstrumentation}})});var SBe,yBe,TBe,ESt,IBe,CBe=O(()=>{m();SBe=ie(EBe(),1);mr();yBe="LruMemoizer",TBe=st(yBe,()=>new SBe.LruMemoizerInstrumentation),ESt=()=>({name:yBe,setupOnce(){TBe()}}),IBe=ESt});var bBe=F(Bo=>{"use strict";m();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Bo.DB_SYSTEM_VALUE_MONGODB=Bo.DB_SYSTEM_NAME_VALUE_MONGODB=Bo.ATTR_NET_PEER_PORT=Bo.ATTR_NET_PEER_NAME=Bo.ATTR_DB_SYSTEM=Bo.ATTR_DB_STATEMENT=Bo.ATTR_DB_OPERATION=Bo.ATTR_DB_NAME=Bo.ATTR_DB_MONGODB_COLLECTION=Bo.ATTR_DB_CONNECTION_STRING=void 0;Bo.ATTR_DB_CONNECTION_STRING="db.connection_string";Bo.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Bo.ATTR_DB_NAME="db.name";Bo.ATTR_DB_OPERATION="db.operation";Bo.ATTR_DB_STATEMENT="db.statement";Bo.ATTR_DB_SYSTEM="db.system";Bo.ATTR_NET_PEER_NAME="net.peer.name";Bo.ATTR_NET_PEER_PORT="net.peer.port";Bo.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";Bo.DB_SYSTEM_VALUE_MONGODB="mongodb";Bo.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var vBe=F(qN=>{"use strict";m();Object.defineProperty(qN,"__esModule",{value:!0});qN.MongodbCommandType=void 0;var SSt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(SSt=qN.MongodbCommandType||(qN.MongodbCommandType={}))});var RBe=F(xv=>{"use strict";m();Object.defineProperty(xv,"__esModule",{value:!0});xv.PACKAGE_NAME=xv.PACKAGE_VERSION=void 0;xv.PACKAGE_VERSION="0.67.0";xv.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var BBe=F(oF=>{"use strict";m();Object.defineProperty(oF,"__esModule",{value:!0});oF.MongoDBInstrumentation=void 0;var Yo=(je(),Me(We)),rr=rn(),Rg=(Zn(),Me(Ur)),Ul=bBe(),gy=vBe(),xBe=RBe(),DBe={requireParentSpan:!0},NK=class e extends rr.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(xBe.PACKAGE_NAME,xBe.PACKAGE_VERSION,{...DBe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,rr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,rr.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...DBe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(Ul.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:g}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:S}=this._getV4SessionsPatches();return[new rr.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new rr.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new rr.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],d,g),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new rr.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,S)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,rr.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,rr.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,rr.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,rr.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,rr.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,rr.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,rr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,rr.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,rr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,rr.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,rr.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,rr.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=Yo.context.bind(Yo.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,rr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,rr.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,g){let h=Yo.trace.getSpan(Yo.context.active()),S=n._checkSkipInstrumentation(h),y=typeof d=="function"?d:g;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,g);let C=n._getV3SpanAttributes(a,i,c[0],t),v=n._spanNameFromAttrs(C),x=n.tracer.startSpan(v,{kind:Yo.SpanKind.CLIENT,attributes:C}),N=n._patchEnd(x,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 g=Yo.trace.getSpan(Yo.context.active()),h=t._checkSkipInstrumentation(g),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===gy.MongodbCommandType.UNKNOWN?void 0:y,v=t._getV3SpanAttributes(i,o,a,C),x=t._spanNameFromAttrs(v),N=t.tracer.startSpan(x,{kind:Yo.SpanKind.CLIENT,attributes:v}),k=t._patchEnd(N,S);return typeof c=="function"?n.call(this,o,i,a,k):n.call(this,o,i,a,c,k)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,a,c){let d=Yo.trace.getSpan(Yo.context.active()),g=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(!g){let v=t._getV4SpanAttributes(this,o,i,S),x=t._spanNameFromAttrs(v);y=t.tracer.startSpan(x,{kind:Yo.SpanKind.CLIENT,attributes:v})}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=Yo.trace.getSpan(Yo.context.active()),d=t._checkSkipInstrumentation(c),g=Object.keys(a)[0],h=()=>{};if(typeof a!="object"||a.ismaster||a.hello)return n.apply(this,o);let S;if(!d){let v=t._getV4SpanAttributes(this,i,a,g),x=t._spanNameFromAttrs(v);S=t.tracer.startSpan(x,{kind:Yo.SpanKind.CLIENT,attributes:v})}let y=t._patchEnd(S,h,this.id,g),C=n.apply(this,o);return C.then(v=>y(null,v),v=>y(v)),C}}_getV3PatchFind(){let t=this;return n=>function(o,i,a,c,d,g){let h=Yo.trace.getSpan(Yo.context.active()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:g;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,g);let C=t._getV3SpanAttributes(i,o,a,"find"),v=t._spanNameFromAttrs(C),x=t.tracer.startSpan(v,{kind:Yo.SpanKind.CLIENT,attributes:C}),N=t._patchEnd(x,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,g){let h=Yo.trace.getSpan(Yo.context.active()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:g;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,g);let C=t._getV3SpanAttributes(i,o,a.cmd,"getMore"),v=t._spanNameFromAttrs(C),x=t.tracer.startSpan(v,{kind:Yo.SpanKind.CLIENT,attributes:C}),N=t._patchEnd(x,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?gy.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?gy.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?gy.MongodbCommandType.IS_MASTER:t.count!==void 0?gy.MongodbCommandType.COUNT:t.aggregate!==void 0?gy.MongodbCommandType.AGGREGATE:gy.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("."),g=r?.query??r?.q??r;return this._getSpanAttributes(c,d,i,a,g,o)}_getSpanAttributes(t,n,r,o,i,a){let c={};if(this._dbSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_DB_SYSTEM]=Ul.DB_SYSTEM_VALUE_MONGODB,c[Ul.ATTR_DB_NAME]=t,c[Ul.ATTR_DB_MONGODB_COLLECTION]=n,c[Ul.ATTR_DB_OPERATION]=a,c[Ul.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&rr.SemconvStability.STABLE&&(c[Rg.ATTR_DB_SYSTEM_NAME]=Ul.DB_SYSTEM_NAME_VALUE_MONGODB,c[Rg.ATTR_DB_NAMESPACE]=t,c[Rg.ATTR_DB_OPERATION_NAME]=a,c[Rg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&rr.SemconvStability.STABLE&&(c[Rg.ATTR_SERVER_ADDRESS]=r);let d=parseInt(o,10);isNaN(d)||(this._netSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_PORT]=d),this._netSemconvStability&rr.SemconvStability.STABLE&&(c[Rg.ATTR_SERVER_PORT]=d))}if(i){let{dbStatementSerializer:d}=this.getConfig(),g=typeof d=="function"?d:this._defaultDbStatementSerializer.bind(this);(0,rr.safeExecuteInTheMiddle)(()=>{let h=g(i);this._dbSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&rr.SemconvStability.STABLE&&(c[Rg.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&rr.SemconvStability.STABLE?n=[t[Rg.ATTR_DB_OPERATION_NAME],t[Rg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||Ul.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[Ul.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,rr.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=Yo.context.active(),a=this,c=!1;return function(...g){if(!c){c=!0;let h=g[0];if(t){if(h instanceof Error)t.setStatus({code:Yo.SpanStatusCode.ERROR,message:h.message});else{let S=g[1];a._handleExecutionResult(t,S)}t.end()}o==="endSessions"&&a._connCountAdd(-1,a._poolName,"idle")}return Yo.context.with(i,()=>n.apply(this,g))}}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}};oF.MongoDBInstrumentation=NK});var NBe=F(YN=>{"use strict";m();Object.defineProperty(YN,"__esModule",{value:!0});YN.MongodbCommandType=void 0;var ySt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(ySt=YN.MongodbCommandType||(YN.MongodbCommandType={}))});var OBe=F(Dv=>{"use strict";m();Object.defineProperty(Dv,"__esModule",{value:!0});Dv.MongodbCommandType=Dv.MongoDBInstrumentation=void 0;var TSt=BBe();Object.defineProperty(Dv,"MongoDBInstrumentation",{enumerable:!0,get:function(){return TSt.MongoDBInstrumentation}});var ISt=NBe();Object.defineProperty(Dv,"MongodbCommandType",{enumerable:!0,get:function(){return ISt.MongodbCommandType}})});function CSt(e){let t=OK(e);return JSON.stringify(t)}function OK(e){if(Array.isArray(e))return e.map(t=>OK(t));if(bSt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,OK(r)]).reduce((n,r)=>(RSt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function bSt(e){return typeof e=="object"&&e!==null&&!vSt(e)}function vSt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function RSt(e){return Array.isArray(e)}var wBe,kBe,MBe,xSt,PBe,UBe=O(()=>{m();wBe=ie(OBe(),1);mr();kBe="Mongo",MBe=st(kBe,()=>new wBe.MongoDBInstrumentation({dbStatementSerializer:CSt,responseHook(e){Lr(e,"auto.db.otel.mongo")}}));xSt=()=>({name:kBe,setupOnce(){MBe()}}),PBe=xSt});var wK=F(ea=>{"use strict";m();Object.defineProperty(ea,"__esModule",{value:!0});ea.DB_SYSTEM_NAME_VALUE_MONGODB=ea.ATTR_NET_PEER_PORT=ea.ATTR_NET_PEER_NAME=ea.ATTR_DB_USER=ea.ATTR_DB_SYSTEM=ea.ATTR_DB_STATEMENT=ea.ATTR_DB_OPERATION=ea.ATTR_DB_NAME=ea.ATTR_DB_MONGODB_COLLECTION=void 0;ea.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";ea.ATTR_DB_NAME="db.name";ea.ATTR_DB_OPERATION="db.operation";ea.ATTR_DB_STATEMENT="db.statement";ea.ATTR_DB_SYSTEM="db.system";ea.ATTR_DB_USER="db.user";ea.ATTR_NET_PEER_NAME="net.peer.name";ea.ATTR_NET_PEER_PORT="net.peer.port";ea.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var FBe=F(V_=>{"use strict";m();Object.defineProperty(V_,"__esModule",{value:!0});V_.handleCallbackResponse=V_.handlePromiseResponse=V_.getAttributesFromCollection=void 0;var LBe=(je(),Me(We)),JN=rn(),KN=wK(),iF=(Zn(),Me(Ur));function DSt(e,t,n){let r={};return t&JN.SemconvStability.OLD&&(r[KN.ATTR_DB_MONGODB_COLLECTION]=e.name,r[KN.ATTR_DB_NAME]=e.conn.name,r[KN.ATTR_DB_USER]=e.conn.user),t&JN.SemconvStability.STABLE&&(r[iF.ATTR_DB_COLLECTION_NAME]=e.name,r[iF.ATTR_DB_NAMESPACE]=e.conn.name),n&JN.SemconvStability.OLD&&(r[KN.ATTR_NET_PEER_NAME]=e.conn.host,r[KN.ATTR_NET_PEER_PORT]=e.conn.port),n&JN.SemconvStability.STABLE&&(r[iF.ATTR_SERVER_ADDRESS]=e.conn.host,r[iF.ATTR_SERVER_PORT]=e.conn.port),r}V_.getAttributesFromCollection=DSt;function QBe(e,t={}){e.recordException(t),e.setStatus({code:LBe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function kK(e,t,n,r=void 0){n&&(0,JN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&LBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function BSt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(kK(t,o,n,r),o)).catch(o=>{throw QBe(t,o),o}).finally(()=>t.end()):(kK(t,e,n,r),t.end(),e)}V_.handlePromiseResponse=BSt;function NSt(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,g)=>(d?QBe(r,d):kK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}V_.handleCallbackResponse=NSt});var GBe=F(Bv=>{"use strict";m();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.PACKAGE_NAME=Bv.PACKAGE_VERSION=void 0;Bv.PACKAGE_VERSION="0.60.0";Bv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var VBe=F(Uc=>{"use strict";m();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.MongooseInstrumentation=Uc._ALREADY_INSTRUMENTED=Uc._STORED_PARENT_SPAN=void 0;var Ca=(je(),Me(We)),OSt=Tr(),MK=FBe(),Ns=rn(),jBe=GBe(),q_=wK(),hy=(Zn(),Me(Ur)),aF=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],wSt=["remove","count","findOneAndRemove",...aF],kSt=["count","findOneAndRemove",...aF],MSt=[...aF];function HBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?wSt:e.startsWith("7.")?kSt:MSt:aF}function zBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function $Be(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Uc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Uc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var PK=class extends Ns.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(jBe.PACKAGE_NAME,jBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ns.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ns.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ns.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,zBe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),$Be(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)),HBe(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=HBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,zBe(n)&&this._unwrap(r.Model.prototype,"remove"),$Be(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ns.SemconvStability.OLD&&(c[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[hy.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Uc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._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&Ns.SemconvStability.OLD&&(c[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[hy.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let g={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,d);r._dbSemconvStability&Ns.SemconvStability.OLD&&(g[q_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(g[hy.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,g);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&&Ca.trace.getSpan(Ca.context.active())===void 0)return o.apply(this,arguments);let g=d,h=a,S=c;typeof a=="function"?(g=a,h=void 0,S=void 0):typeof c=="function"&&(g=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&Ns.SemconvStability.OLD&&(y[q_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(y[hy.ATTR_DB_QUERY_TEXT]=N)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),x=r._handleResponse(v,o,this,arguments,g,n);return x&&typeof x=="object"&&(x[Uc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let g={};switch(t){case"insertMany":g.documents=a;break;case"bulkWrite":g.operations=a;break;default:g.document=a;break}c!==void 0&&(g.options=c);let h={},{dbStatementSerializer:S}=r.getConfig();if(S){let C=S(t,g);r._dbSemconvStability&Ns.SemconvStability.OLD&&(h[q_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(h[hy.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=Ca.trace.getSpan(Ca.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Uc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Uc._STORED_PARENT_SPAN]=Ca.trace.getSpan(Ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,MK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ns.SemconvStability.OLD&&(a[q_.ATTR_DB_OPERATION]=r,a[q_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ns.SemconvStability.STABLE&&(a[hy.ATTR_DB_OPERATION_NAME]=r,a[hy.ATTR_DB_SYSTEM_NAME]=q_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Ns.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Ca.SpanKind.CLIENT,attributes:a},i?Ca.trace.setSpan(Ca.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,MK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,MK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ca.context.with((0,OSt.suppressTracing)(Ca.context.active()),t):t()}};Uc.MongooseInstrumentation=PK});var qBe=F(sF=>{"use strict";m();Object.defineProperty(sF,"__esModule",{value:!0});sF.MongooseInstrumentation=void 0;var PSt=VBe();Object.defineProperty(sF,"MongooseInstrumentation",{enumerable:!0,get:function(){return PSt.MongooseInstrumentation}})});var YBe,KBe,JBe,USt,ZBe,WBe=O(()=>{m();YBe=ie(qBe(),1);mr();KBe="Mongoose",JBe=st(KBe,()=>new YBe.MongooseInstrumentation({responseHook(e){Lr(e,"auto.db.otel.mongoose")}})),USt=()=>({name:KBe,setupOnce(){JBe()}}),ZBe=USt});var XBe=F(ta=>{"use strict";m();Object.defineProperty(ta,"__esModule",{value:!0});ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ta.DB_SYSTEM_VALUE_MYSQL=ta.ATTR_NET_PEER_PORT=ta.ATTR_NET_PEER_NAME=ta.ATTR_DB_USER=ta.ATTR_DB_SYSTEM=ta.ATTR_DB_STATEMENT=ta.ATTR_DB_NAME=ta.ATTR_DB_CONNECTION_STRING=void 0;ta.ATTR_DB_CONNECTION_STRING="db.connection_string";ta.ATTR_DB_NAME="db.name";ta.ATTR_DB_STATEMENT="db.statement";ta.ATTR_DB_SYSTEM="db.system";ta.ATTR_DB_USER="db.user";ta.ATTR_NET_PEER_NAME="net.peer.name";ta.ATTR_NET_PEER_PORT="net.peer.port";ta.DB_SYSTEM_VALUE_MYSQL="mysql";ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var eNe=F(ZN=>{"use strict";m();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.AttributeNames=void 0;var LSt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(LSt=ZN.AttributeNames||(ZN.AttributeNames={}))});var tNe=F(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.getPoolNameOld=iu.arrayStringifyHelper=iu.getSpanName=iu.getDbValues=iu.getDbQueryText=iu.getJDBCString=iu.getConfig=void 0;function QSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}iu.getConfig=QSt;function FSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}iu.getJDBCString=FSt;function GSt(e){return typeof e=="string"?e:e.sql}iu.getDbQueryText=GSt;function jSt(e,t){return UK(typeof e=="string"?t:t||e.values)}iu.getDbValues=jSt;function HSt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}iu.getSpanName=HSt;function UK(e){return e?`[${e.toString()}]`:""}iu.arrayStringifyHelper=UK;function zSt(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()}iu.getPoolNameOld=zSt});var nNe=F(Nv=>{"use strict";m();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.PACKAGE_NAME=Nv.PACKAGE_VERSION=void 0;Nv.PACKAGE_VERSION="0.60.0";Nv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var oNe=F(uF=>{"use strict";m();Object.defineProperty(uF,"__esModule",{value:!0});uF.MySQLInstrumentation=void 0;var Lc=(je(),Me(We)),$d=rn(),Ov=(Zn(),Me(Ur)),xg=XBe(),$St=eNe(),_y=tNe(),rNe=nNe(),LK=class extends $d.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rNe.PACKAGE_NAME,rNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,$d.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,$d.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(xg.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 $d.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,$d.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,$d.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,$d.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,g=(0,_y.getPoolNameOld)(t);r._connCountAdd(-d,g,"used"),r._connCountAdd(-c,g,"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),g=c[d].pool;r._setPoolCallbacks(g,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=Lc.context.active();return function(o,i){i&&((0,$d.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Lc.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:g,database:h,user:S}=(0,_y.getConfig)(t.config),y=parseInt(g,10),C=(0,_y.getDbQueryText)(o);r._dbSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_DB_SYSTEM]=xg.DB_SYSTEM_VALUE_MYSQL,c[xg.ATTR_DB_CONNECTION_STRING]=(0,_y.getJDBCString)(d,g,h),c[xg.ATTR_DB_NAME]=h,c[xg.ATTR_DB_USER]=S,c[xg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&$d.SemconvStability.STABLE&&(c[Ov.ATTR_DB_SYSTEM_NAME]=Ov.DB_SYSTEM_NAME_VALUE_MYSQL,c[Ov.ATTR_DB_NAMESPACE]=h,c[Ov.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[xg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&$d.SemconvStability.STABLE&&(c[Ov.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Ov.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,_y.getSpanName)(o),{kind:Lc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute($St.AttributeNames.MYSQL_VALUES,(0,_y.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),N=Lc.context.active();if(x===-1){let k=Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments));return Lc.context.bind(N,k),k.on("error",Q=>v.setStatus({code:Lc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,N)),Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Lc.SpanStatusCode.ERROR,message:o.message}),t.end(),Lc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,_y.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")})}};uF.MySQLInstrumentation=LK});var iNe=F(cF=>{"use strict";m();Object.defineProperty(cF,"__esModule",{value:!0});cF.MySQLInstrumentation=void 0;var VSt=oNe();Object.defineProperty(cF,"MySQLInstrumentation",{enumerable:!0,get:function(){return VSt.MySQLInstrumentation}})});var aNe,sNe,uNe,qSt,cNe,lNe=O(()=>{m();aNe=ie(iNe(),1);mr();sNe="Mysql",uNe=st(sNe,()=>new aNe.MySQLInstrumentation({})),qSt=()=>({name:sNe,setupOnce(){uNe()}}),cNe=qSt});var QK=F(ts=>{"use strict";m();Object.defineProperty(ts,"__esModule",{value:!0});ts.DB_SYSTEM_VALUE_MYSQL=ts.ATTR_NET_PEER_PORT=ts.ATTR_NET_PEER_NAME=ts.ATTR_DB_USER=ts.ATTR_DB_SYSTEM=ts.ATTR_DB_STATEMENT=ts.ATTR_DB_NAME=ts.ATTR_DB_CONNECTION_STRING=void 0;ts.ATTR_DB_CONNECTION_STRING="db.connection_string";ts.ATTR_DB_NAME="db.name";ts.ATTR_DB_STATEMENT="db.statement";ts.ATTR_DB_SYSTEM="db.system";ts.ATTR_DB_USER="db.user";ts.ATTR_NET_PEER_NAME="net.peer.name";ts.ATTR_NET_PEER_PORT="net.peer.port";ts.DB_SYSTEM_VALUE_MYSQL="mysql"});var GK=F(lF=>{"use strict";m();Object.defineProperty(lF,"__esModule",{value:!0});lF.addSqlCommenterComment=void 0;var FK=(je(),Me(We)),YSt=Tr();function KSt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function JSt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function ZSt(e,t){if(typeof t!="string"||t.length===0||KSt(t))return t;let n=new YSt.W3CTraceContextPropagator,r={};n.inject(FK.trace.setSpan(FK.ROOT_CONTEXT,e),r,FK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=JSt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}lF.addSqlCommenterComment=ZSt});var dNe=F(Vd=>{"use strict";m();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.getConnectionPrototypeToInstrument=Vd.once=Vd.getSpanName=Vd.getQueryText=Vd.getConnectionAttributes=void 0;var WN=QK(),dF=rn(),jK=(Zn(),Me(Ur));function WSt(e,t,n){let{host:r,port:o,database:i,user:a}=XSt(e),c={};t&dF.SemconvStability.OLD&&(c[WN.ATTR_DB_CONNECTION_STRING]=eyt(r,o,i),c[WN.ATTR_DB_NAME]=i,c[WN.ATTR_DB_USER]=a),t&dF.SemconvStability.STABLE&&(c[jK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&dF.SemconvStability.OLD&&(c[WN.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[WN.ATTR_NET_PEER_PORT]=d)),n&dF.SemconvStability.STABLE&&(c[jK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[jK.ATTR_SERVER_PORT]=d)),c}Vd.getConnectionAttributes=WSt;function XSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function eyt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function tyt(e,t,n,r=!1,o=nyt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,ryt(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"}}Vd.getQueryText=tyt;function nyt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function ryt(e){return"values"in e}function oyt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Vd.getSpanName=oyt;var iyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Vd.once=iyt;function ayt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Vd.getConnectionPrototypeToInstrument=ayt});var pNe=F(wv=>{"use strict";m();Object.defineProperty(wv,"__esModule",{value:!0});wv.PACKAGE_NAME=wv.PACKAGE_VERSION=void 0;wv.PACKAGE_VERSION="0.60.0";wv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var gNe=F(pF=>{"use strict";m();Object.defineProperty(pF,"__esModule",{value:!0});pF.MySQL2Instrumentation=void 0;var fNe=(je(),Me(We)),sf=rn(),HK=QK(),ANe=GK(),kv=dNe(),mNe=pNe(),zK=(Zn(),Me(Ur)),$K=[">=1.4.2 <4"],VK=class extends sf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(mNe.PACKAGE_NAME,mNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,sf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,sf.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,sf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,sf.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 sf.InstrumentationNodeModuleDefinition("mysql2",$K,i=>(n(i),i),()=>{},[new sf.InstrumentationNodeModuleFile("mysql2/promise.js",$K,i=>(n(i),i),()=>{}),new sf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",$K,i=>{let a=(0,kv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,kv.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:g,maskStatementHook:h,responseHook:S}=o.getConfig(),y=(0,kv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,kv.getQueryText)(i,t,d,g,h);o._dbSemconvStability&sf.SemconvStability.OLD&&(y[HK.ATTR_DB_SYSTEM]=HK.DB_SYSTEM_VALUE_MYSQL,y[HK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&sf.SemconvStability.STABLE&&(y[zK.ATTR_DB_SYSTEM_NAME]=zK.DB_SYSTEM_NAME_VALUE_MYSQL,y[zK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,kv.getSpanName)(i),{kind:fNe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,ANe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,ANe.addSqlCommenterComment)(v,i.sql)}));let x=(0,kv.once)((N,k)=>{N?v.setStatus({code:fNe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,sf.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:k})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let N=r.apply(this,arguments);return N.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};pF.MySQL2Instrumentation=VK});var hNe=F(fF=>{"use strict";m();Object.defineProperty(fF,"__esModule",{value:!0});fF.MySQL2Instrumentation=void 0;var syt=gNe();Object.defineProperty(fF,"MySQL2Instrumentation",{enumerable:!0,get:function(){return syt.MySQL2Instrumentation}})});var _Ne,ENe,SNe,uyt,yNe,TNe=O(()=>{m();_Ne=ie(hNe(),1);mr();ENe="Mysql2",SNe=st(ENe,()=>new _Ne.MySQL2Instrumentation({responseHook(e){Lr(e,"auto.db.otel.mysql2")}})),uyt=()=>({name:ENe,setupOnce(){SNe()}}),yNe=uyt});var INe=F(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.DB_SYSTEM_VALUE_REDIS=au.DB_SYSTEM_NAME_VALUE_REDIS=au.ATTR_NET_PEER_PORT=au.ATTR_NET_PEER_NAME=au.ATTR_DB_SYSTEM=au.ATTR_DB_STATEMENT=au.ATTR_DB_CONNECTION_STRING=void 0;au.ATTR_DB_CONNECTION_STRING="db.connection_string";au.ATTR_DB_STATEMENT="db.statement";au.ATTR_DB_SYSTEM="db.system";au.ATTR_NET_PEER_NAME="net.peer.name";au.ATTR_NET_PEER_PORT="net.peer.port";au.DB_SYSTEM_NAME_VALUE_REDIS="redis";au.DB_SYSTEM_VALUE_REDIS="redis"});var CNe=F(AF=>{"use strict";m();Object.defineProperty(AF,"__esModule",{value:!0});AF.endSpan=void 0;var cyt=(je(),Me(We)),lyt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:cyt.SpanStatusCode.ERROR,message:t.message})),e.end()};AF.endSpan=lyt});var gF=F(mF=>{"use strict";m();Object.defineProperty(mF,"__esModule",{value:!0});mF.defaultDbStatementSerializer=void 0;var dyt=[{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}],pyt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=dyt.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};mF.defaultDbStatementSerializer=pyt});var bNe=F(Mv=>{"use strict";m();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.62.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var DNe=F(hF=>{"use strict";m();Object.defineProperty(hF,"__esModule",{value:!0});hF.IORedisInstrumentation=void 0;var Y_=(je(),Me(We)),Qc=rn(),K_=(Zn(),Me(Ur)),Fc=INe(),vNe=rn(),XN=CNe(),fyt=gF(),RNe=bNe(),xNe={requireParentSpan:!0},qK=class extends Qc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(RNe.PACKAGE_NAME,RNe.PACKAGE_VERSION,{...xNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xNe,...t})}init(){return[new Qc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Qc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Qc.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||fyt.defaultDbStatementSerializer,c=Y_.trace.getSpan(Y_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:g,port:h}=this.options,S=a(o.name,o.args);r._dbSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,d[Fc.ATTR_DB_STATEMENT]=S,d[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${g}:${h}`),r._dbSemconvStability&Qc.SemconvStability.STABLE&&(d[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,d[K_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_NET_PEER_NAME]=g,d[Fc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Qc.SemconvStability.STABLE&&(d[K_.ATTR_SERVER_ADDRESS]=g,d[K_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:Y_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,vNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&Y_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,vNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),Q=>{Q&&Y_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,XN.endSpan)(y,null),x(k)};let N=o.reject;return o.reject=function(k){(0,XN.endSpan)(y,k),N(k)},v}catch(v){throw(0,XN.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=Y_.trace.getSpan(Y_.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&Qc.SemconvStability.OLD&&(o[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,o[Fc.ATTR_DB_STATEMENT]="connect",o[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Qc.SemconvStability.STABLE&&(o[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,o[K_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Qc.SemconvStability.OLD&&(o[Fc.ATTR_NET_PEER_NAME]=i,o[Fc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Qc.SemconvStability.STABLE&&(o[K_.ATTR_SERVER_ADDRESS]=i,o[K_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:Y_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,XN.endSpan)(c,null),d}catch(d){throw(0,XN.endSpan)(c,d),d}}}};hF.IORedisInstrumentation=qK});var BNe=F(_F=>{"use strict";m();Object.defineProperty(_F,"__esModule",{value:!0});_F.IORedisInstrumentation=void 0;var Ayt=DNe();Object.defineProperty(_F,"IORedisInstrumentation",{enumerable:!0,get:function(){return Ayt.IORedisInstrumentation}})});var EF=F(Pv=>{"use strict";m();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.PACKAGE_NAME=Pv.PACKAGE_VERSION=void 0;Pv.PACKAGE_VERSION="0.62.0";Pv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var NNe=F(J_=>{"use strict";m();Object.defineProperty(J_,"__esModule",{value:!0});J_.getTracedCreateStreamTrace=J_.getTracedCreateClient=J_.endSpan=void 0;var eO=(je(),Me(We)),myt=(e,t)=>{t&&e.setStatus({code:eO.SpanStatusCode.ERROR,message:t.message}),e.end()};J_.endSpan=myt;var gyt=e=>function(){let n=e.apply(this,arguments);return eO.context.bind(eO.context.active(),n)};J_.getTracedCreateClient=gyt;var hyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){eO.context.bind(eO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};J_.getTracedCreateStreamTrace=hyt});var SF=F(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.DB_SYSTEM_VALUE_REDIS=su.DB_SYSTEM_NAME_VALUE_REDIS=su.ATTR_NET_PEER_PORT=su.ATTR_NET_PEER_NAME=su.ATTR_DB_SYSTEM=su.ATTR_DB_STATEMENT=su.ATTR_DB_CONNECTION_STRING=void 0;su.ATTR_DB_CONNECTION_STRING="db.connection_string";su.ATTR_DB_STATEMENT="db.statement";su.ATTR_DB_SYSTEM="db.system";su.ATTR_NET_PEER_NAME="net.peer.name";su.ATTR_NET_PEER_PORT="net.peer.port";su.DB_SYSTEM_NAME_VALUE_REDIS="redis";su.DB_SYSTEM_VALUE_REDIS="redis"});var wNe=F(TF=>{"use strict";m();Object.defineProperty(TF,"__esModule",{value:!0});TF.RedisInstrumentationV2_V3=void 0;var Ll=rn(),yF=NNe(),ONe=EF(),tO=(je(),Me(We)),nO=(Zn(),Me(Ur)),Ey=SF(),_yt=gF(),YK=class e extends Ll.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(ONe.PACKAGE_NAME,ONe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ll.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ll.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,Ll.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ll.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=tO.trace.getSpan(tO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||_yt.defaultDbStatementSerializer,g={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(g,{[Ey.ATTR_DB_SYSTEM]:Ey.DB_SYSTEM_VALUE_REDIS,[Ey.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(g,{[nO.ATTR_DB_SYSTEM_NAME]:Ey.DB_SYSTEM_NAME_VALUE_REDIS,[nO.ATTR_DB_OPERATION_NAME]:i.command,[nO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:tO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(y,{[Ey.ATTR_NET_PEER_NAME]:this.connection_options.host,[Ey.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(y,{[nO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[nO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ll.SemconvStability.OLD&&h.setAttribute(Ey.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=tO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let N=a.responseHook;(0,Ll.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,yF.endSpan)(h,v),tO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,yF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,yF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,yF.getTracedCreateStreamTrace)(n)}}};TF.RedisInstrumentationV2_V3=YK});var MNe=F(IF=>{"use strict";m();Object.defineProperty(IF,"__esModule",{value:!0});IF.getClientAttributes=void 0;var KK=(Zn(),Me(Ur)),Uv=SF(),kNe=rn();function Eyt(e,t,n){let r={};return n&kNe.SemconvStability.OLD&&Object.assign(r,{[Uv.ATTR_DB_SYSTEM]:Uv.DB_SYSTEM_VALUE_REDIS,[Uv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Uv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Uv.ATTR_DB_CONNECTION_STRING]:Syt(e,t?.url)}),n&kNe.SemconvStability.STABLE&&Object.assign(r,{[KK.ATTR_DB_SYSTEM_NAME]:Uv.DB_SYSTEM_NAME_VALUE_REDIS,[KK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[KK.ATTR_SERVER_PORT]:t?.socket?.port}),r}IF.getClientAttributes=Eyt;function Syt(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 QNe=F(CF=>{"use strict";m();Object.defineProperty(CF,"__esModule",{value:!0});CF.RedisInstrumentationV4_V5=void 0;var qd=(je(),Me(We)),So=rn(),PNe=MNe(),yyt=gF(),UNe=EF(),JK=(Zn(),Me(Ur)),Tyt=SF(),rO=Symbol("opentelemetry.instrumentation.redis.open_spans"),LNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),ZK=class e extends So.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.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 So.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,So.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,So.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,So.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,So.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,So.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,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new So.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,g){let h=t(d,g).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[rO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[rO];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let g=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,g,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[LNe]=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,PNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:qd.SpanKind.CLIENT,attributes:a});return qd.context.with(qd.trace.setSpan(qd.context.active(),c),()=>r.apply(this)).then(g=>(c.end(),g)).catch(g=>(c.recordException(g),c.setStatus({code:qd.SpanStatusCode.ERROR,message:g.message}),c.end(),Promise.reject(g)))}}}_traceClientCommand(t,n,r,o){if(qd.trace.getSpan(qd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[LNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||yyt.defaultDbStatementSerializer,h=(0,PNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&So.SemconvStability.STABLE&&(h[JK.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&So.SemconvStability.OLD&&(h[Tyt.ATTR_DB_STATEMENT]=C),this._semconvStability&So.SemconvStability.STABLE&&(h[JK.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:qd.SpanKind.CLIENT,attributes:h}),y=qd.context.with(qd.trace.setSpan(qd.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[rO]=C[rO]||[],C[rO].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:g}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&So.SemconvStability.STABLE&&d.setAttribute(JK.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],g,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:qd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};CF.RedisInstrumentationV4_V5=ZK});var jNe=F(bF=>{"use strict";m();Object.defineProperty(bF,"__esModule",{value:!0});bF.RedisInstrumentation=void 0;var Iyt=rn(),FNe=EF(),Cyt=wNe(),byt=QNe(),GNe={requireParentSpan:!1},WK=class extends Iyt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...GNe,...t};super(FNe.PACKAGE_NAME,FNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Cyt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new byt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...GNe,...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())}};bF.RedisInstrumentation=WK});var HNe=F(vF=>{"use strict";m();Object.defineProperty(vF,"__esModule",{value:!0});vF.RedisInstrumentation=void 0;var vyt=jNe();Object.defineProperty(vF,"RedisInstrumentation",{enumerable:!0,get:function(){return vyt.RedisInstrumentation}})});function oO(e,t){return e.includes(t.toLowerCase())}function eJ(e){return oO(XK,e)?"cache.get":oO(xyt,e)?"cache.put":void 0}function Dyt(e,t){return t.some(n=>e.startsWith(n))}function $Ne(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)?zNe(o.map(i=>n(i))):["<unknown>"],r=t[0];return oO(Ryt,e)&&r!=null?n(r):zNe(t.map(o=>n(o)))}catch{return}}function VNe(e,t,n){if(!eJ(e))return!1;for(let r of t)if(Dyt(r,n))return!0;return!1}function qNe(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 zNe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Ryt,XK,xyt,YNe=O(()=>{m();Ryt=["get","set","setex"],XK=["get","mget"],xyt=["set","setex"]});var KNe,JNe,RF,iO,ZNe,Byt,Nyt,WNe,Oyt,XNe,eOe=O(()=>{m();KNe=ie(BNe(),1),JNe=ie(HNe(),1);dt();mr();YNe();RF="Redis",iO={},ZNe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=$Ne(t,n),i=eJ(t);if(!o||!i||!iO.cachePrefixes||!VNe(t,o,iO.cachePrefixes))return;let a=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=qNe(r);d&&e.setAttribute(oV,d),oO(XK,t)&&d!==void 0&&e.setAttribute(nV,d>0),e.setAttributes({[Wt]:i,[rV]:o});let g=o.join(", ");e.updateName(iO.maxCacheKeyLength?d_(g,iO.maxCacheKeyLength):g)},Byt=st(`${RF}.IORedis`,()=>new KNe.IORedisInstrumentation({responseHook:ZNe})),Nyt=st(`${RF}.Redis`,()=>new JNe.RedisInstrumentation({responseHook:ZNe})),WNe=Object.assign(()=>{Byt(),Nyt()},{id:RF}),Oyt=(e={})=>({name:RF,setupOnce(){iO=e,WNe()}}),XNe=Oyt});var tOe=F(xF=>{"use strict";m();Object.defineProperty(xF,"__esModule",{value:!0});xF.EVENT_LISTENERS_SET=void 0;xF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var tJ=F(aO=>{"use strict";m();Object.defineProperty(aO,"__esModule",{value:!0});aO.AttributeNames=void 0;var wyt;(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"})(wyt=aO.AttributeNames||(aO.AttributeNames={}))});var nJ=F(xr=>{"use strict";m();Object.defineProperty(xr,"__esModule",{value:!0});xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=xr.METRIC_DB_CLIENT_CONNECTION_COUNT=xr.DB_SYSTEM_VALUE_POSTGRESQL=xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=xr.ATTR_NET_PEER_PORT=xr.ATTR_NET_PEER_NAME=xr.ATTR_DB_USER=xr.ATTR_DB_SYSTEM=xr.ATTR_DB_STATEMENT=xr.ATTR_DB_NAME=xr.ATTR_DB_CONNECTION_STRING=xr.ATTR_DB_CLIENT_CONNECTION_STATE=xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";xr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";xr.ATTR_DB_CONNECTION_STRING="db.connection_string";xr.ATTR_DB_NAME="db.name";xr.ATTR_DB_STATEMENT="db.statement";xr.ATTR_DB_SYSTEM="db.system";xr.ATTR_DB_USER="db.user";xr.ATTR_NET_PEER_NAME="net.peer.name";xr.ATTR_NET_PEER_PORT="net.peer.port";xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";xr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";xr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var rJ=F(sO=>{"use strict";m();Object.defineProperty(sO,"__esModule",{value:!0});sO.SpanNames=void 0;var kyt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(kyt=sO.SpanNames||(sO.SpanNames={}))});var uOe=F(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.sanitizedErrorMessage=or.isObjectWithTextString=or.getErrorMessage=or.patchClientConnectCallback=or.patchCallbackPGPool=or.updateCounter=or.getPoolName=or.patchCallback=or.handleExecutionResult=or.handleConfigQuery=or.shouldSkipInstrumentation=or.getSemanticAttributesFromPoolConnection=or.getSemanticAttributesFromConnection=or.getConnectionString=or.parseAndMaskConnectionString=or.parseNormalizedOperationName=or.getQuerySpanName=void 0;var Z_=(je(),Me(We)),DF=tJ(),Yd=(Zn(),Me(Ur)),pi=nJ(),Sy=rn(),nOe=rJ();function rOe(e,t){if(!t)return nOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:oOe(t.text);return`${nOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}or.getQuerySpanName=rOe;function oOe(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}or.parseNormalizedOperationName=oOe;function iOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}or.parseAndMaskConnectionString=iOe;function oJ(e){if("connectionString"in e&&e.connectionString)return iOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}or.getConnectionString=oJ;function BF(e){if(Number.isInteger(e))return e}function aOe(e,t){let n={};return t&Sy.SemconvStability.OLD&&(n={...n,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:e.database,[pi.ATTR_DB_CONNECTION_STRING]:oJ(e),[pi.ATTR_DB_USER]:e.user,[pi.ATTR_NET_PEER_NAME]:e.host,[pi.ATTR_NET_PEER_PORT]:BF(e.port)}),t&Sy.SemconvStability.STABLE&&(n={...n,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:e.host,[Yd.ATTR_SERVER_PORT]:BF(e.port)}),n}or.getSemanticAttributesFromConnection=aOe;function Myt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[DF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[DF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&Sy.SemconvStability.OLD&&(r={...r,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[pi.ATTR_DB_CONNECTION_STRING]:oJ(e),[pi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[pi.ATTR_NET_PEER_PORT]:Number(n?.port)||BF(e.port),[pi.ATTR_DB_USER]:n?.username??e.user}),t&Sy.SemconvStability.STABLE&&(r={...r,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Yd.ATTR_SERVER_PORT]:Number(n?.port)||BF(e.port)}),r}or.getSemanticAttributesFromPoolConnection=Myt;function Pyt(e){return e.requireParentSpan===!0&&Z_.trace.getSpan(Z_.context.active())===void 0}or.shouldSkipInstrumentation=Pyt;function Uyt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=rOe(i,r),c=e.startSpan(a,{kind:Z_.SpanKind.CLIENT,attributes:aOe(o,n)});if(!r)return c;if(r.text&&(n&Sy.SemconvStability.OLD&&c.setAttribute(pi.ATTR_DB_STATEMENT,r.text),n&Sy.SemconvStability.STABLE&&c.setAttribute(Yd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(g=>g==null?"null":g instanceof Buffer?g.toString():typeof g=="object"?typeof g.toPostgres=="function"?g.toPostgres():JSON.stringify(g):g.toString());c.setAttribute(DF.AttributeNames.PG_VALUES,d)}catch(d){Z_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(DF.AttributeNames.PG_PLAN,r.name),c}or.handleConfigQuery=Uyt;function sOe(e,t,n){typeof e.responseHook=="function"&&(0,Sy.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&Z_.diag.error("Error running response hook",r)},!0)}or.handleExecutionResult=sOe;function Lyt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Yd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(NF(a)),t.setStatus({code:Z_.SpanStatusCode.ERROR,message:a.message})):sOe(e,t,c),o(),t.end(),n.call(this,a,c)}}or.patchCallback=Lyt;function Qyt(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()}or.getPoolName=Qyt;function Fyt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}or.updateCounter=Fyt;function Gyt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}or.patchCallbackPGPool=Gyt;function jyt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}or.patchClientConnectCallback=jyt;function Hyt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}or.getErrorMessage=Hyt;function zyt(e){return typeof e=="object"&&typeof e?.text=="string"}or.isObjectWithTextString=zyt;function NF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}or.sanitizedErrorMessage=NF});var cOe=F(Lv=>{"use strict";m();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.PACKAGE_NAME=Lv.PACKAGE_VERSION=void 0;Lv.PACKAGE_VERSION="0.66.0";Lv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var mOe=F(wF=>{"use strict";m();Object.defineProperty(wF,"__esModule",{value:!0});wF.PgInstrumentation=void 0;var Hu=rn(),Fr=(je(),Me(We)),lOe=tOe(),Ko=uOe(),dOe=GK(),pOe=cOe(),fOe=rJ(),OF=Tr(),uf=(Zn(),Me(Ur)),uO=nJ();function Qv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var iJ=class extends Hu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(pOe.PACKAGE_NAME,pOe.PACKAGE_VERSION,t),this._semconvStability=(0,Hu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(uf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Fr.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(uO.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(uO.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 Hu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Hu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Hu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Qv(c);return this._patchPgClient(d.Client),c},c=>{let d=Qv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Hu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Qv(c);return(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Qv(c);(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Qv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.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=Qv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchClientConnectCallback(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}recordOperationDuration(t,n){let r={},o=[uf.ATTR_DB_NAMESPACE,uf.ATTR_ERROR_TYPE,uf.ATTR_SERVER_PORT,uf.ATTR_SERVER_ADDRESS,uf.ATTR_DB_OPERATION_NAME];this._semconvStability&Hu.SemconvStability.OLD&&o.push(uO.ATTR_DB_SYSTEM),this._semconvStability&Hu.SemconvStability.STABLE&&o.push(uf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,OF.hrTimeToMilliseconds)((0,OF.hrTimeDuration)(n,(0,OF.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Ko.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,OF.hrTime)(),a=o[0],c=typeof a=="string",d=Ko.isObjectWithTextString(a),g=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={[uO.ATTR_DB_SYSTEM]:uO.DB_SYSTEM_VALUE_POSTGRESQL,[uf.ATTR_DB_NAMESPACE]:this.database,[uf.ATTR_SERVER_PORT]:this.connectionParameters.port,[uf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[uf.ATTR_DB_OPERATION_NAME]=Ko.parseNormalizedOperationName(g?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Ko.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,g);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,dOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,dOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Fr.trace.getSpan(Fr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Ko.patchCallback(y,C,o[o.length-1],h,S),N&&(o[o.length-1]=Fr.context.bind(Fr.context.active(),o[o.length-1]));else if(typeof g?.callback=="function"){let k=Ko.patchCallback(t.getConfig(),C,g.callback,h,S);N&&(k=Fr.context.bind(Fr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,Hu.safeExecuteInTheMiddle)(()=>{let{database:N,host:k,port:Q,user:j}=this.connectionParameters;v(C,{connection:{database:N,host:k,port:Q,user:j},query:{text:g.text,values:g.values,name:g.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let x;try{x=n.apply(this,o)}catch(N){throw N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Fr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(N)}),C.end(),N}return x instanceof Promise?x.then(N=>new Promise(k=>{Ko.handleExecutionResult(t.getConfig(),C,N),S(),C.end(),k(N)})).catch(N=>new Promise((k,Q)=>{N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Fr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[lOe.EVENT_LISTENERS_SET])return;let n=Ko.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[lOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.POOL_CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchCallbackPGPool(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}};wF.PgInstrumentation=iJ;function AOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Fr.context.bind(Fr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Ko.sanitizedErrorMessage(r)),e.setStatus({code:Fr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var gOe=F(Fv=>{"use strict";m();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.AttributeNames=Fv.PgInstrumentation=void 0;var $yt=mOe();Object.defineProperty(Fv,"PgInstrumentation",{enumerable:!0,get:function(){return $yt.PgInstrumentation}});var Vyt=tJ();Object.defineProperty(Fv,"AttributeNames",{enumerable:!0,get:function(){return Vyt.AttributeNames}})});var hOe,_Oe,EOe,qyt,SOe,yOe=O(()=>{m();hOe=ie(gOe(),1);mr();_Oe="Postgres",EOe=st(_Oe,hOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Lr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),qyt=e=>({name:_Oe,setupOnce(){EOe(e)}}),SOe=qyt});var W_,sJ,TOe,Yyt,Kyt,IOe,aJ,Jyt,COe,bOe=O(()=>{m();je();W_=ie(rn(),1);Zn();dt();mr();ly();sJ="PostgresJs",TOe=[">=3.0.0 <4"],Yyt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,Kyt=Symbol.for("sentry.query.from.instrumented.sql"),IOe=st(sJ,e=>new aJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),aJ=class extends W_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new W_.InstrumentationNodeModuleDefinition("postgres",TOe,n=>{try{return this._patchPostgres(n)}catch(r){return Ta&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new W_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,TOe,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 Ta&&J.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 Ta&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return aq(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:(rN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ht.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(VC,r);return}let o=n?.match(Yyt);o?.[1]&&t.setAttribute(VC,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[Kyt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Za({name:a||"postgresjs.query",op:"db"},c=>{Lr(c,"auto.db.postgresjs"),c.setAttributes({[DS]:"postgres",[_5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,W_.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),Ta&&J.error(`Error in requestHook for ${sJ} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,C,v)=>{try{n._setOperationName(c,a,v?.[0]?.command),c.end()}catch(x){Ta&&J.error("Error ending span in resolve callback:",x)}return Reflect.apply(y,C,v)}});let S=this.reject;this.reject=new Proxy(S,{apply:(y,C,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(E5,v?.[0]?.code||"unknown"),c.setAttribute(S5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){Ta&&J.error("Error ending span in reject callback:",x)}return Reflect.apply(y,C,v)}});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}},Jyt=e=>({name:sJ,setupOnce(){IOe(e)}}),COe=Jyt});var vOe=F(cO=>{"use strict";m();Object.defineProperty(cO,"__esModule",{value:!0});cO.SeverityNumber=void 0;var Zyt;(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"})(Zyt=cO.SeverityNumber||(cO.SeverityNumber={}))});var MF=F(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.NOOP_LOGGER=Gv.NoopLogger=void 0;var kF=class{emit(t){}};Gv.NoopLogger=kF;Gv.NOOP_LOGGER=new kF});var UF=F(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.NOOP_LOGGER_PROVIDER=jv.NoopLoggerProvider=void 0;var Wyt=MF(),PF=class{getLogger(t,n,r){return new Wyt.NoopLogger}};jv.NoopLoggerProvider=PF;jv.NOOP_LOGGER_PROVIDER=new PF});var cJ=F(LF=>{"use strict";m();Object.defineProperty(LF,"__esModule",{value:!0});LF.ProxyLogger=void 0;var Xyt=MF(),uJ=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):Xyt.NOOP_LOGGER}};LF.ProxyLogger=uJ});var dJ=F(QF=>{"use strict";m();Object.defineProperty(QF,"__esModule",{value:!0});QF.ProxyLoggerProvider=void 0;var eTt=UF(),tTt=cJ(),lJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new tTt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:eTt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};QF.ProxyLoggerProvider=lJ});var ROe=F(FF=>{"use strict";m();Object.defineProperty(FF,"__esModule",{value:!0});FF._globalThis=void 0;FF._globalThis=typeof globalThis=="object"?globalThis:global});var xOe=F(GF=>{"use strict";m();Object.defineProperty(GF,"__esModule",{value:!0});GF._globalThis=void 0;var nTt=ROe();Object.defineProperty(GF,"_globalThis",{enumerable:!0,get:function(){return nTt._globalThis}})});var DOe=F(jF=>{"use strict";m();Object.defineProperty(jF,"__esModule",{value:!0});jF._globalThis=void 0;var rTt=xOe();Object.defineProperty(jF,"_globalThis",{enumerable:!0,get:function(){return rTt._globalThis}})});var BOe=F(kA=>{"use strict";m();Object.defineProperty(kA,"__esModule",{value:!0});kA.API_BACKWARDS_COMPATIBILITY_VERSION=kA.makeGetter=kA._global=kA.GLOBAL_LOGS_API_KEY=void 0;var oTt=DOe();kA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");kA._global=oTt._globalThis;function iTt(e,t,n){return r=>r===e?t:n}kA.makeGetter=iTt;kA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var OOe=F(HF=>{"use strict";m();Object.defineProperty(HF,"__esModule",{value:!0});HF.LogsAPI=void 0;var Kd=BOe(),aTt=UF(),NOe=dJ(),pJ=class e{constructor(){this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Kd._global[Kd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Kd._global[Kd.GLOBAL_LOGS_API_KEY]=(0,Kd.makeGetter)(Kd.API_BACKWARDS_COMPATIBILITY_VERSION,t,aTt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Kd._global[Kd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Kd._global,Kd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Kd._global[Kd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}};HF.LogsAPI=pJ});var fJ=F(ns=>{"use strict";m();Object.defineProperty(ns,"__esModule",{value:!0});ns.logs=ns.ProxyLoggerProvider=ns.ProxyLogger=ns.NoopLoggerProvider=ns.NOOP_LOGGER_PROVIDER=ns.NoopLogger=ns.NOOP_LOGGER=ns.SeverityNumber=void 0;var sTt=vOe();Object.defineProperty(ns,"SeverityNumber",{enumerable:!0,get:function(){return sTt.SeverityNumber}});var wOe=MF();Object.defineProperty(ns,"NOOP_LOGGER",{enumerable:!0,get:function(){return wOe.NOOP_LOGGER}});Object.defineProperty(ns,"NoopLogger",{enumerable:!0,get:function(){return wOe.NoopLogger}});var kOe=UF();Object.defineProperty(ns,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return kOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ns,"NoopLoggerProvider",{enumerable:!0,get:function(){return kOe.NoopLoggerProvider}});var uTt=cJ();Object.defineProperty(ns,"ProxyLogger",{enumerable:!0,get:function(){return uTt.ProxyLogger}});var cTt=dJ();Object.defineProperty(ns,"ProxyLoggerProvider",{enumerable:!0,get:function(){return cTt.ProxyLoggerProvider}});var lTt=OOe();ns.logs=lTt.LogsAPI.getInstance()});var MOe=F(Hv=>{"use strict";m();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.disableInstrumentations=Hv.enableInstrumentations=void 0;function dTt(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()}}Hv.enableInstrumentations=dTt;function pTt(e){e.forEach(t=>t.disable())}Hv.disableInstrumentations=pTt});var LOe=F(zF=>{"use strict";m();Object.defineProperty(zF,"__esModule",{value:!0});zF.registerInstrumentations=void 0;var POe=(je(),Me(We)),fTt=fJ(),UOe=MOe();function ATt(e){let t=e.tracerProvider||POe.trace.getTracerProvider(),n=e.meterProvider||POe.metrics.getMeterProvider(),r=e.loggerProvider||fTt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,UOe.enableInstrumentations)(o,t,n,r),()=>{(0,UOe.disableInstrumentations)(o)}}zF.registerInstrumentations=ATt});var qOe=F($F=>{"use strict";m();Object.defineProperty($F,"__esModule",{value:!0});$F.satisfies=void 0;var hJ=(je(),Me(We)),HOe=/^(?: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-]+)*))?$/,mTt=/^(?<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-]+)*))?$/,gTt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function hTt(e,t,n){if(!_Tt(e))return hJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=TTt(e);if(!r)return!1;let o=[],i=zOe(r,t,o,n);return i&&!n?.includePrerelease?STt(r,o):i}$F.satisfies=hTt;function _Tt(e){return typeof e=="string"&&HOe.test(e)}function zOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(AJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=HTt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!AJ(e,i,n,r))return!1;return!0}return AJ(e,t,n,r)}function AJ(e,t,n,r){if(t=yTt(t,r),t.includes(" "))return zOe(e,t,n,r);{let o=ITt(t);return n.push(o),ETt(e,o)}}function ETt(e,t){if(t.invalid)return!1;if(!t.version||gJ(t.version))return!0;let n=FOe(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=FOe(r,o)}return gTt[t.op]?.includes(n)}function STt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function yTt(e,t){return e=e.trim(),e=GTt(e,t),e=FTt(e),e=jTt(e,t),e=e.trim(),e}function zu(e){return!e||e.toLowerCase()==="x"||e==="*"}function TTt(e){let t=e.match(HOe);if(!t){hJ.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 ITt(e){if(!e)return{};let t=e.match(mTt);if(!t)return hJ.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 gJ(e){return e==="*"||e==="x"||e==="X"}function QOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function CTt(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 bTt(e,t){if(gJ(e)||gJ(t))return 0;let[n,r]=CTt(QOe(e),QOe(t));return n>r?1:n<r?-1:0}function FOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=bTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $Oe="[a-zA-Z0-9-]",VOe="0|[1-9]\\d*",vTt=`\\d*[a-zA-Z-]${$Oe}*`,RTt="((?:<|>)?=?)",GOe=`(?:${VOe}|${vTt})`,xTt=`(?:-(${GOe}(?:\\.${GOe})*))`,jOe=`${$Oe}+`,DTt=`(?:\\+(${jOe}(?:\\.${jOe})*))`,mJ=`${VOe}|x|X|\\*`,lO=`[v=\\s]*(${mJ})(?:\\.(${mJ})(?:\\.(${mJ})(?:${xTt})?${DTt}?)?)?`,BTt=`^${RTt}\\s*${lO}$`,NTt=new RegExp(BTt),OTt=`^\\s*(${lO})\\s+-\\s+(${lO})\\s*$`,wTt=new RegExp(OTt),kTt="(?:~>?)",MTt=`^${kTt}${lO}$`,PTt=new RegExp(MTt),UTt="(?:\\^)",LTt=`^${UTt}${lO}$`,QTt=new RegExp(LTt);function FTt(e){let t=PTt;return e.replace(t,(n,r,o,i,a)=>{let c;return zu(r)?c="":zu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:zu(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 GTt(e,t){let n=QTt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return zu(i)?g="":zu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:zu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function jTt(e,t){let n=NTt;return e.replace(n,(r,o,i,a,c,d)=>{let g=zu(i),h=g||zu(a),S=h||zu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?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 HTt(e,t){let n=wTt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(zu(i)?o="":zu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:zu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,zu(S)?h="":zu(y)?h=`<${+S+1}.0.0-0`:zu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var _J=F(Os=>{"use strict";m();Object.defineProperty(Os,"__esModule",{value:!0});Os.massUnwrap=Os.unwrap=Os.massWrap=Os.wrap=void 0;var $u=console.error.bind(console);function dO(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 zTt=(e,t,n)=>{if(!e||!e[t]){$u("no original function "+String(t)+" to wrap");return}if(!n){$u("no wrapper function"),$u(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){$u("original object and wrapper must be functions");return}let o=n(r,t);return dO(o,"__original",r),dO(o,"__unwrap",()=>{e[t]===o&&dO(e,t,r)}),dO(o,"__wrapped",!0),dO(e,t,o),o};Os.wrap=zTt;var $Tt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Os.wrap)(r,o,n)})})};Os.massWrap=$Tt;var VTt=(e,t)=>{if(!e||!e[t]){$u("no function to unwrap."),$u(new Error().stack);return}let n=e[t];if(!n.__unwrap)$u("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Os.unwrap=VTt;var qTt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Os.unwrap)(n,r)})})};Os.massUnwrap=qTt;function pO(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Os.default=pO;pO.wrap=Os.wrap;pO.massWrap=Os.massWrap;pO.unwrap=Os.unwrap;pO.massUnwrap=Os.massUnwrap});var YOe=F(qF=>{"use strict";m();Object.defineProperty(qF,"__esModule",{value:!0});qF.InstrumentationAbstract=void 0;var EJ=(je(),Me(We)),YTt=fJ(),VF=_J(),SJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=EJ.diag.createComponentLogger({namespace:t}),this._tracer=EJ.trace.getTracer(t,n),this._meter=EJ.metrics.getMeter(t,n),this._logger=YTt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=VF.wrap;_unwrap=VF.unwrap;_massWrap=VF.massWrap;_massUnwrap=VF.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)}}};qF.InstrumentationAbstract=SJ});var KOe=F(X_=>{"use strict";m();Object.defineProperty(X_,"__esModule",{value:!0});X_.ModuleNameTrie=X_.ModuleNameSeparator=void 0;X_.ModuleNameSeparator="/";var YF=class{hooks=[];children=new Map},yJ=class{_trie=new YF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(X_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new YF,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(X_.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))}};X_.ModuleNameTrie=yJ});var ZOe=F(KF=>{"use strict";m();Object.defineProperty(KF,"__esModule",{value:!0});KF.RequireInTheMiddleSingleton=void 0;var KTt=MS(),JOe=Ge("path"),TJ=KOe(),JTt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),IJ=class e{_moduleNameTrie=new TJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new KTt.Hook(null,{internals:!0},(t,n,r)=>{let o=ZTt(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 JTt?new e:this._instance=this._instance??new e}};KF.RequireInTheMiddleSingleton=IJ;function ZTt(e){return JOe.sep!==TJ.ModuleNameSeparator?e.split(JOe.sep).join(TJ.ModuleNameSeparator):e}});var CJ=F(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.isWrapped=eE.safeExecuteInTheMiddleAsync=eE.safeExecuteInTheMiddle=void 0;function WTt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}eE.safeExecuteInTheMiddle=WTt;async function XTt(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}}eE.safeExecuteInTheMiddleAsync=XTt;function eIt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}eE.isWrapped=eIt});var ewe=F(JF=>{"use strict";m();Object.defineProperty(JF,"__esModule",{value:!0});JF.InstrumentationBase=void 0;var fO=Ge("path"),WOe=Ge("util"),tIt=qOe(),bJ=_J(),nIt=YOe(),rIt=ZOe(),oIt=iK(),AO=(je(),Me(We)),iIt=MS(),aIt=Ge("fs"),sIt=CJ(),vJ=class extends nIt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=rIt.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,sIt.isWrapped)(t[n])&&this._unwrap(t,n),WOe.types.isProxy(t)){let o=(0,bJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,bJ.wrap)(t,n,r)};_unwrap=(t,n)=>WOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,bJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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=Ge.resolve(n);Ge.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,aIt.readFileSync)(fO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{AO.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 XOe(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=fO.normalize(r);return a.filter(g=>g.name===c).filter(g=>XOe(g.supportedVersions,i,t.includePrerelease)).reduce((g,h)=>(h.moduleExports=g,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(g,t.moduleVersion)):g),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&&fO.isAbsolute(c)){let g=fO.parse(c);c=g.name,d=g.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=fO.isAbsolute(t.name)?new iIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new oIt.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}};JF.InstrumentationBase=vJ;function XOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,tIt.satisfies)(t,r,{includePrerelease:n}))}});var twe=F(ZF=>{"use strict";m();Object.defineProperty(ZF,"__esModule",{value:!0});ZF.normalize=void 0;var uIt=Ge("path");Object.defineProperty(ZF,"normalize",{enumerable:!0,get:function(){return uIt.normalize}})});var nwe=F(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.normalize=zv.InstrumentationBase=void 0;var cIt=ewe();Object.defineProperty(zv,"InstrumentationBase",{enumerable:!0,get:function(){return cIt.InstrumentationBase}});var lIt=twe();Object.defineProperty(zv,"normalize",{enumerable:!0,get:function(){return lIt.normalize}})});var RJ=F($v=>{"use strict";m();Object.defineProperty($v,"__esModule",{value:!0});$v.normalize=$v.InstrumentationBase=void 0;var rwe=nwe();Object.defineProperty($v,"InstrumentationBase",{enumerable:!0,get:function(){return rwe.InstrumentationBase}});Object.defineProperty($v,"normalize",{enumerable:!0,get:function(){return rwe.normalize}})});var owe=F(WF=>{"use strict";m();Object.defineProperty(WF,"__esModule",{value:!0});WF.InstrumentationNodeModuleDefinition=void 0;var xJ=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||[]}};WF.InstrumentationNodeModuleDefinition=xJ});var iwe=F(XF=>{"use strict";m();Object.defineProperty(XF,"__esModule",{value:!0});XF.InstrumentationNodeModuleFile=void 0;var dIt=RJ(),DJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,dIt.normalize)(t)}};XF.InstrumentationNodeModuleFile=DJ});var awe=F(yy=>{"use strict";m();Object.defineProperty(yy,"__esModule",{value:!0});yy.semconvStabilityFromStr=yy.SemconvStability=void 0;var e3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(e3=yy.SemconvStability||(yy.SemconvStability={}));function pIt(e,t){let n=e3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=e3.DUPLICATE;break}else o.toLowerCase()===e&&(n=e3.STABLE);return n}yy.semconvStabilityFromStr=pIt});var uwe=F(na=>{"use strict";m();Object.defineProperty(na,"__esModule",{value:!0});na.semconvStabilityFromStr=na.SemconvStability=na.safeExecuteInTheMiddleAsync=na.safeExecuteInTheMiddle=na.isWrapped=na.InstrumentationNodeModuleFile=na.InstrumentationNodeModuleDefinition=na.InstrumentationBase=na.registerInstrumentations=void 0;var fIt=LOe();Object.defineProperty(na,"registerInstrumentations",{enumerable:!0,get:function(){return fIt.registerInstrumentations}});var AIt=RJ();Object.defineProperty(na,"InstrumentationBase",{enumerable:!0,get:function(){return AIt.InstrumentationBase}});var mIt=owe();Object.defineProperty(na,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return mIt.InstrumentationNodeModuleDefinition}});var gIt=iwe();Object.defineProperty(na,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return gIt.InstrumentationNodeModuleFile}});var BJ=CJ();Object.defineProperty(na,"isWrapped",{enumerable:!0,get:function(){return BJ.isWrapped}});Object.defineProperty(na,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddle}});Object.defineProperty(na,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddleAsync}});var swe=awe();Object.defineProperty(na,"SemconvStability",{enumerable:!0,get:function(){return swe.SemconvStability}});Object.defineProperty(na,"semconvStabilityFromStr",{enumerable:!0,get:function(){return swe.semconvStabilityFromStr}})});function EIt(){let e=Vv[OJ];return e?.helper?e.helper:Vv[NJ]?.helper}function SIt(e){let t={helper:e};Vv[OJ]=t,Vv[NJ]=t}function yIt(){delete Vv[OJ],delete Vv[NJ]}function CIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}function dwe(e,t,n,r,o){if(pwe(t.name,o))return;let i={attributes:t.attributes,kind:CIt(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 g=r.get(d);return g?{context:{spanId:g,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)dwe(e,d,n,r,o);a.end(t.endTime)})}function cwe(e,t){return vIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function vIt(e){return e!=null&&typeof e.then=="function"}function pwe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var t3,hIt,_It,NJ,OJ,Vv,TIt,IIt,bIt,fwe,lwe,RIt,xIt,Awe,mwe=O(()=>{m();je();t3=ie(uwe(),1);je();hIt={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"}},_It=hIt.version.split(".")[0],NJ="PRISMA_INSTRUMENTATION",OJ=`V${_It}_PRISMA_INSTRUMENTATION`,Vv=globalThis;TIt=process.env.PRISMA_SHOW_ALL_TRACES==="true",IIt="00-10-10-00";bIt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ht.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:IIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)dwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!TIt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(pwe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return cwe(i,t(i,r))}return n.startActiveSpan(o,e,i=>cwe(i,t(i,r)))}};fwe={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},lwe=fwe.version,RIt=fwe.name,xIt="@prisma/client",Awe=class extends t3.InstrumentationBase{tracerProvider;constructor(e={}){super(RIt,lwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new t3.InstrumentationNodeModuleDefinition(xIt,[lwe])]}enable(){let e=this._config;SIt(new bIt({tracerProvider:this.tracerProvider??Ht.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){yIt()}isEnabled(){return EIt()!==void 0}}});function DIt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function hwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function BIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}var gwe,wJ,NIt,_we,Ewe=O(()=>{m();je();mwe();dt();mr();gwe="Prisma";wJ=class extends Awe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=hwe();DIt(t)&&(t.createEngineSpan=n=>{let r=Ht.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Vo(()=>{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=BIt(i.kind),c=i.parent_span_id,d=i.span_id,g=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:Ks.SAMPLED}})),S=Ht.setSpanContext(Ke.active(),{traceId:g,spanId:c,traceFlags:Ks.SAMPLED});Ke.with(S,()=>{let y={generateTraceId:()=>g,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}})}};NIt=st(gwe,e=>new wJ(e)),_we=e=>({name:gwe,setupOnce(){NIt(e)},setup(t){hwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(kt,"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 Swe=F(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.PACKAGE_NAME=qv.PACKAGE_VERSION=void 0;qv.PACKAGE_VERSION="0.60.0";qv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var kJ=F(MA=>{"use strict";m();Object.defineProperty(MA,"__esModule",{value:!0});MA.HapiLifecycleMethodNames=MA.HapiLayerType=MA.handlerPatched=MA.HapiComponentName=void 0;MA.HapiComponentName="@hapi/hapi";MA.handlerPatched=Symbol("hapi-handler-patched");MA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};MA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var ywe=F(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.ATTR_HTTP_METHOD=void 0;n3.ATTR_HTTP_METHOD="http.method"});var MJ=F(mO=>{"use strict";m();Object.defineProperty(mO,"__esModule",{value:!0});mO.AttributeNames=void 0;var OIt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(OIt=mO.AttributeNames||(mO.AttributeNames={}))});var Cwe=F(ra=>{"use strict";m();Object.defineProperty(ra,"__esModule",{value:!0});ra.getPluginFromInput=ra.getExtMetadata=ra.getRouteMetadata=ra.isPatchableExtMethod=ra.isDirectExtInput=ra.isLifecycleExtEventObj=ra.isLifecycleExtType=ra.getPluginName=void 0;var Twe=(Zn(),Me(Ur)),wIt=ywe(),gO=kJ(),tE=MJ(),Iwe=rn();function kIt(e){return e.name?e.name:e.pkg.name}ra.getPluginName=kIt;var MIt=e=>typeof e=="string"&&gO.HapiLifecycleMethodNames.has(e);ra.isLifecycleExtType=MIt;var PIt=e=>{let t=e?.type;return t!==void 0&&(0,ra.isLifecycleExtType)(t)};ra.isLifecycleExtEventObj=PIt;var UIt=e=>Array.isArray(e)&&e.length<=3&&(0,ra.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ra.isDirectExtInput=UIt;var LIt=e=>!Array.isArray(e);ra.isPatchableExtMethod=LIt;var QIt=(e,t,n)=>{let r={[Twe.ATTR_HTTP_ROUTE]:e.path};t&Iwe.SemconvStability.OLD&&(r[wIt.ATTR_HTTP_METHOD]=e.method),t&Iwe.SemconvStability.STABLE&&(r[Twe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.PLUGIN,r[tE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ra.getRouteMetadata=QIt;var FIt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT,[tE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT},name:r}};ra.getExtMetadata=FIt;var GIt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ra.getPluginFromInput=GIt});var Rwe=F(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.HapiInstrumentation=void 0;var Ql=(je(),Me(We)),bwe=Tr(),hO=rn(),vwe=Swe(),_O=kJ(),Dg=Cwe(),PJ=class extends hO.InstrumentationBase{_semconvStability;constructor(t={}){super(vwe.PACKAGE_NAME,vwe.PACKAGE_VERSION,t),this._semconvStability=(0,hO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new hO.InstrumentationNodeModuleDefinition(_O.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,hO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,hO.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,Dg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Dg.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,Dg.isLifecycleExtType)(d.type)){let g=d,h=r._wrapExtMethods(g.method,d.type,n);g.method=h,a[c]=g}}return t.apply(this,i)}else if((0,Dg.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,Dg.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,Dg.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",g=>n._getServerRoutePatch.bind(n)(g,r)),i._wrap(c,"ext",g=>n._getServerExtPatch.bind(n)(g,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,Dg.isPatchableExtMethod)(t))return t[_O.handlerPatched]===!0?t:(t[_O.handlerPatched]=!0,async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await t.apply(this,a);let c=(0,Dg.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),d),t,void 0,...a)}catch(g){throw d.recordException(g),d.setStatus({code:Ql.SpanStatusCode.ERROR,message:g.message}),g}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[_O.handlerPatched]===!0)return t;t[_O.handlerPatched]=!0;let o=i=>async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await i.call(this,...a);let c=(0,bwe.getRPCMetadata)(Ql.context.active());c?.type===bwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Dg.getRouteMetadata)(t,r._semconvStability,n),g=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),g),()=>i.call(this,...a))}catch(h){throw g.recordException(h),g.setStatus({code:Ql.SpanStatusCode.ERROR,message:h.message}),h}finally{g.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}};r3.HapiInstrumentation=PJ});var xwe=F(Yv=>{"use strict";m();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.AttributeNames=Yv.HapiInstrumentation=void 0;var jIt=Rwe();Object.defineProperty(Yv,"HapiInstrumentation",{enumerable:!0,get:function(){return jIt.HapiInstrumentation}});var HIt=MJ();Object.defineProperty(Yv,"AttributeNames",{enumerable:!0,get:function(){return HIt.AttributeNames}})});var Dwe,Bwe,Nwe,zIt,Owe,wwe=O(()=>{m();Dwe=ie(xwe(),1);mr();Bwe="Hapi",Nwe=st(Bwe,()=>new Dwe.HapiInstrumentation),zIt=()=>({name:Bwe,setupOnce(){Nwe()}}),Owe=zIt});var nE,EO,UJ=O(()=>{m();nE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},EO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var i3,$It,VIt,o3,kwe=O(()=>{m();je();i3=ie(rn(),1);dt();UJ();$It="@sentry/instrumentation-hono",VIt="0.0.1",o3=class extends i3.InstrumentationBase{constructor(t={}){super($It,VIt,t)}init(){return[new i3.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 Ke.with(Ht.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(Is(c))return c.then(d=>{let g=n._determineHandlerType(d);return a.setAttributes({[nE.HONO_TYPE]:g,[nE.HONO_NAME]:g===EO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[nE.HONO_TYPE]:d,[nE.HONO_NAME]:d===EO.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 Is(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?EO.MIDDLEWARE:EO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ui.ERROR,message:n.message}),t.recordException(n))}}});function qIt(e){let t=Ot(e).data,n=t[nE.HONO_TYPE];if(t[Wt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Wt]:`${n}.hono`});let r=t[nE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ng],i=t[BS];typeof o=="string"&&typeof i=="string"&&Cn().setTransactionName(`${i} ${o}`)}var Mwe,Pwe,YIt,Uwe,Lwe=O(()=>{m();Zn();dt();mr();ly();UJ();kwe();Mwe="Hono";Pwe=st(Mwe,()=>new o3({responseHook:e=>{qIt(e)}})),YIt=()=>({name:Mwe,setupOnce(){Pwe()}}),Uwe=YIt});var a3=F(SO=>{"use strict";m();Object.defineProperty(SO,"__esModule",{value:!0});SO.KoaLayerType=void 0;var KIt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(KIt=SO.KoaLayerType||(SO.KoaLayerType={}))});var Qwe=F(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.PACKAGE_NAME=Kv.PACKAGE_VERSION=void 0;Kv.PACKAGE_VERSION="0.62.0";Kv.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var LJ=F(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var JIt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(JIt=yO.AttributeNames||(yO.AttributeNames={}))});var Gwe=F(Jv=>{"use strict";m();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.isLayerIgnored=Jv.getMiddlewareMetadata=void 0;var Fwe=a3(),s3=LJ(),ZIt=(Zn(),Me(Ur)),WIt=(e,t,n,r)=>n?{attributes:{[s3.AttributeNames.KOA_NAME]:r?.toString(),[s3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.ROUTER,[ZIt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[s3.AttributeNames.KOA_NAME]:t.name??"middleware",[s3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Jv.getMiddlewareMetadata=WIt;var XIt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Jv.isLayerIgnored=XIt});var jwe=F(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.kLayerPatched=void 0;u3.kLayerPatched=Symbol("koa-layer-patched")});var Ywe=F(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3.KoaInstrumentation=void 0;var PA=(je(),Me(We)),TO=rn(),Hwe=a3(),zwe=Qwe(),$we=Gwe(),Vwe=Tr(),qwe=jwe(),QJ=class extends TO.InstrumentationBase{constructor(t={}){super(zwe.PACKAGE_NAME,zwe.PACKAGE_VERSION,t)}init(){return new TO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,TO.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,TO.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?Hwe.KoaLayerType.ROUTER:Hwe.KoaLayerType.MIDDLEWARE;return t[qwe.kLayerPatched]===!0||(0,$we.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(PA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[qwe.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,$we.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,Vwe.getRPCMetadata)(PA.context.active());h?.type===Vwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,TO.safeExecuteInTheMiddle)(()=>S(g,{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(),g);return PA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};c3.KoaInstrumentation=QJ});var Kwe=F(rE=>{"use strict";m();Object.defineProperty(rE,"__esModule",{value:!0});rE.KoaLayerType=rE.AttributeNames=rE.KoaInstrumentation=void 0;var eCt=Ywe();Object.defineProperty(rE,"KoaInstrumentation",{enumerable:!0,get:function(){return eCt.KoaInstrumentation}});var tCt=LJ();Object.defineProperty(rE,"AttributeNames",{enumerable:!0,get:function(){return tCt.AttributeNames}});var nCt=a3();Object.defineProperty(rE,"KoaLayerType",{enumerable:!0,get:function(){return nCt.KoaLayerType}})});var Jwe,Zwe,Wwe,rCt,Xwe,eke=O(()=>{m();Jwe=ie(Kwe(),1);Zn();dt();mr();ly();Zwe="Koa",Wwe=st(Zwe,Jwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Lr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Wt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ng],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Cn().setTransactionName(`${c} ${a}`)}})),rCt=(e={})=>({name:Zwe,setupOnce(){Wwe(e)}}),Xwe=rCt});var FJ=F(cf=>{"use strict";m();Object.defineProperty(cf,"__esModule",{value:!0});cf.ConnectNames=cf.ConnectTypes=cf.AttributeNames=void 0;var oCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(oCt=cf.AttributeNames||(cf.AttributeNames={}));var iCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(iCt=cf.ConnectTypes||(cf.ConnectTypes={}));var aCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(aCt=cf.ConnectNames||(cf.ConnectNames={}))});var tke=F(Zv=>{"use strict";m();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.PACKAGE_NAME=Zv.PACKAGE_VERSION=void 0;Zv.PACKAGE_VERSION="0.57.0";Zv.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var nke=F(l3=>{"use strict";m();Object.defineProperty(l3,"__esModule",{value:!0});l3._LAYERS_STORE_PROPERTY=void 0;l3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var rke=F(iE=>{"use strict";m();Object.defineProperty(iE,"__esModule",{value:!0});iE.generateRoute=iE.replaceCurrentStackRoute=iE.addNewStackLayer=void 0;var sCt=(je(),Me(We)),oE=nke(),uCt=e=>{Array.isArray(e[oE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,oE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[oE._LAYERS_STORE_PROPERTY].push("/");let t=e[oE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[oE._LAYERS_STORE_PROPERTY].length?e[oE._LAYERS_STORE_PROPERTY].pop():sCt.diag.warn("Connect: Trying to pop the stack multiple time")}};iE.addNewStackLayer=uCt;var cCt=(e,t)=>{t&&e[oE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};iE.replaceCurrentStackRoute=cCt;var lCt=e=>e[oE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);iE.generateRoute=lCt});var ake=F(aE=>{"use strict";m();Object.defineProperty(aE,"__esModule",{value:!0});aE.ConnectInstrumentation=aE.ANONYMOUS_NAME=void 0;var dCt=(je(),Me(We)),oke=Tr(),Wv=FJ(),ike=tke(),d3=rn(),pCt=(Zn(),Me(Ur)),GJ=rke();aE.ANONYMOUS_NAME="anonymous";var jJ=class extends d3.InstrumentationBase{constructor(t={}){super(ike.PACKAGE_NAME,ike.PACKAGE_VERSION,t)}init(){return[new d3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,d3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,d3.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=Wv.ConnectTypes.REQUEST_HANDLER,i=Wv.ConnectNames.REQUEST_HANDLER,o=t):(r=Wv.ConnectTypes.MIDDLEWARE,i=Wv.ConnectNames.MIDDLEWARE,o=n.name||aE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[pCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Wv.AttributeNames.CONNECT_TYPE]:r,[Wv.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],g=arguments[a],h=arguments[c],S=arguments[d];(0,GJ.replaceCurrentStackRoute)(g,t);let y=(0,oke.getRPCMetadata)(dCt.context.active());t&&y?.type===oke.RPCType.HTTP&&(y.route=(0,GJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||aE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",C);let x=!1;function N(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.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,GJ.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)}}};aE.ConnectInstrumentation=jJ});var uke=F(Jd=>{"use strict";m();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.ConnectTypes=Jd.ConnectNames=Jd.AttributeNames=Jd.ANONYMOUS_NAME=Jd.ConnectInstrumentation=void 0;var ske=ake();Object.defineProperty(Jd,"ConnectInstrumentation",{enumerable:!0,get:function(){return ske.ConnectInstrumentation}});Object.defineProperty(Jd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return ske.ANONYMOUS_NAME}});var HJ=FJ();Object.defineProperty(Jd,"AttributeNames",{enumerable:!0,get:function(){return HJ.AttributeNames}});Object.defineProperty(Jd,"ConnectNames",{enumerable:!0,get:function(){return HJ.ConnectNames}});Object.defineProperty(Jd,"ConnectTypes",{enumerable:!0,get:function(){return HJ.ConnectTypes}})});var cke,lke,dke,fCt,pke,fke=O(()=>{m();cke=ie(uke(),1);mr();lke="Connect",dke=st(lke,()=>new cke.ConnectInstrumentation),fCt=()=>({name:lke,setupOnce(){dke()}}),pke=fCt});var Ake=F(rs=>{"use strict";m();Object.defineProperty(rs,"__esModule",{value:!0});rs.DB_SYSTEM_VALUE_MSSQL=rs.ATTR_NET_PEER_PORT=rs.ATTR_NET_PEER_NAME=rs.ATTR_DB_USER=rs.ATTR_DB_SYSTEM=rs.ATTR_DB_STATEMENT=rs.ATTR_DB_SQL_TABLE=rs.ATTR_DB_NAME=void 0;rs.ATTR_DB_NAME="db.name";rs.ATTR_DB_SQL_TABLE="db.sql.table";rs.ATTR_DB_STATEMENT="db.statement";rs.ATTR_DB_SYSTEM="db.system";rs.ATTR_DB_USER="db.user";rs.ATTR_NET_PEER_NAME="net.peer.name";rs.ATTR_NET_PEER_PORT="net.peer.port";rs.DB_SYSTEM_VALUE_MSSQL="mssql"});var mke=F(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.once=Xv.getSpanName=void 0;function ACt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Xv.getSpanName=ACt;var mCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Xv.once=mCt});var gke=F(eR=>{"use strict";m();Object.defineProperty(eR,"__esModule",{value:!0});eR.PACKAGE_NAME=eR.PACKAGE_VERSION=void 0;eR.PACKAGE_VERSION="0.33.0";eR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var yke=F(uE=>{"use strict";m();Object.defineProperty(uE,"__esModule",{value:!0});uE.TediousInstrumentation=uE.INJECTED_CTX=void 0;var tR=(je(),Me(We)),gCt=Ge("events"),UA=rn(),Ty=(Zn(),Me(Ur)),sE=Ake(),hke=mke(),_ke=gke(),Ske=Symbol("opentelemetry.instrumentation-tedious.current-database");uE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Eke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function p3(e){Object.defineProperty(this,Ske,{value:e,writable:!0})}var zJ=class e extends UA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(_ke.PACKAGE_NAME,_ke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,UA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,UA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new UA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Eke)(0,UA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,UA.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 Eke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return p3.call(this,this.config?.options?.database),this.removeListener("databaseChange",p3),this.on("databaseChange",p3),this.once("end",()=>{this.removeListener("databaseChange",p3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||tR.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,uE.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?.[uE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof gCt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,g=()=>d++,h=()=>c++,S=this[Ske],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_DB_SYSTEM]=sE.DB_SYSTEM_VALUE_MSSQL,C[sE.ATTR_DB_NAME]=S,C[sE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[sE.ATTR_DB_STATEMENT]=y,C[sE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&UA.SemconvStability.STABLE&&(C[Ty.ATTR_DB_NAMESPACE]=S,C[Ty.ATTR_DB_SYSTEM_NAME]=Ty.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[Ty.ATTR_DB_QUERY_TEXT]=y,C[Ty.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_NET_PEER_NAME]=this.config?.server,C[sE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&UA.SemconvStability.STABLE&&(C[Ty.ATTR_SERVER_ADDRESS]=this.config?.server,C[Ty.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,hke.getSpanName)(t,S,y,a.table),{kind:tR.SpanKind.CLIENT,attributes:C}),x=(0,hke.once)(G=>{a.removeListener("done",g),a.removeListener("doneInProc",g),a.removeListener("doneProc",h),a.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",d),G&&v.setStatus({code:tR.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",g),a.on("doneInProc",g),a.on("doneProc",h),a.once("error",x),this.on("end",x),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let N=()=>tR.context.with(tR.trace.setSpan(tR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).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)}}};uE.TediousInstrumentation=zJ});var Tke=F(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.TediousInstrumentation=void 0;var hCt=yke();Object.defineProperty(f3,"TediousInstrumentation",{enumerable:!0,get:function(){return hCt.TediousInstrumentation}})});var Ike,_Ct,Cke,bke,ECt,vke,Rke=O(()=>{m();Ike=ie(Tke(),1);dt();mr();_Ct=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Cke="Tedious",bke=st(Cke,()=>new Ike.TediousInstrumentation({})),ECt=()=>{let e;return{name:Cke,setupOnce(){let t=bke();e=iN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";_Ct.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},vke=ECt});var xke=F(nR=>{"use strict";m();Object.defineProperty(nR,"__esModule",{value:!0});nR.PACKAGE_NAME=nR.PACKAGE_VERSION=void 0;nR.PACKAGE_VERSION="0.57.0";nR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Bke=F(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.GenericPoolInstrumentation=void 0;var rR=(je(),Me(We)),Iy=rn(),Dke=xke(),$J="generic-pool",VJ=class extends Iy.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(Dke.PACKAGE_NAME,Dke.PACKAGE_VERSION,t)}init(){return[new Iy.InstrumentationNodeModuleDefinition($J,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,Iy.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 Iy.InstrumentationNodeModuleDefinition($J,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,Iy.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 Iy.InstrumentationNodeModuleDefinition($J,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,Iy.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=rR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return rR.context.with(rR.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=rR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return rR.context.with(rR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};A3.GenericPoolInstrumentation=VJ});var Nke=F(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3.GenericPoolInstrumentation=void 0;var SCt=Bke();Object.defineProperty(m3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return SCt.GenericPoolInstrumentation}})});var Oke,wke,kke,yCt,Mke,Pke=O(()=>{m();Oke=ie(Nke(),1);dt();mr();wke="GenericPool",kke=st(wke,()=>new Oke.GenericPoolInstrumentation({})),yCt=()=>{let e;return{name:wke,setupOnce(){let t=kke();e=iN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(kt,"auto.db.otel.generic_pool")}))}}},Mke=yCt});var qJ=F(LA=>{"use strict";m();Object.defineProperty(LA,"__esModule",{value:!0});LA.ATTR_NET_PEER_PORT=LA.ATTR_NET_PEER_NAME=LA.ATTR_MESSAGING_SYSTEM=LA.ATTR_MESSAGING_OPERATION=void 0;LA.ATTR_MESSAGING_OPERATION="messaging.operation";LA.ATTR_MESSAGING_SYSTEM="messaging.system";LA.ATTR_NET_PEER_NAME="net.peer.name";LA.ATTR_NET_PEER_PORT="net.peer.port"});var YJ=F(fi=>{"use strict";m();Object.defineProperty(fi,"__esModule",{value:!0});fi.ATTR_MESSAGING_CONVERSATION_ID=fi.OLD_ATTR_MESSAGING_MESSAGE_ID=fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=fi.ATTR_MESSAGING_URL=fi.ATTR_MESSAGING_PROTOCOL_VERSION=fi.ATTR_MESSAGING_PROTOCOL=fi.MESSAGING_OPERATION_VALUE_PROCESS=fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=fi.ATTR_MESSAGING_DESTINATION_KIND=fi.ATTR_MESSAGING_DESTINATION=void 0;fi.ATTR_MESSAGING_DESTINATION="messaging.destination";fi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";fi.MESSAGING_OPERATION_VALUE_PROCESS="process";fi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";fi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";fi.ATTR_MESSAGING_URL="messaging.url";fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";fi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";fi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var KJ=F(Cy=>{"use strict";m();Object.defineProperty(Cy,"__esModule",{value:!0});Cy.DEFAULT_CONFIG=Cy.EndOperation=void 0;var TCt;(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"})(TCt=Cy.EndOperation||(Cy.EndOperation={}));Cy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Fke=F(Ai=>{"use strict";m();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.isConfirmChannelTracing=Ai.unmarkConfirmChannelTracing=Ai.markConfirmChannelTracing=Ai.getConnectionAttributesFromUrl=Ai.getConnectionAttributesFromServer=Ai.normalizeExchange=Ai.CONNECTION_ATTRIBUTES=Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Ai.CHANNEL_SPANS_NOT_ENDED=Ai.MESSAGE_STORED_SPAN=void 0;var JJ=(je(),Me(We)),cE=rn(),g3=(Zn(),Me(Ur)),IO=qJ(),h3=YJ();Ai.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Ai.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Ai.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var ZJ=(0,JJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),ICt=e=>e!==""?e:"<default>";Ai.normalizeExchange=ICt;var CCt=e=>e.replace(/:[^:@/]*@/,":***@"),Uke=(e,t)=>e||(t==="AMQP"?5672:5671),Lke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Qke=e=>e||"localhost",QA=(e,t,n,r)=>n?{[t]:n}:(JJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),bCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[IO.ATTR_MESSAGING_SYSTEM]:t}:{}};Ai.getConnectionAttributesFromServer=bCt;var vCt=(e,t)=>{let n={[h3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Lke(r?.protocol);Object.assign(n,{...QA(e,h3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Qke(r?.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(e,IO.ATTR_NET_PEER_NAME,i,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(e,g3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=Uke(r.port,o);t&cE.SemconvStability.OLD&&Object.assign(n,QA(e,IO.ATTR_NET_PEER_PORT,a,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(e,g3.ATTR_SERVER_PORT,a,"port"))}else{let r=CCt(e);n[h3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Lke(o.protocol);Object.assign(n,{...QA(r,h3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Qke(o.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(r,IO.ATTR_NET_PEER_NAME,a,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(r,g3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=Uke(o.port?parseInt(o.port):void 0,i);t&cE.SemconvStability.OLD&&Object.assign(n,QA(r,IO.ATTR_NET_PEER_PORT,c,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(r,g3.ATTR_SERVER_PORT,c,"port"))}catch(o){JJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ai.getConnectionAttributesFromUrl=vCt;var RCt=e=>e.setValue(ZJ,!0);Ai.markConfirmChannelTracing=RCt;var xCt=e=>e.deleteValue(ZJ);Ai.unmarkConfirmChannelTracing=xCt;var DCt=e=>e.getValue(ZJ)===!0;Ai.isConfirmChannelTracing=DCt});var Gke=F(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.PACKAGE_NAME=oR.PACKAGE_VERSION=void 0;oR.PACKAGE_VERSION="0.61.0";oR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var Hke=F(S3=>{"use strict";m();Object.defineProperty(S3,"__esModule",{value:!0});S3.AmqplibInstrumentation=void 0;var Jo=(je(),Me(We)),_3=Tr(),Cr=rn(),BCt=qJ(),Fl=YJ(),Vu=KJ(),mi=Fke(),jke=Gke(),E3=[">=0.5.5 <1"],WJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(jke.PACKAGE_NAME,jke.PACKAGE_VERSION,{...Vu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Vu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",E3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",E3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Cr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Cr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Cr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Vu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Vu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Vu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Vu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Vu.EndOperation.NackAll)),(0,Cr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Cr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Cr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Cr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Cr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Cr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Cr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Cr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Cr.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 g=(0,mi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,mi.getConnectionAttributesFromServer)(d);d[mi.CONNECTION_ATTRIBUTES]={...g,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Vu.EndOperation.ChannelClosed,void 0);let i=this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Vu.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 g=this,h=n===Vu.EndOperation.Reject?c:d,S=g[mi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Vu.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,mi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[mi.CHANNEL_SPANS_NOT_ENDED]=[]}let g=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Jo.propagation.extract(Jo.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=y?Jo.trace.getSpan(y)?.spanContext():void 0;y=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Jo.SpanKind.CONSUMER,attributes:{...d?.connection?.[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:C,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[BCt.ATTR_MESSAGING_OPERATION]:Fl.MESSAGING_OPERATION_VALUE_PROCESS,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:N}=r.getConfig();N&&(0,Cr.safeExecuteInTheMiddle)(()=>N(x,{moduleVersion:t,msg:h}),Q=>{Q&&Jo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(d[mi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,_3.hrTime)()}),h[mi.MESSAGE_STORED_SPAN]=x);let k=y||Jo.ROOT_CONTEXT;Jo.context.with(Jo.trace.setSpan(k,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Vu.EndOperation.AutoAck),x.end())};return arguments[1]=g,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,g){let h=this,{span:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Cr.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!0}),k=>{k&&Jo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,Q){try{g?.call(this,k,Q)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Cr.safeExecuteInTheMiddle)(()=>j(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:k}),G=>{G&&Jo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&S.setStatus({code:Jo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,mi.markConfirmChannelTracing)(Jo.context.active()),N=[...arguments];return N[3]=y,N[4]=Jo.context.bind((0,mi.unmarkConfirmChannelTracing)(Jo.trace.setSpan(x,S)),v),Jo.context.with(x,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,mi.isConfirmChannelTracing)(Jo.context.active()))return n.apply(this,arguments);{let g=this,{span:h,modifiedOptions:S}=r.createPublishSpan(r,i,a,g,d),{publishHook:y}=r.getConfig();y&&(0,Cr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),x=>{x&&Jo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let C=[...arguments];C[3]=S;let v=n.apply(this,C);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let a=(0,mi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Jo.SpanKind.PRODUCER,attributes:{...o.connection[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:n,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Jo.propagation.inject(Jo.trace.setSpan(Jo.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[mi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Jo.SpanStatusCode.ERROR,message:r!==Vu.EndOperation.ChannelClosed&&r!==Vu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[mi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[mi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[mi.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Cr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Jo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,_3.hrTime)(),r=t[mi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,_3.hrTimeDuration)(a.timeOfConsume,n);if((0,_3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Vu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};S3.AmqplibInstrumentation=WJ});var $ke=F(lE=>{"use strict";m();Object.defineProperty(lE,"__esModule",{value:!0});lE.EndOperation=lE.DEFAULT_CONFIG=lE.AmqplibInstrumentation=void 0;var NCt=Hke();Object.defineProperty(lE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return NCt.AmqplibInstrumentation}});var zke=KJ();Object.defineProperty(lE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return zke.DEFAULT_CONFIG}});Object.defineProperty(lE,"EndOperation",{enumerable:!0,get:function(){return zke.EndOperation}})});var Vke,qke,OCt,Yke,wCt,Kke,Jke=O(()=>{m();Vke=ie($ke(),1);mr();qke="Amqplib",OCt={consumeEndHook:e=>{Lr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Lr(e,"auto.amqplib.otel.publisher")}},Yke=st(qke,()=>new Vke.AmqplibInstrumentation(OCt)),wCt=()=>({name:qke,setupOnce(){Yke()}}),Kke=wCt});var CO,XJ=O(()=>{m();CO="VercelAI"});function MCt(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 PCt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(UCt(t.content),LCt(t.content))}function UCt(e){for(let t of e){if(!MCt(t))continue;let n=Dq(t.toolCallId);n?xl(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"),tn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):xl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),tn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function LCt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Bq(t.toolCallId)}function QCt(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 T3,kCt,Zke,y3,Wke=O(()=>{m();T3=ie(rn(),1);dt();XJ();kCt=[">=3.0.0 <7"],Zke=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];y3=class e extends T3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new T3.InstrumentationNodeModuleDefinition("ai",kCt,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,g=gt(),h=g?.getIntegrationByName(CO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=QCt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},nf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Ki(x,"_sentry_active_span",Nc())},()=>{},x=>{PCt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of Zke)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=Zke.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function FCt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var Xke,GCt,eMe,tMe=O(()=>{m();dt();mr();XJ();Wke();Xke=st(CO,()=>new y3({}));GCt=(e={})=>{let t;return{name:CO,options:e,setupOnce(){t=Xke()},afterAllSetup(n){e.force??FCt(n)?RL(n):t?.callWhenPatched(()=>RL(n))}}},eMe=GCt});var C3,jCt,I3,nMe=O(()=>{m();C3=ie(rn(),1);dt();jCt=[">=4.0.0 <7"],I3=class extends C3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new C3.InstrumentationNodeModuleDefinition("openai",jCt,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(qS(k_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return BL(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 rMe,HCt,oMe,iMe=O(()=>{m();dt();mr();nMe();rMe=st(k_,e=>new I3(e)),HCt=(e={})=>({name:k_,setupOnce(){rMe(e)}}),oMe=HCt});var v3,zCt,b3,aMe=O(()=>{m();v3=ie(rn(),1);dt();zCt=[">=0.19.2 <1.0.0"],b3=class extends v3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new v3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",zCt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(qS(M_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return NL(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 sMe,$Ct,uMe,cMe=O(()=>{m();dt();mr();aMe();sMe=st(M_,e=>new b3(e)),$Ct=(e={})=>({name:M_,options:e,setupOnce(){sMe(e)}}),uMe=$Ct});var iR,lMe,R3,dMe=O(()=>{m();iR=ie(rn(),1);dt();lMe=[">=0.10.0 <2"],R3=class extends iR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new iR.InstrumentationNodeModuleDefinition("@google/genai",lMe,n=>this._patch(n),n=>n,[new iR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",lMe,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(qS(P_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return OL(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 rN(t,"GoogleGenAI",o),t}}});var pMe,VCt,fMe,AMe=O(()=>{m();dt();mr();dMe();pMe=st(P_,e=>new R3(e)),VCt=(e={})=>({name:P_,setupOnce(){pMe(e)}}),fMe=VCt});function qCt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function YCt(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,g=qCt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var dE,x3,D3,mMe=O(()=>{m();dE=ie(rn(),1);dt();x3=[">=0.1.0 <2.0.0"];D3=class extends dE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,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 dE.InstrumentationNodeModuleDefinition(r,x3,this._patch.bind(this),o=>o,[new dE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,x3,this._patch.bind(this),o=>o)]));return t.push(new dE.InstrumentationNodeModuleDefinition("langchain",x3,this._patch.bind(this),r=>r,[new dE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",x3,this._patch.bind(this),r=>r)])),t}_patch(t){VV([k_,M_,P_]);let n=PL(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 g=a[d];typeof g=="function"&&(a[d]=YCt(g,n))}}}});var gMe,KCt,hMe,_Me=O(()=>{m();dt();mr();mMe();gMe=st(wL,e=>new D3(e)),KCt=(e={})=>({name:wL,setupOnce(){gMe(e)}}),hMe=KCt});var aR,EMe,B3,SMe=O(()=>{m();aR=ie(rn(),1);dt();EMe=[">=0.0.0 <2.0.0"],B3=class extends aR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new aR.InstrumentationNodeModuleDefinition("@langchain/langgraph",EMe,this._patch.bind(this),n=>n,[new aR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",EMe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&LL(t.StateGraph.prototype,this.getConfig()),t}}});var yMe,JCt,TMe,IMe=O(()=>{m();dt();mr();SMe();yMe=st(UL,e=>new B3(e)),JCt=(e={})=>({name:UL,setupOnce(){yMe(e)}}),TMe=JCt});import*as bMe from"node:net";function vMe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Bg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&vl.error(S?.message)},!0)});let d=new Bg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>CMe(h,n,r,e,a)),g=["@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 g)d.files.push(new Bg.InstrumentationNodeModuleFile(h,t,S=>CMe(S,n,r,e,a),S=>RMe(S,r)));return d}function CMe(e,t,n,r,o){return RMe(e,n),t(e,"addDoc",ZCt(r,o)),t(e,"getDocs",XCt(r,o)),t(e,"setDoc",ebt(r,o)),t(e,"deleteDoc",WCt(r,o)),e}function RMe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Bg.isWrapped)(e[n])&&t(e,n);return e}function ZCt(e,t){return function(r){return function(o,i){let a=O3(e,"addDoc",o);return t(a),N3(a,()=>r(o,i))}}}function WCt(e,t){return function(r){return function(o){let i=O3(e,"deleteDoc",o.parent||o);return t(i),N3(i,()=>r(o))}}}function XCt(e,t){return function(r){return function(o){let i=O3(e,"getDocs",o);return t(i),N3(i,()=>r(o))}}}function ebt(e,t){return function(r){return function(o,i,a){let c=O3(e,"setDoc",o.parent||o);return t(c),N3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function N3(e,t){return Ke.with(Ht.setSpan(Ke.active(),e),()=>(0,Bg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function O3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:io.CLIENT});return nbt(r,n),r.setAttribute(VC,t),r}function tbt(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(bMe.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 nbt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[g5]:t.path,[h5]:n.name,[DS]:"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}=tbt(i);c&&(a[b5]=c),d&&(a[v5]=d),e.setAttributes(a)}var Bg,xMe=O(()=>{m();je();Bg=ie(rn(),1);Zn()});function DMe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,g=o.functions?.responseHook;typeof g=="function"&&(a=(y,C)=>{(0,Ng.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&vl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Ng.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&vl.error(C?.message)},!0)});let h=new Ng.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 Ng.InstrumentationNodeModuleFile(y,t,v=>rbt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>BMe(v,r)))}),h}function qu(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(...g){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:io.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),Ke.with(Ht.setSpan(Ke.active(),S),async()=>{let C,v;try{v=await a.apply(this,g)}catch(x){C=x}if(t?.responseHook?.(S,C),C&&S.recordException(C),S.end(),C)throw await t?.errorHook?.(S,C),C;return v})};return c?o.call(this,c,d):o.call(this,d)}}}function rbt(e,t,n,r,o,i){switch(BMe(e,n),i){case"function":t(e,"onRequest",qu(r,o,"http.request")),t(e,"onCall",qu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",qu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",qu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",qu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",qu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",qu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",qu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",qu(r,o,"storage.object.metadataUpdated"));break}return e}function BMe(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,Ng.isWrapped)(e[r])&&t(e,r);return e}var Ng,NMe=O(()=>{m();je();Ng=ie(rn(),1)});var wMe,OMe,obt,ibt,w3,kMe=O(()=>{m();wMe=ie(rn(),1);dt();xMe();NMe();OMe={},obt=[">=3.0.0 <5"],ibt=[">=6.0.0 <7"],w3=class extends wMe.InstrumentationBase{constructor(t=OMe){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...OMe,...t})}init(){let t=[];return t.push(vMe(this.tracer,obt,this._wrap,this._unwrap,this.getConfig())),t.push(DMe(this.tracer,ibt,this._wrap,this._unwrap,this.getConfig())),t}}});var MMe,abt,PMe,sbt,UMe,LMe=O(()=>{m();dt();mr();kMe();MMe="Firebase",abt={firestoreSpanCreationHook:e=>{Lr(e,"auto.firebase.otel.firestore"),e.setAttribute(Wt,"db.query")},functions:{requestHook:e=>{Lr(e,"auto.firebase.otel.functions"),e.setAttribute(Wt,"http.request")},errorHook:async(e,t)=>{t&&(tn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Bb(2e3))}}},PMe=st(MMe,()=>new w3(abt)),sbt=()=>({name:MMe,setupOnce(){PMe()}}),UMe=sbt});function QMe(){return[jxe(),T1e(),K1e(),Uwe(),PBe(),ZBe(),cNe(),yNe(),XNe(),SOe(),_we(),Owe(),Xwe(),pke(),vke(),Mke(),pBe(),Kke(),IBe(),hMe(),TMe(),eMe(),oMe(),uMe(),fMe(),COe(),UMe()]}var FMe=O(()=>{m();Jke();cMe();fke();Hxe();b1e();LMe();Pke();AMe();Z1e();wwe();Lwe();fBe();eke();_Me();IMe();CBe();UBe();WBe();lNe();TNe();iMe();yOe();bOe();Ewe();eOe();Rke();tMe()});function jMe(e,t={}){e.getOptions().debug&&sY();let[n,r]=ubt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function ubt(e,t={}){let n=new GMe.BasicTracerProvider({sampler:new zQ(e),resource:(0,k3.defaultResource)().merge((0,k3.resourceFromAttributes)({[R5]:"node",[m5]:"sentry",[x5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new HQ({timeout:cbt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ht.setGlobalTracerProvider(n),Vp.setGlobalPropagator(new jQ);let r=new VQ;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function cbt(e){if(e!=null){if(e>eZ)return Ta&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${eZ}`),eZ;if(e<=0||Number.isNaN(e)){Ta&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var k3,GMe,eZ,HMe=O(()=>{m();je();k3=ie(S7(),1),GMe=ie(V7(),1);Zn();dt();mr();uv();ly();eZ=1e6});function zMe(){return XQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(_xe(),Rxe())}function $Me(e){return[...zMe(),...xi(e)?QMe():[]]}function tZ(e={}){return lbt(e,$Me)}function lbt(e={},t){YS(e,"node");let n=wY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(jMe(n,{spanProcessors:e.openTelemetrySpanProcessors}),e4()),n}var VMe=O(()=>{m();dt();mr();Exe();xxe();FMe();HMe()});var sR=O(()=>{m();VMe();dt();mr()});function Ni(){return dbt}function Yu(){return qMe}function YMe(){return pbt}var dbt,qMe,pbt,Gl=O(()=>{"use strict";m();dbt="prod",qMe="0.1.128",pbt=`@tanagram/lore/${qMe}`});function hbt(e=""){if(!mbt.test(e))return e!==e.toLowerCase()}function KMe(e,t){let n=t??gbt,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 g=hbt(c);if(a===!1){if(i===!1&&g===!0){r.push(o),o=c,i=g;continue}if(i===!0&&g===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=g;continue}}o+=c,i=g,a=d}return r.push(o),r}function _bt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ebt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Sbt(e,t){return e?(Array.isArray(e)?e:KMe(e)).map(n=>_bt(t?.normalize?n.toLowerCase():n)).join(""):""}function vO(e,t){return Ebt(Sbt(e||"",t))}function M3(e,t){return e?(Array.isArray(e)?e:KMe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function JMe(e){return M3(e||"","_")}var mbt,gbt,ZMe=O(()=>{m();mbt=/\d/,gbt=["-","_","/","."]});import{parseArgs as ybt}from"node:util";function Q3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function nZ(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 kK(e,t,n,r=void 0){n&&(0,JN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&LBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function BSt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(kK(t,o,n,r),o)).catch(o=>{throw QBe(t,o),o}).finally(()=>t.end()):(kK(t,e,n,r),t.end(),e)}V_.handlePromiseResponse=BSt;function NSt(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,g)=>(d?QBe(r,d):kK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}V_.handleCallbackResponse=NSt});var GBe=F(Bv=>{"use strict";m();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.PACKAGE_NAME=Bv.PACKAGE_VERSION=void 0;Bv.PACKAGE_VERSION="0.60.0";Bv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var VBe=F(Uc=>{"use strict";m();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.MongooseInstrumentation=Uc._ALREADY_INSTRUMENTED=Uc._STORED_PARENT_SPAN=void 0;var Ca=(je(),Me(We)),OSt=Tr(),MK=FBe(),Ns=rn(),jBe=GBe(),q_=wK(),hy=(Zn(),Me(Ur)),aF=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],wSt=["remove","count","findOneAndRemove",...aF],kSt=["count","findOneAndRemove",...aF],MSt=[...aF];function HBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?wSt:e.startsWith("7.")?kSt:MSt:aF}function zBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function $Be(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Uc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Uc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var PK=class extends Ns.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(jBe.PACKAGE_NAME,jBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ns.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ns.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ns.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,zBe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),$Be(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)),HBe(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=HBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,zBe(n)&&this._unwrap(r.Model.prototype,"remove"),$Be(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ns.SemconvStability.OLD&&(c[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[hy.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Uc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._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&Ns.SemconvStability.OLD&&(c[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[hy.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let g={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,d);r._dbSemconvStability&Ns.SemconvStability.OLD&&(g[q_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(g[hy.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,g);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&&Ca.trace.getSpan(Ca.context.active())===void 0)return o.apply(this,arguments);let g=d,h=a,S=c;typeof a=="function"?(g=a,h=void 0,S=void 0):typeof c=="function"&&(g=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&Ns.SemconvStability.OLD&&(y[q_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(y[hy.ATTR_DB_QUERY_TEXT]=N)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),x=r._handleResponse(v,o,this,arguments,g,n);return x&&typeof x=="object"&&(x[Uc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Ca.trace.getSpan(Ca.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let g={};switch(t){case"insertMany":g.documents=a;break;case"bulkWrite":g.operations=a;break;default:g.document=a;break}c!==void 0&&(g.options=c);let h={},{dbStatementSerializer:S}=r.getConfig();if(S){let C=S(t,g);r._dbSemconvStability&Ns.SemconvStability.OLD&&(h[q_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(h[hy.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=Ca.trace.getSpan(Ca.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Uc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Uc._STORED_PARENT_SPAN]=Ca.trace.getSpan(Ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,MK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ns.SemconvStability.OLD&&(a[q_.ATTR_DB_OPERATION]=r,a[q_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ns.SemconvStability.STABLE&&(a[hy.ATTR_DB_OPERATION_NAME]=r,a[hy.ATTR_DB_SYSTEM_NAME]=q_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Ns.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Ca.SpanKind.CLIENT,attributes:a},i?Ca.trace.setSpan(Ca.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,MK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,MK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ca.context.with((0,OSt.suppressTracing)(Ca.context.active()),t):t()}};Uc.MongooseInstrumentation=PK});var qBe=F(sF=>{"use strict";m();Object.defineProperty(sF,"__esModule",{value:!0});sF.MongooseInstrumentation=void 0;var PSt=VBe();Object.defineProperty(sF,"MongooseInstrumentation",{enumerable:!0,get:function(){return PSt.MongooseInstrumentation}})});var YBe,KBe,JBe,USt,ZBe,WBe=O(()=>{m();YBe=ie(qBe(),1);mr();KBe="Mongoose",JBe=st(KBe,()=>new YBe.MongooseInstrumentation({responseHook(e){Lr(e,"auto.db.otel.mongoose")}})),USt=()=>({name:KBe,setupOnce(){JBe()}}),ZBe=USt});var XBe=F(ta=>{"use strict";m();Object.defineProperty(ta,"__esModule",{value:!0});ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ta.DB_SYSTEM_VALUE_MYSQL=ta.ATTR_NET_PEER_PORT=ta.ATTR_NET_PEER_NAME=ta.ATTR_DB_USER=ta.ATTR_DB_SYSTEM=ta.ATTR_DB_STATEMENT=ta.ATTR_DB_NAME=ta.ATTR_DB_CONNECTION_STRING=void 0;ta.ATTR_DB_CONNECTION_STRING="db.connection_string";ta.ATTR_DB_NAME="db.name";ta.ATTR_DB_STATEMENT="db.statement";ta.ATTR_DB_SYSTEM="db.system";ta.ATTR_DB_USER="db.user";ta.ATTR_NET_PEER_NAME="net.peer.name";ta.ATTR_NET_PEER_PORT="net.peer.port";ta.DB_SYSTEM_VALUE_MYSQL="mysql";ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var eNe=F(ZN=>{"use strict";m();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.AttributeNames=void 0;var LSt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(LSt=ZN.AttributeNames||(ZN.AttributeNames={}))});var tNe=F(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.getPoolNameOld=iu.arrayStringifyHelper=iu.getSpanName=iu.getDbValues=iu.getDbQueryText=iu.getJDBCString=iu.getConfig=void 0;function QSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}iu.getConfig=QSt;function FSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}iu.getJDBCString=FSt;function GSt(e){return typeof e=="string"?e:e.sql}iu.getDbQueryText=GSt;function jSt(e,t){return UK(typeof e=="string"?t:t||e.values)}iu.getDbValues=jSt;function HSt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}iu.getSpanName=HSt;function UK(e){return e?`[${e.toString()}]`:""}iu.arrayStringifyHelper=UK;function zSt(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()}iu.getPoolNameOld=zSt});var nNe=F(Nv=>{"use strict";m();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.PACKAGE_NAME=Nv.PACKAGE_VERSION=void 0;Nv.PACKAGE_VERSION="0.60.0";Nv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var oNe=F(uF=>{"use strict";m();Object.defineProperty(uF,"__esModule",{value:!0});uF.MySQLInstrumentation=void 0;var Lc=(je(),Me(We)),$d=rn(),Ov=(Zn(),Me(Ur)),xg=XBe(),$St=eNe(),_y=tNe(),rNe=nNe(),LK=class extends $d.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rNe.PACKAGE_NAME,rNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,$d.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,$d.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(xg.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 $d.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,$d.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,$d.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,$d.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,g=(0,_y.getPoolNameOld)(t);r._connCountAdd(-d,g,"used"),r._connCountAdd(-c,g,"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),g=c[d].pool;r._setPoolCallbacks(g,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=Lc.context.active();return function(o,i){i&&((0,$d.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Lc.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:g,database:h,user:S}=(0,_y.getConfig)(t.config),y=parseInt(g,10),C=(0,_y.getDbQueryText)(o);r._dbSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_DB_SYSTEM]=xg.DB_SYSTEM_VALUE_MYSQL,c[xg.ATTR_DB_CONNECTION_STRING]=(0,_y.getJDBCString)(d,g,h),c[xg.ATTR_DB_NAME]=h,c[xg.ATTR_DB_USER]=S,c[xg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&$d.SemconvStability.STABLE&&(c[Ov.ATTR_DB_SYSTEM_NAME]=Ov.DB_SYSTEM_NAME_VALUE_MYSQL,c[Ov.ATTR_DB_NAMESPACE]=h,c[Ov.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[xg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&$d.SemconvStability.STABLE&&(c[Ov.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Ov.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,_y.getSpanName)(o),{kind:Lc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute($St.AttributeNames.MYSQL_VALUES,(0,_y.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),N=Lc.context.active();if(x===-1){let k=Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments));return Lc.context.bind(N,k),k.on("error",Q=>v.setStatus({code:Lc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,N)),Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Lc.SpanStatusCode.ERROR,message:o.message}),t.end(),Lc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,_y.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")})}};uF.MySQLInstrumentation=LK});var iNe=F(cF=>{"use strict";m();Object.defineProperty(cF,"__esModule",{value:!0});cF.MySQLInstrumentation=void 0;var VSt=oNe();Object.defineProperty(cF,"MySQLInstrumentation",{enumerable:!0,get:function(){return VSt.MySQLInstrumentation}})});var aNe,sNe,uNe,qSt,cNe,lNe=O(()=>{m();aNe=ie(iNe(),1);mr();sNe="Mysql",uNe=st(sNe,()=>new aNe.MySQLInstrumentation({})),qSt=()=>({name:sNe,setupOnce(){uNe()}}),cNe=qSt});var QK=F(ts=>{"use strict";m();Object.defineProperty(ts,"__esModule",{value:!0});ts.DB_SYSTEM_VALUE_MYSQL=ts.ATTR_NET_PEER_PORT=ts.ATTR_NET_PEER_NAME=ts.ATTR_DB_USER=ts.ATTR_DB_SYSTEM=ts.ATTR_DB_STATEMENT=ts.ATTR_DB_NAME=ts.ATTR_DB_CONNECTION_STRING=void 0;ts.ATTR_DB_CONNECTION_STRING="db.connection_string";ts.ATTR_DB_NAME="db.name";ts.ATTR_DB_STATEMENT="db.statement";ts.ATTR_DB_SYSTEM="db.system";ts.ATTR_DB_USER="db.user";ts.ATTR_NET_PEER_NAME="net.peer.name";ts.ATTR_NET_PEER_PORT="net.peer.port";ts.DB_SYSTEM_VALUE_MYSQL="mysql"});var GK=F(lF=>{"use strict";m();Object.defineProperty(lF,"__esModule",{value:!0});lF.addSqlCommenterComment=void 0;var FK=(je(),Me(We)),YSt=Tr();function KSt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function JSt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function ZSt(e,t){if(typeof t!="string"||t.length===0||KSt(t))return t;let n=new YSt.W3CTraceContextPropagator,r={};n.inject(FK.trace.setSpan(FK.ROOT_CONTEXT,e),r,FK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=JSt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}lF.addSqlCommenterComment=ZSt});var dNe=F(Vd=>{"use strict";m();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.getConnectionPrototypeToInstrument=Vd.once=Vd.getSpanName=Vd.getQueryText=Vd.getConnectionAttributes=void 0;var WN=QK(),dF=rn(),jK=(Zn(),Me(Ur));function WSt(e,t,n){let{host:r,port:o,database:i,user:a}=XSt(e),c={};t&dF.SemconvStability.OLD&&(c[WN.ATTR_DB_CONNECTION_STRING]=eyt(r,o,i),c[WN.ATTR_DB_NAME]=i,c[WN.ATTR_DB_USER]=a),t&dF.SemconvStability.STABLE&&(c[jK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&dF.SemconvStability.OLD&&(c[WN.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[WN.ATTR_NET_PEER_PORT]=d)),n&dF.SemconvStability.STABLE&&(c[jK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[jK.ATTR_SERVER_PORT]=d)),c}Vd.getConnectionAttributes=WSt;function XSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function eyt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function tyt(e,t,n,r=!1,o=nyt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,ryt(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"}}Vd.getQueryText=tyt;function nyt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function ryt(e){return"values"in e}function oyt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Vd.getSpanName=oyt;var iyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Vd.once=iyt;function ayt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Vd.getConnectionPrototypeToInstrument=ayt});var pNe=F(wv=>{"use strict";m();Object.defineProperty(wv,"__esModule",{value:!0});wv.PACKAGE_NAME=wv.PACKAGE_VERSION=void 0;wv.PACKAGE_VERSION="0.60.0";wv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var gNe=F(pF=>{"use strict";m();Object.defineProperty(pF,"__esModule",{value:!0});pF.MySQL2Instrumentation=void 0;var fNe=(je(),Me(We)),sf=rn(),HK=QK(),ANe=GK(),kv=dNe(),mNe=pNe(),zK=(Zn(),Me(Ur)),$K=[">=1.4.2 <4"],VK=class extends sf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(mNe.PACKAGE_NAME,mNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,sf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,sf.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,sf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,sf.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 sf.InstrumentationNodeModuleDefinition("mysql2",$K,i=>(n(i),i),()=>{},[new sf.InstrumentationNodeModuleFile("mysql2/promise.js",$K,i=>(n(i),i),()=>{}),new sf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",$K,i=>{let a=(0,kv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,kv.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:g,maskStatementHook:h,responseHook:S}=o.getConfig(),y=(0,kv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,kv.getQueryText)(i,t,d,g,h);o._dbSemconvStability&sf.SemconvStability.OLD&&(y[HK.ATTR_DB_SYSTEM]=HK.DB_SYSTEM_VALUE_MYSQL,y[HK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&sf.SemconvStability.STABLE&&(y[zK.ATTR_DB_SYSTEM_NAME]=zK.DB_SYSTEM_NAME_VALUE_MYSQL,y[zK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,kv.getSpanName)(i),{kind:fNe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,ANe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,ANe.addSqlCommenterComment)(v,i.sql)}));let x=(0,kv.once)((N,k)=>{N?v.setStatus({code:fNe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,sf.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:k})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let N=r.apply(this,arguments);return N.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};pF.MySQL2Instrumentation=VK});var hNe=F(fF=>{"use strict";m();Object.defineProperty(fF,"__esModule",{value:!0});fF.MySQL2Instrumentation=void 0;var syt=gNe();Object.defineProperty(fF,"MySQL2Instrumentation",{enumerable:!0,get:function(){return syt.MySQL2Instrumentation}})});var _Ne,ENe,SNe,uyt,yNe,TNe=O(()=>{m();_Ne=ie(hNe(),1);mr();ENe="Mysql2",SNe=st(ENe,()=>new _Ne.MySQL2Instrumentation({responseHook(e){Lr(e,"auto.db.otel.mysql2")}})),uyt=()=>({name:ENe,setupOnce(){SNe()}}),yNe=uyt});var INe=F(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.DB_SYSTEM_VALUE_REDIS=au.DB_SYSTEM_NAME_VALUE_REDIS=au.ATTR_NET_PEER_PORT=au.ATTR_NET_PEER_NAME=au.ATTR_DB_SYSTEM=au.ATTR_DB_STATEMENT=au.ATTR_DB_CONNECTION_STRING=void 0;au.ATTR_DB_CONNECTION_STRING="db.connection_string";au.ATTR_DB_STATEMENT="db.statement";au.ATTR_DB_SYSTEM="db.system";au.ATTR_NET_PEER_NAME="net.peer.name";au.ATTR_NET_PEER_PORT="net.peer.port";au.DB_SYSTEM_NAME_VALUE_REDIS="redis";au.DB_SYSTEM_VALUE_REDIS="redis"});var CNe=F(AF=>{"use strict";m();Object.defineProperty(AF,"__esModule",{value:!0});AF.endSpan=void 0;var cyt=(je(),Me(We)),lyt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:cyt.SpanStatusCode.ERROR,message:t.message})),e.end()};AF.endSpan=lyt});var gF=F(mF=>{"use strict";m();Object.defineProperty(mF,"__esModule",{value:!0});mF.defaultDbStatementSerializer=void 0;var dyt=[{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}],pyt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=dyt.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};mF.defaultDbStatementSerializer=pyt});var bNe=F(Mv=>{"use strict";m();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.62.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var DNe=F(hF=>{"use strict";m();Object.defineProperty(hF,"__esModule",{value:!0});hF.IORedisInstrumentation=void 0;var Y_=(je(),Me(We)),Qc=rn(),K_=(Zn(),Me(Ur)),Fc=INe(),vNe=rn(),XN=CNe(),fyt=gF(),RNe=bNe(),xNe={requireParentSpan:!0},qK=class extends Qc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(RNe.PACKAGE_NAME,RNe.PACKAGE_VERSION,{...xNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xNe,...t})}init(){return[new Qc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Qc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Qc.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||fyt.defaultDbStatementSerializer,c=Y_.trace.getSpan(Y_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:g,port:h}=this.options,S=a(o.name,o.args);r._dbSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,d[Fc.ATTR_DB_STATEMENT]=S,d[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${g}:${h}`),r._dbSemconvStability&Qc.SemconvStability.STABLE&&(d[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,d[K_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_NET_PEER_NAME]=g,d[Fc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Qc.SemconvStability.STABLE&&(d[K_.ATTR_SERVER_ADDRESS]=g,d[K_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:Y_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,vNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&Y_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,vNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),Q=>{Q&&Y_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,XN.endSpan)(y,null),x(k)};let N=o.reject;return o.reject=function(k){(0,XN.endSpan)(y,k),N(k)},v}catch(v){throw(0,XN.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=Y_.trace.getSpan(Y_.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&Qc.SemconvStability.OLD&&(o[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,o[Fc.ATTR_DB_STATEMENT]="connect",o[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Qc.SemconvStability.STABLE&&(o[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,o[K_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Qc.SemconvStability.OLD&&(o[Fc.ATTR_NET_PEER_NAME]=i,o[Fc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Qc.SemconvStability.STABLE&&(o[K_.ATTR_SERVER_ADDRESS]=i,o[K_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:Y_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,XN.endSpan)(c,null),d}catch(d){throw(0,XN.endSpan)(c,d),d}}}};hF.IORedisInstrumentation=qK});var BNe=F(_F=>{"use strict";m();Object.defineProperty(_F,"__esModule",{value:!0});_F.IORedisInstrumentation=void 0;var Ayt=DNe();Object.defineProperty(_F,"IORedisInstrumentation",{enumerable:!0,get:function(){return Ayt.IORedisInstrumentation}})});var EF=F(Pv=>{"use strict";m();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.PACKAGE_NAME=Pv.PACKAGE_VERSION=void 0;Pv.PACKAGE_VERSION="0.62.0";Pv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var NNe=F(J_=>{"use strict";m();Object.defineProperty(J_,"__esModule",{value:!0});J_.getTracedCreateStreamTrace=J_.getTracedCreateClient=J_.endSpan=void 0;var eO=(je(),Me(We)),myt=(e,t)=>{t&&e.setStatus({code:eO.SpanStatusCode.ERROR,message:t.message}),e.end()};J_.endSpan=myt;var gyt=e=>function(){let n=e.apply(this,arguments);return eO.context.bind(eO.context.active(),n)};J_.getTracedCreateClient=gyt;var hyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){eO.context.bind(eO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};J_.getTracedCreateStreamTrace=hyt});var SF=F(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.DB_SYSTEM_VALUE_REDIS=su.DB_SYSTEM_NAME_VALUE_REDIS=su.ATTR_NET_PEER_PORT=su.ATTR_NET_PEER_NAME=su.ATTR_DB_SYSTEM=su.ATTR_DB_STATEMENT=su.ATTR_DB_CONNECTION_STRING=void 0;su.ATTR_DB_CONNECTION_STRING="db.connection_string";su.ATTR_DB_STATEMENT="db.statement";su.ATTR_DB_SYSTEM="db.system";su.ATTR_NET_PEER_NAME="net.peer.name";su.ATTR_NET_PEER_PORT="net.peer.port";su.DB_SYSTEM_NAME_VALUE_REDIS="redis";su.DB_SYSTEM_VALUE_REDIS="redis"});var wNe=F(TF=>{"use strict";m();Object.defineProperty(TF,"__esModule",{value:!0});TF.RedisInstrumentationV2_V3=void 0;var Ll=rn(),yF=NNe(),ONe=EF(),tO=(je(),Me(We)),nO=(Zn(),Me(Ur)),Ey=SF(),_yt=gF(),YK=class e extends Ll.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(ONe.PACKAGE_NAME,ONe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ll.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ll.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,Ll.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ll.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=tO.trace.getSpan(tO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||_yt.defaultDbStatementSerializer,g={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(g,{[Ey.ATTR_DB_SYSTEM]:Ey.DB_SYSTEM_VALUE_REDIS,[Ey.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(g,{[nO.ATTR_DB_SYSTEM_NAME]:Ey.DB_SYSTEM_NAME_VALUE_REDIS,[nO.ATTR_DB_OPERATION_NAME]:i.command,[nO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:tO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(y,{[Ey.ATTR_NET_PEER_NAME]:this.connection_options.host,[Ey.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(y,{[nO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[nO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ll.SemconvStability.OLD&&h.setAttribute(Ey.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=tO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let N=a.responseHook;(0,Ll.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,yF.endSpan)(h,v),tO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,yF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,yF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,yF.getTracedCreateStreamTrace)(n)}}};TF.RedisInstrumentationV2_V3=YK});var MNe=F(IF=>{"use strict";m();Object.defineProperty(IF,"__esModule",{value:!0});IF.getClientAttributes=void 0;var KK=(Zn(),Me(Ur)),Uv=SF(),kNe=rn();function Eyt(e,t,n){let r={};return n&kNe.SemconvStability.OLD&&Object.assign(r,{[Uv.ATTR_DB_SYSTEM]:Uv.DB_SYSTEM_VALUE_REDIS,[Uv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Uv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Uv.ATTR_DB_CONNECTION_STRING]:Syt(e,t?.url)}),n&kNe.SemconvStability.STABLE&&Object.assign(r,{[KK.ATTR_DB_SYSTEM_NAME]:Uv.DB_SYSTEM_NAME_VALUE_REDIS,[KK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[KK.ATTR_SERVER_PORT]:t?.socket?.port}),r}IF.getClientAttributes=Eyt;function Syt(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 QNe=F(CF=>{"use strict";m();Object.defineProperty(CF,"__esModule",{value:!0});CF.RedisInstrumentationV4_V5=void 0;var qd=(je(),Me(We)),So=rn(),PNe=MNe(),yyt=gF(),UNe=EF(),JK=(Zn(),Me(Ur)),Tyt=SF(),rO=Symbol("opentelemetry.instrumentation.redis.open_spans"),LNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),ZK=class e extends So.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.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 So.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,So.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,So.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,So.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,So.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,So.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,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new So.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,g){let h=t(d,g).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[rO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[rO];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let g=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,g,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[LNe]=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,PNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:qd.SpanKind.CLIENT,attributes:a});return qd.context.with(qd.trace.setSpan(qd.context.active(),c),()=>r.apply(this)).then(g=>(c.end(),g)).catch(g=>(c.recordException(g),c.setStatus({code:qd.SpanStatusCode.ERROR,message:g.message}),c.end(),Promise.reject(g)))}}}_traceClientCommand(t,n,r,o){if(qd.trace.getSpan(qd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[LNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||yyt.defaultDbStatementSerializer,h=(0,PNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&So.SemconvStability.STABLE&&(h[JK.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&So.SemconvStability.OLD&&(h[Tyt.ATTR_DB_STATEMENT]=C),this._semconvStability&So.SemconvStability.STABLE&&(h[JK.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:qd.SpanKind.CLIENT,attributes:h}),y=qd.context.with(qd.trace.setSpan(qd.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[rO]=C[rO]||[],C[rO].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:g}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&So.SemconvStability.STABLE&&d.setAttribute(JK.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],g,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:qd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};CF.RedisInstrumentationV4_V5=ZK});var jNe=F(bF=>{"use strict";m();Object.defineProperty(bF,"__esModule",{value:!0});bF.RedisInstrumentation=void 0;var Iyt=rn(),FNe=EF(),Cyt=wNe(),byt=QNe(),GNe={requireParentSpan:!1},WK=class extends Iyt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...GNe,...t};super(FNe.PACKAGE_NAME,FNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Cyt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new byt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...GNe,...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())}};bF.RedisInstrumentation=WK});var HNe=F(vF=>{"use strict";m();Object.defineProperty(vF,"__esModule",{value:!0});vF.RedisInstrumentation=void 0;var vyt=jNe();Object.defineProperty(vF,"RedisInstrumentation",{enumerable:!0,get:function(){return vyt.RedisInstrumentation}})});function oO(e,t){return e.includes(t.toLowerCase())}function eJ(e){return oO(XK,e)?"cache.get":oO(xyt,e)?"cache.put":void 0}function Dyt(e,t){return t.some(n=>e.startsWith(n))}function $Ne(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)?zNe(o.map(i=>n(i))):["<unknown>"],r=t[0];return oO(Ryt,e)&&r!=null?n(r):zNe(t.map(o=>n(o)))}catch{return}}function VNe(e,t,n){if(!eJ(e))return!1;for(let r of t)if(Dyt(r,n))return!0;return!1}function qNe(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 zNe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Ryt,XK,xyt,YNe=O(()=>{m();Ryt=["get","set","setex"],XK=["get","mget"],xyt=["set","setex"]});var KNe,JNe,RF,iO,ZNe,Byt,Nyt,WNe,Oyt,XNe,eOe=O(()=>{m();KNe=ie(BNe(),1),JNe=ie(HNe(),1);dt();mr();YNe();RF="Redis",iO={},ZNe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=$Ne(t,n),i=eJ(t);if(!o||!i||!iO.cachePrefixes||!VNe(t,o,iO.cachePrefixes))return;let a=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=qNe(r);d&&e.setAttribute(oV,d),oO(XK,t)&&d!==void 0&&e.setAttribute(nV,d>0),e.setAttributes({[Wt]:i,[rV]:o});let g=o.join(", ");e.updateName(iO.maxCacheKeyLength?d_(g,iO.maxCacheKeyLength):g)},Byt=st(`${RF}.IORedis`,()=>new KNe.IORedisInstrumentation({responseHook:ZNe})),Nyt=st(`${RF}.Redis`,()=>new JNe.RedisInstrumentation({responseHook:ZNe})),WNe=Object.assign(()=>{Byt(),Nyt()},{id:RF}),Oyt=(e={})=>({name:RF,setupOnce(){iO=e,WNe()}}),XNe=Oyt});var tOe=F(xF=>{"use strict";m();Object.defineProperty(xF,"__esModule",{value:!0});xF.EVENT_LISTENERS_SET=void 0;xF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var tJ=F(aO=>{"use strict";m();Object.defineProperty(aO,"__esModule",{value:!0});aO.AttributeNames=void 0;var wyt;(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"})(wyt=aO.AttributeNames||(aO.AttributeNames={}))});var nJ=F(xr=>{"use strict";m();Object.defineProperty(xr,"__esModule",{value:!0});xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=xr.METRIC_DB_CLIENT_CONNECTION_COUNT=xr.DB_SYSTEM_VALUE_POSTGRESQL=xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=xr.ATTR_NET_PEER_PORT=xr.ATTR_NET_PEER_NAME=xr.ATTR_DB_USER=xr.ATTR_DB_SYSTEM=xr.ATTR_DB_STATEMENT=xr.ATTR_DB_NAME=xr.ATTR_DB_CONNECTION_STRING=xr.ATTR_DB_CLIENT_CONNECTION_STATE=xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";xr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";xr.ATTR_DB_CONNECTION_STRING="db.connection_string";xr.ATTR_DB_NAME="db.name";xr.ATTR_DB_STATEMENT="db.statement";xr.ATTR_DB_SYSTEM="db.system";xr.ATTR_DB_USER="db.user";xr.ATTR_NET_PEER_NAME="net.peer.name";xr.ATTR_NET_PEER_PORT="net.peer.port";xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";xr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";xr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var rJ=F(sO=>{"use strict";m();Object.defineProperty(sO,"__esModule",{value:!0});sO.SpanNames=void 0;var kyt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(kyt=sO.SpanNames||(sO.SpanNames={}))});var uOe=F(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.sanitizedErrorMessage=or.isObjectWithTextString=or.getErrorMessage=or.patchClientConnectCallback=or.patchCallbackPGPool=or.updateCounter=or.getPoolName=or.patchCallback=or.handleExecutionResult=or.handleConfigQuery=or.shouldSkipInstrumentation=or.getSemanticAttributesFromPoolConnection=or.getSemanticAttributesFromConnection=or.getConnectionString=or.parseAndMaskConnectionString=or.parseNormalizedOperationName=or.getQuerySpanName=void 0;var Z_=(je(),Me(We)),DF=tJ(),Yd=(Zn(),Me(Ur)),pi=nJ(),Sy=rn(),nOe=rJ();function rOe(e,t){if(!t)return nOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:oOe(t.text);return`${nOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}or.getQuerySpanName=rOe;function oOe(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}or.parseNormalizedOperationName=oOe;function iOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}or.parseAndMaskConnectionString=iOe;function oJ(e){if("connectionString"in e&&e.connectionString)return iOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}or.getConnectionString=oJ;function BF(e){if(Number.isInteger(e))return e}function aOe(e,t){let n={};return t&Sy.SemconvStability.OLD&&(n={...n,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:e.database,[pi.ATTR_DB_CONNECTION_STRING]:oJ(e),[pi.ATTR_DB_USER]:e.user,[pi.ATTR_NET_PEER_NAME]:e.host,[pi.ATTR_NET_PEER_PORT]:BF(e.port)}),t&Sy.SemconvStability.STABLE&&(n={...n,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:e.host,[Yd.ATTR_SERVER_PORT]:BF(e.port)}),n}or.getSemanticAttributesFromConnection=aOe;function Myt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[DF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[DF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&Sy.SemconvStability.OLD&&(r={...r,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[pi.ATTR_DB_CONNECTION_STRING]:oJ(e),[pi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[pi.ATTR_NET_PEER_PORT]:Number(n?.port)||BF(e.port),[pi.ATTR_DB_USER]:n?.username??e.user}),t&Sy.SemconvStability.STABLE&&(r={...r,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Yd.ATTR_SERVER_PORT]:Number(n?.port)||BF(e.port)}),r}or.getSemanticAttributesFromPoolConnection=Myt;function Pyt(e){return e.requireParentSpan===!0&&Z_.trace.getSpan(Z_.context.active())===void 0}or.shouldSkipInstrumentation=Pyt;function Uyt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=rOe(i,r),c=e.startSpan(a,{kind:Z_.SpanKind.CLIENT,attributes:aOe(o,n)});if(!r)return c;if(r.text&&(n&Sy.SemconvStability.OLD&&c.setAttribute(pi.ATTR_DB_STATEMENT,r.text),n&Sy.SemconvStability.STABLE&&c.setAttribute(Yd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(g=>g==null?"null":g instanceof Buffer?g.toString():typeof g=="object"?typeof g.toPostgres=="function"?g.toPostgres():JSON.stringify(g):g.toString());c.setAttribute(DF.AttributeNames.PG_VALUES,d)}catch(d){Z_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(DF.AttributeNames.PG_PLAN,r.name),c}or.handleConfigQuery=Uyt;function sOe(e,t,n){typeof e.responseHook=="function"&&(0,Sy.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&Z_.diag.error("Error running response hook",r)},!0)}or.handleExecutionResult=sOe;function Lyt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Yd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(NF(a)),t.setStatus({code:Z_.SpanStatusCode.ERROR,message:a.message})):sOe(e,t,c),o(),t.end(),n.call(this,a,c)}}or.patchCallback=Lyt;function Qyt(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()}or.getPoolName=Qyt;function Fyt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}or.updateCounter=Fyt;function Gyt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}or.patchCallbackPGPool=Gyt;function jyt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}or.patchClientConnectCallback=jyt;function Hyt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}or.getErrorMessage=Hyt;function zyt(e){return typeof e=="object"&&typeof e?.text=="string"}or.isObjectWithTextString=zyt;function NF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}or.sanitizedErrorMessage=NF});var cOe=F(Lv=>{"use strict";m();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.PACKAGE_NAME=Lv.PACKAGE_VERSION=void 0;Lv.PACKAGE_VERSION="0.66.0";Lv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var mOe=F(wF=>{"use strict";m();Object.defineProperty(wF,"__esModule",{value:!0});wF.PgInstrumentation=void 0;var Hu=rn(),Fr=(je(),Me(We)),lOe=tOe(),Ko=uOe(),dOe=GK(),pOe=cOe(),fOe=rJ(),OF=Tr(),uf=(Zn(),Me(Ur)),uO=nJ();function Qv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var iJ=class extends Hu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(pOe.PACKAGE_NAME,pOe.PACKAGE_VERSION,t),this._semconvStability=(0,Hu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(uf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Fr.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(uO.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(uO.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 Hu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Hu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Hu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Qv(c);return this._patchPgClient(d.Client),c},c=>{let d=Qv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Hu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Qv(c);return(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Qv(c);(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Qv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.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=Qv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchClientConnectCallback(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}recordOperationDuration(t,n){let r={},o=[uf.ATTR_DB_NAMESPACE,uf.ATTR_ERROR_TYPE,uf.ATTR_SERVER_PORT,uf.ATTR_SERVER_ADDRESS,uf.ATTR_DB_OPERATION_NAME];this._semconvStability&Hu.SemconvStability.OLD&&o.push(uO.ATTR_DB_SYSTEM),this._semconvStability&Hu.SemconvStability.STABLE&&o.push(uf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,OF.hrTimeToMilliseconds)((0,OF.hrTimeDuration)(n,(0,OF.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Ko.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,OF.hrTime)(),a=o[0],c=typeof a=="string",d=Ko.isObjectWithTextString(a),g=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={[uO.ATTR_DB_SYSTEM]:uO.DB_SYSTEM_VALUE_POSTGRESQL,[uf.ATTR_DB_NAMESPACE]:this.database,[uf.ATTR_SERVER_PORT]:this.connectionParameters.port,[uf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[uf.ATTR_DB_OPERATION_NAME]=Ko.parseNormalizedOperationName(g?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Ko.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,g);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,dOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,dOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Fr.trace.getSpan(Fr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Ko.patchCallback(y,C,o[o.length-1],h,S),N&&(o[o.length-1]=Fr.context.bind(Fr.context.active(),o[o.length-1]));else if(typeof g?.callback=="function"){let k=Ko.patchCallback(t.getConfig(),C,g.callback,h,S);N&&(k=Fr.context.bind(Fr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,Hu.safeExecuteInTheMiddle)(()=>{let{database:N,host:k,port:Q,user:j}=this.connectionParameters;v(C,{connection:{database:N,host:k,port:Q,user:j},query:{text:g.text,values:g.values,name:g.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let x;try{x=n.apply(this,o)}catch(N){throw N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Fr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(N)}),C.end(),N}return x instanceof Promise?x.then(N=>new Promise(k=>{Ko.handleExecutionResult(t.getConfig(),C,N),S(),C.end(),k(N)})).catch(N=>new Promise((k,Q)=>{N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Fr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[lOe.EVENT_LISTENERS_SET])return;let n=Ko.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[lOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.POOL_CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchCallbackPGPool(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}};wF.PgInstrumentation=iJ;function AOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Fr.context.bind(Fr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Ko.sanitizedErrorMessage(r)),e.setStatus({code:Fr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var gOe=F(Fv=>{"use strict";m();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.AttributeNames=Fv.PgInstrumentation=void 0;var $yt=mOe();Object.defineProperty(Fv,"PgInstrumentation",{enumerable:!0,get:function(){return $yt.PgInstrumentation}});var Vyt=tJ();Object.defineProperty(Fv,"AttributeNames",{enumerable:!0,get:function(){return Vyt.AttributeNames}})});var hOe,_Oe,EOe,qyt,SOe,yOe=O(()=>{m();hOe=ie(gOe(),1);mr();_Oe="Postgres",EOe=st(_Oe,hOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Lr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),qyt=e=>({name:_Oe,setupOnce(){EOe(e)}}),SOe=qyt});var W_,sJ,TOe,Yyt,Kyt,IOe,aJ,Jyt,COe,bOe=O(()=>{m();je();W_=ie(rn(),1);Zn();dt();mr();ly();sJ="PostgresJs",TOe=[">=3.0.0 <4"],Yyt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,Kyt=Symbol.for("sentry.query.from.instrumented.sql"),IOe=st(sJ,e=>new aJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),aJ=class extends W_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new W_.InstrumentationNodeModuleDefinition("postgres",TOe,n=>{try{return this._patchPostgres(n)}catch(r){return Ta&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new W_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,TOe,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 Ta&&J.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 Ta&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return aq(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:(rN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ht.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(VC,r);return}let o=n?.match(Yyt);o?.[1]&&t.setAttribute(VC,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[Kyt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Za({name:a||"postgresjs.query",op:"db"},c=>{Lr(c,"auto.db.postgresjs"),c.setAttributes({[DS]:"postgres",[_5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,W_.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),Ta&&J.error(`Error in requestHook for ${sJ} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,C,v)=>{try{n._setOperationName(c,a,v?.[0]?.command),c.end()}catch(x){Ta&&J.error("Error ending span in resolve callback:",x)}return Reflect.apply(y,C,v)}});let S=this.reject;this.reject=new Proxy(S,{apply:(y,C,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(E5,v?.[0]?.code||"unknown"),c.setAttribute(S5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){Ta&&J.error("Error ending span in reject callback:",x)}return Reflect.apply(y,C,v)}});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}},Jyt=e=>({name:sJ,setupOnce(){IOe(e)}}),COe=Jyt});var vOe=F(cO=>{"use strict";m();Object.defineProperty(cO,"__esModule",{value:!0});cO.SeverityNumber=void 0;var Zyt;(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"})(Zyt=cO.SeverityNumber||(cO.SeverityNumber={}))});var MF=F(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.NOOP_LOGGER=Gv.NoopLogger=void 0;var kF=class{emit(t){}};Gv.NoopLogger=kF;Gv.NOOP_LOGGER=new kF});var UF=F(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.NOOP_LOGGER_PROVIDER=jv.NoopLoggerProvider=void 0;var Wyt=MF(),PF=class{getLogger(t,n,r){return new Wyt.NoopLogger}};jv.NoopLoggerProvider=PF;jv.NOOP_LOGGER_PROVIDER=new PF});var cJ=F(LF=>{"use strict";m();Object.defineProperty(LF,"__esModule",{value:!0});LF.ProxyLogger=void 0;var Xyt=MF(),uJ=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):Xyt.NOOP_LOGGER}};LF.ProxyLogger=uJ});var dJ=F(QF=>{"use strict";m();Object.defineProperty(QF,"__esModule",{value:!0});QF.ProxyLoggerProvider=void 0;var eTt=UF(),tTt=cJ(),lJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new tTt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:eTt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};QF.ProxyLoggerProvider=lJ});var ROe=F(FF=>{"use strict";m();Object.defineProperty(FF,"__esModule",{value:!0});FF._globalThis=void 0;FF._globalThis=typeof globalThis=="object"?globalThis:global});var xOe=F(GF=>{"use strict";m();Object.defineProperty(GF,"__esModule",{value:!0});GF._globalThis=void 0;var nTt=ROe();Object.defineProperty(GF,"_globalThis",{enumerable:!0,get:function(){return nTt._globalThis}})});var DOe=F(jF=>{"use strict";m();Object.defineProperty(jF,"__esModule",{value:!0});jF._globalThis=void 0;var rTt=xOe();Object.defineProperty(jF,"_globalThis",{enumerable:!0,get:function(){return rTt._globalThis}})});var BOe=F(kA=>{"use strict";m();Object.defineProperty(kA,"__esModule",{value:!0});kA.API_BACKWARDS_COMPATIBILITY_VERSION=kA.makeGetter=kA._global=kA.GLOBAL_LOGS_API_KEY=void 0;var oTt=DOe();kA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");kA._global=oTt._globalThis;function iTt(e,t,n){return r=>r===e?t:n}kA.makeGetter=iTt;kA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var OOe=F(HF=>{"use strict";m();Object.defineProperty(HF,"__esModule",{value:!0});HF.LogsAPI=void 0;var Kd=BOe(),aTt=UF(),NOe=dJ(),pJ=class e{constructor(){this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Kd._global[Kd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Kd._global[Kd.GLOBAL_LOGS_API_KEY]=(0,Kd.makeGetter)(Kd.API_BACKWARDS_COMPATIBILITY_VERSION,t,aTt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Kd._global[Kd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Kd._global,Kd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Kd._global[Kd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}};HF.LogsAPI=pJ});var fJ=F(ns=>{"use strict";m();Object.defineProperty(ns,"__esModule",{value:!0});ns.logs=ns.ProxyLoggerProvider=ns.ProxyLogger=ns.NoopLoggerProvider=ns.NOOP_LOGGER_PROVIDER=ns.NoopLogger=ns.NOOP_LOGGER=ns.SeverityNumber=void 0;var sTt=vOe();Object.defineProperty(ns,"SeverityNumber",{enumerable:!0,get:function(){return sTt.SeverityNumber}});var wOe=MF();Object.defineProperty(ns,"NOOP_LOGGER",{enumerable:!0,get:function(){return wOe.NOOP_LOGGER}});Object.defineProperty(ns,"NoopLogger",{enumerable:!0,get:function(){return wOe.NoopLogger}});var kOe=UF();Object.defineProperty(ns,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return kOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ns,"NoopLoggerProvider",{enumerable:!0,get:function(){return kOe.NoopLoggerProvider}});var uTt=cJ();Object.defineProperty(ns,"ProxyLogger",{enumerable:!0,get:function(){return uTt.ProxyLogger}});var cTt=dJ();Object.defineProperty(ns,"ProxyLoggerProvider",{enumerable:!0,get:function(){return cTt.ProxyLoggerProvider}});var lTt=OOe();ns.logs=lTt.LogsAPI.getInstance()});var MOe=F(Hv=>{"use strict";m();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.disableInstrumentations=Hv.enableInstrumentations=void 0;function dTt(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()}}Hv.enableInstrumentations=dTt;function pTt(e){e.forEach(t=>t.disable())}Hv.disableInstrumentations=pTt});var LOe=F(zF=>{"use strict";m();Object.defineProperty(zF,"__esModule",{value:!0});zF.registerInstrumentations=void 0;var POe=(je(),Me(We)),fTt=fJ(),UOe=MOe();function ATt(e){let t=e.tracerProvider||POe.trace.getTracerProvider(),n=e.meterProvider||POe.metrics.getMeterProvider(),r=e.loggerProvider||fTt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,UOe.enableInstrumentations)(o,t,n,r),()=>{(0,UOe.disableInstrumentations)(o)}}zF.registerInstrumentations=ATt});var qOe=F($F=>{"use strict";m();Object.defineProperty($F,"__esModule",{value:!0});$F.satisfies=void 0;var hJ=(je(),Me(We)),HOe=/^(?: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-]+)*))?$/,mTt=/^(?<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-]+)*))?$/,gTt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function hTt(e,t,n){if(!_Tt(e))return hJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=TTt(e);if(!r)return!1;let o=[],i=zOe(r,t,o,n);return i&&!n?.includePrerelease?STt(r,o):i}$F.satisfies=hTt;function _Tt(e){return typeof e=="string"&&HOe.test(e)}function zOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(AJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=HTt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!AJ(e,i,n,r))return!1;return!0}return AJ(e,t,n,r)}function AJ(e,t,n,r){if(t=yTt(t,r),t.includes(" "))return zOe(e,t,n,r);{let o=ITt(t);return n.push(o),ETt(e,o)}}function ETt(e,t){if(t.invalid)return!1;if(!t.version||gJ(t.version))return!0;let n=FOe(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=FOe(r,o)}return gTt[t.op]?.includes(n)}function STt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function yTt(e,t){return e=e.trim(),e=GTt(e,t),e=FTt(e),e=jTt(e,t),e=e.trim(),e}function zu(e){return!e||e.toLowerCase()==="x"||e==="*"}function TTt(e){let t=e.match(HOe);if(!t){hJ.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 ITt(e){if(!e)return{};let t=e.match(mTt);if(!t)return hJ.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 gJ(e){return e==="*"||e==="x"||e==="X"}function QOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function CTt(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 bTt(e,t){if(gJ(e)||gJ(t))return 0;let[n,r]=CTt(QOe(e),QOe(t));return n>r?1:n<r?-1:0}function FOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=bTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $Oe="[a-zA-Z0-9-]",VOe="0|[1-9]\\d*",vTt=`\\d*[a-zA-Z-]${$Oe}*`,RTt="((?:<|>)?=?)",GOe=`(?:${VOe}|${vTt})`,xTt=`(?:-(${GOe}(?:\\.${GOe})*))`,jOe=`${$Oe}+`,DTt=`(?:\\+(${jOe}(?:\\.${jOe})*))`,mJ=`${VOe}|x|X|\\*`,lO=`[v=\\s]*(${mJ})(?:\\.(${mJ})(?:\\.(${mJ})(?:${xTt})?${DTt}?)?)?`,BTt=`^${RTt}\\s*${lO}$`,NTt=new RegExp(BTt),OTt=`^\\s*(${lO})\\s+-\\s+(${lO})\\s*$`,wTt=new RegExp(OTt),kTt="(?:~>?)",MTt=`^${kTt}${lO}$`,PTt=new RegExp(MTt),UTt="(?:\\^)",LTt=`^${UTt}${lO}$`,QTt=new RegExp(LTt);function FTt(e){let t=PTt;return e.replace(t,(n,r,o,i,a)=>{let c;return zu(r)?c="":zu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:zu(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 GTt(e,t){let n=QTt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return zu(i)?g="":zu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:zu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function jTt(e,t){let n=NTt;return e.replace(n,(r,o,i,a,c,d)=>{let g=zu(i),h=g||zu(a),S=h||zu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?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 HTt(e,t){let n=wTt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(zu(i)?o="":zu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:zu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,zu(S)?h="":zu(y)?h=`<${+S+1}.0.0-0`:zu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var _J=F(Os=>{"use strict";m();Object.defineProperty(Os,"__esModule",{value:!0});Os.massUnwrap=Os.unwrap=Os.massWrap=Os.wrap=void 0;var $u=console.error.bind(console);function dO(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 zTt=(e,t,n)=>{if(!e||!e[t]){$u("no original function "+String(t)+" to wrap");return}if(!n){$u("no wrapper function"),$u(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){$u("original object and wrapper must be functions");return}let o=n(r,t);return dO(o,"__original",r),dO(o,"__unwrap",()=>{e[t]===o&&dO(e,t,r)}),dO(o,"__wrapped",!0),dO(e,t,o),o};Os.wrap=zTt;var $Tt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Os.wrap)(r,o,n)})})};Os.massWrap=$Tt;var VTt=(e,t)=>{if(!e||!e[t]){$u("no function to unwrap."),$u(new Error().stack);return}let n=e[t];if(!n.__unwrap)$u("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Os.unwrap=VTt;var qTt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Os.unwrap)(n,r)})})};Os.massUnwrap=qTt;function pO(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Os.default=pO;pO.wrap=Os.wrap;pO.massWrap=Os.massWrap;pO.unwrap=Os.unwrap;pO.massUnwrap=Os.massUnwrap});var YOe=F(qF=>{"use strict";m();Object.defineProperty(qF,"__esModule",{value:!0});qF.InstrumentationAbstract=void 0;var EJ=(je(),Me(We)),YTt=fJ(),VF=_J(),SJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=EJ.diag.createComponentLogger({namespace:t}),this._tracer=EJ.trace.getTracer(t,n),this._meter=EJ.metrics.getMeter(t,n),this._logger=YTt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=VF.wrap;_unwrap=VF.unwrap;_massWrap=VF.massWrap;_massUnwrap=VF.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)}}};qF.InstrumentationAbstract=SJ});var KOe=F(X_=>{"use strict";m();Object.defineProperty(X_,"__esModule",{value:!0});X_.ModuleNameTrie=X_.ModuleNameSeparator=void 0;X_.ModuleNameSeparator="/";var YF=class{hooks=[];children=new Map},yJ=class{_trie=new YF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(X_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new YF,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(X_.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))}};X_.ModuleNameTrie=yJ});var ZOe=F(KF=>{"use strict";m();Object.defineProperty(KF,"__esModule",{value:!0});KF.RequireInTheMiddleSingleton=void 0;var KTt=MS(),JOe=Ge("path"),TJ=KOe(),JTt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),IJ=class e{_moduleNameTrie=new TJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new KTt.Hook(null,{internals:!0},(t,n,r)=>{let o=ZTt(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 JTt?new e:this._instance=this._instance??new e}};KF.RequireInTheMiddleSingleton=IJ;function ZTt(e){return JOe.sep!==TJ.ModuleNameSeparator?e.split(JOe.sep).join(TJ.ModuleNameSeparator):e}});var CJ=F(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.isWrapped=eE.safeExecuteInTheMiddleAsync=eE.safeExecuteInTheMiddle=void 0;function WTt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}eE.safeExecuteInTheMiddle=WTt;async function XTt(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}}eE.safeExecuteInTheMiddleAsync=XTt;function eIt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}eE.isWrapped=eIt});var ewe=F(JF=>{"use strict";m();Object.defineProperty(JF,"__esModule",{value:!0});JF.InstrumentationBase=void 0;var fO=Ge("path"),WOe=Ge("util"),tIt=qOe(),bJ=_J(),nIt=YOe(),rIt=ZOe(),oIt=iK(),AO=(je(),Me(We)),iIt=MS(),aIt=Ge("fs"),sIt=CJ(),vJ=class extends nIt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=rIt.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,sIt.isWrapped)(t[n])&&this._unwrap(t,n),WOe.types.isProxy(t)){let o=(0,bJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,bJ.wrap)(t,n,r)};_unwrap=(t,n)=>WOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,bJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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=Ge.resolve(n);Ge.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,aIt.readFileSync)(fO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{AO.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 XOe(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=fO.normalize(r);return a.filter(g=>g.name===c).filter(g=>XOe(g.supportedVersions,i,t.includePrerelease)).reduce((g,h)=>(h.moduleExports=g,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(g,t.moduleVersion)):g),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&&fO.isAbsolute(c)){let g=fO.parse(c);c=g.name,d=g.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=fO.isAbsolute(t.name)?new iIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new oIt.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}};JF.InstrumentationBase=vJ;function XOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,tIt.satisfies)(t,r,{includePrerelease:n}))}});var twe=F(ZF=>{"use strict";m();Object.defineProperty(ZF,"__esModule",{value:!0});ZF.normalize=void 0;var uIt=Ge("path");Object.defineProperty(ZF,"normalize",{enumerable:!0,get:function(){return uIt.normalize}})});var nwe=F(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.normalize=zv.InstrumentationBase=void 0;var cIt=ewe();Object.defineProperty(zv,"InstrumentationBase",{enumerable:!0,get:function(){return cIt.InstrumentationBase}});var lIt=twe();Object.defineProperty(zv,"normalize",{enumerable:!0,get:function(){return lIt.normalize}})});var RJ=F($v=>{"use strict";m();Object.defineProperty($v,"__esModule",{value:!0});$v.normalize=$v.InstrumentationBase=void 0;var rwe=nwe();Object.defineProperty($v,"InstrumentationBase",{enumerable:!0,get:function(){return rwe.InstrumentationBase}});Object.defineProperty($v,"normalize",{enumerable:!0,get:function(){return rwe.normalize}})});var owe=F(WF=>{"use strict";m();Object.defineProperty(WF,"__esModule",{value:!0});WF.InstrumentationNodeModuleDefinition=void 0;var xJ=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||[]}};WF.InstrumentationNodeModuleDefinition=xJ});var iwe=F(XF=>{"use strict";m();Object.defineProperty(XF,"__esModule",{value:!0});XF.InstrumentationNodeModuleFile=void 0;var dIt=RJ(),DJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,dIt.normalize)(t)}};XF.InstrumentationNodeModuleFile=DJ});var awe=F(yy=>{"use strict";m();Object.defineProperty(yy,"__esModule",{value:!0});yy.semconvStabilityFromStr=yy.SemconvStability=void 0;var e3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(e3=yy.SemconvStability||(yy.SemconvStability={}));function pIt(e,t){let n=e3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=e3.DUPLICATE;break}else o.toLowerCase()===e&&(n=e3.STABLE);return n}yy.semconvStabilityFromStr=pIt});var uwe=F(na=>{"use strict";m();Object.defineProperty(na,"__esModule",{value:!0});na.semconvStabilityFromStr=na.SemconvStability=na.safeExecuteInTheMiddleAsync=na.safeExecuteInTheMiddle=na.isWrapped=na.InstrumentationNodeModuleFile=na.InstrumentationNodeModuleDefinition=na.InstrumentationBase=na.registerInstrumentations=void 0;var fIt=LOe();Object.defineProperty(na,"registerInstrumentations",{enumerable:!0,get:function(){return fIt.registerInstrumentations}});var AIt=RJ();Object.defineProperty(na,"InstrumentationBase",{enumerable:!0,get:function(){return AIt.InstrumentationBase}});var mIt=owe();Object.defineProperty(na,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return mIt.InstrumentationNodeModuleDefinition}});var gIt=iwe();Object.defineProperty(na,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return gIt.InstrumentationNodeModuleFile}});var BJ=CJ();Object.defineProperty(na,"isWrapped",{enumerable:!0,get:function(){return BJ.isWrapped}});Object.defineProperty(na,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddle}});Object.defineProperty(na,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddleAsync}});var swe=awe();Object.defineProperty(na,"SemconvStability",{enumerable:!0,get:function(){return swe.SemconvStability}});Object.defineProperty(na,"semconvStabilityFromStr",{enumerable:!0,get:function(){return swe.semconvStabilityFromStr}})});function EIt(){let e=Vv[OJ];return e?.helper?e.helper:Vv[NJ]?.helper}function SIt(e){let t={helper:e};Vv[OJ]=t,Vv[NJ]=t}function yIt(){delete Vv[OJ],delete Vv[NJ]}function CIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}function dwe(e,t,n,r,o){if(pwe(t.name,o))return;let i={attributes:t.attributes,kind:CIt(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 g=r.get(d);return g?{context:{spanId:g,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)dwe(e,d,n,r,o);a.end(t.endTime)})}function cwe(e,t){return vIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function vIt(e){return e!=null&&typeof e.then=="function"}function pwe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var t3,hIt,_It,NJ,OJ,Vv,TIt,IIt,bIt,fwe,lwe,RIt,xIt,Awe,mwe=O(()=>{m();je();t3=ie(uwe(),1);je();hIt={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"}},_It=hIt.version.split(".")[0],NJ="PRISMA_INSTRUMENTATION",OJ=`V${_It}_PRISMA_INSTRUMENTATION`,Vv=globalThis;TIt=process.env.PRISMA_SHOW_ALL_TRACES==="true",IIt="00-10-10-00";bIt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ht.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:IIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)dwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!TIt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(pwe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return cwe(i,t(i,r))}return n.startActiveSpan(o,e,i=>cwe(i,t(i,r)))}};fwe={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},lwe=fwe.version,RIt=fwe.name,xIt="@prisma/client",Awe=class extends t3.InstrumentationBase{tracerProvider;constructor(e={}){super(RIt,lwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new t3.InstrumentationNodeModuleDefinition(xIt,[lwe])]}enable(){let e=this._config;SIt(new bIt({tracerProvider:this.tracerProvider??Ht.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){yIt()}isEnabled(){return EIt()!==void 0}}});function DIt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function hwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function BIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}var gwe,wJ,NIt,_we,Ewe=O(()=>{m();je();mwe();dt();mr();gwe="Prisma";wJ=class extends Awe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=hwe();DIt(t)&&(t.createEngineSpan=n=>{let r=Ht.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Vo(()=>{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=BIt(i.kind),c=i.parent_span_id,d=i.span_id,g=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:Ks.SAMPLED}})),S=Ht.setSpanContext(Ke.active(),{traceId:g,spanId:c,traceFlags:Ks.SAMPLED});Ke.with(S,()=>{let y={generateTraceId:()=>g,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}})}};NIt=st(gwe,e=>new wJ(e)),_we=e=>({name:gwe,setupOnce(){NIt(e)},setup(t){hwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(kt,"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 Swe=F(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.PACKAGE_NAME=qv.PACKAGE_VERSION=void 0;qv.PACKAGE_VERSION="0.60.0";qv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var kJ=F(MA=>{"use strict";m();Object.defineProperty(MA,"__esModule",{value:!0});MA.HapiLifecycleMethodNames=MA.HapiLayerType=MA.handlerPatched=MA.HapiComponentName=void 0;MA.HapiComponentName="@hapi/hapi";MA.handlerPatched=Symbol("hapi-handler-patched");MA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};MA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var ywe=F(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.ATTR_HTTP_METHOD=void 0;n3.ATTR_HTTP_METHOD="http.method"});var MJ=F(mO=>{"use strict";m();Object.defineProperty(mO,"__esModule",{value:!0});mO.AttributeNames=void 0;var OIt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(OIt=mO.AttributeNames||(mO.AttributeNames={}))});var Cwe=F(ra=>{"use strict";m();Object.defineProperty(ra,"__esModule",{value:!0});ra.getPluginFromInput=ra.getExtMetadata=ra.getRouteMetadata=ra.isPatchableExtMethod=ra.isDirectExtInput=ra.isLifecycleExtEventObj=ra.isLifecycleExtType=ra.getPluginName=void 0;var Twe=(Zn(),Me(Ur)),wIt=ywe(),gO=kJ(),tE=MJ(),Iwe=rn();function kIt(e){return e.name?e.name:e.pkg.name}ra.getPluginName=kIt;var MIt=e=>typeof e=="string"&&gO.HapiLifecycleMethodNames.has(e);ra.isLifecycleExtType=MIt;var PIt=e=>{let t=e?.type;return t!==void 0&&(0,ra.isLifecycleExtType)(t)};ra.isLifecycleExtEventObj=PIt;var UIt=e=>Array.isArray(e)&&e.length<=3&&(0,ra.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ra.isDirectExtInput=UIt;var LIt=e=>!Array.isArray(e);ra.isPatchableExtMethod=LIt;var QIt=(e,t,n)=>{let r={[Twe.ATTR_HTTP_ROUTE]:e.path};t&Iwe.SemconvStability.OLD&&(r[wIt.ATTR_HTTP_METHOD]=e.method),t&Iwe.SemconvStability.STABLE&&(r[Twe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.PLUGIN,r[tE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ra.getRouteMetadata=QIt;var FIt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT,[tE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT},name:r}};ra.getExtMetadata=FIt;var GIt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ra.getPluginFromInput=GIt});var Rwe=F(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.HapiInstrumentation=void 0;var Ql=(je(),Me(We)),bwe=Tr(),hO=rn(),vwe=Swe(),_O=kJ(),Dg=Cwe(),PJ=class extends hO.InstrumentationBase{_semconvStability;constructor(t={}){super(vwe.PACKAGE_NAME,vwe.PACKAGE_VERSION,t),this._semconvStability=(0,hO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new hO.InstrumentationNodeModuleDefinition(_O.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,hO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,hO.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,Dg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Dg.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,Dg.isLifecycleExtType)(d.type)){let g=d,h=r._wrapExtMethods(g.method,d.type,n);g.method=h,a[c]=g}}return t.apply(this,i)}else if((0,Dg.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,Dg.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,Dg.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",g=>n._getServerRoutePatch.bind(n)(g,r)),i._wrap(c,"ext",g=>n._getServerExtPatch.bind(n)(g,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,Dg.isPatchableExtMethod)(t))return t[_O.handlerPatched]===!0?t:(t[_O.handlerPatched]=!0,async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await t.apply(this,a);let c=(0,Dg.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),d),t,void 0,...a)}catch(g){throw d.recordException(g),d.setStatus({code:Ql.SpanStatusCode.ERROR,message:g.message}),g}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[_O.handlerPatched]===!0)return t;t[_O.handlerPatched]=!0;let o=i=>async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await i.call(this,...a);let c=(0,bwe.getRPCMetadata)(Ql.context.active());c?.type===bwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Dg.getRouteMetadata)(t,r._semconvStability,n),g=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),g),()=>i.call(this,...a))}catch(h){throw g.recordException(h),g.setStatus({code:Ql.SpanStatusCode.ERROR,message:h.message}),h}finally{g.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}};r3.HapiInstrumentation=PJ});var xwe=F(Yv=>{"use strict";m();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.AttributeNames=Yv.HapiInstrumentation=void 0;var jIt=Rwe();Object.defineProperty(Yv,"HapiInstrumentation",{enumerable:!0,get:function(){return jIt.HapiInstrumentation}});var HIt=MJ();Object.defineProperty(Yv,"AttributeNames",{enumerable:!0,get:function(){return HIt.AttributeNames}})});var Dwe,Bwe,Nwe,zIt,Owe,wwe=O(()=>{m();Dwe=ie(xwe(),1);mr();Bwe="Hapi",Nwe=st(Bwe,()=>new Dwe.HapiInstrumentation),zIt=()=>({name:Bwe,setupOnce(){Nwe()}}),Owe=zIt});var nE,EO,UJ=O(()=>{m();nE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},EO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var i3,$It,VIt,o3,kwe=O(()=>{m();je();i3=ie(rn(),1);dt();UJ();$It="@sentry/instrumentation-hono",VIt="0.0.1",o3=class extends i3.InstrumentationBase{constructor(t={}){super($It,VIt,t)}init(){return[new i3.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 Ke.with(Ht.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(Is(c))return c.then(d=>{let g=n._determineHandlerType(d);return a.setAttributes({[nE.HONO_TYPE]:g,[nE.HONO_NAME]:g===EO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[nE.HONO_TYPE]:d,[nE.HONO_NAME]:d===EO.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 Is(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?EO.MIDDLEWARE:EO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ui.ERROR,message:n.message}),t.recordException(n))}}});function qIt(e){let t=Ot(e).data,n=t[nE.HONO_TYPE];if(t[Wt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Wt]:`${n}.hono`});let r=t[nE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ng],i=t[BS];typeof o=="string"&&typeof i=="string"&&Cn().setTransactionName(`${i} ${o}`)}var Mwe,Pwe,YIt,Uwe,Lwe=O(()=>{m();Zn();dt();mr();ly();UJ();kwe();Mwe="Hono";Pwe=st(Mwe,()=>new o3({responseHook:e=>{qIt(e)}})),YIt=()=>({name:Mwe,setupOnce(){Pwe()}}),Uwe=YIt});var a3=F(SO=>{"use strict";m();Object.defineProperty(SO,"__esModule",{value:!0});SO.KoaLayerType=void 0;var KIt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(KIt=SO.KoaLayerType||(SO.KoaLayerType={}))});var Qwe=F(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.PACKAGE_NAME=Kv.PACKAGE_VERSION=void 0;Kv.PACKAGE_VERSION="0.62.0";Kv.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var LJ=F(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var JIt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(JIt=yO.AttributeNames||(yO.AttributeNames={}))});var Gwe=F(Jv=>{"use strict";m();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.isLayerIgnored=Jv.getMiddlewareMetadata=void 0;var Fwe=a3(),s3=LJ(),ZIt=(Zn(),Me(Ur)),WIt=(e,t,n,r)=>n?{attributes:{[s3.AttributeNames.KOA_NAME]:r?.toString(),[s3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.ROUTER,[ZIt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[s3.AttributeNames.KOA_NAME]:t.name??"middleware",[s3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Jv.getMiddlewareMetadata=WIt;var XIt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Jv.isLayerIgnored=XIt});var jwe=F(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.kLayerPatched=void 0;u3.kLayerPatched=Symbol("koa-layer-patched")});var Ywe=F(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3.KoaInstrumentation=void 0;var PA=(je(),Me(We)),TO=rn(),Hwe=a3(),zwe=Qwe(),$we=Gwe(),Vwe=Tr(),qwe=jwe(),QJ=class extends TO.InstrumentationBase{constructor(t={}){super(zwe.PACKAGE_NAME,zwe.PACKAGE_VERSION,t)}init(){return new TO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,TO.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,TO.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?Hwe.KoaLayerType.ROUTER:Hwe.KoaLayerType.MIDDLEWARE;return t[qwe.kLayerPatched]===!0||(0,$we.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(PA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[qwe.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,$we.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,Vwe.getRPCMetadata)(PA.context.active());h?.type===Vwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,TO.safeExecuteInTheMiddle)(()=>S(g,{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(),g);return PA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};c3.KoaInstrumentation=QJ});var Kwe=F(rE=>{"use strict";m();Object.defineProperty(rE,"__esModule",{value:!0});rE.KoaLayerType=rE.AttributeNames=rE.KoaInstrumentation=void 0;var eCt=Ywe();Object.defineProperty(rE,"KoaInstrumentation",{enumerable:!0,get:function(){return eCt.KoaInstrumentation}});var tCt=LJ();Object.defineProperty(rE,"AttributeNames",{enumerable:!0,get:function(){return tCt.AttributeNames}});var nCt=a3();Object.defineProperty(rE,"KoaLayerType",{enumerable:!0,get:function(){return nCt.KoaLayerType}})});var Jwe,Zwe,Wwe,rCt,Xwe,eke=O(()=>{m();Jwe=ie(Kwe(),1);Zn();dt();mr();ly();Zwe="Koa",Wwe=st(Zwe,Jwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Lr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Wt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ng],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Cn().setTransactionName(`${c} ${a}`)}})),rCt=(e={})=>({name:Zwe,setupOnce(){Wwe(e)}}),Xwe=rCt});var FJ=F(cf=>{"use strict";m();Object.defineProperty(cf,"__esModule",{value:!0});cf.ConnectNames=cf.ConnectTypes=cf.AttributeNames=void 0;var oCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(oCt=cf.AttributeNames||(cf.AttributeNames={}));var iCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(iCt=cf.ConnectTypes||(cf.ConnectTypes={}));var aCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(aCt=cf.ConnectNames||(cf.ConnectNames={}))});var tke=F(Zv=>{"use strict";m();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.PACKAGE_NAME=Zv.PACKAGE_VERSION=void 0;Zv.PACKAGE_VERSION="0.57.0";Zv.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var nke=F(l3=>{"use strict";m();Object.defineProperty(l3,"__esModule",{value:!0});l3._LAYERS_STORE_PROPERTY=void 0;l3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var rke=F(iE=>{"use strict";m();Object.defineProperty(iE,"__esModule",{value:!0});iE.generateRoute=iE.replaceCurrentStackRoute=iE.addNewStackLayer=void 0;var sCt=(je(),Me(We)),oE=nke(),uCt=e=>{Array.isArray(e[oE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,oE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[oE._LAYERS_STORE_PROPERTY].push("/");let t=e[oE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[oE._LAYERS_STORE_PROPERTY].length?e[oE._LAYERS_STORE_PROPERTY].pop():sCt.diag.warn("Connect: Trying to pop the stack multiple time")}};iE.addNewStackLayer=uCt;var cCt=(e,t)=>{t&&e[oE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};iE.replaceCurrentStackRoute=cCt;var lCt=e=>e[oE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);iE.generateRoute=lCt});var ake=F(aE=>{"use strict";m();Object.defineProperty(aE,"__esModule",{value:!0});aE.ConnectInstrumentation=aE.ANONYMOUS_NAME=void 0;var dCt=(je(),Me(We)),oke=Tr(),Wv=FJ(),ike=tke(),d3=rn(),pCt=(Zn(),Me(Ur)),GJ=rke();aE.ANONYMOUS_NAME="anonymous";var jJ=class extends d3.InstrumentationBase{constructor(t={}){super(ike.PACKAGE_NAME,ike.PACKAGE_VERSION,t)}init(){return[new d3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,d3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,d3.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=Wv.ConnectTypes.REQUEST_HANDLER,i=Wv.ConnectNames.REQUEST_HANDLER,o=t):(r=Wv.ConnectTypes.MIDDLEWARE,i=Wv.ConnectNames.MIDDLEWARE,o=n.name||aE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[pCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Wv.AttributeNames.CONNECT_TYPE]:r,[Wv.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],g=arguments[a],h=arguments[c],S=arguments[d];(0,GJ.replaceCurrentStackRoute)(g,t);let y=(0,oke.getRPCMetadata)(dCt.context.active());t&&y?.type===oke.RPCType.HTTP&&(y.route=(0,GJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||aE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",C);let x=!1;function N(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.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,GJ.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)}}};aE.ConnectInstrumentation=jJ});var uke=F(Jd=>{"use strict";m();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.ConnectTypes=Jd.ConnectNames=Jd.AttributeNames=Jd.ANONYMOUS_NAME=Jd.ConnectInstrumentation=void 0;var ske=ake();Object.defineProperty(Jd,"ConnectInstrumentation",{enumerable:!0,get:function(){return ske.ConnectInstrumentation}});Object.defineProperty(Jd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return ske.ANONYMOUS_NAME}});var HJ=FJ();Object.defineProperty(Jd,"AttributeNames",{enumerable:!0,get:function(){return HJ.AttributeNames}});Object.defineProperty(Jd,"ConnectNames",{enumerable:!0,get:function(){return HJ.ConnectNames}});Object.defineProperty(Jd,"ConnectTypes",{enumerable:!0,get:function(){return HJ.ConnectTypes}})});var cke,lke,dke,fCt,pke,fke=O(()=>{m();cke=ie(uke(),1);mr();lke="Connect",dke=st(lke,()=>new cke.ConnectInstrumentation),fCt=()=>({name:lke,setupOnce(){dke()}}),pke=fCt});var Ake=F(rs=>{"use strict";m();Object.defineProperty(rs,"__esModule",{value:!0});rs.DB_SYSTEM_VALUE_MSSQL=rs.ATTR_NET_PEER_PORT=rs.ATTR_NET_PEER_NAME=rs.ATTR_DB_USER=rs.ATTR_DB_SYSTEM=rs.ATTR_DB_STATEMENT=rs.ATTR_DB_SQL_TABLE=rs.ATTR_DB_NAME=void 0;rs.ATTR_DB_NAME="db.name";rs.ATTR_DB_SQL_TABLE="db.sql.table";rs.ATTR_DB_STATEMENT="db.statement";rs.ATTR_DB_SYSTEM="db.system";rs.ATTR_DB_USER="db.user";rs.ATTR_NET_PEER_NAME="net.peer.name";rs.ATTR_NET_PEER_PORT="net.peer.port";rs.DB_SYSTEM_VALUE_MSSQL="mssql"});var mke=F(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.once=Xv.getSpanName=void 0;function ACt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Xv.getSpanName=ACt;var mCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Xv.once=mCt});var gke=F(eR=>{"use strict";m();Object.defineProperty(eR,"__esModule",{value:!0});eR.PACKAGE_NAME=eR.PACKAGE_VERSION=void 0;eR.PACKAGE_VERSION="0.33.0";eR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var yke=F(uE=>{"use strict";m();Object.defineProperty(uE,"__esModule",{value:!0});uE.TediousInstrumentation=uE.INJECTED_CTX=void 0;var tR=(je(),Me(We)),gCt=Ge("events"),UA=rn(),Ty=(Zn(),Me(Ur)),sE=Ake(),hke=mke(),_ke=gke(),Ske=Symbol("opentelemetry.instrumentation-tedious.current-database");uE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Eke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function p3(e){Object.defineProperty(this,Ske,{value:e,writable:!0})}var zJ=class e extends UA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(_ke.PACKAGE_NAME,_ke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,UA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,UA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new UA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Eke)(0,UA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,UA.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 Eke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return p3.call(this,this.config?.options?.database),this.removeListener("databaseChange",p3),this.on("databaseChange",p3),this.once("end",()=>{this.removeListener("databaseChange",p3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||tR.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,uE.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?.[uE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof gCt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,g=()=>d++,h=()=>c++,S=this[Ske],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_DB_SYSTEM]=sE.DB_SYSTEM_VALUE_MSSQL,C[sE.ATTR_DB_NAME]=S,C[sE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[sE.ATTR_DB_STATEMENT]=y,C[sE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&UA.SemconvStability.STABLE&&(C[Ty.ATTR_DB_NAMESPACE]=S,C[Ty.ATTR_DB_SYSTEM_NAME]=Ty.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[Ty.ATTR_DB_QUERY_TEXT]=y,C[Ty.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_NET_PEER_NAME]=this.config?.server,C[sE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&UA.SemconvStability.STABLE&&(C[Ty.ATTR_SERVER_ADDRESS]=this.config?.server,C[Ty.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,hke.getSpanName)(t,S,y,a.table),{kind:tR.SpanKind.CLIENT,attributes:C}),x=(0,hke.once)(G=>{a.removeListener("done",g),a.removeListener("doneInProc",g),a.removeListener("doneProc",h),a.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",d),G&&v.setStatus({code:tR.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",g),a.on("doneInProc",g),a.on("doneProc",h),a.once("error",x),this.on("end",x),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let N=()=>tR.context.with(tR.trace.setSpan(tR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).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)}}};uE.TediousInstrumentation=zJ});var Tke=F(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.TediousInstrumentation=void 0;var hCt=yke();Object.defineProperty(f3,"TediousInstrumentation",{enumerable:!0,get:function(){return hCt.TediousInstrumentation}})});var Ike,_Ct,Cke,bke,ECt,vke,Rke=O(()=>{m();Ike=ie(Tke(),1);dt();mr();_Ct=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Cke="Tedious",bke=st(Cke,()=>new Ike.TediousInstrumentation({})),ECt=()=>{let e;return{name:Cke,setupOnce(){let t=bke();e=iN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";_Ct.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},vke=ECt});var xke=F(nR=>{"use strict";m();Object.defineProperty(nR,"__esModule",{value:!0});nR.PACKAGE_NAME=nR.PACKAGE_VERSION=void 0;nR.PACKAGE_VERSION="0.57.0";nR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Bke=F(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.GenericPoolInstrumentation=void 0;var rR=(je(),Me(We)),Iy=rn(),Dke=xke(),$J="generic-pool",VJ=class extends Iy.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(Dke.PACKAGE_NAME,Dke.PACKAGE_VERSION,t)}init(){return[new Iy.InstrumentationNodeModuleDefinition($J,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,Iy.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 Iy.InstrumentationNodeModuleDefinition($J,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,Iy.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 Iy.InstrumentationNodeModuleDefinition($J,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,Iy.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=rR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return rR.context.with(rR.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=rR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return rR.context.with(rR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};A3.GenericPoolInstrumentation=VJ});var Nke=F(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3.GenericPoolInstrumentation=void 0;var SCt=Bke();Object.defineProperty(m3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return SCt.GenericPoolInstrumentation}})});var Oke,wke,kke,yCt,Mke,Pke=O(()=>{m();Oke=ie(Nke(),1);dt();mr();wke="GenericPool",kke=st(wke,()=>new Oke.GenericPoolInstrumentation({})),yCt=()=>{let e;return{name:wke,setupOnce(){let t=kke();e=iN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(kt,"auto.db.otel.generic_pool")}))}}},Mke=yCt});var qJ=F(LA=>{"use strict";m();Object.defineProperty(LA,"__esModule",{value:!0});LA.ATTR_NET_PEER_PORT=LA.ATTR_NET_PEER_NAME=LA.ATTR_MESSAGING_SYSTEM=LA.ATTR_MESSAGING_OPERATION=void 0;LA.ATTR_MESSAGING_OPERATION="messaging.operation";LA.ATTR_MESSAGING_SYSTEM="messaging.system";LA.ATTR_NET_PEER_NAME="net.peer.name";LA.ATTR_NET_PEER_PORT="net.peer.port"});var YJ=F(fi=>{"use strict";m();Object.defineProperty(fi,"__esModule",{value:!0});fi.ATTR_MESSAGING_CONVERSATION_ID=fi.OLD_ATTR_MESSAGING_MESSAGE_ID=fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=fi.ATTR_MESSAGING_URL=fi.ATTR_MESSAGING_PROTOCOL_VERSION=fi.ATTR_MESSAGING_PROTOCOL=fi.MESSAGING_OPERATION_VALUE_PROCESS=fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=fi.ATTR_MESSAGING_DESTINATION_KIND=fi.ATTR_MESSAGING_DESTINATION=void 0;fi.ATTR_MESSAGING_DESTINATION="messaging.destination";fi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";fi.MESSAGING_OPERATION_VALUE_PROCESS="process";fi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";fi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";fi.ATTR_MESSAGING_URL="messaging.url";fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";fi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";fi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var KJ=F(Cy=>{"use strict";m();Object.defineProperty(Cy,"__esModule",{value:!0});Cy.DEFAULT_CONFIG=Cy.EndOperation=void 0;var TCt;(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"})(TCt=Cy.EndOperation||(Cy.EndOperation={}));Cy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Fke=F(Ai=>{"use strict";m();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.isConfirmChannelTracing=Ai.unmarkConfirmChannelTracing=Ai.markConfirmChannelTracing=Ai.getConnectionAttributesFromUrl=Ai.getConnectionAttributesFromServer=Ai.normalizeExchange=Ai.CONNECTION_ATTRIBUTES=Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Ai.CHANNEL_SPANS_NOT_ENDED=Ai.MESSAGE_STORED_SPAN=void 0;var JJ=(je(),Me(We)),cE=rn(),g3=(Zn(),Me(Ur)),IO=qJ(),h3=YJ();Ai.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Ai.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Ai.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var ZJ=(0,JJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),ICt=e=>e!==""?e:"<default>";Ai.normalizeExchange=ICt;var CCt=e=>e.replace(/:[^:@/]*@/,":***@"),Uke=(e,t)=>e||(t==="AMQP"?5672:5671),Lke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Qke=e=>e||"localhost",QA=(e,t,n,r)=>n?{[t]:n}:(JJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),bCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[IO.ATTR_MESSAGING_SYSTEM]:t}:{}};Ai.getConnectionAttributesFromServer=bCt;var vCt=(e,t)=>{let n={[h3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Lke(r?.protocol);Object.assign(n,{...QA(e,h3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Qke(r?.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(e,IO.ATTR_NET_PEER_NAME,i,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(e,g3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=Uke(r.port,o);t&cE.SemconvStability.OLD&&Object.assign(n,QA(e,IO.ATTR_NET_PEER_PORT,a,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(e,g3.ATTR_SERVER_PORT,a,"port"))}else{let r=CCt(e);n[h3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Lke(o.protocol);Object.assign(n,{...QA(r,h3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Qke(o.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(r,IO.ATTR_NET_PEER_NAME,a,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(r,g3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=Uke(o.port?parseInt(o.port):void 0,i);t&cE.SemconvStability.OLD&&Object.assign(n,QA(r,IO.ATTR_NET_PEER_PORT,c,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(r,g3.ATTR_SERVER_PORT,c,"port"))}catch(o){JJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ai.getConnectionAttributesFromUrl=vCt;var RCt=e=>e.setValue(ZJ,!0);Ai.markConfirmChannelTracing=RCt;var xCt=e=>e.deleteValue(ZJ);Ai.unmarkConfirmChannelTracing=xCt;var DCt=e=>e.getValue(ZJ)===!0;Ai.isConfirmChannelTracing=DCt});var Gke=F(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.PACKAGE_NAME=oR.PACKAGE_VERSION=void 0;oR.PACKAGE_VERSION="0.61.0";oR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var Hke=F(S3=>{"use strict";m();Object.defineProperty(S3,"__esModule",{value:!0});S3.AmqplibInstrumentation=void 0;var Jo=(je(),Me(We)),_3=Tr(),Cr=rn(),BCt=qJ(),Fl=YJ(),Vu=KJ(),mi=Fke(),jke=Gke(),E3=[">=0.5.5 <1"],WJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(jke.PACKAGE_NAME,jke.PACKAGE_VERSION,{...Vu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Vu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",E3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",E3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Cr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Cr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Cr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Vu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Vu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Vu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Vu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Vu.EndOperation.NackAll)),(0,Cr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Cr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Cr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Cr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Cr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Cr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Cr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Cr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Cr.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 g=(0,mi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,mi.getConnectionAttributesFromServer)(d);d[mi.CONNECTION_ATTRIBUTES]={...g,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Vu.EndOperation.ChannelClosed,void 0);let i=this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Vu.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 g=this,h=n===Vu.EndOperation.Reject?c:d,S=g[mi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Vu.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,mi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[mi.CHANNEL_SPANS_NOT_ENDED]=[]}let g=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Jo.propagation.extract(Jo.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=y?Jo.trace.getSpan(y)?.spanContext():void 0;y=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Jo.SpanKind.CONSUMER,attributes:{...d?.connection?.[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:C,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[BCt.ATTR_MESSAGING_OPERATION]:Fl.MESSAGING_OPERATION_VALUE_PROCESS,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:N}=r.getConfig();N&&(0,Cr.safeExecuteInTheMiddle)(()=>N(x,{moduleVersion:t,msg:h}),Q=>{Q&&Jo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(d[mi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,_3.hrTime)()}),h[mi.MESSAGE_STORED_SPAN]=x);let k=y||Jo.ROOT_CONTEXT;Jo.context.with(Jo.trace.setSpan(k,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Vu.EndOperation.AutoAck),x.end())};return arguments[1]=g,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,g){let h=this,{span:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Cr.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!0}),k=>{k&&Jo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,Q){try{g?.call(this,k,Q)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Cr.safeExecuteInTheMiddle)(()=>j(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:k}),G=>{G&&Jo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&S.setStatus({code:Jo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,mi.markConfirmChannelTracing)(Jo.context.active()),N=[...arguments];return N[3]=y,N[4]=Jo.context.bind((0,mi.unmarkConfirmChannelTracing)(Jo.trace.setSpan(x,S)),v),Jo.context.with(x,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,mi.isConfirmChannelTracing)(Jo.context.active()))return n.apply(this,arguments);{let g=this,{span:h,modifiedOptions:S}=r.createPublishSpan(r,i,a,g,d),{publishHook:y}=r.getConfig();y&&(0,Cr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),x=>{x&&Jo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let C=[...arguments];C[3]=S;let v=n.apply(this,C);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let a=(0,mi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Jo.SpanKind.PRODUCER,attributes:{...o.connection[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:n,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Jo.propagation.inject(Jo.trace.setSpan(Jo.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[mi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Jo.SpanStatusCode.ERROR,message:r!==Vu.EndOperation.ChannelClosed&&r!==Vu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[mi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[mi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[mi.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Cr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Jo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,_3.hrTime)(),r=t[mi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,_3.hrTimeDuration)(a.timeOfConsume,n);if((0,_3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Vu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};S3.AmqplibInstrumentation=WJ});var $ke=F(lE=>{"use strict";m();Object.defineProperty(lE,"__esModule",{value:!0});lE.EndOperation=lE.DEFAULT_CONFIG=lE.AmqplibInstrumentation=void 0;var NCt=Hke();Object.defineProperty(lE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return NCt.AmqplibInstrumentation}});var zke=KJ();Object.defineProperty(lE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return zke.DEFAULT_CONFIG}});Object.defineProperty(lE,"EndOperation",{enumerable:!0,get:function(){return zke.EndOperation}})});var Vke,qke,OCt,Yke,wCt,Kke,Jke=O(()=>{m();Vke=ie($ke(),1);mr();qke="Amqplib",OCt={consumeEndHook:e=>{Lr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Lr(e,"auto.amqplib.otel.publisher")}},Yke=st(qke,()=>new Vke.AmqplibInstrumentation(OCt)),wCt=()=>({name:qke,setupOnce(){Yke()}}),Kke=wCt});var CO,XJ=O(()=>{m();CO="VercelAI"});function MCt(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 PCt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(UCt(t.content),LCt(t.content))}function UCt(e){for(let t of e){if(!MCt(t))continue;let n=Dq(t.toolCallId);n?xl(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"),tn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):xl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),tn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function LCt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Bq(t.toolCallId)}function QCt(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 T3,kCt,Zke,y3,Wke=O(()=>{m();T3=ie(rn(),1);dt();XJ();kCt=[">=3.0.0 <7"],Zke=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];y3=class e extends T3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new T3.InstrumentationNodeModuleDefinition("ai",kCt,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,g=gt(),h=g?.getIntegrationByName(CO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=QCt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},nf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Ki(x,"_sentry_active_span",Nc())},()=>{},x=>{PCt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of Zke)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=Zke.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function FCt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var Xke,GCt,eMe,tMe=O(()=>{m();dt();mr();XJ();Wke();Xke=st(CO,()=>new y3({}));GCt=(e={})=>{let t;return{name:CO,options:e,setupOnce(){t=Xke()},afterAllSetup(n){e.force??FCt(n)?RL(n):t?.callWhenPatched(()=>RL(n))}}},eMe=GCt});var C3,jCt,I3,nMe=O(()=>{m();C3=ie(rn(),1);dt();jCt=[">=4.0.0 <7"],I3=class extends C3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new C3.InstrumentationNodeModuleDefinition("openai",jCt,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(qS(k_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return BL(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 rMe,HCt,oMe,iMe=O(()=>{m();dt();mr();nMe();rMe=st(k_,e=>new I3(e)),HCt=(e={})=>({name:k_,setupOnce(){rMe(e)}}),oMe=HCt});var v3,zCt,b3,aMe=O(()=>{m();v3=ie(rn(),1);dt();zCt=[">=0.19.2 <1.0.0"],b3=class extends v3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new v3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",zCt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(qS(M_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return NL(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 sMe,$Ct,uMe,cMe=O(()=>{m();dt();mr();aMe();sMe=st(M_,e=>new b3(e)),$Ct=(e={})=>({name:M_,options:e,setupOnce(){sMe(e)}}),uMe=$Ct});var iR,lMe,R3,dMe=O(()=>{m();iR=ie(rn(),1);dt();lMe=[">=0.10.0 <2"],R3=class extends iR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new iR.InstrumentationNodeModuleDefinition("@google/genai",lMe,n=>this._patch(n),n=>n,[new iR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",lMe,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(qS(P_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return OL(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 rN(t,"GoogleGenAI",o),t}}});var pMe,VCt,fMe,AMe=O(()=>{m();dt();mr();dMe();pMe=st(P_,e=>new R3(e)),VCt=(e={})=>({name:P_,setupOnce(){pMe(e)}}),fMe=VCt});function qCt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function YCt(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,g=qCt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var dE,x3,D3,mMe=O(()=>{m();dE=ie(rn(),1);dt();x3=[">=0.1.0 <2.0.0"];D3=class extends dE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,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 dE.InstrumentationNodeModuleDefinition(r,x3,this._patch.bind(this),o=>o,[new dE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,x3,this._patch.bind(this),o=>o)]));return t.push(new dE.InstrumentationNodeModuleDefinition("langchain",x3,this._patch.bind(this),r=>r,[new dE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",x3,this._patch.bind(this),r=>r)])),t}_patch(t){VV([k_,M_,P_]);let n=PL(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 g=a[d];typeof g=="function"&&(a[d]=YCt(g,n))}}}});var gMe,KCt,hMe,_Me=O(()=>{m();dt();mr();mMe();gMe=st(wL,e=>new D3(e)),KCt=(e={})=>({name:wL,setupOnce(){gMe(e)}}),hMe=KCt});var aR,EMe,B3,SMe=O(()=>{m();aR=ie(rn(),1);dt();EMe=[">=0.0.0 <2.0.0"],B3=class extends aR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new aR.InstrumentationNodeModuleDefinition("@langchain/langgraph",EMe,this._patch.bind(this),n=>n,[new aR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",EMe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&LL(t.StateGraph.prototype,this.getConfig()),t}}});var yMe,JCt,TMe,IMe=O(()=>{m();dt();mr();SMe();yMe=st(UL,e=>new B3(e)),JCt=(e={})=>({name:UL,setupOnce(){yMe(e)}}),TMe=JCt});import*as bMe from"node:net";function vMe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Bg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&vl.error(S?.message)},!0)});let d=new Bg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>CMe(h,n,r,e,a)),g=["@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 g)d.files.push(new Bg.InstrumentationNodeModuleFile(h,t,S=>CMe(S,n,r,e,a),S=>RMe(S,r)));return d}function CMe(e,t,n,r,o){return RMe(e,n),t(e,"addDoc",ZCt(r,o)),t(e,"getDocs",XCt(r,o)),t(e,"setDoc",ebt(r,o)),t(e,"deleteDoc",WCt(r,o)),e}function RMe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Bg.isWrapped)(e[n])&&t(e,n);return e}function ZCt(e,t){return function(r){return function(o,i){let a=O3(e,"addDoc",o);return t(a),N3(a,()=>r(o,i))}}}function WCt(e,t){return function(r){return function(o){let i=O3(e,"deleteDoc",o.parent||o);return t(i),N3(i,()=>r(o))}}}function XCt(e,t){return function(r){return function(o){let i=O3(e,"getDocs",o);return t(i),N3(i,()=>r(o))}}}function ebt(e,t){return function(r){return function(o,i,a){let c=O3(e,"setDoc",o.parent||o);return t(c),N3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function N3(e,t){return Ke.with(Ht.setSpan(Ke.active(),e),()=>(0,Bg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function O3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:io.CLIENT});return nbt(r,n),r.setAttribute(VC,t),r}function tbt(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(bMe.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 nbt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[g5]:t.path,[h5]:n.name,[DS]:"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}=tbt(i);c&&(a[b5]=c),d&&(a[v5]=d),e.setAttributes(a)}var Bg,xMe=O(()=>{m();je();Bg=ie(rn(),1);Zn()});function DMe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,g=o.functions?.responseHook;typeof g=="function"&&(a=(y,C)=>{(0,Ng.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&vl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Ng.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&vl.error(C?.message)},!0)});let h=new Ng.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 Ng.InstrumentationNodeModuleFile(y,t,v=>rbt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>BMe(v,r)))}),h}function qu(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(...g){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:io.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),Ke.with(Ht.setSpan(Ke.active(),S),async()=>{let C,v;try{v=await a.apply(this,g)}catch(x){C=x}if(t?.responseHook?.(S,C),C&&S.recordException(C),S.end(),C)throw await t?.errorHook?.(S,C),C;return v})};return c?o.call(this,c,d):o.call(this,d)}}}function rbt(e,t,n,r,o,i){switch(BMe(e,n),i){case"function":t(e,"onRequest",qu(r,o,"http.request")),t(e,"onCall",qu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",qu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",qu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",qu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",qu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",qu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",qu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",qu(r,o,"storage.object.metadataUpdated"));break}return e}function BMe(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,Ng.isWrapped)(e[r])&&t(e,r);return e}var Ng,NMe=O(()=>{m();je();Ng=ie(rn(),1)});var wMe,OMe,obt,ibt,w3,kMe=O(()=>{m();wMe=ie(rn(),1);dt();xMe();NMe();OMe={},obt=[">=3.0.0 <5"],ibt=[">=6.0.0 <7"],w3=class extends wMe.InstrumentationBase{constructor(t=OMe){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...OMe,...t})}init(){let t=[];return t.push(vMe(this.tracer,obt,this._wrap,this._unwrap,this.getConfig())),t.push(DMe(this.tracer,ibt,this._wrap,this._unwrap,this.getConfig())),t}}});var MMe,abt,PMe,sbt,UMe,LMe=O(()=>{m();dt();mr();kMe();MMe="Firebase",abt={firestoreSpanCreationHook:e=>{Lr(e,"auto.firebase.otel.firestore"),e.setAttribute(Wt,"db.query")},functions:{requestHook:e=>{Lr(e,"auto.firebase.otel.functions"),e.setAttribute(Wt,"http.request")},errorHook:async(e,t)=>{t&&(tn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Bb(2e3))}}},PMe=st(MMe,()=>new w3(abt)),sbt=()=>({name:MMe,setupOnce(){PMe()}}),UMe=sbt});function QMe(){return[jxe(),T1e(),K1e(),Uwe(),PBe(),ZBe(),cNe(),yNe(),XNe(),SOe(),_we(),Owe(),Xwe(),pke(),vke(),Mke(),pBe(),Kke(),IBe(),hMe(),TMe(),eMe(),oMe(),uMe(),fMe(),COe(),UMe()]}var FMe=O(()=>{m();Jke();cMe();fke();Hxe();b1e();LMe();Pke();AMe();Z1e();wwe();Lwe();fBe();eke();_Me();IMe();CBe();UBe();WBe();lNe();TNe();iMe();yOe();bOe();Ewe();eOe();Rke();tMe()});function jMe(e,t={}){e.getOptions().debug&&sY();let[n,r]=ubt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function ubt(e,t={}){let n=new GMe.BasicTracerProvider({sampler:new zQ(e),resource:(0,k3.defaultResource)().merge((0,k3.resourceFromAttributes)({[R5]:"node",[m5]:"sentry",[x5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new HQ({timeout:cbt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ht.setGlobalTracerProvider(n),Vp.setGlobalPropagator(new jQ);let r=new VQ;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function cbt(e){if(e!=null){if(e>eZ)return Ta&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${eZ}`),eZ;if(e<=0||Number.isNaN(e)){Ta&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var k3,GMe,eZ,HMe=O(()=>{m();je();k3=ie(S7(),1),GMe=ie(V7(),1);Zn();dt();mr();uv();ly();eZ=1e6});function zMe(){return XQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(_xe(),Rxe())}function $Me(e){return[...zMe(),...xi(e)?QMe():[]]}function tZ(e={}){return lbt(e,$Me)}function lbt(e={},t){YS(e,"node");let n=wY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(jMe(n,{spanProcessors:e.openTelemetrySpanProcessors}),e4()),n}var VMe=O(()=>{m();dt();mr();Exe();xxe();FMe();HMe()});var sR=O(()=>{m();VMe();dt();mr()});function Ni(){return dbt}function Yu(){return qMe}function YMe(){return pbt}var dbt,qMe,pbt,Gl=O(()=>{"use strict";m();dbt="prod",qMe="0.1.129",pbt=`@tanagram/lore/${qMe}`});function hbt(e=""){if(!mbt.test(e))return e!==e.toLowerCase()}function KMe(e,t){let n=t??gbt,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 g=hbt(c);if(a===!1){if(i===!1&&g===!0){r.push(o),o=c,i=g;continue}if(i===!0&&g===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=g;continue}}o+=c,i=g,a=d}return r.push(o),r}function _bt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ebt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Sbt(e,t){return e?(Array.isArray(e)?e:KMe(e)).map(n=>_bt(t?.normalize?n.toLowerCase():n)).join(""):""}function vO(e,t){return Ebt(Sbt(e||"",t))}function M3(e,t){return e?(Array.isArray(e)?e:KMe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function JMe(e){return M3(e||"","_")}var mbt,gbt,ZMe=O(()=>{m();mbt=/\d/,gbt=["-","_","/","."]});import{parseArgs as ybt}from"node:util";function Q3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function nZ(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 jl(e){return typeof e=="function"?e():e}function Tbt(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,k]of Object.entries(o)){let Q=k;for(let j of Q)a.set(N,j),c.has(j)||c.set(j,[]),c.get(j).push(N),a.set(j,N),c.has(N)||c.set(N,[]),c.get(N).push(j)}let d={};function g(N){if(n.has(N))return"boolean";let k=c.get(N)||[];for(let Q of k)if(n.has(Q))return"boolean";return"string"}function h(N){if(r.has(N))return!0;let k=c.get(N)||[];for(let Q of k)if(r.has(Q))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:g(N),default:i[N]});for(let[N,k]of a.entries())N.length===1&&d[k]&&!d[k].short&&(d[k].short=N);let y=[],C={};for(let N=0;N<e.length;N++){let k=e[N];if(k==="--"){y.push(...e.slice(N));break}if(k.startsWith("--no-")){let Q=k.slice(5);C[Q]=!0;continue}y.push(k)}let v;try{v=ybt({args:y,options:Object.keys(d).length>0?d:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:y}}let x={_:[]};x._=v.positionals;for(let[N,k]of Object.entries(v.values)){let Q=k;g(N)==="boolean"&&typeof k=="string"?Q=k!=="false":h(N)&&typeof k=="boolean"&&(Q=""),x[N]=Q}for(let[N]of Object.entries(C)){x[N]=!1;let k=a.get(N);k&&(x[k]=!1);let Q=c.get(N);if(Q)for(let j of Q)x[j]=!1}for(let[N,k]of a.entries())x[N]!==void 0&&x[k]===void 0&&(x[k]=x[N]),x[k]!==void 0&&x[N]===void 0&&(x[N]=x[k]),x[N]!==x[k]&&i[k]===x[k]&&(x[k]=x[N]);return x}function Cbt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=ePe(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=vO(c.name),g=M3(c.name);if(d!==c.name||g!==c.name){let h=Q3(n.alias[c.name]||[]);d!==c.name&&!h.includes(d)&&h.push(d),g!==c.name&&!h.includes(g)&&h.push(g),h.length>0&&(n.alias[c.name]=h)}}let o=Tbt(e,n),[...i]=o._,a=new Proxy(o,{get(c,d){return c[d]??c[vO(d)]??c[M3(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 by(`Missing required positional argument: ${c.name.toUpperCase()}`,"EARG");a[c.name]=c.default}}else if(c.type==="enum"){let d=a[c.name],g=c.options||[];if(d!==void 0&&g.length>0&&!g.includes(d))throw new by(`Invalid value for argument: ${lf(`--${c.name}`)} (${lf(d)}). Expected one of: ${g.map(h=>lf(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new by(`Missing required argument: --${c.name}`,"EARG");return a}function ePe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:Q3(r.alias)});return t}async function bbt(e){return Promise.all(e.map(t=>jl(t)))}async function vy(e,t){let n=await jl(e.args||{}),r=Cbt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await bbt(e.plugins??[]),a,c;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let g=await jl(e.subCommands);if(g&&Object.keys(g).length>0){let h=vbt(t.rawArgs,n),S=t.rawArgs[h];if(S){let y=await WMe(g,S);if(!y)throw new by(`Unknown command ${lf(S)}`,"E_UNKNOWN_COMMAND");await vy(y,{rawArgs:t.rawArgs.slice(h+1)})}else{let y=await jl(e.default);if(y){if(e.run)throw new by("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let C=await WMe(g,y);if(!C)throw new by(`Default sub command ${lf(y)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await vy(C,{rawArgs:t.rawArgs})}else if(!e.run)throw new by("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(a=await e.run(o))}catch(g){c=g}let d=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(g){d.push(g)}for(let g of[...i].reverse())try{await g.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 WMe(e,t){if(t in e)return jl(e[t]);for(let n of Object.values(e)){let r=await jl(n),o=await jl(r?.meta);if(o?.alias&&Q3(o.alias).includes(t))return r}}function vbt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&Rbt(r,t)&&n++;continue}return n}return-1}function Rbt(e,t){let n=e.replace(/^-{1,2}/,""),r=vO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===vO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function oZ(e,t){let n=await jl(e.meta||{}),r=ePe(await jl(e.args||{})),o=await jl(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),a=[],c=[],d=[],g=[];for(let C of r)if(C.type==="positional"){let v=C.name.toUpperCase(),x=C.required!==!1&&C.default===void 0;c.push([lf(v+rZ(C)),XMe(C,x)]),g.push(x?`<${v}>`:`[${v}]`)}else{let v=C.required===!0&&C.default===void 0,x=[...(C.alias||[]).map(N=>`-${N}`),`--${C.name}`].join(", ")+rZ(C);if(a.push([lf(x),XMe(C,v)]),C.type==="boolean"&&(C.default===!0||C.negativeDescription)&&!xbt.test(C.name)){let N=[...(C.alias||[]).map(k=>`--no-${k}`),`--no-${C.name}`].join(", ");a.push([lf(N),[C.negativeDescription,v?L3("(Required)"):""].filter(Boolean).join(" ")])}v&&g.push(`--${C.name}`+rZ(C))}if(e.subCommands){let C=[],v=await jl(e.subCommands);for(let[x,N]of Object.entries(v)){let k=await jl((await jl(N))?.meta);if(k?.hidden)continue;let Q=Q3(k?.alias),j=[x,...Q].join(", ");d.push([lf(j),k?.description||""]),C.push(x,...Q)}g.push(C.join("|"))}let h=[],S=n.version||o.version;h.push(L3(`${n.description} (${i+(S?` v${S}`:"")})`),"");let y=a.length>0||c.length>0;return h.push(`${U3(P3("USAGE"))} ${lf(`${i}${y?" [OPTIONS]":""} ${g.join(" ")}`)}`,""),c.length>0&&(h.push(U3(P3("ARGUMENTS")),""),h.push(nZ(c," ")),h.push("")),a.length>0&&(h.push(U3(P3("OPTIONS")),""),h.push(nZ(a," ")),h.push("")),d.length>0&&(h.push(U3(P3("COMMANDS")),""),h.push(nZ(d," ")),h.push("",`Use ${lf(`${i} <command> --help`)} for more information about a command.`)),h.filter(C=>typeof C=="string").join(`
40
40
  `)}function rZ(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${JMe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function XMe(e,t){let n=t?L3("(Required)"):"",r=e.default===void 0?"":L3(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var by,Ibt,F3,P3,lf,L3,U3,xbt,iZ=O(()=>{m();ZMe();by=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};Ibt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),F3=(e,t=39)=>n=>Ibt?n:`\x1B[${e}m${n}\x1B[${t}m`,P3=F3(1,22),lf=F3(36),L3=F3(90),U3=F3(4,24);xbt=/^no[-A-Z]/});function Bbt(e){oPe=e}function j3(){return oPe}function ut(e,t){let n=H3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,j3(),RO].filter(r=>!!r)});e.common.issues.push(n)}function bn(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 Gbt(e,t){return!!((t==="v4"||!t)&&Lbt.test(e)||(t==="v6"||!t)&&Qbt.test(e))}function jbt(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 uR(e){if(e instanceof lu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=df.create(uR(r))}return new lu({...e._def,shape:()=>t})}else return e instanceof wg?new wg({...e._def,type:uR(e.element)}):e instanceof df?df.create(uR(e.unwrap())):e instanceof kg?kg.create(uR(e.unwrap())):e instanceof FA?FA.create(e.items.map(t=>uR(t))):e}function dZ(e,t){let n=pE(e),r=pE(t);if(e===t)return{valid:!0,data:e};if(n===at.object&&r===at.object){let o=_r.objectKeys(t),i=_r.objectKeys(e).filter(c=>o.indexOf(c)!==-1),a={...e,...t};for(let c of i){let d=dZ(e[c],t[c]);if(!d.valid)return{valid:!1};a[c]=d.data}return{valid:!0,data:a}}else if(n===at.array&&r===at.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=dZ(a,c);if(!d.valid)return{valid:!1};o.push(d.data)}return{valid:!0,data:o}}else return n===at.date&&r===at.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function aPe(e,t){return new Uy({values:e,typeName:Yt.ZodEnum,...bn(t)})}var _r,uZ,at,pE,Ve,Dbt,Gc,RO,oPe,H3,Nbt,cu,gn,iPe,Ku,cZ,lZ,xO,z3,Pt,Wd,tPe,vn,Obt,wbt,kbt,Mbt,Pbt,Ubt,Lbt,Qbt,Fbt,fE,Ry,xy,Dy,By,cR,Ny,Oy,AE,Og,pf,lR,wg,lu,wy,G3,$3,ky,FA,V3,dR,pR,q3,My,Py,Uy,Ly,mE,Hl,df,kg,Qy,fR,AR,Hbt,Y3,DO,mR,sPe,zbt,Yt,$bt,uPe,cPe,Vbt,qbt,lPe,Ybt,Kbt,Jbt,Zbt,Wbt,Xbt,evt,tvt,nvt,rvt,ovt,ivt,avt,svt,uvt,cvt,lvt,dvt,pvt,fvt,Avt,mvt,gvt,hvt,nPe,_vt,Evt,Svt,yvt,Tvt,Ivt,Cvt,bvt,vvt,uu,Rvt,aZ,xvt,Zd,pZ,KCn,JCn,ZCn,dPe,Dvt,Bvt,Nvt,Ovt,pPe,fPe,APe,sZ,os,wvt,kvt,Mvt,Pvt,fZ,AZ,mZ,Uvt,rPe,Lvt,Qvt,Fvt,Gvt,gZ,ff=O(()=>{m();(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})(_r||(_r={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(uZ||(uZ={}));at=_r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pE=e=>{switch(typeof e){case"undefined":return at.undefined;case"string":return at.string;case"number":return isNaN(e)?at.nan:at.number;case"boolean":return at.boolean;case"function":return at.function;case"bigint":return at.bigint;case"symbol":return at.symbol;case"object":return Array.isArray(e)?at.array:e===null?at.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?at.promise:typeof Map<"u"&&e instanceof Map?at.map:typeof Set<"u"&&e instanceof Set?at.set:typeof Date<"u"&&e instanceof Date?at.date:at.object;default:return at.unknown}},Ve=_r.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"]),Dbt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Gc=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 g=a.path[d];d===a.path.length-1?(c[g]=c[g]||{_errors:[]},c[g]._errors.push(n(a))):c[g]=c[g]||{_errors:[]},c=c[g],d++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,_r.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()}};Gc.create=e=>new Gc(e);RO=(e,t)=>{let n;switch(e.code){case Ve.invalid_type:e.received===at.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_r.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${_r.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_r.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${_r.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:n="Invalid function arguments";break;case Ve.invalid_return_type:n="Invalid function return type";break;case Ve.invalid_date:n="Invalid date";break;case Ve.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}"`:_r.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ve.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 Ve.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 Ve.custom:n="Invalid input";break;case Ve.invalid_intersection_types:n="Intersection results could not be merged";break;case Ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,_r.assertNever(e)}return{message:n}},oPe=RO;H3=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i},c="",d=r.filter(g=>!!g).slice().reverse();for(let g of d)c=g(a,{data:t,defaultError:c}).message;return{...o,path:i,message:o.message||c}},Nbt=[];cu=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 gn;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 gn;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}}},gn=Object.freeze({status:"aborted"}),iPe=e=>({status:"dirty",value:e}),Ku=e=>({status:"valid",value:e}),cZ=e=>e.status==="aborted",lZ=e=>e.status==="dirty",xO=e=>e.status==="valid",z3=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})(Pt||(Pt={}));Wd=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}},tPe=(e,t)=>{if(xO(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 Gc(e.common.issues);return this._error=n,this._error}}};vn=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 pE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:pE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cu,ctx:{common:t.parent.common,data:t.data,parsedType:pE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(z3(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:pE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return tPe(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:pE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(z3(o)?o:Promise.resolve(o));return tPe(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:Ve.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 Hl({schema:this,typeName:Yt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return df.create(this,this._def)}nullable(){return kg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wg.create(this,this._def)}promise(){return mE.create(this,this._def)}or(t){return wy.create([this,t],this._def)}and(t){return ky.create(this,t,this._def)}transform(t){return new Hl({...bn(this._def),schema:this,typeName:Yt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Qy({...bn(this._def),innerType:this,defaultValue:n,typeName:Yt.ZodDefault})}brand(){return new Y3({typeName:Yt.ZodBranded,type:this,...bn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new fR({...bn(this._def),innerType:this,catchValue:n,typeName:Yt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return DO.create(this,t)}readonly(){return mR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Obt=/^c[^\s-]{8,}$/i,wbt=/^[a-z][a-z0-9]*$/,kbt=/[0-9A-HJKMNP-TV-Z]{26}/,Mbt=/^[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,Pbt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ubt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Lbt=/^(((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}))$/,Qbt=/^(([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})))$/,Fbt=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$");fE=class e extends vn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ve.invalid_string,...Pt.errToObj(r)}),this.nonempty=t=>this.min(1,Pt.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)!==at.string){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.string,received:i.parsedType}),gn}let r=new cu,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.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),ut(o,{code:Ve.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?ut(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&ut(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Pbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"email",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ubt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"emoji",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Mbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"uuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Obt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")wbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid2",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")kbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ulid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ut(o,{validation:"url",code:Ve.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),ut(o,{validation:"regex",code:Ve.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),ut(o,{code:Ve.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),ut(o,{code:Ve.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Fbt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?Gbt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ip",code:Ve.invalid_string,message:i.message}),r.dirty()):_r.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",...Pt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pt.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,...Pt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Pt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Pt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Pt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Pt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Pt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Pt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Pt.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}};fE.create=e=>{var t;return new fE({checks:[],typeName:Yt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...bn(e)})};Ry=class e extends vn{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)!==at.number){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.number,received:i.parsedType}),gn}let r,o=new cu;for(let i of this._def.checks)i.kind==="int"?_r.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.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),ut(r,{code:Ve.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),ut(r,{code:Ve.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?jbt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_finite,message:i.message}),o.dirty()):_r.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Pt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Pt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pt.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"&&_r.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)}};Ry.create=e=>new Ry({checks:[],typeName:Yt.ZodNumber,coerce:e?.coerce||!1,...bn(e)});xy=class e extends vn{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)!==at.bigint){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.bigint,received:i.parsedType}),gn}let r,o=new cu;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),ut(r,{code:Ve.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),ut(r,{code:Ve.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),ut(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):_r.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Pt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pt.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:Pt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pt.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}};xy.create=e=>{var t;return new xy({checks:[],typeName:Yt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...bn(e)})};Dy=class extends vn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==at.boolean){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.boolean,received:r.parsedType}),gn}return Ku(t.data)}};Dy.create=e=>new Dy({typeName:Yt.ZodBoolean,coerce:e?.coerce||!1,...bn(e)});By=class e extends vn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==at.date){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.date,received:i.parsedType}),gn}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_date}),gn}let r=new cu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.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),ut(o,{code:Ve.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):_r.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:Pt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Pt.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}};By.create=e=>new By({checks:[],coerce:e?.coerce||!1,typeName:Yt.ZodDate,...bn(e)});cR=class extends vn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.symbol,received:r.parsedType}),gn}return Ku(t.data)}};cR.create=e=>new cR({typeName:Yt.ZodSymbol,...bn(e)});Ny=class extends vn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.undefined,received:r.parsedType}),gn}return Ku(t.data)}};Ny.create=e=>new Ny({typeName:Yt.ZodUndefined,...bn(e)});Oy=class extends vn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.null,received:r.parsedType}),gn}return Ku(t.data)}};Oy.create=e=>new Oy({typeName:Yt.ZodNull,...bn(e)});AE=class extends vn{constructor(){super(...arguments),this._any=!0}_parse(t){return Ku(t.data)}};AE.create=e=>new AE({typeName:Yt.ZodAny,...bn(e)});Og=class extends vn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ku(t.data)}};Og.create=e=>new Og({typeName:Yt.ZodUnknown,...bn(e)});pf=class extends vn{_parse(t){let n=this._getOrReturnCtx(t);return ut(n,{code:Ve.invalid_type,expected:at.never,received:n.parsedType}),gn}};pf.create=e=>new pf({typeName:Yt.ZodNever,...bn(e)});lR=class extends vn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.void,received:r.parsedType}),gn}return Ku(t.data)}};lR.create=e=>new lR({typeName:Yt.ZodVoid,...bn(e)});wg=class e extends vn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==at.array)return ut(n,{code:Ve.invalid_type,expected:at.array,received:n.parsedType}),gn;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(a||c)&&(ut(n,{code:a?Ve.too_big:Ve.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&&(ut(n,{code:Ve.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&&(ut(n,{code:Ve.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 Wd(n,a,n.path,c)))).then(a=>cu.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new Wd(n,a,n.path,c)));return cu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Pt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Pt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Pt.toString(n)}})}nonempty(t){return this.min(1,t)}};wg.create=(e,t)=>new wg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Yt.ZodArray,...bn(t)});lu=class e extends vn{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=_r.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==at.object){let g=this._getOrReturnCtx(t);return ut(g,{code:Ve.invalid_type,expected:at.object,received:g.parsedType}),gn}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof pf&&this._def.unknownKeys==="strip"))for(let g in o.data)a.includes(g)||c.push(g);let d=[];for(let g of a){let h=i[g],S=o.data[g];d.push({key:{status:"valid",value:g},value:h._parse(new Wd(o,S,o.path,g)),alwaysSet:g in o.data})}if(this._def.catchall instanceof pf){let g=this._def.unknownKeys;if(g==="passthrough")for(let h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(g==="strict")c.length>0&&(ut(o,{code:Ve.unrecognized_keys,keys:c}),r.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let g=this._def.catchall;for(let h of c){let S=o.data[h];d.push({key:{status:"valid",value:h},value:g._parse(new Wd(o,S,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let g=[];for(let h of d){let S=await h.key;g.push({key:S,value:await h.value,alwaysSet:h.alwaysSet})}return g}).then(g=>cu.mergeObjectSync(r,g)):cu.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Pt.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=Pt.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:Yt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return _r.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 _r.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return uR(this)}partial(t){let n={};return _r.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 _r.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof df;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return aPe(_r.objectKeys(this.shape))}};lu.create=(e,t)=>new lu({shape:()=>e,unknownKeys:"strip",catchall:pf.create(),typeName:Yt.ZodObject,...bn(t)});lu.strictCreate=(e,t)=>new lu({shape:()=>e,unknownKeys:"strict",catchall:pf.create(),typeName:Yt.ZodObject,...bn(t)});lu.lazycreate=(e,t)=>new lu({shape:e,unknownKeys:"strip",catchall:pf.create(),typeName:Yt.ZodObject,...bn(t)});wy=class extends vn{_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 Gc(c.ctx.common.issues));return ut(n,{code:Ve.invalid_union,unionErrors:a}),gn}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 g={...n,common:{...n.common,issues:[]},parent:null},h=d._parseSync({data:n.data,path:n.path,parent:g});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:g}),g.common.issues.length&&a.push(g.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(d=>new Gc(d));return ut(n,{code:Ve.invalid_union,unionErrors:c}),gn}}get options(){return this._def.options}};wy.create=(e,t)=>new wy({options:e,typeName:Yt.ZodUnion,...bn(t)});G3=e=>e instanceof My?G3(e.schema):e instanceof Hl?G3(e.innerType()):e instanceof Py?[e.value]:e instanceof Uy?e.options:e instanceof Ly?Object.keys(e.enum):e instanceof Qy?G3(e._def.innerType):e instanceof Ny?[void 0]:e instanceof Oy?[null]:null,$3=class e extends vn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return ut(n,{code:Ve.invalid_type,expected:at.object,received:n.parsedType}),gn;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}):(ut(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),gn)}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=G3(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:Yt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...bn(r)})}};ky=class extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(cZ(i)||cZ(a))return gn;let c=dZ(i.value,a.value);return c.valid?((lZ(i)||lZ(a))&&n.dirty(),{status:n.value,value:c.data}):(ut(r,{code:Ve.invalid_intersection_types}),gn)};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}))}};ky.create=(e,t,n)=>new ky({left:e,right:t,typeName:Yt.ZodIntersection,...bn(n)});FA=class e extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return ut(r,{code:Ve.invalid_type,expected:at.array,received:r.parsedType}),gn;if(r.data.length<this._def.items.length)return ut(r,{code:Ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),gn;!this._def.rest&&r.data.length>this._def.items.length&&(ut(r,{code:Ve.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 Wd(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>cu.mergeArray(n,a)):cu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};FA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new FA({items:e,typeName:Yt.ZodTuple,rest:null,...bn(t)})};V3=class e extends vn{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!==at.object)return ut(r,{code:Ve.invalid_type,expected:at.object,received:r.parsedType}),gn;let o=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)o.push({key:i._parse(new Wd(r,c,r.path,c)),value:a._parse(new Wd(r,r.data[c],r.path,c))});return r.common.async?cu.mergeObjectAsync(n,o):cu.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof vn?new e({keyType:t,valueType:n,typeName:Yt.ZodRecord,...bn(r)}):new e({keyType:fE.create(),valueType:t,typeName:Yt.ZodRecord,...bn(n)})}},dR=class extends vn{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!==at.map)return ut(r,{code:Ve.invalid_type,expected:at.map,received:r.parsedType}),gn;let o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,d],g)=>({key:o._parse(new Wd(r,c,r.path,[g,"key"])),value:i._parse(new Wd(r,d,r.path,[g,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let d of a){let g=await d.key,h=await d.value;if(g.status==="aborted"||h.status==="aborted")return gn;(g.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(g.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let d of a){let g=d.key,h=d.value;if(g.status==="aborted"||h.status==="aborted")return gn;(g.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(g.value,h.value)}return{status:n.value,value:c}}}};dR.create=(e,t,n)=>new dR({valueType:t,keyType:e,typeName:Yt.ZodMap,...bn(n)});pR=class e extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return ut(r,{code:Ve.invalid_type,expected:at.set,received:r.parsedType}),gn;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ut(r,{code:Ve.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&&(ut(r,{code:Ve.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 g=new Set;for(let h of d){if(h.status==="aborted")return gn;h.status==="dirty"&&n.dirty(),g.add(h.value)}return{status:n.value,value:g}}let c=[...r.data.values()].map((d,g)=>i._parse(new Wd(r,d,r.path,g)));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:Pt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Pt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};pR.create=(e,t)=>new pR({valueType:e,minSize:null,maxSize:null,typeName:Yt.ZodSet,...bn(t)});q3=class e extends vn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.function)return ut(n,{code:Ve.invalid_type,expected:at.function,received:n.parsedType}),gn;function r(c,d){return H3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,j3(),RO].filter(g=>!!g),issueData:{code:Ve.invalid_arguments,argumentsError:d}})}function o(c,d){return H3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,j3(),RO].filter(g=>!!g),issueData:{code:Ve.invalid_return_type,returnTypeError:d}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof mE){let c=this;return Ku(async function(...d){let g=new Gc([]),h=await c._def.args.parseAsync(d,i).catch(C=>{throw g.addIssue(r(d,C)),g}),S=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(S,i).catch(C=>{throw g.addIssue(o(S,C)),g})})}else{let c=this;return Ku(function(...d){let g=c._def.args.safeParse(d,i);if(!g.success)throw new Gc([r(d,g.error)]);let h=Reflect.apply(a,this,g.data),S=c._def.returns.safeParse(h,i);if(!S.success)throw new Gc([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:FA.create(t).rest(Og.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||FA.create([]).rest(Og.create()),returns:n||Og.create(),typeName:Yt.ZodFunction,...bn(r)})}},My=class extends vn{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})}};My.create=(e,t)=>new My({getter:e,typeName:Yt.ZodLazy,...bn(t)});Py=class extends vn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ut(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),gn}return{status:"valid",value:t.data}}get value(){return this._def.value}};Py.create=(e,t)=>new Py({value:e,typeName:Yt.ZodLiteral,...bn(t)});Uy=class e extends vn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{expected:_r.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),gn}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),gn}return Ku(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)))}};Uy.create=aPe;Ly=class extends vn{_parse(t){let n=_r.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==at.string&&r.parsedType!==at.number){let o=_r.objectValues(n);return ut(r,{expected:_r.joinValues(o),received:r.parsedType,code:Ve.invalid_type}),gn}if(n.indexOf(t.data)===-1){let o=_r.objectValues(n);return ut(r,{received:r.data,code:Ve.invalid_enum_value,options:o}),gn}return Ku(t.data)}get enum(){return this._def.values}};Ly.create=(e,t)=>new Ly({values:e,typeName:Yt.ZodNativeEnum,...bn(t)});mE=class extends vn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.promise&&n.common.async===!1)return ut(n,{code:Ve.invalid_type,expected:at.promise,received:n.parsedType}),gn;let r=n.parsedType===at.promise?n.data:Promise.resolve(n.data);return Ku(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};mE.create=(e,t)=>new mE({type:e,typeName:Yt.ZodPromise,...bn(t)});Hl=class extends vn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Yt.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=>{ut(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"?gn:(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"?gn:(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(!xO(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=>xO(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);_r.assertNever(o)}};Hl.create=(e,t,n)=>new Hl({schema:e,typeName:Yt.ZodEffects,effect:t,...bn(n)});Hl.createWithPreprocess=(e,t,n)=>new Hl({schema:t,effect:{type:"preprocess",transform:e},typeName:Yt.ZodEffects,...bn(n)});df=class extends vn{_parse(t){return this._getType(t)===at.undefined?Ku(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};df.create=(e,t)=>new df({innerType:e,typeName:Yt.ZodOptional,...bn(t)});kg=class extends vn{_parse(t){return this._getType(t)===at.null?Ku(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};kg.create=(e,t)=>new kg({innerType:e,typeName:Yt.ZodNullable,...bn(t)});Qy=class extends vn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===at.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Qy.create=(e,t)=>new Qy({innerType:e,typeName:Yt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...bn(t)});fR=class extends vn{_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 z3(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Gc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};fR.create=(e,t)=>new fR({innerType:e,typeName:Yt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...bn(t)});AR=class extends vn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.nan,received:r.parsedType}),gn}return{status:"valid",value:t.data}}};AR.create=e=>new AR({typeName:Yt.ZodNaN,...bn(e)});Hbt=Symbol("zod_brand"),Y3=class extends vn{_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}},DO=class e extends vn{_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"?gn:i.status==="dirty"?(n.dirty(),iPe(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"?gn: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:Yt.ZodPipeline})}},mR=class extends vn{_parse(t){let n=this._def.innerType._parse(t);return xO(n)&&(n.value=Object.freeze(n.value)),n}};mR.create=(e,t)=>new mR({innerType:e,typeName:Yt.ZodReadonly,...bn(t)});sPe=(e,t={},n)=>e?AE.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,g=typeof c=="string"?{message:c}:c;o.addIssue({code:"custom",...g,fatal:d})}}):AE.create(),zbt={object:lu.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"})(Yt||(Yt={}));$bt=(e,t={message:`Input not instance of ${e.name}`})=>sPe(n=>n instanceof e,t),uPe=fE.create,cPe=Ry.create,Vbt=AR.create,qbt=xy.create,lPe=Dy.create,Ybt=By.create,Kbt=cR.create,Jbt=Ny.create,Zbt=Oy.create,Wbt=AE.create,Xbt=Og.create,evt=pf.create,tvt=lR.create,nvt=wg.create,rvt=lu.create,ovt=lu.strictCreate,ivt=wy.create,avt=$3.create,svt=ky.create,uvt=FA.create,cvt=V3.create,lvt=dR.create,dvt=pR.create,pvt=q3.create,fvt=My.create,Avt=Py.create,mvt=Uy.create,gvt=Ly.create,hvt=mE.create,nPe=Hl.create,_vt=df.create,Evt=kg.create,Svt=Hl.createWithPreprocess,yvt=DO.create,Tvt=()=>uPe().optional(),Ivt=()=>cPe().optional(),Cvt=()=>lPe().optional(),bvt={string:e=>fE.create({...e,coerce:!0}),number:e=>Ry.create({...e,coerce:!0}),boolean:e=>Dy.create({...e,coerce:!0}),bigint:e=>xy.create({...e,coerce:!0}),date:e=>By.create({...e,coerce:!0})},vvt=gn,uu=Object.freeze({__proto__:null,defaultErrorMap:RO,setErrorMap:Bbt,getErrorMap:j3,makeIssue:H3,EMPTY_PATH:Nbt,addIssueToContext:ut,ParseStatus:cu,INVALID:gn,DIRTY:iPe,OK:Ku,isAborted:cZ,isDirty:lZ,isValid:xO,isAsync:z3,get util(){return _r},get objectUtil(){return uZ},ZodParsedType:at,getParsedType:pE,ZodType:vn,ZodString:fE,ZodNumber:Ry,ZodBigInt:xy,ZodBoolean:Dy,ZodDate:By,ZodSymbol:cR,ZodUndefined:Ny,ZodNull:Oy,ZodAny:AE,ZodUnknown:Og,ZodNever:pf,ZodVoid:lR,ZodArray:wg,ZodObject:lu,ZodUnion:wy,ZodDiscriminatedUnion:$3,ZodIntersection:ky,ZodTuple:FA,ZodRecord:V3,ZodMap:dR,ZodSet:pR,ZodFunction:q3,ZodLazy:My,ZodLiteral:Py,ZodEnum:Uy,ZodNativeEnum:Ly,ZodPromise:mE,ZodEffects:Hl,ZodTransformer:Hl,ZodOptional:df,ZodNullable:kg,ZodDefault:Qy,ZodCatch:fR,ZodNaN:AR,BRAND:Hbt,ZodBranded:Y3,ZodPipeline:DO,ZodReadonly:mR,custom:sPe,Schema:vn,ZodSchema:vn,late:zbt,get ZodFirstPartyTypeKind(){return Yt},coerce:bvt,any:Wbt,array:nvt,bigint:qbt,boolean:lPe,date:Ybt,discriminatedUnion:avt,effect:nPe,enum:mvt,function:pvt,instanceof:$bt,intersection:svt,lazy:fvt,literal:Avt,map:lvt,nan:Vbt,nativeEnum:gvt,never:evt,null:Zbt,nullable:Evt,number:cPe,object:rvt,oboolean:Cvt,onumber:Ivt,optional:_vt,ostring:Tvt,pipeline:yvt,preprocess:Svt,promise:hvt,record:cvt,set:dvt,strictObject:ovt,string:uPe,symbol:Kbt,transformer:nPe,tuple:uvt,undefined:Jbt,union:ivt,unknown:Xbt,void:tvt,NEVER:vvt,ZodIssueCode:Ve,quotelessJson:Dbt,ZodError:Gc}),Rvt=e=>typeof e?.safeParse=="function",aZ=e=>typeof e?.passthrough=="function",xvt=(e,t)=>aZ(e)?aZ(t)?e.merge(t):e:aZ(t)?t:Object.assign({},e,t),Zd=uu.object({name:uu.literal("ZodError"),issues:uu.array(uu.object({path:uu.array(uu.union([uu.string(),uu.number()])),message:uu.string().optional(),code:uu.nativeEnum(uu.ZodIssueCode)}).catchall(uu.any()))}),pZ=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}},KCn=uu.object({message:uu.literal("Request validation failed"),pathParameterErrors:Zd.nullable(),headerErrors:Zd.nullable(),queryParameterErrors:Zd.nullable(),bodyErrors:Zd.nullable()}),JCn=uu.object({pathParameterErrors:Zd.nullable(),headerErrors:Zd.nullable(),queryParameterErrors:Zd.nullable(),bodyErrors:Zd.nullable()}),ZCn=uu.object({paramsResult:Zd.nullable(),headersResult:Zd.nullable(),queryResult:Zd.nullable(),bodyResult:Zd.nullable()}),dPe="zod-ts-rest-polyfill",Dvt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},Bvt=e=>Dvt(e)?e:Rvt(e)?(Object.assign(e,{"~standard":{vendor:dPe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,Nvt=(e,t)=>e?t?e instanceof lu&&t instanceof lu?xvt(e,t):{...e,...t}:e:t,Ovt=(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===dPe?{error:new Gc(r.issues)}:{error:new pZ(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},pPe=Symbol("ContractNoBody"),fPe=e=>"method"in e&&"path"in e,APe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return fPe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:Nvt(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,APe(r,t)]})),sZ=Symbol("ContractPlainType"),os=()=>({router:(e,t)=>APe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>sZ,body:()=>sZ,type:()=>sZ,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>pPe}),wvt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},kvt=(e,t=!1)=>{let n=t?Mvt(e):Pvt(e);return n?.length>0?"?"+n:""},Mvt=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("&"):"",Pvt=e=>e?Object.keys(e).flatMap(t=>fZ(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",fZ=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>fZ(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>fZ(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],AZ=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}},mZ=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 g=e.responses[c.status],h={status:c.status,body:g===pPe?void 0:await c.json(),headers:c.headers},S=Bvt(g);if(S&&(i??e.validateResponseOnClient)){let y=Ovt(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}},Uvt=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},rPe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),Lvt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:d}=e,g=n.api||mZ,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([C,v])=>typeof v=="function"?[C,v(e)]:[C,v])),S={...h&&rPe(h),...rPe(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:Uvt(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)})),g({...y,...a})},Qvt=(e,t,n)=>{let{query:r,params:o,body:i,headers:a,extraHeaders:c,overrideClientOptions:d,fetchOptions:g,cache:h,next:S,...y}=n||{},C={...t,...d},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([N,k])=>[N,String(k)])):{};return{path:Fvt(r,C.baseUrl,v,e,!!C.jsonQuery),clientArgs:C,route:e,body:i,query:r,extraInputArgs:y,fetchOptions:{...h&&{cache:h},...S&&{next:S},...g},headers:{...c,...a}}},Fvt=(e,t,n,r,o)=>{let i=wvt({path:r.path,params:n}),a=kvt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},Gvt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=Qvt(e,t,r),i=await Lvt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new AZ(i,n)}},gZ=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>fPe(r)?[n,Gvt(r,t)]:[n,gZ(r,t)]))});function ne(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 g=a.prototype,h=Object.keys(g);for(let S=0;S<h.length;S++){let y=h[S];y in c||(c[y]=g[y].bind(c))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(c){var d;let g=n?.Parent?new i:this;r(g,c),(d=g._zod).deferred??(d.deferred=[]);for(let h of g._zod.deferred)h();return g}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 gi(e){return e&&Object.assign(Fy,e),Fy}var mPe,hZ,_Z,Af,gE,Fy,Gy=O(()=>{m();hZ=Object.freeze({status:"aborted"});_Z=Symbol("zod_brand"),Af=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},gE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(mPe=globalThis).__zod_globalConfig??(mPe.__zod_globalConfig={});Fy=globalThis.__zod_globalConfig});var Pe={};za(Pe,{BIGINT_FORMAT_RANGES:()=>xZ,Class:()=>SZ,NUMBER_FORMAT_RANGES:()=>RZ,aborted:()=>SE,allowsEval:()=>IZ,assert:()=>Vvt,assertEqual:()=>jvt,assertIs:()=>zvt,assertNever:()=>$vt,assertNotEqual:()=>Hvt,assignProp:()=>_E,base64ToUint8Array:()=>hPe,base64urlToUint8Array:()=>cRt,cached:()=>hR,captureStackTrace:()=>J3,cleanEnum:()=>uRt,cleanRegex:()=>OO,clone:()=>Ju,cloneDef:()=>Yvt,createTransparentProxy:()=>eRt,defineLazy:()=>Gn,esc:()=>K3,escapeRegex:()=>Xd,explicitlyAborted:()=>DZ,extend:()=>rRt,finalizeIssue:()=>Zu,floatSafeRemainder:()=>yZ,getElementAtPath:()=>Kvt,getEnumValues:()=>NO,getLengthableOrigin:()=>MO,getParsedType:()=>Xvt,getSizableOrigin:()=>kO,hexToUint8Array:()=>dRt,isObject:()=>jy,isPlainObject:()=>EE,issue:()=>_R,joinValues:()=>ue,jsonStringifyReplacer:()=>gR,merge:()=>iRt,mergeDefs:()=>Mg,normalizeParams:()=>ze,nullish:()=>hE,numKeys:()=>Wvt,objectClone:()=>qvt,omit:()=>nRt,optionalKeys:()=>vZ,parsedType:()=>we,partial:()=>aRt,pick:()=>tRt,prefixIssues:()=>jc,primitiveTypes:()=>bZ,promiseAllObject:()=>Jvt,propertyKeyTypes:()=>wO,randomString:()=>Zvt,required:()=>sRt,safeExtend:()=>oRt,shallowClone:()=>CZ,slugify:()=>TZ,stringifyPrimitive:()=>Ne,uint8ArrayToBase64:()=>_Pe,uint8ArrayToBase64url:()=>lRt,uint8ArrayToHex:()=>pRt,unwrapMessage:()=>BO});function jvt(e){return e}function Hvt(e){return e}function zvt(e){}function $vt(e){throw new Error("Unexpected value in exhaustive check")}function Vvt(e){}function NO(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=>Ne(n)).join(t)}function gR(e,t){return typeof t=="bigint"?t.toString():t}function hR(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function hE(e){return e==null}function OO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function yZ(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 Gn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==gPe)return r===void 0&&(r=gPe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function qvt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function _E(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mg(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Yvt(e){return Mg(e._zod.def)}function Kvt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function Jvt(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 Zvt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function K3(e){return JSON.stringify(e)}function TZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function jy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function EE(e){if(jy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(jy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function CZ(e){return EE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Wvt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Xd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ju(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ze(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 eRt(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 Ne(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function vZ(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function tRt(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=Mg(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 _E(this,"shape",a),a},checks:[]});return Ju(e,i)}function nRt(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=Mg(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 _E(this,"shape",a),a},checks:[]});return Ju(e,i)}function rRt(e,t){if(!EE(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=Mg(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return _E(this,"shape",i),i}});return Ju(e,o)}function oRt(e,t){if(!EE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Mg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return _E(this,"shape",r),r}});return Ju(e,n)}function iRt(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=Mg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return _E(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ju(e,n)}function aRt(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=Mg(t._zod.def,{get shape(){let c=t._zod.def.shape,d={...c};if(n)for(let g in n){if(!(g in c))throw new Error(`Unrecognized key: "${g}"`);n[g]&&(d[g]=e?new e({type:"optional",innerType:c[g]}):c[g])}else for(let g in c)d[g]=e?new e({type:"optional",innerType:c[g]}):c[g];return _E(this,"shape",d),d},checks:[]});return Ju(t,a)}function sRt(e,t,n){let r=Mg(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 _E(this,"shape",i),i}});return Ju(t,r)}function SE(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 DZ(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 jc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function BO(e){return typeof e=="string"?e:e?.message}function Zu(e,t,n){let r=e.message?e.message:BO(e.inst?._zod.def?.error?.(e))??BO(t?.error?.(e))??BO(n.customError?.(e))??BO(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 kO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function MO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function we(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 _R(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function uRt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function hPe(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 _Pe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function cRt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return hPe(t+n)}function lRt(e){return _Pe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function dRt(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 pRt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var gPe,J3,IZ,Xvt,wO,bZ,RZ,xZ,SZ,Et=O(()=>{m();Gy();gPe=Symbol("evaluating");J3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};IZ=hR(()=>{if(Fy.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});Xvt=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}`)}},wO=new Set(["string","number","symbol"]),bZ=new Set(["string","number","bigint","boolean","symbol","undefined"]);RZ={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]},xZ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};SZ=class{constructor(...t){}}});function UO(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 LO(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,g=0;for(;g<c.length;){let h=c[g];g===c.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(t(a))):d[h]=d[h]||{_errors:[]},d=d[h],g++}}}};return r(e),n}function BZ(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(g=>r({issues:g},[...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 g=[...i,...d.path];if(g.length===0){n.errors.push(t(d));continue}let h=n,S=0;for(;S<g.length;){let y=g[S],C=S===g.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 SPe(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 NZ(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 ${SPe(r.path)}`);return t.join(`
41
41
  `)}var EPe,PO,Hc,OZ=O(()=>{m();Gy();Et();EPe=(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,gR,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},PO=ne("$ZodError",EPe),Hc=ne("$ZodError",EPe,{Parent:Error})});var ER,Z3,SR,W3,yR,wZ,TR,kZ,X3,ARt,e6,mRt,t6,gRt,n6,hRt,r6,_Rt,o6,ERt,i6,SRt,a6,yRt,MZ=O(()=>{m();Gy();OZ();Et();ER=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 Af;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Zu(d,i,gi())));throw J3(c,o?.callee),c}return a.value},Z3=ER(Hc),SR=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=>Zu(d,i,gi())));throw J3(c,o?.callee),c}return a.value},W3=SR(Hc),yR=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 Af;return i.issues.length?{success:!1,error:new(e??PO)(i.issues.map(a=>Zu(a,o,gi())))}:{success:!0,data:i.value}},wZ=yR(Hc),TR=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=>Zu(a,o,gi())))}:{success:!0,data:i.value}},kZ=TR(Hc),X3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return ER(e)(t,n,o)},ARt=X3(Hc),e6=e=>(t,n,r)=>ER(e)(t,n,r),mRt=e6(Hc),t6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return SR(e)(t,n,o)},gRt=t6(Hc),n6=e=>async(t,n,r)=>SR(e)(t,n,r),hRt=n6(Hc),r6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return yR(e)(t,n,o)},_Rt=r6(Hc),o6=e=>(t,n,r)=>yR(e)(t,n,r),ERt=o6(Hc),i6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return TR(e)(t,n,o)},SRt=i6(Hc),a6=e=>async(t,n,r)=>TR(e)(t,n,r),yRt=a6(Hc)});var zl={};za(zl,{base64:()=>ZZ,base64url:()=>s6,bigint:()=>oW,boolean:()=>aW,browserEmail:()=>DRt,cidrv4:()=>KZ,cidrv6:()=>JZ,cuid:()=>PZ,cuid2:()=>UZ,date:()=>eW,datetime:()=>nW,domain:()=>ORt,duration:()=>jZ,e164:()=>XZ,email:()=>zZ,emoji:()=>$Z,extendedDuration:()=>TRt,guid:()=>HZ,hex:()=>wRt,hostname:()=>NRt,html5Email:()=>vRt,httpProtocol:()=>WZ,idnEmail:()=>xRt,integer:()=>iW,ipv4:()=>VZ,ipv6:()=>qZ,ksuid:()=>FZ,lowercase:()=>cW,mac:()=>YZ,md5_base64:()=>MRt,md5_base64url:()=>PRt,md5_hex:()=>kRt,nanoid:()=>GZ,null:()=>sW,number:()=>u6,rfc5322Email:()=>RRt,sha1_base64:()=>LRt,sha1_base64url:()=>QRt,sha1_hex:()=>URt,sha256_base64:()=>GRt,sha256_base64url:()=>jRt,sha256_hex:()=>FRt,sha384_base64:()=>zRt,sha384_base64url:()=>$Rt,sha384_hex:()=>HRt,sha512_base64:()=>qRt,sha512_base64url:()=>YRt,sha512_hex:()=>VRt,string:()=>rW,time:()=>tW,ulid:()=>LZ,undefined:()=>uW,unicodeEmail:()=>yPe,uppercase:()=>lW,uuid:()=>Hy,uuid4:()=>IRt,uuid6:()=>CRt,uuid7:()=>bRt,xid:()=>QZ});function $Z(){return new RegExp(BRt,"u")}function IPe(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 tW(e){return new RegExp(`^${IPe(e)}$`)}function nW(e){let t=IPe({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(`^${TPe}T(?:${r})$`)}function QO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function FO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var PZ,UZ,LZ,QZ,FZ,GZ,jZ,TRt,HZ,Hy,IRt,CRt,bRt,zZ,vRt,RRt,yPe,xRt,DRt,BRt,VZ,qZ,YZ,KZ,JZ,ZZ,s6,NRt,ORt,WZ,XZ,TPe,eW,rW,oW,iW,u6,aW,sW,uW,cW,lW,wRt,kRt,MRt,PRt,URt,LRt,QRt,FRt,GRt,jRt,HRt,zRt,$Rt,VRt,qRt,YRt,c6=O(()=>{m();Et();PZ=/^[cC][0-9a-z]{6,}$/,UZ=/^[0-9a-z]+$/,LZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,QZ=/^[0-9a-vA-V]{20}$/,FZ=/^[A-Za-z0-9]{27}$/,GZ=/^[a-zA-Z0-9_-]{21}$/,jZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,TRt=/^[-+]?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)?)??$/,HZ=/^([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})$/,Hy=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)$/,IRt=Hy(4),CRt=Hy(6),bRt=Hy(7),zZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,vRt=/^[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])?)*$/,RRt=/^(([^<>()\[\]\\.,;:\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,}))$/,yPe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,xRt=yPe,DRt=/^[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])?)*$/,BRt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";VZ=/^(?:(?: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])$/,qZ=/^(([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}|:))$/,YZ=e=>{let t=Xd(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},KZ=/^((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])$/,JZ=/^(([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])$/,ZZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,s6=/^[A-Za-z0-9_-]*$/,NRt=/^(?=.{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])?)*\.?$/,ORt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,WZ=/^https?$/,XZ=/^\+[1-9]\d{6,14}$/,TPe="(?:(?:\\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])))",eW=new RegExp(`^${TPe}$`);rW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},oW=/^-?\d+n?$/,iW=/^-?\d+$/,u6=/^-?\d+(?:\.\d+)?$/,aW=/^(?:true|false)$/i,sW=/^null$/i,uW=/^undefined$/i,cW=/^[^A-Z]*$/,lW=/^[^a-z]*$/,wRt=/^[0-9a-fA-F]*$/;kRt=/^[0-9a-fA-F]{32}$/,MRt=QO(22,"=="),PRt=FO(22),URt=/^[0-9a-fA-F]{40}$/,LRt=QO(27,"="),QRt=FO(27),FRt=/^[0-9a-fA-F]{64}$/,GRt=QO(43,"="),jRt=FO(43),HRt=/^[0-9a-fA-F]{96}$/,zRt=QO(64,""),$Rt=FO(64),VRt=/^[0-9a-fA-F]{128}$/,qRt=QO(86,"=="),YRt=FO(86)});function CPe(e,t,n){e.issues.length&&t.issues.push(...jc(n,e.issues))}var qr,bPe,l6,d6,dW,pW,fW,AW,mW,gW,hW,_W,EW,IR,SW,yW,TW,IW,CW,bW,vW,RW,xW,p6=O(()=>{m();Gy();c6();Et();qr=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),bPe={number:"number",bigint:"bigint",object:"date"},l6=ne("$ZodCheckLessThan",(e,t)=>{qr.init(e,t);let n=bPe[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})}}),d6=ne("$ZodCheckGreaterThan",(e,t)=>{qr.init(e,t);let n=bPe[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})}}),dW=ne("$ZodCheckMultipleOf",(e,t)=>{qr.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):yZ(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})}}),pW=ne("$ZodCheckNumberFormat",(e,t)=>{qr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=RZ[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=iW)}),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})}}),fW=ne("$ZodCheckBigIntFormat",(e,t)=>{qr.init(e,t);let[n,r]=xZ[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})}}),AW=ne("$ZodCheckMaxSize",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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:kO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),mW=ne("$ZodCheckMinSize",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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:kO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),gW=ne("$ZodCheckSizeEquals",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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:kO(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})}}),hW=ne("$ZodCheckMaxLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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=MO(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_W=ne("$ZodCheckMinLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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=MO(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),EW=ne("$ZodCheckLengthEquals",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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=MO(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})}}),IR=ne("$ZodCheckStringFormat",(e,t)=>{var n,r;qr.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=()=>{})}),SW=ne("$ZodCheckRegex",(e,t)=>{IR.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})}}),yW=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=cW),IR.init(e,t)}),TW=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=lW),IR.init(e,t)}),IW=ne("$ZodCheckIncludes",(e,t)=>{qr.init(e,t);let n=Xd(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})}}),CW=ne("$ZodCheckStartsWith",(e,t)=>{qr.init(e,t);let n=new RegExp(`^${Xd(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})}}),bW=ne("$ZodCheckEndsWith",(e,t)=>{qr.init(e,t);let n=new RegExp(`.*${Xd(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})}});vW=ne("$ZodCheckProperty",(e,t)=>{qr.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=>CPe(o,n,t.property));CPe(r,n,t.property)}}),RW=ne("$ZodCheckMimeType",(e,t)=>{qr.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})}}),xW=ne("$ZodCheckOverwrite",(e,t)=>{qr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var GO,DW=O(()=>{m();GO=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(`
@@ -488,7 +488,7 @@ exec ${mue(n)} ${mue(e)} "$@"
488
488
  Authorization expired. Please try again.
489
489
  `);return;case"login_failed":console.log(`
490
490
  Login failed: ${e.message}
491
- `);return}}});var B5e={};za(B5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>Z9e,getOpenBrowserCommand:()=>oVe,loginCommand:()=>Sue,openBrowser:()=>rVe,pollForTokens:()=>nVe,requestDeviceAuthorization:()=>tVe,runLogin:()=>iVe});import{spawn as yHt}from"node:child_process";function Z9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function CHt(e){let n=await zt({token:e}).whoAmI({headers:{}});n.status===200&&(R4e(`lore_${n.body.user.id}`),B4e(Z9e(n.body)))}async function W9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function X9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function eVe(e,t){return new URL(t,e).toString()}async function bHt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function tVe({clientId:e,workosApiOrigin:t}){let n=await fetch(eVe(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await W9e(n);if(!n.ok)throw new Error(X9e(r));return r}async function nVe({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(eVe(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:IHt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let g=await W9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await J9e(c*1e3);break;case"slow_down":c+=1,await J9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(X9e(h))}}}async function rVe(e){let{command:t,args:n}=oVe(process.platform,e);await new Promise((r,o)=>{let i=yHt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function oVe(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 vHt(e){if(!await xn())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function RHt(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:tp()})}catch(r){_e.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function xHt(e){if(WR(e))return`Could not reach the Lore API at ${DE()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`;if(e instanceof Error&&e.message==="WorkOS CLI Auth is not configured.")return e.message}async function iVe({client:e=zt(),enableLaunchAgent:t=Lz,openBrowser:n=rVe,platform:r=process.platform,pollForTokens:o=nVe,requestDeviceAuthorization:i=tVe,getCliAuthConfig:a=bHt,setAccessToken:c=ZR,setRefreshToken:d=tj,cacheAnalyticsDistinctId:g=CHt,timeoutMs:h=THt,progress:S=Y9e}={}){if(await vHt(e)){S({kind:"already_logged_in"});return}try{let y=await a(e),C=await i({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin});S({kind:"device_authorized",userCode:C.user_code,verificationUri:C.verification_uri,verificationUriComplete:C.verification_uri_complete});try{await n(C.verification_uri_complete),S({kind:"browser_opened"})}catch(x){_e.warn("open_browser_failed",{error:x instanceof Error?x.message:String(x)}),S({kind:"browser_open_failed"})}S({kind:"browser_url",url:C.verification_uri_complete}),S({kind:"waiting_for_authorization"});let v=await o({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin,deviceCode:C.device_code,expiresIn:C.expires_in,interval:C.interval,timeoutMs:h});c(v.access_token),v.refresh_token&&d(v.refresh_token),g(v.access_token).catch(x=>{_e.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await RHt(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),bw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),bw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),bw());let C=xHt(y);throw C&&(S({kind:"login_failed",message:C}),bw()),y}}var THt,IHt,J9e,Sue,Hse=O(async()=>{"use strict";m();Yr();Jn();nj();wr();ki();BE();await Fse();await D5e();Hk();nT();K9e();THt=5*60*1e3,IHt="urn:ietf:params:oauth:grant-type:device_code";J9e=e=>new Promise(t=>setTimeout(t,e));Sue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){_e.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,getCliAuthConfig:e?.getCliAuthConfig,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(Au()&&!e?.progress){await x5e(t),await yz({skipIfAlreadyConfigured:!0});return}await iVe({...t,progress:e?.progress})}}});m();m();(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]="558ba719-9184-4dd6-be49-90de69dbed12",e._sentryDebugIdIdentifier="sentry-dbid-558ba719-9184-4dd6-be49-90de69dbed12")}catch{}})();m();m();m();function Ile(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var Cle=Ile();Cle.ok||(process.stderr.write(`lore: ${Cle.message}.
491
+ `);return}}});var B5e={};za(B5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>Z9e,getOpenBrowserCommand:()=>oVe,loginCommand:()=>Sue,openBrowser:()=>rVe,pollForTokens:()=>nVe,requestDeviceAuthorization:()=>tVe,runLogin:()=>iVe});import{spawn as yHt}from"node:child_process";function Z9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function CHt(e){let n=await zt({token:e}).whoAmI({headers:{}});n.status===200&&(R4e(`lore_${n.body.user.id}`),B4e(Z9e(n.body)))}async function W9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function X9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function eVe(e,t){return new URL(t,e).toString()}async function bHt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function tVe({clientId:e,workosApiOrigin:t}){let n=await fetch(eVe(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await W9e(n);if(!n.ok)throw new Error(X9e(r));return r}async function nVe({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(eVe(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:IHt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let g=await W9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await J9e(c*1e3);break;case"slow_down":c+=1,await J9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(X9e(h))}}}async function rVe(e){let{command:t,args:n}=oVe(process.platform,e);await new Promise((r,o)=>{let i=yHt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function oVe(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 vHt(e){if(!await xn())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function RHt(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:tp()})}catch(r){_e.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function xHt(e){if(WR(e))return`Could not reach the Lore API at ${DE()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`;if(e instanceof Error&&e.message==="WorkOS CLI Auth is not configured.")return e.message}async function iVe({client:e=zt(),enableLaunchAgent:t=Lz,openBrowser:n=rVe,platform:r=process.platform,pollForTokens:o=nVe,requestDeviceAuthorization:i=tVe,getCliAuthConfig:a=bHt,setAccessToken:c=ZR,setRefreshToken:d=tj,cacheAnalyticsDistinctId:g=CHt,timeoutMs:h=THt,progress:S=Y9e}={}){if(await vHt(e)){S({kind:"already_logged_in"});return}try{let y=await a(e),C=await i({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin});S({kind:"device_authorized",userCode:C.user_code,verificationUri:C.verification_uri,verificationUriComplete:C.verification_uri_complete});try{await n(C.verification_uri_complete),S({kind:"browser_opened"})}catch(x){_e.warn("open_browser_failed",{error:x instanceof Error?x.message:String(x)}),S({kind:"browser_open_failed"})}S({kind:"browser_url",url:C.verification_uri_complete}),S({kind:"waiting_for_authorization"});let v=await o({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin,deviceCode:C.device_code,expiresIn:C.expires_in,interval:C.interval,timeoutMs:h});c(v.access_token),v.refresh_token&&d(v.refresh_token),g(v.access_token).catch(x=>{_e.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await RHt(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),bw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),bw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),bw());let C=xHt(y);throw C&&(S({kind:"login_failed",message:C}),bw()),y}}var THt,IHt,J9e,Sue,Hse=O(async()=>{"use strict";m();Yr();Jn();nj();wr();ki();BE();await Fse();await D5e();Hk();nT();K9e();THt=5*60*1e3,IHt="urn:ietf:params:oauth:grant-type:device_code";J9e=e=>new Promise(t=>setTimeout(t,e));Sue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){_e.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,getCliAuthConfig:e?.getCliAuthConfig,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(Au()&&!e?.progress){await x5e(t),await yz({skipIfAlreadyConfigured:!0});return}await iVe({...t,progress:e?.progress})}}});m();m();(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]="f39928a9-97db-4d95-9f46-aa45334fc855",e._sentryDebugIdIdentifier="sentry-dbid-f39928a9-97db-4d95-9f46-aa45334fc855")}catch{}})();m();m();m();function Ile(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var Cle=Ile();Cle.ok||(process.stderr.write(`lore: ${Cle.message}.
492
492
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
493
493
  `),process.exit(1));m();sR();Gl();function fbt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var Abt=fbt();tZ({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:Ni(),release:Yu(),sendDefaultPii:!0,enableLogs:!0,spotlight:Abt,tracesSampleRate:1});WU("service_name","lore-cli");sR();iZ();import{realpathSync as j8t}from"node:fs";import{fileURLToPath as H8t,pathToFileURL as kqe}from"node:url";m();m();zG();Yr();Jn();wr();m();function vw(e){let t=e;return t._def??t.def??{}}function Qkt(e){let t=vw(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Vc(e,t,n){let r=Qkt(e);return r===t||r===n}function K4e(e){let t=vw(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function Fkt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=vw(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function mre(e){if(!e||!Vc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=vw(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function J4e(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=vw(t);if(Vc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Vc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Vc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Vc(t,"ZodEffects","effects"))t=i.schema;else if(Vc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function Gkt(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=J4e(e),a=!1,c=n;Vc(c,"ZodArray","array")&&(a=!0,c=K4e(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}:Vc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:Fkt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Vc(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 gre(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=Gkt(i,t);n[o]=a,r[o]={isArray:c,leafKind:jkt(i)}}return{args:n,fields:r}}function hre(e,t={}){let n=mre(e);return n?gre(n,t):{args:{},fields:{}}}function jkt(e){let{inner:t}=J4e(e),n=t;return Vc(n,"ZodArray","array")&&(n=K4e(n)??n),Vc(n,"ZodNumber","number")?"number":Vc(n,"ZodBoolean","boolean")?"boolean":Vc(n,"ZodEnum","enum")?"enum":Vc(n,"ZodString","string")?"string":"other"}function Hkt(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 zkt(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 _re(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 $kt(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 Vkt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Ere(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>Vkt(n,a))}function qkt(e,t,n){return e.resource==="threads"&&t==="id"?$kt(n):n}function Z4e(e){let t=Hkt(JG,e.path),n=mre(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=gre(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=hre(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:hre(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},g=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:g},args:d,async run({args:h,data:S}){_e.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=S;if(!await(y?.getAccessToken??xn)())throw new Fe("not logged in \u2014 run 'lore login' first");let v={};for(let ge of r){let ye=h[ge],be=_re(ye,i.fields[ge])??ye;v[ge]=qkt(e,ge,be)}let x={};for(let[ge,ye]of Object.entries(a.fields)){let be=_re(h[ge],ye);be!==void 0&&(x[ge]=be)}let N={};for(let[ge,ye]of Object.entries(c.fields)){let be=_re(h[ge],ye);be!==void 0&&(N[ge]=be)}let k=[...Ere(t.pathParams,v,"path"),...Ere(t.query,x,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Ere(t.body,N,"body")];if(k.length>0)throw new Fe(`Invalid request for \`lore ${e.resource} ${e.op}\`:
494
494
  ${k.join(`