@tanagram/lore 0.1.102 → 0.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +3 -3
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 $Ve=Object.create;var wk=Object.defineProperty;var VVe=Object.getOwnPropertyDescriptor;var qVe=Object.getOwnPropertyNames;var YVe=Object.getPrototypeOf,KVe=Object.prototype.hasOwnProperty;var Fe=(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),Ga=(e,t)=>{for(var n in t)wk(e,n,{get:t[n],enumerable:!0})},qce=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qVe(t))!KVe.call(e,o)&&o!==n&&wk(e,o,{get:()=>t[o],enumerable:!(r=VVe(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?$Ve(YVe(e)):{},qce(t||!e||!e.__esModule?wk(n,"default",{value:e,enumerable:!0}):n,e)),ke=e=>qce(wk({},"__esModule",{value:!0}),e);var A=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.102"}}catch{}})()});var Km,X8=O(()=>{A();Km="1.9.1"});function JVe(e){let t=new Set([e]),n=new Set,r=e.match(Jce);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let m=d.match(Jce);if(!m)return i(d);let h={major:+m[1],minor:+m[2],patch:+m[3],prerelease:m[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var Jce,Zce,Wce=O(()=>{A();X8();Jce=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Zce=JVe(Km)});function Wf(e,t,n,r=!1){var o;let i=Q1[L1]=(o=Q1[L1])!==null&&o!==void 0?o:{version:Km};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!==Km){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Km}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Km}.`),!0}function _l(e){var t,n;let r=(t=Q1[L1])===null||t===void 0?void 0:t.version;if(!(!r||!Zce(r)))return(n=Q1[L1])===null||n===void 0?void 0:n[e]}function Xf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Km}.`);let n=Q1[L1];n&&delete n[e]}var ZVe,L1,Q1,pS=O(()=>{A();X8();Wce();ZVe=Km.split(".")[0],L1=Symbol.for(`opentelemetry.js.api.${ZVe}`),Q1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function F1(e,t,n){let r=_l("diag");if(r)return r[e](t,...n)}var Mk,Xce=O(()=>{A();pS();Mk=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return F1("debug",this._namespace,t)}error(...t){return F1("error",this._namespace,t)}info(...t){return F1("info",this._namespace,t)}warn(...t){return F1("warn",this._namespace,t)}verbose(...t){return F1("verbose",this._namespace,t)}}});var Aa,kk=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Aa||(Aa={}))});function ele(e,t){e<Aa.NONE?e=Aa.NONE:e>Aa.ALL&&(e=Aa.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",Aa.ERROR),warn:n("warn",Aa.WARN),info:n("info",Aa.INFO),debug:n("debug",Aa.DEBUG),verbose:n("verbose",Aa.VERBOSE)}}var tle=O(()=>{A();kk()});var WVe,ja,fS=O(()=>{A();Xce();tle();kk();pS();WVe="diag",ja=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=_l("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:Aa.INFO})=>{var a,c,d;if(o===n){let S=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=S.stack)!==null&&a!==void 0?a:S.message),!1}typeof i=="number"&&(i={logLevel:i});let m=_l("diag"),h=ele((c=i.logLevel)!==null&&c!==void 0?c:Aa.INFO,o);if(m&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return Wf("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Xf(WVe,n)},n.createComponentLogger=o=>new Mk(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var Pk,nle=O(()=>{A();Pk=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 rle,ole=O(()=>{A();rle=Symbol("BaggageEntryMetadata")});function ile(e={}){return new Pk(new Map(Object.entries(e)))}function ale(e){return typeof e!="string"&&(XVe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:rle,toString(){return e}}}var XVe,e$=O(()=>{A();fS();nle();ole();XVe=ja.instance()});function El(e){return Symbol.for(e)}var t$,RC,G1=O(()=>{A();t$=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}}},RC=new t$});var n$,r$,Uk,sle=O(()=>{A();n$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],r$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(r$[t]=console[t])}Uk=class{constructor(){function t(n){return function(...r){let o=r$[n];if(typeof o!="function"&&(o=r$.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<n$.length;n++)this[n$[n].n]=t(n$[n].c)}}});function ule(){return p$}var o$,xC,i$,a$,s$,u$,j1,c$,l$,d$,p$,eqe,tqe,nqe,rqe,oqe,iqe,aqe,f$=O(()=>{A();o$=class{constructor(){}createGauge(t,n){return tqe}createHistogram(t,n){return nqe}createCounter(t,n){return eqe}createUpDownCounter(t,n){return rqe}createObservableGauge(t,n){return iqe}createObservableCounter(t,n){return oqe}createObservableUpDownCounter(t,n){return aqe}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},xC=class{},i$=class extends xC{add(t,n){}},a$=class extends xC{add(t,n){}},s$=class extends xC{record(t,n){}},u$=class extends xC{record(t,n){}},j1=class{addCallback(t){}removeCallback(t){}},c$=class extends j1{},l$=class extends j1{},d$=class extends j1{},p$=new o$,eqe=new i$,tqe=new s$,nqe=new u$,rqe=new a$,oqe=new c$,iqe=new l$,aqe=new d$});var Lk,cle=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(Lk||(Lk={}))});var Qk,Fk,A$=O(()=>{A();Qk={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},Fk={set(e,t,n){e!=null&&(e[t]=n)}}});var Gk,lle=O(()=>{A();G1();Gk=class{active(){return RC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var m$,sqe,eA,z1=O(()=>{A();lle();pS();fS();m$="context",sqe=new Gk,eA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Wf(m$,t,ja.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 _l(m$)||sqe}disable(){this._getContextManager().disable(),Xf(m$,ja.instance())}}});var Hs,g$=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Hs||(Hs={}))});var H1,AS,jk,zk=O(()=>{A();g$();H1="0000000000000000",AS="00000000000000000000000000000000",jk={traceId:AS,spanId:H1,traceFlags:Hs.NONE}});var tA,Hk=O(()=>{A();zk();tA=class{constructor(t=jk){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 $k(e){return e.getValue(h$)||void 0}function dle(){return $k(eA.getInstance().active())}function $1(e,t){return e.setValue(h$,t)}function ple(e){return e.deleteValue(h$)}function fle(e,t){return $1(e,new tA(t))}function Vk(e){var t;return(t=$k(e))===null||t===void 0?void 0:t.spanContext()}var h$,_$=O(()=>{A();G1();Hk();z1();h$=El("OpenTelemetry Context Key SPAN")});function Ale(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(qk[e.charCodeAt(r)]|0)+(qk[e.charCodeAt(r+1)]|0)+(qk[e.charCodeAt(r+2)]|0)+(qk[e.charCodeAt(r+3)]|0);return n===t}function E$(e){return Ale(e,32)&&e!==AS}function S$(e){return Ale(e,16)&&e!==H1}function Jm(e){return E$(e.traceId)&&S$(e.spanId)}function mle(e){return new tA(e)}var qk,Yk=O(()=>{A();zk();Hk();qk=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 uqe(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 y$,DC,T$=O(()=>{A();z1();_$();Hk();Yk();y$=eA.getInstance(),DC=class{startSpan(t,n,r=y$.active()){if(!!n?.root)return new tA;let i=r&&Vk(r);return uqe(i)&&Jm(i)?new tA(i):new tA}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??y$.active(),m=this.startSpan(t,i,d),h=$1(d,m);return y$.with(h,c,void 0,m)}}});var cqe,BC,I$=O(()=>{A();T$();cqe=new DC,BC=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):cqe}}});var Kk,gle=O(()=>{A();T$();Kk=class{getTracer(t,n,r){return new DC}}});var lqe,mS,C$=O(()=>{A();I$();gle();lqe=new Kk,mS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new BC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:lqe}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 Jk,hle=O(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Jk||(Jk={}))});var oo,_le=O(()=>{A();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(oo||(oo={}))});var ai,Ele=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ai||(ai={}))});function Sle(e){return fqe.test(e)}function yle(e){return Aqe.test(e)&&!mqe.test(e)}var b$,dqe,pqe,fqe,Aqe,mqe,Tle=O(()=>{A();b$="[_0-9a-z-*/]",dqe=`[a-z]${b$}{0,255}`,pqe=`[a-z0-9]${b$}{0,240}@[a-z]${b$}{0,13}`,fqe=new RegExp(`^(?:${dqe}|${pqe})$`),Aqe=/^[ -~]{0,255}[!-~]$/,mqe=/,|=/});var Ile,gqe,Cle,ble,Zk,vle=O(()=>{A();Tle();Ile=32,gqe=512,Cle=",",ble="=",Zk=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+ble+this.get(n)),t),[]).join(Cle)}_parse(t){t.length>gqe||(this._internalState=t.split(Cle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(ble);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Sle(a)&&yle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Ile&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ile))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function Rle(e){return new Zk(e)}var xle=O(()=>{A();vle()});var Ye,Dle=O(()=>{A();z1();Ye=eA.getInstance()});var Sl,Ble=O(()=>{A();fS();Sl=ja.instance()});var v$,Nle,Ole=O(()=>{A();f$();v$=class{getMeter(t,n,r){return p$}},Nle=new v$});var R$,Wk,wle=O(()=>{A();Ole();pS();fS();R$="metrics",Wk=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Wf(R$,t,ja.instance())}getMeterProvider(){return _l(R$)||Nle}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Xf(R$,ja.instance())}}});var x$,Mle=O(()=>{A();wle();x$=Wk.getInstance()});var Xk,kle=O(()=>{A();Xk=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function B$(e){return e.getValue(D$)||void 0}function Ple(){return B$(eA.getInstance().active())}function Ule(e,t){return e.setValue(D$,t)}function Lle(e){return e.deleteValue(D$)}var D$,Qle=O(()=>{A();z1();G1();D$=El("OpenTelemetry Baggage Key")});var N$,hqe,eP,Fle=O(()=>{A();pS();kle();A$();Qle();e$();fS();N$="propagation",hqe=new Xk,eP=class e{constructor(){this.createBaggage=ile,this.getBaggage=B$,this.getActiveBaggage=Ple,this.setBaggage=Ule,this.deleteBaggage=Lle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Wf(N$,t,ja.instance())}inject(t,n,r=Fk){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=Qk){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Xf(N$,ja.instance())}_getGlobalPropagator(){return _l(N$)||hqe}}});var Fp,Gle=O(()=>{A();Fle();Fp=eP.getInstance()});var O$,tP,jle=O(()=>{A();pS();C$();Yk();_$();fS();O$="trace",tP=class e{constructor(){this._proxyTracerProvider=new mS,this.wrapSpanContext=mle,this.isSpanContextValid=Jm,this.deleteSpan=ple,this.getSpan=$k,this.getActiveSpan=dle,this.getSpanContext=Vk,this.setSpan=$1,this.setSpanContext=fle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Wf(O$,this._proxyTracerProvider,ja.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return _l(O$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Xf(O$,ja.instance()),this._proxyTracerProvider=new mS}}});var zt,zle=O(()=>{A();jle();zt=tP.getInstance()});var Ze={};Ga(Ze,{DiagConsoleLogger:()=>Uk,DiagLogLevel:()=>Aa,INVALID_SPANID:()=>H1,INVALID_SPAN_CONTEXT:()=>jk,INVALID_TRACEID:()=>AS,ProxyTracer:()=>BC,ProxyTracerProvider:()=>mS,ROOT_CONTEXT:()=>RC,SamplingDecision:()=>Jk,SpanKind:()=>oo,SpanStatusCode:()=>ai,TraceFlags:()=>Hs,ValueType:()=>Lk,baggageEntryMetadataFromString:()=>ale,context:()=>Ye,createContextKey:()=>El,createNoopMeter:()=>ule,createTraceState:()=>Rle,default:()=>_qe,defaultTextMapGetter:()=>Qk,defaultTextMapSetter:()=>Fk,diag:()=>Sl,isSpanContextValid:()=>Jm,isValidSpanId:()=>S$,isValidTraceId:()=>E$,metrics:()=>x$,propagation:()=>Fp,trace:()=>zt});var _qe,Ge=O(()=>{A();e$();G1();sle();kk();f$();cle();A$();I$();C$();hle();_le();Ele();g$();xle();Yk();zk();Dle();Ble();Mle();Gle();zle();_qe={context:Ye,diag:Sl,metrics:x$,propagation:Fp,trace:zt}});var V1=F($h=>{"use strict";A();Object.defineProperty($h,"__esModule",{value:!0});$h.isTracingSuppressed=$h.unsuppressTracing=$h.suppressTracing=void 0;var Eqe=(Ge(),ke(Ze)),w$=(0,Eqe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Sqe(e){return e.setValue(w$,!0)}$h.suppressTracing=Sqe;function yqe(e){return e.deleteValue(w$)}$h.unsuppressTracing=yqe;function Tqe(e){return e.getValue(w$)===!0}$h.isTracingSuppressed=Tqe});var M$=F($s=>{"use strict";A();Object.defineProperty($s,"__esModule",{value:!0});$s.BAGGAGE_MAX_TOTAL_LENGTH=$s.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=$s.BAGGAGE_MAX_NAME_VALUE_PAIRS=$s.BAGGAGE_HEADER=$s.BAGGAGE_ITEMS_SEPARATOR=$s.BAGGAGE_PROPERTIES_SEPARATOR=$s.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;$s.BAGGAGE_KEY_PAIR_SEPARATOR="=";$s.BAGGAGE_PROPERTIES_SEPARATOR=";";$s.BAGGAGE_ITEMS_SEPARATOR=",";$s.BAGGAGE_HEADER="baggage";$s.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;$s.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;$s.BAGGAGE_MAX_TOTAL_LENGTH=8192});var k$=F(nA=>{"use strict";A();Object.defineProperty(nA,"__esModule",{value:!0});nA.parseKeyPairsIntoRecord=nA.parsePairKeyValue=nA.getKeyPairs=nA.serializeKeyPairs=void 0;var Iqe=(Ge(),ke(Ze)),NC=M$();function Cqe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?NC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>NC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}nA.serializeKeyPairs=Cqe;function bqe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=NC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}nA.getKeyPairs=bqe;function Hle(e){if(!e)return;let t=e.indexOf(NC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(NC.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let m=e.substring(t+1);d=(0,Iqe.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}nA.parsePairKeyValue=Hle;function vqe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(NC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Hle(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}nA.parseKeyPairsIntoRecord=vqe});var $le=F(nP=>{"use strict";A();Object.defineProperty(nP,"__esModule",{value:!0});nP.W3CBaggagePropagator=void 0;var P$=(Ge(),ke(Ze)),Rqe=V1(),gS=M$(),U$=k$(),L$=class{inject(t,n,r){let o=P$.propagation.getBaggage(t);if(!o||(0,Rqe.isTracingSuppressed)(t))return;let i=(0,U$.getKeyPairs)(o).filter(c=>c.length<=gS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,gS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,U$.serializeKeyPairs)(i);a.length>0&&r.set(n,gS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,gS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(gS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(gS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let m=(0,U$.parsePairKeyValue)(d);if(m){let h={value:m.value};m.metadata&&(h.metadata=m.metadata),a[m.key]=h}}),Object.entries(a).length===0)?t:P$.propagation.setBaggage(t,P$.propagation.createBaggage(a))}fields(){return[gS.BAGGAGE_HEADER]}};nP.W3CBaggagePropagator=L$});var Vle=F(rP=>{"use strict";A();Object.defineProperty(rP,"__esModule",{value:!0});rP.AnchoredClock=void 0;var Q$=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}};rP.AnchoredClock=Q$});var Zle=F(Vh=>{"use strict";A();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.isAttributeValue=Vh.isAttributeKey=Vh.sanitizeAttributes=void 0;var qle=(Ge(),ke(Ze));function xqe(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(!Yle(n)){qle.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Kle(r)){qle.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}Vh.sanitizeAttributes=xqe;function Yle(e){return typeof e=="string"&&e!==""}Vh.isAttributeKey=Yle;function Kle(e){return e==null?!0:Array.isArray(e)?Dqe(e):Jle(typeof e)}Vh.isAttributeValue=Kle;function Dqe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(Jle(r)){t=r;continue}return!1}return!1}}return!0}function Jle(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var F$=F(oP=>{"use strict";A();Object.defineProperty(oP,"__esModule",{value:!0});oP.loggingErrorHandler=void 0;var Bqe=(Ge(),ke(Ze));function Nqe(){return e=>{Bqe.diag.error(Oqe(e))}}oP.loggingErrorHandler=Nqe;function Oqe(e){return typeof e=="string"?e:JSON.stringify(wqe(e))}function wqe(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 Xle=F(OC=>{"use strict";A();Object.defineProperty(OC,"__esModule",{value:!0});OC.globalErrorHandler=OC.setGlobalErrorHandler=void 0;var Mqe=F$(),Wle=(0,Mqe.loggingErrorHandler)();function kqe(e){Wle=e}OC.setGlobalErrorHandler=kqe;function Pqe(e){try{Wle(e)}catch{}}OC.globalErrorHandler=Pqe});var rde=F(rA=>{"use strict";A();Object.defineProperty(rA,"__esModule",{value:!0});rA.getStringListFromEnv=rA.getBooleanFromEnv=rA.getStringFromEnv=rA.getNumberFromEnv=void 0;var ede=(Ge(),ke(Ze)),tde=Fe("util");function Uqe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){ede.diag.warn(`Unknown value ${(0,tde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}rA.getNumberFromEnv=Uqe;function nde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}rA.getStringFromEnv=nde;function Lqe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||ede.diag.warn(`Unknown value ${(0,tde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}rA.getBooleanFromEnv=Lqe;function Qqe(e){return nde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}rA.getStringListFromEnv=Qqe});var ode=F(iP=>{"use strict";A();Object.defineProperty(iP,"__esModule",{value:!0});iP._globalThis=void 0;iP._globalThis=globalThis});var ide=F(aP=>{"use strict";A();Object.defineProperty(aP,"__esModule",{value:!0});aP.VERSION=void 0;aP.VERSION="2.6.1"});function Ii(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 G$=O(()=>{A()});var ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,xde,Dde,Bde,Nde,Ode,wde,Mde,kde,Pde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$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,Mpe,kpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$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,Fqe,j$,Gqe,jqe,zqe,Hqe,z$,$qe,Vqe,qqe,Yqe,Kqe,Jqe,Zqe,Wqe,Xqe,e7e,t7e,n7e,r7e,o7e,i7e,a7e,s7e,u7e,H$,c7e,l7e,d7e,p7e,f7e,A7e,m7e,g7e,h7e,_7e,E7e,S7e,$$,y7e,T7e,V$,q$,I7e,C7e,b7e,v7e,R7e,x7e,D7e,B7e,N7e,O7e,w7e,M7e,k7e,P7e,U7e,L7e,Q7e,q1,wC,Y$,F7e,G7e,hS,j7e,z7e,H7e,$7e,K$,J$,V7e,Z$,q7e,Y7e,K7e,J7e,Z7e,W7e,X7e,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,W$,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,xYe,DYe,BYe,NYe,OYe,wYe,MYe,X$,kYe,e5,PYe,UYe,LYe,QYe,FYe,GYe,jYe,zYe,HYe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,Mfe,kfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,xKe,DKe,BKe,NKe,OKe,wKe,MKe,kKe,PKe,UKe,LKe,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,QKe,FKe,GKe,jKe,zKe,HKe,$Ke,VKe,qKe,YKe,KKe,JKe,BAe,NAe,OAe,wAe,MAe,ZKe,WKe,XKe,eJe,tJe,nJe,kAe,PAe,UAe,rJe,oJe,iJe,aJe,LAe,QAe,FAe,GAe,sJe,uJe,cJe,lJe,dJe,jAe,zAe,HAe,$Ae,VAe,qAe,YAe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,KAe,JAe,ZAe,WAe,XAe,SJe,yJe,TJe,IJe,CJe,bJe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,MJe,kJe,PJe,UJe,LJe,QJe,FJe,GJe,jJe,zJe,HJe,$Je,VJe,qJe,yme,Tme,Ime,Cme,bme,YJe,KJe,JJe,ZJe,WJe,XJe,vme,Rme,eZe,tZe,nZe,xme,Dme,rZe,oZe,iZe,Bme,Nme,Ome,wme,Mme,kme,Pme,Ume,Lme,Qme,Fme,Gme,jme,zme,Hme,$me,Vme,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,hZe,_Ze,EZe,SZe,yZe,TZe,IZe,qme,Yme,CZe,bZe,vZe,Kme=O(()=>{A();G$();ade="aws.lambda.invoked_arn",sde="db.system",ude="db.connection_string",cde="db.user",lde="db.jdbc.driver_classname",dde="db.name",pde="db.statement",fde="db.operation",Ade="db.mssql.instance_name",mde="db.cassandra.keyspace",gde="db.cassandra.page_size",hde="db.cassandra.consistency_level",_de="db.cassandra.table",Ede="db.cassandra.idempotence",Sde="db.cassandra.speculative_execution_count",yde="db.cassandra.coordinator.id",Tde="db.cassandra.coordinator.dc",Ide="db.hbase.namespace",Cde="db.redis.database_index",bde="db.mongodb.collection",vde="db.sql.table",Rde="exception.type",xde="exception.message",Dde="exception.stacktrace",Bde="exception.escaped",Nde="faas.trigger",Ode="faas.execution",wde="faas.document.collection",Mde="faas.document.operation",kde="faas.document.time",Pde="faas.document.name",Ude="faas.time",Lde="faas.cron",Qde="faas.coldstart",Fde="faas.invoked_name",Gde="faas.invoked_provider",jde="faas.invoked_region",zde="net.transport",Hde="net.peer.ip",$de="net.peer.port",Vde="net.peer.name",qde="net.host.ip",Yde="net.host.port",Kde="net.host.name",Jde="net.host.connection.type",Zde="net.host.connection.subtype",Wde="net.host.carrier.name",Xde="net.host.carrier.mcc",epe="net.host.carrier.mnc",tpe="net.host.carrier.icc",npe="peer.service",rpe="enduser.id",ope="enduser.role",ipe="enduser.scope",ape="thread.id",spe="thread.name",upe="code.function",cpe="code.namespace",lpe="code.filepath",dpe="code.lineno",ppe="http.method",fpe="http.url",Ape="http.target",mpe="http.host",gpe="http.scheme",hpe="http.status_code",_pe="http.flavor",Epe="http.user_agent",Spe="http.request_content_length",ype="http.request_content_length_uncompressed",Tpe="http.response_content_length",Ipe="http.response_content_length_uncompressed",Cpe="http.server_name",bpe="http.route",vpe="http.client_ip",Rpe="aws.dynamodb.table_names",xpe="aws.dynamodb.consumed_capacity",Dpe="aws.dynamodb.item_collection_metrics",Bpe="aws.dynamodb.provisioned_read_capacity",Npe="aws.dynamodb.provisioned_write_capacity",Ope="aws.dynamodb.consistent_read",wpe="aws.dynamodb.projection",Mpe="aws.dynamodb.limit",kpe="aws.dynamodb.attributes_to_get",Ppe="aws.dynamodb.index_name",Upe="aws.dynamodb.select",Lpe="aws.dynamodb.global_secondary_indexes",Qpe="aws.dynamodb.local_secondary_indexes",Fpe="aws.dynamodb.exclusive_start_table",Gpe="aws.dynamodb.table_count",jpe="aws.dynamodb.scan_forward",zpe="aws.dynamodb.segment",Hpe="aws.dynamodb.total_segments",$pe="aws.dynamodb.count",Vpe="aws.dynamodb.scanned_count",qpe="aws.dynamodb.attribute_definitions",Ype="aws.dynamodb.global_secondary_index_updates",Kpe="messaging.system",Jpe="messaging.destination",Zpe="messaging.destination_kind",Wpe="messaging.temp_destination",Xpe="messaging.protocol",efe="messaging.protocol_version",tfe="messaging.url",nfe="messaging.message_id",rfe="messaging.conversation_id",ofe="messaging.message_payload_size_bytes",ife="messaging.message_payload_compressed_size_bytes",afe="messaging.operation",sfe="messaging.consumer_id",ufe="messaging.rabbitmq.routing_key",cfe="messaging.kafka.message_key",lfe="messaging.kafka.consumer_group",dfe="messaging.kafka.client_id",pfe="messaging.kafka.partition",ffe="messaging.kafka.tombstone",Afe="rpc.system",mfe="rpc.service",gfe="rpc.method",hfe="rpc.grpc.status_code",_fe="rpc.jsonrpc.version",Efe="rpc.jsonrpc.request_id",Sfe="rpc.jsonrpc.error_code",yfe="rpc.jsonrpc.error_message",Tfe="message.type",Ife="message.id",Cfe="message.compressed_size",bfe="message.uncompressed_size",Fqe=ade,j$=sde,Gqe=ude,jqe=cde,zqe=lde,Hqe=dde,z$=pde,$qe=fde,Vqe=Ade,qqe=mde,Yqe=gde,Kqe=hde,Jqe=_de,Zqe=Ede,Wqe=Sde,Xqe=yde,e7e=Tde,t7e=Ide,n7e=Cde,r7e=bde,o7e=vde,i7e=Rde,a7e=xde,s7e=Dde,u7e=Bde,H$=Nde,c7e=Ode,l7e=wde,d7e=Mde,p7e=kde,f7e=Pde,A7e=Ude,m7e=Lde,g7e=Qde,h7e=Fde,_7e=Gde,E7e=jde,S7e=zde,$$=Hde,y7e=$de,T7e=Vde,V$=qde,q$=Yde,I7e=Kde,C7e=Jde,b7e=Zde,v7e=Wde,R7e=Xde,x7e=epe,D7e=tpe,B7e=npe,N7e=rpe,O7e=ope,w7e=ipe,M7e=ape,k7e=spe,P7e=upe,U7e=cpe,L7e=lpe,Q7e=dpe,q1=ppe,wC=fpe,Y$=Ape,F7e=mpe,G7e=gpe,hS=hpe,j7e=_pe,z7e=Epe,H7e=Spe,$7e=ype,K$=Tpe,J$=Ipe,V7e=Cpe,Z$=bpe,q7e=vpe,Y7e=Rpe,K7e=xpe,J7e=Dpe,Z7e=Bpe,W7e=Npe,X7e=Ope,eYe=wpe,tYe=Mpe,nYe=kpe,rYe=Ppe,oYe=Upe,iYe=Lpe,aYe=Qpe,sYe=Fpe,uYe=Gpe,cYe=jpe,lYe=zpe,dYe=Hpe,pYe=$pe,fYe=Vpe,AYe=qpe,mYe=Ype,W$=Kpe,gYe=Jpe,hYe=Zpe,_Ye=Wpe,EYe=Xpe,SYe=efe,yYe=tfe,TYe=nfe,IYe=rfe,CYe=ofe,bYe=ife,vYe=afe,RYe=sfe,xYe=ufe,DYe=cfe,BYe=lfe,NYe=dfe,OYe=pfe,wYe=ffe,MYe=Afe,X$=mfe,kYe=gfe,e5=hfe,PYe=_fe,UYe=Efe,LYe=Sfe,QYe=yfe,FYe=Tfe,GYe=Ife,jYe=Cfe,zYe=bfe,HYe=Ii([ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,xde,Dde,Bde,Nde,Ode,wde,Mde,kde,Pde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$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,Mpe,kpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$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="other_sql",Rfe="mssql",xfe="mysql",Dfe="oracle",Bfe="db2",Nfe="postgresql",Ofe="redshift",wfe="hive",Mfe="cloudscape",kfe="hsqldb",Pfe="progress",Ufe="maxdb",Lfe="hanadb",Qfe="ingres",Ffe="firstsql",Gfe="edb",jfe="cache",zfe="adabas",Hfe="firebird",$fe="derby",Vfe="filemaker",qfe="informix",Yfe="instantdb",Kfe="interbase",Jfe="mariadb",Zfe="netezza",Wfe="pervasive",Xfe="pointbase",eAe="sqlite",tAe="sybase",nAe="teradata",rAe="vertica",oAe="h2",iAe="coldfusion",aAe="cassandra",sAe="hbase",uAe="mongodb",cAe="redis",lAe="couchbase",dAe="couchdb",pAe="cosmosdb",fAe="dynamodb",AAe="neo4j",mAe="geode",gAe="elasticsearch",hAe="memcached",_Ae="cockroachdb",$Ye=vfe,VYe=Rfe,qYe=xfe,YYe=Dfe,KYe=Bfe,JYe=Nfe,ZYe=Ofe,WYe=wfe,XYe=Mfe,eKe=kfe,tKe=Pfe,nKe=Ufe,rKe=Lfe,oKe=Qfe,iKe=Ffe,aKe=Gfe,sKe=jfe,uKe=zfe,cKe=Hfe,lKe=$fe,dKe=Vfe,pKe=qfe,fKe=Yfe,AKe=Kfe,mKe=Jfe,gKe=Zfe,hKe=Wfe,_Ke=Xfe,EKe=eAe,SKe=tAe,yKe=nAe,TKe=rAe,IKe=oAe,CKe=iAe,bKe=aAe,vKe=sAe,RKe=uAe,xKe=cAe,DKe=lAe,BKe=dAe,NKe=pAe,OKe=fAe,wKe=AAe,MKe=mAe,kKe=gAe,PKe=hAe,UKe=_Ae,LKe=Ii([vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,Mfe,kfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae]),EAe="all",SAe="each_quorum",yAe="quorum",TAe="local_quorum",IAe="one",CAe="two",bAe="three",vAe="local_one",RAe="any",xAe="serial",DAe="local_serial",QKe=EAe,FKe=SAe,GKe=yAe,jKe=TAe,zKe=IAe,HKe=CAe,$Ke=bAe,VKe=vAe,qKe=RAe,YKe=xAe,KKe=DAe,JKe=Ii([EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe]),BAe="datasource",NAe="http",OAe="pubsub",wAe="timer",MAe="other",ZKe=BAe,WKe=NAe,XKe=OAe,eJe=wAe,tJe=MAe,nJe=Ii([BAe,NAe,OAe,wAe,MAe]),kAe="insert",PAe="edit",UAe="delete",rJe=kAe,oJe=PAe,iJe=UAe,aJe=Ii([kAe,PAe,UAe]),LAe="alibaba_cloud",QAe="aws",FAe="azure",GAe="gcp",sJe=LAe,uJe=QAe,cJe=FAe,lJe=GAe,dJe=Ii([LAe,QAe,FAe,GAe]),jAe="ip_tcp",zAe="ip_udp",HAe="ip",$Ae="unix",VAe="pipe",qAe="inproc",YAe="other",pJe=jAe,fJe=zAe,AJe=HAe,mJe=$Ae,gJe=VAe,hJe=qAe,_Je=YAe,EJe=Ii([jAe,zAe,HAe,$Ae,VAe,qAe,YAe]),KAe="wifi",JAe="wired",ZAe="cell",WAe="unavailable",XAe="unknown",SJe=KAe,yJe=JAe,TJe=ZAe,IJe=WAe,CJe=XAe,bJe=Ii([KAe,JAe,ZAe,WAe,XAe]),eme="gprs",tme="edge",nme="umts",rme="cdma",ome="evdo_0",ime="evdo_a",ame="cdma2000_1xrtt",sme="hsdpa",ume="hsupa",cme="hspa",lme="iden",dme="evdo_b",pme="lte",fme="ehrpd",Ame="hspap",mme="gsm",gme="td_scdma",hme="iwlan",_me="nr",Eme="nrnsa",Sme="lte_ca",vJe=eme,RJe=tme,xJe=nme,DJe=rme,BJe=ome,NJe=ime,OJe=ame,wJe=sme,MJe=ume,kJe=cme,PJe=lme,UJe=dme,LJe=pme,QJe=fme,FJe=Ame,GJe=mme,jJe=gme,zJe=hme,HJe=_me,$Je=Eme,VJe=Sme,qJe=Ii([eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme]),yme="1.0",Tme="1.1",Ime="2.0",Cme="SPDY",bme="QUIC",YJe=yme,KJe=Tme,JJe=Ime,ZJe=Cme,WJe=bme,XJe={HTTP_1_0:yme,HTTP_1_1:Tme,HTTP_2_0:Ime,SPDY:Cme,QUIC:bme},vme="queue",Rme="topic",eZe=vme,tZe=Rme,nZe=Ii([vme,Rme]),xme="receive",Dme="process",rZe=xme,oZe=Dme,iZe=Ii([xme,Dme]),Bme=0,Nme=1,Ome=2,wme=3,Mme=4,kme=5,Pme=6,Ume=7,Lme=8,Qme=9,Fme=10,Gme=11,jme=12,zme=13,Hme=14,$me=15,Vme=16,aZe=Bme,sZe=Nme,uZe=Ome,cZe=wme,lZe=Mme,dZe=kme,pZe=Pme,fZe=Ume,AZe=Lme,mZe=Qme,gZe=Fme,hZe=Gme,_Ze=jme,EZe=zme,SZe=Hme,yZe=$me,TZe=Vme,IZe={OK:Bme,CANCELLED:Nme,UNKNOWN:Ome,INVALID_ARGUMENT:wme,DEADLINE_EXCEEDED:Mme,NOT_FOUND:kme,ALREADY_EXISTS:Pme,PERMISSION_DENIED:Ume,RESOURCE_EXHAUSTED:Lme,FAILED_PRECONDITION:Qme,ABORTED:Fme,OUT_OF_RANGE:Gme,UNIMPLEMENTED:jme,INTERNAL:zme,UNAVAILABLE:Hme,DATA_LOSS:$me,UNAUTHENTICATED:Vme},qme="SENT",Yme="RECEIVED",CZe=qme,bZe=Yme,vZe=Ii([qme,Yme])});var Jme=O(()=>{A();Kme()});var Zme,Wme,Xme,ege,tge,nge,rge,oge,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,Tge,Ige,Cge,bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,Mge,kge,Pge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$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,RZe,xZe,DZe,BZe,NZe,OZe,wZe,MZe,kZe,PZe,UZe,LZe,QZe,FZe,GZe,jZe,zZe,HZe,$Ze,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,dWe,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,MWe,kWe,PWe,UWe,LWe,QWe,FWe,GWe,jWe,zWe,t5,HWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,Che,bhe,vhe,Rhe,eXe,tXe,nXe,rXe,oXe,xhe,Dhe,Bhe,Nhe,Ohe,whe,Mhe,khe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,$he,Vhe,IXe,CXe,bXe,qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,MXe,kXe,PXe,UXe,LXe,QXe,FXe,GXe,jXe,zXe,HXe,$Xe,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,y_e=O(()=>{A();G$();Zme="cloud.provider",Wme="cloud.account.id",Xme="cloud.region",ege="cloud.availability_zone",tge="cloud.platform",nge="aws.ecs.container.arn",rge="aws.ecs.cluster.arn",oge="aws.ecs.launchtype",ige="aws.ecs.task.arn",age="aws.ecs.task.family",sge="aws.ecs.task.revision",uge="aws.eks.cluster.arn",cge="aws.log.group.names",lge="aws.log.group.arns",dge="aws.log.stream.names",pge="aws.log.stream.arns",fge="container.name",Age="container.id",mge="container.runtime",gge="container.image.name",hge="container.image.tag",_ge="deployment.environment",Ege="device.id",Sge="device.model.identifier",yge="device.model.name",Tge="faas.name",Ige="faas.id",Cge="faas.version",bge="faas.instance",vge="faas.max_memory",Rge="host.id",xge="host.name",Dge="host.type",Bge="host.arch",Nge="host.image.name",Oge="host.image.id",wge="host.image.version",Mge="k8s.cluster.name",kge="k8s.node.name",Pge="k8s.node.uid",Uge="k8s.namespace.name",Lge="k8s.pod.uid",Qge="k8s.pod.name",Fge="k8s.container.name",Gge="k8s.replicaset.uid",jge="k8s.replicaset.name",zge="k8s.deployment.uid",Hge="k8s.deployment.name",$ge="k8s.statefulset.uid",Vge="k8s.statefulset.name",qge="k8s.daemonset.uid",Yge="k8s.daemonset.name",Kge="k8s.job.uid",Jge="k8s.job.name",Zge="k8s.cronjob.uid",Wge="k8s.cronjob.name",Xge="os.type",ehe="os.description",the="os.name",nhe="os.version",rhe="process.pid",ohe="process.executable.name",ihe="process.executable.path",ahe="process.command",she="process.command_line",uhe="process.command_args",che="process.owner",lhe="process.runtime.name",dhe="process.runtime.version",phe="process.runtime.description",fhe="service.name",Ahe="service.namespace",mhe="service.instance.id",ghe="service.version",hhe="telemetry.sdk.name",_he="telemetry.sdk.language",Ehe="telemetry.sdk.version",She="telemetry.auto.version",yhe="webengine.name",The="webengine.version",Ihe="webengine.description",RZe=Zme,xZe=Wme,DZe=Xme,BZe=ege,NZe=tge,OZe=nge,wZe=rge,MZe=oge,kZe=ige,PZe=age,UZe=sge,LZe=uge,QZe=cge,FZe=lge,GZe=dge,jZe=pge,zZe=fge,HZe=Age,$Ze=mge,VZe=gge,qZe=hge,YZe=_ge,KZe=Ege,JZe=Sge,ZZe=yge,WZe=Tge,XZe=Ige,eWe=Cge,tWe=bge,nWe=vge,rWe=Rge,oWe=xge,iWe=Dge,aWe=Bge,sWe=Nge,uWe=Oge,cWe=wge,lWe=Mge,dWe=kge,pWe=Pge,fWe=Uge,AWe=Lge,mWe=Qge,gWe=Fge,hWe=Gge,_We=jge,EWe=zge,SWe=Hge,yWe=$ge,TWe=Vge,IWe=qge,CWe=Yge,bWe=Kge,vWe=Jge,RWe=Zge,xWe=Wge,DWe=Xge,BWe=ehe,NWe=the,OWe=nhe,wWe=rhe,MWe=ohe,kWe=ihe,PWe=ahe,UWe=she,LWe=uhe,QWe=che,FWe=lhe,GWe=dhe,jWe=phe,zWe=fhe,t5=Ahe,HWe=mhe,$We=ghe,VWe=hhe,qWe=_he,YWe=Ehe,KWe=She,JWe=yhe,ZWe=The,WWe=Ihe,XWe=Ii([Zme,Wme,Xme,ege,tge,nge,rge,oge,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,Tge,Ige,Cge,bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,Mge,kge,Pge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$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="alibaba_cloud",bhe="aws",vhe="azure",Rhe="gcp",eXe=Che,tXe=bhe,nXe=vhe,rXe=Rhe,oXe=Ii([Che,bhe,vhe,Rhe]),xhe="alibaba_cloud_ecs",Dhe="alibaba_cloud_fc",Bhe="aws_ec2",Nhe="aws_ecs",Ohe="aws_eks",whe="aws_lambda",Mhe="aws_elastic_beanstalk",khe="azure_vm",Phe="azure_container_instances",Uhe="azure_aks",Lhe="azure_functions",Qhe="azure_app_service",Fhe="gcp_compute_engine",Ghe="gcp_cloud_run",jhe="gcp_kubernetes_engine",zhe="gcp_cloud_functions",Hhe="gcp_app_engine",iXe=xhe,aXe=Dhe,sXe=Bhe,uXe=Nhe,cXe=Ohe,lXe=whe,dXe=Mhe,pXe=khe,fXe=Phe,AXe=Uhe,mXe=Lhe,gXe=Qhe,hXe=Fhe,_Xe=Ghe,EXe=jhe,SXe=zhe,yXe=Hhe,TXe=Ii([xhe,Dhe,Bhe,Nhe,Ohe,whe,Mhe,khe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe]),$he="ec2",Vhe="fargate",IXe=$he,CXe=Vhe,bXe=Ii([$he,Vhe]),qhe="amd64",Yhe="arm32",Khe="arm64",Jhe="ia64",Zhe="ppc32",Whe="ppc64",Xhe="x86",vXe=qhe,RXe=Yhe,xXe=Khe,DXe=Jhe,BXe=Zhe,NXe=Whe,OXe=Xhe,wXe=Ii([qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe]),e_e="windows",t_e="linux",n_e="darwin",r_e="freebsd",o_e="netbsd",i_e="openbsd",a_e="dragonflybsd",s_e="hpux",u_e="aix",c_e="solaris",l_e="z_os",MXe=e_e,kXe=t_e,PXe=n_e,UXe=r_e,LXe=o_e,QXe=i_e,FXe=a_e,GXe=s_e,jXe=u_e,zXe=c_e,HXe=l_e,$Xe=Ii([e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e]),d_e="cpp",p_e="dotnet",f_e="erlang",A_e="go",m_e="java",g_e="nodejs",h_e="php",__e="python",E_e="ruby",S_e="webjs",VXe=d_e,qXe=p_e,YXe=f_e,KXe=A_e,JXe=m_e,ZXe=g_e,WXe=h_e,XXe=__e,eet=E_e,tet=S_e,net=Ii([d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e])});var T_e=O(()=>{A();y_e()});var ret,oet,iet,aet,set,uet,cet,det,pet,fet,Aet,met,get,het,_et,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,n5,r5,Bet,MC,Net,o5,i5,Oet,_S,wet,Met,ket,Pet,Uet,Let,Qet,Fet,Get,jet,a5,zet,Het,$et,Vet,qet,Yet,ES,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,stt,Zm,Wm,utt,ctt,ltt,dtt,ptt,ftt,Att,mtt,gtt,htt,_tt,Ett,Stt,ytt,Ttt,Itt,s5,u5,Ctt,c5,l5,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,Mtt,ktt,Ptt,Utt,Ltt,d5,p5,Qtt,f5,Ftt,A5,Gtt,jtt,ztt,Htt,$tt,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,cnt,lnt,qh,dnt,pnt,fnt,m5,I_e=O(()=>{A();ret="aspnetcore.diagnostics.exception.result",oet="aborted",iet="handled",aet="skipped",set="unhandled",uet="aspnetcore.diagnostics.handler.type",cet="aspnetcore.rate_limiting.policy",det="aspnetcore.rate_limiting.result",pet="acquired",fet="endpoint_limiter",Aet="global_limiter",met="request_canceled",get="aspnetcore.request.is_unhandled",het="aspnetcore.routing.is_fallback",_et="aspnetcore.routing.match_status",Eet="failure",yet="success",Tet="aspnetcore.user.is_authenticated",Iet="client.address",Cet="client.port",bet="code.column.number",vet="code.file.path",Ret="code.function.name",xet="code.line.number",Det="code.stacktrace",n5="db.collection.name",r5="db.namespace",Bet="db.operation.batch.size",MC="db.operation.name",Net="db.query.summary",o5="db.query.text",i5="db.response.status_code",Oet="db.stored_procedure.name",_S="db.system.name",wet="mariadb",Met="microsoft.sql_server",ket="mysql",Pet="postgresql",Uet="dotnet.gc.heap.generation",Let="gen0",Qet="gen1",Fet="gen2",Get="loh",jet="poh",a5="error.type",zet="_OTHER",Het="exception.escaped",$et="exception.message",Vet="exception.stacktrace",qet="exception.type",Yet=e=>`http.request.header.${e}`,ES="http.request.method",Ket="_OTHER",Jet="CONNECT",Zet="DELETE",Wet="GET",Xet="HEAD",ett="OPTIONS",ttt="PATCH",ntt="POST",rtt="PUT",ott="TRACE",itt="http.request.method_original",att="http.request.resend_count",stt=e=>`http.response.header.${e}`,Zm="http.response.status_code",Wm="http.route",utt="jvm.gc.action",ctt="jvm.gc.name",ltt="jvm.memory.pool.name",dtt="jvm.memory.type",ptt="heap",ftt="non_heap",Att="jvm.thread.daemon",mtt="jvm.thread.state",gtt="blocked",htt="new",_tt="runnable",Ett="terminated",Stt="timed_waiting",ytt="waiting",Ttt="network.local.address",Itt="network.local.port",s5="network.peer.address",u5="network.peer.port",Ctt="network.protocol.name",c5="network.protocol.version",l5="network.transport",btt="pipe",vtt="quic",Rtt="tcp",xtt="udp",Dtt="unix",Btt="network.type",Ntt="ipv4",Ott="ipv6",wtt="otel.scope.name",Mtt="otel.scope.version",ktt="otel.status_code",Ptt="ERROR",Utt="OK",Ltt="otel.status_description",d5="server.address",p5="server.port",Qtt="service.instance.id",f5="service.name",Ftt="service.namespace",A5="service.version",Gtt="signalr.connection.status",jtt="app_shutdown",ztt="normal_closure",Htt="timeout",$tt="signalr.transport",Vtt="long_polling",qtt="server_sent_events",Ytt="web_sockets",Ktt="telemetry.sdk.language",Jtt="cpp",Ztt="dotnet",Wtt="erlang",Xtt="go",ent="java",tnt="nodejs",nnt="php",rnt="python",ont="ruby",int="rust",ant="swift",snt="webjs",unt="telemetry.sdk.name",cnt="telemetry.sdk.version",lnt="url.fragment",qh="url.full",dnt="url.path",pnt="url.query",fnt="url.scheme",m5="user_agent.original"});var Ant,mnt,gnt,hnt,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,Ont,wnt,Mnt,knt,Pnt,Unt,Lnt,Qnt,Fnt,Gnt,jnt,znt,Hnt,$nt,Vnt,qnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,C_e=O(()=>{A();Ant="aspnetcore.diagnostics.exceptions",mnt="aspnetcore.rate_limiting.active_request_leases",gnt="aspnetcore.rate_limiting.queued_requests",hnt="aspnetcore.rate_limiting.request.time_in_queue",_nt="aspnetcore.rate_limiting.request_lease.duration",Ent="aspnetcore.rate_limiting.requests",Snt="aspnetcore.routing.match_attempts",ynt="db.client.operation.duration",Tnt="dotnet.assembly.count",Int="dotnet.exceptions",Cnt="dotnet.gc.collections",bnt="dotnet.gc.heap.total_allocated",vnt="dotnet.gc.last_collection.heap.fragmentation.size",Rnt="dotnet.gc.last_collection.heap.size",xnt="dotnet.gc.last_collection.memory.committed_size",Dnt="dotnet.gc.pause.time",Bnt="dotnet.jit.compilation.time",Nnt="dotnet.jit.compiled_il.size",Ont="dotnet.jit.compiled_methods",wnt="dotnet.monitor.lock_contentions",Mnt="dotnet.process.cpu.count",knt="dotnet.process.cpu.time",Pnt="dotnet.process.memory.working_set",Unt="dotnet.thread_pool.queue.length",Lnt="dotnet.thread_pool.thread.count",Qnt="dotnet.thread_pool.work_item.count",Fnt="dotnet.timer.count",Gnt="http.client.request.duration",jnt="http.server.request.duration",znt="jvm.class.count",Hnt="jvm.class.loaded",$nt="jvm.class.unloaded",Vnt="jvm.cpu.count",qnt="jvm.cpu.recent_utilization",Ynt="jvm.cpu.time",Knt="jvm.gc.duration",Jnt="jvm.memory.committed",Znt="jvm.memory.limit",Wnt="jvm.memory.used",Xnt="jvm.memory.used_after_last_gc",ert="jvm.thread.count",trt="kestrel.active_connections",nrt="kestrel.active_tls_handshakes",rrt="kestrel.connection.duration",ort="kestrel.queued_connections",irt="kestrel.queued_requests",art="kestrel.rejected_connections",srt="kestrel.tls_handshake.duration",urt="kestrel.upgraded_connections",crt="signalr.server.active_connections",lrt="signalr.server.connection.duration"});var drt,b_e=O(()=>{A();drt="exception"});var Pr={};Ga(Pr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>oet,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>iet,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>aet,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>set,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>pet,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>fet,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Aet,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>met,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Eet,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>yet,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>ret,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>uet,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>cet,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>det,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>get,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>het,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>_et,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Tet,ATTR_CLIENT_ADDRESS:()=>Iet,ATTR_CLIENT_PORT:()=>Cet,ATTR_CODE_COLUMN_NUMBER:()=>bet,ATTR_CODE_FILE_PATH:()=>vet,ATTR_CODE_FUNCTION_NAME:()=>Ret,ATTR_CODE_LINE_NUMBER:()=>xet,ATTR_CODE_STACKTRACE:()=>Det,ATTR_DB_COLLECTION_NAME:()=>n5,ATTR_DB_NAMESPACE:()=>r5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Bet,ATTR_DB_OPERATION_NAME:()=>MC,ATTR_DB_QUERY_SUMMARY:()=>Net,ATTR_DB_QUERY_TEXT:()=>o5,ATTR_DB_RESPONSE_STATUS_CODE:()=>i5,ATTR_DB_STORED_PROCEDURE_NAME:()=>Oet,ATTR_DB_SYSTEM_NAME:()=>_S,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Uet,ATTR_ERROR_TYPE:()=>a5,ATTR_EXCEPTION_ESCAPED:()=>Het,ATTR_EXCEPTION_MESSAGE:()=>$et,ATTR_EXCEPTION_STACKTRACE:()=>Vet,ATTR_EXCEPTION_TYPE:()=>qet,ATTR_HTTP_REQUEST_HEADER:()=>Yet,ATTR_HTTP_REQUEST_METHOD:()=>ES,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>itt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>att,ATTR_HTTP_RESPONSE_HEADER:()=>stt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Zm,ATTR_HTTP_ROUTE:()=>Wm,ATTR_JVM_GC_ACTION:()=>utt,ATTR_JVM_GC_NAME:()=>ctt,ATTR_JVM_MEMORY_POOL_NAME:()=>ltt,ATTR_JVM_MEMORY_TYPE:()=>dtt,ATTR_JVM_THREAD_DAEMON:()=>Att,ATTR_JVM_THREAD_STATE:()=>mtt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Ttt,ATTR_NETWORK_LOCAL_PORT:()=>Itt,ATTR_NETWORK_PEER_ADDRESS:()=>s5,ATTR_NETWORK_PEER_PORT:()=>u5,ATTR_NETWORK_PROTOCOL_NAME:()=>Ctt,ATTR_NETWORK_PROTOCOL_VERSION:()=>c5,ATTR_NETWORK_TRANSPORT:()=>l5,ATTR_NETWORK_TYPE:()=>Btt,ATTR_OTEL_SCOPE_NAME:()=>wtt,ATTR_OTEL_SCOPE_VERSION:()=>Mtt,ATTR_OTEL_STATUS_CODE:()=>ktt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Ltt,ATTR_SERVER_ADDRESS:()=>d5,ATTR_SERVER_PORT:()=>p5,ATTR_SERVICE_INSTANCE_ID:()=>Qtt,ATTR_SERVICE_NAME:()=>f5,ATTR_SERVICE_NAMESPACE:()=>Ftt,ATTR_SERVICE_VERSION:()=>A5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Gtt,ATTR_SIGNALR_TRANSPORT:()=>$tt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Ktt,ATTR_TELEMETRY_SDK_NAME:()=>unt,ATTR_TELEMETRY_SDK_VERSION:()=>cnt,ATTR_URL_FRAGMENT:()=>lnt,ATTR_URL_FULL:()=>qh,ATTR_URL_PATH:()=>dnt,ATTR_URL_QUERY:()=>pnt,ATTR_URL_SCHEME:()=>fnt,ATTR_USER_AGENT_ORIGINAL:()=>m5,AWSECSLAUNCHTYPEVALUES_EC2:()=>IXe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>CXe,AwsEcsLaunchtypeValues:()=>bXe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>iXe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>aXe,CLOUDPLATFORMVALUES_AWS_EC2:()=>sXe,CLOUDPLATFORMVALUES_AWS_ECS:()=>uXe,CLOUDPLATFORMVALUES_AWS_EKS:()=>cXe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>dXe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>lXe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>AXe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>gXe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>fXe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>mXe,CLOUDPLATFORMVALUES_AZURE_VM:()=>pXe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>yXe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>SXe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>_Xe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>hXe,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>EXe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>eXe,CLOUDPROVIDERVALUES_AWS:()=>tXe,CLOUDPROVIDERVALUES_AZURE:()=>nXe,CLOUDPROVIDERVALUES_GCP:()=>rXe,CloudPlatformValues:()=>TXe,CloudProviderValues:()=>oXe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>QKe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>qKe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>FKe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>VKe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>jKe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>KKe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>zKe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>GKe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>YKe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>$Ke,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>HKe,DBSYSTEMVALUES_ADABAS:()=>uKe,DBSYSTEMVALUES_CACHE:()=>sKe,DBSYSTEMVALUES_CASSANDRA:()=>bKe,DBSYSTEMVALUES_CLOUDSCAPE:()=>XYe,DBSYSTEMVALUES_COCKROACHDB:()=>UKe,DBSYSTEMVALUES_COLDFUSION:()=>CKe,DBSYSTEMVALUES_COSMOSDB:()=>NKe,DBSYSTEMVALUES_COUCHBASE:()=>DKe,DBSYSTEMVALUES_COUCHDB:()=>BKe,DBSYSTEMVALUES_DB2:()=>KYe,DBSYSTEMVALUES_DERBY:()=>lKe,DBSYSTEMVALUES_DYNAMODB:()=>OKe,DBSYSTEMVALUES_EDB:()=>aKe,DBSYSTEMVALUES_ELASTICSEARCH:()=>kKe,DBSYSTEMVALUES_FILEMAKER:()=>dKe,DBSYSTEMVALUES_FIREBIRD:()=>cKe,DBSYSTEMVALUES_FIRSTSQL:()=>iKe,DBSYSTEMVALUES_GEODE:()=>MKe,DBSYSTEMVALUES_H2:()=>IKe,DBSYSTEMVALUES_HANADB:()=>rKe,DBSYSTEMVALUES_HBASE:()=>vKe,DBSYSTEMVALUES_HIVE:()=>WYe,DBSYSTEMVALUES_HSQLDB:()=>eKe,DBSYSTEMVALUES_INFORMIX:()=>pKe,DBSYSTEMVALUES_INGRES:()=>oKe,DBSYSTEMVALUES_INSTANTDB:()=>fKe,DBSYSTEMVALUES_INTERBASE:()=>AKe,DBSYSTEMVALUES_MARIADB:()=>mKe,DBSYSTEMVALUES_MAXDB:()=>nKe,DBSYSTEMVALUES_MEMCACHED:()=>PKe,DBSYSTEMVALUES_MONGODB:()=>RKe,DBSYSTEMVALUES_MSSQL:()=>VYe,DBSYSTEMVALUES_MYSQL:()=>qYe,DBSYSTEMVALUES_NEO4J:()=>wKe,DBSYSTEMVALUES_NETEZZA:()=>gKe,DBSYSTEMVALUES_ORACLE:()=>YYe,DBSYSTEMVALUES_OTHER_SQL:()=>$Ye,DBSYSTEMVALUES_PERVASIVE:()=>hKe,DBSYSTEMVALUES_POINTBASE:()=>_Ke,DBSYSTEMVALUES_POSTGRESQL:()=>JYe,DBSYSTEMVALUES_PROGRESS:()=>tKe,DBSYSTEMVALUES_REDIS:()=>xKe,DBSYSTEMVALUES_REDSHIFT:()=>ZYe,DBSYSTEMVALUES_SQLITE:()=>EKe,DBSYSTEMVALUES_SYBASE:()=>SKe,DBSYSTEMVALUES_TERADATA:()=>yKe,DBSYSTEMVALUES_VERTICA:()=>TKe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>wet,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Met,DB_SYSTEM_NAME_VALUE_MYSQL:()=>ket,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Pet,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Let,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Qet,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Fet,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Get,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>jet,DbCassandraConsistencyLevelValues:()=>JKe,DbSystemValues:()=>LKe,ERROR_TYPE_VALUE_OTHER:()=>zet,EVENT_EXCEPTION:()=>drt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>iJe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>oJe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>rJe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>sJe,FAASINVOKEDPROVIDERVALUES_AWS:()=>uJe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>cJe,FAASINVOKEDPROVIDERVALUES_GCP:()=>lJe,FAASTRIGGERVALUES_DATASOURCE:()=>ZKe,FAASTRIGGERVALUES_HTTP:()=>WKe,FAASTRIGGERVALUES_OTHER:()=>tJe,FAASTRIGGERVALUES_PUBSUB:()=>XKe,FAASTRIGGERVALUES_TIMER:()=>eJe,FaasDocumentOperationValues:()=>aJe,FaasInvokedProviderValues:()=>dJe,FaasTriggerValues:()=>nJe,HOSTARCHVALUES_AMD64:()=>vXe,HOSTARCHVALUES_ARM32:()=>RXe,HOSTARCHVALUES_ARM64:()=>xXe,HOSTARCHVALUES_IA64:()=>DXe,HOSTARCHVALUES_PPC32:()=>BXe,HOSTARCHVALUES_PPC64:()=>NXe,HOSTARCHVALUES_X86:()=>OXe,HTTPFLAVORVALUES_HTTP_1_0:()=>YJe,HTTPFLAVORVALUES_HTTP_1_1:()=>KJe,HTTPFLAVORVALUES_HTTP_2_0:()=>JJe,HTTPFLAVORVALUES_QUIC:()=>WJe,HTTPFLAVORVALUES_SPDY:()=>ZJe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Jet,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Zet,HTTP_REQUEST_METHOD_VALUE_GET:()=>Wet,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Xet,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>ett,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Ket,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>ttt,HTTP_REQUEST_METHOD_VALUE_POST:()=>ntt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>rtt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>ott,HostArchValues:()=>wXe,HttpFlavorValues:()=>XJe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>ptt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>ftt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>gtt,JVM_THREAD_STATE_VALUE_NEW:()=>htt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>_tt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Ett,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Stt,JVM_THREAD_STATE_VALUE_WAITING:()=>ytt,MESSAGETYPEVALUES_RECEIVED:()=>bZe,MESSAGETYPEVALUES_SENT:()=>CZe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>eZe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>tZe,MESSAGINGOPERATIONVALUES_PROCESS:()=>oZe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>rZe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Ant,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>mnt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>gnt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ent,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>_nt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>hnt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Snt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>ynt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Tnt,METRIC_DOTNET_EXCEPTIONS:()=>Int,METRIC_DOTNET_GC_COLLECTIONS:()=>Cnt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>bnt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>vnt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Rnt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>xnt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Dnt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Bnt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Nnt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Ont,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>wnt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Mnt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>knt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Pnt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Unt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Lnt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Qnt,METRIC_DOTNET_TIMER_COUNT:()=>Fnt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Gnt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>jnt,METRIC_JVM_CLASS_COUNT:()=>znt,METRIC_JVM_CLASS_LOADED:()=>Hnt,METRIC_JVM_CLASS_UNLOADED:()=>$nt,METRIC_JVM_CPU_COUNT:()=>Vnt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>qnt,METRIC_JVM_CPU_TIME:()=>Ynt,METRIC_JVM_GC_DURATION:()=>Knt,METRIC_JVM_MEMORY_COMMITTED:()=>Jnt,METRIC_JVM_MEMORY_LIMIT:()=>Znt,METRIC_JVM_MEMORY_USED:()=>Wnt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Xnt,METRIC_JVM_THREAD_COUNT:()=>ert,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>trt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>nrt,METRIC_KESTREL_CONNECTION_DURATION:()=>rrt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>ort,METRIC_KESTREL_QUEUED_REQUESTS:()=>irt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>art,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>srt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>urt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>crt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>lrt,MessageTypeValues:()=>vZe,MessagingDestinationKindValues:()=>nZe,MessagingOperationValues:()=>iZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>DJe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>OJe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>RJe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>QJe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>BJe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>NJe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>UJe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>vJe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>GJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>wJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>kJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>FJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>MJe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>PJe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>zJe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>LJe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>VJe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>HJe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>$Je,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>jJe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>xJe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>TJe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>IJe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>CJe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>SJe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>yJe,NETTRANSPORTVALUES_INPROC:()=>hJe,NETTRANSPORTVALUES_IP:()=>AJe,NETTRANSPORTVALUES_IP_TCP:()=>pJe,NETTRANSPORTVALUES_IP_UDP:()=>fJe,NETTRANSPORTVALUES_OTHER:()=>_Je,NETTRANSPORTVALUES_PIPE:()=>gJe,NETTRANSPORTVALUES_UNIX:()=>mJe,NETWORK_TRANSPORT_VALUE_PIPE:()=>btt,NETWORK_TRANSPORT_VALUE_QUIC:()=>vtt,NETWORK_TRANSPORT_VALUE_TCP:()=>Rtt,NETWORK_TRANSPORT_VALUE_UDP:()=>xtt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Dtt,NETWORK_TYPE_VALUE_IPV4:()=>Ntt,NETWORK_TYPE_VALUE_IPV6:()=>Ott,NetHostConnectionSubtypeValues:()=>qJe,NetHostConnectionTypeValues:()=>bJe,NetTransportValues:()=>EJe,OSTYPEVALUES_AIX:()=>jXe,OSTYPEVALUES_DARWIN:()=>PXe,OSTYPEVALUES_DRAGONFLYBSD:()=>FXe,OSTYPEVALUES_FREEBSD:()=>UXe,OSTYPEVALUES_HPUX:()=>GXe,OSTYPEVALUES_LINUX:()=>kXe,OSTYPEVALUES_NETBSD:()=>LXe,OSTYPEVALUES_OPENBSD:()=>QXe,OSTYPEVALUES_SOLARIS:()=>zXe,OSTYPEVALUES_WINDOWS:()=>MXe,OSTYPEVALUES_Z_OS:()=>HXe,OTEL_STATUS_CODE_VALUE_ERROR:()=>Ptt,OTEL_STATUS_CODE_VALUE_OK:()=>Utt,OsTypeValues:()=>$Xe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>gZe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>pZe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>sZe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>yZe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>lZe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>mZe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>EZe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>cZe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>dZe,RPCGRPCSTATUSCODEVALUES_OK:()=>aZe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>hZe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>fZe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>AZe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>TZe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>SZe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>_Ze,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>uZe,RpcGrpcStatusCodeValues:()=>IZe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>nYe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>AYe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>X7e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>K7e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>pYe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>sYe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>iYe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>mYe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>rYe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>J7e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>tYe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>aYe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>eYe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Z7e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>W7e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>fYe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>cYe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>lYe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>oYe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>uYe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Y7e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>dYe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Fqe,SEMATTRS_CODE_FILEPATH:()=>L7e,SEMATTRS_CODE_FUNCTION:()=>P7e,SEMATTRS_CODE_LINENO:()=>Q7e,SEMATTRS_CODE_NAMESPACE:()=>U7e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Kqe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>e7e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Xqe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Zqe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>qqe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Yqe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Wqe,SEMATTRS_DB_CASSANDRA_TABLE:()=>Jqe,SEMATTRS_DB_CONNECTION_STRING:()=>Gqe,SEMATTRS_DB_HBASE_NAMESPACE:()=>t7e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>zqe,SEMATTRS_DB_MONGODB_COLLECTION:()=>r7e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>Vqe,SEMATTRS_DB_NAME:()=>Hqe,SEMATTRS_DB_OPERATION:()=>$qe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>n7e,SEMATTRS_DB_SQL_TABLE:()=>o7e,SEMATTRS_DB_STATEMENT:()=>z$,SEMATTRS_DB_SYSTEM:()=>j$,SEMATTRS_DB_USER:()=>jqe,SEMATTRS_ENDUSER_ID:()=>N7e,SEMATTRS_ENDUSER_ROLE:()=>O7e,SEMATTRS_ENDUSER_SCOPE:()=>w7e,SEMATTRS_EXCEPTION_ESCAPED:()=>u7e,SEMATTRS_EXCEPTION_MESSAGE:()=>a7e,SEMATTRS_EXCEPTION_STACKTRACE:()=>s7e,SEMATTRS_EXCEPTION_TYPE:()=>i7e,SEMATTRS_FAAS_COLDSTART:()=>g7e,SEMATTRS_FAAS_CRON:()=>m7e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>l7e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>f7e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>d7e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>p7e,SEMATTRS_FAAS_EXECUTION:()=>c7e,SEMATTRS_FAAS_INVOKED_NAME:()=>h7e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>_7e,SEMATTRS_FAAS_INVOKED_REGION:()=>E7e,SEMATTRS_FAAS_TIME:()=>A7e,SEMATTRS_FAAS_TRIGGER:()=>H$,SEMATTRS_HTTP_CLIENT_IP:()=>q7e,SEMATTRS_HTTP_FLAVOR:()=>j7e,SEMATTRS_HTTP_HOST:()=>F7e,SEMATTRS_HTTP_METHOD:()=>q1,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>H7e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>$7e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>K$,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>J$,SEMATTRS_HTTP_ROUTE:()=>Z$,SEMATTRS_HTTP_SCHEME:()=>G7e,SEMATTRS_HTTP_SERVER_NAME:()=>V7e,SEMATTRS_HTTP_STATUS_CODE:()=>hS,SEMATTRS_HTTP_TARGET:()=>Y$,SEMATTRS_HTTP_URL:()=>wC,SEMATTRS_HTTP_USER_AGENT:()=>z7e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>jYe,SEMATTRS_MESSAGE_ID:()=>GYe,SEMATTRS_MESSAGE_TYPE:()=>FYe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>zYe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>RYe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>IYe,SEMATTRS_MESSAGING_DESTINATION:()=>gYe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>hYe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>NYe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>BYe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>DYe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>OYe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>wYe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>TYe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>bYe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>CYe,SEMATTRS_MESSAGING_OPERATION:()=>vYe,SEMATTRS_MESSAGING_PROTOCOL:()=>EYe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>SYe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>xYe,SEMATTRS_MESSAGING_SYSTEM:()=>W$,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>_Ye,SEMATTRS_MESSAGING_URL:()=>yYe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>D7e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>R7e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>x7e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>v7e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>b7e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>C7e,SEMATTRS_NET_HOST_IP:()=>V$,SEMATTRS_NET_HOST_NAME:()=>I7e,SEMATTRS_NET_HOST_PORT:()=>q$,SEMATTRS_NET_PEER_IP:()=>$$,SEMATTRS_NET_PEER_NAME:()=>T7e,SEMATTRS_NET_PEER_PORT:()=>y7e,SEMATTRS_NET_TRANSPORT:()=>S7e,SEMATTRS_PEER_SERVICE:()=>B7e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>e5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>LYe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>QYe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>UYe,SEMATTRS_RPC_JSONRPC_VERSION:()=>PYe,SEMATTRS_RPC_METHOD:()=>kYe,SEMATTRS_RPC_SERVICE:()=>X$,SEMATTRS_RPC_SYSTEM:()=>MYe,SEMATTRS_THREAD_ID:()=>M7e,SEMATTRS_THREAD_NAME:()=>k7e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>wZe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>OZe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>MZe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>kZe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>PZe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>UZe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>LZe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>FZe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>QZe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>jZe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>GZe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>xZe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>BZe,SEMRESATTRS_CLOUD_PLATFORM:()=>NZe,SEMRESATTRS_CLOUD_PROVIDER:()=>RZe,SEMRESATTRS_CLOUD_REGION:()=>DZe,SEMRESATTRS_CONTAINER_ID:()=>HZe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>VZe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>qZe,SEMRESATTRS_CONTAINER_NAME:()=>zZe,SEMRESATTRS_CONTAINER_RUNTIME:()=>$Ze,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>YZe,SEMRESATTRS_DEVICE_ID:()=>KZe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>JZe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>ZZe,SEMRESATTRS_FAAS_ID:()=>XZe,SEMRESATTRS_FAAS_INSTANCE:()=>tWe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>nWe,SEMRESATTRS_FAAS_NAME:()=>WZe,SEMRESATTRS_FAAS_VERSION:()=>eWe,SEMRESATTRS_HOST_ARCH:()=>aWe,SEMRESATTRS_HOST_ID:()=>rWe,SEMRESATTRS_HOST_IMAGE_ID:()=>uWe,SEMRESATTRS_HOST_IMAGE_NAME:()=>sWe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>cWe,SEMRESATTRS_HOST_NAME:()=>oWe,SEMRESATTRS_HOST_TYPE:()=>iWe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>lWe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>gWe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>xWe,SEMRESATTRS_K8S_CRONJOB_UID:()=>RWe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>CWe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>IWe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>SWe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>EWe,SEMRESATTRS_K8S_JOB_NAME:()=>vWe,SEMRESATTRS_K8S_JOB_UID:()=>bWe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>fWe,SEMRESATTRS_K8S_NODE_NAME:()=>dWe,SEMRESATTRS_K8S_NODE_UID:()=>pWe,SEMRESATTRS_K8S_POD_NAME:()=>mWe,SEMRESATTRS_K8S_POD_UID:()=>AWe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>_We,SEMRESATTRS_K8S_REPLICASET_UID:()=>hWe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>TWe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>yWe,SEMRESATTRS_OS_DESCRIPTION:()=>BWe,SEMRESATTRS_OS_NAME:()=>NWe,SEMRESATTRS_OS_TYPE:()=>DWe,SEMRESATTRS_OS_VERSION:()=>OWe,SEMRESATTRS_PROCESS_COMMAND:()=>PWe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>LWe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>UWe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>MWe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>kWe,SEMRESATTRS_PROCESS_OWNER:()=>QWe,SEMRESATTRS_PROCESS_PID:()=>wWe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>jWe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>FWe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>GWe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>HWe,SEMRESATTRS_SERVICE_NAME:()=>zWe,SEMRESATTRS_SERVICE_NAMESPACE:()=>t5,SEMRESATTRS_SERVICE_VERSION:()=>$We,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>KWe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>qWe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>VWe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>YWe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>WWe,SEMRESATTRS_WEBENGINE_NAME:()=>JWe,SEMRESATTRS_WEBENGINE_VERSION:()=>ZWe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>jtt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>ztt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Htt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Vtt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>qtt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Ytt,SemanticAttributes:()=>HYe,SemanticResourceAttributes:()=>XWe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>VXe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>qXe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>YXe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>KXe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>JXe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>ZXe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>WXe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>XXe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>eet,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>tet,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Jtt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Ztt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Wtt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Xtt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>ent,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>tnt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>nnt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>rnt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>ont,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>int,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>ant,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>snt,TelemetrySdkLanguageValues:()=>net});var Kn=O(()=>{A();Jme();T_e();I_e();C_e();b_e()});var v_e=F(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.ATTR_PROCESS_RUNTIME_NAME=void 0;sP.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var R_e=F(cP=>{"use strict";A();Object.defineProperty(cP,"__esModule",{value:!0});cP.SDK_INFO=void 0;var prt=ide(),uP=(Kn(),ke(Pr)),frt=v_e();cP.SDK_INFO={[uP.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[frt.ATTR_PROCESS_RUNTIME_NAME]:"node",[uP.ATTR_TELEMETRY_SDK_LANGUAGE]:uP.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[uP.ATTR_TELEMETRY_SDK_VERSION]:prt.VERSION}});var x_e=F(Vs=>{"use strict";A();Object.defineProperty(Vs,"__esModule",{value:!0});Vs.otperformance=Vs.SDK_INFO=Vs._globalThis=Vs.getStringListFromEnv=Vs.getNumberFromEnv=Vs.getBooleanFromEnv=Vs.getStringFromEnv=void 0;var lP=rde();Object.defineProperty(Vs,"getStringFromEnv",{enumerable:!0,get:function(){return lP.getStringFromEnv}});Object.defineProperty(Vs,"getBooleanFromEnv",{enumerable:!0,get:function(){return lP.getBooleanFromEnv}});Object.defineProperty(Vs,"getNumberFromEnv",{enumerable:!0,get:function(){return lP.getNumberFromEnv}});Object.defineProperty(Vs,"getStringListFromEnv",{enumerable:!0,get:function(){return lP.getStringListFromEnv}});var Art=ode();Object.defineProperty(Vs,"_globalThis",{enumerable:!0,get:function(){return Art._globalThis}});var mrt=R_e();Object.defineProperty(Vs,"SDK_INFO",{enumerable:!0,get:function(){return mrt.SDK_INFO}});Vs.otperformance=performance});var g5=F(qs=>{"use strict";A();Object.defineProperty(qs,"__esModule",{value:!0});qs.getStringListFromEnv=qs.getNumberFromEnv=qs.getStringFromEnv=qs.getBooleanFromEnv=qs.otperformance=qs._globalThis=qs.SDK_INFO=void 0;var SS=x_e();Object.defineProperty(qs,"SDK_INFO",{enumerable:!0,get:function(){return SS.SDK_INFO}});Object.defineProperty(qs,"_globalThis",{enumerable:!0,get:function(){return SS._globalThis}});Object.defineProperty(qs,"otperformance",{enumerable:!0,get:function(){return SS.otperformance}});Object.defineProperty(qs,"getBooleanFromEnv",{enumerable:!0,get:function(){return SS.getBooleanFromEnv}});Object.defineProperty(qs,"getStringFromEnv",{enumerable:!0,get:function(){return SS.getStringFromEnv}});Object.defineProperty(qs,"getNumberFromEnv",{enumerable:!0,get:function(){return SS.getNumberFromEnv}});Object.defineProperty(qs,"getStringListFromEnv",{enumerable:!0,get:function(){return SS.getStringListFromEnv}})});var O_e=F(io=>{"use strict";A();Object.defineProperty(io,"__esModule",{value:!0});io.addHrTimes=io.isTimeInput=io.isTimeInputHrTime=io.hrTimeToMicroseconds=io.hrTimeToMilliseconds=io.hrTimeToNanoseconds=io.hrTimeToTimeStamp=io.hrTimeDuration=io.timeInputToHrTime=io.hrTime=io.getTimeOrigin=io.millisToHrTime=void 0;var dP=g5(),D_e=9,grt=6,hrt=Math.pow(10,grt),pP=Math.pow(10,D_e);function Y1(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*hrt);return[n,r]}io.millisToHrTime=Y1;function _rt(){return dP.otperformance.timeOrigin}io.getTimeOrigin=_rt;function B_e(e){let t=Y1(dP.otperformance.timeOrigin),n=Y1(typeof e=="number"?e:dP.otperformance.now());return N_e(t,n)}io.hrTime=B_e;function Ert(e){if(h5(e))return e;if(typeof e=="number")return e<dP.otperformance.timeOrigin?B_e(e):Y1(e);if(e instanceof Date)return Y1(e.getTime());throw TypeError("Invalid input type")}io.timeInputToHrTime=Ert;function Srt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=pP),[n,r]}io.hrTimeDuration=Srt;function yrt(e){let t=D_e,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}io.hrTimeToTimeStamp=yrt;function Trt(e){return e[0]*pP+e[1]}io.hrTimeToNanoseconds=Trt;function Irt(e){return e[0]*1e3+e[1]/1e6}io.hrTimeToMilliseconds=Irt;function Crt(e){return e[0]*1e6+e[1]/1e3}io.hrTimeToMicroseconds=Crt;function h5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}io.isTimeInputHrTime=h5;function brt(e){return h5(e)||typeof e=="number"||e instanceof Date}io.isTimeInput=brt;function N_e(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=pP&&(n[1]-=pP,n[0]+=1),n}io.addHrTimes=N_e});var w_e=F(fP=>{"use strict";A();Object.defineProperty(fP,"__esModule",{value:!0});fP.unrefTimer=void 0;function vrt(e){typeof e!="number"&&e.unref()}fP.unrefTimer=vrt});var M_e=F(K1=>{"use strict";A();Object.defineProperty(K1,"__esModule",{value:!0});K1.ExportResultCode=void 0;var Rrt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Rrt=K1.ExportResultCode||(K1.ExportResultCode={}))});var P_e=F(AP=>{"use strict";A();Object.defineProperty(AP,"__esModule",{value:!0});AP.CompositePropagator=void 0;var k_e=(Ge(),ke(Ze)),_5=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){k_e.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){k_e.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};AP.CompositePropagator=_5});var U_e=F(kC=>{"use strict";A();Object.defineProperty(kC,"__esModule",{value:!0});kC.validateValue=kC.validateKey=void 0;var E5="[_0-9a-z-*/]",xrt=`[a-z]${E5}{0,255}`,Drt=`[a-z0-9]${E5}{0,240}@[a-z]${E5}{0,13}`,Brt=new RegExp(`^(?:${xrt}|${Drt})$`),Nrt=/^[ -~]{0,255}[!-~]$/,Ort=/,|=/;function wrt(e){return Brt.test(e)}kC.validateKey=wrt;function Mrt(e){return Nrt.test(e)&&!Ort.test(e)}kC.validateValue=Mrt});var y5=F(mP=>{"use strict";A();Object.defineProperty(mP,"__esModule",{value:!0});mP.TraceState=void 0;var L_e=U_e(),Q_e=32,krt=512,F_e=",",G_e="=",S5=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+G_e+this.get(n)),t),[]).join(F_e)}_parse(t){t.length>krt||(this._internalState=t.split(F_e).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(G_e);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,L_e.validateKey)(a)&&(0,L_e.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Q_e&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Q_e))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};mP.TraceState=S5});var z_e=F(Ys=>{"use strict";A();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.W3CTraceContextPropagator=Ys.parseTraceParent=Ys.TRACE_STATE_HEADER=Ys.TRACE_PARENT_HEADER=void 0;var gP=(Ge(),ke(Ze)),Prt=V1(),Urt=y5();Ys.TRACE_PARENT_HEADER="traceparent";Ys.TRACE_STATE_HEADER="tracestate";var Lrt="00",Qrt="(?!ff)[\\da-f]{2}",Frt="(?![0]{32})[\\da-f]{32}",Grt="(?![0]{16})[\\da-f]{16}",jrt="[\\da-f]{2}",zrt=new RegExp(`^\\s?(${Qrt})-(${Frt})-(${Grt})-(${jrt})(-.*)?\\s?$`);function j_e(e){let t=zrt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Ys.parseTraceParent=j_e;var T5=class{inject(t,n,r){let o=gP.trace.getSpanContext(t);if(!o||(0,Prt.isTracingSuppressed)(t)||!(0,gP.isSpanContextValid)(o))return;let i=`${Lrt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||gP.TraceFlags.NONE).toString(16)}`;r.set(n,Ys.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Ys.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Ys.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=j_e(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Ys.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new Urt.TraceState(typeof d=="string"?d:void 0)}return gP.trace.setSpanContext(t,a)}fields(){return[Ys.TRACE_PARENT_HEADER,Ys.TRACE_STATE_HEADER]}};Ys.W3CTraceContextPropagator=T5});var H_e=F(Gp=>{"use strict";A();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.getRPCMetadata=Gp.deleteRPCMetadata=Gp.setRPCMetadata=Gp.RPCType=void 0;var Hrt=(Ge(),ke(Ze)),I5=(0,Hrt.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),$rt;(function(e){e.HTTP="http"})($rt=Gp.RPCType||(Gp.RPCType={}));function Vrt(e,t){return e.setValue(I5,t)}Gp.setRPCMetadata=Vrt;function qrt(e){return e.deleteValue(I5)}Gp.deleteRPCMetadata=qrt;function Yrt(e){return e.getValue(I5)}Gp.getRPCMetadata=Yrt});var K_e=F(hP=>{"use strict";A();Object.defineProperty(hP,"__esModule",{value:!0});hP.isPlainObject=void 0;var Krt="[object Object]",Jrt="[object Null]",Zrt="[object Undefined]",Wrt=Function.prototype,$_e=Wrt.toString,Xrt=$_e.call(Object),eot=Object.getPrototypeOf,V_e=Object.prototype,q_e=V_e.hasOwnProperty,yS=Symbol?Symbol.toStringTag:void 0,Y_e=V_e.toString;function tot(e){if(!not(e)||rot(e)!==Krt)return!1;let t=eot(e);if(t===null)return!0;let n=q_e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$_e.call(n)===Xrt}hP.isPlainObject=tot;function not(e){return e!=null&&typeof e=="object"}function rot(e){return e==null?e===void 0?Zrt:Jrt:yS&&yS in Object(e)?oot(e):iot(e)}function oot(e){let t=q_e.call(e,yS),n=e[yS],r=!1;try{e[yS]=void 0,r=!0}catch{}let o=Y_e.call(e);return r&&(t?e[yS]=n:delete e[yS]),o}function iot(e){return Y_e.call(e)}});var eEe=F(SP=>{"use strict";A();Object.defineProperty(SP,"__esModule",{value:!0});SP.merge=void 0;var J_e=K_e(),aot=20;function sot(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=W_e(t,e.shift(),0,n);return t}SP.merge=sot;function C5(e){return EP(e)?e.slice():e}function W_e(e,t,n=0,r){let o;if(!(n>aot)){if(n++,_P(e)||_P(t)||X_e(t))o=C5(t);else if(EP(e)){if(o=e.slice(),EP(t))for(let i=0,a=t.length;i<a;i++)o.push(C5(t[i]));else if(J1(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=C5(t[d])}}}else if(J1(e))if(J1(t)){if(!uot(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],m=t[d];if(_P(m))typeof m>"u"?delete o[d]:o[d]=m;else{let h=o[d],S=m;if(Z_e(e,d,r)||Z_e(t,d,r))delete o[d];else{if(J1(h)&&J1(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]=W_e(o[d],m,n,r)}}}}else o=t;return o}}function Z_e(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 EP(e){return Array.isArray(e)}function X_e(e){return typeof e=="function"}function J1(e){return!_P(e)&&!EP(e)&&!X_e(e)&&typeof e=="object"}function _P(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function uot(e,t){return!(!(0,J_e.isPlainObject)(e)||!(0,J_e.isPlainObject)(t))}});var tEe=F(PC=>{"use strict";A();Object.defineProperty(PC,"__esModule",{value:!0});PC.callWithTimeout=PC.TimeoutError=void 0;var yP=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};PC.TimeoutError=yP;function cot(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new yP("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}PC.callWithTimeout=cot});var rEe=F(UC=>{"use strict";A();Object.defineProperty(UC,"__esModule",{value:!0});UC.isUrlIgnored=UC.urlMatches=void 0;function nEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}UC.urlMatches=nEe;function lot(e,t){if(!t)return!1;for(let n of t)if(nEe(e,n))return!0;return!1}UC.isUrlIgnored=lot});var oEe=F(TP=>{"use strict";A();Object.defineProperty(TP,"__esModule",{value:!0});TP.Deferred=void 0;var b5=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)}};TP.Deferred=b5});var iEe=F(IP=>{"use strict";A();Object.defineProperty(IP,"__esModule",{value:!0});IP.BindOnceFuture=void 0;var dot=oEe(),v5=class{_isCalled=!1;_deferred=new dot.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}};IP.BindOnceFuture=v5});var sEe=F(CP=>{"use strict";A();Object.defineProperty(CP,"__esModule",{value:!0});CP.diagLogLevelFromString=void 0;var Xm=(Ge(),ke(Ze)),aEe={ALL:Xm.DiagLogLevel.ALL,VERBOSE:Xm.DiagLogLevel.VERBOSE,DEBUG:Xm.DiagLogLevel.DEBUG,INFO:Xm.DiagLogLevel.INFO,WARN:Xm.DiagLogLevel.WARN,ERROR:Xm.DiagLogLevel.ERROR,NONE:Xm.DiagLogLevel.NONE};function pot(e){if(e==null)return;let t=aEe[e.toUpperCase()];return t??(Xm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(aEe)}, using default`),Xm.DiagLogLevel.INFO)}CP.diagLogLevelFromString=pot});var cEe=F(bP=>{"use strict";A();Object.defineProperty(bP,"__esModule",{value:!0});bP._export=void 0;var uEe=(Ge(),ke(Ze)),fot=V1();function Aot(e,t){return new Promise(n=>{uEe.context.with((0,fot.suppressTracing)(uEe.context.active()),()=>{e.export(t,n)})})}bP._export=Aot});var Tr=F(Oe=>{"use strict";A();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 mot=$le();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return mot.W3CBaggagePropagator}});var got=Vle();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return got.AnchoredClock}});var lEe=Zle();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return lEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return lEe.sanitizeAttributes}});var dEe=Xle();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return dEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return dEe.setGlobalErrorHandler}});var hot=F$();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return hot.loggingErrorHandler}});var Td=O_e();Object.defineProperty(Oe,"addHrTimes",{enumerable:!0,get:function(){return Td.addHrTimes}});Object.defineProperty(Oe,"getTimeOrigin",{enumerable:!0,get:function(){return Td.getTimeOrigin}});Object.defineProperty(Oe,"hrTime",{enumerable:!0,get:function(){return Td.hrTime}});Object.defineProperty(Oe,"hrTimeDuration",{enumerable:!0,get:function(){return Td.hrTimeDuration}});Object.defineProperty(Oe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Td.hrTimeToMicroseconds}});Object.defineProperty(Oe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Td.hrTimeToMilliseconds}});Object.defineProperty(Oe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Td.hrTimeToNanoseconds}});Object.defineProperty(Oe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Td.hrTimeToTimeStamp}});Object.defineProperty(Oe,"isTimeInput",{enumerable:!0,get:function(){return Td.isTimeInput}});Object.defineProperty(Oe,"isTimeInputHrTime",{enumerable:!0,get:function(){return Td.isTimeInputHrTime}});Object.defineProperty(Oe,"millisToHrTime",{enumerable:!0,get:function(){return Td.millisToHrTime}});Object.defineProperty(Oe,"timeInputToHrTime",{enumerable:!0,get:function(){return Td.timeInputToHrTime}});var _ot=w_e();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return _ot.unrefTimer}});var Eot=M_e();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return Eot.ExportResultCode}});var Sot=k$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Sot.parseKeyPairsIntoRecord}});var TS=g5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return TS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return TS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return TS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return TS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return TS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return TS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return TS.otperformance}});var yot=P_e();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return yot.CompositePropagator}});var vP=z_e();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return vP.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return vP.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return vP.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return vP.parseTraceParent}});var RP=H_e();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return RP.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return RP.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return RP.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return RP.setRPCMetadata}});var R5=V1();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return R5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return R5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return R5.unsuppressTracing}});var Tot=y5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return Tot.TraceState}});var Iot=eEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return Iot.merge}});var pEe=tEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return pEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return pEe.callWithTimeout}});var fEe=rEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return fEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return fEe.urlMatches}});var Cot=iEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return Cot.BindOnceFuture}});var bot=sEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return bot.diagLogLevelFromString}});var vot=cEe();Oe.internal={_export:vot._export}});var AEe=F(xP=>{"use strict";A();Object.defineProperty(xP,"__esModule",{value:!0});xP.VERSION=void 0;xP.VERSION="0.214.0"});var mEe=F(Z1=>{"use strict";A();Object.defineProperty(Z1,"__esModule",{value:!0});Z1.SeverityNumber=void 0;var Rot;(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"})(Rot=Z1.SeverityNumber||(Z1.SeverityNumber={}))});var BP=F(LC=>{"use strict";A();Object.defineProperty(LC,"__esModule",{value:!0});LC.NOOP_LOGGER=LC.NoopLogger=void 0;var DP=class{emit(t){}};LC.NoopLogger=DP;LC.NOOP_LOGGER=new DP});var gEe=F(oA=>{"use strict";A();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 xot(e,t,n){return r=>r===e?t:n}oA.makeGetter=xot;oA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var x5=F(QC=>{"use strict";A();Object.defineProperty(QC,"__esModule",{value:!0});QC.NOOP_LOGGER_PROVIDER=QC.NoopLoggerProvider=void 0;var Dot=BP(),NP=class{getLogger(t,n,r){return new Dot.NoopLogger}};QC.NoopLoggerProvider=NP;QC.NOOP_LOGGER_PROVIDER=new NP});var hEe=F(OP=>{"use strict";A();Object.defineProperty(OP,"__esModule",{value:!0});OP.ProxyLogger=void 0;var Bot=BP(),D5=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):Bot.NOOP_LOGGER}};OP.ProxyLogger=D5});var _Ee=F(wP=>{"use strict";A();Object.defineProperty(wP,"__esModule",{value:!0});wP.ProxyLoggerProvider=void 0;var Not=x5(),Oot=hEe(),B5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Oot.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Not.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)}};wP.ProxyLoggerProvider=B5});var SEe=F(MP=>{"use strict";A();Object.defineProperty(MP,"__esModule",{value:!0});MP.LogsAPI=void 0;var Id=gEe(),wot=x5(),EEe=_Ee(),N5=class e{constructor(){this._proxyLoggerProvider=new EEe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Id._global[Id.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Id._global[Id.GLOBAL_LOGS_API_KEY]=(0,Id.makeGetter)(Id.API_BACKWARDS_COMPATIBILITY_VERSION,t,wot.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Id._global[Id.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Id._global,Id.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Id._global[Id.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new EEe.ProxyLoggerProvider}};MP.LogsAPI=N5});var O5=F(iA=>{"use strict";A();Object.defineProperty(iA,"__esModule",{value:!0});iA.logs=iA.NoopLogger=iA.NOOP_LOGGER=iA.SeverityNumber=void 0;var Mot=mEe();Object.defineProperty(iA,"SeverityNumber",{enumerable:!0,get:function(){return Mot.SeverityNumber}});var yEe=BP();Object.defineProperty(iA,"NOOP_LOGGER",{enumerable:!0,get:function(){return yEe.NOOP_LOGGER}});Object.defineProperty(iA,"NoopLogger",{enumerable:!0,get:function(){return yEe.NoopLogger}});var kot=SEe();iA.logs=kot.LogsAPI.getInstance()});var TEe=F(FC=>{"use strict";A();Object.defineProperty(FC,"__esModule",{value:!0});FC.disableInstrumentations=FC.enableInstrumentations=void 0;function Pot(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()}}FC.enableInstrumentations=Pot;function Uot(e){e.forEach(t=>t.disable())}FC.disableInstrumentations=Uot});var bEe=F(kP=>{"use strict";A();Object.defineProperty(kP,"__esModule",{value:!0});kP.registerInstrumentations=void 0;var IEe=(Ge(),ke(Ze)),Lot=O5(),CEe=TEe();function Qot(e){let t=e.tracerProvider||IEe.trace.getTracerProvider(),n=e.meterProvider||IEe.metrics.getMeterProvider(),r=e.loggerProvider||Lot.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,CEe.enableInstrumentations)(o,t,n,r),()=>{(0,CEe.disableInstrumentations)(o)}}kP.registerInstrumentations=Qot});var MEe=F(PP=>{"use strict";A();Object.defineProperty(PP,"__esModule",{value:!0});PP.satisfies=void 0;var P5=(Ge(),ke(Ze)),BEe=/^(?: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-]+)*))?$/,Fot=/^(?<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-]+)*))?$/,Got={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function jot(e,t,n){if(!zot(e))return P5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=qot(e);if(!r)return!1;let o=[],i=NEe(r,t,o,n);return i&&!n?.includePrerelease?$ot(r,o):i}PP.satisfies=jot;function zot(e){return typeof e=="string"&&BEe.test(e)}function NEe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(w5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Ait(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!w5(e,i,n,r))return!1;return!0}return w5(e,t,n,r)}function w5(e,t,n,r){if(t=Vot(t,r),t.includes(" "))return NEe(e,t,n,r);{let o=Yot(t);return n.push(o),Hot(e,o)}}function Hot(e,t){if(t.invalid)return!1;if(!t.version||k5(t.version))return!0;let n=REe(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=REe(r,o)}return Got[t.op]?.includes(n)}function $ot(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Vot(e,t){return e=e.trim(),e=pit(e,t),e=dit(e),e=fit(e,t),e=e.trim(),e}function xu(e){return!e||e.toLowerCase()==="x"||e==="*"}function qot(e){let t=e.match(BEe);if(!t){P5.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 Yot(e){if(!e)return{};let t=e.match(Fot);if(!t)return P5.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 vEe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Kot(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 Jot(e,t){if(k5(e)||k5(t))return 0;let[n,r]=Kot(vEe(e),vEe(t));return n>r?1:n<r?-1:0}function REe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Jot(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var OEe="[a-zA-Z0-9-]",wEe="0|[1-9]\\d*",Zot=`\\d*[a-zA-Z-]${OEe}*`,Wot="((?:<|>)?=?)",xEe=`(?:${wEe}|${Zot})`,Xot=`(?:-(${xEe}(?:\\.${xEe})*))`,DEe=`${OEe}+`,eit=`(?:\\+(${DEe}(?:\\.${DEe})*))`,M5=`${wEe}|x|X|\\*`,W1=`[v=\\s]*(${M5})(?:\\.(${M5})(?:\\.(${M5})(?:${Xot})?${eit}?)?)?`,tit=`^${Wot}\\s*${W1}$`,nit=new RegExp(tit),rit=`^\\s*(${W1})\\s+-\\s+(${W1})\\s*$`,oit=new RegExp(rit),iit="(?:~>?)",ait=`^${iit}${W1}$`,sit=new RegExp(ait),uit="(?:\\^)",cit=`^${uit}${W1}$`,lit=new RegExp(cit);function dit(e){let t=sit;return e.replace(t,(n,r,o,i,a)=>{let c;return xu(r)?c="":xu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:xu(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 pit(e,t){let n=lit,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return xu(i)?m="":xu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:xu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function fit(e,t){let n=nit;return e.replace(n,(r,o,i,a,c,d)=>{let m=xu(i),h=m||xu(a),S=h||xu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Ait(e,t){let n=oit;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,v)=>(xu(i)?o="":xu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:xu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,xu(S)?h="":xu(y)?h=`<${+S+1}.0.0-0`:xu(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 U5=F(hs=>{"use strict";A();Object.defineProperty(hs,"__esModule",{value:!0});hs.massUnwrap=hs.unwrap=hs.massWrap=hs.wrap=void 0;var Du=console.error.bind(console);function X1(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 mit=(e,t,n)=>{if(!e||!e[t]){Du("no original function "+String(t)+" to wrap");return}if(!n){Du("no wrapper function"),Du(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Du("original object and wrapper must be functions");return}let o=n(r,t);return X1(o,"__original",r),X1(o,"__unwrap",()=>{e[t]===o&&X1(e,t,r)}),X1(o,"__wrapped",!0),X1(e,t,o),o};hs.wrap=mit;var git=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,hs.wrap)(r,o,n)})})};hs.massWrap=git;var hit=(e,t)=>{if(!e||!e[t]){Du("no function to unwrap."),Du(new Error().stack);return}let n=e[t];if(!n.__unwrap)Du("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};hs.unwrap=hit;var _it=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,hs.unwrap)(n,r)})})};hs.massUnwrap=_it;function eB(e){e&&e.logger&&(typeof e.logger!="function"?Du("new logger isn't a function, not replacing"):Du=e.logger)}hs.default=eB;eB.wrap=hs.wrap;eB.massWrap=hs.massWrap;eB.unwrap=hs.unwrap;eB.massUnwrap=hs.massUnwrap});var kEe=F(LP=>{"use strict";A();Object.defineProperty(LP,"__esModule",{value:!0});LP.InstrumentationAbstract=void 0;var L5=(Ge(),ke(Ze)),Eit=O5(),UP=U5(),Q5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=L5.diag.createComponentLogger({namespace:t}),this._tracer=L5.trace.getTracer(t,n),this._meter=L5.metrics.getMeter(t,n),this._logger=Eit.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=UP.wrap;_unwrap=UP.unwrap;_massWrap=UP.massWrap;_massUnwrap=UP.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)}}};LP.InstrumentationAbstract=Q5});var UEe=F((nVt,PEe)=>{A();var GC=1e3,jC=GC*60,zC=jC*60,IS=zC*24,Sit=IS*7,yit=IS*365.25;PEe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Tit(e);if(n==="number"&&isFinite(e))return t.long?Cit(e):Iit(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Tit(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*yit;case"weeks":case"week":case"w":return n*Sit;case"days":case"day":case"d":return n*IS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*zC;case"minutes":case"minute":case"mins":case"min":case"m":return n*jC;case"seconds":case"second":case"secs":case"sec":case"s":return n*GC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Iit(e){var t=Math.abs(e);return t>=IS?Math.round(e/IS)+"d":t>=zC?Math.round(e/zC)+"h":t>=jC?Math.round(e/jC)+"m":t>=GC?Math.round(e/GC)+"s":e+"ms"}function Cit(e){var t=Math.abs(e);return t>=IS?QP(e,t,IS,"day"):t>=zC?QP(e,t,zC,"hour"):t>=jC?QP(e,t,jC,"minute"):t>=GC?QP(e,t,GC,"second"):e+" ms"}function QP(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var F5=F((oVt,LEe)=>{A();function bit(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=UEe(),n.destroy=m,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let S=0;for(let y=0;y<h.length;y++)S=(S<<5)-S+h.charCodeAt(y),S|=0;return n.colors[Math.abs(S)%n.colors.length]}n.selectColor=t;function n(h){let S,y=null,C,v;function x(...N){if(!x.enabled)return;let M=x,Q=Number(new Date),j=Q-(S||Q);M.diff=j,M.prev=S,M.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(M,be),N.splice(G,1),G--}return oe}),n.formatArgs.call(M,N),(M.log||n.log).apply(M,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 m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}LEe.exports=bit});var QEe=F((Tc,FP)=>{A();Tc.formatArgs=Rit;Tc.save=xit;Tc.load=Dit;Tc.useColors=vit;Tc.storage=Bit();Tc.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`."))}})();Tc.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 vit(){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 Rit(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+FP.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)}Tc.log=console.debug||console.log||(()=>{});function xit(e){try{e?Tc.storage.setItem("debug",e):Tc.storage.removeItem("debug")}catch{}}function Dit(){let e;try{e=Tc.storage.getItem("debug")||Tc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Bit(){try{return localStorage}catch{}}FP.exports=F5()(Tc);var{formatters:Nit}=FP.exports;Nit.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var GEe=F((sVt,FEe)=>{"use strict";A();FEe.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 HEe=F((cVt,zEe)=>{"use strict";A();var Oit=Fe("os"),jEe=Fe("tty"),Cd=GEe(),{env:za}=process,Yh;Cd("no-color")||Cd("no-colors")||Cd("color=false")||Cd("color=never")?Yh=0:(Cd("color")||Cd("colors")||Cd("color=true")||Cd("color=always"))&&(Yh=1);"FORCE_COLOR"in za&&(za.FORCE_COLOR==="true"?Yh=1:za.FORCE_COLOR==="false"?Yh=0:Yh=za.FORCE_COLOR.length===0?1:Math.min(parseInt(za.FORCE_COLOR,10),3));function G5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function j5(e,t){if(Yh===0)return 0;if(Cd("color=16m")||Cd("color=full")||Cd("color=truecolor"))return 3;if(Cd("color=256"))return 2;if(e&&!t&&Yh===void 0)return 0;let n=Yh||0;if(za.TERM==="dumb")return n;if(process.platform==="win32"){let r=Oit.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in za)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in za)||za.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in za)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(za.TEAMCITY_VERSION)?1:0;if(za.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in za){let r=parseInt((za.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(za.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(za.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(za.TERM)||"COLORTERM"in za?1:n}function wit(e){let t=j5(e,e&&e.isTTY);return G5(t)}zEe.exports={supportsColor:wit,stdout:G5(j5(!0,jEe.isatty(1))),stderr:G5(j5(!0,jEe.isatty(2)))}});var VEe=F((Ha,jP)=>{A();var Mit=Fe("tty"),GP=Fe("util");Ha.init=Git;Ha.log=Lit;Ha.formatArgs=Pit;Ha.save=Qit;Ha.load=Fit;Ha.useColors=kit;Ha.destroy=GP.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ha.colors=[6,2,3,4,5,1];try{let e=HEe();e&&(e.stderr||e).level>=2&&(Ha.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{}Ha.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 kit(){return"colors"in Ha.inspectOpts?!!Ha.inspectOpts.colors:Mit.isatty(process.stderr.fd)}function Pit(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 $Ve=Object.create;var wk=Object.defineProperty;var VVe=Object.getOwnPropertyDescriptor;var qVe=Object.getOwnPropertyNames;var YVe=Object.getPrototypeOf,KVe=Object.prototype.hasOwnProperty;var Fe=(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),Ga=(e,t)=>{for(var n in t)wk(e,n,{get:t[n],enumerable:!0})},qce=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qVe(t))!KVe.call(e,o)&&o!==n&&wk(e,o,{get:()=>t[o],enumerable:!(r=VVe(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?$Ve(YVe(e)):{},qce(t||!e||!e.__esModule?wk(n,"default",{value:e,enumerable:!0}):n,e)),ke=e=>qce(wk({},"__esModule",{value:!0}),e);var A=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.103"}}catch{}})()});var Km,X8=O(()=>{A();Km="1.9.1"});function JVe(e){let t=new Set([e]),n=new Set,r=e.match(Jce);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let m=d.match(Jce);if(!m)return i(d);let h={major:+m[1],minor:+m[2],patch:+m[3],prerelease:m[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var Jce,Zce,Wce=O(()=>{A();X8();Jce=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Zce=JVe(Km)});function Wf(e,t,n,r=!1){var o;let i=Q1[L1]=(o=Q1[L1])!==null&&o!==void 0?o:{version:Km};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!==Km){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Km}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Km}.`),!0}function _l(e){var t,n;let r=(t=Q1[L1])===null||t===void 0?void 0:t.version;if(!(!r||!Zce(r)))return(n=Q1[L1])===null||n===void 0?void 0:n[e]}function Xf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Km}.`);let n=Q1[L1];n&&delete n[e]}var ZVe,L1,Q1,pS=O(()=>{A();X8();Wce();ZVe=Km.split(".")[0],L1=Symbol.for(`opentelemetry.js.api.${ZVe}`),Q1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function F1(e,t,n){let r=_l("diag");if(r)return r[e](t,...n)}var Mk,Xce=O(()=>{A();pS();Mk=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return F1("debug",this._namespace,t)}error(...t){return F1("error",this._namespace,t)}info(...t){return F1("info",this._namespace,t)}warn(...t){return F1("warn",this._namespace,t)}verbose(...t){return F1("verbose",this._namespace,t)}}});var Aa,kk=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Aa||(Aa={}))});function ele(e,t){e<Aa.NONE?e=Aa.NONE:e>Aa.ALL&&(e=Aa.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",Aa.ERROR),warn:n("warn",Aa.WARN),info:n("info",Aa.INFO),debug:n("debug",Aa.DEBUG),verbose:n("verbose",Aa.VERBOSE)}}var tle=O(()=>{A();kk()});var WVe,ja,fS=O(()=>{A();Xce();tle();kk();pS();WVe="diag",ja=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=_l("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:Aa.INFO})=>{var a,c,d;if(o===n){let S=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=S.stack)!==null&&a!==void 0?a:S.message),!1}typeof i=="number"&&(i={logLevel:i});let m=_l("diag"),h=ele((c=i.logLevel)!==null&&c!==void 0?c:Aa.INFO,o);if(m&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return Wf("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Xf(WVe,n)},n.createComponentLogger=o=>new Mk(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var Pk,nle=O(()=>{A();Pk=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 rle,ole=O(()=>{A();rle=Symbol("BaggageEntryMetadata")});function ile(e={}){return new Pk(new Map(Object.entries(e)))}function ale(e){return typeof e!="string"&&(XVe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:rle,toString(){return e}}}var XVe,e$=O(()=>{A();fS();nle();ole();XVe=ja.instance()});function El(e){return Symbol.for(e)}var t$,RC,G1=O(()=>{A();t$=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}}},RC=new t$});var n$,r$,Uk,sle=O(()=>{A();n$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],r$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(r$[t]=console[t])}Uk=class{constructor(){function t(n){return function(...r){let o=r$[n];if(typeof o!="function"&&(o=r$.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<n$.length;n++)this[n$[n].n]=t(n$[n].c)}}});function ule(){return p$}var o$,xC,i$,a$,s$,u$,j1,c$,l$,d$,p$,eqe,tqe,nqe,rqe,oqe,iqe,aqe,f$=O(()=>{A();o$=class{constructor(){}createGauge(t,n){return tqe}createHistogram(t,n){return nqe}createCounter(t,n){return eqe}createUpDownCounter(t,n){return rqe}createObservableGauge(t,n){return iqe}createObservableCounter(t,n){return oqe}createObservableUpDownCounter(t,n){return aqe}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},xC=class{},i$=class extends xC{add(t,n){}},a$=class extends xC{add(t,n){}},s$=class extends xC{record(t,n){}},u$=class extends xC{record(t,n){}},j1=class{addCallback(t){}removeCallback(t){}},c$=class extends j1{},l$=class extends j1{},d$=class extends j1{},p$=new o$,eqe=new i$,tqe=new s$,nqe=new u$,rqe=new a$,oqe=new c$,iqe=new l$,aqe=new d$});var Lk,cle=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(Lk||(Lk={}))});var Qk,Fk,A$=O(()=>{A();Qk={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},Fk={set(e,t,n){e!=null&&(e[t]=n)}}});var Gk,lle=O(()=>{A();G1();Gk=class{active(){return RC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var m$,sqe,eA,z1=O(()=>{A();lle();pS();fS();m$="context",sqe=new Gk,eA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Wf(m$,t,ja.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 _l(m$)||sqe}disable(){this._getContextManager().disable(),Xf(m$,ja.instance())}}});var Hs,g$=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Hs||(Hs={}))});var H1,AS,jk,zk=O(()=>{A();g$();H1="0000000000000000",AS="00000000000000000000000000000000",jk={traceId:AS,spanId:H1,traceFlags:Hs.NONE}});var tA,Hk=O(()=>{A();zk();tA=class{constructor(t=jk){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 $k(e){return e.getValue(h$)||void 0}function dle(){return $k(eA.getInstance().active())}function $1(e,t){return e.setValue(h$,t)}function ple(e){return e.deleteValue(h$)}function fle(e,t){return $1(e,new tA(t))}function Vk(e){var t;return(t=$k(e))===null||t===void 0?void 0:t.spanContext()}var h$,_$=O(()=>{A();G1();Hk();z1();h$=El("OpenTelemetry Context Key SPAN")});function Ale(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(qk[e.charCodeAt(r)]|0)+(qk[e.charCodeAt(r+1)]|0)+(qk[e.charCodeAt(r+2)]|0)+(qk[e.charCodeAt(r+3)]|0);return n===t}function E$(e){return Ale(e,32)&&e!==AS}function S$(e){return Ale(e,16)&&e!==H1}function Jm(e){return E$(e.traceId)&&S$(e.spanId)}function mle(e){return new tA(e)}var qk,Yk=O(()=>{A();zk();Hk();qk=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 uqe(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 y$,DC,T$=O(()=>{A();z1();_$();Hk();Yk();y$=eA.getInstance(),DC=class{startSpan(t,n,r=y$.active()){if(!!n?.root)return new tA;let i=r&&Vk(r);return uqe(i)&&Jm(i)?new tA(i):new tA}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??y$.active(),m=this.startSpan(t,i,d),h=$1(d,m);return y$.with(h,c,void 0,m)}}});var cqe,BC,I$=O(()=>{A();T$();cqe=new DC,BC=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):cqe}}});var Kk,gle=O(()=>{A();T$();Kk=class{getTracer(t,n,r){return new DC}}});var lqe,mS,C$=O(()=>{A();I$();gle();lqe=new Kk,mS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new BC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:lqe}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 Jk,hle=O(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Jk||(Jk={}))});var oo,_le=O(()=>{A();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(oo||(oo={}))});var ai,Ele=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ai||(ai={}))});function Sle(e){return fqe.test(e)}function yle(e){return Aqe.test(e)&&!mqe.test(e)}var b$,dqe,pqe,fqe,Aqe,mqe,Tle=O(()=>{A();b$="[_0-9a-z-*/]",dqe=`[a-z]${b$}{0,255}`,pqe=`[a-z0-9]${b$}{0,240}@[a-z]${b$}{0,13}`,fqe=new RegExp(`^(?:${dqe}|${pqe})$`),Aqe=/^[ -~]{0,255}[!-~]$/,mqe=/,|=/});var Ile,gqe,Cle,ble,Zk,vle=O(()=>{A();Tle();Ile=32,gqe=512,Cle=",",ble="=",Zk=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+ble+this.get(n)),t),[]).join(Cle)}_parse(t){t.length>gqe||(this._internalState=t.split(Cle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(ble);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Sle(a)&&yle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Ile&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ile))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function Rle(e){return new Zk(e)}var xle=O(()=>{A();vle()});var Ye,Dle=O(()=>{A();z1();Ye=eA.getInstance()});var Sl,Ble=O(()=>{A();fS();Sl=ja.instance()});var v$,Nle,Ole=O(()=>{A();f$();v$=class{getMeter(t,n,r){return p$}},Nle=new v$});var R$,Wk,wle=O(()=>{A();Ole();pS();fS();R$="metrics",Wk=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Wf(R$,t,ja.instance())}getMeterProvider(){return _l(R$)||Nle}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Xf(R$,ja.instance())}}});var x$,Mle=O(()=>{A();wle();x$=Wk.getInstance()});var Xk,kle=O(()=>{A();Xk=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function B$(e){return e.getValue(D$)||void 0}function Ple(){return B$(eA.getInstance().active())}function Ule(e,t){return e.setValue(D$,t)}function Lle(e){return e.deleteValue(D$)}var D$,Qle=O(()=>{A();z1();G1();D$=El("OpenTelemetry Baggage Key")});var N$,hqe,eP,Fle=O(()=>{A();pS();kle();A$();Qle();e$();fS();N$="propagation",hqe=new Xk,eP=class e{constructor(){this.createBaggage=ile,this.getBaggage=B$,this.getActiveBaggage=Ple,this.setBaggage=Ule,this.deleteBaggage=Lle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Wf(N$,t,ja.instance())}inject(t,n,r=Fk){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=Qk){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Xf(N$,ja.instance())}_getGlobalPropagator(){return _l(N$)||hqe}}});var Fp,Gle=O(()=>{A();Fle();Fp=eP.getInstance()});var O$,tP,jle=O(()=>{A();pS();C$();Yk();_$();fS();O$="trace",tP=class e{constructor(){this._proxyTracerProvider=new mS,this.wrapSpanContext=mle,this.isSpanContextValid=Jm,this.deleteSpan=ple,this.getSpan=$k,this.getActiveSpan=dle,this.getSpanContext=Vk,this.setSpan=$1,this.setSpanContext=fle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Wf(O$,this._proxyTracerProvider,ja.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return _l(O$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Xf(O$,ja.instance()),this._proxyTracerProvider=new mS}}});var zt,zle=O(()=>{A();jle();zt=tP.getInstance()});var Ze={};Ga(Ze,{DiagConsoleLogger:()=>Uk,DiagLogLevel:()=>Aa,INVALID_SPANID:()=>H1,INVALID_SPAN_CONTEXT:()=>jk,INVALID_TRACEID:()=>AS,ProxyTracer:()=>BC,ProxyTracerProvider:()=>mS,ROOT_CONTEXT:()=>RC,SamplingDecision:()=>Jk,SpanKind:()=>oo,SpanStatusCode:()=>ai,TraceFlags:()=>Hs,ValueType:()=>Lk,baggageEntryMetadataFromString:()=>ale,context:()=>Ye,createContextKey:()=>El,createNoopMeter:()=>ule,createTraceState:()=>Rle,default:()=>_qe,defaultTextMapGetter:()=>Qk,defaultTextMapSetter:()=>Fk,diag:()=>Sl,isSpanContextValid:()=>Jm,isValidSpanId:()=>S$,isValidTraceId:()=>E$,metrics:()=>x$,propagation:()=>Fp,trace:()=>zt});var _qe,Ge=O(()=>{A();e$();G1();sle();kk();f$();cle();A$();I$();C$();hle();_le();Ele();g$();xle();Yk();zk();Dle();Ble();Mle();Gle();zle();_qe={context:Ye,diag:Sl,metrics:x$,propagation:Fp,trace:zt}});var V1=F($h=>{"use strict";A();Object.defineProperty($h,"__esModule",{value:!0});$h.isTracingSuppressed=$h.unsuppressTracing=$h.suppressTracing=void 0;var Eqe=(Ge(),ke(Ze)),w$=(0,Eqe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Sqe(e){return e.setValue(w$,!0)}$h.suppressTracing=Sqe;function yqe(e){return e.deleteValue(w$)}$h.unsuppressTracing=yqe;function Tqe(e){return e.getValue(w$)===!0}$h.isTracingSuppressed=Tqe});var M$=F($s=>{"use strict";A();Object.defineProperty($s,"__esModule",{value:!0});$s.BAGGAGE_MAX_TOTAL_LENGTH=$s.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=$s.BAGGAGE_MAX_NAME_VALUE_PAIRS=$s.BAGGAGE_HEADER=$s.BAGGAGE_ITEMS_SEPARATOR=$s.BAGGAGE_PROPERTIES_SEPARATOR=$s.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;$s.BAGGAGE_KEY_PAIR_SEPARATOR="=";$s.BAGGAGE_PROPERTIES_SEPARATOR=";";$s.BAGGAGE_ITEMS_SEPARATOR=",";$s.BAGGAGE_HEADER="baggage";$s.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;$s.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;$s.BAGGAGE_MAX_TOTAL_LENGTH=8192});var k$=F(nA=>{"use strict";A();Object.defineProperty(nA,"__esModule",{value:!0});nA.parseKeyPairsIntoRecord=nA.parsePairKeyValue=nA.getKeyPairs=nA.serializeKeyPairs=void 0;var Iqe=(Ge(),ke(Ze)),NC=M$();function Cqe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?NC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>NC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}nA.serializeKeyPairs=Cqe;function bqe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=NC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}nA.getKeyPairs=bqe;function Hle(e){if(!e)return;let t=e.indexOf(NC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(NC.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let m=e.substring(t+1);d=(0,Iqe.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}nA.parsePairKeyValue=Hle;function vqe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(NC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Hle(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}nA.parseKeyPairsIntoRecord=vqe});var $le=F(nP=>{"use strict";A();Object.defineProperty(nP,"__esModule",{value:!0});nP.W3CBaggagePropagator=void 0;var P$=(Ge(),ke(Ze)),Rqe=V1(),gS=M$(),U$=k$(),L$=class{inject(t,n,r){let o=P$.propagation.getBaggage(t);if(!o||(0,Rqe.isTracingSuppressed)(t))return;let i=(0,U$.getKeyPairs)(o).filter(c=>c.length<=gS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,gS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,U$.serializeKeyPairs)(i);a.length>0&&r.set(n,gS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,gS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(gS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(gS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let m=(0,U$.parsePairKeyValue)(d);if(m){let h={value:m.value};m.metadata&&(h.metadata=m.metadata),a[m.key]=h}}),Object.entries(a).length===0)?t:P$.propagation.setBaggage(t,P$.propagation.createBaggage(a))}fields(){return[gS.BAGGAGE_HEADER]}};nP.W3CBaggagePropagator=L$});var Vle=F(rP=>{"use strict";A();Object.defineProperty(rP,"__esModule",{value:!0});rP.AnchoredClock=void 0;var Q$=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}};rP.AnchoredClock=Q$});var Zle=F(Vh=>{"use strict";A();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.isAttributeValue=Vh.isAttributeKey=Vh.sanitizeAttributes=void 0;var qle=(Ge(),ke(Ze));function xqe(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(!Yle(n)){qle.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Kle(r)){qle.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}Vh.sanitizeAttributes=xqe;function Yle(e){return typeof e=="string"&&e!==""}Vh.isAttributeKey=Yle;function Kle(e){return e==null?!0:Array.isArray(e)?Dqe(e):Jle(typeof e)}Vh.isAttributeValue=Kle;function Dqe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(Jle(r)){t=r;continue}return!1}return!1}}return!0}function Jle(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var F$=F(oP=>{"use strict";A();Object.defineProperty(oP,"__esModule",{value:!0});oP.loggingErrorHandler=void 0;var Bqe=(Ge(),ke(Ze));function Nqe(){return e=>{Bqe.diag.error(Oqe(e))}}oP.loggingErrorHandler=Nqe;function Oqe(e){return typeof e=="string"?e:JSON.stringify(wqe(e))}function wqe(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 Xle=F(OC=>{"use strict";A();Object.defineProperty(OC,"__esModule",{value:!0});OC.globalErrorHandler=OC.setGlobalErrorHandler=void 0;var Mqe=F$(),Wle=(0,Mqe.loggingErrorHandler)();function kqe(e){Wle=e}OC.setGlobalErrorHandler=kqe;function Pqe(e){try{Wle(e)}catch{}}OC.globalErrorHandler=Pqe});var rde=F(rA=>{"use strict";A();Object.defineProperty(rA,"__esModule",{value:!0});rA.getStringListFromEnv=rA.getBooleanFromEnv=rA.getStringFromEnv=rA.getNumberFromEnv=void 0;var ede=(Ge(),ke(Ze)),tde=Fe("util");function Uqe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){ede.diag.warn(`Unknown value ${(0,tde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}rA.getNumberFromEnv=Uqe;function nde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}rA.getStringFromEnv=nde;function Lqe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||ede.diag.warn(`Unknown value ${(0,tde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}rA.getBooleanFromEnv=Lqe;function Qqe(e){return nde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}rA.getStringListFromEnv=Qqe});var ode=F(iP=>{"use strict";A();Object.defineProperty(iP,"__esModule",{value:!0});iP._globalThis=void 0;iP._globalThis=globalThis});var ide=F(aP=>{"use strict";A();Object.defineProperty(aP,"__esModule",{value:!0});aP.VERSION=void 0;aP.VERSION="2.6.1"});function Ii(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 G$=O(()=>{A()});var ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,xde,Dde,Bde,Nde,Ode,wde,Mde,kde,Pde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$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,Mpe,kpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$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,Fqe,j$,Gqe,jqe,zqe,Hqe,z$,$qe,Vqe,qqe,Yqe,Kqe,Jqe,Zqe,Wqe,Xqe,e7e,t7e,n7e,r7e,o7e,i7e,a7e,s7e,u7e,H$,c7e,l7e,d7e,p7e,f7e,A7e,m7e,g7e,h7e,_7e,E7e,S7e,$$,y7e,T7e,V$,q$,I7e,C7e,b7e,v7e,R7e,x7e,D7e,B7e,N7e,O7e,w7e,M7e,k7e,P7e,U7e,L7e,Q7e,q1,wC,Y$,F7e,G7e,hS,j7e,z7e,H7e,$7e,K$,J$,V7e,Z$,q7e,Y7e,K7e,J7e,Z7e,W7e,X7e,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,W$,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,xYe,DYe,BYe,NYe,OYe,wYe,MYe,X$,kYe,e5,PYe,UYe,LYe,QYe,FYe,GYe,jYe,zYe,HYe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,Mfe,kfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,xKe,DKe,BKe,NKe,OKe,wKe,MKe,kKe,PKe,UKe,LKe,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,QKe,FKe,GKe,jKe,zKe,HKe,$Ke,VKe,qKe,YKe,KKe,JKe,BAe,NAe,OAe,wAe,MAe,ZKe,WKe,XKe,eJe,tJe,nJe,kAe,PAe,UAe,rJe,oJe,iJe,aJe,LAe,QAe,FAe,GAe,sJe,uJe,cJe,lJe,dJe,jAe,zAe,HAe,$Ae,VAe,qAe,YAe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,KAe,JAe,ZAe,WAe,XAe,SJe,yJe,TJe,IJe,CJe,bJe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,MJe,kJe,PJe,UJe,LJe,QJe,FJe,GJe,jJe,zJe,HJe,$Je,VJe,qJe,yme,Tme,Ime,Cme,bme,YJe,KJe,JJe,ZJe,WJe,XJe,vme,Rme,eZe,tZe,nZe,xme,Dme,rZe,oZe,iZe,Bme,Nme,Ome,wme,Mme,kme,Pme,Ume,Lme,Qme,Fme,Gme,jme,zme,Hme,$me,Vme,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,hZe,_Ze,EZe,SZe,yZe,TZe,IZe,qme,Yme,CZe,bZe,vZe,Kme=O(()=>{A();G$();ade="aws.lambda.invoked_arn",sde="db.system",ude="db.connection_string",cde="db.user",lde="db.jdbc.driver_classname",dde="db.name",pde="db.statement",fde="db.operation",Ade="db.mssql.instance_name",mde="db.cassandra.keyspace",gde="db.cassandra.page_size",hde="db.cassandra.consistency_level",_de="db.cassandra.table",Ede="db.cassandra.idempotence",Sde="db.cassandra.speculative_execution_count",yde="db.cassandra.coordinator.id",Tde="db.cassandra.coordinator.dc",Ide="db.hbase.namespace",Cde="db.redis.database_index",bde="db.mongodb.collection",vde="db.sql.table",Rde="exception.type",xde="exception.message",Dde="exception.stacktrace",Bde="exception.escaped",Nde="faas.trigger",Ode="faas.execution",wde="faas.document.collection",Mde="faas.document.operation",kde="faas.document.time",Pde="faas.document.name",Ude="faas.time",Lde="faas.cron",Qde="faas.coldstart",Fde="faas.invoked_name",Gde="faas.invoked_provider",jde="faas.invoked_region",zde="net.transport",Hde="net.peer.ip",$de="net.peer.port",Vde="net.peer.name",qde="net.host.ip",Yde="net.host.port",Kde="net.host.name",Jde="net.host.connection.type",Zde="net.host.connection.subtype",Wde="net.host.carrier.name",Xde="net.host.carrier.mcc",epe="net.host.carrier.mnc",tpe="net.host.carrier.icc",npe="peer.service",rpe="enduser.id",ope="enduser.role",ipe="enduser.scope",ape="thread.id",spe="thread.name",upe="code.function",cpe="code.namespace",lpe="code.filepath",dpe="code.lineno",ppe="http.method",fpe="http.url",Ape="http.target",mpe="http.host",gpe="http.scheme",hpe="http.status_code",_pe="http.flavor",Epe="http.user_agent",Spe="http.request_content_length",ype="http.request_content_length_uncompressed",Tpe="http.response_content_length",Ipe="http.response_content_length_uncompressed",Cpe="http.server_name",bpe="http.route",vpe="http.client_ip",Rpe="aws.dynamodb.table_names",xpe="aws.dynamodb.consumed_capacity",Dpe="aws.dynamodb.item_collection_metrics",Bpe="aws.dynamodb.provisioned_read_capacity",Npe="aws.dynamodb.provisioned_write_capacity",Ope="aws.dynamodb.consistent_read",wpe="aws.dynamodb.projection",Mpe="aws.dynamodb.limit",kpe="aws.dynamodb.attributes_to_get",Ppe="aws.dynamodb.index_name",Upe="aws.dynamodb.select",Lpe="aws.dynamodb.global_secondary_indexes",Qpe="aws.dynamodb.local_secondary_indexes",Fpe="aws.dynamodb.exclusive_start_table",Gpe="aws.dynamodb.table_count",jpe="aws.dynamodb.scan_forward",zpe="aws.dynamodb.segment",Hpe="aws.dynamodb.total_segments",$pe="aws.dynamodb.count",Vpe="aws.dynamodb.scanned_count",qpe="aws.dynamodb.attribute_definitions",Ype="aws.dynamodb.global_secondary_index_updates",Kpe="messaging.system",Jpe="messaging.destination",Zpe="messaging.destination_kind",Wpe="messaging.temp_destination",Xpe="messaging.protocol",efe="messaging.protocol_version",tfe="messaging.url",nfe="messaging.message_id",rfe="messaging.conversation_id",ofe="messaging.message_payload_size_bytes",ife="messaging.message_payload_compressed_size_bytes",afe="messaging.operation",sfe="messaging.consumer_id",ufe="messaging.rabbitmq.routing_key",cfe="messaging.kafka.message_key",lfe="messaging.kafka.consumer_group",dfe="messaging.kafka.client_id",pfe="messaging.kafka.partition",ffe="messaging.kafka.tombstone",Afe="rpc.system",mfe="rpc.service",gfe="rpc.method",hfe="rpc.grpc.status_code",_fe="rpc.jsonrpc.version",Efe="rpc.jsonrpc.request_id",Sfe="rpc.jsonrpc.error_code",yfe="rpc.jsonrpc.error_message",Tfe="message.type",Ife="message.id",Cfe="message.compressed_size",bfe="message.uncompressed_size",Fqe=ade,j$=sde,Gqe=ude,jqe=cde,zqe=lde,Hqe=dde,z$=pde,$qe=fde,Vqe=Ade,qqe=mde,Yqe=gde,Kqe=hde,Jqe=_de,Zqe=Ede,Wqe=Sde,Xqe=yde,e7e=Tde,t7e=Ide,n7e=Cde,r7e=bde,o7e=vde,i7e=Rde,a7e=xde,s7e=Dde,u7e=Bde,H$=Nde,c7e=Ode,l7e=wde,d7e=Mde,p7e=kde,f7e=Pde,A7e=Ude,m7e=Lde,g7e=Qde,h7e=Fde,_7e=Gde,E7e=jde,S7e=zde,$$=Hde,y7e=$de,T7e=Vde,V$=qde,q$=Yde,I7e=Kde,C7e=Jde,b7e=Zde,v7e=Wde,R7e=Xde,x7e=epe,D7e=tpe,B7e=npe,N7e=rpe,O7e=ope,w7e=ipe,M7e=ape,k7e=spe,P7e=upe,U7e=cpe,L7e=lpe,Q7e=dpe,q1=ppe,wC=fpe,Y$=Ape,F7e=mpe,G7e=gpe,hS=hpe,j7e=_pe,z7e=Epe,H7e=Spe,$7e=ype,K$=Tpe,J$=Ipe,V7e=Cpe,Z$=bpe,q7e=vpe,Y7e=Rpe,K7e=xpe,J7e=Dpe,Z7e=Bpe,W7e=Npe,X7e=Ope,eYe=wpe,tYe=Mpe,nYe=kpe,rYe=Ppe,oYe=Upe,iYe=Lpe,aYe=Qpe,sYe=Fpe,uYe=Gpe,cYe=jpe,lYe=zpe,dYe=Hpe,pYe=$pe,fYe=Vpe,AYe=qpe,mYe=Ype,W$=Kpe,gYe=Jpe,hYe=Zpe,_Ye=Wpe,EYe=Xpe,SYe=efe,yYe=tfe,TYe=nfe,IYe=rfe,CYe=ofe,bYe=ife,vYe=afe,RYe=sfe,xYe=ufe,DYe=cfe,BYe=lfe,NYe=dfe,OYe=pfe,wYe=ffe,MYe=Afe,X$=mfe,kYe=gfe,e5=hfe,PYe=_fe,UYe=Efe,LYe=Sfe,QYe=yfe,FYe=Tfe,GYe=Ife,jYe=Cfe,zYe=bfe,HYe=Ii([ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,xde,Dde,Bde,Nde,Ode,wde,Mde,kde,Pde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$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,Mpe,kpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$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="other_sql",Rfe="mssql",xfe="mysql",Dfe="oracle",Bfe="db2",Nfe="postgresql",Ofe="redshift",wfe="hive",Mfe="cloudscape",kfe="hsqldb",Pfe="progress",Ufe="maxdb",Lfe="hanadb",Qfe="ingres",Ffe="firstsql",Gfe="edb",jfe="cache",zfe="adabas",Hfe="firebird",$fe="derby",Vfe="filemaker",qfe="informix",Yfe="instantdb",Kfe="interbase",Jfe="mariadb",Zfe="netezza",Wfe="pervasive",Xfe="pointbase",eAe="sqlite",tAe="sybase",nAe="teradata",rAe="vertica",oAe="h2",iAe="coldfusion",aAe="cassandra",sAe="hbase",uAe="mongodb",cAe="redis",lAe="couchbase",dAe="couchdb",pAe="cosmosdb",fAe="dynamodb",AAe="neo4j",mAe="geode",gAe="elasticsearch",hAe="memcached",_Ae="cockroachdb",$Ye=vfe,VYe=Rfe,qYe=xfe,YYe=Dfe,KYe=Bfe,JYe=Nfe,ZYe=Ofe,WYe=wfe,XYe=Mfe,eKe=kfe,tKe=Pfe,nKe=Ufe,rKe=Lfe,oKe=Qfe,iKe=Ffe,aKe=Gfe,sKe=jfe,uKe=zfe,cKe=Hfe,lKe=$fe,dKe=Vfe,pKe=qfe,fKe=Yfe,AKe=Kfe,mKe=Jfe,gKe=Zfe,hKe=Wfe,_Ke=Xfe,EKe=eAe,SKe=tAe,yKe=nAe,TKe=rAe,IKe=oAe,CKe=iAe,bKe=aAe,vKe=sAe,RKe=uAe,xKe=cAe,DKe=lAe,BKe=dAe,NKe=pAe,OKe=fAe,wKe=AAe,MKe=mAe,kKe=gAe,PKe=hAe,UKe=_Ae,LKe=Ii([vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,Mfe,kfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae]),EAe="all",SAe="each_quorum",yAe="quorum",TAe="local_quorum",IAe="one",CAe="two",bAe="three",vAe="local_one",RAe="any",xAe="serial",DAe="local_serial",QKe=EAe,FKe=SAe,GKe=yAe,jKe=TAe,zKe=IAe,HKe=CAe,$Ke=bAe,VKe=vAe,qKe=RAe,YKe=xAe,KKe=DAe,JKe=Ii([EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe]),BAe="datasource",NAe="http",OAe="pubsub",wAe="timer",MAe="other",ZKe=BAe,WKe=NAe,XKe=OAe,eJe=wAe,tJe=MAe,nJe=Ii([BAe,NAe,OAe,wAe,MAe]),kAe="insert",PAe="edit",UAe="delete",rJe=kAe,oJe=PAe,iJe=UAe,aJe=Ii([kAe,PAe,UAe]),LAe="alibaba_cloud",QAe="aws",FAe="azure",GAe="gcp",sJe=LAe,uJe=QAe,cJe=FAe,lJe=GAe,dJe=Ii([LAe,QAe,FAe,GAe]),jAe="ip_tcp",zAe="ip_udp",HAe="ip",$Ae="unix",VAe="pipe",qAe="inproc",YAe="other",pJe=jAe,fJe=zAe,AJe=HAe,mJe=$Ae,gJe=VAe,hJe=qAe,_Je=YAe,EJe=Ii([jAe,zAe,HAe,$Ae,VAe,qAe,YAe]),KAe="wifi",JAe="wired",ZAe="cell",WAe="unavailable",XAe="unknown",SJe=KAe,yJe=JAe,TJe=ZAe,IJe=WAe,CJe=XAe,bJe=Ii([KAe,JAe,ZAe,WAe,XAe]),eme="gprs",tme="edge",nme="umts",rme="cdma",ome="evdo_0",ime="evdo_a",ame="cdma2000_1xrtt",sme="hsdpa",ume="hsupa",cme="hspa",lme="iden",dme="evdo_b",pme="lte",fme="ehrpd",Ame="hspap",mme="gsm",gme="td_scdma",hme="iwlan",_me="nr",Eme="nrnsa",Sme="lte_ca",vJe=eme,RJe=tme,xJe=nme,DJe=rme,BJe=ome,NJe=ime,OJe=ame,wJe=sme,MJe=ume,kJe=cme,PJe=lme,UJe=dme,LJe=pme,QJe=fme,FJe=Ame,GJe=mme,jJe=gme,zJe=hme,HJe=_me,$Je=Eme,VJe=Sme,qJe=Ii([eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,mme,gme,hme,_me,Eme,Sme]),yme="1.0",Tme="1.1",Ime="2.0",Cme="SPDY",bme="QUIC",YJe=yme,KJe=Tme,JJe=Ime,ZJe=Cme,WJe=bme,XJe={HTTP_1_0:yme,HTTP_1_1:Tme,HTTP_2_0:Ime,SPDY:Cme,QUIC:bme},vme="queue",Rme="topic",eZe=vme,tZe=Rme,nZe=Ii([vme,Rme]),xme="receive",Dme="process",rZe=xme,oZe=Dme,iZe=Ii([xme,Dme]),Bme=0,Nme=1,Ome=2,wme=3,Mme=4,kme=5,Pme=6,Ume=7,Lme=8,Qme=9,Fme=10,Gme=11,jme=12,zme=13,Hme=14,$me=15,Vme=16,aZe=Bme,sZe=Nme,uZe=Ome,cZe=wme,lZe=Mme,dZe=kme,pZe=Pme,fZe=Ume,AZe=Lme,mZe=Qme,gZe=Fme,hZe=Gme,_Ze=jme,EZe=zme,SZe=Hme,yZe=$me,TZe=Vme,IZe={OK:Bme,CANCELLED:Nme,UNKNOWN:Ome,INVALID_ARGUMENT:wme,DEADLINE_EXCEEDED:Mme,NOT_FOUND:kme,ALREADY_EXISTS:Pme,PERMISSION_DENIED:Ume,RESOURCE_EXHAUSTED:Lme,FAILED_PRECONDITION:Qme,ABORTED:Fme,OUT_OF_RANGE:Gme,UNIMPLEMENTED:jme,INTERNAL:zme,UNAVAILABLE:Hme,DATA_LOSS:$me,UNAUTHENTICATED:Vme},qme="SENT",Yme="RECEIVED",CZe=qme,bZe=Yme,vZe=Ii([qme,Yme])});var Jme=O(()=>{A();Kme()});var Zme,Wme,Xme,ege,tge,nge,rge,oge,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,Tge,Ige,Cge,bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,Mge,kge,Pge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$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,RZe,xZe,DZe,BZe,NZe,OZe,wZe,MZe,kZe,PZe,UZe,LZe,QZe,FZe,GZe,jZe,zZe,HZe,$Ze,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,dWe,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,MWe,kWe,PWe,UWe,LWe,QWe,FWe,GWe,jWe,zWe,t5,HWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,Che,bhe,vhe,Rhe,eXe,tXe,nXe,rXe,oXe,xhe,Dhe,Bhe,Nhe,Ohe,whe,Mhe,khe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,$he,Vhe,IXe,CXe,bXe,qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,MXe,kXe,PXe,UXe,LXe,QXe,FXe,GXe,jXe,zXe,HXe,$Xe,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,y_e=O(()=>{A();G$();Zme="cloud.provider",Wme="cloud.account.id",Xme="cloud.region",ege="cloud.availability_zone",tge="cloud.platform",nge="aws.ecs.container.arn",rge="aws.ecs.cluster.arn",oge="aws.ecs.launchtype",ige="aws.ecs.task.arn",age="aws.ecs.task.family",sge="aws.ecs.task.revision",uge="aws.eks.cluster.arn",cge="aws.log.group.names",lge="aws.log.group.arns",dge="aws.log.stream.names",pge="aws.log.stream.arns",fge="container.name",Age="container.id",mge="container.runtime",gge="container.image.name",hge="container.image.tag",_ge="deployment.environment",Ege="device.id",Sge="device.model.identifier",yge="device.model.name",Tge="faas.name",Ige="faas.id",Cge="faas.version",bge="faas.instance",vge="faas.max_memory",Rge="host.id",xge="host.name",Dge="host.type",Bge="host.arch",Nge="host.image.name",Oge="host.image.id",wge="host.image.version",Mge="k8s.cluster.name",kge="k8s.node.name",Pge="k8s.node.uid",Uge="k8s.namespace.name",Lge="k8s.pod.uid",Qge="k8s.pod.name",Fge="k8s.container.name",Gge="k8s.replicaset.uid",jge="k8s.replicaset.name",zge="k8s.deployment.uid",Hge="k8s.deployment.name",$ge="k8s.statefulset.uid",Vge="k8s.statefulset.name",qge="k8s.daemonset.uid",Yge="k8s.daemonset.name",Kge="k8s.job.uid",Jge="k8s.job.name",Zge="k8s.cronjob.uid",Wge="k8s.cronjob.name",Xge="os.type",ehe="os.description",the="os.name",nhe="os.version",rhe="process.pid",ohe="process.executable.name",ihe="process.executable.path",ahe="process.command",she="process.command_line",uhe="process.command_args",che="process.owner",lhe="process.runtime.name",dhe="process.runtime.version",phe="process.runtime.description",fhe="service.name",Ahe="service.namespace",mhe="service.instance.id",ghe="service.version",hhe="telemetry.sdk.name",_he="telemetry.sdk.language",Ehe="telemetry.sdk.version",She="telemetry.auto.version",yhe="webengine.name",The="webengine.version",Ihe="webengine.description",RZe=Zme,xZe=Wme,DZe=Xme,BZe=ege,NZe=tge,OZe=nge,wZe=rge,MZe=oge,kZe=ige,PZe=age,UZe=sge,LZe=uge,QZe=cge,FZe=lge,GZe=dge,jZe=pge,zZe=fge,HZe=Age,$Ze=mge,VZe=gge,qZe=hge,YZe=_ge,KZe=Ege,JZe=Sge,ZZe=yge,WZe=Tge,XZe=Ige,eWe=Cge,tWe=bge,nWe=vge,rWe=Rge,oWe=xge,iWe=Dge,aWe=Bge,sWe=Nge,uWe=Oge,cWe=wge,lWe=Mge,dWe=kge,pWe=Pge,fWe=Uge,AWe=Lge,mWe=Qge,gWe=Fge,hWe=Gge,_We=jge,EWe=zge,SWe=Hge,yWe=$ge,TWe=Vge,IWe=qge,CWe=Yge,bWe=Kge,vWe=Jge,RWe=Zge,xWe=Wge,DWe=Xge,BWe=ehe,NWe=the,OWe=nhe,wWe=rhe,MWe=ohe,kWe=ihe,PWe=ahe,UWe=she,LWe=uhe,QWe=che,FWe=lhe,GWe=dhe,jWe=phe,zWe=fhe,t5=Ahe,HWe=mhe,$We=ghe,VWe=hhe,qWe=_he,YWe=Ehe,KWe=She,JWe=yhe,ZWe=The,WWe=Ihe,XWe=Ii([Zme,Wme,Xme,ege,tge,nge,rge,oge,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,Tge,Ige,Cge,bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,Mge,kge,Pge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$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="alibaba_cloud",bhe="aws",vhe="azure",Rhe="gcp",eXe=Che,tXe=bhe,nXe=vhe,rXe=Rhe,oXe=Ii([Che,bhe,vhe,Rhe]),xhe="alibaba_cloud_ecs",Dhe="alibaba_cloud_fc",Bhe="aws_ec2",Nhe="aws_ecs",Ohe="aws_eks",whe="aws_lambda",Mhe="aws_elastic_beanstalk",khe="azure_vm",Phe="azure_container_instances",Uhe="azure_aks",Lhe="azure_functions",Qhe="azure_app_service",Fhe="gcp_compute_engine",Ghe="gcp_cloud_run",jhe="gcp_kubernetes_engine",zhe="gcp_cloud_functions",Hhe="gcp_app_engine",iXe=xhe,aXe=Dhe,sXe=Bhe,uXe=Nhe,cXe=Ohe,lXe=whe,dXe=Mhe,pXe=khe,fXe=Phe,AXe=Uhe,mXe=Lhe,gXe=Qhe,hXe=Fhe,_Xe=Ghe,EXe=jhe,SXe=zhe,yXe=Hhe,TXe=Ii([xhe,Dhe,Bhe,Nhe,Ohe,whe,Mhe,khe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe]),$he="ec2",Vhe="fargate",IXe=$he,CXe=Vhe,bXe=Ii([$he,Vhe]),qhe="amd64",Yhe="arm32",Khe="arm64",Jhe="ia64",Zhe="ppc32",Whe="ppc64",Xhe="x86",vXe=qhe,RXe=Yhe,xXe=Khe,DXe=Jhe,BXe=Zhe,NXe=Whe,OXe=Xhe,wXe=Ii([qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe]),e_e="windows",t_e="linux",n_e="darwin",r_e="freebsd",o_e="netbsd",i_e="openbsd",a_e="dragonflybsd",s_e="hpux",u_e="aix",c_e="solaris",l_e="z_os",MXe=e_e,kXe=t_e,PXe=n_e,UXe=r_e,LXe=o_e,QXe=i_e,FXe=a_e,GXe=s_e,jXe=u_e,zXe=c_e,HXe=l_e,$Xe=Ii([e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e]),d_e="cpp",p_e="dotnet",f_e="erlang",A_e="go",m_e="java",g_e="nodejs",h_e="php",__e="python",E_e="ruby",S_e="webjs",VXe=d_e,qXe=p_e,YXe=f_e,KXe=A_e,JXe=m_e,ZXe=g_e,WXe=h_e,XXe=__e,eet=E_e,tet=S_e,net=Ii([d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e])});var T_e=O(()=>{A();y_e()});var ret,oet,iet,aet,set,uet,cet,det,pet,fet,Aet,met,get,het,_et,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,n5,r5,Bet,MC,Net,o5,i5,Oet,_S,wet,Met,ket,Pet,Uet,Let,Qet,Fet,Get,jet,a5,zet,Het,$et,Vet,qet,Yet,ES,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,stt,Zm,Wm,utt,ctt,ltt,dtt,ptt,ftt,Att,mtt,gtt,htt,_tt,Ett,Stt,ytt,Ttt,Itt,s5,u5,Ctt,c5,l5,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,Mtt,ktt,Ptt,Utt,Ltt,d5,p5,Qtt,f5,Ftt,A5,Gtt,jtt,ztt,Htt,$tt,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,cnt,lnt,qh,dnt,pnt,fnt,m5,I_e=O(()=>{A();ret="aspnetcore.diagnostics.exception.result",oet="aborted",iet="handled",aet="skipped",set="unhandled",uet="aspnetcore.diagnostics.handler.type",cet="aspnetcore.rate_limiting.policy",det="aspnetcore.rate_limiting.result",pet="acquired",fet="endpoint_limiter",Aet="global_limiter",met="request_canceled",get="aspnetcore.request.is_unhandled",het="aspnetcore.routing.is_fallback",_et="aspnetcore.routing.match_status",Eet="failure",yet="success",Tet="aspnetcore.user.is_authenticated",Iet="client.address",Cet="client.port",bet="code.column.number",vet="code.file.path",Ret="code.function.name",xet="code.line.number",Det="code.stacktrace",n5="db.collection.name",r5="db.namespace",Bet="db.operation.batch.size",MC="db.operation.name",Net="db.query.summary",o5="db.query.text",i5="db.response.status_code",Oet="db.stored_procedure.name",_S="db.system.name",wet="mariadb",Met="microsoft.sql_server",ket="mysql",Pet="postgresql",Uet="dotnet.gc.heap.generation",Let="gen0",Qet="gen1",Fet="gen2",Get="loh",jet="poh",a5="error.type",zet="_OTHER",Het="exception.escaped",$et="exception.message",Vet="exception.stacktrace",qet="exception.type",Yet=e=>`http.request.header.${e}`,ES="http.request.method",Ket="_OTHER",Jet="CONNECT",Zet="DELETE",Wet="GET",Xet="HEAD",ett="OPTIONS",ttt="PATCH",ntt="POST",rtt="PUT",ott="TRACE",itt="http.request.method_original",att="http.request.resend_count",stt=e=>`http.response.header.${e}`,Zm="http.response.status_code",Wm="http.route",utt="jvm.gc.action",ctt="jvm.gc.name",ltt="jvm.memory.pool.name",dtt="jvm.memory.type",ptt="heap",ftt="non_heap",Att="jvm.thread.daemon",mtt="jvm.thread.state",gtt="blocked",htt="new",_tt="runnable",Ett="terminated",Stt="timed_waiting",ytt="waiting",Ttt="network.local.address",Itt="network.local.port",s5="network.peer.address",u5="network.peer.port",Ctt="network.protocol.name",c5="network.protocol.version",l5="network.transport",btt="pipe",vtt="quic",Rtt="tcp",xtt="udp",Dtt="unix",Btt="network.type",Ntt="ipv4",Ott="ipv6",wtt="otel.scope.name",Mtt="otel.scope.version",ktt="otel.status_code",Ptt="ERROR",Utt="OK",Ltt="otel.status_description",d5="server.address",p5="server.port",Qtt="service.instance.id",f5="service.name",Ftt="service.namespace",A5="service.version",Gtt="signalr.connection.status",jtt="app_shutdown",ztt="normal_closure",Htt="timeout",$tt="signalr.transport",Vtt="long_polling",qtt="server_sent_events",Ytt="web_sockets",Ktt="telemetry.sdk.language",Jtt="cpp",Ztt="dotnet",Wtt="erlang",Xtt="go",ent="java",tnt="nodejs",nnt="php",rnt="python",ont="ruby",int="rust",ant="swift",snt="webjs",unt="telemetry.sdk.name",cnt="telemetry.sdk.version",lnt="url.fragment",qh="url.full",dnt="url.path",pnt="url.query",fnt="url.scheme",m5="user_agent.original"});var Ant,mnt,gnt,hnt,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,Ont,wnt,Mnt,knt,Pnt,Unt,Lnt,Qnt,Fnt,Gnt,jnt,znt,Hnt,$nt,Vnt,qnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,C_e=O(()=>{A();Ant="aspnetcore.diagnostics.exceptions",mnt="aspnetcore.rate_limiting.active_request_leases",gnt="aspnetcore.rate_limiting.queued_requests",hnt="aspnetcore.rate_limiting.request.time_in_queue",_nt="aspnetcore.rate_limiting.request_lease.duration",Ent="aspnetcore.rate_limiting.requests",Snt="aspnetcore.routing.match_attempts",ynt="db.client.operation.duration",Tnt="dotnet.assembly.count",Int="dotnet.exceptions",Cnt="dotnet.gc.collections",bnt="dotnet.gc.heap.total_allocated",vnt="dotnet.gc.last_collection.heap.fragmentation.size",Rnt="dotnet.gc.last_collection.heap.size",xnt="dotnet.gc.last_collection.memory.committed_size",Dnt="dotnet.gc.pause.time",Bnt="dotnet.jit.compilation.time",Nnt="dotnet.jit.compiled_il.size",Ont="dotnet.jit.compiled_methods",wnt="dotnet.monitor.lock_contentions",Mnt="dotnet.process.cpu.count",knt="dotnet.process.cpu.time",Pnt="dotnet.process.memory.working_set",Unt="dotnet.thread_pool.queue.length",Lnt="dotnet.thread_pool.thread.count",Qnt="dotnet.thread_pool.work_item.count",Fnt="dotnet.timer.count",Gnt="http.client.request.duration",jnt="http.server.request.duration",znt="jvm.class.count",Hnt="jvm.class.loaded",$nt="jvm.class.unloaded",Vnt="jvm.cpu.count",qnt="jvm.cpu.recent_utilization",Ynt="jvm.cpu.time",Knt="jvm.gc.duration",Jnt="jvm.memory.committed",Znt="jvm.memory.limit",Wnt="jvm.memory.used",Xnt="jvm.memory.used_after_last_gc",ert="jvm.thread.count",trt="kestrel.active_connections",nrt="kestrel.active_tls_handshakes",rrt="kestrel.connection.duration",ort="kestrel.queued_connections",irt="kestrel.queued_requests",art="kestrel.rejected_connections",srt="kestrel.tls_handshake.duration",urt="kestrel.upgraded_connections",crt="signalr.server.active_connections",lrt="signalr.server.connection.duration"});var drt,b_e=O(()=>{A();drt="exception"});var Pr={};Ga(Pr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>oet,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>iet,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>aet,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>set,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>pet,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>fet,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Aet,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>met,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Eet,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>yet,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>ret,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>uet,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>cet,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>det,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>get,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>het,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>_et,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Tet,ATTR_CLIENT_ADDRESS:()=>Iet,ATTR_CLIENT_PORT:()=>Cet,ATTR_CODE_COLUMN_NUMBER:()=>bet,ATTR_CODE_FILE_PATH:()=>vet,ATTR_CODE_FUNCTION_NAME:()=>Ret,ATTR_CODE_LINE_NUMBER:()=>xet,ATTR_CODE_STACKTRACE:()=>Det,ATTR_DB_COLLECTION_NAME:()=>n5,ATTR_DB_NAMESPACE:()=>r5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Bet,ATTR_DB_OPERATION_NAME:()=>MC,ATTR_DB_QUERY_SUMMARY:()=>Net,ATTR_DB_QUERY_TEXT:()=>o5,ATTR_DB_RESPONSE_STATUS_CODE:()=>i5,ATTR_DB_STORED_PROCEDURE_NAME:()=>Oet,ATTR_DB_SYSTEM_NAME:()=>_S,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Uet,ATTR_ERROR_TYPE:()=>a5,ATTR_EXCEPTION_ESCAPED:()=>Het,ATTR_EXCEPTION_MESSAGE:()=>$et,ATTR_EXCEPTION_STACKTRACE:()=>Vet,ATTR_EXCEPTION_TYPE:()=>qet,ATTR_HTTP_REQUEST_HEADER:()=>Yet,ATTR_HTTP_REQUEST_METHOD:()=>ES,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>itt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>att,ATTR_HTTP_RESPONSE_HEADER:()=>stt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Zm,ATTR_HTTP_ROUTE:()=>Wm,ATTR_JVM_GC_ACTION:()=>utt,ATTR_JVM_GC_NAME:()=>ctt,ATTR_JVM_MEMORY_POOL_NAME:()=>ltt,ATTR_JVM_MEMORY_TYPE:()=>dtt,ATTR_JVM_THREAD_DAEMON:()=>Att,ATTR_JVM_THREAD_STATE:()=>mtt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Ttt,ATTR_NETWORK_LOCAL_PORT:()=>Itt,ATTR_NETWORK_PEER_ADDRESS:()=>s5,ATTR_NETWORK_PEER_PORT:()=>u5,ATTR_NETWORK_PROTOCOL_NAME:()=>Ctt,ATTR_NETWORK_PROTOCOL_VERSION:()=>c5,ATTR_NETWORK_TRANSPORT:()=>l5,ATTR_NETWORK_TYPE:()=>Btt,ATTR_OTEL_SCOPE_NAME:()=>wtt,ATTR_OTEL_SCOPE_VERSION:()=>Mtt,ATTR_OTEL_STATUS_CODE:()=>ktt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Ltt,ATTR_SERVER_ADDRESS:()=>d5,ATTR_SERVER_PORT:()=>p5,ATTR_SERVICE_INSTANCE_ID:()=>Qtt,ATTR_SERVICE_NAME:()=>f5,ATTR_SERVICE_NAMESPACE:()=>Ftt,ATTR_SERVICE_VERSION:()=>A5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Gtt,ATTR_SIGNALR_TRANSPORT:()=>$tt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Ktt,ATTR_TELEMETRY_SDK_NAME:()=>unt,ATTR_TELEMETRY_SDK_VERSION:()=>cnt,ATTR_URL_FRAGMENT:()=>lnt,ATTR_URL_FULL:()=>qh,ATTR_URL_PATH:()=>dnt,ATTR_URL_QUERY:()=>pnt,ATTR_URL_SCHEME:()=>fnt,ATTR_USER_AGENT_ORIGINAL:()=>m5,AWSECSLAUNCHTYPEVALUES_EC2:()=>IXe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>CXe,AwsEcsLaunchtypeValues:()=>bXe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>iXe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>aXe,CLOUDPLATFORMVALUES_AWS_EC2:()=>sXe,CLOUDPLATFORMVALUES_AWS_ECS:()=>uXe,CLOUDPLATFORMVALUES_AWS_EKS:()=>cXe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>dXe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>lXe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>AXe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>gXe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>fXe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>mXe,CLOUDPLATFORMVALUES_AZURE_VM:()=>pXe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>yXe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>SXe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>_Xe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>hXe,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>EXe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>eXe,CLOUDPROVIDERVALUES_AWS:()=>tXe,CLOUDPROVIDERVALUES_AZURE:()=>nXe,CLOUDPROVIDERVALUES_GCP:()=>rXe,CloudPlatformValues:()=>TXe,CloudProviderValues:()=>oXe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>QKe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>qKe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>FKe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>VKe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>jKe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>KKe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>zKe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>GKe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>YKe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>$Ke,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>HKe,DBSYSTEMVALUES_ADABAS:()=>uKe,DBSYSTEMVALUES_CACHE:()=>sKe,DBSYSTEMVALUES_CASSANDRA:()=>bKe,DBSYSTEMVALUES_CLOUDSCAPE:()=>XYe,DBSYSTEMVALUES_COCKROACHDB:()=>UKe,DBSYSTEMVALUES_COLDFUSION:()=>CKe,DBSYSTEMVALUES_COSMOSDB:()=>NKe,DBSYSTEMVALUES_COUCHBASE:()=>DKe,DBSYSTEMVALUES_COUCHDB:()=>BKe,DBSYSTEMVALUES_DB2:()=>KYe,DBSYSTEMVALUES_DERBY:()=>lKe,DBSYSTEMVALUES_DYNAMODB:()=>OKe,DBSYSTEMVALUES_EDB:()=>aKe,DBSYSTEMVALUES_ELASTICSEARCH:()=>kKe,DBSYSTEMVALUES_FILEMAKER:()=>dKe,DBSYSTEMVALUES_FIREBIRD:()=>cKe,DBSYSTEMVALUES_FIRSTSQL:()=>iKe,DBSYSTEMVALUES_GEODE:()=>MKe,DBSYSTEMVALUES_H2:()=>IKe,DBSYSTEMVALUES_HANADB:()=>rKe,DBSYSTEMVALUES_HBASE:()=>vKe,DBSYSTEMVALUES_HIVE:()=>WYe,DBSYSTEMVALUES_HSQLDB:()=>eKe,DBSYSTEMVALUES_INFORMIX:()=>pKe,DBSYSTEMVALUES_INGRES:()=>oKe,DBSYSTEMVALUES_INSTANTDB:()=>fKe,DBSYSTEMVALUES_INTERBASE:()=>AKe,DBSYSTEMVALUES_MARIADB:()=>mKe,DBSYSTEMVALUES_MAXDB:()=>nKe,DBSYSTEMVALUES_MEMCACHED:()=>PKe,DBSYSTEMVALUES_MONGODB:()=>RKe,DBSYSTEMVALUES_MSSQL:()=>VYe,DBSYSTEMVALUES_MYSQL:()=>qYe,DBSYSTEMVALUES_NEO4J:()=>wKe,DBSYSTEMVALUES_NETEZZA:()=>gKe,DBSYSTEMVALUES_ORACLE:()=>YYe,DBSYSTEMVALUES_OTHER_SQL:()=>$Ye,DBSYSTEMVALUES_PERVASIVE:()=>hKe,DBSYSTEMVALUES_POINTBASE:()=>_Ke,DBSYSTEMVALUES_POSTGRESQL:()=>JYe,DBSYSTEMVALUES_PROGRESS:()=>tKe,DBSYSTEMVALUES_REDIS:()=>xKe,DBSYSTEMVALUES_REDSHIFT:()=>ZYe,DBSYSTEMVALUES_SQLITE:()=>EKe,DBSYSTEMVALUES_SYBASE:()=>SKe,DBSYSTEMVALUES_TERADATA:()=>yKe,DBSYSTEMVALUES_VERTICA:()=>TKe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>wet,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Met,DB_SYSTEM_NAME_VALUE_MYSQL:()=>ket,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Pet,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Let,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Qet,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Fet,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Get,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>jet,DbCassandraConsistencyLevelValues:()=>JKe,DbSystemValues:()=>LKe,ERROR_TYPE_VALUE_OTHER:()=>zet,EVENT_EXCEPTION:()=>drt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>iJe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>oJe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>rJe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>sJe,FAASINVOKEDPROVIDERVALUES_AWS:()=>uJe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>cJe,FAASINVOKEDPROVIDERVALUES_GCP:()=>lJe,FAASTRIGGERVALUES_DATASOURCE:()=>ZKe,FAASTRIGGERVALUES_HTTP:()=>WKe,FAASTRIGGERVALUES_OTHER:()=>tJe,FAASTRIGGERVALUES_PUBSUB:()=>XKe,FAASTRIGGERVALUES_TIMER:()=>eJe,FaasDocumentOperationValues:()=>aJe,FaasInvokedProviderValues:()=>dJe,FaasTriggerValues:()=>nJe,HOSTARCHVALUES_AMD64:()=>vXe,HOSTARCHVALUES_ARM32:()=>RXe,HOSTARCHVALUES_ARM64:()=>xXe,HOSTARCHVALUES_IA64:()=>DXe,HOSTARCHVALUES_PPC32:()=>BXe,HOSTARCHVALUES_PPC64:()=>NXe,HOSTARCHVALUES_X86:()=>OXe,HTTPFLAVORVALUES_HTTP_1_0:()=>YJe,HTTPFLAVORVALUES_HTTP_1_1:()=>KJe,HTTPFLAVORVALUES_HTTP_2_0:()=>JJe,HTTPFLAVORVALUES_QUIC:()=>WJe,HTTPFLAVORVALUES_SPDY:()=>ZJe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Jet,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Zet,HTTP_REQUEST_METHOD_VALUE_GET:()=>Wet,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Xet,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>ett,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Ket,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>ttt,HTTP_REQUEST_METHOD_VALUE_POST:()=>ntt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>rtt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>ott,HostArchValues:()=>wXe,HttpFlavorValues:()=>XJe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>ptt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>ftt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>gtt,JVM_THREAD_STATE_VALUE_NEW:()=>htt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>_tt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Ett,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Stt,JVM_THREAD_STATE_VALUE_WAITING:()=>ytt,MESSAGETYPEVALUES_RECEIVED:()=>bZe,MESSAGETYPEVALUES_SENT:()=>CZe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>eZe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>tZe,MESSAGINGOPERATIONVALUES_PROCESS:()=>oZe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>rZe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Ant,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>mnt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>gnt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ent,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>_nt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>hnt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Snt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>ynt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Tnt,METRIC_DOTNET_EXCEPTIONS:()=>Int,METRIC_DOTNET_GC_COLLECTIONS:()=>Cnt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>bnt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>vnt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Rnt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>xnt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Dnt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Bnt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Nnt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Ont,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>wnt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Mnt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>knt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Pnt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Unt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Lnt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Qnt,METRIC_DOTNET_TIMER_COUNT:()=>Fnt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Gnt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>jnt,METRIC_JVM_CLASS_COUNT:()=>znt,METRIC_JVM_CLASS_LOADED:()=>Hnt,METRIC_JVM_CLASS_UNLOADED:()=>$nt,METRIC_JVM_CPU_COUNT:()=>Vnt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>qnt,METRIC_JVM_CPU_TIME:()=>Ynt,METRIC_JVM_GC_DURATION:()=>Knt,METRIC_JVM_MEMORY_COMMITTED:()=>Jnt,METRIC_JVM_MEMORY_LIMIT:()=>Znt,METRIC_JVM_MEMORY_USED:()=>Wnt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Xnt,METRIC_JVM_THREAD_COUNT:()=>ert,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>trt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>nrt,METRIC_KESTREL_CONNECTION_DURATION:()=>rrt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>ort,METRIC_KESTREL_QUEUED_REQUESTS:()=>irt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>art,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>srt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>urt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>crt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>lrt,MessageTypeValues:()=>vZe,MessagingDestinationKindValues:()=>nZe,MessagingOperationValues:()=>iZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>DJe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>OJe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>RJe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>QJe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>BJe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>NJe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>UJe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>vJe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>GJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>wJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>kJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>FJe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>MJe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>PJe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>zJe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>LJe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>VJe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>HJe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>$Je,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>jJe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>xJe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>TJe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>IJe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>CJe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>SJe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>yJe,NETTRANSPORTVALUES_INPROC:()=>hJe,NETTRANSPORTVALUES_IP:()=>AJe,NETTRANSPORTVALUES_IP_TCP:()=>pJe,NETTRANSPORTVALUES_IP_UDP:()=>fJe,NETTRANSPORTVALUES_OTHER:()=>_Je,NETTRANSPORTVALUES_PIPE:()=>gJe,NETTRANSPORTVALUES_UNIX:()=>mJe,NETWORK_TRANSPORT_VALUE_PIPE:()=>btt,NETWORK_TRANSPORT_VALUE_QUIC:()=>vtt,NETWORK_TRANSPORT_VALUE_TCP:()=>Rtt,NETWORK_TRANSPORT_VALUE_UDP:()=>xtt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Dtt,NETWORK_TYPE_VALUE_IPV4:()=>Ntt,NETWORK_TYPE_VALUE_IPV6:()=>Ott,NetHostConnectionSubtypeValues:()=>qJe,NetHostConnectionTypeValues:()=>bJe,NetTransportValues:()=>EJe,OSTYPEVALUES_AIX:()=>jXe,OSTYPEVALUES_DARWIN:()=>PXe,OSTYPEVALUES_DRAGONFLYBSD:()=>FXe,OSTYPEVALUES_FREEBSD:()=>UXe,OSTYPEVALUES_HPUX:()=>GXe,OSTYPEVALUES_LINUX:()=>kXe,OSTYPEVALUES_NETBSD:()=>LXe,OSTYPEVALUES_OPENBSD:()=>QXe,OSTYPEVALUES_SOLARIS:()=>zXe,OSTYPEVALUES_WINDOWS:()=>MXe,OSTYPEVALUES_Z_OS:()=>HXe,OTEL_STATUS_CODE_VALUE_ERROR:()=>Ptt,OTEL_STATUS_CODE_VALUE_OK:()=>Utt,OsTypeValues:()=>$Xe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>gZe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>pZe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>sZe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>yZe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>lZe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>mZe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>EZe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>cZe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>dZe,RPCGRPCSTATUSCODEVALUES_OK:()=>aZe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>hZe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>fZe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>AZe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>TZe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>SZe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>_Ze,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>uZe,RpcGrpcStatusCodeValues:()=>IZe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>nYe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>AYe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>X7e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>K7e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>pYe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>sYe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>iYe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>mYe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>rYe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>J7e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>tYe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>aYe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>eYe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Z7e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>W7e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>fYe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>cYe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>lYe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>oYe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>uYe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Y7e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>dYe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Fqe,SEMATTRS_CODE_FILEPATH:()=>L7e,SEMATTRS_CODE_FUNCTION:()=>P7e,SEMATTRS_CODE_LINENO:()=>Q7e,SEMATTRS_CODE_NAMESPACE:()=>U7e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Kqe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>e7e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Xqe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Zqe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>qqe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Yqe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Wqe,SEMATTRS_DB_CASSANDRA_TABLE:()=>Jqe,SEMATTRS_DB_CONNECTION_STRING:()=>Gqe,SEMATTRS_DB_HBASE_NAMESPACE:()=>t7e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>zqe,SEMATTRS_DB_MONGODB_COLLECTION:()=>r7e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>Vqe,SEMATTRS_DB_NAME:()=>Hqe,SEMATTRS_DB_OPERATION:()=>$qe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>n7e,SEMATTRS_DB_SQL_TABLE:()=>o7e,SEMATTRS_DB_STATEMENT:()=>z$,SEMATTRS_DB_SYSTEM:()=>j$,SEMATTRS_DB_USER:()=>jqe,SEMATTRS_ENDUSER_ID:()=>N7e,SEMATTRS_ENDUSER_ROLE:()=>O7e,SEMATTRS_ENDUSER_SCOPE:()=>w7e,SEMATTRS_EXCEPTION_ESCAPED:()=>u7e,SEMATTRS_EXCEPTION_MESSAGE:()=>a7e,SEMATTRS_EXCEPTION_STACKTRACE:()=>s7e,SEMATTRS_EXCEPTION_TYPE:()=>i7e,SEMATTRS_FAAS_COLDSTART:()=>g7e,SEMATTRS_FAAS_CRON:()=>m7e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>l7e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>f7e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>d7e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>p7e,SEMATTRS_FAAS_EXECUTION:()=>c7e,SEMATTRS_FAAS_INVOKED_NAME:()=>h7e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>_7e,SEMATTRS_FAAS_INVOKED_REGION:()=>E7e,SEMATTRS_FAAS_TIME:()=>A7e,SEMATTRS_FAAS_TRIGGER:()=>H$,SEMATTRS_HTTP_CLIENT_IP:()=>q7e,SEMATTRS_HTTP_FLAVOR:()=>j7e,SEMATTRS_HTTP_HOST:()=>F7e,SEMATTRS_HTTP_METHOD:()=>q1,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>H7e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>$7e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>K$,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>J$,SEMATTRS_HTTP_ROUTE:()=>Z$,SEMATTRS_HTTP_SCHEME:()=>G7e,SEMATTRS_HTTP_SERVER_NAME:()=>V7e,SEMATTRS_HTTP_STATUS_CODE:()=>hS,SEMATTRS_HTTP_TARGET:()=>Y$,SEMATTRS_HTTP_URL:()=>wC,SEMATTRS_HTTP_USER_AGENT:()=>z7e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>jYe,SEMATTRS_MESSAGE_ID:()=>GYe,SEMATTRS_MESSAGE_TYPE:()=>FYe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>zYe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>RYe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>IYe,SEMATTRS_MESSAGING_DESTINATION:()=>gYe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>hYe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>NYe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>BYe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>DYe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>OYe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>wYe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>TYe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>bYe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>CYe,SEMATTRS_MESSAGING_OPERATION:()=>vYe,SEMATTRS_MESSAGING_PROTOCOL:()=>EYe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>SYe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>xYe,SEMATTRS_MESSAGING_SYSTEM:()=>W$,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>_Ye,SEMATTRS_MESSAGING_URL:()=>yYe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>D7e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>R7e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>x7e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>v7e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>b7e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>C7e,SEMATTRS_NET_HOST_IP:()=>V$,SEMATTRS_NET_HOST_NAME:()=>I7e,SEMATTRS_NET_HOST_PORT:()=>q$,SEMATTRS_NET_PEER_IP:()=>$$,SEMATTRS_NET_PEER_NAME:()=>T7e,SEMATTRS_NET_PEER_PORT:()=>y7e,SEMATTRS_NET_TRANSPORT:()=>S7e,SEMATTRS_PEER_SERVICE:()=>B7e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>e5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>LYe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>QYe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>UYe,SEMATTRS_RPC_JSONRPC_VERSION:()=>PYe,SEMATTRS_RPC_METHOD:()=>kYe,SEMATTRS_RPC_SERVICE:()=>X$,SEMATTRS_RPC_SYSTEM:()=>MYe,SEMATTRS_THREAD_ID:()=>M7e,SEMATTRS_THREAD_NAME:()=>k7e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>wZe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>OZe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>MZe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>kZe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>PZe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>UZe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>LZe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>FZe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>QZe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>jZe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>GZe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>xZe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>BZe,SEMRESATTRS_CLOUD_PLATFORM:()=>NZe,SEMRESATTRS_CLOUD_PROVIDER:()=>RZe,SEMRESATTRS_CLOUD_REGION:()=>DZe,SEMRESATTRS_CONTAINER_ID:()=>HZe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>VZe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>qZe,SEMRESATTRS_CONTAINER_NAME:()=>zZe,SEMRESATTRS_CONTAINER_RUNTIME:()=>$Ze,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>YZe,SEMRESATTRS_DEVICE_ID:()=>KZe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>JZe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>ZZe,SEMRESATTRS_FAAS_ID:()=>XZe,SEMRESATTRS_FAAS_INSTANCE:()=>tWe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>nWe,SEMRESATTRS_FAAS_NAME:()=>WZe,SEMRESATTRS_FAAS_VERSION:()=>eWe,SEMRESATTRS_HOST_ARCH:()=>aWe,SEMRESATTRS_HOST_ID:()=>rWe,SEMRESATTRS_HOST_IMAGE_ID:()=>uWe,SEMRESATTRS_HOST_IMAGE_NAME:()=>sWe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>cWe,SEMRESATTRS_HOST_NAME:()=>oWe,SEMRESATTRS_HOST_TYPE:()=>iWe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>lWe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>gWe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>xWe,SEMRESATTRS_K8S_CRONJOB_UID:()=>RWe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>CWe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>IWe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>SWe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>EWe,SEMRESATTRS_K8S_JOB_NAME:()=>vWe,SEMRESATTRS_K8S_JOB_UID:()=>bWe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>fWe,SEMRESATTRS_K8S_NODE_NAME:()=>dWe,SEMRESATTRS_K8S_NODE_UID:()=>pWe,SEMRESATTRS_K8S_POD_NAME:()=>mWe,SEMRESATTRS_K8S_POD_UID:()=>AWe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>_We,SEMRESATTRS_K8S_REPLICASET_UID:()=>hWe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>TWe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>yWe,SEMRESATTRS_OS_DESCRIPTION:()=>BWe,SEMRESATTRS_OS_NAME:()=>NWe,SEMRESATTRS_OS_TYPE:()=>DWe,SEMRESATTRS_OS_VERSION:()=>OWe,SEMRESATTRS_PROCESS_COMMAND:()=>PWe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>LWe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>UWe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>MWe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>kWe,SEMRESATTRS_PROCESS_OWNER:()=>QWe,SEMRESATTRS_PROCESS_PID:()=>wWe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>jWe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>FWe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>GWe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>HWe,SEMRESATTRS_SERVICE_NAME:()=>zWe,SEMRESATTRS_SERVICE_NAMESPACE:()=>t5,SEMRESATTRS_SERVICE_VERSION:()=>$We,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>KWe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>qWe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>VWe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>YWe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>WWe,SEMRESATTRS_WEBENGINE_NAME:()=>JWe,SEMRESATTRS_WEBENGINE_VERSION:()=>ZWe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>jtt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>ztt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Htt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Vtt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>qtt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Ytt,SemanticAttributes:()=>HYe,SemanticResourceAttributes:()=>XWe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>VXe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>qXe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>YXe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>KXe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>JXe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>ZXe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>WXe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>XXe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>eet,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>tet,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Jtt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Ztt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Wtt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Xtt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>ent,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>tnt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>nnt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>rnt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>ont,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>int,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>ant,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>snt,TelemetrySdkLanguageValues:()=>net});var Kn=O(()=>{A();Jme();T_e();I_e();C_e();b_e()});var v_e=F(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.ATTR_PROCESS_RUNTIME_NAME=void 0;sP.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var R_e=F(cP=>{"use strict";A();Object.defineProperty(cP,"__esModule",{value:!0});cP.SDK_INFO=void 0;var prt=ide(),uP=(Kn(),ke(Pr)),frt=v_e();cP.SDK_INFO={[uP.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[frt.ATTR_PROCESS_RUNTIME_NAME]:"node",[uP.ATTR_TELEMETRY_SDK_LANGUAGE]:uP.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[uP.ATTR_TELEMETRY_SDK_VERSION]:prt.VERSION}});var x_e=F(Vs=>{"use strict";A();Object.defineProperty(Vs,"__esModule",{value:!0});Vs.otperformance=Vs.SDK_INFO=Vs._globalThis=Vs.getStringListFromEnv=Vs.getNumberFromEnv=Vs.getBooleanFromEnv=Vs.getStringFromEnv=void 0;var lP=rde();Object.defineProperty(Vs,"getStringFromEnv",{enumerable:!0,get:function(){return lP.getStringFromEnv}});Object.defineProperty(Vs,"getBooleanFromEnv",{enumerable:!0,get:function(){return lP.getBooleanFromEnv}});Object.defineProperty(Vs,"getNumberFromEnv",{enumerable:!0,get:function(){return lP.getNumberFromEnv}});Object.defineProperty(Vs,"getStringListFromEnv",{enumerable:!0,get:function(){return lP.getStringListFromEnv}});var Art=ode();Object.defineProperty(Vs,"_globalThis",{enumerable:!0,get:function(){return Art._globalThis}});var mrt=R_e();Object.defineProperty(Vs,"SDK_INFO",{enumerable:!0,get:function(){return mrt.SDK_INFO}});Vs.otperformance=performance});var g5=F(qs=>{"use strict";A();Object.defineProperty(qs,"__esModule",{value:!0});qs.getStringListFromEnv=qs.getNumberFromEnv=qs.getStringFromEnv=qs.getBooleanFromEnv=qs.otperformance=qs._globalThis=qs.SDK_INFO=void 0;var SS=x_e();Object.defineProperty(qs,"SDK_INFO",{enumerable:!0,get:function(){return SS.SDK_INFO}});Object.defineProperty(qs,"_globalThis",{enumerable:!0,get:function(){return SS._globalThis}});Object.defineProperty(qs,"otperformance",{enumerable:!0,get:function(){return SS.otperformance}});Object.defineProperty(qs,"getBooleanFromEnv",{enumerable:!0,get:function(){return SS.getBooleanFromEnv}});Object.defineProperty(qs,"getStringFromEnv",{enumerable:!0,get:function(){return SS.getStringFromEnv}});Object.defineProperty(qs,"getNumberFromEnv",{enumerable:!0,get:function(){return SS.getNumberFromEnv}});Object.defineProperty(qs,"getStringListFromEnv",{enumerable:!0,get:function(){return SS.getStringListFromEnv}})});var O_e=F(io=>{"use strict";A();Object.defineProperty(io,"__esModule",{value:!0});io.addHrTimes=io.isTimeInput=io.isTimeInputHrTime=io.hrTimeToMicroseconds=io.hrTimeToMilliseconds=io.hrTimeToNanoseconds=io.hrTimeToTimeStamp=io.hrTimeDuration=io.timeInputToHrTime=io.hrTime=io.getTimeOrigin=io.millisToHrTime=void 0;var dP=g5(),D_e=9,grt=6,hrt=Math.pow(10,grt),pP=Math.pow(10,D_e);function Y1(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*hrt);return[n,r]}io.millisToHrTime=Y1;function _rt(){return dP.otperformance.timeOrigin}io.getTimeOrigin=_rt;function B_e(e){let t=Y1(dP.otperformance.timeOrigin),n=Y1(typeof e=="number"?e:dP.otperformance.now());return N_e(t,n)}io.hrTime=B_e;function Ert(e){if(h5(e))return e;if(typeof e=="number")return e<dP.otperformance.timeOrigin?B_e(e):Y1(e);if(e instanceof Date)return Y1(e.getTime());throw TypeError("Invalid input type")}io.timeInputToHrTime=Ert;function Srt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=pP),[n,r]}io.hrTimeDuration=Srt;function yrt(e){let t=D_e,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}io.hrTimeToTimeStamp=yrt;function Trt(e){return e[0]*pP+e[1]}io.hrTimeToNanoseconds=Trt;function Irt(e){return e[0]*1e3+e[1]/1e6}io.hrTimeToMilliseconds=Irt;function Crt(e){return e[0]*1e6+e[1]/1e3}io.hrTimeToMicroseconds=Crt;function h5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}io.isTimeInputHrTime=h5;function brt(e){return h5(e)||typeof e=="number"||e instanceof Date}io.isTimeInput=brt;function N_e(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=pP&&(n[1]-=pP,n[0]+=1),n}io.addHrTimes=N_e});var w_e=F(fP=>{"use strict";A();Object.defineProperty(fP,"__esModule",{value:!0});fP.unrefTimer=void 0;function vrt(e){typeof e!="number"&&e.unref()}fP.unrefTimer=vrt});var M_e=F(K1=>{"use strict";A();Object.defineProperty(K1,"__esModule",{value:!0});K1.ExportResultCode=void 0;var Rrt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Rrt=K1.ExportResultCode||(K1.ExportResultCode={}))});var P_e=F(AP=>{"use strict";A();Object.defineProperty(AP,"__esModule",{value:!0});AP.CompositePropagator=void 0;var k_e=(Ge(),ke(Ze)),_5=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){k_e.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){k_e.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};AP.CompositePropagator=_5});var U_e=F(kC=>{"use strict";A();Object.defineProperty(kC,"__esModule",{value:!0});kC.validateValue=kC.validateKey=void 0;var E5="[_0-9a-z-*/]",xrt=`[a-z]${E5}{0,255}`,Drt=`[a-z0-9]${E5}{0,240}@[a-z]${E5}{0,13}`,Brt=new RegExp(`^(?:${xrt}|${Drt})$`),Nrt=/^[ -~]{0,255}[!-~]$/,Ort=/,|=/;function wrt(e){return Brt.test(e)}kC.validateKey=wrt;function Mrt(e){return Nrt.test(e)&&!Ort.test(e)}kC.validateValue=Mrt});var y5=F(mP=>{"use strict";A();Object.defineProperty(mP,"__esModule",{value:!0});mP.TraceState=void 0;var L_e=U_e(),Q_e=32,krt=512,F_e=",",G_e="=",S5=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+G_e+this.get(n)),t),[]).join(F_e)}_parse(t){t.length>krt||(this._internalState=t.split(F_e).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(G_e);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,L_e.validateKey)(a)&&(0,L_e.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Q_e&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Q_e))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};mP.TraceState=S5});var z_e=F(Ys=>{"use strict";A();Object.defineProperty(Ys,"__esModule",{value:!0});Ys.W3CTraceContextPropagator=Ys.parseTraceParent=Ys.TRACE_STATE_HEADER=Ys.TRACE_PARENT_HEADER=void 0;var gP=(Ge(),ke(Ze)),Prt=V1(),Urt=y5();Ys.TRACE_PARENT_HEADER="traceparent";Ys.TRACE_STATE_HEADER="tracestate";var Lrt="00",Qrt="(?!ff)[\\da-f]{2}",Frt="(?![0]{32})[\\da-f]{32}",Grt="(?![0]{16})[\\da-f]{16}",jrt="[\\da-f]{2}",zrt=new RegExp(`^\\s?(${Qrt})-(${Frt})-(${Grt})-(${jrt})(-.*)?\\s?$`);function j_e(e){let t=zrt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Ys.parseTraceParent=j_e;var T5=class{inject(t,n,r){let o=gP.trace.getSpanContext(t);if(!o||(0,Prt.isTracingSuppressed)(t)||!(0,gP.isSpanContextValid)(o))return;let i=`${Lrt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||gP.TraceFlags.NONE).toString(16)}`;r.set(n,Ys.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Ys.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Ys.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=j_e(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Ys.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new Urt.TraceState(typeof d=="string"?d:void 0)}return gP.trace.setSpanContext(t,a)}fields(){return[Ys.TRACE_PARENT_HEADER,Ys.TRACE_STATE_HEADER]}};Ys.W3CTraceContextPropagator=T5});var H_e=F(Gp=>{"use strict";A();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.getRPCMetadata=Gp.deleteRPCMetadata=Gp.setRPCMetadata=Gp.RPCType=void 0;var Hrt=(Ge(),ke(Ze)),I5=(0,Hrt.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),$rt;(function(e){e.HTTP="http"})($rt=Gp.RPCType||(Gp.RPCType={}));function Vrt(e,t){return e.setValue(I5,t)}Gp.setRPCMetadata=Vrt;function qrt(e){return e.deleteValue(I5)}Gp.deleteRPCMetadata=qrt;function Yrt(e){return e.getValue(I5)}Gp.getRPCMetadata=Yrt});var K_e=F(hP=>{"use strict";A();Object.defineProperty(hP,"__esModule",{value:!0});hP.isPlainObject=void 0;var Krt="[object Object]",Jrt="[object Null]",Zrt="[object Undefined]",Wrt=Function.prototype,$_e=Wrt.toString,Xrt=$_e.call(Object),eot=Object.getPrototypeOf,V_e=Object.prototype,q_e=V_e.hasOwnProperty,yS=Symbol?Symbol.toStringTag:void 0,Y_e=V_e.toString;function tot(e){if(!not(e)||rot(e)!==Krt)return!1;let t=eot(e);if(t===null)return!0;let n=q_e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$_e.call(n)===Xrt}hP.isPlainObject=tot;function not(e){return e!=null&&typeof e=="object"}function rot(e){return e==null?e===void 0?Zrt:Jrt:yS&&yS in Object(e)?oot(e):iot(e)}function oot(e){let t=q_e.call(e,yS),n=e[yS],r=!1;try{e[yS]=void 0,r=!0}catch{}let o=Y_e.call(e);return r&&(t?e[yS]=n:delete e[yS]),o}function iot(e){return Y_e.call(e)}});var eEe=F(SP=>{"use strict";A();Object.defineProperty(SP,"__esModule",{value:!0});SP.merge=void 0;var J_e=K_e(),aot=20;function sot(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=W_e(t,e.shift(),0,n);return t}SP.merge=sot;function C5(e){return EP(e)?e.slice():e}function W_e(e,t,n=0,r){let o;if(!(n>aot)){if(n++,_P(e)||_P(t)||X_e(t))o=C5(t);else if(EP(e)){if(o=e.slice(),EP(t))for(let i=0,a=t.length;i<a;i++)o.push(C5(t[i]));else if(J1(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=C5(t[d])}}}else if(J1(e))if(J1(t)){if(!uot(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],m=t[d];if(_P(m))typeof m>"u"?delete o[d]:o[d]=m;else{let h=o[d],S=m;if(Z_e(e,d,r)||Z_e(t,d,r))delete o[d];else{if(J1(h)&&J1(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]=W_e(o[d],m,n,r)}}}}else o=t;return o}}function Z_e(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 EP(e){return Array.isArray(e)}function X_e(e){return typeof e=="function"}function J1(e){return!_P(e)&&!EP(e)&&!X_e(e)&&typeof e=="object"}function _P(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function uot(e,t){return!(!(0,J_e.isPlainObject)(e)||!(0,J_e.isPlainObject)(t))}});var tEe=F(PC=>{"use strict";A();Object.defineProperty(PC,"__esModule",{value:!0});PC.callWithTimeout=PC.TimeoutError=void 0;var yP=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};PC.TimeoutError=yP;function cot(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new yP("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}PC.callWithTimeout=cot});var rEe=F(UC=>{"use strict";A();Object.defineProperty(UC,"__esModule",{value:!0});UC.isUrlIgnored=UC.urlMatches=void 0;function nEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}UC.urlMatches=nEe;function lot(e,t){if(!t)return!1;for(let n of t)if(nEe(e,n))return!0;return!1}UC.isUrlIgnored=lot});var oEe=F(TP=>{"use strict";A();Object.defineProperty(TP,"__esModule",{value:!0});TP.Deferred=void 0;var b5=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)}};TP.Deferred=b5});var iEe=F(IP=>{"use strict";A();Object.defineProperty(IP,"__esModule",{value:!0});IP.BindOnceFuture=void 0;var dot=oEe(),v5=class{_isCalled=!1;_deferred=new dot.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}};IP.BindOnceFuture=v5});var sEe=F(CP=>{"use strict";A();Object.defineProperty(CP,"__esModule",{value:!0});CP.diagLogLevelFromString=void 0;var Xm=(Ge(),ke(Ze)),aEe={ALL:Xm.DiagLogLevel.ALL,VERBOSE:Xm.DiagLogLevel.VERBOSE,DEBUG:Xm.DiagLogLevel.DEBUG,INFO:Xm.DiagLogLevel.INFO,WARN:Xm.DiagLogLevel.WARN,ERROR:Xm.DiagLogLevel.ERROR,NONE:Xm.DiagLogLevel.NONE};function pot(e){if(e==null)return;let t=aEe[e.toUpperCase()];return t??(Xm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(aEe)}, using default`),Xm.DiagLogLevel.INFO)}CP.diagLogLevelFromString=pot});var cEe=F(bP=>{"use strict";A();Object.defineProperty(bP,"__esModule",{value:!0});bP._export=void 0;var uEe=(Ge(),ke(Ze)),fot=V1();function Aot(e,t){return new Promise(n=>{uEe.context.with((0,fot.suppressTracing)(uEe.context.active()),()=>{e.export(t,n)})})}bP._export=Aot});var Tr=F(Oe=>{"use strict";A();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 mot=$le();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return mot.W3CBaggagePropagator}});var got=Vle();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return got.AnchoredClock}});var lEe=Zle();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return lEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return lEe.sanitizeAttributes}});var dEe=Xle();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return dEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return dEe.setGlobalErrorHandler}});var hot=F$();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return hot.loggingErrorHandler}});var Td=O_e();Object.defineProperty(Oe,"addHrTimes",{enumerable:!0,get:function(){return Td.addHrTimes}});Object.defineProperty(Oe,"getTimeOrigin",{enumerable:!0,get:function(){return Td.getTimeOrigin}});Object.defineProperty(Oe,"hrTime",{enumerable:!0,get:function(){return Td.hrTime}});Object.defineProperty(Oe,"hrTimeDuration",{enumerable:!0,get:function(){return Td.hrTimeDuration}});Object.defineProperty(Oe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Td.hrTimeToMicroseconds}});Object.defineProperty(Oe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Td.hrTimeToMilliseconds}});Object.defineProperty(Oe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Td.hrTimeToNanoseconds}});Object.defineProperty(Oe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Td.hrTimeToTimeStamp}});Object.defineProperty(Oe,"isTimeInput",{enumerable:!0,get:function(){return Td.isTimeInput}});Object.defineProperty(Oe,"isTimeInputHrTime",{enumerable:!0,get:function(){return Td.isTimeInputHrTime}});Object.defineProperty(Oe,"millisToHrTime",{enumerable:!0,get:function(){return Td.millisToHrTime}});Object.defineProperty(Oe,"timeInputToHrTime",{enumerable:!0,get:function(){return Td.timeInputToHrTime}});var _ot=w_e();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return _ot.unrefTimer}});var Eot=M_e();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return Eot.ExportResultCode}});var Sot=k$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Sot.parseKeyPairsIntoRecord}});var TS=g5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return TS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return TS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return TS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return TS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return TS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return TS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return TS.otperformance}});var yot=P_e();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return yot.CompositePropagator}});var vP=z_e();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return vP.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return vP.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return vP.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return vP.parseTraceParent}});var RP=H_e();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return RP.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return RP.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return RP.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return RP.setRPCMetadata}});var R5=V1();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return R5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return R5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return R5.unsuppressTracing}});var Tot=y5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return Tot.TraceState}});var Iot=eEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return Iot.merge}});var pEe=tEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return pEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return pEe.callWithTimeout}});var fEe=rEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return fEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return fEe.urlMatches}});var Cot=iEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return Cot.BindOnceFuture}});var bot=sEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return bot.diagLogLevelFromString}});var vot=cEe();Oe.internal={_export:vot._export}});var AEe=F(xP=>{"use strict";A();Object.defineProperty(xP,"__esModule",{value:!0});xP.VERSION=void 0;xP.VERSION="0.214.0"});var mEe=F(Z1=>{"use strict";A();Object.defineProperty(Z1,"__esModule",{value:!0});Z1.SeverityNumber=void 0;var Rot;(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"})(Rot=Z1.SeverityNumber||(Z1.SeverityNumber={}))});var BP=F(LC=>{"use strict";A();Object.defineProperty(LC,"__esModule",{value:!0});LC.NOOP_LOGGER=LC.NoopLogger=void 0;var DP=class{emit(t){}};LC.NoopLogger=DP;LC.NOOP_LOGGER=new DP});var gEe=F(oA=>{"use strict";A();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 xot(e,t,n){return r=>r===e?t:n}oA.makeGetter=xot;oA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var x5=F(QC=>{"use strict";A();Object.defineProperty(QC,"__esModule",{value:!0});QC.NOOP_LOGGER_PROVIDER=QC.NoopLoggerProvider=void 0;var Dot=BP(),NP=class{getLogger(t,n,r){return new Dot.NoopLogger}};QC.NoopLoggerProvider=NP;QC.NOOP_LOGGER_PROVIDER=new NP});var hEe=F(OP=>{"use strict";A();Object.defineProperty(OP,"__esModule",{value:!0});OP.ProxyLogger=void 0;var Bot=BP(),D5=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):Bot.NOOP_LOGGER}};OP.ProxyLogger=D5});var _Ee=F(wP=>{"use strict";A();Object.defineProperty(wP,"__esModule",{value:!0});wP.ProxyLoggerProvider=void 0;var Not=x5(),Oot=hEe(),B5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Oot.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Not.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)}};wP.ProxyLoggerProvider=B5});var SEe=F(MP=>{"use strict";A();Object.defineProperty(MP,"__esModule",{value:!0});MP.LogsAPI=void 0;var Id=gEe(),wot=x5(),EEe=_Ee(),N5=class e{constructor(){this._proxyLoggerProvider=new EEe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Id._global[Id.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Id._global[Id.GLOBAL_LOGS_API_KEY]=(0,Id.makeGetter)(Id.API_BACKWARDS_COMPATIBILITY_VERSION,t,wot.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Id._global[Id.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Id._global,Id.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Id._global[Id.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new EEe.ProxyLoggerProvider}};MP.LogsAPI=N5});var O5=F(iA=>{"use strict";A();Object.defineProperty(iA,"__esModule",{value:!0});iA.logs=iA.NoopLogger=iA.NOOP_LOGGER=iA.SeverityNumber=void 0;var Mot=mEe();Object.defineProperty(iA,"SeverityNumber",{enumerable:!0,get:function(){return Mot.SeverityNumber}});var yEe=BP();Object.defineProperty(iA,"NOOP_LOGGER",{enumerable:!0,get:function(){return yEe.NOOP_LOGGER}});Object.defineProperty(iA,"NoopLogger",{enumerable:!0,get:function(){return yEe.NoopLogger}});var kot=SEe();iA.logs=kot.LogsAPI.getInstance()});var TEe=F(FC=>{"use strict";A();Object.defineProperty(FC,"__esModule",{value:!0});FC.disableInstrumentations=FC.enableInstrumentations=void 0;function Pot(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()}}FC.enableInstrumentations=Pot;function Uot(e){e.forEach(t=>t.disable())}FC.disableInstrumentations=Uot});var bEe=F(kP=>{"use strict";A();Object.defineProperty(kP,"__esModule",{value:!0});kP.registerInstrumentations=void 0;var IEe=(Ge(),ke(Ze)),Lot=O5(),CEe=TEe();function Qot(e){let t=e.tracerProvider||IEe.trace.getTracerProvider(),n=e.meterProvider||IEe.metrics.getMeterProvider(),r=e.loggerProvider||Lot.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,CEe.enableInstrumentations)(o,t,n,r),()=>{(0,CEe.disableInstrumentations)(o)}}kP.registerInstrumentations=Qot});var MEe=F(PP=>{"use strict";A();Object.defineProperty(PP,"__esModule",{value:!0});PP.satisfies=void 0;var P5=(Ge(),ke(Ze)),BEe=/^(?: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-]+)*))?$/,Fot=/^(?<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-]+)*))?$/,Got={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function jot(e,t,n){if(!zot(e))return P5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=qot(e);if(!r)return!1;let o=[],i=NEe(r,t,o,n);return i&&!n?.includePrerelease?$ot(r,o):i}PP.satisfies=jot;function zot(e){return typeof e=="string"&&BEe.test(e)}function NEe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(w5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Ait(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!w5(e,i,n,r))return!1;return!0}return w5(e,t,n,r)}function w5(e,t,n,r){if(t=Vot(t,r),t.includes(" "))return NEe(e,t,n,r);{let o=Yot(t);return n.push(o),Hot(e,o)}}function Hot(e,t){if(t.invalid)return!1;if(!t.version||k5(t.version))return!0;let n=REe(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=REe(r,o)}return Got[t.op]?.includes(n)}function $ot(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Vot(e,t){return e=e.trim(),e=pit(e,t),e=dit(e),e=fit(e,t),e=e.trim(),e}function xu(e){return!e||e.toLowerCase()==="x"||e==="*"}function qot(e){let t=e.match(BEe);if(!t){P5.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 Yot(e){if(!e)return{};let t=e.match(Fot);if(!t)return P5.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 vEe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Kot(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 Jot(e,t){if(k5(e)||k5(t))return 0;let[n,r]=Kot(vEe(e),vEe(t));return n>r?1:n<r?-1:0}function REe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Jot(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var OEe="[a-zA-Z0-9-]",wEe="0|[1-9]\\d*",Zot=`\\d*[a-zA-Z-]${OEe}*`,Wot="((?:<|>)?=?)",xEe=`(?:${wEe}|${Zot})`,Xot=`(?:-(${xEe}(?:\\.${xEe})*))`,DEe=`${OEe}+`,eit=`(?:\\+(${DEe}(?:\\.${DEe})*))`,M5=`${wEe}|x|X|\\*`,W1=`[v=\\s]*(${M5})(?:\\.(${M5})(?:\\.(${M5})(?:${Xot})?${eit}?)?)?`,tit=`^${Wot}\\s*${W1}$`,nit=new RegExp(tit),rit=`^\\s*(${W1})\\s+-\\s+(${W1})\\s*$`,oit=new RegExp(rit),iit="(?:~>?)",ait=`^${iit}${W1}$`,sit=new RegExp(ait),uit="(?:\\^)",cit=`^${uit}${W1}$`,lit=new RegExp(cit);function dit(e){let t=sit;return e.replace(t,(n,r,o,i,a)=>{let c;return xu(r)?c="":xu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:xu(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 pit(e,t){let n=lit,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return xu(i)?m="":xu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:xu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function fit(e,t){let n=nit;return e.replace(n,(r,o,i,a,c,d)=>{let m=xu(i),h=m||xu(a),S=h||xu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Ait(e,t){let n=oit;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,v)=>(xu(i)?o="":xu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:xu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,xu(S)?h="":xu(y)?h=`<${+S+1}.0.0-0`:xu(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 U5=F(hs=>{"use strict";A();Object.defineProperty(hs,"__esModule",{value:!0});hs.massUnwrap=hs.unwrap=hs.massWrap=hs.wrap=void 0;var Du=console.error.bind(console);function X1(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 mit=(e,t,n)=>{if(!e||!e[t]){Du("no original function "+String(t)+" to wrap");return}if(!n){Du("no wrapper function"),Du(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Du("original object and wrapper must be functions");return}let o=n(r,t);return X1(o,"__original",r),X1(o,"__unwrap",()=>{e[t]===o&&X1(e,t,r)}),X1(o,"__wrapped",!0),X1(e,t,o),o};hs.wrap=mit;var git=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,hs.wrap)(r,o,n)})})};hs.massWrap=git;var hit=(e,t)=>{if(!e||!e[t]){Du("no function to unwrap."),Du(new Error().stack);return}let n=e[t];if(!n.__unwrap)Du("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};hs.unwrap=hit;var _it=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Du("must provide one or more modules to patch"),Du(new Error().stack);return}if(!(t&&Array.isArray(t))){Du("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,hs.unwrap)(n,r)})})};hs.massUnwrap=_it;function eB(e){e&&e.logger&&(typeof e.logger!="function"?Du("new logger isn't a function, not replacing"):Du=e.logger)}hs.default=eB;eB.wrap=hs.wrap;eB.massWrap=hs.massWrap;eB.unwrap=hs.unwrap;eB.massUnwrap=hs.massUnwrap});var kEe=F(LP=>{"use strict";A();Object.defineProperty(LP,"__esModule",{value:!0});LP.InstrumentationAbstract=void 0;var L5=(Ge(),ke(Ze)),Eit=O5(),UP=U5(),Q5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=L5.diag.createComponentLogger({namespace:t}),this._tracer=L5.trace.getTracer(t,n),this._meter=L5.metrics.getMeter(t,n),this._logger=Eit.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=UP.wrap;_unwrap=UP.unwrap;_massWrap=UP.massWrap;_massUnwrap=UP.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)}}};LP.InstrumentationAbstract=Q5});var UEe=F((nVt,PEe)=>{A();var GC=1e3,jC=GC*60,zC=jC*60,IS=zC*24,Sit=IS*7,yit=IS*365.25;PEe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Tit(e);if(n==="number"&&isFinite(e))return t.long?Cit(e):Iit(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Tit(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*yit;case"weeks":case"week":case"w":return n*Sit;case"days":case"day":case"d":return n*IS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*zC;case"minutes":case"minute":case"mins":case"min":case"m":return n*jC;case"seconds":case"second":case"secs":case"sec":case"s":return n*GC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Iit(e){var t=Math.abs(e);return t>=IS?Math.round(e/IS)+"d":t>=zC?Math.round(e/zC)+"h":t>=jC?Math.round(e/jC)+"m":t>=GC?Math.round(e/GC)+"s":e+"ms"}function Cit(e){var t=Math.abs(e);return t>=IS?QP(e,t,IS,"day"):t>=zC?QP(e,t,zC,"hour"):t>=jC?QP(e,t,jC,"minute"):t>=GC?QP(e,t,GC,"second"):e+" ms"}function QP(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var F5=F((oVt,LEe)=>{A();function bit(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=UEe(),n.destroy=m,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let S=0;for(let y=0;y<h.length;y++)S=(S<<5)-S+h.charCodeAt(y),S|=0;return n.colors[Math.abs(S)%n.colors.length]}n.selectColor=t;function n(h){let S,y=null,C,v;function x(...N){if(!x.enabled)return;let M=x,Q=Number(new Date),j=Q-(S||Q);M.diff=j,M.prev=S,M.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(M,be),N.splice(G,1),G--}return oe}),n.formatArgs.call(M,N),(M.log||n.log).apply(M,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 m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}LEe.exports=bit});var QEe=F((Tc,FP)=>{A();Tc.formatArgs=Rit;Tc.save=xit;Tc.load=Dit;Tc.useColors=vit;Tc.storage=Bit();Tc.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`."))}})();Tc.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 vit(){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 Rit(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+FP.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)}Tc.log=console.debug||console.log||(()=>{});function xit(e){try{e?Tc.storage.setItem("debug",e):Tc.storage.removeItem("debug")}catch{}}function Dit(){let e;try{e=Tc.storage.getItem("debug")||Tc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Bit(){try{return localStorage}catch{}}FP.exports=F5()(Tc);var{formatters:Nit}=FP.exports;Nit.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var GEe=F((sVt,FEe)=>{"use strict";A();FEe.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 HEe=F((cVt,zEe)=>{"use strict";A();var Oit=Fe("os"),jEe=Fe("tty"),Cd=GEe(),{env:za}=process,Yh;Cd("no-color")||Cd("no-colors")||Cd("color=false")||Cd("color=never")?Yh=0:(Cd("color")||Cd("colors")||Cd("color=true")||Cd("color=always"))&&(Yh=1);"FORCE_COLOR"in za&&(za.FORCE_COLOR==="true"?Yh=1:za.FORCE_COLOR==="false"?Yh=0:Yh=za.FORCE_COLOR.length===0?1:Math.min(parseInt(za.FORCE_COLOR,10),3));function G5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function j5(e,t){if(Yh===0)return 0;if(Cd("color=16m")||Cd("color=full")||Cd("color=truecolor"))return 3;if(Cd("color=256"))return 2;if(e&&!t&&Yh===void 0)return 0;let n=Yh||0;if(za.TERM==="dumb")return n;if(process.platform==="win32"){let r=Oit.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in za)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in za)||za.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in za)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(za.TEAMCITY_VERSION)?1:0;if(za.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in za){let r=parseInt((za.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(za.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(za.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(za.TERM)||"COLORTERM"in za?1:n}function wit(e){let t=j5(e,e&&e.isTTY);return G5(t)}zEe.exports={supportsColor:wit,stdout:G5(j5(!0,jEe.isatty(1))),stderr:G5(j5(!0,jEe.isatty(2)))}});var VEe=F((Ha,jP)=>{A();var Mit=Fe("tty"),GP=Fe("util");Ha.init=Git;Ha.log=Lit;Ha.formatArgs=Pit;Ha.save=Qit;Ha.load=Fit;Ha.useColors=kit;Ha.destroy=GP.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ha.colors=[6,2,3,4,5,1];try{let e=HEe();e&&(e.stderr||e).level>=2&&(Ha.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{}Ha.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 kit(){return"colors"in Ha.inspectOpts?!!Ha.inspectOpts.colors:Mit.isatty(process.stderr.fd)}function Pit(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+"+jP.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Uit()+t+" "+e[0]}function Uit(){return Ha.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Lit(...e){return process.stderr.write(GP.formatWithOptions(Ha.inspectOpts,...e)+`
6
6
  `)}function Qit(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Fit(){return process.env.DEBUG}function Git(e){e.inspectOpts={};let t=Object.keys(Ha.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Ha.inspectOpts[t[n]]}jP.exports=F5()(Ha);var{formatters:$Ee}=jP.exports;$Ee.o=function(e){return this.inspectOpts.colors=this.useColors,GP.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${XU(e)}`),!0}return!1}function rct(e,t){return t?.length?YU(e).some(n=>o_(
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,gN.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),oe=>oe&&this._diag.error("caught ignoreRequestHook error: ",oe),!0))return;let i=(0,jQ.hrTime)(),a;try{a=new sgt.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),m={[qi.ATTR_HTTP_REQUEST_METHOD]:d,[qi.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[qi.ATTR_URL_FULL]:a.toString(),[qi.ATTR_URL_PATH]:a.pathname,[qi.ATTR_URL_QUERY]:a.search,[qi.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},S=a.hostname,y=a.port||h[c];m[qi.ATTR_SERVER_ADDRESS]=S,y&&!isNaN(Number(y))&&(m[qi.ATTR_SERVER_PORT]=Number(y));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let oe=Array.isArray(v)?v[v.length-1]:v;m[qi.ATTR_USER_AGENT_ORIGINAL]=oe}let x=(0,gN.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),oe=>oe&&this._diag.error("caught startSpanHook error: ",oe),!0);x&&Object.entries(x).forEach(([oe,ge])=>{m[oe]=ge});let N=Bl.context.active(),M=Bl.trace.getSpan(N),Q;n.requireParentforSpans&&(!M||!Bl.trace.isSpanContextValid(M.spanContext()))?Q=Bl.trace.wrapSpanContext(Bl.INVALID_SPAN_CONTEXT):Q=this.tracer.startSpan(d==="_OTHER"?"HTTP":d,{kind:Bl.SpanKind.CLIENT,attributes:m},N),(0,gN.safeExecuteInTheMiddle)(()=>n.requestHook?.(Q,t),oe=>oe&&this._diag.error("caught requestHook error: ",oe),!0);let j=Bl.trace.setSpan(Bl.context.active(),Q),G={};Bl.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:m,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:a,remotePort:c}=n,d={[qi.ATTR_NETWORK_PEER_ADDRESS]:a,[qi.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let m=new Set(o.headersToSpanAttributes.requestHeaders.map(S=>S.toLowerCase())),h=this.parseRequestHeaders(t);for(let[S,y]of h.entries())if(m.has(S)){let C=Array.isArray(y)?y:[y];d[`http.request.header.${S}`]=C}}i.setAttributes(d)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,a={[qi.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,gN.safeExecuteInTheMiddle)(()=>c.responseHook?.(o,{request:t,response:n}),d=>d&&this._diag.error("caught responseHook error: ",d),!0),c.headersToSpanAttributes?.responseHeaders){let d=new Set;c.headersToSpanAttributes?.responseHeaders.forEach(m=>d.add(m.toLowerCase()));for(let m=0;m<n.headers.length;m=m+2){let h=n.headers[m].toString().toLowerCase(),S=n.headers[m+1];if(d.has(h)){let y=`http.response.header.${h}`;Object.hasOwn(a,y)?a[y].push(S.toString()):a[y]=[S.toString()]}}}o.setAttributes(a),o.setStatus({code:n.statusCode>=400?Bl.SpanStatusCode.ERROR:Bl.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:Bl.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[qi.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[qi.ATTR_HTTP_RESPONSE_STATUS_CODE,qi.ATTR_HTTP_REQUEST_METHOD,qi.ATTR_SERVER_ADDRESS,qi.ATTR_SERVER_PORT,qi.ATTR_URL_SCHEME,qi.ATTR_ERROR_TYPE].forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,jQ.hrTimeToMilliseconds)((0,jQ.hrTimeDuration)(n,(0,jQ.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"}};zQ.UndiciInstrumentation=TY});var YRe=F(HQ=>{"use strict";A();Object.defineProperty(HQ,"__esModule",{value:!0});HQ.UndiciInstrumentation=void 0;var ugt=qRe();Object.defineProperty(HQ,"UndiciInstrumentation",{enumerable:!0,get:function(){return ugt.UndiciInstrumentation}})});function KRe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function pgt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&vi(t)}function fgt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=KRe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=KRe(n.origin,n.path);if(r.startsWith("data:")){let o=yb(r);return{[Mt]:"auto.http.otel.node_fetch","http.url":o,[c_]:o,[xd]:`${n.method||"GET"} ${o}`}}return{[Mt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var JRe,ZRe,cgt,lgt,dgt,WRe,XRe=O(()=>{A();JRe=ie(YRe(),1);lt();fr();ZRe="NodeFetch",cgt=at(ZRe,JRe.UndiciInstrumentation,e=>fgt(e)),lgt=at(`${ZRe}.sentry`,VS,e=>e),dgt=(e={})=>({name:"NodeFetch",setupOnce(){pgt(e,gt()?.getOptions())&&cgt(e),lgt(e)}}),WRe=dgt});var $Q=F(hN=>{"use strict";A();Object.defineProperty(hN,"__esModule",{value:!0});hN.ExpressLayerType=void 0;var Agt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(Agt=hN.ExpressLayerType||(hN.ExpressLayerType={}))});var VQ=F(_N=>{"use strict";A();Object.defineProperty(_N,"__esModule",{value:!0});_N.AttributeNames=void 0;var mgt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(mgt=_N.AttributeNames||(_N.AttributeNames={}))});var IY=F(Wb=>{"use strict";A();Object.defineProperty(Wb,"__esModule",{value:!0});Wb._LAYERS_STORE_PROPERTY=Wb.kLayerPatched=void 0;Wb.kLayerPatched=Symbol("express-layer-patched");Wb._LAYERS_STORE_PROPERTY="__ot_middlewares"});var nxe=F(Yi=>{"use strict";A();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.getActualMatchedRoute=Yi.getConstructedRoute=Yi.getLayerPath=Yi.asErrorAndMessage=Yi.isLayerIgnored=Yi.getLayerMetadata=Yi.getRouterPath=Yi.storeLayerPath=void 0;var CY=$Q(),Xb=VQ(),WS=IY(),ggt=(e,t)=>(Array.isArray(e[WS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,WS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[WS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));Yi.storeLayerPath=ggt;var hgt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,Yi.getRouterPath)(e,n):e};Yi.getRouterPath=hgt;var _gt=(e,t,n)=>{if(t.name==="router"){let r=(0,Yi.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[Xb.AttributeNames.EXPRESS_NAME]:o,[Xb.AttributeNames.EXPRESS_TYPE]:CY.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[Xb.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[Xb.AttributeNames.EXPRESS_TYPE]:CY.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[Xb.AttributeNames.EXPRESS_NAME]:t.name,[Xb.AttributeNames.EXPRESS_TYPE]:CY.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};Yi.getLayerMetadata=_gt;var Egt=(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")},Sgt=(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(Egt(e,r))return!0}catch{}return!1};Yi.isLayerIgnored=Sgt;var ygt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];Yi.asErrorAndMessage=ygt;var Tgt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>exe(n)||"").join(","):exe(t)};Yi.getLayerPath=Tgt;var exe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function txe(e){let n=(Array.isArray(e[WS._LAYERS_STORE_PROPERTY])?e[WS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}Yi.getConstructedRoute=txe;function Igt(e){let t=Array.isArray(e[WS._LAYERS_STORE_PROPERTY])?e[WS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=txe(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)||Cgt(r))?r:void 0}Yi.getActualMatchedRoute=Igt;function Cgt(e){return e.includes(":")||e.includes("*")}});var rxe=F(ev=>{"use strict";A();Object.defineProperty(ev,"__esModule",{value:!0});ev.PACKAGE_NAME=ev.PACKAGE_VERSION=void 0;ev.PACKAGE_VERSION="0.62.0";ev.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var uxe=F(YQ=>{"use strict";A();Object.defineProperty(YQ,"__esModule",{value:!0});YQ.ExpressInstrumentation=void 0;var oxe=Tr(),Dc=(Ge(),ke(Ze)),ixe=$Q(),axe=VQ(),bA=nxe(),sxe=rxe(),tv=tn(),bgt=(Kn(),ke(Pr)),qQ=IY(),bY=class extends tv.InstrumentationBase{constructor(t={}){super(sxe.PACKAGE_NAME,sxe.PACKAGE_VERSION,t)}init(){return[new tv.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,tv.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,tv.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,tv.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,bA.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,bA.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,bA.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[qQ.kLayerPatched]!==!0&&(t[qQ.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:d}=(0,bA.storeLayerPath)(a,n),m=(0,bA.getConstructedRoute)(a),h=(0,bA.getActualMatchedRoute)(a),S={[bgt.ATTR_HTTP_ROUTE]:h},y=(0,bA.getLayerMetadata)(m,t,n),C=y.attributes[axe.AttributeNames.EXPRESS_TYPE],v=(0,oxe.getRPCMetadata)(Dc.context.active());if(v?.type===oxe.RPCType.HTTP&&(v.route=h),(0,bA.isLayerIgnored)(y.name,C,r.getConfig()))return C===ixe.ExpressLayerType.MIDDLEWARE&&a[qQ._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Dc.trace.getSpan(Dc.context.active())===void 0)return o.apply(this,arguments);let x=r._getSpanName({request:a,layerType:C,route:m},y.name),N=r.tracer.startSpan(x,{attributes:Object.assign(S,y.attributes)}),M=Dc.context.active(),Q=Dc.trace.setSpan(M,N),{requestHook:j}=r.getConfig();j&&(0,tv.safeExecuteInTheMiddle)(()=>j(N,{request:a,layerType:C,route:m}),ye=>{ye&&Dc.diag.error("express instrumentation: request hook failed",ye)},!0);let G=!1;y.attributes[axe.AttributeNames.EXPRESS_TYPE]===ixe.ExpressLayerType.ROUTER&&(N.end(),G=!0,Q=M);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,bA.asErrorAndMessage)(ye);N.recordException(dn),N.setStatus({code:Dc.SpanStatusCode.ERROR,message:xe})}G===!1&&(G=!0,a.res?.removeListener("finish",q),N.end()),!(a.route&&be)&&d&&a[qQ._LAYERS_STORE_PROPERTY].pop();let We=oe[ge],wt=Dc.context.active(),tt=Dc.trace.getSpan(M),$t=tt?Dc.trace.setSpan(wt,tt):wt;return Dc.context.bind($t,We).apply(this,arguments)});try{return Dc.context.bind(Q,o).apply(this,arguments)}catch(ye){let[be,We]=(0,bA.asErrorAndMessage)(ye);throw N.recordException(be),N.setStatus({code:Dc.SpanStatusCode.ERROR,message:We}),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 Dc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};YQ.ExpressInstrumentation=bY});var cxe=F(N_=>{"use strict";A();Object.defineProperty(N_,"__esModule",{value:!0});N_.AttributeNames=N_.ExpressLayerType=N_.ExpressInstrumentation=void 0;var vgt=uxe();Object.defineProperty(N_,"ExpressInstrumentation",{enumerable:!0,get:function(){return vgt.ExpressInstrumentation}});var Rgt=$Q();Object.defineProperty(N_,"ExpressLayerType",{enumerable:!0,get:function(){return Rgt.ExpressLayerType}});var xgt=VQ();Object.defineProperty(N_,"AttributeNames",{enumerable:!0,get:function(){return xgt.AttributeNames}})});var _a,XS=O(()=>{A();_a=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function Dgt(e){Ur(e,"auto.http.otel.express");let t=Nt(e).data,n=t["express.type"];n&&e.setAttribute(Zt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function Bgt(e,t){if(Cn()===Rd())return _a&&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 lxe,dxe,pxe,Ngt,fxe,Axe=O(()=>{A();lxe=ie(cxe(),1);lt();fr();XS();dxe="Express";pxe=at(dxe,()=>new lxe.ExpressInstrumentation({requestHook:e=>Dgt(e),spanNameHook:(e,t)=>Bgt(e,t)})),Ngt=()=>({name:dxe,setupOnce(){pxe()}}),fxe=Ngt});var mxe=F(EN=>{"use strict";A();Object.defineProperty(EN,"__esModule",{value:!0});EN.SeverityNumber=void 0;var Ogt;(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"})(Ogt=EN.SeverityNumber||(EN.SeverityNumber={}))});var ZQ=F(nv=>{"use strict";A();Object.defineProperty(nv,"__esModule",{value:!0});nv.NOOP_LOGGER=nv.NoopLogger=void 0;var JQ=class{emit(t){}};nv.NoopLogger=JQ;nv.NOOP_LOGGER=new JQ});var gxe=F(vA=>{"use strict";A();Object.defineProperty(vA,"__esModule",{value:!0});vA.API_BACKWARDS_COMPATIBILITY_VERSION=vA.makeGetter=vA._global=vA.GLOBAL_LOGS_API_KEY=void 0;vA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");vA._global=globalThis;function wgt(e,t,n){return r=>r===e?t:n}vA.makeGetter=wgt;vA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var vY=F(rv=>{"use strict";A();Object.defineProperty(rv,"__esModule",{value:!0});rv.NOOP_LOGGER_PROVIDER=rv.NoopLoggerProvider=void 0;var Mgt=ZQ(),WQ=class{getLogger(t,n,r){return new Mgt.NoopLogger}};rv.NoopLoggerProvider=WQ;rv.NOOP_LOGGER_PROVIDER=new WQ});var hxe=F(XQ=>{"use strict";A();Object.defineProperty(XQ,"__esModule",{value:!0});XQ.ProxyLogger=void 0;var kgt=ZQ(),RY=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):kgt.NOOP_LOGGER}};XQ.ProxyLogger=RY});var _xe=F(e4=>{"use strict";A();Object.defineProperty(e4,"__esModule",{value:!0});e4.ProxyLoggerProvider=void 0;var Pgt=vY(),Ugt=hxe(),xY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Ugt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Pgt.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)}};e4.ProxyLoggerProvider=xY});var Sxe=F(t4=>{"use strict";A();Object.defineProperty(t4,"__esModule",{value:!0});t4.LogsAPI=void 0;var Md=gxe(),Lgt=vY(),Exe=_xe(),DY=class e{constructor(){this._proxyLoggerProvider=new Exe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Md._global[Md.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Md._global[Md.GLOBAL_LOGS_API_KEY]=(0,Md.makeGetter)(Md.API_BACKWARDS_COMPATIBILITY_VERSION,t,Lgt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Md._global[Md.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Md._global,Md.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Md._global[Md.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Exe.ProxyLoggerProvider}};t4.LogsAPI=DY});var BY=F(RA=>{"use strict";A();Object.defineProperty(RA,"__esModule",{value:!0});RA.logs=RA.NoopLogger=RA.NOOP_LOGGER=RA.SeverityNumber=void 0;var Qgt=mxe();Object.defineProperty(RA,"SeverityNumber",{enumerable:!0,get:function(){return Qgt.SeverityNumber}});var yxe=ZQ();Object.defineProperty(RA,"NOOP_LOGGER",{enumerable:!0,get:function(){return yxe.NOOP_LOGGER}});Object.defineProperty(RA,"NoopLogger",{enumerable:!0,get:function(){return yxe.NoopLogger}});var Fgt=Sxe();RA.logs=Fgt.LogsAPI.getInstance()});var Txe=F(ov=>{"use strict";A();Object.defineProperty(ov,"__esModule",{value:!0});ov.disableInstrumentations=ov.enableInstrumentations=void 0;function Ggt(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()}}ov.enableInstrumentations=Ggt;function jgt(e){e.forEach(t=>t.disable())}ov.disableInstrumentations=jgt});var bxe=F(n4=>{"use strict";A();Object.defineProperty(n4,"__esModule",{value:!0});n4.registerInstrumentations=void 0;var Ixe=(Ge(),ke(Ze)),zgt=BY(),Cxe=Txe();function Hgt(e){let t=e.tracerProvider||Ixe.trace.getTracerProvider(),n=e.meterProvider||Ixe.metrics.getMeterProvider(),r=e.loggerProvider||zgt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Cxe.enableInstrumentations)(o,t,n,r),()=>{(0,Cxe.disableInstrumentations)(o)}}n4.registerInstrumentations=Hgt});var Mxe=F(r4=>{"use strict";A();Object.defineProperty(r4,"__esModule",{value:!0});r4.satisfies=void 0;var MY=(Ge(),ke(Ze)),Bxe=/^(?: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-]+)*))?$/,$gt=/^(?<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-]+)*))?$/,Vgt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function qgt(e,t,n){if(!Ygt(e))return MY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Wgt(e);if(!r)return!1;let o=[],i=Nxe(r,t,o,n);return i&&!n?.includePrerelease?Jgt(r,o):i}r4.satisfies=qgt;function Ygt(e){return typeof e=="string"&&Bxe.test(e)}function Nxe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(NY(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Eht(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!NY(e,i,n,r))return!1;return!0}return NY(e,t,n,r)}function NY(e,t,n,r){if(t=Zgt(t,r),t.includes(" "))return Nxe(e,t,n,r);{let o=Xgt(t);return n.push(o),Kgt(e,o)}}function Kgt(e,t){if(t.invalid)return!1;if(!t.version||wY(t.version))return!0;let n=Rxe(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=Rxe(r,o)}return Vgt[t.op]?.includes(n)}function Jgt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Zgt(e,t){return e=e.trim(),e=hht(e,t),e=ght(e),e=_ht(e,t),e=e.trim(),e}function Pu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Wgt(e){let t=e.match(Bxe);if(!t){MY.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 Xgt(e){if(!e)return{};let t=e.match($gt);if(!t)return MY.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 wY(e){return e==="*"||e==="x"||e==="X"}function vxe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function eht(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 tht(e,t){if(wY(e)||wY(t))return 0;let[n,r]=eht(vxe(e),vxe(t));return n>r?1:n<r?-1:0}function Rxe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=tht(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Oxe="[a-zA-Z0-9-]",wxe="0|[1-9]\\d*",nht=`\\d*[a-zA-Z-]${Oxe}*`,rht="((?:<|>)?=?)",xxe=`(?:${wxe}|${nht})`,oht=`(?:-(${xxe}(?:\\.${xxe})*))`,Dxe=`${Oxe}+`,iht=`(?:\\+(${Dxe}(?:\\.${Dxe})*))`,OY=`${wxe}|x|X|\\*`,SN=`[v=\\s]*(${OY})(?:\\.(${OY})(?:\\.(${OY})(?:${oht})?${iht}?)?)?`,aht=`^${rht}\\s*${SN}$`,sht=new RegExp(aht),uht=`^\\s*(${SN})\\s+-\\s+(${SN})\\s*$`,cht=new RegExp(uht),lht="(?:~>?)",dht=`^${lht}${SN}$`,pht=new RegExp(dht),fht="(?:\\^)",Aht=`^${fht}${SN}$`,mht=new RegExp(Aht);function ght(e){let t=pht;return e.replace(t,(n,r,o,i,a)=>{let c;return Pu(r)?c="":Pu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Pu(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 hht(e,t){let n=mht,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Pu(i)?m="":Pu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Pu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function _ht(e,t){let n=sht;return e.replace(n,(r,o,i,a,c,d)=>{let m=Pu(i),h=m||Pu(a),S=h||Pu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Eht(e,t){let n=cht;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,v)=>(Pu(i)?o="":Pu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Pu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Pu(S)?h="":Pu(y)?h=`<${+S+1}.0.0-0`:Pu(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";A();Object.defineProperty(bs,"__esModule",{value:!0});bs.massUnwrap=bs.unwrap=bs.massWrap=bs.wrap=void 0;var Uu=console.error.bind(console);function yN(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 Sht=(e,t,n)=>{if(!e||!e[t]){Uu("no original function "+String(t)+" to wrap");return}if(!n){Uu("no wrapper function"),Uu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Uu("original object and wrapper must be functions");return}let o=n(r,t);return yN(o,"__original",r),yN(o,"__unwrap",()=>{e[t]===o&&yN(e,t,r)}),yN(o,"__wrapped",!0),yN(e,t,o),o};bs.wrap=Sht;var yht=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Uu("must provide one or more modules to patch"),Uu(new Error().stack);return}if(!(t&&Array.isArray(t))){Uu("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=yht;var Tht=(e,t)=>{if(!e||!e[t]){Uu("no function to unwrap."),Uu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Uu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};bs.unwrap=Tht;var Iht=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Uu("must provide one or more modules to patch"),Uu(new Error().stack);return}if(!(t&&Array.isArray(t))){Uu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,bs.unwrap)(n,r)})})};bs.massUnwrap=Iht;function TN(e){e&&e.logger&&(typeof e.logger!="function"?Uu("new logger isn't a function, not replacing"):Uu=e.logger)}bs.default=TN;TN.wrap=bs.wrap;TN.massWrap=bs.massWrap;TN.unwrap=bs.unwrap;TN.massUnwrap=bs.massUnwrap});var kxe=F(i4=>{"use strict";A();Object.defineProperty(i4,"__esModule",{value:!0});i4.InstrumentationAbstract=void 0;var PY=(Ge(),ke(Ze)),Cht=BY(),o4=kY(),UY=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=PY.diag.createComponentLogger({namespace:t}),this._tracer=PY.trace.getTracer(t,n),this._meter=PY.metrics.getMeter(t,n),this._logger=Cht.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=o4.wrap;_unwrap=o4.unwrap;_massWrap=o4.massWrap;_massUnwrap=o4.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)}}};i4.InstrumentationAbstract=UY});var Pxe=F(O_=>{"use strict";A();Object.defineProperty(O_,"__esModule",{value:!0});O_.ModuleNameTrie=O_.ModuleNameSeparator=void 0;O_.ModuleNameSeparator="/";var a4=class{hooks=[];children=new Map},LY=class{_trie=new a4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(O_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new a4,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(O_.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))}};O_.ModuleNameTrie=LY});var Lxe=F(s4=>{"use strict";A();Object.defineProperty(s4,"__esModule",{value:!0});s4.RequireInTheMiddleSingleton=void 0;var bht=CS(),Uxe=Fe("path"),QY=Pxe(),vht=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),FY=class e{_moduleNameTrie=new QY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new bht.Hook(null,{internals:!0},(t,n,r)=>{let o=Rht(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 vht?new e:this._instance=this._instance??new e}};s4.RequireInTheMiddleSingleton=FY;function Rht(e){return Uxe.sep!==QY.ModuleNameSeparator?e.split(Uxe.sep).join(QY.ModuleNameSeparator):e}});var zxe=F(IN=>{A();var Qxe=[],GY=new WeakMap,Fxe=new WeakMap,Gxe=new Map,jxe=[],xht={set(e,t,n){let r=GY.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=Fxe.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=GY.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function Dht(e,t,n,r,o){Gxe.set(e,o),GY.set(t,n),Fxe.set(t,r);let i=new Proxy(t,xht);Qxe.forEach(a=>a(e,i,o)),jxe.push([e,i,o])}IN.register=Dht;IN.importHooks=Qxe;IN.specifiers=Gxe;IN.toHook=jxe});var $Y=F((Efn,av)=>{A();var Hxe=Fe("path"),Bht=zP(),{fileURLToPath:Nht}=Fe("url"),{MessageChannel:Oht}=Fe("worker_threads"),{isBuiltin:jY}=Fe("module");jY||(jY=()=>!0);var{importHooks:zY,specifiers:wht,toHook:Mht}=zxe();function $xe(e){zY.push(e),Mht.forEach(([t,n,r])=>e(t,n,r))}function Vxe(e){let t=zY.indexOf(e);t>-1&&zY.splice(t,1)}function iv(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var HY;function kht(){let{port1:e,port2:t}=new Oht,n=0,r;HY=c=>{n++,e.postMessage(c)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let c=setInterval(()=>{},1e3),d=new Promise(m=>{r=m}).then(()=>{clearInterval(c)});return n===0&&r(),d}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function CN(e,t,n){if(!(this instanceof CN))return new CN(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;HY&&Array.isArray(e)&&HY(e),this._iitmHook=(o,i,a)=>{let c=o,d=c.startsWith("node:"),m,h;if(d){let S=o.slice(5);jY(S)&&(o=S)}else if(c.startsWith("file://")){let S=Error.stackTraceLimit;Error.stackTraceLimit=0;try{m=Nht(o),o=m}catch{}if(Error.stackTraceLimit=S,m){let y=Bht(m);y&&(o=y.name,h=y.basedir)}}if(e)for(let S of e)if(m&&S===m)iv(n,i,m,void 0);else if(S===o){if(!h)iv(n,i,o,h);else if(h.endsWith(wht.get(c)))iv(n,i,o,h);else if(r){let y=o+Hxe.sep+Hxe.relative(h,m);iv(n,i,y,h)}}else S===a&&iv(n,i,a,h);else iv(n,i,o,h)},$xe(this._iitmHook)}CN.prototype.unhook=function(){Vxe(this._iitmHook)};av.exports=CN;av.exports.Hook=CN;av.exports.addHook=$xe;av.exports.removeHook=Vxe;av.exports.createAddHookMessageChannel=kht});var VY=F(w_=>{"use strict";A();Object.defineProperty(w_,"__esModule",{value:!0});w_.isWrapped=w_.safeExecuteInTheMiddleAsync=w_.safeExecuteInTheMiddle=void 0;function Pht(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}w_.safeExecuteInTheMiddle=Pht;async function Uht(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}}w_.safeExecuteInTheMiddleAsync=Uht;function Lht(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}w_.isWrapped=Lht});var Kxe=F(u4=>{"use strict";A();Object.defineProperty(u4,"__esModule",{value:!0});u4.InstrumentationBase=void 0;var bN=Fe("path"),qxe=Fe("util"),Qht=Mxe(),qY=kY(),Fht=kxe(),Ght=Lxe(),jht=$Y(),vN=(Ge(),ke(Ze)),zht=CS(),Hht=Fe("fs"),$ht=VY(),YY=class extends Fht.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Ght.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,$ht.isWrapped)(t[n])&&this._unwrap(t,n),qxe.types.isProxy(t)){let o=(0,qY.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,qY.wrap)(t,n,r)};_unwrap=(t,n)=>qxe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,qY.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{vN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){vN.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{vN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){vN.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=Fe.resolve(n);Fe.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,Hht.readFileSync)(bN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{vN.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 Yxe(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=bN.normalize(r);return a.filter(m=>m.name===c&&Yxe(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&bN.isAbsolute(c)){let m=bN.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=bN.isAbsolute(t.name)?new zht.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new jht.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}};u4.InstrumentationBase=YY;function Yxe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Qht.satisfies)(t,r,{includePrerelease:n}))}});var Jxe=F(c4=>{"use strict";A();Object.defineProperty(c4,"__esModule",{value:!0});c4.normalize=void 0;var Vht=Fe("path");Object.defineProperty(c4,"normalize",{enumerable:!0,get:function(){return Vht.normalize}})});var Zxe=F(sv=>{"use strict";A();Object.defineProperty(sv,"__esModule",{value:!0});sv.normalize=sv.InstrumentationBase=void 0;var qht=Kxe();Object.defineProperty(sv,"InstrumentationBase",{enumerable:!0,get:function(){return qht.InstrumentationBase}});var Yht=Jxe();Object.defineProperty(sv,"normalize",{enumerable:!0,get:function(){return Yht.normalize}})});var KY=F(uv=>{"use strict";A();Object.defineProperty(uv,"__esModule",{value:!0});uv.normalize=uv.InstrumentationBase=void 0;var Wxe=Zxe();Object.defineProperty(uv,"InstrumentationBase",{enumerable:!0,get:function(){return Wxe.InstrumentationBase}});Object.defineProperty(uv,"normalize",{enumerable:!0,get:function(){return Wxe.normalize}})});var Xxe=F(l4=>{"use strict";A();Object.defineProperty(l4,"__esModule",{value:!0});l4.InstrumentationNodeModuleDefinition=void 0;var JY=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}};l4.InstrumentationNodeModuleDefinition=JY});var eDe=F(d4=>{"use strict";A();Object.defineProperty(d4,"__esModule",{value:!0});d4.InstrumentationNodeModuleFile=void 0;var Kht=KY(),ZY=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,Kht.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};d4.InstrumentationNodeModuleFile=ZY});var tDe=F(ey=>{"use strict";A();Object.defineProperty(ey,"__esModule",{value:!0});ey.semconvStabilityFromStr=ey.SemconvStability=void 0;var p4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(p4=ey.SemconvStability||(ey.SemconvStability={}));function Jht(e,t){let n=p4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=p4.DUPLICATE;break}else o.toLowerCase()===e&&(n=p4.STABLE);return n}ey.semconvStabilityFromStr=Jht});var rDe=F(Ki=>{"use strict";A();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.semconvStabilityFromStr=Ki.SemconvStability=Ki.safeExecuteInTheMiddleAsync=Ki.safeExecuteInTheMiddle=Ki.isWrapped=Ki.InstrumentationNodeModuleFile=Ki.InstrumentationNodeModuleDefinition=Ki.InstrumentationBase=Ki.registerInstrumentations=void 0;var Zht=bxe();Object.defineProperty(Ki,"registerInstrumentations",{enumerable:!0,get:function(){return Zht.registerInstrumentations}});var Wht=KY();Object.defineProperty(Ki,"InstrumentationBase",{enumerable:!0,get:function(){return Wht.InstrumentationBase}});var Xht=Xxe();Object.defineProperty(Ki,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return Xht.InstrumentationNodeModuleDefinition}});var e_t=eDe();Object.defineProperty(Ki,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return e_t.InstrumentationNodeModuleFile}});var WY=VY();Object.defineProperty(Ki,"isWrapped",{enumerable:!0,get:function(){return WY.isWrapped}});Object.defineProperty(Ki,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return WY.safeExecuteInTheMiddle}});Object.defineProperty(Ki,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return WY.safeExecuteInTheMiddleAsync}});var nDe=tDe();Object.defineProperty(Ki,"SemconvStability",{enumerable:!0,get:function(){return nDe.SemconvStability}});Object.defineProperty(Ki,"semconvStabilityFromStr",{enumerable:!0,get:function(){return nDe.semconvStabilityFromStr}})});var oDe=F((Ffn,t_t)=>{t_t.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 aDe=F(ty=>{"use strict";A();Object.defineProperty(ty,"__esModule",{value:!0});ty.range=ty.balanced=void 0;var n_t=(e,t,n)=>{let r=e instanceof RegExp?iDe(e,n):e,o=t instanceof RegExp?iDe(t,n):t,i=r!==null&&o!=null&&(0,ty.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)}};ty.balanced=n_t;var iDe=(e,t)=>{let n=t.match(e);return n?n[0]:null},r_t=(e,t,n)=>{let r,o,i,a,c,d=n.indexOf(e),m=n.indexOf(t,d+1),h=d;if(d>=0&&m>0){if(e===t)return[d,m];for(r=[],i=n.length;h>=0&&!c;){if(h===d)r.push(h),d=n.indexOf(e,h+1);else if(r.length===1){let S=r.pop();S!==void 0&&(c=[S,m])}else o=r.pop(),o!==void 0&&o<i&&(i=o,a=m),m=n.indexOf(t,h+1);h=d<m&&d>=0?d:m}r.length&&a!==void 0&&(c=[i,a])}return c};ty.range=r_t});var fDe=F(cv=>{"use strict";A();Object.defineProperty(cv,"__esModule",{value:!0});cv.EXPANSION_MAX=void 0;cv.expand=g_t;var sDe=aDe(),uDe="\0SLASH"+Math.random()+"\0",cDe="\0OPEN"+Math.random()+"\0",eK="\0CLOSE"+Math.random()+"\0",lDe="\0COMMA"+Math.random()+"\0",dDe="\0PERIOD"+Math.random()+"\0",o_t=new RegExp(uDe,"g"),i_t=new RegExp(cDe,"g"),a_t=new RegExp(eK,"g"),s_t=new RegExp(lDe,"g"),u_t=new RegExp(dDe,"g"),c_t=/\\\\/g,l_t=/\\{/g,d_t=/\\}/g,p_t=/\\,/g,f_t=/\\\./g;cv.EXPANSION_MAX=1e5;function XY(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function A_t(e){return e.replace(c_t,uDe).replace(l_t,cDe).replace(d_t,eK).replace(p_t,lDe).replace(f_t,dDe)}function m_t(e){return e.replace(o_t,"\\").replace(i_t,"{").replace(a_t,"}").replace(s_t,",").replace(u_t,".")}function pDe(e){if(!e)return[""];let t=[],n=(0,sDe.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=pDe(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function g_t(e,t={}){if(!e)return[];let{max:n=cv.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),RN(A_t(e),n,!0).map(m_t)}function h_t(e){return"{"+e+"}"}function __t(e){return/^-?0\d/.test(e)}function E_t(e,t){return e<=t}function S_t(e,t){return e>=t}function RN(e,t,n){let r=[],o=(0,sDe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?RN(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let c=0;c<a.length&&c<t;c++){let d=i+"{"+o.body+"}"+a[c];r.push(d)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),m=c||d,h=o.body.indexOf(",")>=0;if(!m&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+eK+o.post,RN(e,t,!0)):[e];let S;if(m)S=o.body.split(/\.\./);else if(S=pDe(o.body),S.length===1&&S[0]!==void 0&&(S=RN(S[0],t,!1).map(h_t),S.length===1))return a.map(C=>o.pre+S[0]+C);let y;if(m&&S[0]!==void 0&&S[1]!==void 0){let C=XY(S[0]),v=XY(S[1]),x=Math.max(S[0].length,S[1].length),N=S.length===3&&S[2]!==void 0?Math.abs(XY(S[2])):1,M=E_t;v<C&&(N*=-1,M=S_t);let j=S.some(__t);y=[];for(let G=C;M(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,RN(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||m||x)&&r.push(x)}}return r}});var ADe=F(f4=>{"use strict";A();Object.defineProperty(f4,"__esModule",{value:!0});f4.assertValidPattern=void 0;var y_t=1024*64,T_t=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>y_t)throw new TypeError("pattern is too long")};f4.assertValidPattern=T_t});var gDe=F(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.parseClass=void 0;var I_t={"[: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]},xN=e=>e.replace(/[[\]\\-]/g,"\\$&"),C_t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mDe=e=>e.join(""),b_t=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,a=!1,c=!1,d=!1,m=!1,h=n,S="";e:for(;i<e.length;){let x=e.charAt(i);if((x==="!"||x==="^")&&i===n+1){m=!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,[M,Q,j]]of Object.entries(I_t))if(e.startsWith(N,i)){if(S)return["$.",!1,e.length-n,!0];i+=N.length,j?o.push(M):r.push(M),c=c||Q;continue e}}if(d=!1,S){x>S?r.push(xN(S)+"-"+xN(x)):x===S&&r.push(xN(x)),S="",i++;continue}if(e.startsWith("-]",i+1)){r.push(xN(x+"-")),i+=2;continue}if(e.startsWith("-",i+1)){S=x,i+=2;continue}r.push(xN(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])&&!m){let x=r[0].length===2?r[0].slice(-1):r[0];return[C_t(x),!1,h-n,!1]}let y="["+(m?"^":"")+mDe(r)+"]",C="["+(m?"":"^")+mDe(o)+"]";return[r.length&&o.length?"("+y+"|"+C+")":r.length?y:C,c,h-n,!0]};A4.parseClass=b_t});var g4=F(m4=>{"use strict";A();Object.defineProperty(m4,"__esModule",{value:!0});m4.unescape=void 0;var v_t=(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");m4.unescape=v_t});var rK=F(S4=>{"use strict";A();var Bc;Object.defineProperty(S4,"__esModule",{value:!0});S4.AST=void 0;var R_t=gDe(),h4=g4(),x_t=new Set(["!","?","+","*","@"]),tK=e=>x_t.has(e),hDe=e=>tK(e.type),D_t=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),B_t=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),N_t=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),_De=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),O_t="(?!(?:^|/)\\.\\.?(?:$|/))",_4="(?!\\.)",w_t=new Set(["[","."]),M_t=new Set(["..","."]),k_t=new Set("().*{}+?[]^$\\!"),P_t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),nK="[^/]",EDe=nK+"*?",SDe=nK+"+?",U_t=0,E4=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++U_t;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 Bc&&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 Bc&&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 Bc(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let a=o.maxExtglobRecursion??2,c=!1,d=!1,m=-1,h=!1;if(n.type===null){let x=r,N="";for(;x<t.length;){let M=t.charAt(x++);if(c||M==="\\"){c=!c,N+=M;continue}if(d){x===m+1?(M==="^"||M==="!")&&(h=!0):M==="]"&&!(x===m+2&&h)&&(d=!1),N+=M;continue}else if(M==="["){d=!0,m=x,h=!1,N+=M;continue}if(!o.noext&&tK(M)&&t.charAt(x)==="("&&i<=a){n.push(N),N="";let j=new Bc(M,n);x=Bc.#d(t,j,x,o,i+1),n.push(j);continue}N+=M}return n.push(N),x}let S=r+1,y=new Bc(null,n),C=[],v="";for(;S<t.length;){let x=t.charAt(S++);if(c||x==="\\"){c=!c,v+=x;continue}if(d){S===m+1?(x==="^"||x==="!")&&(h=!0):x==="]"&&!(S===m+2&&h)&&(d=!1),v+=x;continue}else if(x==="["){d=!0,m=S,h=!1,v+=x;continue}if(!o.noext&&tK(x)&&t.charAt(S)==="("&&(i<=a||n&&n.#p(x))){let M=n&&n.#p(x)?0:1;y.push(v),v="";let Q=new Bc(x,y);y.push(Q),S=Bc.#d(t,Q,S,o,i+M);continue}if(x==="|"){y.push(v),v="",C.push(y),y=new Bc(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,B_t)}#A(t,n=D_t){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=N_t){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Bc(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!!_De.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=_De.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 Bc(null,void 0,n);return Bc.#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()),!hDe(this)){let d=this.isStart()&&this.isEnd()&&!this.#e.some(C=>typeof C!="string"),m=this.#e.map(C=>{let[v,x,N,M]=typeof C=="string"?Bc.#I(C,this.#r,d):C.toRegExpSource(t);return this.#r=this.#r||N,this.#o=this.#o||M,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&M_t.has(this.#e[0]))){let v=w_t,x=n&&v.has(m.charAt(0))||m.startsWith("\\.")&&v.has(m.charAt(2))||m.startsWith("\\.\\.")&&v.has(m.charAt(4)),N=!n&&!t&&v.has(m.charAt(0));h=x?O_t:N?_4:""}let S="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(S="(?:$|\\/)"),[h+m+S,(0,h4.unescape)(m),this.#r=!!this.#r,this.#o]}let r=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let d=this.toString(),m=this;return m.#e=[d],m.type=null,m.#r=void 0,[d,(0,h4.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!_4?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?_4:"")+SDe;else{let d=this.type==="!"?"))"+(this.isStart()&&!n&&!t?_4:"")+EDe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+d}return[c,(0,h4.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(hDe(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#A(o)?(n=!1,this.#m(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#y(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#a=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,a]=n.toRegExpSource(t);return this.#o=this.#o||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#I(t,n,r=!1){let o=!1,i="",a=!1,c=!1;for(let d=0;d<t.length;d++){let m=t.charAt(d);if(o){o=!1,i+=(k_t.has(m)?"\\":"")+m;continue}if(m==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?SDe:EDe,n=!0;continue}else c=!1;if(m==="\\"){d===t.length-1?i+="\\\\":o=!0;continue}if(m==="["){let[h,S,y,C]=(0,R_t.parseClass)(t,d);if(y){i+=h,a=a||S,d+=y-1,n=n||C;continue}}if(m==="?"){i+=nK,n=!0;continue}i+=P_t(m)}return[i,(0,h4.unescape)(t),!!n,a]}};S4.AST=E4;Bc=E4});var oK=F(y4=>{"use strict";A();Object.defineProperty(y4,"__esModule",{value:!0});y4.escape=void 0;var L_t=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");y4.escape=L_t});var RDe=F(ft=>{"use strict";A();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 Q_t=fDe(),T4=ADe(),IDe=rK(),F_t=oK(),G_t=g4(),j_t=(e,t,n={})=>((0,T4.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new ny(t,n).match(e));ft.minimatch=j_t;var z_t=/^\*+([^+@!?\*\[\(]*)$/,H_t=e=>t=>!t.startsWith(".")&&t.endsWith(e),$_t=e=>t=>t.endsWith(e),V_t=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),q_t=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Y_t=/^\*+\.\*+$/,K_t=e=>!e.startsWith(".")&&e.includes("."),J_t=e=>e!=="."&&e!==".."&&e.includes("."),Z_t=/^\.\*+$/,W_t=e=>e!=="."&&e!==".."&&e.startsWith("."),X_t=/^\*+$/,eEt=e=>e.length!==0&&!e.startsWith("."),tEt=e=>e.length!==0&&e!=="."&&e!=="..",nEt=/^\?+([^+@!?\*\[\(]*)?$/,rEt=([e,t=""])=>{let n=CDe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},oEt=([e,t=""])=>{let n=bDe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},iEt=([e,t=""])=>{let n=bDe([e]);return t?r=>n(r)&&r.endsWith(t):n},aEt=([e,t=""])=>{let n=CDe([e]);return t?r=>n(r)&&r.endsWith(t):n},CDe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},bDe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},vDe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",yDe={win32:{sep:"\\"},posix:{sep:"/"}};ft.sep=vDe==="win32"?yDe.win32.sep:yDe.posix.sep;ft.minimatch.sep=ft.sep;ft.GLOBSTAR=Symbol("globstar **");ft.minimatch.GLOBSTAR=ft.GLOBSTAR;var sEt="[^/]",uEt=sEt+"*?",cEt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",lEt="(?:(?!(?:\\/|^)\\.).)*?",dEt=(e,t={})=>n=>(0,ft.minimatch)(n,e,t);ft.filter=dEt;ft.minimatch.filter=ft.filter;var kd=(e,t={})=>Object.assign({},e,t),pEt=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,kd(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,kd(e,i))}static defaults(o){return t.defaults(kd(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,kd(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,kd(e,i))}},unescape:(r,o={})=>t.unescape(r,kd(e,o)),escape:(r,o={})=>t.escape(r,kd(e,o)),filter:(r,o={})=>t.filter(r,kd(e,o)),defaults:r=>t.defaults(kd(e,r)),makeRe:(r,o={})=>t.makeRe(r,kd(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,kd(e,o)),match:(r,o,i={})=>t.match(r,o,kd(e,i)),sep:t.sep,GLOBSTAR:ft.GLOBSTAR})};ft.defaults=pEt;ft.minimatch.defaults=ft.defaults;var fEt=(e,t={})=>((0,T4.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,Q_t.expand)(e,{max:t.braceExpandMax}));ft.braceExpand=fEt;ft.minimatch.braceExpand=ft.braceExpand;var AEt=(e,t={})=>new ny(e,t).makeRe();ft.makeRe=AEt;ft.minimatch.makeRe=ft.makeRe;var mEt=(e,t,n={})=>{let r=new ny(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};ft.match=mEt;ft.minimatch.match=ft.match;var TDe=/[?*]|[+@!]\(.*?\)|\[|\]/,gEt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ny=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,T4.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||vDe,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]==="?"||!TDe.test(i[2]))&&!TDe.test(i[3]),m=/^[a-z]:/i.test(i[0]);if(d)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(m)return[i[0],...i.slice(1).map(h=>this.parse(h))]}return i.map(d=>this.parse(d))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{let i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let a=o;for(;r[a+1]==="**";)a++;a>o&&r.splice(o+1,a-o);let c=r[o+1],d=r[o+2],m=r[o+3];if(c!==".."||!d||d==="."||d===".."||!m||m==="."||m==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let a=r[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let d=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...d),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,a=[],c="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])a.push(c==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])a.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])a.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(c==="b")return!1;c="a",a.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(c==="a")return!1;c="b",a.push(n[i]),o++,i++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),d=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!m&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),S=d?3:c?0:void 0,y=h?3:m?0:void 0;if(typeof S=="number"&&typeof y=="number"){let[C,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,m,h]=r?[n.slice(i,a),n.slice(a+1),[]]:[n.slice(i,a),n.slice(a+1,c),n.slice(c+1)];if(d.length){let 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(!m.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 m)Q===ft.GLOBSTAR?(x.push(v),C=[[],0],y.push(C)):(C[0].push(Q),v++);let N=y.length-1,M=t.length-S;for(let Q of y)Q[1]=M-(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[m,h]=d;for(;r<=h;){if(this.#o(t.slice(0,r+m.length),m,i,r,0)&&a<this.maxGlobstarRecursion){let C=this.#r(t,n,r+m.length,o+1,i,a+1,c);if(C!==!1)return C}let y=t[r];if(y==="."||y===".."||!this.options.dot&&y.startsWith("."))return!1;r++}return i||null}#o(t,n,r,o,i){let a,c,d,m;for(a=o,c=i,m=t.length,d=n.length;a<m&&c<d;a++,c++){this.debug("matchOne loop");let h=n[c],S=t[a];if(this.debug(n,h,S),h===!1||h===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===m&&c===d)return!0;if(a===m)return r;if(c===d)return a===m-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,ft.braceExpand)(this.pattern,this.options)}parse(t){(0,T4.assertValidPattern)(t);let n=this.options;if(t==="**")return ft.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(X_t))?o=n.dot?tEt:eEt:(r=t.match(z_t))?o=(n.nocase?n.dot?q_t:V_t:n.dot?$_t:H_t)(r[1]):(r=t.match(nEt))?o=(n.nocase?n.dot?oEt:rEt:n.dot?iEt:aEt)(r):(r=t.match(Y_t))?o=n.dot?J_t:K_t:(r=t.match(Z_t))&&(o=W_t);let i=IDe.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?uEt:n.dot?cEt:lEt,o=new Set(n.nocase?["i"]:[]),i=t.map(d=>{let m=d.map(S=>{if(S instanceof RegExp)for(let y of S.flags.split(""))o.add(y);return typeof S=="string"?gEt(S):S===ft.GLOBSTAR?ft.GLOBSTAR:S._src});m.forEach((S,y)=>{let C=m[y+1],v=m[y-1];S!==ft.GLOBSTAR||v===ft.GLOBSTAR||(v===void 0?C!==void 0&&C!==ft.GLOBSTAR?m[y+1]="(?:\\/|"+r+"\\/)?"+C:m[y]=r:C===void 0?m[y-1]=v+"(?:\\/|\\/"+r+")?":C!==ft.GLOBSTAR&&(m[y-1]=v+"(?:\\/|\\/"+r+"\\/)"+C,m[y+1]=ft.GLOBSTAR))});let h=m.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],m=o;if(r.matchBase&&d.length===1&&(m=[a]),this.matchOne(m,d,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ft.minimatch.defaults(t).Minimatch}};ft.Minimatch=ny;var hEt=rK();Object.defineProperty(ft,"AST",{enumerable:!0,get:function(){return hEt.AST}});var _Et=oK();Object.defineProperty(ft,"escape",{enumerable:!0,get:function(){return _Et.escape}});var EEt=g4();Object.defineProperty(ft,"unescape",{enumerable:!0,get:function(){return EEt.unescape}});ft.minimatch.AST=IDe.AST;ft.minimatch.Minimatch=ny;ft.minimatch.escape=F_t.escape;ft.minimatch.unescape=G_t.unescape});var MDe=F((iAn,sK)=>{"use strict";A();var xDe=Fe("node:diagnostics_channel"),{context:I4,trace:iK,SpanStatusCode:C4,propagation:aK,diag:SEt}=(Ge(),ke(Ze)),{getRPCMetadata:yEt,RPCType:TEt}=Tr(),{ATTR_HTTP_ROUTE:b4,ATTR_HTTP_RESPONSE_STATUS_CODE:DDe,ATTR_HTTP_REQUEST_METHOD:IEt,ATTR_URL_PATH:CEt}=(Kn(),ke(Pr)),{InstrumentationBase:bEt}=rDe(),{version:vEt,name:BDe}=oDe(),REt=">=4.0.0 <6",NDe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],_o={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},M_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Eg="anonymous",k_=Symbol("fastify otel instance"),P_=Symbol("fastify otel request spans"),DN=Symbol("fastify otel request context"),ODe=Symbol("fastify otel addhook original"),wDe=Symbol("fastify otel setnotfound original"),BN=Symbol("fastify otel ignore path"),NN=Symbol("fastify otel record exceptions"),v4=class extends bEt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(BDe,vEt,t),this.logger=SEt.createComponentLogger({namespace:BDe}),this[BN]=null,this[NN]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[NN]=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[BN]=o=>typeof n=="function"?n(o):(r==null&&(r=RDe().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)},xDe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(xDe.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:REt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(k_,t),r.decorate(ODe,r.addHook),r.decorate(wDe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let C=this[DN],v=this[P_];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:C,inject:(x,N)=>aK.inject(C,x,N),extract:(x,N)=>aK.extract(C,x,N)}}),r.decorateRequest(P_,null),r.decorateRequest(DN,null),r.addHook("onRoute",function(C){if(t[BN]?.(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 NDe)if(C[v]!=null){let x=C[v];if(typeof x=="function")C[v]=S(x,v,{[_o.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[_o.FASTIFY_TYPE]:M_.ROUTE,[b4]:C.url,[_o.HOOK_CALLBACK_NAME]:x.name?.length>0?x.name:Eg});else if(Array.isArray(x)){let N=[];for(let M of x)N.push(S(M,v,{[_o.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[_o.FASTIFY_TYPE]:M_.ROUTE,[b4]:C.url,[_o.HOOK_CALLBACK_NAME]:M.name?.length>0?M.name:Eg}));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",{[_o.HOOK_NAME]:`${this.pluginName} - route-handler`,[_o.FASTIFY_TYPE]:M_.HANDLER,[b4]:C.url,[_o.HOOK_CALLBACK_NAME]:C.handler.name.length>0?C.handler.name:Eg})}),r.addHook("onRequest",function(C,v,x){if(this[k_].isEnabled()===!1||C.routeOptions.config?.otel===!1)return x();if(this[k_][BN]?.({url:C.url,method:C.method})===!0)return this[k_].logger.debug(`Ignoring request ${C.method} ${C.url} because it matches the ignore path`),x();let N=I4.active();iK.getSpan(N)==null&&(N=aK.extract(N,C.headers));let M=yEt(N);C.routeOptions.url!=null&&M?.type===TEt.HTTP&&(M.route=C.routeOptions.url);let Q={[_o.ROOT]:"@fastify/otel",[IEt]:C.method,[CEt]:C.url};C.routeOptions.url!=null&&(Q[b4]=C.routeOptions.url);let j=this[k_].tracer.startSpan("request",{attributes:Q},N);try{this[k_]._requestHook?.(j,C)}catch(G){this[k_].logger.error({err:G},"requestHook threw")}C[DN]=iK.setSpan(N,j),C[P_]=j,I4.with(C[DN],()=>{x()})}),r.addHook("onResponse",function(C,v,x){let N=C[P_];N!=null&&(N.setAttributes({[DDe]:v.statusCode}),N.end()),C[P_]=null,x()}),r.addHook=d,r.setNotFoundHandler=m,i();function a(y,C,v,x){let N=y[P_];N!=null&&(C.statusCode>=500&&N.setStatus({code:C4.ERROR}),N.setAttributes({[DDe]:C.statusCode}),N.end()),y[P_]=null,x(null,v)}function c(y,C,v,x){let N=y[P_];N!=null&&(N.setStatus({code:C4.ERROR,message:v.message}),t[NN]!==!1&&N.recordException(v)),x()}function d(y,C){let v=this[ODe];return NDe.includes(y)?v.call(this,y,S(C,y,{[_o.HOOK_NAME]:`${this.pluginName} - ${y}`,[_o.FASTIFY_TYPE]:M_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Eg})):v.call(this,y,C)}function m(y,C){let v=this[wDe];typeof y=="function"?(C=S(y,"notFoundHandler",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[_o.FASTIFY_TYPE]:M_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:y.name?.length>0?y.name:Eg}),v.call(this,C)):(y.preValidation!=null&&(y.preValidation=S(y.preValidation,"notFoundHandler - preValidation",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[_o.FASTIFY_TYPE]:M_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:y.preValidation.name?.length>0?y.preValidation.name:Eg})),y.preHandler!=null&&(y.preHandler=S(y.preHandler,"notFoundHandler - preHandler",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[_o.FASTIFY_TYPE]:M_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:y.preHandler.name?.length>0?y.preHandler.name:Eg})),C=S(C,"notFoundHandler",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[_o.FASTIFY_TYPE]:M_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Eg}),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 M=this[k_],Q=h(N);if(Q===null)return M.logger.debug(`Ignoring route instrumentation because ${C} was called without a Fastify request argument`),y.call(this,...N);if(M.isEnabled()===!1||Q.routeOptions.config?.otel===!1)return M.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it is disabled`),y.call(this,...N);if(M[BN]?.({url:Q.url,method:Q.method})===!0)return M.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it matches the ignore path`),y.call(this,...N);let j=Q[DN]??I4.active(),G=y.name?.length>0?y.name:this.pluginName??Eg,q=M.tracer.startSpan(`${C} - ${G}`,{attributes:v},j);if(M._lifecycleHook!=null)try{M._lifecycleHook(q,{hookName:C,request:Q,handler:G})}catch(oe){M.logger.error({err:oe},"Execution of lifecycleHook failed")}return I4.with(iK.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:C4.ERROR,message:ge.message}),M[NN]!==!1&&q.recordException(ge),q.end(),Promise.reject(ge))):(q.end(),oe)}catch(oe){throw q.setStatus({code:C4.ERROR,message:oe.message}),M[NN]!==!1&&q.recordException(oe),q.end(),oe}},this)}}}}};sK.exports=v4;sK.exports.FastifyOtelInstrumentation=v4});var Sg,ON,wN,kDe=O(()=>{A();(function(e){let t="fastify.name";e.FASTIFY_NAME=t;let n="fastify.type";e.FASTIFY_TYPE=n;let r="hook.name";e.HOOK_NAME=r;let o="plugin.name";e.PLUGIN_NAME=o})(Sg||(Sg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(ON||(ON={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(wN||(wN={}))});var MN,PDe=O(()=>{A();MN=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function uK(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[MN]||[];return i.push(o),Object.defineProperty(e,MN,{enumerable:!1,configurable:!0,value:i}),o}function R4(e,t){let n=e[MN]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:ai.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[MN])}function LDe(e,t,n){let r,o;try{o=e(),UDe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!UDe(o)&&(t(r,o),r))throw r;return o}}function UDe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var QDe=O(()=>{A();Ge();PDe()});function NEt(){let e=gt();e&&e.on("spanStart",t=>{GDe(t)})}function GDe(e){let t=Nt(e).data,n=t["fastify.type"];if(t[Zt]||!n)return;e.setAttributes({[Mt]:"auto.http.otel.fastify",[Zt]:`${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 D4,ry,xEt,DEt,FDe,BEt,x4,jDe=O(()=>{A();Ge();D4=ie(Tr(),1),ry=ie(tn(),1);Kn();lt();kDe();QDe();xEt="0.1.0",DEt="@sentry/instrumentation-fastify-v3",FDe="anonymous",BEt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),x4=class extends ry.InstrumentationBase{constructor(t={}){super(DEt,xEt,t)}init(){return[new ry.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,D4.getRPCMetadata)(Ye.active()),d=a.routeOptions?a.routeOptions.url:r.routerPath;d&&c?.type===D4.RPCType.HTTP&&(c.route=d);let m=r.method||"GET";Cn().setTransactionName(`${m} ${d}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...a){if(!i.isEnabled())return r.apply(this,a);let c=r.name||t||FDe,d=`${wN.MIDDLEWARE} - ${c}`,m=a[1],h=uK(m,i.tracer,d,{[Sg.FASTIFY_TYPE]:ON.MIDDLEWARE,[Sg.PLUGIN_NAME]:t,[Sg.HOOK_NAME]:n}),S=o&&a[a.length-1];return S&&(a[a.length-1]=function(...y){R4(m),S.apply(this,y)}),Ye.with(zt.setSpan(Ye.active(),h),()=>LDe(()=>r.apply(this,a),y=>{y instanceof Error&&(h.setStatus({code:ai.ERROR,message:y.message}),h.recordException(y)),o||R4(m)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],a=o[1],c=this.pluginName;if(!BEt.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()),NEt(),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,ry.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),R4(this,c)}):r.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){if(!t.isEnabled())return i();let a=r,c=a.routeOptions?.handler||a.context?.handler,d=c?.name.startsWith("bound ")?c.name.substring(6):c?.name,m=`${wN.REQUEST_HANDLER} - ${d||this.pluginName||FDe}`,h={[Sg.PLUGIN_NAME]:this.pluginName,[Sg.FASTIFY_TYPE]:ON.REQUEST_HANDLER,[Z$]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[Sg.FASTIFY_NAME]=d);let S=uK(o,t.tracer,m,h);GDe(S);let{requestHook:y}=t.getConfig();return y&&(0,ry.safeExecuteInTheMiddle)(()=>y(S,{request:r}),C=>{C&&t._diag.error("request hook failed",C)},!0),Ye.with(zt.setSpan(Ye.active(),S),()=>{i()})}}}});import*as cK from"node:diagnostics_channel";function OEt(){let e=gt();if(e)return e.getIntegrationByName(B4)}function zDe(e,t,n,r){let o=OEt()?.getShouldHandleError()||YDe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){_a&&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)&&en(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function YDe(e,t,n){let r=n.statusCode;return r>=500||r<=299}function KDe(e){let t=Nt(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[Zt]||!a&&!c&&!i)return;let d=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[Mt]:"auto.http.otel.fastify",[Zt]:`${d}.fastify`});let m=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof m=="string"){let h=m.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function MEt(){let e=gt();e&&e.on("spanStart",t=>{KDe(t)})}function kEt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&KDe(i)}let r=t.routeOptions?.url,o=t.method||"GET";Cn().setTransactionName(`${o} ${r}`)})}var HDe,B4,$De,VDe,wEt,qDe,JDe=O(()=>{A();HDe=ie(MDe(),1);lt();fr();XS();jDe();B4="Fastify",$De=at(`${B4}.v3`,()=>new x4);VDe=at(`${B4}.v5`,()=>{let e=new HDe.FastifyOtelInstrumentation,t=e.plugin();return cK.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?_a&&J.error("Failed to setup Fastify instrumentation",o):(MEt(),r&&kEt(r))})}),cK.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;zDe.call(zDe,r,o,i,"diagnostics-channel")}),e}),wEt=({shouldHandleError:e})=>{let t;return{name:B4,setupOnce(){t=e||YDe,$De(),VDe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},qDe=(e={})=>wEt(e)});var lK=F(Xp=>{"use strict";A();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.SpanNames=Xp.TokenKind=Xp.AllowedOperationTypes=void 0;var PEt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(PEt=Xp.AllowedOperationTypes||(Xp.AllowedOperationTypes={}));var UEt;(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"})(UEt=Xp.TokenKind||(Xp.TokenKind={}));var LEt;(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"})(LEt=Xp.SpanNames||(Xp.SpanNames={}))});var dK=F(kN=>{"use strict";A();Object.defineProperty(kN,"__esModule",{value:!0});kN.AttributeNames=void 0;var QEt;(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"})(QEt=kN.AttributeNames||(kN.AttributeNames={}))});var N4=F(lv=>{"use strict";A();Object.defineProperty(lv,"__esModule",{value:!0});lv.OTEL_GRAPHQL_DATA_SYMBOL=lv.OTEL_PATCHED_SYMBOL=void 0;lv.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");lv.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var ZDe=F(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.OPERATION_NOT_SUPPORTED=void 0;var MAn=N4();O4.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var d1e=F(Ea=>{"use strict";A();Object.defineProperty(Ea,"__esModule",{value:!0});Ea.wrapFieldResolver=Ea.wrapFields=Ea.getSourceFromLocation=Ea.getOperation=Ea.endSpan=Ea.addSpanSource=Ea.addInputVariableAttributes=Ea.isPromise=void 0;var dv=(Ge(),ke(Ze)),U_=lK(),oy=dK(),yg=N4(),WDe=Object.values(U_.AllowedOperationTypes),FEt=e=>typeof e?.then=="function";Ea.isPromise=FEt;var GEt=e=>typeof e=="object"&&e!==null;function pK(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{pK(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{pK(e,`${t}.${r}`,o)}):e.setAttribute(`${oy.AttributeNames.VARIABLES}${String(t)}`,n)}function jEt(e,t){Object.entries(t).forEach(([n,r])=>{pK(e,n,r)})}Ea.addInputVariableAttributes=jEt;function n1e(e,t,n,r,o){let i=s1e(t,n,r,o);e.setAttribute(oy.AttributeNames.SOURCE,i)}Ea.addSpanSource=n1e;function zEt(e,t,n,r,o){let i=r1e(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?i1e(n):o1e(n,o);return i={span:HEt(e,t,n,r,o,c)},qEt(n,o,i),{field:i,spanAdded:!0}}function HEt(e,t,n,r,o,i){let a={[oy.AttributeNames.FIELD_NAME]:r.fieldName,[oy.AttributeNames.FIELD_PATH]:o.join("."),[oy.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[oy.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${U_.SpanNames.RESOLVE} ${a[oy.AttributeNames.FIELD_PATH]}`,{attributes:a},i?dv.trace.setSpan(dv.context.active(),i):void 0),d=n[yg.OTEL_GRAPHQL_DATA_SYMBOL].source,m=r.fieldNodes.find(h=>h.kind==="Field");return m&&n1e(c,d.loc,t().allowValues,m.loc?.start,m.loc?.end),c}function $Et(e,t){t&&e.recordException(t),e.end()}Ea.endSpan=$Et;function VEt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>WDe.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>WDe.indexOf(n?.operation)!==-1)}Ea.getOperation=VEt;function qEt(e,t,n){return e[yg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function r1e(e,t){return e[yg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function o1e(e,t){for(let n=t.length-1;n>0;n--){let r=r1e(e,t.slice(0,n));if(r)return r.span}return i1e(e)}function i1e(e){return e[yg.OTEL_GRAPHQL_DATA_SYMBOL].span}function YEt(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 KEt(e){return a1e(`
37
37
  `,e)}function XDe(e){return a1e(" ",e)}function a1e(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var JEt=[U_.TokenKind.FLOAT,U_.TokenKind.STRING,U_.TokenKind.INT,U_.TokenKind.BLOCK_STRING];function s1e(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,a=typeof r=="number"?r:e.end,c=e.startToken.next,d=1;for(;c;){if(c.start<i){c=c.next,d=c?.line;continue}if(c.end>a){c=c.next,d=c?.line;continue}let m=c.value||c.kind,h="";!t&&JEt.indexOf(c.kind)>=0&&(m="*"),c.kind===U_.TokenKind.STRING&&(m=`"${m}"`),c.kind===U_.TokenKind.EOF&&(m=""),c.line>d?(o+=KEt(c.line-d),d=c.line,h=XDe(c.column-1)):c.line===c.prev?.line&&(h=XDe(c.start-(c.prev?.end||0))),o+=h+m,c&&(c=c.next)}}return o}Ea.getSourceFromLocation=s1e;function u1e(e,t,n){if(!e||e[yg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[yg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=l1e(t,n,i.resolve)),i.type)){let a=c1e(i.type);for(let c of a)u1e(c,t,n)}})}Ea.wrapFields=u1e;function c1e(e){return"ofType"in e?c1e(e.ofType):ZEt(e)?e.getTypes():WEt(e)?[e]:[]}function ZEt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function WEt(e){return"getFields"in e&&typeof e.getFields=="function"}var e1e=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:dv.SpanStatusCode.ERROR,message:t.message}),e.end())},t1e=(e,t)=>{t&&e.end()};function l1e(e,t,n,r=!1){if(o[yg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let m=t();if(m.ignoreTrivialResolveSpans&&r&&(GEt(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[yg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=YEt(m.mergeItems,d&&d.path),S=h.filter(v=>typeof v=="string").length,y,C=!1;if(m.depth>=0&&m.depth<S)y=o1e(c,h);else{let{field:v,spanAdded:x}=zEt(e,t,c,d,h);y=v.span,C=x}return dv.context.with(dv.trace.setSpan(dv.context.active(),y),()=>{try{let v=n.call(this,i,a,c,d);return(0,Ea.isPromise)(v)?v.then(x=>(t1e(y,C),x),x=>{throw e1e(y,x,C),x}):(t1e(y,C),v)}catch(v){throw e1e(y,v,C),v}})}return o[yg.OTEL_PATCHED_SYMBOL]=!0,o}Ea.wrapFieldResolver=l1e});var p1e=F(pv=>{"use strict";A();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-graphql"});var m1e=F(k4=>{"use strict";A();Object.defineProperty(k4,"__esModule",{value:!0});k4.GraphQLInstrumentation=void 0;var Tg=(Ge(),ke(Ze)),Pd=tn(),PN=lK(),w4=dK(),fK=N4(),XEt=ZDe(),Xs=d1e(),f1e=p1e(),A1e={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},M4=[">=14.0.0 <17"],AK=class extends Pd.InstrumentationBase{constructor(t={}){super(f1e.PACKAGE_NAME,f1e.PACKAGE_VERSION,{...A1e,...t})}setConfig(t={}){super.setConfig({...A1e,...t})}init(){let t=new Pd.InstrumentationNodeModuleDefinition("graphql",M4);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new Pd.InstrumentationNodeModuleFile("graphql/execution/execute.js",M4,t=>((0,Pd.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 Pd.InstrumentationNodeModuleFile("graphql/language/parser.js",M4,t=>((0,Pd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new Pd.InstrumentationNodeModuleFile("graphql/validation/validate.js",M4,t=>((0,Pd.isWrapped)(t.validate)&&this._unwrap(t,"validate"),this._wrap(t,"validate",this._patchValidate()),t),t=>{t&&this._unwrap(t,"validate")})}_patchExecute(t){let n=this;return function(o){return function(){let a;if(arguments.length>=2){let m=arguments;a=n._wrapExecuteArgs(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],t)}else{let m=arguments[0];a=n._wrapExecuteArgs(m.schema,m.document,m.rootValue,m.contextValue,m.variableValues,m.operationName,m.fieldResolver,m.typeResolver,t)}let c=(0,Xs.getOperation)(a.document,a.operationName),d=n._createExecuteSpan(c,a);return a.contextValue[fK.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[fK.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:d,fields:{}},Tg.context.with(Tg.trace.setSpan(Tg.context.active(),d),()=>(0,Pd.safeExecuteInTheMiddle)(()=>o.apply(this,[a]),(m,h)=>{n._handleExecutionResult(d,m,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,Xs.endSpan)(t,n);return}if((0,Xs.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,Xs.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,Xs.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,Xs.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,Pd.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,Xs.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,a){return t._parse(this,r,i,a)}}}_patchValidate(){let t=this;return function(r){return function(i,a,c,d,m){return t._validate(this,r,i,a,c,m,d)}}}_parse(t,n,r,o){let i=this.getConfig(),a=this.tracer.startSpan(PN.SpanNames.PARSE);return Tg.context.with(Tg.trace.setSpan(Tg.context.active(),a),()=>(0,Pd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,d)=>{d&&((0,Xs.getOperation)(d)?d.loc&&(0,Xs.addSpanSource)(a,d.loc,i.allowValues):a.updateName(PN.SpanNames.SCHEMA_PARSE)),(0,Xs.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan(PN.SpanNames.VALIDATE,{});return Tg.context.with(Tg.trace.setSpan(Tg.context.active(),d),()=>(0,Pd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(m,h)=>{o.loc||d.updateName(PN.SpanNames.SCHEMA_VALIDATE),h&&h.length&&d.recordException({name:w4.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,Xs.endSpan)(d,m)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(PN.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(w4.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(w4.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=XEt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(w4.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,Xs.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,Xs.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,a,c,d,m){if(o||(o={}),o[fK.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d};let h=c==null,S=c??m;return c=(0,Xs.wrapFieldResolver)(this.tracer,()=>this.getConfig(),S,h),t&&((0,Xs.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,Xs.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=AK});var g1e=F(P4=>{"use strict";A();Object.defineProperty(P4,"__esModule",{value:!0});P4.GraphQLInstrumentation=void 0;var e0t=m1e();Object.defineProperty(P4,"GraphQLInstrumentation",{enumerable:!0,get:function(){return e0t.GraphQLInstrumentation}})});function y1e(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function n0t(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 h1e,_1e,E1e,t0t,S1e,T1e=O(()=>{A();Ge();h1e=ie(g1e(),1);lt();fr();Jb();_1e="Graphql",E1e=at(_1e,h1e.GraphQLInstrumentation,e=>{let t=y1e(e);return{...t,responseHook(n,r){Ur(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Nt(n).status&&n.setStatus({code:ai.ERROR});let i=Nt(n).data,a=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&a){let d=si(n),h=Nt(d).data[Yb]||[],S=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(S),d.setAttribute(Yb,h)):typeof h=="string"?d.setAttribute(Yb,[h,S]):d.setAttribute(Yb,S),Nt(d).data["original-description"]||d.setAttribute("original-description",Nt(d).description),d.updateName(`${Nt(d).data["original-description"]} (${n0t(h)})`)}}}}),t0t=(e={})=>({name:_1e,setupOnce(){E1e(y1e(e))}}),S1e=t0t});var I1e=F(U4=>{"use strict";A();Object.defineProperty(U4,"__esModule",{value:!0});U4.EVENT_LISTENERS_SET=void 0;U4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var C1e=F(L4=>{"use strict";A();Object.defineProperty(L4,"__esModule",{value:!0});L4.bufferTextMapGetter=void 0;L4.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 b1e=F(er=>{"use strict";A();Object.defineProperty(er,"__esModule",{value:!0});er.METRIC_MESSAGING_PROCESS_DURATION=er.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=er.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=er.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=er.MESSAGING_SYSTEM_VALUE_KAFKA=er.MESSAGING_OPERATION_TYPE_VALUE_SEND=er.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=er.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=er.ATTR_MESSAGING_SYSTEM=er.ATTR_MESSAGING_OPERATION_TYPE=er.ATTR_MESSAGING_OPERATION_NAME=er.ATTR_MESSAGING_KAFKA_OFFSET=er.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=er.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=er.ATTR_MESSAGING_DESTINATION_PARTITION_ID=er.ATTR_MESSAGING_DESTINATION_NAME=er.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;er.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";er.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";er.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";er.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";er.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";er.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";er.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";er.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";er.ATTR_MESSAGING_SYSTEM="messaging.system";er.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";er.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";er.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";er.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";er.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";er.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";er.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";er.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var v1e=F(fv=>{"use strict";A();Object.defineProperty(fv,"__esModule",{value:!0});fv.PACKAGE_NAME=fv.PACKAGE_VERSION=void 0;fv.PACKAGE_VERSION="0.23.0";fv.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var O1e=F(F4=>{"use strict";A();Object.defineProperty(F4,"__esModule",{value:!0});F4.KafkaJsInstrumentation=void 0;var Lr=(Ge(),ke(Ze)),Ud=tn(),Av=(Kn(),ke(Pr)),R1e=I1e(),x1e=C1e(),At=b1e(),D1e=v1e();function Q4(e,t,n){return r=>{e.add(t,{...n,...r?{[Av.ATTR_ERROR_TYPE]:r}:{}})}}function B1e(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[Av.ATTR_ERROR_TYPE]:r}:{}})}}var N1e=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],mK=class extends Ud.InstrumentationBase{constructor(t={}){super(D1e.PACKAGE_NAME,D1e.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(At.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:N1e}}),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:N1e}})}init(){let t=r=>{(0,Ud.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,Ud.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new Ud.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,Ud.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[R1e.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[R1e.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}`,[Av.ATTR_SERVER_ADDRESS]:n,[Av.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Ud.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,Ud.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,Ud.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,Ud.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,Ud.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=Lr.propagation.extract(Lr.ROOT_CONTEXT,i.message.headers,x1e.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=[B1e(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)}),Q4(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)})],m=Lr.context.with(Lr.trace.setSpan(a,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],d,m)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],a=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:Lr.ROOT_CONTEXT,attributes:{[At.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Lr.context.with(Lr.trace.setSpan(Lr.context.active(),a),()=>{let c=Date.now(),d=[],m=[Q4(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=Lr.propagation.extract(Lr.ROOT_CONTEXT,S.headers,x1e.bufferTextMapGetter),C=Lr.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)}})),m.push(B1e(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,m,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),a=n.apply(this,o);return a.then(c=>{let d=c.send;c.send=function(...C){return Lr.context.with(Lr.trace.setSpan(Lr.context.active(),i),()=>t._getSendPatch()(d).apply(this,C).catch(x=>{throw i.setStatus({code:Lr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let m=c.sendBatch;c.sendBatch=function(...C){return Lr.context.with(Lr.trace.setSpan(Lr.context.active(),i),()=>t._getSendBatchPatch()(m).apply(this,C).catch(x=>{throw i.setStatus({code:Lr.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:Lr.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:Lr.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(Q4(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 m=n.apply(this,o);return t._endSpansOnPromise(c,d,m)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],a=i.messages.map(m=>t._startProducerSpan(i.topic,m)),c=i.messages.map(m=>Q4(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,...m.partition!==void 0?{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(m.partition)}:{}})),d=n.apply(this,o);return t._endSpansOnPromise(a,c,d)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,a=Av.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(Av.ATTR_ERROR_TYPE,a),c.setStatus({code:Lr.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?Lr.SpanKind.CLIENT:Lr.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:m}=this.getConfig();return m&&n&&(0,Ud.safeExecuteInTheMiddle)(()=>m(d,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),d}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:Lr.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??{},Lr.propagation.inject(Lr.trace.setSpan(Lr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,Ud.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};F4.KafkaJsInstrumentation=mK});var w1e=F(G4=>{"use strict";A();Object.defineProperty(G4,"__esModule",{value:!0});G4.KafkaJsInstrumentation=void 0;var r0t=O1e();Object.defineProperty(G4,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return r0t.KafkaJsInstrumentation}})});var M1e,k1e,P1e,o0t,U1e,L1e=O(()=>{A();M1e=ie(w1e(),1);fr();k1e="Kafka",P1e=at(k1e,()=>new M1e.KafkaJsInstrumentation({consumerHook(e){Ur(e,"auto.kafkajs.otel.consumer")},producerHook(e){Ur(e,"auto.kafkajs.otel.producer")}})),o0t=()=>({name:k1e,setupOnce(){P1e()}}),U1e=o0t});var Q1e=F(mv=>{"use strict";A();Object.defineProperty(mv,"__esModule",{value:!0});mv.PACKAGE_NAME=mv.PACKAGE_VERSION=void 0;mv.PACKAGE_VERSION="0.58.0";mv.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var z1e=F(j4=>{"use strict";A();Object.defineProperty(j4,"__esModule",{value:!0});j4.LruMemoizerInstrumentation=void 0;var F1e=(Ge(),ke(Ze)),G1e=tn(),j1e=Q1e(),gK=class extends G1e.InstrumentationBase{constructor(t={}){super(j1e.PACKAGE_NAME,j1e.PACKAGE_VERSION,t)}init(){return[new G1e.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"?F1e.context.bind(F1e.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};j4.LruMemoizerInstrumentation=gK});var H1e=F(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.LruMemoizerInstrumentation=void 0;var i0t=z1e();Object.defineProperty(z4,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return i0t.LruMemoizerInstrumentation}})});var $1e,V1e,q1e,a0t,Y1e,K1e=O(()=>{A();$1e=ie(H1e(),1);fr();V1e="LruMemoizer",q1e=at(V1e,()=>new $1e.LruMemoizerInstrumentation),a0t=()=>({name:V1e,setupOnce(){q1e()}}),Y1e=a0t});var J1e=F(Do=>{"use strict";A();Object.defineProperty(Do,"__esModule",{value:!0});Do.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Do.DB_SYSTEM_VALUE_MONGODB=Do.DB_SYSTEM_NAME_VALUE_MONGODB=Do.ATTR_NET_PEER_PORT=Do.ATTR_NET_PEER_NAME=Do.ATTR_DB_SYSTEM=Do.ATTR_DB_STATEMENT=Do.ATTR_DB_OPERATION=Do.ATTR_DB_NAME=Do.ATTR_DB_MONGODB_COLLECTION=Do.ATTR_DB_CONNECTION_STRING=void 0;Do.ATTR_DB_CONNECTION_STRING="db.connection_string";Do.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Do.ATTR_DB_NAME="db.name";Do.ATTR_DB_OPERATION="db.operation";Do.ATTR_DB_STATEMENT="db.statement";Do.ATTR_DB_SYSTEM="db.system";Do.ATTR_NET_PEER_NAME="net.peer.name";Do.ATTR_NET_PEER_PORT="net.peer.port";Do.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";Do.DB_SYSTEM_VALUE_MONGODB="mongodb";Do.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var Z1e=F(UN=>{"use strict";A();Object.defineProperty(UN,"__esModule",{value:!0});UN.MongodbCommandType=void 0;var s0t;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(s0t=UN.MongodbCommandType||(UN.MongodbCommandType={}))});var W1e=F(gv=>{"use strict";A();Object.defineProperty(gv,"__esModule",{value:!0});gv.PACKAGE_NAME=gv.PACKAGE_VERSION=void 0;gv.PACKAGE_VERSION="0.67.0";gv.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var tBe=F(H4=>{"use strict";A();Object.defineProperty(H4,"__esModule",{value:!0});H4.MongoDBInstrumentation=void 0;var qo=(Ge(),ke(Ze)),tr=tn(),Ig=(Kn(),ke(Pr)),Nl=J1e(),iy=Z1e(),X1e=W1e(),eBe={requireParentSpan:!0},hK=class e extends tr.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(X1e.PACKAGE_NAME,X1e.PACKAGE_VERSION,{...eBe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,tr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,tr.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...eBe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(Nl.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:a,v4UnpatchConnection:c}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:d,v4UnpatchConnectionPool:m}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:S}=this._getV4SessionsPatches();return[new tr.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new tr.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new tr.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new tr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new tr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new tr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],d,m),new tr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new tr.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,S)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,tr.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,tr.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,tr.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,tr.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,tr.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,tr.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,tr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,tr.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,tr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,tr.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,tr.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,tr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),this._wrap(t,"connect",this._getV4ConnectCommand()),t),v4UnpatchConnect:t=>{t!==void 0&&this._unwrap(t,"connect")}}}_getV4ConnectionPoolCheckOut(){return t=>function(r){let o=qo.context.bind(qo.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let c=n.call(this,o);return c&&typeof c.then=="function"&&c.then(()=>t.setPoolName(o),()=>{}),c}let a=function(c,d){if(c||!d){i(c,d);return}t.setPoolName(o),i(c,d)};return n.call(this,o,a)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,tr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,tr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,a,c,d,m){let h=qo.trace.getSpan(qo.context.active()),S=n._checkSkipInstrumentation(h),y=typeof d=="function"?d:m;if(S||typeof y!="function"||typeof c!="object")return typeof d=="function"?r.call(this,i,a,c,d):r.call(this,i,a,c,d,m);let C=n._getV3SpanAttributes(a,i,c[0],t),v=n._spanNameFromAttrs(C),x=n.tracer.startSpan(v,{kind:qo.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 m=qo.trace.getSpan(qo.context.active()),h=t._checkSkipInstrumentation(m),S=typeof c=="function"?c:d;if(h||typeof S!="function"||typeof a!="object")return typeof c=="function"?n.call(this,o,i,a,c):n.call(this,o,i,a,c,d);let y=e._getCommandType(a),C=y===iy.MongodbCommandType.UNKNOWN?void 0:y,v=t._getV3SpanAttributes(i,o,a,C),x=t._spanNameFromAttrs(v),N=t.tracer.startSpan(x,{kind:qo.SpanKind.CLIENT,attributes:v}),M=t._patchEnd(N,S);return typeof c=="function"?n.call(this,o,i,a,M):n.call(this,o,i,a,c,M)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,a,c){let d=qo.trace.getSpan(qo.context.active()),m=t._checkSkipInstrumentation(d),h=c,S=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,a,c);let y;if(!m){let v=t._getV4SpanAttributes(this,o,i,S),x=t._spanNameFromAttrs(v);y=t.tracer.startSpan(x,{kind:qo.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=qo.trace.getSpan(qo.context.active()),d=t._checkSkipInstrumentation(c),m=Object.keys(a)[0],h=()=>{};if(typeof a!="object"||a.ismaster||a.hello)return n.apply(this,o);let S;if(!d){let v=t._getV4SpanAttributes(this,i,a,m),x=t._spanNameFromAttrs(v);S=t.tracer.startSpan(x,{kind:qo.SpanKind.CLIENT,attributes:v})}let y=t._patchEnd(S,h,this.id,m),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,m){let h=qo.trace.getSpan(qo.context.active()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:m;if(S||typeof y!="function"||typeof a!="object")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,m);let C=t._getV3SpanAttributes(i,o,a,"find"),v=t._spanNameFromAttrs(C),x=t.tracer.startSpan(v,{kind:qo.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,m){let h=qo.trace.getSpan(qo.context.active()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:m;if(S||typeof y!="function")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,m);let C=t._getV3SpanAttributes(i,o,a.cmd,"getMore"),v=t._spanNameFromAttrs(C),x=t.tracer.startSpan(v,{kind:qo.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?iy.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?iy.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?iy.MongodbCommandType.IS_MASTER:t.count!==void 0?iy.MongodbCommandType.COUNT:t.aggregate!==void 0?iy.MongodbCommandType.AGGREGATE:iy.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,a;if(t){let d=typeof t.address=="string"?t.address.split(":"):"";d.length===2&&(i=d[0],a=d[1])}let c;return r?.documents&&r.documents[0]?c=r.documents[0]:r?.cursors?c=r.cursors:c=r,this._getSpanAttributes(n.db,n.collection,i,a,c,o)}_getV3SpanAttributes(t,n,r,o){let i,a;if(n&&n.s&&(i=n.s.options?.host??n.s.host,a=(n.s.options?.port??n.s.port)?.toString(),i==null||a==null)){let h=n.description?.address;if(h){let S=h.split(":");i=S[0],a=S[1]}}let[c,d]=t.toString().split("."),m=r?.query??r?.q??r;return this._getSpanAttributes(c,d,i,a,m,o)}_getSpanAttributes(t,n,r,o,i,a){let c={};if(this._dbSemconvStability&tr.SemconvStability.OLD&&(c[Nl.ATTR_DB_SYSTEM]=Nl.DB_SYSTEM_VALUE_MONGODB,c[Nl.ATTR_DB_NAME]=t,c[Nl.ATTR_DB_MONGODB_COLLECTION]=n,c[Nl.ATTR_DB_OPERATION]=a,c[Nl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&tr.SemconvStability.STABLE&&(c[Ig.ATTR_DB_SYSTEM_NAME]=Nl.DB_SYSTEM_NAME_VALUE_MONGODB,c[Ig.ATTR_DB_NAMESPACE]=t,c[Ig.ATTR_DB_OPERATION_NAME]=a,c[Ig.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&tr.SemconvStability.OLD&&(c[Nl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&tr.SemconvStability.STABLE&&(c[Ig.ATTR_SERVER_ADDRESS]=r);let d=parseInt(o,10);isNaN(d)||(this._netSemconvStability&tr.SemconvStability.OLD&&(c[Nl.ATTR_NET_PEER_PORT]=d),this._netSemconvStability&tr.SemconvStability.STABLE&&(c[Ig.ATTR_SERVER_PORT]=d))}if(i){let{dbStatementSerializer:d}=this.getConfig(),m=typeof d=="function"?d:this._defaultDbStatementSerializer.bind(this);(0,tr.safeExecuteInTheMiddle)(()=>{let h=m(i);this._dbSemconvStability&tr.SemconvStability.OLD&&(c[Nl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&tr.SemconvStability.STABLE&&(c[Ig.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&tr.SemconvStability.STABLE?n=[t[Ig.ATTR_DB_OPERATION_NAME],t[Ig.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||Nl.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[Nl.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,tr.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=qo.context.active(),a=this,c=!1;return function(...m){if(!c){c=!0;let h=m[0];if(t){if(h instanceof Error)t.setStatus({code:qo.SpanStatusCode.ERROR,message:h.message});else{let S=m[1];a._handleExecutionResult(t,S)}t.end()}o==="endSessions"&&a._connCountAdd(-1,a._poolName,"idle")}return qo.context.with(i,()=>n.apply(this,m))}}setPoolName(t){let n=t.hostAddress?.host,r=t.hostAddress?.port,o=t.dbName,i=`mongodb://${n}:${r}/${o}`;this._poolName=i}_checkSkipInstrumentation(t){return this.getConfig().requireParentSpan===!0&&t===void 0}};H4.MongoDBInstrumentation=hK});var nBe=F(LN=>{"use strict";A();Object.defineProperty(LN,"__esModule",{value:!0});LN.MongodbCommandType=void 0;var u0t;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(u0t=LN.MongodbCommandType||(LN.MongodbCommandType={}))});var rBe=F(hv=>{"use strict";A();Object.defineProperty(hv,"__esModule",{value:!0});hv.MongodbCommandType=hv.MongoDBInstrumentation=void 0;var c0t=tBe();Object.defineProperty(hv,"MongoDBInstrumentation",{enumerable:!0,get:function(){return c0t.MongoDBInstrumentation}});var l0t=nBe();Object.defineProperty(hv,"MongodbCommandType",{enumerable:!0,get:function(){return l0t.MongodbCommandType}})});function d0t(e){let t=_K(e);return JSON.stringify(t)}function _K(e){if(Array.isArray(e))return e.map(t=>_K(t));if(p0t(e)){let t={};return Object.entries(e).map(([n,r])=>[n,_K(r)]).reduce((n,r)=>(A0t(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function p0t(e){return typeof e=="object"&&e!==null&&!f0t(e)}function f0t(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function A0t(e){return Array.isArray(e)}var oBe,iBe,aBe,m0t,sBe,uBe=O(()=>{A();oBe=ie(rBe(),1);fr();iBe="Mongo",aBe=at(iBe,()=>new oBe.MongoDBInstrumentation({dbStatementSerializer:d0t,responseHook(e){Ur(e,"auto.db.otel.mongo")}}));m0t=()=>({name:iBe,setupOnce(){aBe()}}),sBe=m0t});var EK=F(Ji=>{"use strict";A();Object.defineProperty(Ji,"__esModule",{value:!0});Ji.DB_SYSTEM_NAME_VALUE_MONGODB=Ji.ATTR_NET_PEER_PORT=Ji.ATTR_NET_PEER_NAME=Ji.ATTR_DB_USER=Ji.ATTR_DB_SYSTEM=Ji.ATTR_DB_STATEMENT=Ji.ATTR_DB_OPERATION=Ji.ATTR_DB_NAME=Ji.ATTR_DB_MONGODB_COLLECTION=void 0;Ji.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Ji.ATTR_DB_NAME="db.name";Ji.ATTR_DB_OPERATION="db.operation";Ji.ATTR_DB_STATEMENT="db.statement";Ji.ATTR_DB_SYSTEM="db.system";Ji.ATTR_DB_USER="db.user";Ji.ATTR_NET_PEER_NAME="net.peer.name";Ji.ATTR_NET_PEER_PORT="net.peer.port";Ji.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var dBe=F(L_=>{"use strict";A();Object.defineProperty(L_,"__esModule",{value:!0});L_.handleCallbackResponse=L_.handlePromiseResponse=L_.getAttributesFromCollection=void 0;var cBe=(Ge(),ke(Ze)),FN=tn(),QN=EK(),$4=(Kn(),ke(Pr));function g0t(e,t,n){let r={};return t&FN.SemconvStability.OLD&&(r[QN.ATTR_DB_MONGODB_COLLECTION]=e.name,r[QN.ATTR_DB_NAME]=e.conn.name,r[QN.ATTR_DB_USER]=e.conn.user),t&FN.SemconvStability.STABLE&&(r[$4.ATTR_DB_COLLECTION_NAME]=e.name,r[$4.ATTR_DB_NAMESPACE]=e.conn.name),n&FN.SemconvStability.OLD&&(r[QN.ATTR_NET_PEER_NAME]=e.conn.host,r[QN.ATTR_NET_PEER_PORT]=e.conn.port),n&FN.SemconvStability.STABLE&&(r[$4.ATTR_SERVER_ADDRESS]=e.conn.host,r[$4.ATTR_SERVER_PORT]=e.conn.port),r}L_.getAttributesFromCollection=g0t;function lBe(e,t={}){e.recordException(t),e.setStatus({code:cBe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function SK(e,t,n,r=void 0){n&&(0,FN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&cBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function h0t(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(SK(t,o,n,r),o)).catch(o=>{throw lBe(t,o),o}).finally(()=>t.end()):(SK(t,e,n,r),t.end(),e)}L_.handlePromiseResponse=h0t;function _0t(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,m)=>(d?lBe(r,d):SK(r,m,i,a),r.end(),e(d,m)),t.apply(n,o)}L_.handleCallbackResponse=_0t});var pBe=F(_v=>{"use strict";A();Object.defineProperty(_v,"__esModule",{value:!0});_v.PACKAGE_NAME=_v.PACKAGE_VERSION=void 0;_v.PACKAGE_VERSION="0.60.0";_v.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var hBe=F(Nc=>{"use strict";A();Object.defineProperty(Nc,"__esModule",{value:!0});Nc.MongooseInstrumentation=Nc._ALREADY_INSTRUMENTED=Nc._STORED_PARENT_SPAN=void 0;var Sa=(Ge(),ke(Ze)),E0t=Tr(),yK=dBe(),vs=tn(),fBe=pBe(),Q_=EK(),ay=(Kn(),ke(Pr)),V4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],S0t=["remove","count","findOneAndRemove",...V4],y0t=["count","findOneAndRemove",...V4],T0t=[...V4];function ABe(e){return e?e.startsWith("6.")||e.startsWith("5.")?S0t:e.startsWith("7.")?y0t:T0t:V4}function mBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function gBe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Nc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Nc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var TK=class extends vs.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(fBe.PACKAGE_NAME,fBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vs.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,vs.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new vs.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,mBe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),gBe(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)),ABe(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=ABe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,mBe(n)&&this._unwrap(r.Model.prototype,"remove"),gBe(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&&Sa.trace.getSpan(Sa.context.active())===void 0)return r.apply(this,arguments);let a=this[Nc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&vs.SemconvStability.OLD&&(c[Q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&vs.SemconvStability.STABLE&&(c[ay.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Nc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return r.apply(this,arguments);let a=this[Nc._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&vs.SemconvStability.OLD&&(c[Q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&vs.SemconvStability.STABLE&&(c[ay.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let m={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,d);r._dbSemconvStability&vs.SemconvStability.OLD&&(m[Q_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&vs.SemconvStability.STABLE&&(m[ay.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(S,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,S=c;typeof a=="function"?(m=a,h=void 0,S=void 0):typeof c=="function"&&(m=c,S=void 0);let y={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&vs.SemconvStability.OLD&&(y[Q_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&vs.SemconvStability.STABLE&&(y[ay.ATTR_DB_QUERY_TEXT]=N)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),x=r._handleResponse(v,o,this,arguments,m,n);return x&&typeof x=="object"&&(x[Nc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let m={};switch(t){case"insertMany":m.documents=a;break;case"bulkWrite":m.operations=a;break;default:m.document=a;break}c!==void 0&&(m.options=c);let h={},{dbStatementSerializer:S}=r.getConfig();if(S){let C=S(t,m);r._dbSemconvStability&vs.SemconvStability.OLD&&(h[Q_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&vs.SemconvStability.STABLE&&(h[ay.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=Sa.trace.getSpan(Sa.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Nc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Nc._STORED_PARENT_SPAN]=Sa.trace.getSpan(Sa.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,yK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&vs.SemconvStability.OLD&&(a[Q_.ATTR_DB_OPERATION]=r,a[Q_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&vs.SemconvStability.STABLE&&(a[ay.ATTR_DB_OPERATION_NAME]=r,a[ay.ATTR_DB_SYSTEM_NAME]=Q_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&vs.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Sa.SpanKind.CLIENT,attributes:a},i?Sa.trace.setSpan(Sa.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,yK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,yK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Sa.context.with((0,E0t.suppressTracing)(Sa.context.active()),t):t()}};Nc.MongooseInstrumentation=TK});var _Be=F(q4=>{"use strict";A();Object.defineProperty(q4,"__esModule",{value:!0});q4.MongooseInstrumentation=void 0;var I0t=hBe();Object.defineProperty(q4,"MongooseInstrumentation",{enumerable:!0,get:function(){return I0t.MongooseInstrumentation}})});var EBe,SBe,yBe,C0t,TBe,IBe=O(()=>{A();EBe=ie(_Be(),1);fr();SBe="Mongoose",yBe=at(SBe,()=>new EBe.MongooseInstrumentation({responseHook(e){Ur(e,"auto.db.otel.mongoose")}})),C0t=()=>({name:SBe,setupOnce(){yBe()}}),TBe=C0t});var CBe=F(Zi=>{"use strict";A();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Zi.DB_SYSTEM_VALUE_MYSQL=Zi.ATTR_NET_PEER_PORT=Zi.ATTR_NET_PEER_NAME=Zi.ATTR_DB_USER=Zi.ATTR_DB_SYSTEM=Zi.ATTR_DB_STATEMENT=Zi.ATTR_DB_NAME=Zi.ATTR_DB_CONNECTION_STRING=void 0;Zi.ATTR_DB_CONNECTION_STRING="db.connection_string";Zi.ATTR_DB_NAME="db.name";Zi.ATTR_DB_STATEMENT="db.statement";Zi.ATTR_DB_SYSTEM="db.system";Zi.ATTR_DB_USER="db.user";Zi.ATTR_NET_PEER_NAME="net.peer.name";Zi.ATTR_NET_PEER_PORT="net.peer.port";Zi.DB_SYSTEM_VALUE_MYSQL="mysql";Zi.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var bBe=F(GN=>{"use strict";A();Object.defineProperty(GN,"__esModule",{value:!0});GN.AttributeNames=void 0;var b0t;(function(e){e.MYSQL_VALUES="db.mysql.values"})(b0t=GN.AttributeNames||(GN.AttributeNames={}))});var vBe=F(eu=>{"use strict";A();Object.defineProperty(eu,"__esModule",{value:!0});eu.getPoolNameOld=eu.arrayStringifyHelper=eu.getSpanName=eu.getDbValues=eu.getDbQueryText=eu.getJDBCString=eu.getConfig=void 0;function v0t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}eu.getConfig=v0t;function R0t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}eu.getJDBCString=R0t;function x0t(e){return typeof e=="string"?e:e.sql}eu.getDbQueryText=x0t;function D0t(e,t){return IK(typeof e=="string"?t:t||e.values)}eu.getDbValues=D0t;function B0t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}eu.getSpanName=B0t;function IK(e){return e?`[${e.toString()}]`:""}eu.arrayStringifyHelper=IK;function N0t(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()}eu.getPoolNameOld=N0t});var RBe=F(Ev=>{"use strict";A();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.PACKAGE_NAME=Ev.PACKAGE_VERSION=void 0;Ev.PACKAGE_VERSION="0.60.0";Ev.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var DBe=F(Y4=>{"use strict";A();Object.defineProperty(Y4,"__esModule",{value:!0});Y4.MySQLInstrumentation=void 0;var Oc=(Ge(),ke(Ze)),Ld=tn(),Sv=(Kn(),ke(Pr)),Cg=CBe(),O0t=bBe(),sy=vBe(),xBe=RBe(),CK=class extends Ld.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(xBe.PACKAGE_NAME,xBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ld.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ld.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Cg.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 Ld.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Ld.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Ld.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Ld.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,m=(0,sy.getPoolNameOld)(t);r._connCountAdd(-d,m,"used"),r._connCountAdd(-c,m,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),m=c[d].pool;r._setPoolCallbacks(m,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Oc.context.active();return function(o,i){i&&((0,Ld.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Oc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:m,database:h,user:S}=(0,sy.getConfig)(t.config),y=parseInt(m,10),C=(0,sy.getDbQueryText)(o);r._dbSemconvStability&Ld.SemconvStability.OLD&&(c[Cg.ATTR_DB_SYSTEM]=Cg.DB_SYSTEM_VALUE_MYSQL,c[Cg.ATTR_DB_CONNECTION_STRING]=(0,sy.getJDBCString)(d,m,h),c[Cg.ATTR_DB_NAME]=h,c[Cg.ATTR_DB_USER]=S,c[Cg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ld.SemconvStability.STABLE&&(c[Sv.ATTR_DB_SYSTEM_NAME]=Sv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Sv.ATTR_DB_NAMESPACE]=h,c[Sv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&Ld.SemconvStability.OLD&&(c[Cg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[Cg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&Ld.SemconvStability.STABLE&&(c[Sv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Sv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,sy.getSpanName)(o),{kind:Oc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let M;Array.isArray(i)?M=i:arguments[2]&&(M=[i]),v.setAttribute(O0t.AttributeNames.MYSQL_VALUES,(0,sy.getDbValues)(o,M))}let x=Array.from(arguments).findIndex(M=>typeof M=="function"),N=Oc.context.active();if(x===-1){let M=Oc.context.with(Oc.trace.setSpan(Oc.context.active(),v),()=>n.apply(t,arguments));return Oc.context.bind(N,M),M.on("error",Q=>v.setStatus({code:Oc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,N)),Oc.context.with(Oc.trace.setSpan(Oc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Oc.SpanStatusCode.ERROR,message:o.message}),t.end(),Oc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,sy.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")})}};Y4.MySQLInstrumentation=CK});var BBe=F(K4=>{"use strict";A();Object.defineProperty(K4,"__esModule",{value:!0});K4.MySQLInstrumentation=void 0;var w0t=DBe();Object.defineProperty(K4,"MySQLInstrumentation",{enumerable:!0,get:function(){return w0t.MySQLInstrumentation}})});var NBe,OBe,wBe,M0t,MBe,kBe=O(()=>{A();NBe=ie(BBe(),1);fr();OBe="Mysql",wBe=at(OBe,()=>new NBe.MySQLInstrumentation({})),M0t=()=>({name:OBe,setupOnce(){wBe()}}),MBe=M0t});var bK=F(Wa=>{"use strict";A();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.DB_SYSTEM_VALUE_MYSQL=Wa.ATTR_NET_PEER_PORT=Wa.ATTR_NET_PEER_NAME=Wa.ATTR_DB_USER=Wa.ATTR_DB_SYSTEM=Wa.ATTR_DB_STATEMENT=Wa.ATTR_DB_NAME=Wa.ATTR_DB_CONNECTION_STRING=void 0;Wa.ATTR_DB_CONNECTION_STRING="db.connection_string";Wa.ATTR_DB_NAME="db.name";Wa.ATTR_DB_STATEMENT="db.statement";Wa.ATTR_DB_SYSTEM="db.system";Wa.ATTR_DB_USER="db.user";Wa.ATTR_NET_PEER_NAME="net.peer.name";Wa.ATTR_NET_PEER_PORT="net.peer.port";Wa.DB_SYSTEM_VALUE_MYSQL="mysql"});var RK=F(J4=>{"use strict";A();Object.defineProperty(J4,"__esModule",{value:!0});J4.addSqlCommenterComment=void 0;var vK=(Ge(),ke(Ze)),k0t=Tr();function P0t(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function U0t(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function L0t(e,t){if(typeof t!="string"||t.length===0||P0t(t))return t;let n=new k0t.W3CTraceContextPropagator,r={};n.inject(vK.trace.setSpan(vK.ROOT_CONTEXT,e),r,vK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=U0t(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}J4.addSqlCommenterComment=L0t});var PBe=F(Qd=>{"use strict";A();Object.defineProperty(Qd,"__esModule",{value:!0});Qd.getConnectionPrototypeToInstrument=Qd.once=Qd.getSpanName=Qd.getQueryText=Qd.getConnectionAttributes=void 0;var jN=bK(),Z4=tn(),xK=(Kn(),ke(Pr));function Q0t(e,t,n){let{host:r,port:o,database:i,user:a}=F0t(e),c={};t&Z4.SemconvStability.OLD&&(c[jN.ATTR_DB_CONNECTION_STRING]=G0t(r,o,i),c[jN.ATTR_DB_NAME]=i,c[jN.ATTR_DB_USER]=a),t&Z4.SemconvStability.STABLE&&(c[xK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&Z4.SemconvStability.OLD&&(c[jN.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[jN.ATTR_NET_PEER_PORT]=d)),n&Z4.SemconvStability.STABLE&&(c[xK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[xK.ATTR_SERVER_PORT]=d)),c}Qd.getConnectionAttributes=Q0t;function F0t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function G0t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function j0t(e,t,n,r=!1,o=z0t){let[i,a]=typeof e=="string"?[e,n]:[e.sql,H0t(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"}}Qd.getQueryText=j0t;function z0t(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function H0t(e){return"values"in e}function $0t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Qd.getSpanName=$0t;var V0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Qd.once=V0t;function q0t(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Qd.getConnectionPrototypeToInstrument=q0t});var UBe=F(yv=>{"use strict";A();Object.defineProperty(yv,"__esModule",{value:!0});yv.PACKAGE_NAME=yv.PACKAGE_VERSION=void 0;yv.PACKAGE_VERSION="0.60.0";yv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var GBe=F(W4=>{"use strict";A();Object.defineProperty(W4,"__esModule",{value:!0});W4.MySQL2Instrumentation=void 0;var LBe=(Ge(),ke(Ze)),ef=tn(),DK=bK(),QBe=RK(),Tv=PBe(),FBe=UBe(),BK=(Kn(),ke(Pr)),NK=[">=1.4.2 <4"],OK=class extends ef.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(FBe.PACKAGE_NAME,FBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,ef.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,ef.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,ef.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,ef.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 ef.InstrumentationNodeModuleDefinition("mysql2",NK,i=>(n(i),i),()=>{},[new ef.InstrumentationNodeModuleFile("mysql2/promise.js",NK,i=>(n(i),i),()=>{}),new ef.InstrumentationNodeModuleFile("mysql2/lib/connection.js",NK,i=>{let a=(0,Tv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Tv.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:m,maskStatementHook:h,responseHook:S}=o.getConfig(),y=(0,Tv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Tv.getQueryText)(i,t,d,m,h);o._dbSemconvStability&ef.SemconvStability.OLD&&(y[DK.ATTR_DB_SYSTEM]=DK.DB_SYSTEM_VALUE_MYSQL,y[DK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&ef.SemconvStability.STABLE&&(y[BK.ATTR_DB_SYSTEM_NAME]=BK.DB_SYSTEM_NAME_VALUE_MYSQL,y[BK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,Tv.getSpanName)(i),{kind:LBe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,QBe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,QBe.addSqlCommenterComment)(v,i.sql)}));let x=(0,Tv.once)((N,M)=>{N?v.setStatus({code:LBe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,ef.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:M})},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",M=>{x(M)}).once("result",M=>{x(void 0,M)}),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)}}};W4.MySQL2Instrumentation=OK});var jBe=F(X4=>{"use strict";A();Object.defineProperty(X4,"__esModule",{value:!0});X4.MySQL2Instrumentation=void 0;var Y0t=GBe();Object.defineProperty(X4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return Y0t.MySQL2Instrumentation}})});var zBe,HBe,$Be,K0t,VBe,qBe=O(()=>{A();zBe=ie(jBe(),1);fr();HBe="Mysql2",$Be=at(HBe,()=>new zBe.MySQL2Instrumentation({responseHook(e){Ur(e,"auto.db.otel.mysql2")}})),K0t=()=>({name:HBe,setupOnce(){$Be()}}),VBe=K0t});var YBe=F(tu=>{"use strict";A();Object.defineProperty(tu,"__esModule",{value:!0});tu.DB_SYSTEM_VALUE_REDIS=tu.DB_SYSTEM_NAME_VALUE_REDIS=tu.ATTR_NET_PEER_PORT=tu.ATTR_NET_PEER_NAME=tu.ATTR_DB_SYSTEM=tu.ATTR_DB_STATEMENT=tu.ATTR_DB_CONNECTION_STRING=void 0;tu.ATTR_DB_CONNECTION_STRING="db.connection_string";tu.ATTR_DB_STATEMENT="db.statement";tu.ATTR_DB_SYSTEM="db.system";tu.ATTR_NET_PEER_NAME="net.peer.name";tu.ATTR_NET_PEER_PORT="net.peer.port";tu.DB_SYSTEM_NAME_VALUE_REDIS="redis";tu.DB_SYSTEM_VALUE_REDIS="redis"});var KBe=F(eF=>{"use strict";A();Object.defineProperty(eF,"__esModule",{value:!0});eF.endSpan=void 0;var J0t=(Ge(),ke(Ze)),Z0t=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:J0t.SpanStatusCode.ERROR,message:t.message})),e.end()};eF.endSpan=Z0t});var nF=F(tF=>{"use strict";A();Object.defineProperty(tF,"__esModule",{value:!0});tF.defaultDbStatementSerializer=void 0;var W0t=[{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}],X0t=(e,t)=>{if(Array.isArray(t)&&t.length){let n=W0t.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};tF.defaultDbStatementSerializer=X0t});var JBe=F(Iv=>{"use strict";A();Object.defineProperty(Iv,"__esModule",{value:!0});Iv.PACKAGE_NAME=Iv.PACKAGE_VERSION=void 0;Iv.PACKAGE_VERSION="0.62.0";Iv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var eNe=F(rF=>{"use strict";A();Object.defineProperty(rF,"__esModule",{value:!0});rF.IORedisInstrumentation=void 0;var F_=(Ge(),ke(Ze)),wc=tn(),G_=(Kn(),ke(Pr)),Mc=YBe(),ZBe=tn(),zN=KBe(),eSt=nF(),WBe=JBe(),XBe={requireParentSpan:!0},wK=class extends wc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(WBe.PACKAGE_NAME,WBe.PACKAGE_VERSION,{...XBe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,wc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,wc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...XBe,...t})}init(){return[new wc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,wc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,wc.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||eSt.defaultDbStatementSerializer,c=F_.trace.getSpan(F_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:m,port:h}=this.options,S=a(o.name,o.args);r._dbSemconvStability&wc.SemconvStability.OLD&&(d[Mc.ATTR_DB_SYSTEM]=Mc.DB_SYSTEM_VALUE_REDIS,d[Mc.ATTR_DB_STATEMENT]=S,d[Mc.ATTR_DB_CONNECTION_STRING]=`redis://${m}:${h}`),r._dbSemconvStability&wc.SemconvStability.STABLE&&(d[G_.ATTR_DB_SYSTEM_NAME]=Mc.DB_SYSTEM_NAME_VALUE_REDIS,d[G_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&wc.SemconvStability.OLD&&(d[Mc.ATTR_NET_PEER_NAME]=m,d[Mc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&wc.SemconvStability.STABLE&&(d[G_.ATTR_SERVER_ADDRESS]=m,d[G_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:F_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,ZBe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&F_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(M){(0,ZBe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,M),Q=>{Q&&F_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,zN.endSpan)(y,null),x(M)};let N=o.reject;return o.reject=function(M){(0,zN.endSpan)(y,M),N(M)},v}catch(v){throw(0,zN.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=F_.trace.getSpan(F_.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&wc.SemconvStability.OLD&&(o[Mc.ATTR_DB_SYSTEM]=Mc.DB_SYSTEM_VALUE_REDIS,o[Mc.ATTR_DB_STATEMENT]="connect",o[Mc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&wc.SemconvStability.STABLE&&(o[G_.ATTR_DB_SYSTEM_NAME]=Mc.DB_SYSTEM_NAME_VALUE_REDIS,o[G_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&wc.SemconvStability.OLD&&(o[Mc.ATTR_NET_PEER_NAME]=i,o[Mc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&wc.SemconvStability.STABLE&&(o[G_.ATTR_SERVER_ADDRESS]=i,o[G_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:F_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,zN.endSpan)(c,null),d}catch(d){throw(0,zN.endSpan)(c,d),d}}}};rF.IORedisInstrumentation=wK});var tNe=F(oF=>{"use strict";A();Object.defineProperty(oF,"__esModule",{value:!0});oF.IORedisInstrumentation=void 0;var tSt=eNe();Object.defineProperty(oF,"IORedisInstrumentation",{enumerable:!0,get:function(){return tSt.IORedisInstrumentation}})});var iF=F(Cv=>{"use strict";A();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-redis"});var nNe=F(j_=>{"use strict";A();Object.defineProperty(j_,"__esModule",{value:!0});j_.getTracedCreateStreamTrace=j_.getTracedCreateClient=j_.endSpan=void 0;var HN=(Ge(),ke(Ze)),nSt=(e,t)=>{t&&e.setStatus({code:HN.SpanStatusCode.ERROR,message:t.message}),e.end()};j_.endSpan=nSt;var rSt=e=>function(){let n=e.apply(this,arguments);return HN.context.bind(HN.context.active(),n)};j_.getTracedCreateClient=rSt;var oSt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){HN.context.bind(HN.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};j_.getTracedCreateStreamTrace=oSt});var aF=F(nu=>{"use strict";A();Object.defineProperty(nu,"__esModule",{value:!0});nu.DB_SYSTEM_VALUE_REDIS=nu.DB_SYSTEM_NAME_VALUE_REDIS=nu.ATTR_NET_PEER_PORT=nu.ATTR_NET_PEER_NAME=nu.ATTR_DB_SYSTEM=nu.ATTR_DB_STATEMENT=nu.ATTR_DB_CONNECTION_STRING=void 0;nu.ATTR_DB_CONNECTION_STRING="db.connection_string";nu.ATTR_DB_STATEMENT="db.statement";nu.ATTR_DB_SYSTEM="db.system";nu.ATTR_NET_PEER_NAME="net.peer.name";nu.ATTR_NET_PEER_PORT="net.peer.port";nu.DB_SYSTEM_NAME_VALUE_REDIS="redis";nu.DB_SYSTEM_VALUE_REDIS="redis"});var oNe=F(uF=>{"use strict";A();Object.defineProperty(uF,"__esModule",{value:!0});uF.RedisInstrumentationV2_V3=void 0;var Ol=tn(),sF=nNe(),rNe=iF(),$N=(Ge(),ke(Ze)),VN=(Kn(),ke(Pr)),uy=aF(),iSt=nF(),MK=class e extends Ol.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(rNe.PACKAGE_NAME,rNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ol.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ol.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ol.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ol.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,Ol.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ol.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=$N.trace.getSpan($N.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||iSt.defaultDbStatementSerializer,m={};t._semconvStability&Ol.SemconvStability.OLD&&Object.assign(m,{[uy.ATTR_DB_SYSTEM]:uy.DB_SYSTEM_VALUE_REDIS,[uy.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ol.SemconvStability.STABLE&&Object.assign(m,{[VN.ATTR_DB_SYSTEM_NAME]:uy.DB_SYSTEM_NAME_VALUE_REDIS,[VN.ATTR_DB_OPERATION_NAME]:i.command,[VN.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:$N.SpanKind.CLIENT,attributes:m});if(this.connection_options){let y={};t._semconvStability&Ol.SemconvStability.OLD&&Object.assign(y,{[uy.ATTR_NET_PEER_NAME]:this.connection_options.host,[uy.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ol.SemconvStability.STABLE&&Object.assign(y,{[VN.ATTR_SERVER_ADDRESS]:this.connection_options.host,[VN.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ol.SemconvStability.OLD&&h.setAttribute(uy.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=$N.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let N=a.responseHook;(0,Ol.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,x)},M=>{M&&t._diag.error("Error executing responseHook",M)},!0)}return(0,sF.endSpan)(h,v),$N.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,sF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,sF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,sF.getTracedCreateStreamTrace)(n)}}};uF.RedisInstrumentationV2_V3=MK});var aNe=F(cF=>{"use strict";A();Object.defineProperty(cF,"__esModule",{value:!0});cF.getClientAttributes=void 0;var kK=(Kn(),ke(Pr)),bv=aF(),iNe=tn();function aSt(e,t,n){let r={};return n&iNe.SemconvStability.OLD&&Object.assign(r,{[bv.ATTR_DB_SYSTEM]:bv.DB_SYSTEM_VALUE_REDIS,[bv.ATTR_NET_PEER_NAME]:t?.socket?.host,[bv.ATTR_NET_PEER_PORT]:t?.socket?.port,[bv.ATTR_DB_CONNECTION_STRING]:sSt(e,t?.url)}),n&iNe.SemconvStability.STABLE&&Object.assign(r,{[kK.ATTR_DB_SYSTEM_NAME]:bv.DB_SYSTEM_NAME_VALUE_REDIS,[kK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[kK.ATTR_SERVER_PORT]:t?.socket?.port}),r}cF.getClientAttributes=aSt;function sSt(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 lNe=F(lF=>{"use strict";A();Object.defineProperty(lF,"__esModule",{value:!0});lF.RedisInstrumentationV4_V5=void 0;var Fd=(Ge(),ke(Ze)),Eo=tn(),sNe=aNe(),uSt=nF(),uNe=iF(),PK=(Kn(),ke(Pr)),cSt=aF(),qN=Symbol("opentelemetry.instrumentation.redis.open_spans"),cNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),UK=class e extends Eo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(uNe.PACKAGE_NAME,uNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.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 Eo.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,Eo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,Eo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Eo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,Eo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,Eo.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,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,Eo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new Eo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,m){let h=t(d,m).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[qN];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[qN];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let m=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,m,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[cNe]=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,sNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Fd.SpanKind.CLIENT,attributes:a});return Fd.context.with(Fd.trace.setSpan(Fd.context.active(),c),()=>r.apply(this)).then(m=>(c.end(),m)).catch(m=>(c.recordException(m),c.setStatus({code:Fd.SpanStatusCode.ERROR,message:m.message}),c.end(),Promise.reject(m)))}}}_traceClientCommand(t,n,r,o){if(Fd.trace.getSpan(Fd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[cNe],c=o[0],d=o.slice(1),m=this.getConfig().dbStatementSerializer||uSt.defaultDbStatementSerializer,h=(0,sNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&Eo.SemconvStability.STABLE&&(h[PK.ATTR_DB_OPERATION_NAME]=c);try{let C=m(c,d);C!=null&&(this._semconvStability&Eo.SemconvStability.OLD&&(h[cSt.ATTR_DB_STATEMENT]=C),this._semconvStability&Eo.SemconvStability.STABLE&&(h[PK.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:Fd.SpanKind.CLIENT,attributes:h}),y=Fd.context.with(Fd.trace.setSpan(Fd.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[qN]=C[qN]||[],C[qN].push({span:S,commandName:c,commandArgs:d})}return y}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:m}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Eo.SemconvStability.STABLE&&d.setAttribute(PK.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],m,S,y)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Fd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};lF.RedisInstrumentationV4_V5=UK});var fNe=F(dF=>{"use strict";A();Object.defineProperty(dF,"__esModule",{value:!0});dF.RedisInstrumentation=void 0;var lSt=tn(),dNe=iF(),dSt=oNe(),pSt=lNe(),pNe={requireParentSpan:!1},LK=class extends lSt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...pNe,...t};super(dNe.PACKAGE_NAME,dNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new dSt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new pSt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...pNe,...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())}};dF.RedisInstrumentation=LK});var ANe=F(pF=>{"use strict";A();Object.defineProperty(pF,"__esModule",{value:!0});pF.RedisInstrumentation=void 0;var fSt=fNe();Object.defineProperty(pF,"RedisInstrumentation",{enumerable:!0,get:function(){return fSt.RedisInstrumentation}})});function YN(e,t){return e.includes(t.toLowerCase())}function FK(e){return YN(QK,e)?"cache.get":YN(mSt,e)?"cache.put":void 0}function gSt(e,t){return t.some(n=>e.startsWith(n))}function gNe(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)?mNe(o.map(i=>n(i))):["<unknown>"],r=t[0];return YN(ASt,e)&&r!=null?n(r):mNe(t.map(o=>n(o)))}catch{return}}function hNe(e,t,n){if(!FK(e))return!1;for(let r of t)if(gSt(r,n))return!0;return!1}function _Ne(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 mNe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var ASt,QK,mSt,ENe=O(()=>{A();ASt=["get","set","setex"],QK=["get","mget"],mSt=["set","setex"]});var SNe,yNe,fF,KN,TNe,hSt,_St,INe,ESt,CNe,bNe=O(()=>{A();SNe=ie(tNe(),1),yNe=ie(ANe(),1);lt();fr();ENe();fF="Redis",KN={},TNe=(e,t,n,r)=>{e.setAttribute(Mt,"auto.db.otel.redis");let o=gNe(t,n),i=FK(t);if(!o||!i||!KN.cachePrefixes||!hNe(t,o,KN.cachePrefixes))return;let a=Nt(e).data["net.peer.name"],c=Nt(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=_Ne(r);d&&e.setAttribute(H9,d),YN(QK,t)&&d!==void 0&&e.setAttribute(j9,d>0),e.setAttributes({[Zt]:i,[z9]:o});let m=o.join(", ");e.updateName(KN.maxCacheKeyLength?r_(m,KN.maxCacheKeyLength):m)},hSt=at(`${fF}.IORedis`,()=>new SNe.IORedisInstrumentation({responseHook:TNe})),_St=at(`${fF}.Redis`,()=>new yNe.RedisInstrumentation({responseHook:TNe})),INe=Object.assign(()=>{hSt(),_St()},{id:fF}),ESt=(e={})=>({name:fF,setupOnce(){KN=e,INe()}}),CNe=ESt});var vNe=F(AF=>{"use strict";A();Object.defineProperty(AF,"__esModule",{value:!0});AF.EVENT_LISTENERS_SET=void 0;AF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var GK=F(JN=>{"use strict";A();Object.defineProperty(JN,"__esModule",{value:!0});JN.AttributeNames=void 0;var SSt;(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"})(SSt=JN.AttributeNames||(JN.AttributeNames={}))});var jK=F(xr=>{"use strict";A();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 zK=F(ZN=>{"use strict";A();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.SpanNames=void 0;var ySt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(ySt=ZN.SpanNames||(ZN.SpanNames={}))});var wNe=F(nr=>{"use strict";A();Object.defineProperty(nr,"__esModule",{value:!0});nr.sanitizedErrorMessage=nr.isObjectWithTextString=nr.getErrorMessage=nr.patchClientConnectCallback=nr.patchCallbackPGPool=nr.updateCounter=nr.getPoolName=nr.patchCallback=nr.handleExecutionResult=nr.handleConfigQuery=nr.shouldSkipInstrumentation=nr.getSemanticAttributesFromPoolConnection=nr.getSemanticAttributesFromConnection=nr.getConnectionString=nr.parseAndMaskConnectionString=nr.parseNormalizedOperationName=nr.getQuerySpanName=void 0;var z_=(Ge(),ke(Ze)),mF=GK(),Gd=(Kn(),ke(Pr)),li=jK(),cy=tn(),RNe=zK();function xNe(e,t){if(!t)return RNe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:DNe(t.text);return`${RNe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}nr.getQuerySpanName=xNe;function DNe(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}nr.parseNormalizedOperationName=DNe;function BNe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}nr.parseAndMaskConnectionString=BNe;function HK(e){if("connectionString"in e&&e.connectionString)return BNe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}nr.getConnectionString=HK;function gF(e){if(Number.isInteger(e))return e}function NNe(e,t){let n={};return t&cy.SemconvStability.OLD&&(n={...n,[li.ATTR_DB_SYSTEM]:li.DB_SYSTEM_VALUE_POSTGRESQL,[li.ATTR_DB_NAME]:e.database,[li.ATTR_DB_CONNECTION_STRING]:HK(e),[li.ATTR_DB_USER]:e.user,[li.ATTR_NET_PEER_NAME]:e.host,[li.ATTR_NET_PEER_PORT]:gF(e.port)}),t&cy.SemconvStability.STABLE&&(n={...n,[Gd.ATTR_DB_SYSTEM_NAME]:Gd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Gd.ATTR_DB_NAMESPACE]:e.namespace,[Gd.ATTR_SERVER_ADDRESS]:e.host,[Gd.ATTR_SERVER_PORT]:gF(e.port)}),n}nr.getSemanticAttributesFromConnection=NNe;function TSt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[mF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[mF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&cy.SemconvStability.OLD&&(r={...r,[li.ATTR_DB_SYSTEM]:li.DB_SYSTEM_VALUE_POSTGRESQL,[li.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[li.ATTR_DB_CONNECTION_STRING]:HK(e),[li.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[li.ATTR_NET_PEER_PORT]:Number(n?.port)||gF(e.port),[li.ATTR_DB_USER]:n?.username??e.user}),t&cy.SemconvStability.STABLE&&(r={...r,[Gd.ATTR_DB_SYSTEM_NAME]:Gd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Gd.ATTR_DB_NAMESPACE]:e.namespace,[Gd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Gd.ATTR_SERVER_PORT]:Number(n?.port)||gF(e.port)}),r}nr.getSemanticAttributesFromPoolConnection=TSt;function ISt(e){return e.requireParentSpan===!0&&z_.trace.getSpan(z_.context.active())===void 0}nr.shouldSkipInstrumentation=ISt;function CSt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=xNe(i,r),c=e.startSpan(a,{kind:z_.SpanKind.CLIENT,attributes:NNe(o,n)});if(!r)return c;if(r.text&&(n&cy.SemconvStability.OLD&&c.setAttribute(li.ATTR_DB_STATEMENT,r.text),n&cy.SemconvStability.STABLE&&c.setAttribute(Gd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(m=>m==null?"null":m instanceof Buffer?m.toString():typeof m=="object"?typeof m.toPostgres=="function"?m.toPostgres():JSON.stringify(m):m.toString());c.setAttribute(mF.AttributeNames.PG_VALUES,d)}catch(d){z_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(mF.AttributeNames.PG_PLAN,r.name),c}nr.handleConfigQuery=CSt;function ONe(e,t,n){typeof e.responseHook=="function"&&(0,cy.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&z_.diag.error("Error running response hook",r)},!0)}nr.handleExecutionResult=ONe;function bSt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Gd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(hF(a)),t.setStatus({code:z_.SpanStatusCode.ERROR,message:a.message})):ONe(e,t,c),o(),t.end(),n.call(this,a,c)}}nr.patchCallback=bSt;function vSt(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()}nr.getPoolName=vSt;function RSt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[li.ATTR_DB_CLIENT_CONNECTION_STATE]:li.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[li.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[li.ATTR_DB_CLIENT_CONNECTION_STATE]:li.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[li.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[li.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}nr.updateCounter=RSt;function xSt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(hF(r)),e.setStatus({code:z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}nr.patchCallbackPGPool=xSt;function DSt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(hF(r)),e.setStatus({code:z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}nr.patchClientConnectCallback=DSt;function BSt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}nr.getErrorMessage=BSt;function NSt(e){return typeof e=="object"&&typeof e?.text=="string"}nr.isObjectWithTextString=NSt;function hF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}nr.sanitizedErrorMessage=hF});var MNe=F(vv=>{"use strict";A();Object.defineProperty(vv,"__esModule",{value:!0});vv.PACKAGE_NAME=vv.PACKAGE_VERSION=void 0;vv.PACKAGE_VERSION="0.66.0";vv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var FNe=F(EF=>{"use strict";A();Object.defineProperty(EF,"__esModule",{value:!0});EF.PgInstrumentation=void 0;var Lu=tn(),Qr=(Ge(),ke(Ze)),kNe=vNe(),Yo=wNe(),PNe=RK(),UNe=MNe(),LNe=zK(),_F=Tr(),tf=(Kn(),ke(Pr)),WN=jK();function Rv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var $K=class extends Lu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t),this._semconvStability=(0,Lu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(tf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Qr.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(WN.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(WN.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 Lu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Lu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Lu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Rv(c);return this._patchPgClient(d.Client),c},c=>{let d=Rv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Lu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Rv(c);return(0,Lu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Rv(c);(0,Lu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Rv(t);return(0,Lu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Lu.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=Rv(t);return(0,Lu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Lu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Yo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(LNe.SpanNames.CONNECT,{kind:Qr.SpanKind.CLIENT,attributes:Yo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Qr.trace.getSpan(Qr.context.active());o=Yo.patchClientConnectCallback(a,o),d&&(o=Qr.context.bind(Qr.context.active(),o))}let c=Qr.context.with(Qr.trace.setSpan(Qr.context.active(),a),()=>n.call(this,o));return QNe(a,c)}}recordOperationDuration(t,n){let r={},o=[tf.ATTR_DB_NAMESPACE,tf.ATTR_ERROR_TYPE,tf.ATTR_SERVER_PORT,tf.ATTR_SERVER_ADDRESS,tf.ATTR_DB_OPERATION_NAME];this._semconvStability&Lu.SemconvStability.OLD&&o.push(WN.ATTR_DB_SYSTEM),this._semconvStability&Lu.SemconvStability.STABLE&&o.push(tf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,_F.hrTimeToMilliseconds)((0,_F.hrTimeDuration)(n,(0,_F.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Yo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,_F.hrTime)(),a=o[0],c=typeof a=="string",d=Yo.isObjectWithTextString(a),m=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[WN.ATTR_DB_SYSTEM]:WN.DB_SYSTEM_VALUE_POSTGRESQL,[tf.ATTR_DB_NAMESPACE]:this.database,[tf.ATTR_SERVER_PORT]:this.connectionParameters.port,[tf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};m?.text&&(h[tf.ATTR_DB_OPERATION_NAME]=Yo.parseNormalizedOperationName(m?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Yo.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,m);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,PNe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,PNe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Qr.trace.getSpan(Qr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Yo.patchCallback(y,C,o[o.length-1],h,S),N&&(o[o.length-1]=Qr.context.bind(Qr.context.active(),o[o.length-1]));else if(typeof m?.callback=="function"){let M=Yo.patchCallback(t.getConfig(),C,m.callback,h,S);N&&(M=Qr.context.bind(Qr.context.active(),M)),o[0].callback=M}}let{requestHook:v}=y;typeof v=="function"&&m&&(0,Lu.safeExecuteInTheMiddle)(()=>{let{database:N,host:M,port:Q,user:j}=this.connectionParameters;v(C,{connection:{database:N,host:M,port:Q,user:j},query:{text:m.text,values:m.values,name:m.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(Yo.sanitizedErrorMessage(N)),C.setStatus({code:Qr.SpanStatusCode.ERROR,message:Yo.getErrorMessage(N)}),C.end(),N}return x instanceof Promise?x.then(N=>new Promise(M=>{Yo.handleExecutionResult(t.getConfig(),C,N),S(),C.end(),M(N)})).catch(N=>new Promise((M,Q)=>{N instanceof Error&&C.recordException(Yo.sanitizedErrorMessage(N)),C.setStatus({code:Qr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[kNe.EVENT_LISTENERS_SET])return;let n=Yo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[kNe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Yo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(LNe.SpanNames.POOL_CONNECT,{kind:Qr.SpanKind.CLIENT,attributes:Yo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Qr.trace.getSpan(Qr.context.active());o=Yo.patchCallbackPGPool(a,o),d&&(o=Qr.context.bind(Qr.context.active(),o))}let c=Qr.context.with(Qr.trace.setSpan(Qr.context.active(),a),()=>n.call(this,o));return QNe(a,c)}}};EF.PgInstrumentation=$K;function QNe(e,t){if(!(t instanceof Promise))return t;let n=t;return Qr.context.bind(Qr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Yo.sanitizedErrorMessage(r)),e.setStatus({code:Qr.SpanStatusCode.ERROR,message:Yo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var GNe=F(xv=>{"use strict";A();Object.defineProperty(xv,"__esModule",{value:!0});xv.AttributeNames=xv.PgInstrumentation=void 0;var OSt=FNe();Object.defineProperty(xv,"PgInstrumentation",{enumerable:!0,get:function(){return OSt.PgInstrumentation}});var wSt=GK();Object.defineProperty(xv,"AttributeNames",{enumerable:!0,get:function(){return wSt.AttributeNames}})});var jNe,zNe,HNe,MSt,$Ne,VNe=O(()=>{A();jNe=ie(GNe(),1);fr();zNe="Postgres",HNe=at(zNe,jNe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Ur(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),MSt=e=>({name:zNe,setupOnce(){HNe(e)}}),$Ne=MSt});var H_,qK,qNe,kSt,PSt,YNe,VK,USt,KNe,JNe=O(()=>{A();Ge();H_=ie(tn(),1);Kn();lt();fr();XS();qK="PostgresJs",qNe=[">=3.0.0 <4"],kSt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,PSt=Symbol.for("sentry.query.from.instrumented.sql"),YNe=at(qK,e=>new VK({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),VK=class extends H_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Jn,t)}init(){let t=new H_.InstrumentationNodeModuleDefinition("postgres",qNe,n=>{try{return this._patchPostgres(n)}catch(r){return _a&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new H_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,qNe,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 _a&&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 _a&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return VV(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:(qB(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return zt.getSpan(Ye.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(MC,r);return}let o=n?.match(kSt);o?.[1]&&t.setAttribute(MC,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[PSt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Ya({name:a||"postgresjs.query",op:"db"},c=>{Ur(c,"auto.db.postgresjs"),c.setAttributes({[_S]:"postgres",[o5]:a});let d=n.getConfig(),{requestHook:m}=d;m&&(0,H_.safeExecuteInTheMiddle)(()=>m(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),_a&&J.error(`Error in requestHook for ${qK} 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){_a&&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(i5,v?.[0]?.code||"unknown"),c.setAttribute(a5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){_a&&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}},USt=e=>({name:qK,setupOnce(){YNe(e)}}),KNe=USt});var ZNe=F(XN=>{"use strict";A();Object.defineProperty(XN,"__esModule",{value:!0});XN.SeverityNumber=void 0;var LSt;(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"})(LSt=XN.SeverityNumber||(XN.SeverityNumber={}))});var yF=F(Dv=>{"use strict";A();Object.defineProperty(Dv,"__esModule",{value:!0});Dv.NOOP_LOGGER=Dv.NoopLogger=void 0;var SF=class{emit(t){}};Dv.NoopLogger=SF;Dv.NOOP_LOGGER=new SF});var IF=F(Bv=>{"use strict";A();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.NOOP_LOGGER_PROVIDER=Bv.NoopLoggerProvider=void 0;var QSt=yF(),TF=class{getLogger(t,n,r){return new QSt.NoopLogger}};Bv.NoopLoggerProvider=TF;Bv.NOOP_LOGGER_PROVIDER=new TF});var KK=F(CF=>{"use strict";A();Object.defineProperty(CF,"__esModule",{value:!0});CF.ProxyLogger=void 0;var FSt=yF(),YK=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):FSt.NOOP_LOGGER}};CF.ProxyLogger=YK});var ZK=F(bF=>{"use strict";A();Object.defineProperty(bF,"__esModule",{value:!0});bF.ProxyLoggerProvider=void 0;var GSt=IF(),jSt=KK(),JK=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new jSt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:GSt.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)}};bF.ProxyLoggerProvider=JK});var WNe=F(vF=>{"use strict";A();Object.defineProperty(vF,"__esModule",{value:!0});vF._globalThis=void 0;vF._globalThis=typeof globalThis=="object"?globalThis:global});var XNe=F(RF=>{"use strict";A();Object.defineProperty(RF,"__esModule",{value:!0});RF._globalThis=void 0;var zSt=WNe();Object.defineProperty(RF,"_globalThis",{enumerable:!0,get:function(){return zSt._globalThis}})});var eOe=F(xF=>{"use strict";A();Object.defineProperty(xF,"__esModule",{value:!0});xF._globalThis=void 0;var HSt=XNe();Object.defineProperty(xF,"_globalThis",{enumerable:!0,get:function(){return HSt._globalThis}})});var tOe=F(xA=>{"use strict";A();Object.defineProperty(xA,"__esModule",{value:!0});xA.API_BACKWARDS_COMPATIBILITY_VERSION=xA.makeGetter=xA._global=xA.GLOBAL_LOGS_API_KEY=void 0;var $St=eOe();xA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");xA._global=$St._globalThis;function VSt(e,t,n){return r=>r===e?t:n}xA.makeGetter=VSt;xA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var rOe=F(DF=>{"use strict";A();Object.defineProperty(DF,"__esModule",{value:!0});DF.LogsAPI=void 0;var jd=tOe(),qSt=IF(),nOe=ZK(),WK=class e{constructor(){this._proxyLoggerProvider=new nOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return jd._global[jd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(jd._global[jd.GLOBAL_LOGS_API_KEY]=(0,jd.makeGetter)(jd.API_BACKWARDS_COMPATIBILITY_VERSION,t,qSt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=jd._global[jd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(jd._global,jd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete jd._global[jd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new nOe.ProxyLoggerProvider}};DF.LogsAPI=WK});var XK=F(Xa=>{"use strict";A();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.logs=Xa.ProxyLoggerProvider=Xa.ProxyLogger=Xa.NoopLoggerProvider=Xa.NOOP_LOGGER_PROVIDER=Xa.NoopLogger=Xa.NOOP_LOGGER=Xa.SeverityNumber=void 0;var YSt=ZNe();Object.defineProperty(Xa,"SeverityNumber",{enumerable:!0,get:function(){return YSt.SeverityNumber}});var oOe=yF();Object.defineProperty(Xa,"NOOP_LOGGER",{enumerable:!0,get:function(){return oOe.NOOP_LOGGER}});Object.defineProperty(Xa,"NoopLogger",{enumerable:!0,get:function(){return oOe.NoopLogger}});var iOe=IF();Object.defineProperty(Xa,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return iOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(Xa,"NoopLoggerProvider",{enumerable:!0,get:function(){return iOe.NoopLoggerProvider}});var KSt=KK();Object.defineProperty(Xa,"ProxyLogger",{enumerable:!0,get:function(){return KSt.ProxyLogger}});var JSt=ZK();Object.defineProperty(Xa,"ProxyLoggerProvider",{enumerable:!0,get:function(){return JSt.ProxyLoggerProvider}});var ZSt=rOe();Xa.logs=ZSt.LogsAPI.getInstance()});var aOe=F(Nv=>{"use strict";A();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.disableInstrumentations=Nv.enableInstrumentations=void 0;function WSt(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()}}Nv.enableInstrumentations=WSt;function XSt(e){e.forEach(t=>t.disable())}Nv.disableInstrumentations=XSt});var cOe=F(BF=>{"use strict";A();Object.defineProperty(BF,"__esModule",{value:!0});BF.registerInstrumentations=void 0;var sOe=(Ge(),ke(Ze)),eyt=XK(),uOe=aOe();function tyt(e){let t=e.tracerProvider||sOe.trace.getTracerProvider(),n=e.meterProvider||sOe.metrics.getMeterProvider(),r=e.loggerProvider||eyt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,uOe.enableInstrumentations)(o,t,n,r),()=>{(0,uOe.disableInstrumentations)(o)}}BF.registerInstrumentations=tyt});var _Oe=F(NF=>{"use strict";A();Object.defineProperty(NF,"__esModule",{value:!0});NF.satisfies=void 0;var rJ=(Ge(),ke(Ze)),AOe=/^(?: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-]+)*))?$/,nyt=/^(?<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-]+)*))?$/,ryt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function oyt(e,t,n){if(!iyt(e))return rJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=cyt(e);if(!r)return!1;let o=[],i=mOe(r,t,o,n);return i&&!n?.includePrerelease?syt(r,o):i}NF.satisfies=oyt;function iyt(e){return typeof e=="string"&&AOe.test(e)}function mOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(eJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Byt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!eJ(e,i,n,r))return!1;return!0}return eJ(e,t,n,r)}function eJ(e,t,n,r){if(t=uyt(t,r),t.includes(" "))return mOe(e,t,n,r);{let o=lyt(t);return n.push(o),ayt(e,o)}}function ayt(e,t){if(t.invalid)return!1;if(!t.version||nJ(t.version))return!0;let n=dOe(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=dOe(r,o)}return ryt[t.op]?.includes(n)}function syt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function uyt(e,t){return e=e.trim(),e=xyt(e,t),e=Ryt(e),e=Dyt(e,t),e=e.trim(),e}function Qu(e){return!e||e.toLowerCase()==="x"||e==="*"}function cyt(e){let t=e.match(AOe);if(!t){rJ.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 lyt(e){if(!e)return{};let t=e.match(nyt);if(!t)return rJ.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 nJ(e){return e==="*"||e==="x"||e==="X"}function lOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function dyt(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 pyt(e,t){if(nJ(e)||nJ(t))return 0;let[n,r]=dyt(lOe(e),lOe(t));return n>r?1:n<r?-1:0}function dOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=pyt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var gOe="[a-zA-Z0-9-]",hOe="0|[1-9]\\d*",fyt=`\\d*[a-zA-Z-]${gOe}*`,Ayt="((?:<|>)?=?)",pOe=`(?:${hOe}|${fyt})`,myt=`(?:-(${pOe}(?:\\.${pOe})*))`,fOe=`${gOe}+`,gyt=`(?:\\+(${fOe}(?:\\.${fOe})*))`,tJ=`${hOe}|x|X|\\*`,eO=`[v=\\s]*(${tJ})(?:\\.(${tJ})(?:\\.(${tJ})(?:${myt})?${gyt}?)?)?`,hyt=`^${Ayt}\\s*${eO}$`,_yt=new RegExp(hyt),Eyt=`^\\s*(${eO})\\s+-\\s+(${eO})\\s*$`,Syt=new RegExp(Eyt),yyt="(?:~>?)",Tyt=`^${yyt}${eO}$`,Iyt=new RegExp(Tyt),Cyt="(?:\\^)",byt=`^${Cyt}${eO}$`,vyt=new RegExp(byt);function Ryt(e){let t=Iyt;return e.replace(t,(n,r,o,i,a)=>{let c;return Qu(r)?c="":Qu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Qu(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 xyt(e,t){let n=vyt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Qu(i)?m="":Qu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Qu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function Dyt(e,t){let n=_yt;return e.replace(n,(r,o,i,a,c,d)=>{let m=Qu(i),h=m||Qu(a),S=h||Qu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Byt(e,t){let n=Syt;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,v)=>(Qu(i)?o="":Qu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Qu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Qu(S)?h="":Qu(y)?h=`<${+S+1}.0.0-0`:Qu(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 oJ=F(Rs=>{"use strict";A();Object.defineProperty(Rs,"__esModule",{value:!0});Rs.massUnwrap=Rs.unwrap=Rs.massWrap=Rs.wrap=void 0;var Fu=console.error.bind(console);function tO(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 Nyt=(e,t,n)=>{if(!e||!e[t]){Fu("no original function "+String(t)+" to wrap");return}if(!n){Fu("no wrapper function"),Fu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Fu("original object and wrapper must be functions");return}let o=n(r,t);return tO(o,"__original",r),tO(o,"__unwrap",()=>{e[t]===o&&tO(e,t,r)}),tO(o,"__wrapped",!0),tO(e,t,o),o};Rs.wrap=Nyt;var Oyt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Fu("must provide one or more modules to patch"),Fu(new Error().stack);return}if(!(t&&Array.isArray(t))){Fu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Rs.wrap)(r,o,n)})})};Rs.massWrap=Oyt;var wyt=(e,t)=>{if(!e||!e[t]){Fu("no function to unwrap."),Fu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Fu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Rs.unwrap=wyt;var Myt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Fu("must provide one or more modules to patch"),Fu(new Error().stack);return}if(!(t&&Array.isArray(t))){Fu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Rs.unwrap)(n,r)})})};Rs.massUnwrap=Myt;function nO(e){e&&e.logger&&(typeof e.logger!="function"?Fu("new logger isn't a function, not replacing"):Fu=e.logger)}Rs.default=nO;nO.wrap=Rs.wrap;nO.massWrap=Rs.massWrap;nO.unwrap=Rs.unwrap;nO.massUnwrap=Rs.massUnwrap});var EOe=F(wF=>{"use strict";A();Object.defineProperty(wF,"__esModule",{value:!0});wF.InstrumentationAbstract=void 0;var iJ=(Ge(),ke(Ze)),kyt=XK(),OF=oJ(),aJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=iJ.diag.createComponentLogger({namespace:t}),this._tracer=iJ.trace.getTracer(t,n),this._meter=iJ.metrics.getMeter(t,n),this._logger=kyt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=OF.wrap;_unwrap=OF.unwrap;_massWrap=OF.massWrap;_massUnwrap=OF.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)}}};wF.InstrumentationAbstract=aJ});var SOe=F($_=>{"use strict";A();Object.defineProperty($_,"__esModule",{value:!0});$_.ModuleNameTrie=$_.ModuleNameSeparator=void 0;$_.ModuleNameSeparator="/";var MF=class{hooks=[];children=new Map},sJ=class{_trie=new MF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split($_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new MF,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split($_.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};$_.ModuleNameTrie=sJ});var TOe=F(kF=>{"use strict";A();Object.defineProperty(kF,"__esModule",{value:!0});kF.RequireInTheMiddleSingleton=void 0;var Pyt=CS(),yOe=Fe("path"),uJ=SOe(),Uyt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),cJ=class e{_moduleNameTrie=new uJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Pyt.Hook(null,{internals:!0},(t,n,r)=>{let o=Lyt(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 Uyt?new e:this._instance=this._instance??new e}};kF.RequireInTheMiddleSingleton=cJ;function Lyt(e){return yOe.sep!==uJ.ModuleNameSeparator?e.split(yOe.sep).join(uJ.ModuleNameSeparator):e}});var lJ=F(V_=>{"use strict";A();Object.defineProperty(V_,"__esModule",{value:!0});V_.isWrapped=V_.safeExecuteInTheMiddleAsync=V_.safeExecuteInTheMiddle=void 0;function Qyt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}V_.safeExecuteInTheMiddle=Qyt;async function Fyt(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}}V_.safeExecuteInTheMiddleAsync=Fyt;function Gyt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}V_.isWrapped=Gyt});var bOe=F(PF=>{"use strict";A();Object.defineProperty(PF,"__esModule",{value:!0});PF.InstrumentationBase=void 0;var rO=Fe("path"),IOe=Fe("util"),jyt=_Oe(),dJ=oJ(),zyt=EOe(),Hyt=TOe(),$yt=$Y(),oO=(Ge(),ke(Ze)),Vyt=CS(),qyt=Fe("fs"),Yyt=lJ(),pJ=class extends zyt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Hyt.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,Yyt.isWrapped)(t[n])&&this._unwrap(t,n),IOe.types.isProxy(t)){let o=(0,dJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,dJ.wrap)(t,n,r)};_unwrap=(t,n)=>IOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,dJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{oO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){oO.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{oO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){oO.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=Fe.resolve(n);Fe.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,qyt.readFileSync)(rO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{oO.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 COe(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=rO.normalize(r);return a.filter(m=>m.name===c).filter(m=>COe(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&rO.isAbsolute(c)){let m=rO.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=rO.isAbsolute(t.name)?new Vyt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new $yt.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}};PF.InstrumentationBase=pJ;function COe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,jyt.satisfies)(t,r,{includePrerelease:n}))}});var vOe=F(UF=>{"use strict";A();Object.defineProperty(UF,"__esModule",{value:!0});UF.normalize=void 0;var Kyt=Fe("path");Object.defineProperty(UF,"normalize",{enumerable:!0,get:function(){return Kyt.normalize}})});var ROe=F(Ov=>{"use strict";A();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.normalize=Ov.InstrumentationBase=void 0;var Jyt=bOe();Object.defineProperty(Ov,"InstrumentationBase",{enumerable:!0,get:function(){return Jyt.InstrumentationBase}});var Zyt=vOe();Object.defineProperty(Ov,"normalize",{enumerable:!0,get:function(){return Zyt.normalize}})});var fJ=F(wv=>{"use strict";A();Object.defineProperty(wv,"__esModule",{value:!0});wv.normalize=wv.InstrumentationBase=void 0;var xOe=ROe();Object.defineProperty(wv,"InstrumentationBase",{enumerable:!0,get:function(){return xOe.InstrumentationBase}});Object.defineProperty(wv,"normalize",{enumerable:!0,get:function(){return xOe.normalize}})});var DOe=F(LF=>{"use strict";A();Object.defineProperty(LF,"__esModule",{value:!0});LF.InstrumentationNodeModuleDefinition=void 0;var AJ=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||[]}};LF.InstrumentationNodeModuleDefinition=AJ});var BOe=F(QF=>{"use strict";A();Object.defineProperty(QF,"__esModule",{value:!0});QF.InstrumentationNodeModuleFile=void 0;var Wyt=fJ(),mJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Wyt.normalize)(t)}};QF.InstrumentationNodeModuleFile=mJ});var NOe=F(ly=>{"use strict";A();Object.defineProperty(ly,"__esModule",{value:!0});ly.semconvStabilityFromStr=ly.SemconvStability=void 0;var FF;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(FF=ly.SemconvStability||(ly.SemconvStability={}));function Xyt(e,t){let n=FF.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=FF.DUPLICATE;break}else o.toLowerCase()===e&&(n=FF.STABLE);return n}ly.semconvStabilityFromStr=Xyt});var wOe=F(Wi=>{"use strict";A();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.semconvStabilityFromStr=Wi.SemconvStability=Wi.safeExecuteInTheMiddleAsync=Wi.safeExecuteInTheMiddle=Wi.isWrapped=Wi.InstrumentationNodeModuleFile=Wi.InstrumentationNodeModuleDefinition=Wi.InstrumentationBase=Wi.registerInstrumentations=void 0;var eTt=cOe();Object.defineProperty(Wi,"registerInstrumentations",{enumerable:!0,get:function(){return eTt.registerInstrumentations}});var tTt=fJ();Object.defineProperty(Wi,"InstrumentationBase",{enumerable:!0,get:function(){return tTt.InstrumentationBase}});var nTt=DOe();Object.defineProperty(Wi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return nTt.InstrumentationNodeModuleDefinition}});var rTt=BOe();Object.defineProperty(Wi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return rTt.InstrumentationNodeModuleFile}});var gJ=lJ();Object.defineProperty(Wi,"isWrapped",{enumerable:!0,get:function(){return gJ.isWrapped}});Object.defineProperty(Wi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return gJ.safeExecuteInTheMiddle}});Object.defineProperty(Wi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return gJ.safeExecuteInTheMiddleAsync}});var OOe=NOe();Object.defineProperty(Wi,"SemconvStability",{enumerable:!0,get:function(){return OOe.SemconvStability}});Object.defineProperty(Wi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return OOe.semconvStabilityFromStr}})});function aTt(){let e=Mv[_J];return e?.helper?e.helper:Mv[hJ]?.helper}function sTt(e){let t={helper:e};Mv[_J]=t,Mv[hJ]=t}function uTt(){delete Mv[_J],delete Mv[hJ]}function dTt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}function POe(e,t,n,r,o){if(UOe(t.name,o))return;let i={attributes:t.attributes,kind:dTt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let m=r.get(d);return m?{context:{spanId:m,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)POe(e,d,n,r,o);a.end(t.endTime)})}function MOe(e,t){return fTt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function fTt(e){return e!=null&&typeof e.then=="function"}function UOe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var GF,oTt,iTt,hJ,_J,Mv,cTt,lTt,pTt,LOe,kOe,ATt,mTt,QOe,FOe=O(()=>{A();Ge();GF=ie(wOe(),1);Ge();oTt={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"}},iTt=oTt.version.split(".")[0],hJ="PRISMA_INSTRUMENTATION",_J=`V${iTt}_PRISMA_INSTRUMENTATION`,Mv=globalThis;cTt=process.env.PRISMA_SHOW_ALL_TRACES==="true",lTt="00-10-10-00";pTt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=zt.getSpanContext(e??Ye.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:lTt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)POe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ye.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!cTt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(UOe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return MOe(i,t(i,r))}return n.startActiveSpan(o,e,i=>MOe(i,t(i,r)))}};LOe={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},kOe=LOe.version,ATt=LOe.name,mTt="@prisma/client",QOe=class extends GF.InstrumentationBase{tracerProvider;constructor(e={}){super(ATt,kOe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new GF.InstrumentationNodeModuleDefinition(mTt,[kOe])]}enable(){let e=this._config;sTt(new pTt({tracerProvider:this.tracerProvider??zt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){uTt()}isEnabled(){return aTt()!==void 0}}});function gTt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function jOe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function hTt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}var GOe,EJ,_Tt,zOe,HOe=O(()=>{A();Ge();FOe();lt();fr();GOe="Prisma";EJ=class extends QOe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=jOe();gTt(t)&&(t.createEngineSpan=n=>{let r=zt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){$o(()=>{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=hTt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:Hs.SAMPLED}})),S=zt.setSpanContext(Ye.active(),{traceId:m,spanId:c,traceFlags:Hs.SAMPLED});Ye.with(S,()=>{let y={generateTraceId:()=>m,generateSpanId:()=>d};r._idGenerator=y,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};_Tt=at(GOe,e=>new EJ(e)),zOe=e=>({name:GOe,setupOnce(){_Tt(e)},setup(t){jOe()&&t.on("spanStart",n=>{let r=Nt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Mt,"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 $Oe=F(kv=>{"use strict";A();Object.defineProperty(kv,"__esModule",{value:!0});kv.PACKAGE_NAME=kv.PACKAGE_VERSION=void 0;kv.PACKAGE_VERSION="0.60.0";kv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var SJ=F(DA=>{"use strict";A();Object.defineProperty(DA,"__esModule",{value:!0});DA.HapiLifecycleMethodNames=DA.HapiLayerType=DA.handlerPatched=DA.HapiComponentName=void 0;DA.HapiComponentName="@hapi/hapi";DA.handlerPatched=Symbol("hapi-handler-patched");DA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};DA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var VOe=F(jF=>{"use strict";A();Object.defineProperty(jF,"__esModule",{value:!0});jF.ATTR_HTTP_METHOD=void 0;jF.ATTR_HTTP_METHOD="http.method"});var yJ=F(iO=>{"use strict";A();Object.defineProperty(iO,"__esModule",{value:!0});iO.AttributeNames=void 0;var ETt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(ETt=iO.AttributeNames||(iO.AttributeNames={}))});var KOe=F(Xi=>{"use strict";A();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.getPluginFromInput=Xi.getExtMetadata=Xi.getRouteMetadata=Xi.isPatchableExtMethod=Xi.isDirectExtInput=Xi.isLifecycleExtEventObj=Xi.isLifecycleExtType=Xi.getPluginName=void 0;var qOe=(Kn(),ke(Pr)),STt=VOe(),aO=SJ(),q_=yJ(),YOe=tn();function yTt(e){return e.name?e.name:e.pkg.name}Xi.getPluginName=yTt;var TTt=e=>typeof e=="string"&&aO.HapiLifecycleMethodNames.has(e);Xi.isLifecycleExtType=TTt;var ITt=e=>{let t=e?.type;return t!==void 0&&(0,Xi.isLifecycleExtType)(t)};Xi.isLifecycleExtEventObj=ITt;var CTt=e=>Array.isArray(e)&&e.length<=3&&(0,Xi.isLifecycleExtType)(e[0])&&typeof e[1]=="function";Xi.isDirectExtInput=CTt;var bTt=e=>!Array.isArray(e);Xi.isPatchableExtMethod=bTt;var vTt=(e,t,n)=>{let r={[qOe.ATTR_HTTP_ROUTE]:e.path};t&YOe.SemconvStability.OLD&&(r[STt.ATTR_HTTP_METHOD]=e.method),t&YOe.SemconvStability.STABLE&&(r[qOe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[q_.AttributeNames.HAPI_TYPE]=aO.HapiLayerType.PLUGIN,r[q_.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[q_.AttributeNames.HAPI_TYPE]=aO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};Xi.getRouteMetadata=vTt;var RTt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[q_.AttributeNames.EXT_TYPE]:e,[q_.AttributeNames.HAPI_TYPE]:aO.HapiLayerType.EXT,[q_.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[q_.AttributeNames.EXT_TYPE]:e,[q_.AttributeNames.HAPI_TYPE]:aO.HapiLayerType.EXT},name:r}};Xi.getExtMetadata=RTt;var xTt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;Xi.getPluginFromInput=xTt});var WOe=F(zF=>{"use strict";A();Object.defineProperty(zF,"__esModule",{value:!0});zF.HapiInstrumentation=void 0;var wl=(Ge(),ke(Ze)),JOe=Tr(),sO=tn(),ZOe=$Oe(),uO=SJ(),bg=KOe(),TJ=class extends sO.InstrumentationBase{_semconvStability;constructor(t={}){super(ZOe.PACKAGE_NAME,ZOe.PACKAGE_VERSION,t),this._semconvStability=(0,sO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new sO.InstrumentationNodeModuleDefinition(uO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,sO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,sO.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,bg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,bg.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,bg.isLifecycleExtType)(d.type)){let m=d,h=r._wrapExtMethods(m.method,d.type,n);m.method=h,a[c]=m}}return t.apply(this,i)}else if((0,bg.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,bg.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,bg.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",m=>n._getServerRoutePatch.bind(n)(m,r)),i._wrap(c,"ext",m=>n._getServerExtPatch.bind(n)(m,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,bg.isPatchableExtMethod)(t))return t[uO.handlerPatched]===!0?t:(t[uO.handlerPatched]=!0,async function(...a){if(wl.trace.getSpan(wl.context.active())===void 0)return await t.apply(this,a);let c=(0,bg.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await wl.context.with(wl.trace.setSpan(wl.context.active(),d),t,void 0,...a)}catch(m){throw d.recordException(m),d.setStatus({code:wl.SpanStatusCode.ERROR,message:m.message}),m}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[uO.handlerPatched]===!0)return t;t[uO.handlerPatched]=!0;let o=i=>async function(...a){if(wl.trace.getSpan(wl.context.active())===void 0)return await i.call(this,...a);let c=(0,JOe.getRPCMetadata)(wl.context.active());c?.type===JOe.RPCType.HTTP&&(c.route=t.path);let d=(0,bg.getRouteMetadata)(t,r._semconvStability,n),m=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await wl.context.with(wl.trace.setSpan(wl.context.active(),m),()=>i.call(this,...a))}catch(h){throw m.recordException(h),m.setStatus({code:wl.SpanStatusCode.ERROR,message:h.message}),h}finally{m.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};zF.HapiInstrumentation=TJ});var XOe=F(Pv=>{"use strict";A();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.AttributeNames=Pv.HapiInstrumentation=void 0;var DTt=WOe();Object.defineProperty(Pv,"HapiInstrumentation",{enumerable:!0,get:function(){return DTt.HapiInstrumentation}});var BTt=yJ();Object.defineProperty(Pv,"AttributeNames",{enumerable:!0,get:function(){return BTt.AttributeNames}})});var ewe,twe,nwe,NTt,rwe,owe=O(()=>{A();ewe=ie(XOe(),1);fr();twe="Hapi",nwe=at(twe,()=>new ewe.HapiInstrumentation),NTt=()=>({name:twe,setupOnce(){nwe()}}),rwe=NTt});var Y_,cO,IJ=O(()=>{A();Y_={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},cO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var $F,OTt,wTt,HF,iwe=O(()=>{A();Ge();$F=ie(tn(),1);lt();IJ();OTt="@sentry/instrumentation-hono",wTt="0.0.1",HF=class extends $F.InstrumentationBase{constructor(t={}){super(OTt,wTt,t)}init(){return[new $F.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 Ye.with(zt.setSpan(Ye.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(_s(c))return c.then(d=>{let m=n._determineHandlerType(d);return a.setAttributes({[Y_.HONO_TYPE]:m,[Y_.HONO_NAME]:m===cO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[Y_.HONO_TYPE]:d,[Y_.HONO_NAME]:d===cO.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 _s(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?cO.MIDDLEWARE:cO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ai.ERROR,message:n.message}),t.recordException(n))}}});function MTt(e){let t=Nt(e).data,n=t[Y_.HONO_TYPE];if(t[Zt]||!n)return;e.setAttributes({[Mt]:"auto.http.otel.hono",[Zt]:`${n}.hono`});let r=t[Y_.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Cn()===Rd()){_a&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Wm],i=t[ES];typeof o=="string"&&typeof i=="string"&&Cn().setTransactionName(`${i} ${o}`)}var awe,swe,kTt,uwe,cwe=O(()=>{A();Kn();lt();fr();XS();IJ();iwe();awe="Hono";swe=at(awe,()=>new HF({responseHook:e=>{MTt(e)}})),kTt=()=>({name:awe,setupOnce(){swe()}}),uwe=kTt});var VF=F(lO=>{"use strict";A();Object.defineProperty(lO,"__esModule",{value:!0});lO.KoaLayerType=void 0;var PTt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(PTt=lO.KoaLayerType||(lO.KoaLayerType={}))});var lwe=F(Uv=>{"use strict";A();Object.defineProperty(Uv,"__esModule",{value:!0});Uv.PACKAGE_NAME=Uv.PACKAGE_VERSION=void 0;Uv.PACKAGE_VERSION="0.62.0";Uv.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var CJ=F(dO=>{"use strict";A();Object.defineProperty(dO,"__esModule",{value:!0});dO.AttributeNames=void 0;var UTt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(UTt=dO.AttributeNames||(dO.AttributeNames={}))});var pwe=F(Lv=>{"use strict";A();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.isLayerIgnored=Lv.getMiddlewareMetadata=void 0;var dwe=VF(),qF=CJ(),LTt=(Kn(),ke(Pr)),QTt=(e,t,n,r)=>n?{attributes:{[qF.AttributeNames.KOA_NAME]:r?.toString(),[qF.AttributeNames.KOA_TYPE]:dwe.KoaLayerType.ROUTER,[LTt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[qF.AttributeNames.KOA_NAME]:t.name??"middleware",[qF.AttributeNames.KOA_TYPE]:dwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Lv.getMiddlewareMetadata=QTt;var FTt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Lv.isLayerIgnored=FTt});var fwe=F(YF=>{"use strict";A();Object.defineProperty(YF,"__esModule",{value:!0});YF.kLayerPatched=void 0;YF.kLayerPatched=Symbol("koa-layer-patched")});var Ewe=F(KF=>{"use strict";A();Object.defineProperty(KF,"__esModule",{value:!0});KF.KoaInstrumentation=void 0;var BA=(Ge(),ke(Ze)),pO=tn(),Awe=VF(),mwe=lwe(),gwe=pwe(),hwe=Tr(),_we=fwe(),bJ=class extends pO.InstrumentationBase{constructor(t={}){super(mwe.PACKAGE_NAME,mwe.PACKAGE_VERSION,t)}init(){return new pO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,pO.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,pO.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){BA.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?Awe.KoaLayerType.ROUTER:Awe.KoaLayerType.MIDDLEWARE;return t[_we.kLayerPatched]===!0||(0,gwe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(BA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[_we.kLayerPatched]=!0,BA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(BA.trace.getSpan(BA.context.active())===void 0)return t(i,a);let d=(0,gwe.getMiddlewareMetadata)(i,t,n,r),m=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,hwe.getRPCMetadata)(BA.context.active());h?.type===hwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,pO.safeExecuteInTheMiddle)(()=>S(m,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&BA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=BA.trace.setSpan(BA.context.active(),m);return BA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw m.recordException(C),C}finally{m.end()}})})}};KF.KoaInstrumentation=bJ});var Swe=F(K_=>{"use strict";A();Object.defineProperty(K_,"__esModule",{value:!0});K_.KoaLayerType=K_.AttributeNames=K_.KoaInstrumentation=void 0;var GTt=Ewe();Object.defineProperty(K_,"KoaInstrumentation",{enumerable:!0,get:function(){return GTt.KoaInstrumentation}});var jTt=CJ();Object.defineProperty(K_,"AttributeNames",{enumerable:!0,get:function(){return jTt.AttributeNames}});var zTt=VF();Object.defineProperty(K_,"KoaLayerType",{enumerable:!0,get:function(){return zTt.KoaLayerType}})});var ywe,Twe,Iwe,HTt,Cwe,bwe=O(()=>{A();ywe=ie(Swe(),1);Kn();lt();fr();XS();Twe="Koa",Iwe=at(Twe,ywe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Ur(t,"auto.http.otel.koa");let r=Nt(t).data,o=r["koa.type"];o&&t.setAttribute(Zt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Cn()===Rd()){_a&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[Wm],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Cn().setTransactionName(`${c} ${a}`)}})),HTt=(e={})=>({name:Twe,setupOnce(){Iwe(e)}}),Cwe=HTt});var vJ=F(nf=>{"use strict";A();Object.defineProperty(nf,"__esModule",{value:!0});nf.ConnectNames=nf.ConnectTypes=nf.AttributeNames=void 0;var $Tt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})($Tt=nf.AttributeNames||(nf.AttributeNames={}));var VTt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(VTt=nf.ConnectTypes||(nf.ConnectTypes={}));var qTt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(qTt=nf.ConnectNames||(nf.ConnectNames={}))});var vwe=F(Qv=>{"use strict";A();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.PACKAGE_NAME=Qv.PACKAGE_VERSION=void 0;Qv.PACKAGE_VERSION="0.57.0";Qv.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var Rwe=F(JF=>{"use strict";A();Object.defineProperty(JF,"__esModule",{value:!0});JF._LAYERS_STORE_PROPERTY=void 0;JF._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var xwe=F(Z_=>{"use strict";A();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.generateRoute=Z_.replaceCurrentStackRoute=Z_.addNewStackLayer=void 0;var YTt=(Ge(),ke(Ze)),J_=Rwe(),KTt=e=>{Array.isArray(e[J_._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,J_._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[J_._LAYERS_STORE_PROPERTY].push("/");let t=e[J_._LAYERS_STORE_PROPERTY].length;return()=>{t===e[J_._LAYERS_STORE_PROPERTY].length?e[J_._LAYERS_STORE_PROPERTY].pop():YTt.diag.warn("Connect: Trying to pop the stack multiple time")}};Z_.addNewStackLayer=KTt;var JTt=(e,t)=>{t&&e[J_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};Z_.replaceCurrentStackRoute=JTt;var ZTt=e=>e[J_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);Z_.generateRoute=ZTt});var Nwe=F(W_=>{"use strict";A();Object.defineProperty(W_,"__esModule",{value:!0});W_.ConnectInstrumentation=W_.ANONYMOUS_NAME=void 0;var WTt=(Ge(),ke(Ze)),Dwe=Tr(),Fv=vJ(),Bwe=vwe(),ZF=tn(),XTt=(Kn(),ke(Pr)),RJ=xwe();W_.ANONYMOUS_NAME="anonymous";var xJ=class extends ZF.InstrumentationBase{constructor(t={}){super(Bwe.PACKAGE_NAME,Bwe.PACKAGE_VERSION,t)}init(){return[new ZF.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,ZF.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,ZF.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=Fv.ConnectTypes.REQUEST_HANDLER,i=Fv.ConnectNames.REQUEST_HANDLER,o=t):(r=Fv.ConnectTypes.MIDDLEWARE,i=Fv.ConnectNames.MIDDLEWARE,o=n.name||W_.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[XTt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Fv.AttributeNames.CONNECT_TYPE]:r,[Fv.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],m=arguments[a],h=arguments[c],S=arguments[d];(0,RJ.replaceCurrentStackRoute)(m,t);let y=(0,Dwe.getRPCMetadata)(WTt.context.active());t&&y?.type===Dwe.RPCType.HTTP&&(y.route=(0,RJ.generateRoute)(m));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||W_.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,RJ.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)}}};W_.ConnectInstrumentation=xJ});var wwe=F(zd=>{"use strict";A();Object.defineProperty(zd,"__esModule",{value:!0});zd.ConnectTypes=zd.ConnectNames=zd.AttributeNames=zd.ANONYMOUS_NAME=zd.ConnectInstrumentation=void 0;var Owe=Nwe();Object.defineProperty(zd,"ConnectInstrumentation",{enumerable:!0,get:function(){return Owe.ConnectInstrumentation}});Object.defineProperty(zd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return Owe.ANONYMOUS_NAME}});var DJ=vJ();Object.defineProperty(zd,"AttributeNames",{enumerable:!0,get:function(){return DJ.AttributeNames}});Object.defineProperty(zd,"ConnectNames",{enumerable:!0,get:function(){return DJ.ConnectNames}});Object.defineProperty(zd,"ConnectTypes",{enumerable:!0,get:function(){return DJ.ConnectTypes}})});var Mwe,kwe,Pwe,eIt,Uwe,Lwe=O(()=>{A();Mwe=ie(wwe(),1);fr();kwe="Connect",Pwe=at(kwe,()=>new Mwe.ConnectInstrumentation),eIt=()=>({name:kwe,setupOnce(){Pwe()}}),Uwe=eIt});var Qwe=F(es=>{"use strict";A();Object.defineProperty(es,"__esModule",{value:!0});es.DB_SYSTEM_VALUE_MSSQL=es.ATTR_NET_PEER_PORT=es.ATTR_NET_PEER_NAME=es.ATTR_DB_USER=es.ATTR_DB_SYSTEM=es.ATTR_DB_STATEMENT=es.ATTR_DB_SQL_TABLE=es.ATTR_DB_NAME=void 0;es.ATTR_DB_NAME="db.name";es.ATTR_DB_SQL_TABLE="db.sql.table";es.ATTR_DB_STATEMENT="db.statement";es.ATTR_DB_SYSTEM="db.system";es.ATTR_DB_USER="db.user";es.ATTR_NET_PEER_NAME="net.peer.name";es.ATTR_NET_PEER_PORT="net.peer.port";es.DB_SYSTEM_VALUE_MSSQL="mssql"});var Fwe=F(Gv=>{"use strict";A();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.once=Gv.getSpanName=void 0;function tIt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Gv.getSpanName=tIt;var nIt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Gv.once=nIt});var Gwe=F(jv=>{"use strict";A();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.33.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var Vwe=F(eE=>{"use strict";A();Object.defineProperty(eE,"__esModule",{value:!0});eE.TediousInstrumentation=eE.INJECTED_CTX=void 0;var zv=(Ge(),ke(Ze)),rIt=Fe("events"),NA=tn(),dy=(Kn(),ke(Pr)),X_=Qwe(),jwe=Fwe(),zwe=Gwe(),$we=Symbol("opentelemetry.instrumentation-tedious.current-database");eE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Hwe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function WF(e){Object.defineProperty(this,$we,{value:e,writable:!0})}var BJ=class e extends NA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(zwe.PACKAGE_NAME,zwe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,NA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,NA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new NA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Hwe)(0,NA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,NA.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 Hwe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return WF.call(this,this.config?.options?.database),this.removeListener("databaseChange",WF),this.on("databaseChange",WF),this.once("end",()=>{this.removeListener("databaseChange",WF)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||zv.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,eE.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?.[eE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof rIt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,m=()=>d++,h=()=>c++,S=this[$we],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&NA.SemconvStability.OLD&&(C[X_.ATTR_DB_SYSTEM]=X_.DB_SYSTEM_VALUE_MSSQL,C[X_.ATTR_DB_NAME]=S,C[X_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[X_.ATTR_DB_STATEMENT]=y,C[X_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&NA.SemconvStability.STABLE&&(C[dy.ATTR_DB_NAMESPACE]=S,C[dy.ATTR_DB_SYSTEM_NAME]=dy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[dy.ATTR_DB_QUERY_TEXT]=y,C[dy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&NA.SemconvStability.OLD&&(C[X_.ATTR_NET_PEER_NAME]=this.config?.server,C[X_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&NA.SemconvStability.STABLE&&(C[dy.ATTR_SERVER_ADDRESS]=this.config?.server,C[dy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,jwe.getSpanName)(t,S,y,a.table),{kind:zv.SpanKind.CLIENT,attributes:C}),x=(0,jwe.once)(G=>{a.removeListener("done",m),a.removeListener("doneInProc",m),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:zv.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",m),a.on("doneInProc",m),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=()=>zv.context.with(zv.trace.setSpan(zv.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)}}};eE.TediousInstrumentation=BJ});var qwe=F(XF=>{"use strict";A();Object.defineProperty(XF,"__esModule",{value:!0});XF.TediousInstrumentation=void 0;var oIt=Vwe();Object.defineProperty(XF,"TediousInstrumentation",{enumerable:!0,get:function(){return oIt.TediousInstrumentation}})});var Ywe,iIt,Kwe,Jwe,aIt,Zwe,Wwe=O(()=>{A();Ywe=ie(qwe(),1);lt();fr();iIt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Kwe="Tedious",Jwe=at(Kwe,()=>new Ywe.TediousInstrumentation({})),aIt=()=>{let e;return{name:Kwe,setupOnce(){let t=Jwe();e=KB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Nt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";iIt.has(i)&&n.setAttribute(Mt,"auto.db.otel.tedious")}))}}},Zwe=aIt});var Xwe=F(Hv=>{"use strict";A();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.PACKAGE_NAME=Hv.PACKAGE_VERSION=void 0;Hv.PACKAGE_VERSION="0.57.0";Hv.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var tMe=F(e3=>{"use strict";A();Object.defineProperty(e3,"__esModule",{value:!0});e3.GenericPoolInstrumentation=void 0;var $v=(Ge(),ke(Ze)),py=tn(),eMe=Xwe(),NJ="generic-pool",OJ=class extends py.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(eMe.PACKAGE_NAME,eMe.PACKAGE_VERSION,t)}init(){return[new py.InstrumentationNodeModuleDefinition(NJ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,py.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 py.InstrumentationNodeModuleDefinition(NJ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,py.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 py.InstrumentationNodeModuleDefinition(NJ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,py.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=$v.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return $v.context.with($v.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=$v.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return $v.context.with($v.trace.setSpan(a,c),()=>{t.call(this,(d,m)=>{if(c.end(),o)return o(d,m)},i)})}}};e3.GenericPoolInstrumentation=OJ});var nMe=F(t3=>{"use strict";A();Object.defineProperty(t3,"__esModule",{value:!0});t3.GenericPoolInstrumentation=void 0;var sIt=tMe();Object.defineProperty(t3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return sIt.GenericPoolInstrumentation}})});var rMe,oMe,iMe,uIt,aMe,sMe=O(()=>{A();rMe=ie(nMe(),1);lt();fr();oMe="GenericPool",iMe=at(oMe,()=>new rMe.GenericPoolInstrumentation({})),uIt=()=>{let e;return{name:oMe,setupOnce(){let t=iMe();e=KB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Nt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Mt,"auto.db.otel.generic_pool")}))}}},aMe=uIt});var wJ=F(OA=>{"use strict";A();Object.defineProperty(OA,"__esModule",{value:!0});OA.ATTR_NET_PEER_PORT=OA.ATTR_NET_PEER_NAME=OA.ATTR_MESSAGING_SYSTEM=OA.ATTR_MESSAGING_OPERATION=void 0;OA.ATTR_MESSAGING_OPERATION="messaging.operation";OA.ATTR_MESSAGING_SYSTEM="messaging.system";OA.ATTR_NET_PEER_NAME="net.peer.name";OA.ATTR_NET_PEER_PORT="net.peer.port"});var MJ=F(di=>{"use strict";A();Object.defineProperty(di,"__esModule",{value:!0});di.ATTR_MESSAGING_CONVERSATION_ID=di.OLD_ATTR_MESSAGING_MESSAGE_ID=di.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=di.ATTR_MESSAGING_URL=di.ATTR_MESSAGING_PROTOCOL_VERSION=di.ATTR_MESSAGING_PROTOCOL=di.MESSAGING_OPERATION_VALUE_PROCESS=di.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=di.ATTR_MESSAGING_DESTINATION_KIND=di.ATTR_MESSAGING_DESTINATION=void 0;di.ATTR_MESSAGING_DESTINATION="messaging.destination";di.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";di.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";di.MESSAGING_OPERATION_VALUE_PROCESS="process";di.ATTR_MESSAGING_PROTOCOL="messaging.protocol";di.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";di.ATTR_MESSAGING_URL="messaging.url";di.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";di.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";di.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var kJ=F(fy=>{"use strict";A();Object.defineProperty(fy,"__esModule",{value:!0});fy.DEFAULT_CONFIG=fy.EndOperation=void 0;var cIt;(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"})(cIt=fy.EndOperation||(fy.EndOperation={}));fy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var dMe=F(pi=>{"use strict";A();Object.defineProperty(pi,"__esModule",{value:!0});pi.isConfirmChannelTracing=pi.unmarkConfirmChannelTracing=pi.markConfirmChannelTracing=pi.getConnectionAttributesFromUrl=pi.getConnectionAttributesFromServer=pi.normalizeExchange=pi.CONNECTION_ATTRIBUTES=pi.CHANNEL_CONSUME_TIMEOUT_TIMER=pi.CHANNEL_SPANS_NOT_ENDED=pi.MESSAGE_STORED_SPAN=void 0;var PJ=(Ge(),ke(Ze)),tE=tn(),n3=(Kn(),ke(Pr)),fO=wJ(),r3=MJ();pi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");pi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");pi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");pi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var UJ=(0,PJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),lIt=e=>e!==""?e:"<default>";pi.normalizeExchange=lIt;var dIt=e=>e.replace(/:[^:@/]*@/,":***@"),uMe=(e,t)=>e||(t==="AMQP"?5672:5671),cMe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},lMe=e=>e||"localhost",wA=(e,t,n,r)=>n?{[t]:n}:(PJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),pIt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[fO.ATTR_MESSAGING_SYSTEM]:t}:{}};pi.getConnectionAttributesFromServer=pIt;var fIt=(e,t)=>{let n={[r3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=cMe(r?.protocol);Object.assign(n,{...wA(e,r3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=lMe(r?.hostname);t&tE.SemconvStability.OLD&&Object.assign(n,{...wA(e,fO.ATTR_NET_PEER_NAME,i,"hostname")}),t&tE.SemconvStability.STABLE&&Object.assign(n,{...wA(e,n3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=uMe(r.port,o);t&tE.SemconvStability.OLD&&Object.assign(n,wA(e,fO.ATTR_NET_PEER_PORT,a,"port")),t&tE.SemconvStability.STABLE&&Object.assign(n,wA(e,n3.ATTR_SERVER_PORT,a,"port"))}else{let r=dIt(e);n[r3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=cMe(o.protocol);Object.assign(n,{...wA(r,r3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=lMe(o.hostname);t&tE.SemconvStability.OLD&&Object.assign(n,{...wA(r,fO.ATTR_NET_PEER_NAME,a,"hostname")}),t&tE.SemconvStability.STABLE&&Object.assign(n,{...wA(r,n3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=uMe(o.port?parseInt(o.port):void 0,i);t&tE.SemconvStability.OLD&&Object.assign(n,wA(r,fO.ATTR_NET_PEER_PORT,c,"port")),t&tE.SemconvStability.STABLE&&Object.assign(n,wA(r,n3.ATTR_SERVER_PORT,c,"port"))}catch(o){PJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};pi.getConnectionAttributesFromUrl=fIt;var AIt=e=>e.setValue(UJ,!0);pi.markConfirmChannelTracing=AIt;var mIt=e=>e.deleteValue(UJ);pi.unmarkConfirmChannelTracing=mIt;var gIt=e=>e.getValue(UJ)===!0;pi.isConfirmChannelTracing=gIt});var pMe=F(Vv=>{"use strict";A();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.61.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var AMe=F(a3=>{"use strict";A();Object.defineProperty(a3,"__esModule",{value:!0});a3.AmqplibInstrumentation=void 0;var Ko=(Ge(),ke(Ze)),o3=Tr(),Cr=tn(),hIt=wJ(),Ml=MJ(),Gu=kJ(),fi=dMe(),fMe=pMe(),i3=[">=0.5.5 <1"],LJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(fMe.PACKAGE_NAME,fMe.PACKAGE_VERSION,{...Gu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Gu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",i3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",i3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",i3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",i3,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,Gu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Gu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Gu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Gu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Gu.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 m=(0,fi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,fi.getConnectionAttributesFromServer)(d);d[fi.CONNECTION_ATTRIBUTES]={...m,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Gu.EndOperation.ChannelClosed,void 0);let i=this[fi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[fi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Gu.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let m=this,h=n===Gu.EndOperation.Reject?c:d,S=m[fi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Gu.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,fi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[fi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[fi.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Ko.propagation.extract(Ko.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=y?Ko.trace.getSpan(y)?.spanContext():void 0;y=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Ko.SpanKind.CONSUMER,attributes:{...d?.connection?.[fi.CONNECTION_ATTRIBUTES],[Ml.ATTR_MESSAGING_DESTINATION]:C,[Ml.ATTR_MESSAGING_DESTINATION_KIND]:Ml.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Ml.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[hIt.ATTR_MESSAGING_OPERATION]:Ml.MESSAGING_OPERATION_VALUE_PROCESS,[Ml.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Ml.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&&Ko.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(d[fi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,o3.hrTime)()}),h[fi.MESSAGE_STORED_SPAN]=x);let M=y||Ko.ROOT_CONTEXT;Ko.context.with(Ko.trace.setSpan(M,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Gu.EndOperation.AutoAck),x.end())};return arguments[1]=m,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,m){let h=this,{span:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Cr.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!0}),M=>{M&&Ko.diag.error("amqplib instrumentation: publishHook error",M)},!0);let v=function(M,Q){try{m?.call(this,M,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:M}),G=>{G&&Ko.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),M&&S.setStatus({code:Ko.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,fi.markConfirmChannelTracing)(Ko.context.active()),N=[...arguments];return N[3]=y,N[4]=Ko.context.bind((0,fi.unmarkConfirmChannelTracing)(Ko.trace.setSpan(x,S)),v),Ko.context.with(x,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,fi.isConfirmChannelTracing)(Ko.context.active()))return n.apply(this,arguments);{let m=this,{span:h,modifiedOptions:S}=r.createPublishSpan(r,i,a,m,d),{publishHook:y}=r.getConfig();y&&(0,Cr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),x=>{x&&Ko.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,fi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Ko.SpanKind.PRODUCER,attributes:{...o.connection[fi.CONNECTION_ATTRIBUTES],[Ml.ATTR_MESSAGING_DESTINATION]:n,[Ml.ATTR_MESSAGING_DESTINATION_KIND]:Ml.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Ml.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Ml.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Ml.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Ko.propagation.inject(Ko.trace.setSpan(Ko.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[fi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Ko.SpanStatusCode.ERROR,message:r!==Gu.EndOperation.ChannelClosed&&r!==Gu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[fi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[fi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[fi.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&&Ko.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,o3.hrTime)(),r=t[fi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,o3.hrTimeDuration)(a.timeOfConsume,n);if((0,o3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Gu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};a3.AmqplibInstrumentation=LJ});var gMe=F(nE=>{"use strict";A();Object.defineProperty(nE,"__esModule",{value:!0});nE.EndOperation=nE.DEFAULT_CONFIG=nE.AmqplibInstrumentation=void 0;var _It=AMe();Object.defineProperty(nE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return _It.AmqplibInstrumentation}});var mMe=kJ();Object.defineProperty(nE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return mMe.DEFAULT_CONFIG}});Object.defineProperty(nE,"EndOperation",{enumerable:!0,get:function(){return mMe.EndOperation}})});var hMe,_Me,EIt,EMe,SIt,SMe,yMe=O(()=>{A();hMe=ie(gMe(),1);fr();_Me="Amqplib",EIt={consumeEndHook:e=>{Ur(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Ur(e,"auto.amqplib.otel.publisher")}},EMe=at(_Me,()=>new hMe.AmqplibInstrumentation(EIt)),SIt=()=>({name:_Me,setupOnce(){EMe()}}),SMe=SIt});var AO,QJ=O(()=>{A();AO="VercelAI"});function TIt(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 IIt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(CIt(t.content),bIt(t.content))}function CIt(e){for(let t of e){if(!TIt(t))continue;let n=mq(t.toolCallId);n?Tl(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"),en(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Tl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),en(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function bIt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&gq(t.toolCallId)}function vIt(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 u3,yIt,TMe,s3,IMe=O(()=>{A();u3=ie(tn(),1);lt();QJ();yIt=[">=3.0.0 <7"],TMe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];s3=class e extends u3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Jn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new u3.InstrumentationNodeModuleDefinition("ai",yIt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,m=gt(),h=m?.getIntegrationByName(AO),S=h?.options,y=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=vIt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},Jp(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&$i(x,"_sentry_active_span",bc())},()=>{},x=>{IIt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of TMe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=TMe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function RIt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var CMe,xIt,bMe,vMe=O(()=>{A();lt();fr();QJ();IMe();CMe=at(AO,()=>new s3({}));xIt=(e={})=>{let t;return{name:AO,options:e,setupOnce(){t=CMe()},afterAllSetup(n){e.force??RIt(n)?fL(n):t?.callWhenPatched(()=>fL(n))}}},bMe=xIt});var l3,DIt,c3,RMe=O(()=>{A();l3=ie(tn(),1);lt();DIt=[">=4.0.0 <7"],c3=class extends l3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Jn,t)}init(){return new l3.InstrumentationNodeModuleDefinition("openai",DIt,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(PS(v_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return gL(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 xMe,BIt,DMe,BMe=O(()=>{A();lt();fr();RMe();xMe=at(v_,e=>new c3(e)),BIt=(e={})=>({name:v_,setupOnce(){xMe(e)}}),DMe=BIt});var p3,NIt,d3,NMe=O(()=>{A();p3=ie(tn(),1);lt();NIt=[">=0.19.2 <1.0.0"],d3=class extends p3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Jn,t)}init(){return new p3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",NIt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(PS(R_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return hL(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 OMe,OIt,wMe,MMe=O(()=>{A();lt();fr();NMe();OMe=at(R_,e=>new d3(e)),OIt=(e={})=>({name:R_,options:e,setupOnce(){OMe(e)}}),wMe=OIt});var qv,kMe,f3,PMe=O(()=>{A();qv=ie(tn(),1);lt();kMe=[">=0.10.0 <2"],f3=class extends qv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Jn,t)}init(){return new qv.InstrumentationNodeModuleDefinition("@google/genai",kMe,n=>this._patch(n),n=>n,[new qv.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",kMe,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(PS(x_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return _L(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 qB(t,"GoogleGenAI",o),t}}});var UMe,wIt,LMe,QMe=O(()=>{A();lt();fr();PMe();UMe=at(x_,e=>new f3(e)),wIt=(e={})=>({name:x_,setupOnce(){UMe(e)}}),LMe=wIt});function MIt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function kIt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,m=MIt(d,t);return c.callbacks=m,Reflect.apply(r,o,i)}})}var rE,A3,m3,FMe=O(()=>{A();rE=ie(tn(),1);lt();A3=[">=0.1.0 <2.0.0"];m3=class extends rE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Jn,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 rE.InstrumentationNodeModuleDefinition(r,A3,this._patch.bind(this),o=>o,[new rE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,A3,this._patch.bind(this),o=>o)]));return t.push(new rE.InstrumentationNodeModuleDefinition("langchain",A3,this._patch.bind(this),r=>r,[new rE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",A3,this._patch.bind(this),r=>r)])),t}_patch(t){OV([v_,R_,x_]);let n=TL(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let m=a[d];typeof m=="function"&&(a[d]=kIt(m,n))}}}});var GMe,PIt,jMe,zMe=O(()=>{A();lt();fr();FMe();GMe=at(EL,e=>new m3(e)),PIt=(e={})=>({name:EL,setupOnce(){GMe(e)}}),jMe=PIt});var Yv,HMe,g3,$Me=O(()=>{A();Yv=ie(tn(),1);lt();HMe=[">=0.0.0 <2.0.0"],g3=class extends Yv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Jn,t)}init(){return new Yv.InstrumentationNodeModuleDefinition("@langchain/langgraph",HMe,this._patch.bind(this),n=>n,[new Yv.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",HMe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&CL(t.StateGraph.prototype,this.getConfig()),t}}});var VMe,UIt,qMe,YMe=O(()=>{A();lt();fr();$Me();VMe=at(IL,e=>new g3(e)),UIt=(e={})=>({name:IL,setupOnce(){VMe(e)}}),qMe=UIt});import*as JMe from"node:net";function ZMe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,vg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&Sl.error(S?.message)},!0)});let d=new vg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>KMe(h,n,r,e,a)),m=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of m)d.files.push(new vg.InstrumentationNodeModuleFile(h,t,S=>KMe(S,n,r,e,a),S=>WMe(S,r)));return d}function KMe(e,t,n,r,o){return WMe(e,n),t(e,"addDoc",LIt(r,o)),t(e,"getDocs",FIt(r,o)),t(e,"setDoc",GIt(r,o)),t(e,"deleteDoc",QIt(r,o)),e}function WMe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,vg.isWrapped)(e[n])&&t(e,n);return e}function LIt(e,t){return function(r){return function(o,i){let a=_3(e,"addDoc",o);return t(a),h3(a,()=>r(o,i))}}}function QIt(e,t){return function(r){return function(o){let i=_3(e,"deleteDoc",o.parent||o);return t(i),h3(i,()=>r(o))}}}function FIt(e,t){return function(r){return function(o){let i=_3(e,"getDocs",o);return t(i),h3(i,()=>r(o))}}}function GIt(e,t){return function(r){return function(o,i,a){let c=_3(e,"setDoc",o.parent||o);return t(c),h3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function h3(e,t){return Ye.with(zt.setSpan(Ye.active(),e),()=>(0,vg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function _3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:oo.CLIENT});return zIt(r,n),r.setAttribute(MC,t),r}function jIt(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(JMe.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 zIt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[n5]:t.path,[r5]:n.name,[_S]:"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}=jIt(i);c&&(a[d5]=c),d&&(a[p5]=d),e.setAttributes(a)}var vg,XMe=O(()=>{A();Ge();vg=ie(tn(),1);Kn()});function e2e(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,m=o.functions?.responseHook;typeof m=="function"&&(a=(y,C)=>{(0,Rg.safeExecuteInTheMiddle)(()=>m(y,C),v=>{v&&Sl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Rg.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&Sl.error(C?.message)},!0)});let h=new Rg.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 Rg.InstrumentationNodeModuleFile(y,t,v=>HIt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>t2e(v,r)))}),h}function ju(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...m){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:oo.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),Ye.with(zt.setSpan(Ye.active(),S),async()=>{let C,v;try{v=await a.apply(this,m)}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 HIt(e,t,n,r,o,i){switch(t2e(e,n),i){case"function":t(e,"onRequest",ju(r,o,"http.request")),t(e,"onCall",ju(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ju(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ju(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ju(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ju(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ju(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ju(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ju(r,o,"storage.object.metadataUpdated"));break}return e}function t2e(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,Rg.isWrapped)(e[r])&&t(e,r);return e}var Rg,n2e=O(()=>{A();Ge();Rg=ie(tn(),1)});var o2e,r2e,$It,VIt,E3,i2e=O(()=>{A();o2e=ie(tn(),1);lt();XMe();n2e();r2e={},$It=[">=3.0.0 <5"],VIt=[">=6.0.0 <7"],E3=class extends o2e.InstrumentationBase{constructor(t=r2e){super("@sentry/instrumentation-firebase",Jn,t)}setConfig(t={}){super.setConfig({...r2e,...t})}init(){let t=[];return t.push(ZMe(this.tracer,$It,this._wrap,this._unwrap,this.getConfig())),t.push(e2e(this.tracer,VIt,this._wrap,this._unwrap,this.getConfig())),t}}});var a2e,qIt,s2e,YIt,u2e,c2e=O(()=>{A();lt();fr();i2e();a2e="Firebase",qIt={firestoreSpanCreationHook:e=>{Ur(e,"auto.firebase.otel.firestore"),e.setAttribute(Zt,"db.query")},functions:{requestHook:e=>{Ur(e,"auto.firebase.otel.functions"),e.setAttribute(Zt,"http.request")},errorHook:async(e,t)=>{t&&(en(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await _b(2e3))}}},s2e=at(a2e,()=>new E3(qIt)),YIt=()=>({name:a2e,setupOnce(){s2e()}}),u2e=YIt});function l2e(){return[fxe(),qDe(),S1e(),uwe(),sBe(),TBe(),MBe(),VBe(),CNe(),$Ne(),zOe(),rwe(),Cwe(),Uwe(),Zwe(),aMe(),U1e(),SMe(),Y1e(),jMe(),qMe(),bMe(),DMe(),wMe(),LMe(),KNe(),u2e()]}var d2e=O(()=>{A();yMe();MMe();Lwe();Axe();JDe();c2e();sMe();QMe();T1e();owe();cwe();L1e();bwe();zMe();YMe();K1e();uBe();IBe();kBe();qBe();BMe();VNe();JNe();HOe();bNe();Wwe();vMe()});function f2e(e,t={}){e.getOptions().debug&&q7();let[n,r]=KIt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function KIt(e,t={}){let n=new p2e.BasicTracerProvider({sampler:new BQ(e),resource:(0,S3.defaultResource)().merge((0,S3.resourceFromAttributes)({[f5]:"node",[t5]:"sentry",[A5]:Jn})),forceFlushTimeoutMillis:500,spanProcessors:[new DQ({timeout:JIt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});zt.setGlobalTracerProvider(n),Fp.setGlobalPropagator(new xQ);let r=new OQ;return Ye.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function JIt(e){if(e!=null){if(e>FJ)return _a&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${FJ}`),FJ;if(e<=0||Number.isNaN(e)){_a&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var S3,p2e,FJ,A2e=O(()=>{A();Ge();S3=ie(a7(),1),p2e=ie(O7(),1);Kn();lt();fr();Jb();XS();FJ=1e6});function m2e(){return QQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(zRe(),WRe())}function g2e(e){return[...m2e(),...vi(e)?l2e():[]]}function GJ(e={}){return ZIt(e,g2e)}function ZIt(e={},t){US(e,"node");let n=EY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(f2e(n,{spanProcessors:e.openTelemetrySpanProcessors}),FQ()),n}var h2e=O(()=>{A();lt();fr();HRe();XRe();d2e();A2e()});var Kv=O(()=>{A();h2e();lt();fr()});function ea(){return WIt}function zu(){return _2e}function E2e(){return XIt}var WIt,_2e,XIt,kl=O(()=>{"use strict";A();WIt="prod",_2e="0.1.102",XIt=`@tanagram/lore/${_2e}`});function oCt(e=""){if(!nCt.test(e))return e!==e.toLowerCase()}function S2e(e,t){let n=t??rCt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let m=oCt(c);if(a===!1){if(i===!1&&m===!0){r.push(o),o=c,i=m;continue}if(i===!0&&m===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=m;continue}}o+=c,i=m,a=d}return r.push(o),r}function iCt(e){return e?e[0].toUpperCase()+e.slice(1):""}function aCt(e){return e?e[0].toLowerCase()+e.slice(1):""}function sCt(e,t){return e?(Array.isArray(e)?e:S2e(e)).map(n=>iCt(t?.normalize?n.toLowerCase():n)).join(""):""}function gO(e,t){return aCt(sCt(e||"",t))}function y3(e,t){return e?(Array.isArray(e)?e:S2e(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function y2e(e){return y3(e||"","_")}var nCt,rCt,T2e=O(()=>{A();nCt=/\d/,rCt=["-","_","/","."]});import{parseArgs as uCt}from"node:util";function b3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function jJ(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 SK(e,t,n,r=void 0){n&&(0,FN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&cBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function h0t(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(SK(t,o,n,r),o)).catch(o=>{throw lBe(t,o),o}).finally(()=>t.end()):(SK(t,e,n,r),t.end(),e)}L_.handlePromiseResponse=h0t;function _0t(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,m)=>(d?lBe(r,d):SK(r,m,i,a),r.end(),e(d,m)),t.apply(n,o)}L_.handleCallbackResponse=_0t});var pBe=F(_v=>{"use strict";A();Object.defineProperty(_v,"__esModule",{value:!0});_v.PACKAGE_NAME=_v.PACKAGE_VERSION=void 0;_v.PACKAGE_VERSION="0.60.0";_v.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var hBe=F(Nc=>{"use strict";A();Object.defineProperty(Nc,"__esModule",{value:!0});Nc.MongooseInstrumentation=Nc._ALREADY_INSTRUMENTED=Nc._STORED_PARENT_SPAN=void 0;var Sa=(Ge(),ke(Ze)),E0t=Tr(),yK=dBe(),vs=tn(),fBe=pBe(),Q_=EK(),ay=(Kn(),ke(Pr)),V4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],S0t=["remove","count","findOneAndRemove",...V4],y0t=["count","findOneAndRemove",...V4],T0t=[...V4];function ABe(e){return e?e.startsWith("6.")||e.startsWith("5.")?S0t:e.startsWith("7.")?y0t:T0t:V4}function mBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function gBe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Nc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Nc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var TK=class extends vs.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(fBe.PACKAGE_NAME,fBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vs.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,vs.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new vs.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,mBe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),gBe(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)),ABe(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=ABe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,mBe(n)&&this._unwrap(r.Model.prototype,"remove"),gBe(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&&Sa.trace.getSpan(Sa.context.active())===void 0)return r.apply(this,arguments);let a=this[Nc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&vs.SemconvStability.OLD&&(c[Q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&vs.SemconvStability.STABLE&&(c[ay.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Nc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return r.apply(this,arguments);let a=this[Nc._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&vs.SemconvStability.OLD&&(c[Q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&vs.SemconvStability.STABLE&&(c[ay.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let m={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,d);r._dbSemconvStability&vs.SemconvStability.OLD&&(m[Q_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&vs.SemconvStability.STABLE&&(m[ay.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(S,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,S=c;typeof a=="function"?(m=a,h=void 0,S=void 0):typeof c=="function"&&(m=c,S=void 0);let y={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&vs.SemconvStability.OLD&&(y[Q_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&vs.SemconvStability.STABLE&&(y[ay.ATTR_DB_QUERY_TEXT]=N)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),x=r._handleResponse(v,o,this,arguments,m,n);return x&&typeof x=="object"&&(x[Nc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Sa.trace.getSpan(Sa.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let m={};switch(t){case"insertMany":m.documents=a;break;case"bulkWrite":m.operations=a;break;default:m.document=a;break}c!==void 0&&(m.options=c);let h={},{dbStatementSerializer:S}=r.getConfig();if(S){let C=S(t,m);r._dbSemconvStability&vs.SemconvStability.OLD&&(h[Q_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&vs.SemconvStability.STABLE&&(h[ay.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=Sa.trace.getSpan(Sa.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Nc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Nc._STORED_PARENT_SPAN]=Sa.trace.getSpan(Sa.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,yK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&vs.SemconvStability.OLD&&(a[Q_.ATTR_DB_OPERATION]=r,a[Q_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&vs.SemconvStability.STABLE&&(a[ay.ATTR_DB_OPERATION_NAME]=r,a[ay.ATTR_DB_SYSTEM_NAME]=Q_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&vs.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Sa.SpanKind.CLIENT,attributes:a},i?Sa.trace.setSpan(Sa.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,yK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,yK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Sa.context.with((0,E0t.suppressTracing)(Sa.context.active()),t):t()}};Nc.MongooseInstrumentation=TK});var _Be=F(q4=>{"use strict";A();Object.defineProperty(q4,"__esModule",{value:!0});q4.MongooseInstrumentation=void 0;var I0t=hBe();Object.defineProperty(q4,"MongooseInstrumentation",{enumerable:!0,get:function(){return I0t.MongooseInstrumentation}})});var EBe,SBe,yBe,C0t,TBe,IBe=O(()=>{A();EBe=ie(_Be(),1);fr();SBe="Mongoose",yBe=at(SBe,()=>new EBe.MongooseInstrumentation({responseHook(e){Ur(e,"auto.db.otel.mongoose")}})),C0t=()=>({name:SBe,setupOnce(){yBe()}}),TBe=C0t});var CBe=F(Zi=>{"use strict";A();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Zi.DB_SYSTEM_VALUE_MYSQL=Zi.ATTR_NET_PEER_PORT=Zi.ATTR_NET_PEER_NAME=Zi.ATTR_DB_USER=Zi.ATTR_DB_SYSTEM=Zi.ATTR_DB_STATEMENT=Zi.ATTR_DB_NAME=Zi.ATTR_DB_CONNECTION_STRING=void 0;Zi.ATTR_DB_CONNECTION_STRING="db.connection_string";Zi.ATTR_DB_NAME="db.name";Zi.ATTR_DB_STATEMENT="db.statement";Zi.ATTR_DB_SYSTEM="db.system";Zi.ATTR_DB_USER="db.user";Zi.ATTR_NET_PEER_NAME="net.peer.name";Zi.ATTR_NET_PEER_PORT="net.peer.port";Zi.DB_SYSTEM_VALUE_MYSQL="mysql";Zi.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var bBe=F(GN=>{"use strict";A();Object.defineProperty(GN,"__esModule",{value:!0});GN.AttributeNames=void 0;var b0t;(function(e){e.MYSQL_VALUES="db.mysql.values"})(b0t=GN.AttributeNames||(GN.AttributeNames={}))});var vBe=F(eu=>{"use strict";A();Object.defineProperty(eu,"__esModule",{value:!0});eu.getPoolNameOld=eu.arrayStringifyHelper=eu.getSpanName=eu.getDbValues=eu.getDbQueryText=eu.getJDBCString=eu.getConfig=void 0;function v0t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}eu.getConfig=v0t;function R0t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}eu.getJDBCString=R0t;function x0t(e){return typeof e=="string"?e:e.sql}eu.getDbQueryText=x0t;function D0t(e,t){return IK(typeof e=="string"?t:t||e.values)}eu.getDbValues=D0t;function B0t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}eu.getSpanName=B0t;function IK(e){return e?`[${e.toString()}]`:""}eu.arrayStringifyHelper=IK;function N0t(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()}eu.getPoolNameOld=N0t});var RBe=F(Ev=>{"use strict";A();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.PACKAGE_NAME=Ev.PACKAGE_VERSION=void 0;Ev.PACKAGE_VERSION="0.60.0";Ev.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var DBe=F(Y4=>{"use strict";A();Object.defineProperty(Y4,"__esModule",{value:!0});Y4.MySQLInstrumentation=void 0;var Oc=(Ge(),ke(Ze)),Ld=tn(),Sv=(Kn(),ke(Pr)),Cg=CBe(),O0t=bBe(),sy=vBe(),xBe=RBe(),CK=class extends Ld.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(xBe.PACKAGE_NAME,xBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ld.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ld.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Cg.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 Ld.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Ld.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Ld.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Ld.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,m=(0,sy.getPoolNameOld)(t);r._connCountAdd(-d,m,"used"),r._connCountAdd(-c,m,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),m=c[d].pool;r._setPoolCallbacks(m,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Oc.context.active();return function(o,i){i&&((0,Ld.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Oc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:m,database:h,user:S}=(0,sy.getConfig)(t.config),y=parseInt(m,10),C=(0,sy.getDbQueryText)(o);r._dbSemconvStability&Ld.SemconvStability.OLD&&(c[Cg.ATTR_DB_SYSTEM]=Cg.DB_SYSTEM_VALUE_MYSQL,c[Cg.ATTR_DB_CONNECTION_STRING]=(0,sy.getJDBCString)(d,m,h),c[Cg.ATTR_DB_NAME]=h,c[Cg.ATTR_DB_USER]=S,c[Cg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ld.SemconvStability.STABLE&&(c[Sv.ATTR_DB_SYSTEM_NAME]=Sv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Sv.ATTR_DB_NAMESPACE]=h,c[Sv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&Ld.SemconvStability.OLD&&(c[Cg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[Cg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&Ld.SemconvStability.STABLE&&(c[Sv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Sv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,sy.getSpanName)(o),{kind:Oc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let M;Array.isArray(i)?M=i:arguments[2]&&(M=[i]),v.setAttribute(O0t.AttributeNames.MYSQL_VALUES,(0,sy.getDbValues)(o,M))}let x=Array.from(arguments).findIndex(M=>typeof M=="function"),N=Oc.context.active();if(x===-1){let M=Oc.context.with(Oc.trace.setSpan(Oc.context.active(),v),()=>n.apply(t,arguments));return Oc.context.bind(N,M),M.on("error",Q=>v.setStatus({code:Oc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,N)),Oc.context.with(Oc.trace.setSpan(Oc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Oc.SpanStatusCode.ERROR,message:o.message}),t.end(),Oc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,sy.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")})}};Y4.MySQLInstrumentation=CK});var BBe=F(K4=>{"use strict";A();Object.defineProperty(K4,"__esModule",{value:!0});K4.MySQLInstrumentation=void 0;var w0t=DBe();Object.defineProperty(K4,"MySQLInstrumentation",{enumerable:!0,get:function(){return w0t.MySQLInstrumentation}})});var NBe,OBe,wBe,M0t,MBe,kBe=O(()=>{A();NBe=ie(BBe(),1);fr();OBe="Mysql",wBe=at(OBe,()=>new NBe.MySQLInstrumentation({})),M0t=()=>({name:OBe,setupOnce(){wBe()}}),MBe=M0t});var bK=F(Wa=>{"use strict";A();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.DB_SYSTEM_VALUE_MYSQL=Wa.ATTR_NET_PEER_PORT=Wa.ATTR_NET_PEER_NAME=Wa.ATTR_DB_USER=Wa.ATTR_DB_SYSTEM=Wa.ATTR_DB_STATEMENT=Wa.ATTR_DB_NAME=Wa.ATTR_DB_CONNECTION_STRING=void 0;Wa.ATTR_DB_CONNECTION_STRING="db.connection_string";Wa.ATTR_DB_NAME="db.name";Wa.ATTR_DB_STATEMENT="db.statement";Wa.ATTR_DB_SYSTEM="db.system";Wa.ATTR_DB_USER="db.user";Wa.ATTR_NET_PEER_NAME="net.peer.name";Wa.ATTR_NET_PEER_PORT="net.peer.port";Wa.DB_SYSTEM_VALUE_MYSQL="mysql"});var RK=F(J4=>{"use strict";A();Object.defineProperty(J4,"__esModule",{value:!0});J4.addSqlCommenterComment=void 0;var vK=(Ge(),ke(Ze)),k0t=Tr();function P0t(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function U0t(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function L0t(e,t){if(typeof t!="string"||t.length===0||P0t(t))return t;let n=new k0t.W3CTraceContextPropagator,r={};n.inject(vK.trace.setSpan(vK.ROOT_CONTEXT,e),r,vK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=U0t(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}J4.addSqlCommenterComment=L0t});var PBe=F(Qd=>{"use strict";A();Object.defineProperty(Qd,"__esModule",{value:!0});Qd.getConnectionPrototypeToInstrument=Qd.once=Qd.getSpanName=Qd.getQueryText=Qd.getConnectionAttributes=void 0;var jN=bK(),Z4=tn(),xK=(Kn(),ke(Pr));function Q0t(e,t,n){let{host:r,port:o,database:i,user:a}=F0t(e),c={};t&Z4.SemconvStability.OLD&&(c[jN.ATTR_DB_CONNECTION_STRING]=G0t(r,o,i),c[jN.ATTR_DB_NAME]=i,c[jN.ATTR_DB_USER]=a),t&Z4.SemconvStability.STABLE&&(c[xK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&Z4.SemconvStability.OLD&&(c[jN.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[jN.ATTR_NET_PEER_PORT]=d)),n&Z4.SemconvStability.STABLE&&(c[xK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[xK.ATTR_SERVER_PORT]=d)),c}Qd.getConnectionAttributes=Q0t;function F0t(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function G0t(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function j0t(e,t,n,r=!1,o=z0t){let[i,a]=typeof e=="string"?[e,n]:[e.sql,H0t(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"}}Qd.getQueryText=j0t;function z0t(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function H0t(e){return"values"in e}function $0t(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Qd.getSpanName=$0t;var V0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Qd.once=V0t;function q0t(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Qd.getConnectionPrototypeToInstrument=q0t});var UBe=F(yv=>{"use strict";A();Object.defineProperty(yv,"__esModule",{value:!0});yv.PACKAGE_NAME=yv.PACKAGE_VERSION=void 0;yv.PACKAGE_VERSION="0.60.0";yv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var GBe=F(W4=>{"use strict";A();Object.defineProperty(W4,"__esModule",{value:!0});W4.MySQL2Instrumentation=void 0;var LBe=(Ge(),ke(Ze)),ef=tn(),DK=bK(),QBe=RK(),Tv=PBe(),FBe=UBe(),BK=(Kn(),ke(Pr)),NK=[">=1.4.2 <4"],OK=class extends ef.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(FBe.PACKAGE_NAME,FBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,ef.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,ef.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,ef.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,ef.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 ef.InstrumentationNodeModuleDefinition("mysql2",NK,i=>(n(i),i),()=>{},[new ef.InstrumentationNodeModuleFile("mysql2/promise.js",NK,i=>(n(i),i),()=>{}),new ef.InstrumentationNodeModuleFile("mysql2/lib/connection.js",NK,i=>{let a=(0,Tv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Tv.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:m,maskStatementHook:h,responseHook:S}=o.getConfig(),y=(0,Tv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Tv.getQueryText)(i,t,d,m,h);o._dbSemconvStability&ef.SemconvStability.OLD&&(y[DK.ATTR_DB_SYSTEM]=DK.DB_SYSTEM_VALUE_MYSQL,y[DK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&ef.SemconvStability.STABLE&&(y[BK.ATTR_DB_SYSTEM_NAME]=BK.DB_SYSTEM_NAME_VALUE_MYSQL,y[BK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,Tv.getSpanName)(i),{kind:LBe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,QBe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,QBe.addSqlCommenterComment)(v,i.sql)}));let x=(0,Tv.once)((N,M)=>{N?v.setStatus({code:LBe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,ef.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:M})},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",M=>{x(M)}).once("result",M=>{x(void 0,M)}),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)}}};W4.MySQL2Instrumentation=OK});var jBe=F(X4=>{"use strict";A();Object.defineProperty(X4,"__esModule",{value:!0});X4.MySQL2Instrumentation=void 0;var Y0t=GBe();Object.defineProperty(X4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return Y0t.MySQL2Instrumentation}})});var zBe,HBe,$Be,K0t,VBe,qBe=O(()=>{A();zBe=ie(jBe(),1);fr();HBe="Mysql2",$Be=at(HBe,()=>new zBe.MySQL2Instrumentation({responseHook(e){Ur(e,"auto.db.otel.mysql2")}})),K0t=()=>({name:HBe,setupOnce(){$Be()}}),VBe=K0t});var YBe=F(tu=>{"use strict";A();Object.defineProperty(tu,"__esModule",{value:!0});tu.DB_SYSTEM_VALUE_REDIS=tu.DB_SYSTEM_NAME_VALUE_REDIS=tu.ATTR_NET_PEER_PORT=tu.ATTR_NET_PEER_NAME=tu.ATTR_DB_SYSTEM=tu.ATTR_DB_STATEMENT=tu.ATTR_DB_CONNECTION_STRING=void 0;tu.ATTR_DB_CONNECTION_STRING="db.connection_string";tu.ATTR_DB_STATEMENT="db.statement";tu.ATTR_DB_SYSTEM="db.system";tu.ATTR_NET_PEER_NAME="net.peer.name";tu.ATTR_NET_PEER_PORT="net.peer.port";tu.DB_SYSTEM_NAME_VALUE_REDIS="redis";tu.DB_SYSTEM_VALUE_REDIS="redis"});var KBe=F(eF=>{"use strict";A();Object.defineProperty(eF,"__esModule",{value:!0});eF.endSpan=void 0;var J0t=(Ge(),ke(Ze)),Z0t=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:J0t.SpanStatusCode.ERROR,message:t.message})),e.end()};eF.endSpan=Z0t});var nF=F(tF=>{"use strict";A();Object.defineProperty(tF,"__esModule",{value:!0});tF.defaultDbStatementSerializer=void 0;var W0t=[{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}],X0t=(e,t)=>{if(Array.isArray(t)&&t.length){let n=W0t.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};tF.defaultDbStatementSerializer=X0t});var JBe=F(Iv=>{"use strict";A();Object.defineProperty(Iv,"__esModule",{value:!0});Iv.PACKAGE_NAME=Iv.PACKAGE_VERSION=void 0;Iv.PACKAGE_VERSION="0.62.0";Iv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var eNe=F(rF=>{"use strict";A();Object.defineProperty(rF,"__esModule",{value:!0});rF.IORedisInstrumentation=void 0;var F_=(Ge(),ke(Ze)),wc=tn(),G_=(Kn(),ke(Pr)),Mc=YBe(),ZBe=tn(),zN=KBe(),eSt=nF(),WBe=JBe(),XBe={requireParentSpan:!0},wK=class extends wc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(WBe.PACKAGE_NAME,WBe.PACKAGE_VERSION,{...XBe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,wc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,wc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...XBe,...t})}init(){return[new wc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,wc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,wc.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||eSt.defaultDbStatementSerializer,c=F_.trace.getSpan(F_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:m,port:h}=this.options,S=a(o.name,o.args);r._dbSemconvStability&wc.SemconvStability.OLD&&(d[Mc.ATTR_DB_SYSTEM]=Mc.DB_SYSTEM_VALUE_REDIS,d[Mc.ATTR_DB_STATEMENT]=S,d[Mc.ATTR_DB_CONNECTION_STRING]=`redis://${m}:${h}`),r._dbSemconvStability&wc.SemconvStability.STABLE&&(d[G_.ATTR_DB_SYSTEM_NAME]=Mc.DB_SYSTEM_NAME_VALUE_REDIS,d[G_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&wc.SemconvStability.OLD&&(d[Mc.ATTR_NET_PEER_NAME]=m,d[Mc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&wc.SemconvStability.STABLE&&(d[G_.ATTR_SERVER_ADDRESS]=m,d[G_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:F_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,ZBe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&F_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(M){(0,ZBe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,M),Q=>{Q&&F_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,zN.endSpan)(y,null),x(M)};let N=o.reject;return o.reject=function(M){(0,zN.endSpan)(y,M),N(M)},v}catch(v){throw(0,zN.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=F_.trace.getSpan(F_.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&wc.SemconvStability.OLD&&(o[Mc.ATTR_DB_SYSTEM]=Mc.DB_SYSTEM_VALUE_REDIS,o[Mc.ATTR_DB_STATEMENT]="connect",o[Mc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&wc.SemconvStability.STABLE&&(o[G_.ATTR_DB_SYSTEM_NAME]=Mc.DB_SYSTEM_NAME_VALUE_REDIS,o[G_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&wc.SemconvStability.OLD&&(o[Mc.ATTR_NET_PEER_NAME]=i,o[Mc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&wc.SemconvStability.STABLE&&(o[G_.ATTR_SERVER_ADDRESS]=i,o[G_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:F_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,zN.endSpan)(c,null),d}catch(d){throw(0,zN.endSpan)(c,d),d}}}};rF.IORedisInstrumentation=wK});var tNe=F(oF=>{"use strict";A();Object.defineProperty(oF,"__esModule",{value:!0});oF.IORedisInstrumentation=void 0;var tSt=eNe();Object.defineProperty(oF,"IORedisInstrumentation",{enumerable:!0,get:function(){return tSt.IORedisInstrumentation}})});var iF=F(Cv=>{"use strict";A();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-redis"});var nNe=F(j_=>{"use strict";A();Object.defineProperty(j_,"__esModule",{value:!0});j_.getTracedCreateStreamTrace=j_.getTracedCreateClient=j_.endSpan=void 0;var HN=(Ge(),ke(Ze)),nSt=(e,t)=>{t&&e.setStatus({code:HN.SpanStatusCode.ERROR,message:t.message}),e.end()};j_.endSpan=nSt;var rSt=e=>function(){let n=e.apply(this,arguments);return HN.context.bind(HN.context.active(),n)};j_.getTracedCreateClient=rSt;var oSt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){HN.context.bind(HN.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};j_.getTracedCreateStreamTrace=oSt});var aF=F(nu=>{"use strict";A();Object.defineProperty(nu,"__esModule",{value:!0});nu.DB_SYSTEM_VALUE_REDIS=nu.DB_SYSTEM_NAME_VALUE_REDIS=nu.ATTR_NET_PEER_PORT=nu.ATTR_NET_PEER_NAME=nu.ATTR_DB_SYSTEM=nu.ATTR_DB_STATEMENT=nu.ATTR_DB_CONNECTION_STRING=void 0;nu.ATTR_DB_CONNECTION_STRING="db.connection_string";nu.ATTR_DB_STATEMENT="db.statement";nu.ATTR_DB_SYSTEM="db.system";nu.ATTR_NET_PEER_NAME="net.peer.name";nu.ATTR_NET_PEER_PORT="net.peer.port";nu.DB_SYSTEM_NAME_VALUE_REDIS="redis";nu.DB_SYSTEM_VALUE_REDIS="redis"});var oNe=F(uF=>{"use strict";A();Object.defineProperty(uF,"__esModule",{value:!0});uF.RedisInstrumentationV2_V3=void 0;var Ol=tn(),sF=nNe(),rNe=iF(),$N=(Ge(),ke(Ze)),VN=(Kn(),ke(Pr)),uy=aF(),iSt=nF(),MK=class e extends Ol.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(rNe.PACKAGE_NAME,rNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ol.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ol.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ol.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ol.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,Ol.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ol.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=$N.trace.getSpan($N.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||iSt.defaultDbStatementSerializer,m={};t._semconvStability&Ol.SemconvStability.OLD&&Object.assign(m,{[uy.ATTR_DB_SYSTEM]:uy.DB_SYSTEM_VALUE_REDIS,[uy.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ol.SemconvStability.STABLE&&Object.assign(m,{[VN.ATTR_DB_SYSTEM_NAME]:uy.DB_SYSTEM_NAME_VALUE_REDIS,[VN.ATTR_DB_OPERATION_NAME]:i.command,[VN.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:$N.SpanKind.CLIENT,attributes:m});if(this.connection_options){let y={};t._semconvStability&Ol.SemconvStability.OLD&&Object.assign(y,{[uy.ATTR_NET_PEER_NAME]:this.connection_options.host,[uy.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ol.SemconvStability.STABLE&&Object.assign(y,{[VN.ATTR_SERVER_ADDRESS]:this.connection_options.host,[VN.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ol.SemconvStability.OLD&&h.setAttribute(uy.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=$N.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let N=a.responseHook;(0,Ol.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,x)},M=>{M&&t._diag.error("Error executing responseHook",M)},!0)}return(0,sF.endSpan)(h,v),$N.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,sF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,sF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,sF.getTracedCreateStreamTrace)(n)}}};uF.RedisInstrumentationV2_V3=MK});var aNe=F(cF=>{"use strict";A();Object.defineProperty(cF,"__esModule",{value:!0});cF.getClientAttributes=void 0;var kK=(Kn(),ke(Pr)),bv=aF(),iNe=tn();function aSt(e,t,n){let r={};return n&iNe.SemconvStability.OLD&&Object.assign(r,{[bv.ATTR_DB_SYSTEM]:bv.DB_SYSTEM_VALUE_REDIS,[bv.ATTR_NET_PEER_NAME]:t?.socket?.host,[bv.ATTR_NET_PEER_PORT]:t?.socket?.port,[bv.ATTR_DB_CONNECTION_STRING]:sSt(e,t?.url)}),n&iNe.SemconvStability.STABLE&&Object.assign(r,{[kK.ATTR_DB_SYSTEM_NAME]:bv.DB_SYSTEM_NAME_VALUE_REDIS,[kK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[kK.ATTR_SERVER_PORT]:t?.socket?.port}),r}cF.getClientAttributes=aSt;function sSt(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 lNe=F(lF=>{"use strict";A();Object.defineProperty(lF,"__esModule",{value:!0});lF.RedisInstrumentationV4_V5=void 0;var Fd=(Ge(),ke(Ze)),Eo=tn(),sNe=aNe(),uSt=nF(),uNe=iF(),PK=(Kn(),ke(Pr)),cSt=aF(),qN=Symbol("opentelemetry.instrumentation.redis.open_spans"),cNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),UK=class e extends Eo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(uNe.PACKAGE_NAME,uNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.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 Eo.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,Eo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,Eo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Eo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,Eo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,Eo.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,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,Eo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new Eo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,m){let h=t(d,m).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[qN];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[qN];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let m=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,m,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[cNe]=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,sNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Fd.SpanKind.CLIENT,attributes:a});return Fd.context.with(Fd.trace.setSpan(Fd.context.active(),c),()=>r.apply(this)).then(m=>(c.end(),m)).catch(m=>(c.recordException(m),c.setStatus({code:Fd.SpanStatusCode.ERROR,message:m.message}),c.end(),Promise.reject(m)))}}}_traceClientCommand(t,n,r,o){if(Fd.trace.getSpan(Fd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[cNe],c=o[0],d=o.slice(1),m=this.getConfig().dbStatementSerializer||uSt.defaultDbStatementSerializer,h=(0,sNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&Eo.SemconvStability.STABLE&&(h[PK.ATTR_DB_OPERATION_NAME]=c);try{let C=m(c,d);C!=null&&(this._semconvStability&Eo.SemconvStability.OLD&&(h[cSt.ATTR_DB_STATEMENT]=C),this._semconvStability&Eo.SemconvStability.STABLE&&(h[PK.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:Fd.SpanKind.CLIENT,attributes:h}),y=Fd.context.with(Fd.trace.setSpan(Fd.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[qN]=C[qN]||[],C[qN].push({span:S,commandName:c,commandArgs:d})}return y}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:m}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Eo.SemconvStability.STABLE&&d.setAttribute(PK.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],m,S,y)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Fd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};lF.RedisInstrumentationV4_V5=UK});var fNe=F(dF=>{"use strict";A();Object.defineProperty(dF,"__esModule",{value:!0});dF.RedisInstrumentation=void 0;var lSt=tn(),dNe=iF(),dSt=oNe(),pSt=lNe(),pNe={requireParentSpan:!1},LK=class extends lSt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...pNe,...t};super(dNe.PACKAGE_NAME,dNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new dSt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new pSt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...pNe,...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())}};dF.RedisInstrumentation=LK});var ANe=F(pF=>{"use strict";A();Object.defineProperty(pF,"__esModule",{value:!0});pF.RedisInstrumentation=void 0;var fSt=fNe();Object.defineProperty(pF,"RedisInstrumentation",{enumerable:!0,get:function(){return fSt.RedisInstrumentation}})});function YN(e,t){return e.includes(t.toLowerCase())}function FK(e){return YN(QK,e)?"cache.get":YN(mSt,e)?"cache.put":void 0}function gSt(e,t){return t.some(n=>e.startsWith(n))}function gNe(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)?mNe(o.map(i=>n(i))):["<unknown>"],r=t[0];return YN(ASt,e)&&r!=null?n(r):mNe(t.map(o=>n(o)))}catch{return}}function hNe(e,t,n){if(!FK(e))return!1;for(let r of t)if(gSt(r,n))return!0;return!1}function _Ne(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 mNe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var ASt,QK,mSt,ENe=O(()=>{A();ASt=["get","set","setex"],QK=["get","mget"],mSt=["set","setex"]});var SNe,yNe,fF,KN,TNe,hSt,_St,INe,ESt,CNe,bNe=O(()=>{A();SNe=ie(tNe(),1),yNe=ie(ANe(),1);lt();fr();ENe();fF="Redis",KN={},TNe=(e,t,n,r)=>{e.setAttribute(Mt,"auto.db.otel.redis");let o=gNe(t,n),i=FK(t);if(!o||!i||!KN.cachePrefixes||!hNe(t,o,KN.cachePrefixes))return;let a=Nt(e).data["net.peer.name"],c=Nt(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=_Ne(r);d&&e.setAttribute(H9,d),YN(QK,t)&&d!==void 0&&e.setAttribute(j9,d>0),e.setAttributes({[Zt]:i,[z9]:o});let m=o.join(", ");e.updateName(KN.maxCacheKeyLength?r_(m,KN.maxCacheKeyLength):m)},hSt=at(`${fF}.IORedis`,()=>new SNe.IORedisInstrumentation({responseHook:TNe})),_St=at(`${fF}.Redis`,()=>new yNe.RedisInstrumentation({responseHook:TNe})),INe=Object.assign(()=>{hSt(),_St()},{id:fF}),ESt=(e={})=>({name:fF,setupOnce(){KN=e,INe()}}),CNe=ESt});var vNe=F(AF=>{"use strict";A();Object.defineProperty(AF,"__esModule",{value:!0});AF.EVENT_LISTENERS_SET=void 0;AF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var GK=F(JN=>{"use strict";A();Object.defineProperty(JN,"__esModule",{value:!0});JN.AttributeNames=void 0;var SSt;(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"})(SSt=JN.AttributeNames||(JN.AttributeNames={}))});var jK=F(xr=>{"use strict";A();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 zK=F(ZN=>{"use strict";A();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.SpanNames=void 0;var ySt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(ySt=ZN.SpanNames||(ZN.SpanNames={}))});var wNe=F(nr=>{"use strict";A();Object.defineProperty(nr,"__esModule",{value:!0});nr.sanitizedErrorMessage=nr.isObjectWithTextString=nr.getErrorMessage=nr.patchClientConnectCallback=nr.patchCallbackPGPool=nr.updateCounter=nr.getPoolName=nr.patchCallback=nr.handleExecutionResult=nr.handleConfigQuery=nr.shouldSkipInstrumentation=nr.getSemanticAttributesFromPoolConnection=nr.getSemanticAttributesFromConnection=nr.getConnectionString=nr.parseAndMaskConnectionString=nr.parseNormalizedOperationName=nr.getQuerySpanName=void 0;var z_=(Ge(),ke(Ze)),mF=GK(),Gd=(Kn(),ke(Pr)),li=jK(),cy=tn(),RNe=zK();function xNe(e,t){if(!t)return RNe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:DNe(t.text);return`${RNe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}nr.getQuerySpanName=xNe;function DNe(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}nr.parseNormalizedOperationName=DNe;function BNe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}nr.parseAndMaskConnectionString=BNe;function HK(e){if("connectionString"in e&&e.connectionString)return BNe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}nr.getConnectionString=HK;function gF(e){if(Number.isInteger(e))return e}function NNe(e,t){let n={};return t&cy.SemconvStability.OLD&&(n={...n,[li.ATTR_DB_SYSTEM]:li.DB_SYSTEM_VALUE_POSTGRESQL,[li.ATTR_DB_NAME]:e.database,[li.ATTR_DB_CONNECTION_STRING]:HK(e),[li.ATTR_DB_USER]:e.user,[li.ATTR_NET_PEER_NAME]:e.host,[li.ATTR_NET_PEER_PORT]:gF(e.port)}),t&cy.SemconvStability.STABLE&&(n={...n,[Gd.ATTR_DB_SYSTEM_NAME]:Gd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Gd.ATTR_DB_NAMESPACE]:e.namespace,[Gd.ATTR_SERVER_ADDRESS]:e.host,[Gd.ATTR_SERVER_PORT]:gF(e.port)}),n}nr.getSemanticAttributesFromConnection=NNe;function TSt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[mF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[mF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&cy.SemconvStability.OLD&&(r={...r,[li.ATTR_DB_SYSTEM]:li.DB_SYSTEM_VALUE_POSTGRESQL,[li.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[li.ATTR_DB_CONNECTION_STRING]:HK(e),[li.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[li.ATTR_NET_PEER_PORT]:Number(n?.port)||gF(e.port),[li.ATTR_DB_USER]:n?.username??e.user}),t&cy.SemconvStability.STABLE&&(r={...r,[Gd.ATTR_DB_SYSTEM_NAME]:Gd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Gd.ATTR_DB_NAMESPACE]:e.namespace,[Gd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Gd.ATTR_SERVER_PORT]:Number(n?.port)||gF(e.port)}),r}nr.getSemanticAttributesFromPoolConnection=TSt;function ISt(e){return e.requireParentSpan===!0&&z_.trace.getSpan(z_.context.active())===void 0}nr.shouldSkipInstrumentation=ISt;function CSt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=xNe(i,r),c=e.startSpan(a,{kind:z_.SpanKind.CLIENT,attributes:NNe(o,n)});if(!r)return c;if(r.text&&(n&cy.SemconvStability.OLD&&c.setAttribute(li.ATTR_DB_STATEMENT,r.text),n&cy.SemconvStability.STABLE&&c.setAttribute(Gd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(m=>m==null?"null":m instanceof Buffer?m.toString():typeof m=="object"?typeof m.toPostgres=="function"?m.toPostgres():JSON.stringify(m):m.toString());c.setAttribute(mF.AttributeNames.PG_VALUES,d)}catch(d){z_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(mF.AttributeNames.PG_PLAN,r.name),c}nr.handleConfigQuery=CSt;function ONe(e,t,n){typeof e.responseHook=="function"&&(0,cy.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&z_.diag.error("Error running response hook",r)},!0)}nr.handleExecutionResult=ONe;function bSt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Gd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(hF(a)),t.setStatus({code:z_.SpanStatusCode.ERROR,message:a.message})):ONe(e,t,c),o(),t.end(),n.call(this,a,c)}}nr.patchCallback=bSt;function vSt(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()}nr.getPoolName=vSt;function RSt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[li.ATTR_DB_CLIENT_CONNECTION_STATE]:li.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[li.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[li.ATTR_DB_CLIENT_CONNECTION_STATE]:li.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[li.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[li.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}nr.updateCounter=RSt;function xSt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(hF(r)),e.setStatus({code:z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}nr.patchCallbackPGPool=xSt;function DSt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(hF(r)),e.setStatus({code:z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}nr.patchClientConnectCallback=DSt;function BSt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}nr.getErrorMessage=BSt;function NSt(e){return typeof e=="object"&&typeof e?.text=="string"}nr.isObjectWithTextString=NSt;function hF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}nr.sanitizedErrorMessage=hF});var MNe=F(vv=>{"use strict";A();Object.defineProperty(vv,"__esModule",{value:!0});vv.PACKAGE_NAME=vv.PACKAGE_VERSION=void 0;vv.PACKAGE_VERSION="0.66.0";vv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var FNe=F(EF=>{"use strict";A();Object.defineProperty(EF,"__esModule",{value:!0});EF.PgInstrumentation=void 0;var Lu=tn(),Qr=(Ge(),ke(Ze)),kNe=vNe(),Yo=wNe(),PNe=RK(),UNe=MNe(),LNe=zK(),_F=Tr(),tf=(Kn(),ke(Pr)),WN=jK();function Rv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var $K=class extends Lu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t),this._semconvStability=(0,Lu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(tf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Qr.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(WN.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(WN.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 Lu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Lu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Lu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Rv(c);return this._patchPgClient(d.Client),c},c=>{let d=Rv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Lu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Rv(c);return(0,Lu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Rv(c);(0,Lu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Rv(t);return(0,Lu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Lu.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=Rv(t);return(0,Lu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Lu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Yo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(LNe.SpanNames.CONNECT,{kind:Qr.SpanKind.CLIENT,attributes:Yo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Qr.trace.getSpan(Qr.context.active());o=Yo.patchClientConnectCallback(a,o),d&&(o=Qr.context.bind(Qr.context.active(),o))}let c=Qr.context.with(Qr.trace.setSpan(Qr.context.active(),a),()=>n.call(this,o));return QNe(a,c)}}recordOperationDuration(t,n){let r={},o=[tf.ATTR_DB_NAMESPACE,tf.ATTR_ERROR_TYPE,tf.ATTR_SERVER_PORT,tf.ATTR_SERVER_ADDRESS,tf.ATTR_DB_OPERATION_NAME];this._semconvStability&Lu.SemconvStability.OLD&&o.push(WN.ATTR_DB_SYSTEM),this._semconvStability&Lu.SemconvStability.STABLE&&o.push(tf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,_F.hrTimeToMilliseconds)((0,_F.hrTimeDuration)(n,(0,_F.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Yo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,_F.hrTime)(),a=o[0],c=typeof a=="string",d=Yo.isObjectWithTextString(a),m=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[WN.ATTR_DB_SYSTEM]:WN.DB_SYSTEM_VALUE_POSTGRESQL,[tf.ATTR_DB_NAMESPACE]:this.database,[tf.ATTR_SERVER_PORT]:this.connectionParameters.port,[tf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};m?.text&&(h[tf.ATTR_DB_OPERATION_NAME]=Yo.parseNormalizedOperationName(m?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Yo.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,m);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,PNe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,PNe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Qr.trace.getSpan(Qr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Yo.patchCallback(y,C,o[o.length-1],h,S),N&&(o[o.length-1]=Qr.context.bind(Qr.context.active(),o[o.length-1]));else if(typeof m?.callback=="function"){let M=Yo.patchCallback(t.getConfig(),C,m.callback,h,S);N&&(M=Qr.context.bind(Qr.context.active(),M)),o[0].callback=M}}let{requestHook:v}=y;typeof v=="function"&&m&&(0,Lu.safeExecuteInTheMiddle)(()=>{let{database:N,host:M,port:Q,user:j}=this.connectionParameters;v(C,{connection:{database:N,host:M,port:Q,user:j},query:{text:m.text,values:m.values,name:m.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(Yo.sanitizedErrorMessage(N)),C.setStatus({code:Qr.SpanStatusCode.ERROR,message:Yo.getErrorMessage(N)}),C.end(),N}return x instanceof Promise?x.then(N=>new Promise(M=>{Yo.handleExecutionResult(t.getConfig(),C,N),S(),C.end(),M(N)})).catch(N=>new Promise((M,Q)=>{N instanceof Error&&C.recordException(Yo.sanitizedErrorMessage(N)),C.setStatus({code:Qr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[kNe.EVENT_LISTENERS_SET])return;let n=Yo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Yo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[kNe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Yo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(LNe.SpanNames.POOL_CONNECT,{kind:Qr.SpanKind.CLIENT,attributes:Yo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Qr.trace.getSpan(Qr.context.active());o=Yo.patchCallbackPGPool(a,o),d&&(o=Qr.context.bind(Qr.context.active(),o))}let c=Qr.context.with(Qr.trace.setSpan(Qr.context.active(),a),()=>n.call(this,o));return QNe(a,c)}}};EF.PgInstrumentation=$K;function QNe(e,t){if(!(t instanceof Promise))return t;let n=t;return Qr.context.bind(Qr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Yo.sanitizedErrorMessage(r)),e.setStatus({code:Qr.SpanStatusCode.ERROR,message:Yo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var GNe=F(xv=>{"use strict";A();Object.defineProperty(xv,"__esModule",{value:!0});xv.AttributeNames=xv.PgInstrumentation=void 0;var OSt=FNe();Object.defineProperty(xv,"PgInstrumentation",{enumerable:!0,get:function(){return OSt.PgInstrumentation}});var wSt=GK();Object.defineProperty(xv,"AttributeNames",{enumerable:!0,get:function(){return wSt.AttributeNames}})});var jNe,zNe,HNe,MSt,$Ne,VNe=O(()=>{A();jNe=ie(GNe(),1);fr();zNe="Postgres",HNe=at(zNe,jNe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Ur(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),MSt=e=>({name:zNe,setupOnce(){HNe(e)}}),$Ne=MSt});var H_,qK,qNe,kSt,PSt,YNe,VK,USt,KNe,JNe=O(()=>{A();Ge();H_=ie(tn(),1);Kn();lt();fr();XS();qK="PostgresJs",qNe=[">=3.0.0 <4"],kSt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,PSt=Symbol.for("sentry.query.from.instrumented.sql"),YNe=at(qK,e=>new VK({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),VK=class extends H_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Jn,t)}init(){let t=new H_.InstrumentationNodeModuleDefinition("postgres",qNe,n=>{try{return this._patchPostgres(n)}catch(r){return _a&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new H_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,qNe,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 _a&&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 _a&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return VV(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:(qB(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return zt.getSpan(Ye.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(MC,r);return}let o=n?.match(kSt);o?.[1]&&t.setAttribute(MC,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[PSt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Ya({name:a||"postgresjs.query",op:"db"},c=>{Ur(c,"auto.db.postgresjs"),c.setAttributes({[_S]:"postgres",[o5]:a});let d=n.getConfig(),{requestHook:m}=d;m&&(0,H_.safeExecuteInTheMiddle)(()=>m(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),_a&&J.error(`Error in requestHook for ${qK} 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){_a&&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(i5,v?.[0]?.code||"unknown"),c.setAttribute(a5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){_a&&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}},USt=e=>({name:qK,setupOnce(){YNe(e)}}),KNe=USt});var ZNe=F(XN=>{"use strict";A();Object.defineProperty(XN,"__esModule",{value:!0});XN.SeverityNumber=void 0;var LSt;(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"})(LSt=XN.SeverityNumber||(XN.SeverityNumber={}))});var yF=F(Dv=>{"use strict";A();Object.defineProperty(Dv,"__esModule",{value:!0});Dv.NOOP_LOGGER=Dv.NoopLogger=void 0;var SF=class{emit(t){}};Dv.NoopLogger=SF;Dv.NOOP_LOGGER=new SF});var IF=F(Bv=>{"use strict";A();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.NOOP_LOGGER_PROVIDER=Bv.NoopLoggerProvider=void 0;var QSt=yF(),TF=class{getLogger(t,n,r){return new QSt.NoopLogger}};Bv.NoopLoggerProvider=TF;Bv.NOOP_LOGGER_PROVIDER=new TF});var KK=F(CF=>{"use strict";A();Object.defineProperty(CF,"__esModule",{value:!0});CF.ProxyLogger=void 0;var FSt=yF(),YK=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):FSt.NOOP_LOGGER}};CF.ProxyLogger=YK});var ZK=F(bF=>{"use strict";A();Object.defineProperty(bF,"__esModule",{value:!0});bF.ProxyLoggerProvider=void 0;var GSt=IF(),jSt=KK(),JK=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new jSt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:GSt.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)}};bF.ProxyLoggerProvider=JK});var WNe=F(vF=>{"use strict";A();Object.defineProperty(vF,"__esModule",{value:!0});vF._globalThis=void 0;vF._globalThis=typeof globalThis=="object"?globalThis:global});var XNe=F(RF=>{"use strict";A();Object.defineProperty(RF,"__esModule",{value:!0});RF._globalThis=void 0;var zSt=WNe();Object.defineProperty(RF,"_globalThis",{enumerable:!0,get:function(){return zSt._globalThis}})});var eOe=F(xF=>{"use strict";A();Object.defineProperty(xF,"__esModule",{value:!0});xF._globalThis=void 0;var HSt=XNe();Object.defineProperty(xF,"_globalThis",{enumerable:!0,get:function(){return HSt._globalThis}})});var tOe=F(xA=>{"use strict";A();Object.defineProperty(xA,"__esModule",{value:!0});xA.API_BACKWARDS_COMPATIBILITY_VERSION=xA.makeGetter=xA._global=xA.GLOBAL_LOGS_API_KEY=void 0;var $St=eOe();xA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");xA._global=$St._globalThis;function VSt(e,t,n){return r=>r===e?t:n}xA.makeGetter=VSt;xA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var rOe=F(DF=>{"use strict";A();Object.defineProperty(DF,"__esModule",{value:!0});DF.LogsAPI=void 0;var jd=tOe(),qSt=IF(),nOe=ZK(),WK=class e{constructor(){this._proxyLoggerProvider=new nOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return jd._global[jd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(jd._global[jd.GLOBAL_LOGS_API_KEY]=(0,jd.makeGetter)(jd.API_BACKWARDS_COMPATIBILITY_VERSION,t,qSt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=jd._global[jd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(jd._global,jd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete jd._global[jd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new nOe.ProxyLoggerProvider}};DF.LogsAPI=WK});var XK=F(Xa=>{"use strict";A();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.logs=Xa.ProxyLoggerProvider=Xa.ProxyLogger=Xa.NoopLoggerProvider=Xa.NOOP_LOGGER_PROVIDER=Xa.NoopLogger=Xa.NOOP_LOGGER=Xa.SeverityNumber=void 0;var YSt=ZNe();Object.defineProperty(Xa,"SeverityNumber",{enumerable:!0,get:function(){return YSt.SeverityNumber}});var oOe=yF();Object.defineProperty(Xa,"NOOP_LOGGER",{enumerable:!0,get:function(){return oOe.NOOP_LOGGER}});Object.defineProperty(Xa,"NoopLogger",{enumerable:!0,get:function(){return oOe.NoopLogger}});var iOe=IF();Object.defineProperty(Xa,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return iOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(Xa,"NoopLoggerProvider",{enumerable:!0,get:function(){return iOe.NoopLoggerProvider}});var KSt=KK();Object.defineProperty(Xa,"ProxyLogger",{enumerable:!0,get:function(){return KSt.ProxyLogger}});var JSt=ZK();Object.defineProperty(Xa,"ProxyLoggerProvider",{enumerable:!0,get:function(){return JSt.ProxyLoggerProvider}});var ZSt=rOe();Xa.logs=ZSt.LogsAPI.getInstance()});var aOe=F(Nv=>{"use strict";A();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.disableInstrumentations=Nv.enableInstrumentations=void 0;function WSt(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()}}Nv.enableInstrumentations=WSt;function XSt(e){e.forEach(t=>t.disable())}Nv.disableInstrumentations=XSt});var cOe=F(BF=>{"use strict";A();Object.defineProperty(BF,"__esModule",{value:!0});BF.registerInstrumentations=void 0;var sOe=(Ge(),ke(Ze)),eyt=XK(),uOe=aOe();function tyt(e){let t=e.tracerProvider||sOe.trace.getTracerProvider(),n=e.meterProvider||sOe.metrics.getMeterProvider(),r=e.loggerProvider||eyt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,uOe.enableInstrumentations)(o,t,n,r),()=>{(0,uOe.disableInstrumentations)(o)}}BF.registerInstrumentations=tyt});var _Oe=F(NF=>{"use strict";A();Object.defineProperty(NF,"__esModule",{value:!0});NF.satisfies=void 0;var rJ=(Ge(),ke(Ze)),AOe=/^(?: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-]+)*))?$/,nyt=/^(?<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-]+)*))?$/,ryt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function oyt(e,t,n){if(!iyt(e))return rJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=cyt(e);if(!r)return!1;let o=[],i=mOe(r,t,o,n);return i&&!n?.includePrerelease?syt(r,o):i}NF.satisfies=oyt;function iyt(e){return typeof e=="string"&&AOe.test(e)}function mOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(eJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Byt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!eJ(e,i,n,r))return!1;return!0}return eJ(e,t,n,r)}function eJ(e,t,n,r){if(t=uyt(t,r),t.includes(" "))return mOe(e,t,n,r);{let o=lyt(t);return n.push(o),ayt(e,o)}}function ayt(e,t){if(t.invalid)return!1;if(!t.version||nJ(t.version))return!0;let n=dOe(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=dOe(r,o)}return ryt[t.op]?.includes(n)}function syt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function uyt(e,t){return e=e.trim(),e=xyt(e,t),e=Ryt(e),e=Dyt(e,t),e=e.trim(),e}function Qu(e){return!e||e.toLowerCase()==="x"||e==="*"}function cyt(e){let t=e.match(AOe);if(!t){rJ.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 lyt(e){if(!e)return{};let t=e.match(nyt);if(!t)return rJ.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 nJ(e){return e==="*"||e==="x"||e==="X"}function lOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function dyt(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 pyt(e,t){if(nJ(e)||nJ(t))return 0;let[n,r]=dyt(lOe(e),lOe(t));return n>r?1:n<r?-1:0}function dOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=pyt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var gOe="[a-zA-Z0-9-]",hOe="0|[1-9]\\d*",fyt=`\\d*[a-zA-Z-]${gOe}*`,Ayt="((?:<|>)?=?)",pOe=`(?:${hOe}|${fyt})`,myt=`(?:-(${pOe}(?:\\.${pOe})*))`,fOe=`${gOe}+`,gyt=`(?:\\+(${fOe}(?:\\.${fOe})*))`,tJ=`${hOe}|x|X|\\*`,eO=`[v=\\s]*(${tJ})(?:\\.(${tJ})(?:\\.(${tJ})(?:${myt})?${gyt}?)?)?`,hyt=`^${Ayt}\\s*${eO}$`,_yt=new RegExp(hyt),Eyt=`^\\s*(${eO})\\s+-\\s+(${eO})\\s*$`,Syt=new RegExp(Eyt),yyt="(?:~>?)",Tyt=`^${yyt}${eO}$`,Iyt=new RegExp(Tyt),Cyt="(?:\\^)",byt=`^${Cyt}${eO}$`,vyt=new RegExp(byt);function Ryt(e){let t=Iyt;return e.replace(t,(n,r,o,i,a)=>{let c;return Qu(r)?c="":Qu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Qu(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 xyt(e,t){let n=vyt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Qu(i)?m="":Qu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Qu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function Dyt(e,t){let n=_yt;return e.replace(n,(r,o,i,a,c,d)=>{let m=Qu(i),h=m||Qu(a),S=h||Qu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",m?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Byt(e,t){let n=Syt;return e.replace(n,(r,o,i,a,c,d,m,h,S,y,C,v)=>(Qu(i)?o="":Qu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Qu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Qu(S)?h="":Qu(y)?h=`<${+S+1}.0.0-0`:Qu(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 oJ=F(Rs=>{"use strict";A();Object.defineProperty(Rs,"__esModule",{value:!0});Rs.massUnwrap=Rs.unwrap=Rs.massWrap=Rs.wrap=void 0;var Fu=console.error.bind(console);function tO(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 Nyt=(e,t,n)=>{if(!e||!e[t]){Fu("no original function "+String(t)+" to wrap");return}if(!n){Fu("no wrapper function"),Fu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Fu("original object and wrapper must be functions");return}let o=n(r,t);return tO(o,"__original",r),tO(o,"__unwrap",()=>{e[t]===o&&tO(e,t,r)}),tO(o,"__wrapped",!0),tO(e,t,o),o};Rs.wrap=Nyt;var Oyt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Fu("must provide one or more modules to patch"),Fu(new Error().stack);return}if(!(t&&Array.isArray(t))){Fu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Rs.wrap)(r,o,n)})})};Rs.massWrap=Oyt;var wyt=(e,t)=>{if(!e||!e[t]){Fu("no function to unwrap."),Fu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Fu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Rs.unwrap=wyt;var Myt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Fu("must provide one or more modules to patch"),Fu(new Error().stack);return}if(!(t&&Array.isArray(t))){Fu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Rs.unwrap)(n,r)})})};Rs.massUnwrap=Myt;function nO(e){e&&e.logger&&(typeof e.logger!="function"?Fu("new logger isn't a function, not replacing"):Fu=e.logger)}Rs.default=nO;nO.wrap=Rs.wrap;nO.massWrap=Rs.massWrap;nO.unwrap=Rs.unwrap;nO.massUnwrap=Rs.massUnwrap});var EOe=F(wF=>{"use strict";A();Object.defineProperty(wF,"__esModule",{value:!0});wF.InstrumentationAbstract=void 0;var iJ=(Ge(),ke(Ze)),kyt=XK(),OF=oJ(),aJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=iJ.diag.createComponentLogger({namespace:t}),this._tracer=iJ.trace.getTracer(t,n),this._meter=iJ.metrics.getMeter(t,n),this._logger=kyt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=OF.wrap;_unwrap=OF.unwrap;_massWrap=OF.massWrap;_massUnwrap=OF.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)}}};wF.InstrumentationAbstract=aJ});var SOe=F($_=>{"use strict";A();Object.defineProperty($_,"__esModule",{value:!0});$_.ModuleNameTrie=$_.ModuleNameSeparator=void 0;$_.ModuleNameSeparator="/";var MF=class{hooks=[];children=new Map},sJ=class{_trie=new MF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split($_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new MF,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split($_.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};$_.ModuleNameTrie=sJ});var TOe=F(kF=>{"use strict";A();Object.defineProperty(kF,"__esModule",{value:!0});kF.RequireInTheMiddleSingleton=void 0;var Pyt=CS(),yOe=Fe("path"),uJ=SOe(),Uyt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),cJ=class e{_moduleNameTrie=new uJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Pyt.Hook(null,{internals:!0},(t,n,r)=>{let o=Lyt(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 Uyt?new e:this._instance=this._instance??new e}};kF.RequireInTheMiddleSingleton=cJ;function Lyt(e){return yOe.sep!==uJ.ModuleNameSeparator?e.split(yOe.sep).join(uJ.ModuleNameSeparator):e}});var lJ=F(V_=>{"use strict";A();Object.defineProperty(V_,"__esModule",{value:!0});V_.isWrapped=V_.safeExecuteInTheMiddleAsync=V_.safeExecuteInTheMiddle=void 0;function Qyt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}V_.safeExecuteInTheMiddle=Qyt;async function Fyt(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}}V_.safeExecuteInTheMiddleAsync=Fyt;function Gyt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}V_.isWrapped=Gyt});var bOe=F(PF=>{"use strict";A();Object.defineProperty(PF,"__esModule",{value:!0});PF.InstrumentationBase=void 0;var rO=Fe("path"),IOe=Fe("util"),jyt=_Oe(),dJ=oJ(),zyt=EOe(),Hyt=TOe(),$yt=$Y(),oO=(Ge(),ke(Ze)),Vyt=CS(),qyt=Fe("fs"),Yyt=lJ(),pJ=class extends zyt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Hyt.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,Yyt.isWrapped)(t[n])&&this._unwrap(t,n),IOe.types.isProxy(t)){let o=(0,dJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,dJ.wrap)(t,n,r)};_unwrap=(t,n)=>IOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,dJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{oO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){oO.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{oO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){oO.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=Fe.resolve(n);Fe.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,qyt.readFileSync)(rO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{oO.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 COe(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=rO.normalize(r);return a.filter(m=>m.name===c).filter(m=>COe(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&rO.isAbsolute(c)){let m=rO.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=rO.isAbsolute(t.name)?new Vyt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new $yt.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}};PF.InstrumentationBase=pJ;function COe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,jyt.satisfies)(t,r,{includePrerelease:n}))}});var vOe=F(UF=>{"use strict";A();Object.defineProperty(UF,"__esModule",{value:!0});UF.normalize=void 0;var Kyt=Fe("path");Object.defineProperty(UF,"normalize",{enumerable:!0,get:function(){return Kyt.normalize}})});var ROe=F(Ov=>{"use strict";A();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.normalize=Ov.InstrumentationBase=void 0;var Jyt=bOe();Object.defineProperty(Ov,"InstrumentationBase",{enumerable:!0,get:function(){return Jyt.InstrumentationBase}});var Zyt=vOe();Object.defineProperty(Ov,"normalize",{enumerable:!0,get:function(){return Zyt.normalize}})});var fJ=F(wv=>{"use strict";A();Object.defineProperty(wv,"__esModule",{value:!0});wv.normalize=wv.InstrumentationBase=void 0;var xOe=ROe();Object.defineProperty(wv,"InstrumentationBase",{enumerable:!0,get:function(){return xOe.InstrumentationBase}});Object.defineProperty(wv,"normalize",{enumerable:!0,get:function(){return xOe.normalize}})});var DOe=F(LF=>{"use strict";A();Object.defineProperty(LF,"__esModule",{value:!0});LF.InstrumentationNodeModuleDefinition=void 0;var AJ=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||[]}};LF.InstrumentationNodeModuleDefinition=AJ});var BOe=F(QF=>{"use strict";A();Object.defineProperty(QF,"__esModule",{value:!0});QF.InstrumentationNodeModuleFile=void 0;var Wyt=fJ(),mJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Wyt.normalize)(t)}};QF.InstrumentationNodeModuleFile=mJ});var NOe=F(ly=>{"use strict";A();Object.defineProperty(ly,"__esModule",{value:!0});ly.semconvStabilityFromStr=ly.SemconvStability=void 0;var FF;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(FF=ly.SemconvStability||(ly.SemconvStability={}));function Xyt(e,t){let n=FF.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=FF.DUPLICATE;break}else o.toLowerCase()===e&&(n=FF.STABLE);return n}ly.semconvStabilityFromStr=Xyt});var wOe=F(Wi=>{"use strict";A();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.semconvStabilityFromStr=Wi.SemconvStability=Wi.safeExecuteInTheMiddleAsync=Wi.safeExecuteInTheMiddle=Wi.isWrapped=Wi.InstrumentationNodeModuleFile=Wi.InstrumentationNodeModuleDefinition=Wi.InstrumentationBase=Wi.registerInstrumentations=void 0;var eTt=cOe();Object.defineProperty(Wi,"registerInstrumentations",{enumerable:!0,get:function(){return eTt.registerInstrumentations}});var tTt=fJ();Object.defineProperty(Wi,"InstrumentationBase",{enumerable:!0,get:function(){return tTt.InstrumentationBase}});var nTt=DOe();Object.defineProperty(Wi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return nTt.InstrumentationNodeModuleDefinition}});var rTt=BOe();Object.defineProperty(Wi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return rTt.InstrumentationNodeModuleFile}});var gJ=lJ();Object.defineProperty(Wi,"isWrapped",{enumerable:!0,get:function(){return gJ.isWrapped}});Object.defineProperty(Wi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return gJ.safeExecuteInTheMiddle}});Object.defineProperty(Wi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return gJ.safeExecuteInTheMiddleAsync}});var OOe=NOe();Object.defineProperty(Wi,"SemconvStability",{enumerable:!0,get:function(){return OOe.SemconvStability}});Object.defineProperty(Wi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return OOe.semconvStabilityFromStr}})});function aTt(){let e=Mv[_J];return e?.helper?e.helper:Mv[hJ]?.helper}function sTt(e){let t={helper:e};Mv[_J]=t,Mv[hJ]=t}function uTt(){delete Mv[_J],delete Mv[hJ]}function dTt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}function POe(e,t,n,r,o){if(UOe(t.name,o))return;let i={attributes:t.attributes,kind:dTt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let m=r.get(d);return m?{context:{spanId:m,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)POe(e,d,n,r,o);a.end(t.endTime)})}function MOe(e,t){return fTt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function fTt(e){return e!=null&&typeof e.then=="function"}function UOe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var GF,oTt,iTt,hJ,_J,Mv,cTt,lTt,pTt,LOe,kOe,ATt,mTt,QOe,FOe=O(()=>{A();Ge();GF=ie(wOe(),1);Ge();oTt={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"}},iTt=oTt.version.split(".")[0],hJ="PRISMA_INSTRUMENTATION",_J=`V${iTt}_PRISMA_INSTRUMENTATION`,Mv=globalThis;cTt=process.env.PRISMA_SHOW_ALL_TRACES==="true",lTt="00-10-10-00";pTt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=zt.getSpanContext(e??Ye.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:lTt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)POe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ye.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!cTt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(UOe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return MOe(i,t(i,r))}return n.startActiveSpan(o,e,i=>MOe(i,t(i,r)))}};LOe={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},kOe=LOe.version,ATt=LOe.name,mTt="@prisma/client",QOe=class extends GF.InstrumentationBase{tracerProvider;constructor(e={}){super(ATt,kOe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new GF.InstrumentationNodeModuleDefinition(mTt,[kOe])]}enable(){let e=this._config;sTt(new pTt({tracerProvider:this.tracerProvider??zt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){uTt()}isEnabled(){return aTt()!==void 0}}});function gTt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function jOe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function hTt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}var GOe,EJ,_Tt,zOe,HOe=O(()=>{A();Ge();FOe();lt();fr();GOe="Prisma";EJ=class extends QOe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=jOe();gTt(t)&&(t.createEngineSpan=n=>{let r=zt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){$o(()=>{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=hTt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:Hs.SAMPLED}})),S=zt.setSpanContext(Ye.active(),{traceId:m,spanId:c,traceFlags:Hs.SAMPLED});Ye.with(S,()=>{let y={generateTraceId:()=>m,generateSpanId:()=>d};r._idGenerator=y,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};_Tt=at(GOe,e=>new EJ(e)),zOe=e=>({name:GOe,setupOnce(){_Tt(e)},setup(t){jOe()&&t.on("spanStart",n=>{let r=Nt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Mt,"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 $Oe=F(kv=>{"use strict";A();Object.defineProperty(kv,"__esModule",{value:!0});kv.PACKAGE_NAME=kv.PACKAGE_VERSION=void 0;kv.PACKAGE_VERSION="0.60.0";kv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var SJ=F(DA=>{"use strict";A();Object.defineProperty(DA,"__esModule",{value:!0});DA.HapiLifecycleMethodNames=DA.HapiLayerType=DA.handlerPatched=DA.HapiComponentName=void 0;DA.HapiComponentName="@hapi/hapi";DA.handlerPatched=Symbol("hapi-handler-patched");DA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};DA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var VOe=F(jF=>{"use strict";A();Object.defineProperty(jF,"__esModule",{value:!0});jF.ATTR_HTTP_METHOD=void 0;jF.ATTR_HTTP_METHOD="http.method"});var yJ=F(iO=>{"use strict";A();Object.defineProperty(iO,"__esModule",{value:!0});iO.AttributeNames=void 0;var ETt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(ETt=iO.AttributeNames||(iO.AttributeNames={}))});var KOe=F(Xi=>{"use strict";A();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.getPluginFromInput=Xi.getExtMetadata=Xi.getRouteMetadata=Xi.isPatchableExtMethod=Xi.isDirectExtInput=Xi.isLifecycleExtEventObj=Xi.isLifecycleExtType=Xi.getPluginName=void 0;var qOe=(Kn(),ke(Pr)),STt=VOe(),aO=SJ(),q_=yJ(),YOe=tn();function yTt(e){return e.name?e.name:e.pkg.name}Xi.getPluginName=yTt;var TTt=e=>typeof e=="string"&&aO.HapiLifecycleMethodNames.has(e);Xi.isLifecycleExtType=TTt;var ITt=e=>{let t=e?.type;return t!==void 0&&(0,Xi.isLifecycleExtType)(t)};Xi.isLifecycleExtEventObj=ITt;var CTt=e=>Array.isArray(e)&&e.length<=3&&(0,Xi.isLifecycleExtType)(e[0])&&typeof e[1]=="function";Xi.isDirectExtInput=CTt;var bTt=e=>!Array.isArray(e);Xi.isPatchableExtMethod=bTt;var vTt=(e,t,n)=>{let r={[qOe.ATTR_HTTP_ROUTE]:e.path};t&YOe.SemconvStability.OLD&&(r[STt.ATTR_HTTP_METHOD]=e.method),t&YOe.SemconvStability.STABLE&&(r[qOe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[q_.AttributeNames.HAPI_TYPE]=aO.HapiLayerType.PLUGIN,r[q_.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[q_.AttributeNames.HAPI_TYPE]=aO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};Xi.getRouteMetadata=vTt;var RTt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[q_.AttributeNames.EXT_TYPE]:e,[q_.AttributeNames.HAPI_TYPE]:aO.HapiLayerType.EXT,[q_.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[q_.AttributeNames.EXT_TYPE]:e,[q_.AttributeNames.HAPI_TYPE]:aO.HapiLayerType.EXT},name:r}};Xi.getExtMetadata=RTt;var xTt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;Xi.getPluginFromInput=xTt});var WOe=F(zF=>{"use strict";A();Object.defineProperty(zF,"__esModule",{value:!0});zF.HapiInstrumentation=void 0;var wl=(Ge(),ke(Ze)),JOe=Tr(),sO=tn(),ZOe=$Oe(),uO=SJ(),bg=KOe(),TJ=class extends sO.InstrumentationBase{_semconvStability;constructor(t={}){super(ZOe.PACKAGE_NAME,ZOe.PACKAGE_VERSION,t),this._semconvStability=(0,sO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new sO.InstrumentationNodeModuleDefinition(uO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,sO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,sO.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,bg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,bg.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,bg.isLifecycleExtType)(d.type)){let m=d,h=r._wrapExtMethods(m.method,d.type,n);m.method=h,a[c]=m}}return t.apply(this,i)}else if((0,bg.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,bg.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,bg.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",m=>n._getServerRoutePatch.bind(n)(m,r)),i._wrap(c,"ext",m=>n._getServerExtPatch.bind(n)(m,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,bg.isPatchableExtMethod)(t))return t[uO.handlerPatched]===!0?t:(t[uO.handlerPatched]=!0,async function(...a){if(wl.trace.getSpan(wl.context.active())===void 0)return await t.apply(this,a);let c=(0,bg.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await wl.context.with(wl.trace.setSpan(wl.context.active(),d),t,void 0,...a)}catch(m){throw d.recordException(m),d.setStatus({code:wl.SpanStatusCode.ERROR,message:m.message}),m}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[uO.handlerPatched]===!0)return t;t[uO.handlerPatched]=!0;let o=i=>async function(...a){if(wl.trace.getSpan(wl.context.active())===void 0)return await i.call(this,...a);let c=(0,JOe.getRPCMetadata)(wl.context.active());c?.type===JOe.RPCType.HTTP&&(c.route=t.path);let d=(0,bg.getRouteMetadata)(t,r._semconvStability,n),m=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await wl.context.with(wl.trace.setSpan(wl.context.active(),m),()=>i.call(this,...a))}catch(h){throw m.recordException(h),m.setStatus({code:wl.SpanStatusCode.ERROR,message:h.message}),h}finally{m.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};zF.HapiInstrumentation=TJ});var XOe=F(Pv=>{"use strict";A();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.AttributeNames=Pv.HapiInstrumentation=void 0;var DTt=WOe();Object.defineProperty(Pv,"HapiInstrumentation",{enumerable:!0,get:function(){return DTt.HapiInstrumentation}});var BTt=yJ();Object.defineProperty(Pv,"AttributeNames",{enumerable:!0,get:function(){return BTt.AttributeNames}})});var ewe,twe,nwe,NTt,rwe,owe=O(()=>{A();ewe=ie(XOe(),1);fr();twe="Hapi",nwe=at(twe,()=>new ewe.HapiInstrumentation),NTt=()=>({name:twe,setupOnce(){nwe()}}),rwe=NTt});var Y_,cO,IJ=O(()=>{A();Y_={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},cO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var $F,OTt,wTt,HF,iwe=O(()=>{A();Ge();$F=ie(tn(),1);lt();IJ();OTt="@sentry/instrumentation-hono",wTt="0.0.1",HF=class extends $F.InstrumentationBase{constructor(t={}){super(OTt,wTt,t)}init(){return[new $F.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 Ye.with(zt.setSpan(Ye.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(_s(c))return c.then(d=>{let m=n._determineHandlerType(d);return a.setAttributes({[Y_.HONO_TYPE]:m,[Y_.HONO_NAME]:m===cO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[Y_.HONO_TYPE]:d,[Y_.HONO_NAME]:d===cO.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 _s(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?cO.MIDDLEWARE:cO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ai.ERROR,message:n.message}),t.recordException(n))}}});function MTt(e){let t=Nt(e).data,n=t[Y_.HONO_TYPE];if(t[Zt]||!n)return;e.setAttributes({[Mt]:"auto.http.otel.hono",[Zt]:`${n}.hono`});let r=t[Y_.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Cn()===Rd()){_a&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Wm],i=t[ES];typeof o=="string"&&typeof i=="string"&&Cn().setTransactionName(`${i} ${o}`)}var awe,swe,kTt,uwe,cwe=O(()=>{A();Kn();lt();fr();XS();IJ();iwe();awe="Hono";swe=at(awe,()=>new HF({responseHook:e=>{MTt(e)}})),kTt=()=>({name:awe,setupOnce(){swe()}}),uwe=kTt});var VF=F(lO=>{"use strict";A();Object.defineProperty(lO,"__esModule",{value:!0});lO.KoaLayerType=void 0;var PTt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(PTt=lO.KoaLayerType||(lO.KoaLayerType={}))});var lwe=F(Uv=>{"use strict";A();Object.defineProperty(Uv,"__esModule",{value:!0});Uv.PACKAGE_NAME=Uv.PACKAGE_VERSION=void 0;Uv.PACKAGE_VERSION="0.62.0";Uv.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var CJ=F(dO=>{"use strict";A();Object.defineProperty(dO,"__esModule",{value:!0});dO.AttributeNames=void 0;var UTt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(UTt=dO.AttributeNames||(dO.AttributeNames={}))});var pwe=F(Lv=>{"use strict";A();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.isLayerIgnored=Lv.getMiddlewareMetadata=void 0;var dwe=VF(),qF=CJ(),LTt=(Kn(),ke(Pr)),QTt=(e,t,n,r)=>n?{attributes:{[qF.AttributeNames.KOA_NAME]:r?.toString(),[qF.AttributeNames.KOA_TYPE]:dwe.KoaLayerType.ROUTER,[LTt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[qF.AttributeNames.KOA_NAME]:t.name??"middleware",[qF.AttributeNames.KOA_TYPE]:dwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Lv.getMiddlewareMetadata=QTt;var FTt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Lv.isLayerIgnored=FTt});var fwe=F(YF=>{"use strict";A();Object.defineProperty(YF,"__esModule",{value:!0});YF.kLayerPatched=void 0;YF.kLayerPatched=Symbol("koa-layer-patched")});var Ewe=F(KF=>{"use strict";A();Object.defineProperty(KF,"__esModule",{value:!0});KF.KoaInstrumentation=void 0;var BA=(Ge(),ke(Ze)),pO=tn(),Awe=VF(),mwe=lwe(),gwe=pwe(),hwe=Tr(),_we=fwe(),bJ=class extends pO.InstrumentationBase{constructor(t={}){super(mwe.PACKAGE_NAME,mwe.PACKAGE_VERSION,t)}init(){return new pO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,pO.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,pO.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){BA.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?Awe.KoaLayerType.ROUTER:Awe.KoaLayerType.MIDDLEWARE;return t[_we.kLayerPatched]===!0||(0,gwe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(BA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[_we.kLayerPatched]=!0,BA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(BA.trace.getSpan(BA.context.active())===void 0)return t(i,a);let d=(0,gwe.getMiddlewareMetadata)(i,t,n,r),m=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,hwe.getRPCMetadata)(BA.context.active());h?.type===hwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,pO.safeExecuteInTheMiddle)(()=>S(m,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&BA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=BA.trace.setSpan(BA.context.active(),m);return BA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw m.recordException(C),C}finally{m.end()}})})}};KF.KoaInstrumentation=bJ});var Swe=F(K_=>{"use strict";A();Object.defineProperty(K_,"__esModule",{value:!0});K_.KoaLayerType=K_.AttributeNames=K_.KoaInstrumentation=void 0;var GTt=Ewe();Object.defineProperty(K_,"KoaInstrumentation",{enumerable:!0,get:function(){return GTt.KoaInstrumentation}});var jTt=CJ();Object.defineProperty(K_,"AttributeNames",{enumerable:!0,get:function(){return jTt.AttributeNames}});var zTt=VF();Object.defineProperty(K_,"KoaLayerType",{enumerable:!0,get:function(){return zTt.KoaLayerType}})});var ywe,Twe,Iwe,HTt,Cwe,bwe=O(()=>{A();ywe=ie(Swe(),1);Kn();lt();fr();XS();Twe="Koa",Iwe=at(Twe,ywe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Ur(t,"auto.http.otel.koa");let r=Nt(t).data,o=r["koa.type"];o&&t.setAttribute(Zt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Cn()===Rd()){_a&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[Wm],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Cn().setTransactionName(`${c} ${a}`)}})),HTt=(e={})=>({name:Twe,setupOnce(){Iwe(e)}}),Cwe=HTt});var vJ=F(nf=>{"use strict";A();Object.defineProperty(nf,"__esModule",{value:!0});nf.ConnectNames=nf.ConnectTypes=nf.AttributeNames=void 0;var $Tt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})($Tt=nf.AttributeNames||(nf.AttributeNames={}));var VTt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(VTt=nf.ConnectTypes||(nf.ConnectTypes={}));var qTt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(qTt=nf.ConnectNames||(nf.ConnectNames={}))});var vwe=F(Qv=>{"use strict";A();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.PACKAGE_NAME=Qv.PACKAGE_VERSION=void 0;Qv.PACKAGE_VERSION="0.57.0";Qv.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var Rwe=F(JF=>{"use strict";A();Object.defineProperty(JF,"__esModule",{value:!0});JF._LAYERS_STORE_PROPERTY=void 0;JF._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var xwe=F(Z_=>{"use strict";A();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.generateRoute=Z_.replaceCurrentStackRoute=Z_.addNewStackLayer=void 0;var YTt=(Ge(),ke(Ze)),J_=Rwe(),KTt=e=>{Array.isArray(e[J_._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,J_._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[J_._LAYERS_STORE_PROPERTY].push("/");let t=e[J_._LAYERS_STORE_PROPERTY].length;return()=>{t===e[J_._LAYERS_STORE_PROPERTY].length?e[J_._LAYERS_STORE_PROPERTY].pop():YTt.diag.warn("Connect: Trying to pop the stack multiple time")}};Z_.addNewStackLayer=KTt;var JTt=(e,t)=>{t&&e[J_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};Z_.replaceCurrentStackRoute=JTt;var ZTt=e=>e[J_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);Z_.generateRoute=ZTt});var Nwe=F(W_=>{"use strict";A();Object.defineProperty(W_,"__esModule",{value:!0});W_.ConnectInstrumentation=W_.ANONYMOUS_NAME=void 0;var WTt=(Ge(),ke(Ze)),Dwe=Tr(),Fv=vJ(),Bwe=vwe(),ZF=tn(),XTt=(Kn(),ke(Pr)),RJ=xwe();W_.ANONYMOUS_NAME="anonymous";var xJ=class extends ZF.InstrumentationBase{constructor(t={}){super(Bwe.PACKAGE_NAME,Bwe.PACKAGE_VERSION,t)}init(){return[new ZF.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,ZF.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,ZF.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=Fv.ConnectTypes.REQUEST_HANDLER,i=Fv.ConnectNames.REQUEST_HANDLER,o=t):(r=Fv.ConnectTypes.MIDDLEWARE,i=Fv.ConnectNames.MIDDLEWARE,o=n.name||W_.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[XTt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Fv.AttributeNames.CONNECT_TYPE]:r,[Fv.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],m=arguments[a],h=arguments[c],S=arguments[d];(0,RJ.replaceCurrentStackRoute)(m,t);let y=(0,Dwe.getRPCMetadata)(WTt.context.active());t&&y?.type===Dwe.RPCType.HTTP&&(y.route=(0,RJ.generateRoute)(m));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||W_.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,RJ.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)}}};W_.ConnectInstrumentation=xJ});var wwe=F(zd=>{"use strict";A();Object.defineProperty(zd,"__esModule",{value:!0});zd.ConnectTypes=zd.ConnectNames=zd.AttributeNames=zd.ANONYMOUS_NAME=zd.ConnectInstrumentation=void 0;var Owe=Nwe();Object.defineProperty(zd,"ConnectInstrumentation",{enumerable:!0,get:function(){return Owe.ConnectInstrumentation}});Object.defineProperty(zd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return Owe.ANONYMOUS_NAME}});var DJ=vJ();Object.defineProperty(zd,"AttributeNames",{enumerable:!0,get:function(){return DJ.AttributeNames}});Object.defineProperty(zd,"ConnectNames",{enumerable:!0,get:function(){return DJ.ConnectNames}});Object.defineProperty(zd,"ConnectTypes",{enumerable:!0,get:function(){return DJ.ConnectTypes}})});var Mwe,kwe,Pwe,eIt,Uwe,Lwe=O(()=>{A();Mwe=ie(wwe(),1);fr();kwe="Connect",Pwe=at(kwe,()=>new Mwe.ConnectInstrumentation),eIt=()=>({name:kwe,setupOnce(){Pwe()}}),Uwe=eIt});var Qwe=F(es=>{"use strict";A();Object.defineProperty(es,"__esModule",{value:!0});es.DB_SYSTEM_VALUE_MSSQL=es.ATTR_NET_PEER_PORT=es.ATTR_NET_PEER_NAME=es.ATTR_DB_USER=es.ATTR_DB_SYSTEM=es.ATTR_DB_STATEMENT=es.ATTR_DB_SQL_TABLE=es.ATTR_DB_NAME=void 0;es.ATTR_DB_NAME="db.name";es.ATTR_DB_SQL_TABLE="db.sql.table";es.ATTR_DB_STATEMENT="db.statement";es.ATTR_DB_SYSTEM="db.system";es.ATTR_DB_USER="db.user";es.ATTR_NET_PEER_NAME="net.peer.name";es.ATTR_NET_PEER_PORT="net.peer.port";es.DB_SYSTEM_VALUE_MSSQL="mssql"});var Fwe=F(Gv=>{"use strict";A();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.once=Gv.getSpanName=void 0;function tIt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Gv.getSpanName=tIt;var nIt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Gv.once=nIt});var Gwe=F(jv=>{"use strict";A();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.33.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var Vwe=F(eE=>{"use strict";A();Object.defineProperty(eE,"__esModule",{value:!0});eE.TediousInstrumentation=eE.INJECTED_CTX=void 0;var zv=(Ge(),ke(Ze)),rIt=Fe("events"),NA=tn(),dy=(Kn(),ke(Pr)),X_=Qwe(),jwe=Fwe(),zwe=Gwe(),$we=Symbol("opentelemetry.instrumentation-tedious.current-database");eE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Hwe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function WF(e){Object.defineProperty(this,$we,{value:e,writable:!0})}var BJ=class e extends NA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(zwe.PACKAGE_NAME,zwe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,NA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,NA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new NA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Hwe)(0,NA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,NA.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 Hwe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return WF.call(this,this.config?.options?.database),this.removeListener("databaseChange",WF),this.on("databaseChange",WF),this.once("end",()=>{this.removeListener("databaseChange",WF)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||zv.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,eE.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?.[eE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof rIt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,m=()=>d++,h=()=>c++,S=this[$we],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&NA.SemconvStability.OLD&&(C[X_.ATTR_DB_SYSTEM]=X_.DB_SYSTEM_VALUE_MSSQL,C[X_.ATTR_DB_NAME]=S,C[X_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[X_.ATTR_DB_STATEMENT]=y,C[X_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&NA.SemconvStability.STABLE&&(C[dy.ATTR_DB_NAMESPACE]=S,C[dy.ATTR_DB_SYSTEM_NAME]=dy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[dy.ATTR_DB_QUERY_TEXT]=y,C[dy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&NA.SemconvStability.OLD&&(C[X_.ATTR_NET_PEER_NAME]=this.config?.server,C[X_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&NA.SemconvStability.STABLE&&(C[dy.ATTR_SERVER_ADDRESS]=this.config?.server,C[dy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,jwe.getSpanName)(t,S,y,a.table),{kind:zv.SpanKind.CLIENT,attributes:C}),x=(0,jwe.once)(G=>{a.removeListener("done",m),a.removeListener("doneInProc",m),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:zv.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",m),a.on("doneInProc",m),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=()=>zv.context.with(zv.trace.setSpan(zv.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)}}};eE.TediousInstrumentation=BJ});var qwe=F(XF=>{"use strict";A();Object.defineProperty(XF,"__esModule",{value:!0});XF.TediousInstrumentation=void 0;var oIt=Vwe();Object.defineProperty(XF,"TediousInstrumentation",{enumerable:!0,get:function(){return oIt.TediousInstrumentation}})});var Ywe,iIt,Kwe,Jwe,aIt,Zwe,Wwe=O(()=>{A();Ywe=ie(qwe(),1);lt();fr();iIt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Kwe="Tedious",Jwe=at(Kwe,()=>new Ywe.TediousInstrumentation({})),aIt=()=>{let e;return{name:Kwe,setupOnce(){let t=Jwe();e=KB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Nt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";iIt.has(i)&&n.setAttribute(Mt,"auto.db.otel.tedious")}))}}},Zwe=aIt});var Xwe=F(Hv=>{"use strict";A();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.PACKAGE_NAME=Hv.PACKAGE_VERSION=void 0;Hv.PACKAGE_VERSION="0.57.0";Hv.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var tMe=F(e3=>{"use strict";A();Object.defineProperty(e3,"__esModule",{value:!0});e3.GenericPoolInstrumentation=void 0;var $v=(Ge(),ke(Ze)),py=tn(),eMe=Xwe(),NJ="generic-pool",OJ=class extends py.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(eMe.PACKAGE_NAME,eMe.PACKAGE_VERSION,t)}init(){return[new py.InstrumentationNodeModuleDefinition(NJ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,py.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 py.InstrumentationNodeModuleDefinition(NJ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,py.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 py.InstrumentationNodeModuleDefinition(NJ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,py.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=$v.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return $v.context.with($v.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=$v.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return $v.context.with($v.trace.setSpan(a,c),()=>{t.call(this,(d,m)=>{if(c.end(),o)return o(d,m)},i)})}}};e3.GenericPoolInstrumentation=OJ});var nMe=F(t3=>{"use strict";A();Object.defineProperty(t3,"__esModule",{value:!0});t3.GenericPoolInstrumentation=void 0;var sIt=tMe();Object.defineProperty(t3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return sIt.GenericPoolInstrumentation}})});var rMe,oMe,iMe,uIt,aMe,sMe=O(()=>{A();rMe=ie(nMe(),1);lt();fr();oMe="GenericPool",iMe=at(oMe,()=>new rMe.GenericPoolInstrumentation({})),uIt=()=>{let e;return{name:oMe,setupOnce(){let t=iMe();e=KB(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Nt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Mt,"auto.db.otel.generic_pool")}))}}},aMe=uIt});var wJ=F(OA=>{"use strict";A();Object.defineProperty(OA,"__esModule",{value:!0});OA.ATTR_NET_PEER_PORT=OA.ATTR_NET_PEER_NAME=OA.ATTR_MESSAGING_SYSTEM=OA.ATTR_MESSAGING_OPERATION=void 0;OA.ATTR_MESSAGING_OPERATION="messaging.operation";OA.ATTR_MESSAGING_SYSTEM="messaging.system";OA.ATTR_NET_PEER_NAME="net.peer.name";OA.ATTR_NET_PEER_PORT="net.peer.port"});var MJ=F(di=>{"use strict";A();Object.defineProperty(di,"__esModule",{value:!0});di.ATTR_MESSAGING_CONVERSATION_ID=di.OLD_ATTR_MESSAGING_MESSAGE_ID=di.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=di.ATTR_MESSAGING_URL=di.ATTR_MESSAGING_PROTOCOL_VERSION=di.ATTR_MESSAGING_PROTOCOL=di.MESSAGING_OPERATION_VALUE_PROCESS=di.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=di.ATTR_MESSAGING_DESTINATION_KIND=di.ATTR_MESSAGING_DESTINATION=void 0;di.ATTR_MESSAGING_DESTINATION="messaging.destination";di.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";di.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";di.MESSAGING_OPERATION_VALUE_PROCESS="process";di.ATTR_MESSAGING_PROTOCOL="messaging.protocol";di.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";di.ATTR_MESSAGING_URL="messaging.url";di.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";di.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";di.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var kJ=F(fy=>{"use strict";A();Object.defineProperty(fy,"__esModule",{value:!0});fy.DEFAULT_CONFIG=fy.EndOperation=void 0;var cIt;(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"})(cIt=fy.EndOperation||(fy.EndOperation={}));fy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var dMe=F(pi=>{"use strict";A();Object.defineProperty(pi,"__esModule",{value:!0});pi.isConfirmChannelTracing=pi.unmarkConfirmChannelTracing=pi.markConfirmChannelTracing=pi.getConnectionAttributesFromUrl=pi.getConnectionAttributesFromServer=pi.normalizeExchange=pi.CONNECTION_ATTRIBUTES=pi.CHANNEL_CONSUME_TIMEOUT_TIMER=pi.CHANNEL_SPANS_NOT_ENDED=pi.MESSAGE_STORED_SPAN=void 0;var PJ=(Ge(),ke(Ze)),tE=tn(),n3=(Kn(),ke(Pr)),fO=wJ(),r3=MJ();pi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");pi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");pi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");pi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var UJ=(0,PJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),lIt=e=>e!==""?e:"<default>";pi.normalizeExchange=lIt;var dIt=e=>e.replace(/:[^:@/]*@/,":***@"),uMe=(e,t)=>e||(t==="AMQP"?5672:5671),cMe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},lMe=e=>e||"localhost",wA=(e,t,n,r)=>n?{[t]:n}:(PJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),pIt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[fO.ATTR_MESSAGING_SYSTEM]:t}:{}};pi.getConnectionAttributesFromServer=pIt;var fIt=(e,t)=>{let n={[r3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=cMe(r?.protocol);Object.assign(n,{...wA(e,r3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=lMe(r?.hostname);t&tE.SemconvStability.OLD&&Object.assign(n,{...wA(e,fO.ATTR_NET_PEER_NAME,i,"hostname")}),t&tE.SemconvStability.STABLE&&Object.assign(n,{...wA(e,n3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=uMe(r.port,o);t&tE.SemconvStability.OLD&&Object.assign(n,wA(e,fO.ATTR_NET_PEER_PORT,a,"port")),t&tE.SemconvStability.STABLE&&Object.assign(n,wA(e,n3.ATTR_SERVER_PORT,a,"port"))}else{let r=dIt(e);n[r3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=cMe(o.protocol);Object.assign(n,{...wA(r,r3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=lMe(o.hostname);t&tE.SemconvStability.OLD&&Object.assign(n,{...wA(r,fO.ATTR_NET_PEER_NAME,a,"hostname")}),t&tE.SemconvStability.STABLE&&Object.assign(n,{...wA(r,n3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=uMe(o.port?parseInt(o.port):void 0,i);t&tE.SemconvStability.OLD&&Object.assign(n,wA(r,fO.ATTR_NET_PEER_PORT,c,"port")),t&tE.SemconvStability.STABLE&&Object.assign(n,wA(r,n3.ATTR_SERVER_PORT,c,"port"))}catch(o){PJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};pi.getConnectionAttributesFromUrl=fIt;var AIt=e=>e.setValue(UJ,!0);pi.markConfirmChannelTracing=AIt;var mIt=e=>e.deleteValue(UJ);pi.unmarkConfirmChannelTracing=mIt;var gIt=e=>e.getValue(UJ)===!0;pi.isConfirmChannelTracing=gIt});var pMe=F(Vv=>{"use strict";A();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.61.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var AMe=F(a3=>{"use strict";A();Object.defineProperty(a3,"__esModule",{value:!0});a3.AmqplibInstrumentation=void 0;var Ko=(Ge(),ke(Ze)),o3=Tr(),Cr=tn(),hIt=wJ(),Ml=MJ(),Gu=kJ(),fi=dMe(),fMe=pMe(),i3=[">=0.5.5 <1"],LJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(fMe.PACKAGE_NAME,fMe.PACKAGE_VERSION,{...Gu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Gu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",i3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",i3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",i3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",i3,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,Gu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Gu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Gu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Gu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Gu.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 m=(0,fi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,fi.getConnectionAttributesFromServer)(d);d[fi.CONNECTION_ATTRIBUTES]={...m,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Gu.EndOperation.ChannelClosed,void 0);let i=this[fi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[fi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Gu.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let m=this,h=n===Gu.EndOperation.Reject?c:d,S=m[fi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Gu.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,fi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[fi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[fi.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Ko.propagation.extract(Ko.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=y?Ko.trace.getSpan(y)?.spanContext():void 0;y=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Ko.SpanKind.CONSUMER,attributes:{...d?.connection?.[fi.CONNECTION_ATTRIBUTES],[Ml.ATTR_MESSAGING_DESTINATION]:C,[Ml.ATTR_MESSAGING_DESTINATION_KIND]:Ml.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Ml.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[hIt.ATTR_MESSAGING_OPERATION]:Ml.MESSAGING_OPERATION_VALUE_PROCESS,[Ml.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Ml.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&&Ko.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(d[fi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,o3.hrTime)()}),h[fi.MESSAGE_STORED_SPAN]=x);let M=y||Ko.ROOT_CONTEXT;Ko.context.with(Ko.trace.setSpan(M,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Gu.EndOperation.AutoAck),x.end())};return arguments[1]=m,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,m){let h=this,{span:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Cr.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!0}),M=>{M&&Ko.diag.error("amqplib instrumentation: publishHook error",M)},!0);let v=function(M,Q){try{m?.call(this,M,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:M}),G=>{G&&Ko.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),M&&S.setStatus({code:Ko.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,fi.markConfirmChannelTracing)(Ko.context.active()),N=[...arguments];return N[3]=y,N[4]=Ko.context.bind((0,fi.unmarkConfirmChannelTracing)(Ko.trace.setSpan(x,S)),v),Ko.context.with(x,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,fi.isConfirmChannelTracing)(Ko.context.active()))return n.apply(this,arguments);{let m=this,{span:h,modifiedOptions:S}=r.createPublishSpan(r,i,a,m,d),{publishHook:y}=r.getConfig();y&&(0,Cr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),x=>{x&&Ko.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,fi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Ko.SpanKind.PRODUCER,attributes:{...o.connection[fi.CONNECTION_ATTRIBUTES],[Ml.ATTR_MESSAGING_DESTINATION]:n,[Ml.ATTR_MESSAGING_DESTINATION_KIND]:Ml.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Ml.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Ml.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Ml.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Ko.propagation.inject(Ko.trace.setSpan(Ko.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[fi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Ko.SpanStatusCode.ERROR,message:r!==Gu.EndOperation.ChannelClosed&&r!==Gu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[fi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[fi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[fi.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&&Ko.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,o3.hrTime)(),r=t[fi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,o3.hrTimeDuration)(a.timeOfConsume,n);if((0,o3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Gu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};a3.AmqplibInstrumentation=LJ});var gMe=F(nE=>{"use strict";A();Object.defineProperty(nE,"__esModule",{value:!0});nE.EndOperation=nE.DEFAULT_CONFIG=nE.AmqplibInstrumentation=void 0;var _It=AMe();Object.defineProperty(nE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return _It.AmqplibInstrumentation}});var mMe=kJ();Object.defineProperty(nE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return mMe.DEFAULT_CONFIG}});Object.defineProperty(nE,"EndOperation",{enumerable:!0,get:function(){return mMe.EndOperation}})});var hMe,_Me,EIt,EMe,SIt,SMe,yMe=O(()=>{A();hMe=ie(gMe(),1);fr();_Me="Amqplib",EIt={consumeEndHook:e=>{Ur(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Ur(e,"auto.amqplib.otel.publisher")}},EMe=at(_Me,()=>new hMe.AmqplibInstrumentation(EIt)),SIt=()=>({name:_Me,setupOnce(){EMe()}}),SMe=SIt});var AO,QJ=O(()=>{A();AO="VercelAI"});function TIt(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 IIt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(CIt(t.content),bIt(t.content))}function CIt(e){for(let t of e){if(!TIt(t))continue;let n=mq(t.toolCallId);n?Tl(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"),en(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Tl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),en(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function bIt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&gq(t.toolCallId)}function vIt(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 u3,yIt,TMe,s3,IMe=O(()=>{A();u3=ie(tn(),1);lt();QJ();yIt=[">=3.0.0 <7"],TMe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];s3=class e extends u3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Jn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new u3.InstrumentationNodeModuleDefinition("ai",yIt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,m=gt(),h=m?.getIntegrationByName(AO),S=h?.options,y=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=vIt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},Jp(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&$i(x,"_sentry_active_span",bc())},()=>{},x=>{IIt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of TMe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=TMe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function RIt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var CMe,xIt,bMe,vMe=O(()=>{A();lt();fr();QJ();IMe();CMe=at(AO,()=>new s3({}));xIt=(e={})=>{let t;return{name:AO,options:e,setupOnce(){t=CMe()},afterAllSetup(n){e.force??RIt(n)?fL(n):t?.callWhenPatched(()=>fL(n))}}},bMe=xIt});var l3,DIt,c3,RMe=O(()=>{A();l3=ie(tn(),1);lt();DIt=[">=4.0.0 <7"],c3=class extends l3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Jn,t)}init(){return new l3.InstrumentationNodeModuleDefinition("openai",DIt,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(PS(v_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return gL(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 xMe,BIt,DMe,BMe=O(()=>{A();lt();fr();RMe();xMe=at(v_,e=>new c3(e)),BIt=(e={})=>({name:v_,setupOnce(){xMe(e)}}),DMe=BIt});var p3,NIt,d3,NMe=O(()=>{A();p3=ie(tn(),1);lt();NIt=[">=0.19.2 <1.0.0"],d3=class extends p3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Jn,t)}init(){return new p3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",NIt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(PS(R_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return hL(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 OMe,OIt,wMe,MMe=O(()=>{A();lt();fr();NMe();OMe=at(R_,e=>new d3(e)),OIt=(e={})=>({name:R_,options:e,setupOnce(){OMe(e)}}),wMe=OIt});var qv,kMe,f3,PMe=O(()=>{A();qv=ie(tn(),1);lt();kMe=[">=0.10.0 <2"],f3=class extends qv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Jn,t)}init(){return new qv.InstrumentationNodeModuleDefinition("@google/genai",kMe,n=>this._patch(n),n=>n,[new qv.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",kMe,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(PS(x_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return _L(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 qB(t,"GoogleGenAI",o),t}}});var UMe,wIt,LMe,QMe=O(()=>{A();lt();fr();PMe();UMe=at(x_,e=>new f3(e)),wIt=(e={})=>({name:x_,setupOnce(){UMe(e)}}),LMe=wIt});function MIt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function kIt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,m=MIt(d,t);return c.callbacks=m,Reflect.apply(r,o,i)}})}var rE,A3,m3,FMe=O(()=>{A();rE=ie(tn(),1);lt();A3=[">=0.1.0 <2.0.0"];m3=class extends rE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Jn,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 rE.InstrumentationNodeModuleDefinition(r,A3,this._patch.bind(this),o=>o,[new rE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,A3,this._patch.bind(this),o=>o)]));return t.push(new rE.InstrumentationNodeModuleDefinition("langchain",A3,this._patch.bind(this),r=>r,[new rE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",A3,this._patch.bind(this),r=>r)])),t}_patch(t){OV([v_,R_,x_]);let n=TL(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let m=a[d];typeof m=="function"&&(a[d]=kIt(m,n))}}}});var GMe,PIt,jMe,zMe=O(()=>{A();lt();fr();FMe();GMe=at(EL,e=>new m3(e)),PIt=(e={})=>({name:EL,setupOnce(){GMe(e)}}),jMe=PIt});var Yv,HMe,g3,$Me=O(()=>{A();Yv=ie(tn(),1);lt();HMe=[">=0.0.0 <2.0.0"],g3=class extends Yv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Jn,t)}init(){return new Yv.InstrumentationNodeModuleDefinition("@langchain/langgraph",HMe,this._patch.bind(this),n=>n,[new Yv.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",HMe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&CL(t.StateGraph.prototype,this.getConfig()),t}}});var VMe,UIt,qMe,YMe=O(()=>{A();lt();fr();$Me();VMe=at(IL,e=>new g3(e)),UIt=(e={})=>({name:IL,setupOnce(){VMe(e)}}),qMe=UIt});import*as JMe from"node:net";function ZMe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,vg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&Sl.error(S?.message)},!0)});let d=new vg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>KMe(h,n,r,e,a)),m=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of m)d.files.push(new vg.InstrumentationNodeModuleFile(h,t,S=>KMe(S,n,r,e,a),S=>WMe(S,r)));return d}function KMe(e,t,n,r,o){return WMe(e,n),t(e,"addDoc",LIt(r,o)),t(e,"getDocs",FIt(r,o)),t(e,"setDoc",GIt(r,o)),t(e,"deleteDoc",QIt(r,o)),e}function WMe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,vg.isWrapped)(e[n])&&t(e,n);return e}function LIt(e,t){return function(r){return function(o,i){let a=_3(e,"addDoc",o);return t(a),h3(a,()=>r(o,i))}}}function QIt(e,t){return function(r){return function(o){let i=_3(e,"deleteDoc",o.parent||o);return t(i),h3(i,()=>r(o))}}}function FIt(e,t){return function(r){return function(o){let i=_3(e,"getDocs",o);return t(i),h3(i,()=>r(o))}}}function GIt(e,t){return function(r){return function(o,i,a){let c=_3(e,"setDoc",o.parent||o);return t(c),h3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function h3(e,t){return Ye.with(zt.setSpan(Ye.active(),e),()=>(0,vg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function _3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:oo.CLIENT});return zIt(r,n),r.setAttribute(MC,t),r}function jIt(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(JMe.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 zIt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[n5]:t.path,[r5]:n.name,[_S]:"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}=jIt(i);c&&(a[d5]=c),d&&(a[p5]=d),e.setAttributes(a)}var vg,XMe=O(()=>{A();Ge();vg=ie(tn(),1);Kn()});function e2e(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,m=o.functions?.responseHook;typeof m=="function"&&(a=(y,C)=>{(0,Rg.safeExecuteInTheMiddle)(()=>m(y,C),v=>{v&&Sl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Rg.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&Sl.error(C?.message)},!0)});let h=new Rg.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 Rg.InstrumentationNodeModuleFile(y,t,v=>HIt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>t2e(v,r)))}),h}function ju(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...m){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:oo.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),Ye.with(zt.setSpan(Ye.active(),S),async()=>{let C,v;try{v=await a.apply(this,m)}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 HIt(e,t,n,r,o,i){switch(t2e(e,n),i){case"function":t(e,"onRequest",ju(r,o,"http.request")),t(e,"onCall",ju(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ju(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ju(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ju(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ju(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ju(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ju(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ju(r,o,"storage.object.metadataUpdated"));break}return e}function t2e(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,Rg.isWrapped)(e[r])&&t(e,r);return e}var Rg,n2e=O(()=>{A();Ge();Rg=ie(tn(),1)});var o2e,r2e,$It,VIt,E3,i2e=O(()=>{A();o2e=ie(tn(),1);lt();XMe();n2e();r2e={},$It=[">=3.0.0 <5"],VIt=[">=6.0.0 <7"],E3=class extends o2e.InstrumentationBase{constructor(t=r2e){super("@sentry/instrumentation-firebase",Jn,t)}setConfig(t={}){super.setConfig({...r2e,...t})}init(){let t=[];return t.push(ZMe(this.tracer,$It,this._wrap,this._unwrap,this.getConfig())),t.push(e2e(this.tracer,VIt,this._wrap,this._unwrap,this.getConfig())),t}}});var a2e,qIt,s2e,YIt,u2e,c2e=O(()=>{A();lt();fr();i2e();a2e="Firebase",qIt={firestoreSpanCreationHook:e=>{Ur(e,"auto.firebase.otel.firestore"),e.setAttribute(Zt,"db.query")},functions:{requestHook:e=>{Ur(e,"auto.firebase.otel.functions"),e.setAttribute(Zt,"http.request")},errorHook:async(e,t)=>{t&&(en(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await _b(2e3))}}},s2e=at(a2e,()=>new E3(qIt)),YIt=()=>({name:a2e,setupOnce(){s2e()}}),u2e=YIt});function l2e(){return[fxe(),qDe(),S1e(),uwe(),sBe(),TBe(),MBe(),VBe(),CNe(),$Ne(),zOe(),rwe(),Cwe(),Uwe(),Zwe(),aMe(),U1e(),SMe(),Y1e(),jMe(),qMe(),bMe(),DMe(),wMe(),LMe(),KNe(),u2e()]}var d2e=O(()=>{A();yMe();MMe();Lwe();Axe();JDe();c2e();sMe();QMe();T1e();owe();cwe();L1e();bwe();zMe();YMe();K1e();uBe();IBe();kBe();qBe();BMe();VNe();JNe();HOe();bNe();Wwe();vMe()});function f2e(e,t={}){e.getOptions().debug&&q7();let[n,r]=KIt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function KIt(e,t={}){let n=new p2e.BasicTracerProvider({sampler:new BQ(e),resource:(0,S3.defaultResource)().merge((0,S3.resourceFromAttributes)({[f5]:"node",[t5]:"sentry",[A5]:Jn})),forceFlushTimeoutMillis:500,spanProcessors:[new DQ({timeout:JIt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});zt.setGlobalTracerProvider(n),Fp.setGlobalPropagator(new xQ);let r=new OQ;return Ye.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function JIt(e){if(e!=null){if(e>FJ)return _a&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${FJ}`),FJ;if(e<=0||Number.isNaN(e)){_a&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var S3,p2e,FJ,A2e=O(()=>{A();Ge();S3=ie(a7(),1),p2e=ie(O7(),1);Kn();lt();fr();Jb();XS();FJ=1e6});function m2e(){return QQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(zRe(),WRe())}function g2e(e){return[...m2e(),...vi(e)?l2e():[]]}function GJ(e={}){return ZIt(e,g2e)}function ZIt(e={},t){US(e,"node");let n=EY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(f2e(n,{spanProcessors:e.openTelemetrySpanProcessors}),FQ()),n}var h2e=O(()=>{A();lt();fr();HRe();XRe();d2e();A2e()});var Kv=O(()=>{A();h2e();lt();fr()});function ea(){return WIt}function zu(){return _2e}function E2e(){return XIt}var WIt,_2e,XIt,kl=O(()=>{"use strict";A();WIt="prod",_2e="0.1.103",XIt=`@tanagram/lore/${_2e}`});function oCt(e=""){if(!nCt.test(e))return e!==e.toLowerCase()}function S2e(e,t){let n=t??rCt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let m=oCt(c);if(a===!1){if(i===!1&&m===!0){r.push(o),o=c,i=m;continue}if(i===!0&&m===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=m;continue}}o+=c,i=m,a=d}return r.push(o),r}function iCt(e){return e?e[0].toUpperCase()+e.slice(1):""}function aCt(e){return e?e[0].toLowerCase()+e.slice(1):""}function sCt(e,t){return e?(Array.isArray(e)?e:S2e(e)).map(n=>iCt(t?.normalize?n.toLowerCase():n)).join(""):""}function gO(e,t){return aCt(sCt(e||"",t))}function y3(e,t){return e?(Array.isArray(e)?e:S2e(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function y2e(e){return y3(e||"","_")}var nCt,rCt,T2e=O(()=>{A();nCt=/\d/,rCt=["-","_","/","."]});import{parseArgs as uCt}from"node:util";function b3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function jJ(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 Pl(e){return typeof e=="function"?e():e}function cCt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},a=new Map,c=new Map;for(let[N,M]of Object.entries(o)){let Q=M;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 m(N){if(n.has(N))return"boolean";let M=c.get(N)||[];for(let Q of M)if(n.has(Q))return"boolean";return"string"}function h(N){if(r.has(N))return!0;let M=c.get(N)||[];for(let Q of M)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:m(N),default:i[N]});for(let[N,M]of a.entries())N.length===1&&d[M]&&!d[M].short&&(d[M].short=N);let y=[],C={};for(let N=0;N<e.length;N++){let M=e[N];if(M==="--"){y.push(...e.slice(N));break}if(M.startsWith("--no-")){let Q=M.slice(5);C[Q]=!0;continue}y.push(M)}let v;try{v=uCt({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,M]of Object.entries(v.values)){let Q=M;m(N)==="boolean"&&typeof M=="string"?Q=M!=="false":h(N)&&typeof M=="boolean"&&(Q=""),x[N]=Q}for(let[N]of Object.entries(C)){x[N]=!1;let M=a.get(N);M&&(x[M]=!1);let Q=c.get(N);if(Q)for(let j of Q)x[j]=!1}for(let[N,M]of a.entries())x[N]!==void 0&&x[M]===void 0&&(x[M]=x[N]),x[M]!==void 0&&x[N]===void 0&&(x[N]=x[M]),x[N]!==x[M]&&i[M]===x[M]&&(x[M]=x[N]);return x}function dCt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=b2e(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=gO(c.name),m=y3(c.name);if(d!==c.name||m!==c.name){let h=b3(n.alias[c.name]||[]);d!==c.name&&!h.includes(d)&&h.push(d),m!==c.name&&!h.includes(m)&&h.push(m),h.length>0&&(n.alias[c.name]=h)}}let o=cCt(e,n),[...i]=o._,a=new Proxy(o,{get(c,d){return c[d]??c[gO(d)]??c[y3(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 Ay(`Missing required positional argument: ${c.name.toUpperCase()}`,"EARG");a[c.name]=c.default}}else if(c.type==="enum"){let d=a[c.name],m=c.options||[];if(d!==void 0&&m.length>0&&!m.includes(d))throw new Ay(`Invalid value for argument: ${rf(`--${c.name}`)} (${rf(d)}). Expected one of: ${m.map(h=>rf(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new Ay(`Missing required argument: --${c.name}`,"EARG");return a}function b2e(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:b3(r.alias)});return t}async function pCt(e){return Promise.all(e.map(t=>Pl(t)))}async function my(e,t){let n=await Pl(e.args||{}),r=dCt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await pCt(e.plugins??[]),a,c;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let m=await Pl(e.subCommands);if(m&&Object.keys(m).length>0){let h=fCt(t.rawArgs,n),S=t.rawArgs[h];if(S){let y=await I2e(m,S);if(!y)throw new Ay(`Unknown command ${rf(S)}`,"E_UNKNOWN_COMMAND");await my(y,{rawArgs:t.rawArgs.slice(h+1)})}else{let y=await Pl(e.default);if(y){if(e.run)throw new Ay("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let C=await I2e(m,y);if(!C)throw new Ay(`Default sub command ${rf(y)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await my(C,{rawArgs:t.rawArgs})}else if(!e.run)throw new Ay("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(a=await e.run(o))}catch(m){c=m}let d=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(m){d.push(m)}for(let m of[...i].reverse())try{await m.cleanup?.(o)}catch(h){d.push(h)}if(c)throw c;if(d.length===1)throw d[0];if(d.length>1)throw new Error("Multiple cleanup errors",{cause:d});return{result:a}}async function I2e(e,t){if(t in e)return Pl(e[t]);for(let n of Object.values(e)){let r=await Pl(n),o=await Pl(r?.meta);if(o?.alias&&b3(o.alias).includes(t))return r}}function fCt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&ACt(r,t)&&n++;continue}return n}return-1}function ACt(e,t){let n=e.replace(/^-{1,2}/,""),r=gO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===gO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function HJ(e,t){let n=await Pl(e.meta||{}),r=b2e(await Pl(e.args||{})),o=await Pl(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),a=[],c=[],d=[],m=[];for(let C of r)if(C.type==="positional"){let v=C.name.toUpperCase(),x=C.required!==!1&&C.default===void 0;c.push([rf(v+zJ(C)),C2e(C,x)]),m.push(x?`<${v}>`:`[${v}]`)}else{let v=C.required===!0&&C.default===void 0,x=[...(C.alias||[]).map(N=>`-${N}`),`--${C.name}`].join(", ")+zJ(C);if(a.push([rf(x),C2e(C,v)]),C.type==="boolean"&&(C.default===!0||C.negativeDescription)&&!mCt.test(C.name)){let N=[...(C.alias||[]).map(M=>`--no-${M}`),`--no-${C.name}`].join(", ");a.push([rf(N),[C.negativeDescription,v?C3("(Required)"):""].filter(Boolean).join(" ")])}v&&m.push(`--${C.name}`+zJ(C))}if(e.subCommands){let C=[],v=await Pl(e.subCommands);for(let[x,N]of Object.entries(v)){let M=await Pl((await Pl(N))?.meta);if(M?.hidden)continue;let Q=b3(M?.alias),j=[x,...Q].join(", ");d.push([rf(j),M?.description||""]),C.push(x,...Q)}m.push(C.join("|"))}let h=[],S=n.version||o.version;h.push(C3(`${n.description} (${i+(S?` v${S}`:"")})`),"");let y=a.length>0||c.length>0;return h.push(`${I3(T3("USAGE"))} ${rf(`${i}${y?" [OPTIONS]":""} ${m.join(" ")}`)}`,""),c.length>0&&(h.push(I3(T3("ARGUMENTS")),""),h.push(jJ(c," ")),h.push("")),a.length>0&&(h.push(I3(T3("OPTIONS")),""),h.push(jJ(a," ")),h.push("")),d.length>0&&(h.push(I3(T3("COMMANDS")),""),h.push(jJ(d," ")),h.push("",`Use ${rf(`${i} <command> --help`)} for more information about a command.`)),h.filter(C=>typeof C=="string").join(`
40
40
  `)}function zJ(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${y2e(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function C2e(e,t){let n=t?C3("(Required)"):"",r=e.default===void 0?"":C3(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var Ay,lCt,v3,T3,rf,C3,I3,mCt,$J=O(()=>{A();T2e();Ay=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};lCt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),v3=(e,t=39)=>n=>lCt?n:`\x1B[${e}m${n}\x1B[${t}m`,T3=v3(1,22),rf=v3(36),C3=v3(90),I3=v3(4,24);mCt=/^no[-A-Z]/});function hCt(e){D2e=e}function x3(){return D2e}function st(e,t){let n=D3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,x3(),hO].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 xCt(e,t){return!!((t==="v4"||!t)&&bCt.test(e)||(t==="v6"||!t)&&vCt.test(e))}function DCt(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 Jv(e){if(e instanceof iu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=of.create(Jv(r))}return new iu({...e._def,shape:()=>t})}else return e instanceof Dg?new Dg({...e._def,type:Jv(e.element)}):e instanceof of?of.create(Jv(e.unwrap())):e instanceof Bg?Bg.create(Jv(e.unwrap())):e instanceof MA?MA.create(e.items.map(t=>Jv(t))):e}function ZJ(e,t){let n=oE(e),r=oE(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){let o=gr.objectKeys(t),i=gr.objectKeys(e).filter(c=>o.indexOf(c)!==-1),a={...e,...t};for(let c of i){let d=ZJ(e[c],t[c]);if(!d.valid)return{valid:!1};a[c]=d.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.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=ZJ(a,c);if(!d.valid)return{valid:!1};o.push(d.data)}return{valid:!0,data:o}}else return n===it.date&&r===it.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function N2e(e,t){return new vy({values:e,typeName:qt.ZodEnum,...bn(t)})}var gr,YJ,it,oE,$e,gCt,kc,hO,D2e,D3,_Ct,ou,gn,B2e,Hu,KJ,JJ,_O,B3,Pt,$d,v2e,vn,ECt,SCt,yCt,TCt,ICt,CCt,bCt,vCt,RCt,iE,gy,hy,_y,Ey,Zv,Sy,yy,aE,xg,af,Wv,Dg,iu,Ty,R3,N3,Iy,MA,O3,Xv,eR,w3,Cy,by,vy,Ry,sE,Ul,of,Bg,xy,tR,nR,BCt,M3,EO,rR,O2e,NCt,qt,OCt,w2e,M2e,wCt,MCt,k2e,kCt,PCt,UCt,LCt,QCt,FCt,GCt,jCt,zCt,HCt,$Ct,VCt,qCt,YCt,KCt,JCt,ZCt,WCt,XCt,ebt,tbt,nbt,rbt,obt,R2e,ibt,abt,sbt,ubt,cbt,lbt,dbt,pbt,fbt,ru,Abt,VJ,mbt,Hd,WJ,PTn,UTn,LTn,P2e,gbt,hbt,_bt,Ebt,U2e,L2e,Q2e,qJ,au,Sbt,ybt,Tbt,Ibt,XJ,eZ,tZ,Cbt,x2e,bbt,vbt,Rbt,xbt,nZ,kA=O(()=>{A();(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let a of o)i[a]=a;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),a={};for(let c of i)a[c]=o[c];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(let a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(gr||(gr={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(YJ||(YJ={}));it=gr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oE=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},$e=gr.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"]),gCt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),kc=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,d=0;for(;d<a.path.length;){let m=a.path[d];d===a.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(n(a))):c[m]=c[m]||{_errors:[]},c=c[m],d++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,gr.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()}};kc.create=e=>new kc(e);hO=(e,t)=>{let n;switch(e.code){case $e.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case $e.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gr.jsonStringifyReplacer)}`;break;case $e.unrecognized_keys:n=`Unrecognized key(s) in object: ${gr.joinValues(e.keys,", ")}`;break;case $e.invalid_union:n="Invalid input";break;case $e.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gr.joinValues(e.options)}`;break;case $e.invalid_enum_value:n=`Invalid enum value. Expected ${gr.joinValues(e.options)}, received '${e.received}'`;break;case $e.invalid_arguments:n="Invalid function arguments";break;case $e.invalid_return_type:n="Invalid function return type";break;case $e.invalid_date:n="Invalid date";break;case $e.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}"`:gr.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case $e.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 $e.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 $e.custom:n="Invalid input";break;case $e.invalid_intersection_types:n="Intersection results could not be merged";break;case $e.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case $e.not_finite:n="Number must be finite";break;default:n=t.defaultError,gr.assertNever(e)}return{message:n}},D2e=hO;D3=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i},c="",d=r.filter(m=>!!m).slice().reverse();for(let m of d)c=m(a,{data:t,defaultError:c}).message;return{...o,path:i,message:o.message||c}},_Ct=[];ou=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"}),B2e=e=>({status:"dirty",value:e}),Hu=e=>({status:"valid",value:e}),KJ=e=>e.status==="aborted",JJ=e=>e.status==="dirty",_O=e=>e.status==="valid",B3=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={}));$d=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}},v2e=(e,t)=>{if(_O(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 kc(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 oE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:oE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ou,ctx:{common:t.parent.common,data:t.data,parsedType:oE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(B3(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:oE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return v2e(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:oE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(B3(o)?o:Promise.resolve(o));return v2e(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:$e.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 Ul({schema:this,typeName:qt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return of.create(this,this._def)}nullable(){return Bg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dg.create(this,this._def)}promise(){return sE.create(this,this._def)}or(t){return Ty.create([this,t],this._def)}and(t){return Iy.create(this,t,this._def)}transform(t){return new Ul({...bn(this._def),schema:this,typeName:qt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new xy({...bn(this._def),innerType:this,defaultValue:n,typeName:qt.ZodDefault})}brand(){return new M3({typeName:qt.ZodBranded,type:this,...bn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new tR({...bn(this._def),innerType:this,catchValue:n,typeName:qt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return EO.create(this,t)}readonly(){return rR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ECt=/^c[^\s-]{8,}$/i,SCt=/^[a-z][a-z0-9]*$/,yCt=/[0-9A-HJKMNP-TV-Z]{26}/,TCt=/^[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,ICt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,CCt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),bCt=/^(((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}))$/,vCt=/^(([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})))$/,RCt=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$");iE=class e extends vn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:$e.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)!==it.string){let i=this._getOrReturnCtx(t);return st(i,{code:$e.invalid_type,expected:it.string,received:i.parsedType}),gn}let r=new ou,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),st(o,{code:$e.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),st(o,{code:$e.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?st(o,{code:$e.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&st(o,{code:$e.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")ICt.test(t.data)||(o=this._getOrReturnCtx(t,o),st(o,{validation:"email",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")CCt.test(t.data)||(o=this._getOrReturnCtx(t,o),st(o,{validation:"emoji",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")TCt.test(t.data)||(o=this._getOrReturnCtx(t,o),st(o,{validation:"uuid",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")ECt.test(t.data)||(o=this._getOrReturnCtx(t,o),st(o,{validation:"cuid",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")SCt.test(t.data)||(o=this._getOrReturnCtx(t,o),st(o,{validation:"cuid2",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")yCt.test(t.data)||(o=this._getOrReturnCtx(t,o),st(o,{validation:"ulid",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),st(o,{validation:"url",code:$e.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),st(o,{validation:"regex",code:$e.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),st(o,{code:$e.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),st(o,{code:$e.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),st(o,{code:$e.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?RCt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),st(o,{code:$e.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?xCt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),st(o,{validation:"ip",code:$e.invalid_string,message:i.message}),r.dirty()):gr.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}};iE.create=e=>{var t;return new iE({checks:[],typeName:qt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...bn(e)})};gy=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)!==it.number){let i=this._getOrReturnCtx(t);return st(i,{code:$e.invalid_type,expected:it.number,received:i.parsedType}),gn}let r,o=new ou;for(let i of this._def.checks)i.kind==="int"?gr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),st(r,{code:$e.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),st(r,{code:$e.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),st(r,{code:$e.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?DCt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),st(r,{code:$e.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),st(r,{code:$e.not_finite,message:i.message}),o.dirty()):gr.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"&&gr.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)}};gy.create=e=>new gy({checks:[],typeName:qt.ZodNumber,coerce:e?.coerce||!1,...bn(e)});hy=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)!==it.bigint){let i=this._getOrReturnCtx(t);return st(i,{code:$e.invalid_type,expected:it.bigint,received:i.parsedType}),gn}let r,o=new ou;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),st(r,{code:$e.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),st(r,{code:$e.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),st(r,{code:$e.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):gr.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}};hy.create=e=>{var t;return new hy({checks:[],typeName:qt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...bn(e)})};_y=class extends vn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){let r=this._getOrReturnCtx(t);return st(r,{code:$e.invalid_type,expected:it.boolean,received:r.parsedType}),gn}return Hu(t.data)}};_y.create=e=>new _y({typeName:qt.ZodBoolean,coerce:e?.coerce||!1,...bn(e)});Ey=class e extends vn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){let i=this._getOrReturnCtx(t);return st(i,{code:$e.invalid_type,expected:it.date,received:i.parsedType}),gn}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return st(i,{code:$e.invalid_date}),gn}let r=new ou,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),st(o,{code:$e.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),st(o,{code:$e.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):gr.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}};Ey.create=e=>new Ey({checks:[],coerce:e?.coerce||!1,typeName:qt.ZodDate,...bn(e)});Zv=class extends vn{_parse(t){if(this._getType(t)!==it.symbol){let r=this._getOrReturnCtx(t);return st(r,{code:$e.invalid_type,expected:it.symbol,received:r.parsedType}),gn}return Hu(t.data)}};Zv.create=e=>new Zv({typeName:qt.ZodSymbol,...bn(e)});Sy=class extends vn{_parse(t){if(this._getType(t)!==it.undefined){let r=this._getOrReturnCtx(t);return st(r,{code:$e.invalid_type,expected:it.undefined,received:r.parsedType}),gn}return Hu(t.data)}};Sy.create=e=>new Sy({typeName:qt.ZodUndefined,...bn(e)});yy=class extends vn{_parse(t){if(this._getType(t)!==it.null){let r=this._getOrReturnCtx(t);return st(r,{code:$e.invalid_type,expected:it.null,received:r.parsedType}),gn}return Hu(t.data)}};yy.create=e=>new yy({typeName:qt.ZodNull,...bn(e)});aE=class extends vn{constructor(){super(...arguments),this._any=!0}_parse(t){return Hu(t.data)}};aE.create=e=>new aE({typeName:qt.ZodAny,...bn(e)});xg=class extends vn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hu(t.data)}};xg.create=e=>new xg({typeName:qt.ZodUnknown,...bn(e)});af=class extends vn{_parse(t){let n=this._getOrReturnCtx(t);return st(n,{code:$e.invalid_type,expected:it.never,received:n.parsedType}),gn}};af.create=e=>new af({typeName:qt.ZodNever,...bn(e)});Wv=class extends vn{_parse(t){if(this._getType(t)!==it.undefined){let r=this._getOrReturnCtx(t);return st(r,{code:$e.invalid_type,expected:it.void,received:r.parsedType}),gn}return Hu(t.data)}};Wv.create=e=>new Wv({typeName:qt.ZodVoid,...bn(e)});Dg=class e extends vn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==it.array)return st(n,{code:$e.invalid_type,expected:it.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)&&(st(n,{code:a?$e.too_big:$e.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&&(st(n,{code:$e.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&&(st(n,{code:$e.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 $d(n,a,n.path,c)))).then(a=>ou.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new $d(n,a,n.path,c)));return ou.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)}};Dg.create=(e,t)=>new Dg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qt.ZodArray,...bn(t)});iu=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=gr.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){let m=this._getOrReturnCtx(t);return st(m,{code:$e.invalid_type,expected:it.object,received:m.parsedType}),gn}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof af&&this._def.unknownKeys==="strip"))for(let m in o.data)a.includes(m)||c.push(m);let d=[];for(let m of a){let h=i[m],S=o.data[m];d.push({key:{status:"valid",value:m},value:h._parse(new $d(o,S,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof af){let m=this._def.unknownKeys;if(m==="passthrough")for(let h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(m==="strict")c.length>0&&(st(o,{code:$e.unrecognized_keys,keys:c}),r.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let m=this._def.catchall;for(let h of c){let S=o.data[h];d.push({key:{status:"valid",value:h},value:m._parse(new $d(o,S,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let m=[];for(let h of d){let S=await h.key;m.push({key:S,value:await h.value,alwaysSet:h.alwaysSet})}return m}).then(m=>ou.mergeObjectSync(r,m)):ou.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:qt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return gr.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 gr.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return Jv(this)}partial(t){let n={};return gr.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 gr.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof of;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return N2e(gr.objectKeys(this.shape))}};iu.create=(e,t)=>new iu({shape:()=>e,unknownKeys:"strip",catchall:af.create(),typeName:qt.ZodObject,...bn(t)});iu.strictCreate=(e,t)=>new iu({shape:()=>e,unknownKeys:"strict",catchall:af.create(),typeName:qt.ZodObject,...bn(t)});iu.lazycreate=(e,t)=>new iu({shape:e,unknownKeys:"strip",catchall:af.create(),typeName:qt.ZodObject,...bn(t)});Ty=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 kc(c.ctx.common.issues));return st(n,{code:$e.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 m={...n,common:{...n.common,issues:[]},parent:null},h=d._parseSync({data:n.data,path:n.path,parent:m});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:m}),m.common.issues.length&&a.push(m.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(d=>new kc(d));return st(n,{code:$e.invalid_union,unionErrors:c}),gn}}get options(){return this._def.options}};Ty.create=(e,t)=>new Ty({options:e,typeName:qt.ZodUnion,...bn(t)});R3=e=>e instanceof Cy?R3(e.schema):e instanceof Ul?R3(e.innerType()):e instanceof by?[e.value]:e instanceof vy?e.options:e instanceof Ry?Object.keys(e.enum):e instanceof xy?R3(e._def.innerType):e instanceof Sy?[void 0]:e instanceof yy?[null]:null,N3=class e extends vn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return st(n,{code:$e.invalid_type,expected:it.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}):(st(n,{code:$e.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=R3(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:qt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...bn(r)})}};Iy=class extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(KJ(i)||KJ(a))return gn;let c=ZJ(i.value,a.value);return c.valid?((JJ(i)||JJ(a))&&n.dirty(),{status:n.value,value:c.data}):(st(r,{code:$e.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}))}};Iy.create=(e,t,n)=>new Iy({left:e,right:t,typeName:qt.ZodIntersection,...bn(n)});MA=class e extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return st(r,{code:$e.invalid_type,expected:it.array,received:r.parsedType}),gn;if(r.data.length<this._def.items.length)return st(r,{code:$e.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),gn;!this._def.rest&&r.data.length>this._def.items.length&&(st(r,{code:$e.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 $d(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>ou.mergeArray(n,a)):ou.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};MA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new MA({items:e,typeName:qt.ZodTuple,rest:null,...bn(t)})};O3=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!==it.object)return st(r,{code:$e.invalid_type,expected:it.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 $d(r,c,r.path,c)),value:a._parse(new $d(r,r.data[c],r.path,c))});return r.common.async?ou.mergeObjectAsync(n,o):ou.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:qt.ZodRecord,...bn(r)}):new e({keyType:iE.create(),valueType:t,typeName:qt.ZodRecord,...bn(n)})}},Xv=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!==it.map)return st(r,{code:$e.invalid_type,expected:it.map,received:r.parsedType}),gn;let o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,d],m)=>({key:o._parse(new $d(r,c,r.path,[m,"key"])),value:i._parse(new $d(r,d,r.path,[m,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let d of a){let m=await d.key,h=await d.value;if(m.status==="aborted"||h.status==="aborted")return gn;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(m.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let d of a){let m=d.key,h=d.value;if(m.status==="aborted"||h.status==="aborted")return gn;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(m.value,h.value)}return{status:n.value,value:c}}}};Xv.create=(e,t,n)=>new Xv({valueType:t,keyType:e,typeName:qt.ZodMap,...bn(n)});eR=class e extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return st(r,{code:$e.invalid_type,expected:it.set,received:r.parsedType}),gn;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(st(r,{code:$e.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&&(st(r,{code:$e.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function a(d){let m=new Set;for(let h of d){if(h.status==="aborted")return gn;h.status==="dirty"&&n.dirty(),m.add(h.value)}return{status:n.value,value:m}}let c=[...r.data.values()].map((d,m)=>i._parse(new $d(r,d,r.path,m)));return r.common.async?Promise.all(c).then(d=>a(d)):a(c)}min(t,n){return new e({...this._def,minSize:{value:t,message: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)}};eR.create=(e,t)=>new eR({valueType:e,minSize:null,maxSize:null,typeName:qt.ZodSet,...bn(t)});w3=class e extends vn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return st(n,{code:$e.invalid_type,expected:it.function,received:n.parsedType}),gn;function r(c,d){return D3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,x3(),hO].filter(m=>!!m),issueData:{code:$e.invalid_arguments,argumentsError:d}})}function o(c,d){return D3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,x3(),hO].filter(m=>!!m),issueData:{code:$e.invalid_return_type,returnTypeError:d}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof sE){let c=this;return Hu(async function(...d){let m=new kc([]),h=await c._def.args.parseAsync(d,i).catch(C=>{throw m.addIssue(r(d,C)),m}),S=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(S,i).catch(C=>{throw m.addIssue(o(S,C)),m})})}else{let c=this;return Hu(function(...d){let m=c._def.args.safeParse(d,i);if(!m.success)throw new kc([r(d,m.error)]);let h=Reflect.apply(a,this,m.data),S=c._def.returns.safeParse(h,i);if(!S.success)throw new kc([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:MA.create(t).rest(xg.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||MA.create([]).rest(xg.create()),returns:n||xg.create(),typeName:qt.ZodFunction,...bn(r)})}},Cy=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})}};Cy.create=(e,t)=>new Cy({getter:e,typeName:qt.ZodLazy,...bn(t)});by=class extends vn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return st(n,{received:n.data,code:$e.invalid_literal,expected:this._def.value}),gn}return{status:"valid",value:t.data}}get value(){return this._def.value}};by.create=(e,t)=>new by({value:e,typeName:qt.ZodLiteral,...bn(t)});vy=class e extends vn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return st(n,{expected:gr.joinValues(r),received:n.parsedType,code:$e.invalid_type}),gn}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return st(n,{received:n.data,code:$e.invalid_enum_value,options:r}),gn}return Hu(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)))}};vy.create=N2e;Ry=class extends vn{_parse(t){let n=gr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){let o=gr.objectValues(n);return st(r,{expected:gr.joinValues(o),received:r.parsedType,code:$e.invalid_type}),gn}if(n.indexOf(t.data)===-1){let o=gr.objectValues(n);return st(r,{received:r.data,code:$e.invalid_enum_value,options:o}),gn}return Hu(t.data)}get enum(){return this._def.values}};Ry.create=(e,t)=>new Ry({values:e,typeName:qt.ZodNativeEnum,...bn(t)});sE=class extends vn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return st(n,{code:$e.invalid_type,expected:it.promise,received:n.parsedType}),gn;let r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Hu(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};sE.create=(e,t)=>new sE({type:e,typeName:qt.ZodPromise,...bn(t)});Ul=class extends vn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qt.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=>{st(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(!_O(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=>_O(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);gr.assertNever(o)}};Ul.create=(e,t,n)=>new Ul({schema:e,typeName:qt.ZodEffects,effect:t,...bn(n)});Ul.createWithPreprocess=(e,t,n)=>new Ul({schema:t,effect:{type:"preprocess",transform:e},typeName:qt.ZodEffects,...bn(n)});of=class extends vn{_parse(t){return this._getType(t)===it.undefined?Hu(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};of.create=(e,t)=>new of({innerType:e,typeName:qt.ZodOptional,...bn(t)});Bg=class extends vn{_parse(t){return this._getType(t)===it.null?Hu(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Bg.create=(e,t)=>new Bg({innerType:e,typeName:qt.ZodNullable,...bn(t)});xy=class extends vn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};xy.create=(e,t)=>new xy({innerType:e,typeName:qt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...bn(t)});tR=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 B3(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new kc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new kc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};tR.create=(e,t)=>new tR({innerType:e,typeName:qt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...bn(t)});nR=class extends vn{_parse(t){if(this._getType(t)!==it.nan){let r=this._getOrReturnCtx(t);return st(r,{code:$e.invalid_type,expected:it.nan,received:r.parsedType}),gn}return{status:"valid",value:t.data}}};nR.create=e=>new nR({typeName:qt.ZodNaN,...bn(e)});BCt=Symbol("zod_brand"),M3=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}},EO=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(),B2e(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:qt.ZodPipeline})}},rR=class extends vn{_parse(t){let n=this._def.innerType._parse(t);return _O(n)&&(n.value=Object.freeze(n.value)),n}};rR.create=(e,t)=>new rR({innerType:e,typeName:qt.ZodReadonly,...bn(t)});O2e=(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,m=typeof c=="string"?{message:c}:c;o.addIssue({code:"custom",...m,fatal:d})}}):aE.create(),NCt={object:iu.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"})(qt||(qt={}));OCt=(e,t={message:`Input not instance of ${e.name}`})=>O2e(n=>n instanceof e,t),w2e=iE.create,M2e=gy.create,wCt=nR.create,MCt=hy.create,k2e=_y.create,kCt=Ey.create,PCt=Zv.create,UCt=Sy.create,LCt=yy.create,QCt=aE.create,FCt=xg.create,GCt=af.create,jCt=Wv.create,zCt=Dg.create,HCt=iu.create,$Ct=iu.strictCreate,VCt=Ty.create,qCt=N3.create,YCt=Iy.create,KCt=MA.create,JCt=O3.create,ZCt=Xv.create,WCt=eR.create,XCt=w3.create,ebt=Cy.create,tbt=by.create,nbt=vy.create,rbt=Ry.create,obt=sE.create,R2e=Ul.create,ibt=of.create,abt=Bg.create,sbt=Ul.createWithPreprocess,ubt=EO.create,cbt=()=>w2e().optional(),lbt=()=>M2e().optional(),dbt=()=>k2e().optional(),pbt={string:e=>iE.create({...e,coerce:!0}),number:e=>gy.create({...e,coerce:!0}),boolean:e=>_y.create({...e,coerce:!0}),bigint:e=>hy.create({...e,coerce:!0}),date:e=>Ey.create({...e,coerce:!0})},fbt=gn,ru=Object.freeze({__proto__:null,defaultErrorMap:hO,setErrorMap:hCt,getErrorMap:x3,makeIssue:D3,EMPTY_PATH:_Ct,addIssueToContext:st,ParseStatus:ou,INVALID:gn,DIRTY:B2e,OK:Hu,isAborted:KJ,isDirty:JJ,isValid:_O,isAsync:B3,get util(){return gr},get objectUtil(){return YJ},ZodParsedType:it,getParsedType:oE,ZodType:vn,ZodString:iE,ZodNumber:gy,ZodBigInt:hy,ZodBoolean:_y,ZodDate:Ey,ZodSymbol:Zv,ZodUndefined:Sy,ZodNull:yy,ZodAny:aE,ZodUnknown:xg,ZodNever:af,ZodVoid:Wv,ZodArray:Dg,ZodObject:iu,ZodUnion:Ty,ZodDiscriminatedUnion:N3,ZodIntersection:Iy,ZodTuple:MA,ZodRecord:O3,ZodMap:Xv,ZodSet:eR,ZodFunction:w3,ZodLazy:Cy,ZodLiteral:by,ZodEnum:vy,ZodNativeEnum:Ry,ZodPromise:sE,ZodEffects:Ul,ZodTransformer:Ul,ZodOptional:of,ZodNullable:Bg,ZodDefault:xy,ZodCatch:tR,ZodNaN:nR,BRAND:BCt,ZodBranded:M3,ZodPipeline:EO,ZodReadonly:rR,custom:O2e,Schema:vn,ZodSchema:vn,late:NCt,get ZodFirstPartyTypeKind(){return qt},coerce:pbt,any:QCt,array:zCt,bigint:MCt,boolean:k2e,date:kCt,discriminatedUnion:qCt,effect:R2e,enum:nbt,function:XCt,instanceof:OCt,intersection:YCt,lazy:ebt,literal:tbt,map:ZCt,nan:wCt,nativeEnum:rbt,never:GCt,null:LCt,nullable:abt,number:M2e,object:HCt,oboolean:dbt,onumber:lbt,optional:ibt,ostring:cbt,pipeline:ubt,preprocess:sbt,promise:obt,record:JCt,set:WCt,strictObject:$Ct,string:w2e,symbol:PCt,transformer:R2e,tuple:KCt,undefined:UCt,union:VCt,unknown:FCt,void:jCt,NEVER:fbt,ZodIssueCode:$e,quotelessJson:gCt,ZodError:kc}),Abt=e=>typeof e?.safeParse=="function",VJ=e=>typeof e?.passthrough=="function",mbt=(e,t)=>VJ(e)?VJ(t)?e.merge(t):e:VJ(t)?t:Object.assign({},e,t),Hd=ru.object({name:ru.literal("ZodError"),issues:ru.array(ru.object({path:ru.array(ru.union([ru.string(),ru.number()])),message:ru.string().optional(),code:ru.nativeEnum(ru.ZodIssueCode)}).catchall(ru.any()))}),WJ=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}},PTn=ru.object({message:ru.literal("Request validation failed"),pathParameterErrors:Hd.nullable(),headerErrors:Hd.nullable(),queryParameterErrors:Hd.nullable(),bodyErrors:Hd.nullable()}),UTn=ru.object({pathParameterErrors:Hd.nullable(),headerErrors:Hd.nullable(),queryParameterErrors:Hd.nullable(),bodyErrors:Hd.nullable()}),LTn=ru.object({paramsResult:Hd.nullable(),headersResult:Hd.nullable(),queryResult:Hd.nullable(),bodyResult:Hd.nullable()}),P2e="zod-ts-rest-polyfill",gbt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},hbt=e=>gbt(e)?e:Abt(e)?(Object.assign(e,{"~standard":{vendor:P2e,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,_bt=(e,t)=>e?t?e instanceof iu&&t instanceof iu?mbt(e,t):{...e,...t}:e:t,Ebt=(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===P2e?{error:new kc(r.issues)}:{error:new WJ(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},U2e=Symbol("ContractNoBody"),L2e=e=>"method"in e&&"path"in e,Q2e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return L2e(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:_bt(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,Q2e(r,t)]})),qJ=Symbol("ContractPlainType"),au=()=>({router:(e,t)=>Q2e(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>qJ,body:()=>qJ,type:()=>qJ,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>U2e}),Sbt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},ybt=(e,t=!1)=>{let n=t?Tbt(e):Ibt(e);return n?.length>0?"?"+n:""},Tbt=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("&"):"",Ibt=e=>e?Object.keys(e).flatMap(t=>XJ(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",XJ=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>XJ(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>XJ(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],eZ=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}},tZ=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:a})=>{let c=await fetch(t,{...a,method:n,headers:r,body:o}),d=c.headers.get("content-type");if(d?.includes("application/")&&d?.includes("json")){let m=e.responses[c.status],h={status:c.status,body:m===U2e?void 0:await c.json(),headers:c.headers},S=hbt(m);if(S&&(i??e.validateResponseOnClient)){let y=Ebt(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}},Cbt=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},x2e=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),bbt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:d}=e,m=n.api||tZ,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([C,v])=>typeof v=="function"?[C,v(e)]:[C,v])),S={...h&&x2e(h),...x2e(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:Cbt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?y={...y,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...y.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(y={...y,contentType:"application/json",headers:{"content-type":"application/json",...y.headers},body:JSON.stringify(o)})),m({...y,...a})},vbt=(e,t,n)=>{let{query:r,params:o,body:i,headers:a,extraHeaders:c,overrideClientOptions:d,fetchOptions:m,cache:h,next:S,...y}=n||{},C={...t,...d},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([N,M])=>[N,String(M)])):{};return{path:Rbt(r,C.baseUrl,v,e,!!C.jsonQuery),clientArgs:C,route:e,body:i,query:r,extraInputArgs:y,fetchOptions:{...h&&{cache:h},...S&&{next:S},...m},headers:{...c,...a}}},Rbt=(e,t,n,r,o)=>{let i=Sbt({path:r.path,params:n}),a=ybt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},xbt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=vbt(e,t,r),i=await bbt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new eZ(i,n)}},nZ=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>L2e(r)?[n,xbt(r,t)]:[n,nZ(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 m=a.prototype,h=Object.keys(m);for(let S=0;S<h.length;S++){let y=h[S];y in c||(c[y]=m[y].bind(c))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(c){var d;let m=n?.Parent?new i:this;r(m,c),(d=m._zod).deferred??(d.deferred=[]);for(let h of m._zod.deferred)h();return m}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function Ai(e){return e&&Object.assign(Dy,e),Dy}var F2e,rZ,oZ,sf,uE,Dy,By=O(()=>{A();rZ=Object.freeze({status:"aborted"});oZ=Symbol("zod_brand"),sf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},uE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(F2e=globalThis).__zod_globalConfig??(F2e.__zod_globalConfig={});Dy=globalThis.__zod_globalConfig});var Pe={};Ga(Pe,{BIGINT_FORMAT_RANGES:()=>AZ,Class:()=>aZ,NUMBER_FORMAT_RANGES:()=>fZ,aborted:()=>pE,allowsEval:()=>cZ,assert:()=>wbt,assertEqual:()=>Dbt,assertIs:()=>Nbt,assertNever:()=>Obt,assertNotEqual:()=>Bbt,assignProp:()=>lE,base64ToUint8Array:()=>j2e,base64urlToUint8Array:()=>Jbt,cached:()=>iR,captureStackTrace:()=>P3,cleanEnum:()=>Kbt,cleanRegex:()=>TO,clone:()=>$u,cloneDef:()=>kbt,createTransparentProxy:()=>Gbt,defineLazy:()=>Fn,esc:()=>k3,escapeRegex:()=>Vd,explicitlyAborted:()=>mZ,extend:()=>Hbt,finalizeIssue:()=>Vu,floatSafeRemainder:()=>sZ,getElementAtPath:()=>Pbt,getEnumValues:()=>yO,getLengthableOrigin:()=>bO,getParsedType:()=>Fbt,getSizableOrigin:()=>CO,hexToUint8Array:()=>Wbt,isObject:()=>Ny,isPlainObject:()=>dE,issue:()=>aR,joinValues:()=>ue,jsonStringifyReplacer:()=>oR,merge:()=>Vbt,mergeDefs:()=>Ng,normalizeParams:()=>ze,nullish:()=>cE,numKeys:()=>Qbt,objectClone:()=>Mbt,omit:()=>zbt,optionalKeys:()=>pZ,parsedType:()=>we,partial:()=>qbt,pick:()=>jbt,prefixIssues:()=>Pc,primitiveTypes:()=>dZ,promiseAllObject:()=>Ubt,propertyKeyTypes:()=>IO,randomString:()=>Lbt,required:()=>Ybt,safeExtend:()=>$bt,shallowClone:()=>lZ,slugify:()=>uZ,stringifyPrimitive:()=>Ne,uint8ArrayToBase64:()=>z2e,uint8ArrayToBase64url:()=>Zbt,uint8ArrayToHex:()=>Xbt,unwrapMessage:()=>SO});function Dbt(e){return e}function Bbt(e){return e}function Nbt(e){}function Obt(e){throw new Error("Unexpected value in exhaustive check")}function wbt(e){}function yO(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 oR(e,t){return typeof t=="bigint"?t.toString():t}function iR(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function cE(e){return e==null}function TO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function sZ(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 Fn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==G2e)return r===void 0&&(r=G2e,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Mbt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function lE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ng(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function kbt(e){return Ng(e._zod.def)}function Pbt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function Ubt(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 Lbt(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 uZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Ny(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function dE(e){if(Ny(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Ny(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function lZ(e){return dE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Qbt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Vd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $u(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 Gbt(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 pZ(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function jbt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Ng(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return lE(this,"shape",a),a},checks:[]});return $u(e,i)}function zbt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Ng(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return lE(this,"shape",a),a},checks:[]});return $u(e,i)}function Hbt(e,t){if(!dE(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Ng(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return lE(this,"shape",i),i}});return $u(e,o)}function $bt(e,t){if(!dE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Ng(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return lE(this,"shape",r),r}});return $u(e,n)}function Vbt(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Ng(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return lE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return $u(e,n)}function qbt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Ng(t._zod.def,{get shape(){let c=t._zod.def.shape,d={...c};if(n)for(let m in n){if(!(m in c))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(d[m]=e?new e({type:"optional",innerType:c[m]}):c[m])}else for(let m in c)d[m]=e?new e({type:"optional",innerType:c[m]}):c[m];return lE(this,"shape",d),d},checks:[]});return $u(t,a)}function Ybt(e,t,n){let r=Ng(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(let a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return lE(this,"shape",i),i}});return $u(t,r)}function pE(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 mZ(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 Pc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function SO(e){return typeof e=="string"?e:e?.message}function Vu(e,t,n){let r=e.message?e.message:SO(e.inst?._zod.def?.error?.(e))??SO(t?.error?.(e))??SO(n.customError?.(e))??SO(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 CO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function bO(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 aR(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Kbt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function j2e(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 z2e(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Jbt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return j2e(t+n)}function Zbt(e){return z2e(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Wbt(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 Xbt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var G2e,P3,cZ,Fbt,IO,dZ,fZ,AZ,aZ,Et=O(()=>{A();By();G2e=Symbol("evaluating");P3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};cZ=iR(()=>{if(Dy.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});Fbt=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}`)}},IO=new Set(["string","number","symbol"]),dZ=new Set(["string","number","bigint","boolean","symbol","undefined"]);fZ={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]},AZ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};aZ=class{constructor(...t){}}});function RO(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 xO(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>r({issues:c},[...i,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...i,...a.path]);else{let c=[...i,...a.path];if(c.length===0)n._errors.push(t(a));else{let d=n,m=0;for(;m<c.length;){let h=c[m];m===c.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(t(a))):d[h]=d[h]||{_errors:[]},d=d[h],m++}}}};return r(e),n}function gZ(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var a,c;for(let d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(m=>r({issues:m},[...i,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...i,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...i,...d.path]);else{let m=[...i,...d.path];if(m.length===0){n.errors.push(t(d));continue}let h=n,S=0;for(;S<m.length;){let y=m[S],C=S===m.length-1;typeof y=="string"?(h.properties??(h.properties={}),(a=h.properties)[y]??(a[y]={errors:[]}),h=h.properties[y]):(h.items??(h.items=[]),(c=h.items)[y]??(c[y]={errors:[]}),h=h.items[y]),C&&h.errors.push(t(d)),S++}}};return r(e),n}function $2e(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 hZ(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 ${$2e(r.path)}`);return t.join(`
41
41
  `)}var H2e,vO,Uc,_Z=O(()=>{A();By();Et();H2e=(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,oR,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},vO=ne("$ZodError",H2e),Uc=ne("$ZodError",H2e,{Parent:Error})});var sR,U3,uR,L3,cR,EZ,lR,SZ,Q3,tvt,F3,nvt,G3,rvt,j3,ovt,z3,ivt,H3,avt,$3,svt,V3,uvt,yZ=O(()=>{A();By();_Z();Et();sR=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 sf;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Vu(d,i,Ai())));throw P3(c,o?.callee),c}return a.value},U3=sR(Uc),uR=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=>Vu(d,i,Ai())));throw P3(c,o?.callee),c}return a.value},L3=uR(Uc),cR=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 sf;return i.issues.length?{success:!1,error:new(e??vO)(i.issues.map(a=>Vu(a,o,Ai())))}:{success:!0,data:i.value}},EZ=cR(Uc),lR=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=>Vu(a,o,Ai())))}:{success:!0,data:i.value}},SZ=lR(Uc),Q3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return sR(e)(t,n,o)},tvt=Q3(Uc),F3=e=>(t,n,r)=>sR(e)(t,n,r),nvt=F3(Uc),G3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return uR(e)(t,n,o)},rvt=G3(Uc),j3=e=>async(t,n,r)=>uR(e)(t,n,r),ovt=j3(Uc),z3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return cR(e)(t,n,o)},ivt=z3(Uc),H3=e=>(t,n,r)=>cR(e)(t,n,r),avt=H3(Uc),$3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return lR(e)(t,n,o)},svt=$3(Uc),V3=e=>async(t,n,r)=>lR(e)(t,n,r),uvt=V3(Uc)});var Ll={};Ga(Ll,{base64:()=>UZ,base64url:()=>q3,bigint:()=>HZ,boolean:()=>VZ,browserEmail:()=>gvt,cidrv4:()=>kZ,cidrv6:()=>PZ,cuid:()=>TZ,cuid2:()=>IZ,date:()=>FZ,datetime:()=>jZ,domain:()=>Evt,duration:()=>xZ,e164:()=>QZ,email:()=>BZ,emoji:()=>NZ,extendedDuration:()=>cvt,guid:()=>DZ,hex:()=>Svt,hostname:()=>_vt,html5Email:()=>fvt,httpProtocol:()=>LZ,idnEmail:()=>mvt,integer:()=>$Z,ipv4:()=>OZ,ipv6:()=>wZ,ksuid:()=>vZ,lowercase:()=>KZ,mac:()=>MZ,md5_base64:()=>Tvt,md5_base64url:()=>Ivt,md5_hex:()=>yvt,nanoid:()=>RZ,null:()=>qZ,number:()=>Y3,rfc5322Email:()=>Avt,sha1_base64:()=>bvt,sha1_base64url:()=>vvt,sha1_hex:()=>Cvt,sha256_base64:()=>xvt,sha256_base64url:()=>Dvt,sha256_hex:()=>Rvt,sha384_base64:()=>Nvt,sha384_base64url:()=>Ovt,sha384_hex:()=>Bvt,sha512_base64:()=>Mvt,sha512_base64url:()=>kvt,sha512_hex:()=>wvt,string:()=>zZ,time:()=>GZ,ulid:()=>CZ,undefined:()=>YZ,unicodeEmail:()=>V2e,uppercase:()=>JZ,uuid:()=>Oy,uuid4:()=>lvt,uuid6:()=>dvt,uuid7:()=>pvt,xid:()=>bZ});function NZ(){return new RegExp(hvt,"u")}function Y2e(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 GZ(e){return new RegExp(`^${Y2e(e)}$`)}function jZ(e){let t=Y2e({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(`^${q2e}T(?:${r})$`)}function DO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function BO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var TZ,IZ,CZ,bZ,vZ,RZ,xZ,cvt,DZ,Oy,lvt,dvt,pvt,BZ,fvt,Avt,V2e,mvt,gvt,hvt,OZ,wZ,MZ,kZ,PZ,UZ,q3,_vt,Evt,LZ,QZ,q2e,FZ,zZ,HZ,$Z,Y3,VZ,qZ,YZ,KZ,JZ,Svt,yvt,Tvt,Ivt,Cvt,bvt,vvt,Rvt,xvt,Dvt,Bvt,Nvt,Ovt,wvt,Mvt,kvt,K3=O(()=>{A();Et();TZ=/^[cC][0-9a-z]{6,}$/,IZ=/^[0-9a-z]+$/,CZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,bZ=/^[0-9a-vA-V]{20}$/,vZ=/^[A-Za-z0-9]{27}$/,RZ=/^[a-zA-Z0-9_-]{21}$/,xZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cvt=/^[-+]?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)?)??$/,DZ=/^([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})$/,Oy=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)$/,lvt=Oy(4),dvt=Oy(6),pvt=Oy(7),BZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fvt=/^[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])?)*$/,Avt=/^(([^<>()\[\]\\.,;:\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,}))$/,V2e=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,mvt=V2e,gvt=/^[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])?)*$/,hvt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";OZ=/^(?:(?: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])$/,wZ=/^(([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}|:))$/,MZ=e=>{let t=Vd(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])$/,PZ=/^(([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])$/,UZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,q3=/^[A-Za-z0-9_-]*$/,_vt=/^(?=.{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])?)*\.?$/,Evt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,LZ=/^https?$/,QZ=/^\+[1-9]\d{6,14}$/,q2e="(?:(?:\\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])))",FZ=new RegExp(`^${q2e}$`);zZ=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},HZ=/^-?\d+n?$/,$Z=/^-?\d+$/,Y3=/^-?\d+(?:\.\d+)?$/,VZ=/^(?:true|false)$/i,qZ=/^null$/i,YZ=/^undefined$/i,KZ=/^[^A-Z]*$/,JZ=/^[^a-z]*$/,Svt=/^[0-9a-fA-F]*$/;yvt=/^[0-9a-fA-F]{32}$/,Tvt=DO(22,"=="),Ivt=BO(22),Cvt=/^[0-9a-fA-F]{40}$/,bvt=DO(27,"="),vvt=BO(27),Rvt=/^[0-9a-fA-F]{64}$/,xvt=DO(43,"="),Dvt=BO(43),Bvt=/^[0-9a-fA-F]{96}$/,Nvt=DO(64,""),Ovt=BO(64),wvt=/^[0-9a-fA-F]{128}$/,Mvt=DO(86,"=="),kvt=BO(86)});function K2e(e,t,n){e.issues.length&&t.issues.push(...Pc(n,e.issues))}var qr,J2e,J3,Z3,ZZ,WZ,XZ,eW,tW,nW,rW,oW,iW,dR,aW,sW,uW,cW,lW,dW,pW,fW,AW,W3=O(()=>{A();By();K3();Et();qr=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),J2e={number:"number",bigint:"bigint",object:"date"},J3=ne("$ZodCheckLessThan",(e,t)=>{qr.init(e,t);let n=J2e[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})}}),Z3=ne("$ZodCheckGreaterThan",(e,t)=>{qr.init(e,t);let n=J2e[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})}}),ZZ=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):sZ(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})}}),WZ=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]=fZ[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=$Z)}),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})}}),XZ=ne("$ZodCheckBigIntFormat",(e,t)=>{qr.init(e,t);let[n,r]=AZ[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})}}),eW=ne("$ZodCheckMaxSize",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!cE(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:CO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),tW=ne("$ZodCheckMinSize",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!cE(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:CO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),nW=ne("$ZodCheckSizeEquals",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!cE(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:CO(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})}}),rW=ne("$ZodCheckMaxLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!cE(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=bO(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oW=ne("$ZodCheckMinLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!cE(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=bO(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),iW=ne("$ZodCheckLengthEquals",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!cE(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=bO(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})}}),dR=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=()=>{})}),aW=ne("$ZodCheckRegex",(e,t)=>{dR.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})}}),sW=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=KZ),dR.init(e,t)}),uW=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=JZ),dR.init(e,t)}),cW=ne("$ZodCheckIncludes",(e,t)=>{qr.init(e,t);let n=Vd(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})}}),lW=ne("$ZodCheckStartsWith",(e,t)=>{qr.init(e,t);let n=new RegExp(`^${Vd(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})}}),dW=ne("$ZodCheckEndsWith",(e,t)=>{qr.init(e,t);let n=new RegExp(`.*${Vd(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})}});pW=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=>K2e(o,n,t.property));K2e(r,n,t.property)}}),fW=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})}}),AW=ne("$ZodCheckOverwrite",(e,t)=>{qr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var NO,mW=O(()=>{A();NO=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(`
@@ -104,7 +104,7 @@ Mongoose Error Code: ${t.code}`:""}`})}function SK(e,t,n,r=void 0){n&&(0,FN.safe
104
104
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let c=a[1];if(t===a[0]){i(a);continue}if(e.external){let m=e.external.registry.get(a[0])?.id;if(t!==a[0]&&m){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(c.cycle){i(a);continue}if(c.count>1&&e.reused==="ref"){i(a);continue}}}function hE(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=c=>{let d=e.seen.get(c);if(d.ref===null)return;let m=d.def??d.schema,h={...m},S=d.ref;if(d.ref=null,S){r(S);let C=e.seen.get(S),v=C.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(v)):Object.assign(m,v),Object.assign(m,h),c._zod.parent===S)for(let N in m)N==="$ref"||N==="allOf"||N in h||delete m[N];if(v.$ref&&C.def)for(let N in m)N==="$ref"||N==="allOf"||N in C.def&&JSON.stringify(m[N])===JSON.stringify(C.def[N])&&delete m[N]}let y=c._zod.parent;if(y&&y!==S){r(y);let C=e.seen.get(y);if(C?.schema.$ref&&(m.$ref=C.schema.$ref,C.def))for(let v in m)v==="$ref"||v==="allOf"||v in C.def&&JSON.stringify(m[v])===JSON.stringify(C.def[v])&&delete m[v]}e.override({zodSchema:c,jsonSchema:m,path:d.path??[]})};for(let c of[...e.seen.entries()].reverse())r(c[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Object.assign(o,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let a=e.external?.defs??{};for(let c of e.seen.entries()){let d=c[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,a[d.defId]=d.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:vR(t,"input",e.processors),output:vR(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Yu(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Yu(r.element,n);if(r.type==="set")return Yu(r.valueType,n);if(r.type==="lazy")return Yu(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Yu(r.innerType,n);if(r.type==="intersection")return Yu(r.left,n)||Yu(r.right,n);if(r.type==="record"||r.type==="map")return Yu(r.keyType,n)||Yu(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Yu(r.in,n)||Yu(r.out,n);if(r.type==="object"){for(let o in r.shape)if(Yu(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(Yu(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(Yu(o,n))return!0;return!!(r.rest&&Yu(r.rest,n))}return!1}var See,vR,FO=O(()=>{A();UO();See=(e,t={})=>n=>{let r=mE({...n,processors:t});return Dr(e,r),gE(r,e),hE(r,e)},vR=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},a=mE({...o??{},target:i,io:t,processors:n});return Dr(e,a),gE(a,e),hE(a,e)}});function G6(e,t){if("_idmap"in e){let r=e,o=mE({...t,processors:L6}),i={};for(let d of r._idmap.entries()){let[m,h]=d;Dr(h,o)}let a={},c={registry:r,uri:t?.uri,defs:i};o.external=c;for(let d of r._idmap.entries()){let[m,h]=d;gE(o,h),a[m]=hE(o,h)}if(Object.keys(i).length>0){let d=o.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[d]:i}}return{schemas:a}}let n=mE({...t,processors:L6});return Dr(e,n),gE(n,e),hE(n,e)}var rxt,yee,Tee,Iee,Cee,bee,vee,Ree,xee,Dee,Bee,Nee,Oee,wee,Mee,kee,Pee,Uee,Lee,Qee,Fee,Gee,jee,zee,Hee,$ee,Q6,Vee,qee,Yee,Kee,Jee,Zee,Wee,Xee,ete,tte,nte,F6,rte,L6,GO=O(()=>{A();FO();Et();rxt={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},yee=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:a,format:c,patterns:d,contentEncoding:m}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),c&&(o.format=rxt[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),m&&(o.contentEncoding=m),d&&d.size>0){let h=[...d];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(S=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:S.source}))])}},Tee=(e,t,n,r)=>{let o=n,{minimum:i,maximum:a,format:c,multipleOf:d,exclusiveMaximum:m,exclusiveMinimum:h}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number";let S=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),y=typeof m=="number"&&m<=(a??Number.POSITIVE_INFINITY),C=t.target==="draft-04"||t.target==="openapi-3.0";S?C?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),y?C?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof a=="number"&&(o.maximum=a),typeof d=="number"&&(o.multipleOf=d)},Iee=(e,t,n,r)=>{n.type="boolean"},Cee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},bee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},vee=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Ree=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},xee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Dee=(e,t,n,r)=>{n.not={}},Bee=(e,t,n,r)=>{},Nee=(e,t,n,r)=>{},Oee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},wee=(e,t,n,r)=>{let o=e._zod.def,i=yO(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Mee=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let a of o.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},kee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Pee=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},Uee=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:d}=e._zod.bag;a!==void 0&&(i.minLength=a),c!==void 0&&(i.maxLength=c),d?d.length===1?(i.contentMediaType=d[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=d.map(m=>({contentMediaType:m}))):Object.assign(o,i)},Lee=(e,t,n,r)=>{n.type="boolean"},Qee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Fee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Gee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},jee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},zee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Hee=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=Dr(i.element,t,{...r,path:[...r.path,"items"]})},$ee=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let a=i.shape;for(let m in a)o.properties[m]=Dr(a[m],t,{...r,path:[...r.path,"properties",m]});let c=new Set(Object.keys(a)),d=new Set([...c].filter(m=>{let h=i.shape[m]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));d.size>0&&(o.required=Array.from(d)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Dr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Q6=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((c,d)=>Dr(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=a:n.anyOf=a},Vee=(e,t,n,r)=>{let o=e._zod.def,i=Dr(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=Dr(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=m=>"allOf"in m&&Object.keys(m).length===1,d=[...c(i)?i.allOf:[i],...c(a)?a.allOf:[a]];n.allOf=d},qee=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((y,C)=>Dr(y,t,{...r,path:[...r.path,a,C]})),m=i.rest?Dr(i.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=d,m&&(o.items=m)):t.target==="openapi-3.0"?(o.items={anyOf:d},m&&o.items.anyOf.push(m),o.minItems=d.length,m||(o.maxItems=d.length)):(o.items=d,m&&(o.additionalItems=m));let{minimum:h,maximum:S}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof S=="number"&&(o.maxItems=S)},Yee=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let a=i.keyType,d=a._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){let h=Dr(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let S of d)o.patternProperties[S.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Dr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Dr(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let m=a._zod.values;if(m){let h=[...m].filter(S=>typeof S=="string"||typeof S=="number");h.length>0&&(o.required=h)}},Kee=(e,t,n,r)=>{let o=e._zod.def,i=Dr(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Jee=(e,t,n,r)=>{let o=e._zod.def;Dr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Zee=(e,t,n,r)=>{let o=e._zod.def;Dr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Wee=(e,t,n,r)=>{let o=e._zod.def;Dr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Xee=(e,t,n,r)=>{let o=e._zod.def;Dr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},ete=(e,t,n,r)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;Dr(a,t,r);let c=t.seen.get(e);c.ref=a},tte=(e,t,n,r)=>{let o=e._zod.def;Dr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},nte=(e,t,n,r)=>{let o=e._zod.def;Dr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},F6=(e,t,n,r)=>{let o=e._zod.def;Dr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},rte=(e,t,n,r)=>{let o=e._zod.innerType;Dr(o,t,r);let i=t.seen.get(e);i.ref=o},L6={string:yee,number:Tee,boolean:Iee,bigint:Cee,symbol:bee,null:vee,undefined:Ree,void:xee,never:Dee,any:Bee,unknown:Nee,date:Oee,enum:wee,literal:Mee,nan:kee,template_literal:Pee,file:Uee,success:Lee,custom:Qee,function:Fee,transform:Gee,map:jee,set:zee,array:Hee,object:$ee,union:Q6,intersection:Vee,tuple:qee,record:Yee,nullable:Kee,nonoptional:Jee,default:Zee,prefault:Wee,catch:Xee,pipe:ete,readonly:tte,promise:nte,optional:F6,lazy:rte}});var j6,AUe=O(()=>{A();GO();FO();j6=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=mE({processors:L6,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Dr(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),gE(this.ctx,t);let r=hE(this.ctx,t),{"~standard":o,...i}=r;return i}}});var mUe={};var gUe=O(()=>{A()});var wg={};Ga(wg,{$ZodAny:()=>JW,$ZodArray:()=>tX,$ZodAsyncError:()=>sf,$ZodBase64:()=>FW,$ZodBase64URL:()=>GW,$ZodBigInt:()=>o6,$ZodBigIntFormat:()=>VW,$ZodBoolean:()=>OO,$ZodCIDRv4:()=>UW,$ZodCIDRv6:()=>LW,$ZodCUID:()=>bW,$ZodCUID2:()=>vW,$ZodCatch:()=>EX,$ZodCheck:()=>qr,$ZodCheckBigIntFormat:()=>XZ,$ZodCheckEndsWith:()=>dW,$ZodCheckGreaterThan:()=>Z3,$ZodCheckIncludes:()=>cW,$ZodCheckLengthEquals:()=>iW,$ZodCheckLessThan:()=>J3,$ZodCheckLowerCase:()=>sW,$ZodCheckMaxLength:()=>rW,$ZodCheckMaxSize:()=>eW,$ZodCheckMimeType:()=>fW,$ZodCheckMinLength:()=>oW,$ZodCheckMinSize:()=>tW,$ZodCheckMultipleOf:()=>ZZ,$ZodCheckNumberFormat:()=>WZ,$ZodCheckOverwrite:()=>AW,$ZodCheckProperty:()=>pW,$ZodCheckRegex:()=>aW,$ZodCheckSizeEquals:()=>nW,$ZodCheckStartsWith:()=>lW,$ZodCheckStringFormat:()=>dR,$ZodCheckUpperCase:()=>uW,$ZodCodec:()=>MO,$ZodCustom:()=>RX,$ZodCustomStringFormat:()=>HW,$ZodDate:()=>eX,$ZodDefault:()=>mX,$ZodDiscriminatedUnion:()=>oX,$ZodE164:()=>jW,$ZodEmail:()=>yW,$ZodEmoji:()=>IW,$ZodEncodeError:()=>uE,$ZodEnum:()=>cX,$ZodError:()=>vO,$ZodExactOptional:()=>fX,$ZodFile:()=>dX,$ZodFunction:()=>CX,$ZodGUID:()=>EW,$ZodIPv4:()=>MW,$ZodIPv6:()=>kW,$ZodISODate:()=>NW,$ZodISODateTime:()=>BW,$ZodISODuration:()=>wW,$ZodISOTime:()=>OW,$ZodIntersection:()=>iX,$ZodJWT:()=>zW,$ZodKSUID:()=>DW,$ZodLazy:()=>vX,$ZodLiteral:()=>lX,$ZodMAC:()=>PW,$ZodMap:()=>sX,$ZodNaN:()=>SX,$ZodNanoID:()=>CW,$ZodNever:()=>WW,$ZodNonOptional:()=>hX,$ZodNull:()=>KW,$ZodNullable:()=>AX,$ZodNumber:()=>r6,$ZodNumberFormat:()=>$W,$ZodObject:()=>gke,$ZodObjectJIT:()=>nX,$ZodOptional:()=>a6,$ZodPipe:()=>s6,$ZodPrefault:()=>gX,$ZodPreprocess:()=>yX,$ZodPromise:()=>bX,$ZodReadonly:()=>TX,$ZodRealError:()=>Uc,$ZodRecord:()=>aX,$ZodRegistry:()=>d6,$ZodSet:()=>uX,$ZodString:()=>wy,$ZodStringFormat:()=>Fr,$ZodSuccess:()=>_X,$ZodSymbol:()=>qW,$ZodTemplateLiteral:()=>IX,$ZodTransform:()=>pX,$ZodTuple:()=>i6,$ZodType:()=>nn,$ZodULID:()=>RW,$ZodURL:()=>TW,$ZodUUID:()=>SW,$ZodUndefined:()=>YW,$ZodUnion:()=>wO,$ZodUnknown:()=>ZW,$ZodVoid:()=>XW,$ZodXID:()=>xW,$ZodXor:()=>rX,$brand:()=>oZ,$constructor:()=>ne,$input:()=>MX,$output:()=>wX,Doc:()=>NO,JSONSchema:()=>mUe,JSONSchemaGenerator:()=>j6,NEVER:()=>rZ,TimePrecision:()=>LX,_any:()=>iee,_array:()=>pee,_base64:()=>D6,_base64url:()=>B6,_bigint:()=>WX,_boolean:()=>JX,_catch:()=>ZRt,_check:()=>pUe,_cidrv4:()=>R6,_cidrv6:()=>x6,_coercedBigint:()=>XX,_coercedBoolean:()=>ZX,_coercedDate:()=>lee,_coercedNumber:()=>HX,_coercedString:()=>PX,_cuid:()=>S6,_cuid2:()=>y6,_custom:()=>Aee,_date:()=>cee,_decode:()=>F3,_decodeAsync:()=>j3,_default:()=>YRt,_discriminatedUnion:()=>PRt,_e164:()=>N6,_email:()=>f6,_emoji:()=>_6,_encode:()=>Q3,_encodeAsync:()=>G3,_endsWith:()=>_R,_enum:()=>jRt,_file:()=>fee,_float32:()=>VX,_float64:()=>qX,_gt:()=>UA,_gte:()=>qu,_guid:()=>LO,_includes:()=>gR,_int:()=>$X,_int32:()=>YX,_int64:()=>eee,_intersection:()=>URt,_ipv4:()=>b6,_ipv6:()=>v6,_isoDate:()=>FX,_isoDateTime:()=>QX,_isoDuration:()=>jX,_isoTime:()=>GX,_jwt:()=>O6,_ksuid:()=>C6,_lazy:()=>txt,_length:()=>Py,_literal:()=>HRt,_lowercase:()=>AR,_lt:()=>PA,_lte:()=>Ql,_mac:()=>UX,_map:()=>FRt,_max:()=>Ql,_maxLength:()=>ky,_maxSize:()=>AE,_mime:()=>ER,_min:()=>qu,_minLength:()=>Og,_minSize:()=>LA,_multipleOf:()=>fE,_nan:()=>dee,_nanoid:()=>E6,_nativeEnum:()=>zRt,_negative:()=>M6,_never:()=>see,_nonnegative:()=>P6,_nonoptional:()=>KRt,_nonpositive:()=>k6,_normalize:()=>SR,_null:()=>oee,_nullable:()=>qRt,_number:()=>zX,_optional:()=>VRt,_overwrite:()=>uf,_parse:()=>sR,_parseAsync:()=>uR,_pipe:()=>WRt,_positive:()=>w6,_promise:()=>nxt,_property:()=>U6,_readonly:()=>XRt,_record:()=>QRt,_refine:()=>mee,_regex:()=>fR,_safeDecode:()=>H3,_safeDecodeAsync:()=>V3,_safeEncode:()=>z3,_safeEncodeAsync:()=>$3,_safeParse:()=>cR,_safeParseAsync:()=>lR,_set:()=>GRt,_size:()=>My,_slugify:()=>CR,_startsWith:()=>hR,_string:()=>kX,_stringFormat:()=>bR,_stringbool:()=>Eee,_success:()=>JRt,_superRefine:()=>gee,_symbol:()=>nee,_templateLiteral:()=>ext,_toLowerCase:()=>TR,_toUpperCase:()=>IR,_transform:()=>$Rt,_trim:()=>yR,_tuple:()=>LRt,_uint32:()=>KX,_uint64:()=>tee,_ulid:()=>T6,_undefined:()=>ree,_union:()=>MRt,_unknown:()=>aee,_uppercase:()=>mR,_url:()=>QO,_uuid:()=>A6,_uuidv4:()=>m6,_uuidv6:()=>g6,_uuidv7:()=>h6,_void:()=>uee,_xid:()=>I6,_xor:()=>kRt,clone:()=>$u,config:()=>Ai,createStandardJSONSchemaMethod:()=>vR,createToJSONSchemaMethod:()=>See,decode:()=>nvt,decodeAsync:()=>ovt,describe:()=>hee,encode:()=>tvt,encodeAsync:()=>rvt,extractDefs:()=>gE,finalize:()=>hE,flattenError:()=>RO,formatError:()=>xO,globalConfig:()=>Dy,globalRegistry:()=>xs,initializeContext:()=>mE,isValidBase64:()=>QW,isValidBase64URL:()=>pke,isValidJWT:()=>fke,locales:()=>PO,meta:()=>_ee,parse:()=>U3,parseAsync:()=>L3,prettifyError:()=>hZ,process:()=>Dr,regexes:()=>Ll,registry:()=>p6,safeDecode:()=>avt,safeDecodeAsync:()=>uvt,safeEncode:()=>ivt,safeEncodeAsync:()=>svt,safeParse:()=>EZ,safeParseAsync:()=>SZ,toDotPath:()=>$2e,toJSONSchema:()=>G6,treeifyError:()=>gZ,util:()=>Pe,version:()=>gW});var Fl=O(()=>{A();By();yZ();_Z();xX();W3();hW();Et();K3();OX();UO();mW();fUe();FO();GO();AUe();gUe()});var z6={};Ga(z6,{endsWith:()=>_R,gt:()=>UA,gte:()=>qu,includes:()=>gR,length:()=>Py,lowercase:()=>AR,lt:()=>PA,lte:()=>Ql,maxLength:()=>ky,maxSize:()=>AE,mime:()=>ER,minLength:()=>Og,minSize:()=>LA,multipleOf:()=>fE,negative:()=>M6,nonnegative:()=>P6,nonpositive:()=>k6,normalize:()=>SR,overwrite:()=>uf,positive:()=>w6,property:()=>U6,regex:()=>fR,size:()=>My,slugify:()=>CR,startsWith:()=>hR,toLowerCase:()=>TR,toUpperCase:()=>IR,trim:()=>yR,uppercase:()=>mR});var H6=O(()=>{A();Fl()});var RR={};Ga(RR,{ZodISODate:()=>V6,ZodISODateTime:()=>$6,ZodISODuration:()=>Y6,ZodISOTime:()=>q6,date:()=>ite,datetime:()=>ote,duration:()=>ste,time:()=>ate});function ote(e){return QX($6,e)}function ite(e){return FX(V6,e)}function ate(e){return GX(q6,e)}function ste(e){return jX(Y6,e)}var $6,V6,q6,Y6,jO=O(()=>{A();Fl();HO();$6=ne("ZodISODateTime",(e,t)=>{BW.init(e,t),Gr.init(e,t)});V6=ne("ZodISODate",(e,t)=>{NW.init(e,t),Gr.init(e,t)});q6=ne("ZodISOTime",(e,t)=>{OW.init(e,t),Gr.init(e,t)});Y6=ne("ZodISODuration",(e,t)=>{wW.init(e,t),Gr.init(e,t)})});var hUe,ixt,Lc,ute=O(()=>{A();Fl();Fl();Et();hUe=(e,t)=>{vO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>xO(e,n)},flatten:{value:n=>RO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,oR,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,oR,2)}},isEmpty:{get(){return e.issues.length===0}}})},ixt=ne("ZodError",hUe),Lc=ne("ZodError",hUe,{Parent:Error})});var cte,lte,dte,pte,fte,Ate,mte,gte,hte,_te,Ete,Ste,yte=O(()=>{A();Fl();ute();cte=sR(Lc),lte=uR(Lc),dte=cR(Lc),pte=lR(Lc),fte=Q3(Lc),Ate=F3(Lc),mte=G3(Lc),gte=j3(Lc),hte=z3(Lc),_te=H3(Lc),Ete=$3(Lc),Ste=V3(Lc)});var zO={};Ga(zO,{ZodAny:()=>Dte,ZodArray:()=>wte,ZodBase64:()=>lG,ZodBase64URL:()=>dG,ZodBigInt:()=>MR,ZodBigIntFormat:()=>AG,ZodBoolean:()=>wR,ZodCIDRv4:()=>uG,ZodCIDRv6:()=>cG,ZodCUID:()=>tG,ZodCUID2:()=>nG,ZodCatch:()=>tne,ZodCodec:()=>nw,ZodCustom:()=>rw,ZodCustomStringFormat:()=>NR,ZodDate:()=>ZO,ZodDefault:()=>Kte,ZodDiscriminatedUnion:()=>kte,ZodE164:()=>pG,ZodEmail:()=>W6,ZodEmoji:()=>X6,ZodEnum:()=>DR,ZodExactOptional:()=>Vte,ZodFile:()=>Hte,ZodFunction:()=>dne,ZodGUID:()=>VO,ZodIPv4:()=>aG,ZodIPv6:()=>sG,ZodIntersection:()=>Pte,ZodJWT:()=>fG,ZodKSUID:()=>iG,ZodLazy:()=>une,ZodLiteral:()=>zte,ZodMAC:()=>Tte,ZodMap:()=>Gte,ZodNaN:()=>rne,ZodNanoID:()=>eG,ZodNever:()=>Nte,ZodNonOptional:()=>SG,ZodNull:()=>Rte,ZodNullable:()=>Yte,ZodNumber:()=>OR,ZodNumberFormat:()=>Ly,ZodObject:()=>XO,ZodOptional:()=>EG,ZodPipe:()=>tw,ZodPrefault:()=>Zte,ZodPreprocess:()=>one,ZodPromise:()=>lne,ZodReadonly:()=>ine,ZodRecord:()=>xR,ZodSet:()=>jte,ZodString:()=>BR,ZodStringFormat:()=>Gr,ZodSuccess:()=>ene,ZodSymbol:()=>bte,ZodTemplateLiteral:()=>sne,ZodTransform:()=>$te,ZodTuple:()=>Lte,ZodType:()=>Rn,ZodULID:()=>rG,ZodURL:()=>JO,ZodUUID:()=>QA,ZodUndefined:()=>vte,ZodUnion:()=>ew,ZodUnknown:()=>Bte,ZodVoid:()=>Ote,ZodXID:()=>oG,ZodXor:()=>Mte,_ZodString:()=>Z6,_default:()=>Jte,_function:()=>bLe,any:()=>nLe,array:()=>WO,base64:()=>QUe,base64url:()=>FUe,bigint:()=>ZUe,boolean:()=>Cte,catch:()=>nne,check:()=>vLe,cidrv4:()=>UUe,cidrv6:()=>LUe,codec:()=>yLe,cuid:()=>DUe,cuid2:()=>BUe,custom:()=>RLe,date:()=>oLe,describe:()=>xLe,discriminatedUnion:()=>lLe,e164:()=>GUe,email:()=>EUe,emoji:()=>RUe,enum:()=>hG,exactOptional:()=>qte,file:()=>hLe,float32:()=>qUe,float64:()=>YUe,function:()=>bLe,guid:()=>SUe,hash:()=>VUe,hex:()=>$Ue,hostname:()=>HUe,httpUrl:()=>vUe,instanceof:()=>BLe,int:()=>K6,int32:()=>KUe,int64:()=>WUe,intersection:()=>Ute,invertCodec:()=>TLe,ipv4:()=>MUe,ipv6:()=>PUe,json:()=>OLe,jwt:()=>jUe,keyof:()=>iLe,ksuid:()=>wUe,lazy:()=>cne,literal:()=>gLe,looseObject:()=>uLe,looseRecord:()=>pLe,mac:()=>kUe,map:()=>fLe,meta:()=>DLe,nan:()=>SLe,nanoid:()=>xUe,nativeEnum:()=>mLe,never:()=>mG,nonoptional:()=>Xte,null:()=>xte,nullable:()=>YO,nullish:()=>_Le,number:()=>Ite,object:()=>aLe,optional:()=>qO,partialRecord:()=>dLe,pipe:()=>J6,prefault:()=>Wte,preprocess:()=>wLe,promise:()=>CLe,readonly:()=>ane,record:()=>Fte,refine:()=>pne,set:()=>ALe,strictObject:()=>sLe,string:()=>$O,stringFormat:()=>zUe,stringbool:()=>NLe,success:()=>ELe,superRefine:()=>fne,symbol:()=>eLe,templateLiteral:()=>ILe,transform:()=>_G,tuple:()=>Qte,uint32:()=>JUe,uint64:()=>XUe,ulid:()=>NUe,undefined:()=>tLe,union:()=>gG,unknown:()=>Uy,url:()=>bUe,uuid:()=>yUe,uuidv4:()=>TUe,uuidv6:()=>IUe,uuidv7:()=>CUe,void:()=>rLe,xid:()=>OUe,xor:()=>cLe});function KO(e,t,n){let r=Object.getPrototypeOf(e),o=_Ue.get(r);if(o||(o=new Set,_Ue.set(r,o)),!o.has(t)){o.add(t);for(let i in n){let a=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){let c=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}function $O(e){return kX(BR,e)}function EUe(e){return f6(W6,e)}function SUe(e){return LO(VO,e)}function yUe(e){return A6(QA,e)}function TUe(e){return m6(QA,e)}function IUe(e){return g6(QA,e)}function CUe(e){return h6(QA,e)}function bUe(e){return QO(JO,e)}function vUe(e){return QO(JO,{protocol:Ll.httpProtocol,hostname:Ll.domain,...Pe.normalizeParams(e)})}function RUe(e){return _6(X6,e)}function xUe(e){return E6(eG,e)}function DUe(e){return S6(tG,e)}function BUe(e){return y6(nG,e)}function NUe(e){return T6(rG,e)}function OUe(e){return I6(oG,e)}function wUe(e){return C6(iG,e)}function MUe(e){return b6(aG,e)}function kUe(e){return UX(Tte,e)}function PUe(e){return v6(sG,e)}function UUe(e){return R6(uG,e)}function LUe(e){return x6(cG,e)}function QUe(e){return D6(lG,e)}function FUe(e){return B6(dG,e)}function GUe(e){return N6(pG,e)}function jUe(e){return O6(fG,e)}function zUe(e,t,n={}){return bR(NR,e,t,n)}function HUe(e){return bR(NR,"hostname",Ll.hostname,e)}function $Ue(e){return bR(NR,"hex",Ll.hex,e)}function VUe(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=Ll[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return bR(NR,r,o,t)}function Ite(e){return zX(OR,e)}function K6(e){return $X(Ly,e)}function qUe(e){return VX(Ly,e)}function YUe(e){return qX(Ly,e)}function KUe(e){return YX(Ly,e)}function JUe(e){return KX(Ly,e)}function Cte(e){return JX(wR,e)}function ZUe(e){return WX(MR,e)}function WUe(e){return eee(AG,e)}function XUe(e){return tee(AG,e)}function eLe(e){return nee(bte,e)}function tLe(e){return ree(vte,e)}function xte(e){return oee(Rte,e)}function nLe(){return iee(Dte)}function Uy(){return aee(Bte)}function mG(e){return see(Nte,e)}function rLe(e){return uee(Ote,e)}function oLe(e){return cee(ZO,e)}function WO(e,t){return pee(wte,e,t)}function iLe(e){let t=e._zod.def.shape;return hG(Object.keys(t))}function aLe(e,t){let n={type:"object",shape:e??{},...Pe.normalizeParams(t)};return new XO(n)}function sLe(e,t){return new XO({type:"object",shape:e,catchall:mG(),...Pe.normalizeParams(t)})}function uLe(e,t){return new XO({type:"object",shape:e,catchall:Uy(),...Pe.normalizeParams(t)})}function gG(e,t){return new ew({type:"union",options:e,...Pe.normalizeParams(t)})}function cLe(e,t){return new Mte({type:"union",options:e,inclusive:!1,...Pe.normalizeParams(t)})}function lLe(e,t,n){return new kte({type:"union",options:t,discriminator:e,...Pe.normalizeParams(n)})}function Ute(e,t){return new Pte({type:"intersection",left:e,right:t})}function Qte(e,t,n){let r=t instanceof nn,o=r?n:t,i=r?t:null;return new Lte({type:"tuple",items:e,rest:i,...Pe.normalizeParams(o)})}function Fte(e,t,n){return!t||!t._zod?new xR({type:"record",keyType:$O(),valueType:e,...Pe.normalizeParams(t)}):new xR({type:"record",keyType:e,valueType:t,...Pe.normalizeParams(n)})}function dLe(e,t,n){let r=$u(e);return r._zod.values=void 0,new xR({type:"record",keyType:r,valueType:t,...Pe.normalizeParams(n)})}function pLe(e,t,n){return new xR({type:"record",keyType:e,valueType:t,mode:"loose",...Pe.normalizeParams(n)})}function fLe(e,t,n){return new Gte({type:"map",keyType:e,valueType:t,...Pe.normalizeParams(n)})}function ALe(e,t){return new jte({type:"set",valueType:e,...Pe.normalizeParams(t)})}function hG(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new DR({type:"enum",entries:n,...Pe.normalizeParams(t)})}function mLe(e,t){return new DR({type:"enum",entries:e,...Pe.normalizeParams(t)})}function gLe(e,t){return new zte({type:"literal",values:Array.isArray(e)?e:[e],...Pe.normalizeParams(t)})}function hLe(e){return fee(Hte,e)}function _G(e){return new $te({type:"transform",transform:e})}function qO(e){return new EG({type:"optional",innerType:e})}function qte(e){return new Vte({type:"optional",innerType:e})}function YO(e){return new Yte({type:"nullable",innerType:e})}function _Le(e){return qO(YO(e))}function Jte(e,t){return new Kte({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Pe.shallowClone(t)}})}function Wte(e,t){return new Zte({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Pe.shallowClone(t)}})}function Xte(e,t){return new SG({type:"nonoptional",innerType:e,...Pe.normalizeParams(t)})}function ELe(e){return new ene({type:"success",innerType:e})}function nne(e,t){return new tne({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function SLe(e){return dee(rne,e)}function J6(e,t){return new tw({type:"pipe",in:e,out:t})}function yLe(e,t,n){return new nw({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function TLe(e){let t=e._zod.def;return new nw({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function ane(e){return new ine({type:"readonly",innerType:e})}function ILe(e,t){return new sne({type:"template_literal",parts:e,...Pe.normalizeParams(t)})}function cne(e){return new une({type:"lazy",getter:e})}function CLe(e){return new lne({type:"promise",innerType:e})}function bLe(e){return new dne({type:"function",input:Array.isArray(e?.input)?Qte(e?.input):e?.input??WO(Uy()),output:e?.output??Uy()})}function vLe(e){let t=new qr({check:"custom"});return t._zod.check=e,t}function RLe(e,t){return Aee(rw,e??(()=>!0),t)}function pne(e,t={}){return mee(rw,e,t)}function fne(e,t){return gee(e,t)}function BLe(e,t={}){let n=new rw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Pe.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function OLe(e){let t=cne(()=>gG([$O(e),Ite(),Cte(),xte(),WO(t),Fte($O(),t)]));return t}function wLe(e,t){return new one({type:"pipe",in:_G(e),out:t})}var _Ue,Rn,Z6,BR,Gr,W6,VO,QA,JO,X6,eG,tG,nG,rG,oG,iG,aG,Tte,sG,uG,cG,lG,dG,pG,fG,NR,OR,Ly,wR,MR,AG,bte,vte,Rte,Dte,Bte,Nte,Ote,ZO,wte,XO,ew,Mte,kte,Pte,Lte,xR,Gte,jte,DR,zte,Hte,$te,EG,Vte,Yte,Kte,Zte,SG,ene,tne,rne,tw,nw,one,ine,sne,une,lne,dne,rw,xLe,DLe,NLe,HO=O(()=>{A();Fl();Fl();GO();FO();H6();jO();yte();_Ue=new WeakMap;Rn=ne("ZodType",(e,t)=>(nn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:vR(e,"input"),output:vR(e,"output")}}),e.toJSONSchema=See(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>cte(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>dte(e,n,r),e.parseAsync=async(n,r)=>lte(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>pte(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>fte(e,n,r),e.decode=(n,r)=>Ate(e,n,r),e.encodeAsync=async(n,r)=>mte(e,n,r),e.decodeAsync=async(n,r)=>gte(e,n,r),e.safeEncode=(n,r)=>hte(e,n,r),e.safeDecode=(n,r)=>_te(e,n,r),e.safeEncodeAsync=async(n,r)=>Ete(e,n,r),e.safeDecodeAsync=async(n,r)=>Ste(e,n,r),KO(e,"ZodType",{check(...n){let r=this.def;return this.clone(Pe.mergeDefs(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return $u(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(pne(n,r))},superRefine(n,r){return this.check(fne(n,r))},overwrite(n){return this.check(uf(n))},optional(){return qO(this)},exactOptional(){return qte(this)},nullable(){return YO(this)},nullish(){return qO(YO(this))},nonoptional(n){return Xte(this,n)},array(){return WO(this)},or(n){return gG([this,n])},and(n){return Ute(this,n)},transform(n){return J6(this,_G(n))},default(n){return Jte(this,n)},prefault(n){return Wte(this,n)},catch(n){return nne(this,n)},pipe(n){return J6(this,n)},readonly(){return ane(this)},describe(n){let r=this.clone();return xs.add(r,{description:n}),r},meta(...n){if(n.length===0)return xs.get(this);let r=this.clone();return xs.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return xs.get(e)?.description},configurable:!0}),e)),Z6=ne("_ZodString",(e,t)=>{wy.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>yee(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,KO(e,"_ZodString",{regex(...r){return this.check(fR(...r))},includes(...r){return this.check(gR(...r))},startsWith(...r){return this.check(hR(...r))},endsWith(...r){return this.check(_R(...r))},min(...r){return this.check(Og(...r))},max(...r){return this.check(ky(...r))},length(...r){return this.check(Py(...r))},nonempty(...r){return this.check(Og(1,...r))},lowercase(r){return this.check(AR(r))},uppercase(r){return this.check(mR(r))},trim(){return this.check(yR())},normalize(...r){return this.check(SR(...r))},toLowerCase(){return this.check(TR())},toUpperCase(){return this.check(IR())},slugify(){return this.check(CR())}})}),BR=ne("ZodString",(e,t)=>{wy.init(e,t),Z6.init(e,t),e.email=n=>e.check(f6(W6,n)),e.url=n=>e.check(QO(JO,n)),e.jwt=n=>e.check(O6(fG,n)),e.emoji=n=>e.check(_6(X6,n)),e.guid=n=>e.check(LO(VO,n)),e.uuid=n=>e.check(A6(QA,n)),e.uuidv4=n=>e.check(m6(QA,n)),e.uuidv6=n=>e.check(g6(QA,n)),e.uuidv7=n=>e.check(h6(QA,n)),e.nanoid=n=>e.check(E6(eG,n)),e.guid=n=>e.check(LO(VO,n)),e.cuid=n=>e.check(S6(tG,n)),e.cuid2=n=>e.check(y6(nG,n)),e.ulid=n=>e.check(T6(rG,n)),e.base64=n=>e.check(D6(lG,n)),e.base64url=n=>e.check(B6(dG,n)),e.xid=n=>e.check(I6(oG,n)),e.ksuid=n=>e.check(C6(iG,n)),e.ipv4=n=>e.check(b6(aG,n)),e.ipv6=n=>e.check(v6(sG,n)),e.cidrv4=n=>e.check(R6(uG,n)),e.cidrv6=n=>e.check(x6(cG,n)),e.e164=n=>e.check(N6(pG,n)),e.datetime=n=>e.check(ote(n)),e.date=n=>e.check(ite(n)),e.time=n=>e.check(ate(n)),e.duration=n=>e.check(ste(n))});Gr=ne("ZodStringFormat",(e,t)=>{Fr.init(e,t),Z6.init(e,t)}),W6=ne("ZodEmail",(e,t)=>{yW.init(e,t),Gr.init(e,t)});VO=ne("ZodGUID",(e,t)=>{EW.init(e,t),Gr.init(e,t)});QA=ne("ZodUUID",(e,t)=>{SW.init(e,t),Gr.init(e,t)});JO=ne("ZodURL",(e,t)=>{TW.init(e,t),Gr.init(e,t)});X6=ne("ZodEmoji",(e,t)=>{IW.init(e,t),Gr.init(e,t)});eG=ne("ZodNanoID",(e,t)=>{CW.init(e,t),Gr.init(e,t)});tG=ne("ZodCUID",(e,t)=>{bW.init(e,t),Gr.init(e,t)});nG=ne("ZodCUID2",(e,t)=>{vW.init(e,t),Gr.init(e,t)});rG=ne("ZodULID",(e,t)=>{RW.init(e,t),Gr.init(e,t)});oG=ne("ZodXID",(e,t)=>{xW.init(e,t),Gr.init(e,t)});iG=ne("ZodKSUID",(e,t)=>{DW.init(e,t),Gr.init(e,t)});aG=ne("ZodIPv4",(e,t)=>{MW.init(e,t),Gr.init(e,t)});Tte=ne("ZodMAC",(e,t)=>{PW.init(e,t),Gr.init(e,t)});sG=ne("ZodIPv6",(e,t)=>{kW.init(e,t),Gr.init(e,t)});uG=ne("ZodCIDRv4",(e,t)=>{UW.init(e,t),Gr.init(e,t)});cG=ne("ZodCIDRv6",(e,t)=>{LW.init(e,t),Gr.init(e,t)});lG=ne("ZodBase64",(e,t)=>{FW.init(e,t),Gr.init(e,t)});dG=ne("ZodBase64URL",(e,t)=>{GW.init(e,t),Gr.init(e,t)});pG=ne("ZodE164",(e,t)=>{jW.init(e,t),Gr.init(e,t)});fG=ne("ZodJWT",(e,t)=>{zW.init(e,t),Gr.init(e,t)});NR=ne("ZodCustomStringFormat",(e,t)=>{HW.init(e,t),Gr.init(e,t)});OR=ne("ZodNumber",(e,t)=>{r6.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Tee(e,r,o,i),KO(e,"ZodNumber",{gt(r,o){return this.check(UA(r,o))},gte(r,o){return this.check(qu(r,o))},min(r,o){return this.check(qu(r,o))},lt(r,o){return this.check(PA(r,o))},lte(r,o){return this.check(Ql(r,o))},max(r,o){return this.check(Ql(r,o))},int(r){return this.check(K6(r))},safe(r){return this.check(K6(r))},positive(r){return this.check(UA(0,r))},nonnegative(r){return this.check(qu(0,r))},negative(r){return this.check(PA(0,r))},nonpositive(r){return this.check(Ql(0,r))},multipleOf(r,o){return this.check(fE(r,o))},step(r,o){return this.check(fE(r,o))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});Ly=ne("ZodNumberFormat",(e,t)=>{$W.init(e,t),OR.init(e,t)});wR=ne("ZodBoolean",(e,t)=>{OO.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Iee(e,n,r,o)});MR=ne("ZodBigInt",(e,t)=>{o6.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Cee(e,r,o,i),e.gte=(r,o)=>e.check(qu(r,o)),e.min=(r,o)=>e.check(qu(r,o)),e.gt=(r,o)=>e.check(UA(r,o)),e.gte=(r,o)=>e.check(qu(r,o)),e.min=(r,o)=>e.check(qu(r,o)),e.lt=(r,o)=>e.check(PA(r,o)),e.lte=(r,o)=>e.check(Ql(r,o)),e.max=(r,o)=>e.check(Ql(r,o)),e.positive=r=>e.check(UA(BigInt(0),r)),e.negative=r=>e.check(PA(BigInt(0),r)),e.nonpositive=r=>e.check(Ql(BigInt(0),r)),e.nonnegative=r=>e.check(qu(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(fE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});AG=ne("ZodBigIntFormat",(e,t)=>{VW.init(e,t),MR.init(e,t)});bte=ne("ZodSymbol",(e,t)=>{qW.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bee(e,n,r,o)});vte=ne("ZodUndefined",(e,t)=>{YW.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ree(e,n,r,o)});Rte=ne("ZodNull",(e,t)=>{KW.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vee(e,n,r,o)});Dte=ne("ZodAny",(e,t)=>{JW.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bee(e,n,r,o)});Bte=ne("ZodUnknown",(e,t)=>{ZW.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Nee(e,n,r,o)});Nte=ne("ZodNever",(e,t)=>{WW.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Dee(e,n,r,o)});Ote=ne("ZodVoid",(e,t)=>{XW.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xee(e,n,r,o)});ZO=ne("ZodDate",(e,t)=>{eX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Oee(e,r,o,i),e.min=(r,o)=>e.check(qu(r,o)),e.max=(r,o)=>e.check(Ql(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});wte=ne("ZodArray",(e,t)=>{tX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hee(e,n,r,o),e.element=t.element,KO(e,"ZodArray",{min(n,r){return this.check(Og(n,r))},nonempty(n){return this.check(Og(1,n))},max(n,r){return this.check(ky(n,r))},length(n,r){return this.check(Py(n,r))},unwrap(){return this.element}})});XO=ne("ZodObject",(e,t)=>{nX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$ee(e,n,r,o),Pe.defineLazy(e,"shape",()=>t.shape),KO(e,"ZodObject",{keyof(){return hG(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Uy()})},loose(){return this.clone({...this._zod.def,catchall:Uy()})},strict(){return this.clone({...this._zod.def,catchall:mG()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Pe.extend(this,n)},safeExtend(n){return Pe.safeExtend(this,n)},merge(n){return Pe.merge(this,n)},pick(n){return Pe.pick(this,n)},omit(n){return Pe.omit(this,n)},partial(...n){return Pe.partial(EG,this,n[0])},required(...n){return Pe.required(SG,this,n[0])}})});ew=ne("ZodUnion",(e,t)=>{wO.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Q6(e,n,r,o),e.options=t.options});Mte=ne("ZodXor",(e,t)=>{ew.init(e,t),rX.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Q6(e,n,r,o),e.options=t.options});kte=ne("ZodDiscriminatedUnion",(e,t)=>{ew.init(e,t),oX.init(e,t)});Pte=ne("ZodIntersection",(e,t)=>{iX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vee(e,n,r,o)});Lte=ne("ZodTuple",(e,t)=>{i6.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qee(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});xR=ne("ZodRecord",(e,t)=>{aX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yee(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});Gte=ne("ZodMap",(e,t)=>{sX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jee(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(LA(...n)),e.nonempty=n=>e.check(LA(1,n)),e.max=(...n)=>e.check(AE(...n)),e.size=(...n)=>e.check(My(...n))});jte=ne("ZodSet",(e,t)=>{uX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zee(e,n,r,o),e.min=(...n)=>e.check(LA(...n)),e.nonempty=n=>e.check(LA(1,n)),e.max=(...n)=>e.check(AE(...n)),e.size=(...n)=>e.check(My(...n))});DR=ne("ZodEnum",(e,t)=>{cX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>wee(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new DR({...t,checks:[],...Pe.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new DR({...t,checks:[],...Pe.normalizeParams(o),entries:i})}});zte=ne("ZodLiteral",(e,t)=>{lX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mee(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});Hte=ne("ZodFile",(e,t)=>{dX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Uee(e,n,r,o),e.min=(n,r)=>e.check(LA(n,r)),e.max=(n,r)=>e.check(AE(n,r)),e.mime=(n,r)=>e.check(ER(Array.isArray(n)?n:[n],r))});$te=ne("ZodTransform",(e,t)=>{pX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gee(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new uE(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Pe.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(Pe.issue(a))}};let o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});EG=ne("ZodOptional",(e,t)=>{a6.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F6(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Vte=ne("ZodExactOptional",(e,t)=>{fX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F6(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Yte=ne("ZodNullable",(e,t)=>{AX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kee(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Kte=ne("ZodDefault",(e,t)=>{mX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zee(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Zte=ne("ZodPrefault",(e,t)=>{gX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wee(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});SG=ne("ZodNonOptional",(e,t)=>{hX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jee(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ene=ne("ZodSuccess",(e,t)=>{_X.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lee(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});tne=ne("ZodCatch",(e,t)=>{EX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xee(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});rne=ne("ZodNaN",(e,t)=>{SX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kee(e,n,r,o)});tw=ne("ZodPipe",(e,t)=>{s6.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ete(e,n,r,o),e.in=t.in,e.out=t.out});nw=ne("ZodCodec",(e,t)=>{tw.init(e,t),MO.init(e,t)});one=ne("ZodPreprocess",(e,t)=>{tw.init(e,t),yX.init(e,t)}),ine=ne("ZodReadonly",(e,t)=>{TX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});sne=ne("ZodTemplateLiteral",(e,t)=>{IX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Pee(e,n,r,o)});une=ne("ZodLazy",(e,t)=>{vX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rte(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});lne=ne("ZodPromise",(e,t)=>{bX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});dne=ne("ZodFunction",(e,t)=>{CX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fee(e,n,r,o)});rw=ne("ZodCustom",(e,t)=>{RX.init(e,t),Rn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qee(e,n,r,o)});xLe=hee,DLe=_ee;NLe=(...e)=>Eee({Codec:nw,Boolean:wR,String:BR},...e)});function uxt(e){Ai({customError:e})}function cxt(){return Ai().customError}var sxt,Ane,MLe=O(()=>{A();Fl();sxt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};Ane||(Ane={})});function dxt(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function pxt(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function kLe(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Ke.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Ke.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=pxt(o,t),a=su(i,t);return t.refs.set(o,a),t.processing.delete(o),a}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Ke.null();if(o.length===0)return Ke.never();if(o.length===1)return Ke.literal(o[0]);if(o.every(a=>typeof a=="string"))return Ke.enum(o);let i=o.map(a=>Ke.literal(a));return i.length<2?i[0]:Ke.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Ke.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let a={...e,type:i};return kLe(a,t)});return o.length===0?Ke.never():o.length===1?o[0]:Ke.union(o)}if(!n)return Ke.any();let r;switch(n){case"string":{let o=Ke.string();if(e.format){let i=e.format;i==="email"?o=o.check(Ke.email()):i==="uri"||i==="uri-reference"?o=o.check(Ke.url()):i==="uuid"||i==="guid"?o=o.check(Ke.uuid()):i==="date-time"?o=o.check(Ke.iso.datetime()):i==="date"?o=o.check(Ke.iso.date()):i==="time"?o=o.check(Ke.iso.time()):i==="duration"?o=o.check(Ke.iso.duration()):i==="ipv4"?o=o.check(Ke.ipv4()):i==="ipv6"?o=o.check(Ke.ipv6()):i==="mac"?o=o.check(Ke.mac()):i==="cidr"?o=o.check(Ke.cidrv4()):i==="cidr-v6"?o=o.check(Ke.cidrv6()):i==="base64"?o=o.check(Ke.base64()):i==="base64url"?o=o.check(Ke.base64url()):i==="e164"?o=o.check(Ke.e164()):i==="jwt"?o=o.check(Ke.jwt()):i==="emoji"?o=o.check(Ke.emoji()):i==="nanoid"?o=o.check(Ke.nanoid()):i==="cuid"?o=o.check(Ke.cuid()):i==="cuid2"?o=o.check(Ke.cuid2()):i==="ulid"?o=o.check(Ke.ulid()):i==="xid"?o=o.check(Ke.xid()):i==="ksuid"&&(o=o.check(Ke.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),r=o;break}case"number":case"integer":{let o=n==="integer"?Ke.number().int():Ke.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),r=o;break}case"boolean":{r=Ke.boolean();break}case"null":{r=Ke.null();break}case"object":{let o={},i=e.properties||{},a=new Set(e.required||[]);for(let[d,m]of Object.entries(i)){let h=su(m,t);o[d]=a.has(d)?h:h.optional()}if(e.propertyNames){let d=su(e.propertyNames,t),m=e.additionalProperties&&typeof e.additionalProperties=="object"?su(e.additionalProperties,t):Ke.any();if(Object.keys(o).length===0){r=Ke.record(d,m);break}let h=Ke.object(o).passthrough(),S=Ke.looseRecord(d,m);r=Ke.intersection(h,S);break}if(e.patternProperties){let d=e.patternProperties,m=Object.keys(d),h=[];for(let y of m){let C=su(d[y],t),v=Ke.string().regex(new RegExp(y));h.push(Ke.looseRecord(v,C))}let S=[];if(Object.keys(o).length>0&&S.push(Ke.object(o).passthrough()),S.push(...h),S.length===0)r=Ke.object({}).passthrough();else if(S.length===1)r=S[0];else{let y=Ke.intersection(S[0],S[1]);for(let C=2;C<S.length;C++)y=Ke.intersection(y,S[C]);r=y}break}let c=Ke.object(o);e.additionalProperties===!1?r=c.strict():typeof e.additionalProperties=="object"?r=c.catchall(su(e.additionalProperties,t)):r=c.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let a=o.map(d=>su(d,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?su(i,t):void 0;c?r=Ke.tuple(a).rest(c):r=Ke.tuple(a),typeof e.minItems=="number"&&(r=r.check(Ke.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Ke.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(d=>su(d,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?su(e.additionalItems,t):void 0;c?r=Ke.tuple(a).rest(c):r=Ke.tuple(a),typeof e.minItems=="number"&&(r=r.check(Ke.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Ke.maxLength(e.maxItems)))}else if(i!==void 0){let a=su(i,t),c=Ke.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),r=c}else r=Ke.array(Ke.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function su(e,t){if(typeof e=="boolean")return e?Ke.any():Ke.never();let n=kLe(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(m=>su(m,t)),d=Ke.union(c);n=r?Ke.intersection(n,d):d}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(m=>su(m,t)),d=Ke.xor(c);n=r?Ke.intersection(n,d):d}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Ke.any();else{let c=r?n:su(e.allOf[0],t),d=r?0:1;for(let m=d;m<e.allOf.length;m++)c=Ke.intersection(c,su(e.allOf[m],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Ke.nullable(n)),e.readOnly===!0&&(n=Ke.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(o[c]=e[c]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let c of a)c in e&&(o[c]=e[c]);for(let c of Object.keys(e))lxt.has(c)||(o[c]=e[c]);return Object.keys(o).length>0&&t.registry.add(n,o),e.description&&(n=n.describe(e.description)),n}function PLe(e,t){if(typeof e=="boolean")return e?Ke.any():Ke.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=dxt(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??xs};return su(n,i)}var Ke,lxt,ULe=O(()=>{A();UO();H6();jO();HO();Ke={...zO,...z6,iso:RR},lxt=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var mne={};Ga(mne,{bigint:()=>gxt,boolean:()=>mxt,date:()=>hxt,number:()=>Axt,string:()=>fxt});function fxt(e){return PX(BR,e)}function Axt(e){return HX(OR,e)}function mxt(e){return ZX(wR,e)}function gxt(e){return XX(MR,e)}function hxt(e){return lee(ZO,e)}var LLe=O(()=>{A();Fl();HO()});var g={};Ga(g,{$brand:()=>oZ,$input:()=>MX,$output:()=>wX,NEVER:()=>rZ,TimePrecision:()=>LX,ZodAny:()=>Dte,ZodArray:()=>wte,ZodBase64:()=>lG,ZodBase64URL:()=>dG,ZodBigInt:()=>MR,ZodBigIntFormat:()=>AG,ZodBoolean:()=>wR,ZodCIDRv4:()=>uG,ZodCIDRv6:()=>cG,ZodCUID:()=>tG,ZodCUID2:()=>nG,ZodCatch:()=>tne,ZodCodec:()=>nw,ZodCustom:()=>rw,ZodCustomStringFormat:()=>NR,ZodDate:()=>ZO,ZodDefault:()=>Kte,ZodDiscriminatedUnion:()=>kte,ZodE164:()=>pG,ZodEmail:()=>W6,ZodEmoji:()=>X6,ZodEnum:()=>DR,ZodError:()=>ixt,ZodExactOptional:()=>Vte,ZodFile:()=>Hte,ZodFirstPartyTypeKind:()=>Ane,ZodFunction:()=>dne,ZodGUID:()=>VO,ZodIPv4:()=>aG,ZodIPv6:()=>sG,ZodISODate:()=>V6,ZodISODateTime:()=>$6,ZodISODuration:()=>Y6,ZodISOTime:()=>q6,ZodIntersection:()=>Pte,ZodIssueCode:()=>sxt,ZodJWT:()=>fG,ZodKSUID:()=>iG,ZodLazy:()=>une,ZodLiteral:()=>zte,ZodMAC:()=>Tte,ZodMap:()=>Gte,ZodNaN:()=>rne,ZodNanoID:()=>eG,ZodNever:()=>Nte,ZodNonOptional:()=>SG,ZodNull:()=>Rte,ZodNullable:()=>Yte,ZodNumber:()=>OR,ZodNumberFormat:()=>Ly,ZodObject:()=>XO,ZodOptional:()=>EG,ZodPipe:()=>tw,ZodPrefault:()=>Zte,ZodPreprocess:()=>one,ZodPromise:()=>lne,ZodReadonly:()=>ine,ZodRealError:()=>Lc,ZodRecord:()=>xR,ZodSet:()=>jte,ZodString:()=>BR,ZodStringFormat:()=>Gr,ZodSuccess:()=>ene,ZodSymbol:()=>bte,ZodTemplateLiteral:()=>sne,ZodTransform:()=>$te,ZodTuple:()=>Lte,ZodType:()=>Rn,ZodULID:()=>rG,ZodURL:()=>JO,ZodUUID:()=>QA,ZodUndefined:()=>vte,ZodUnion:()=>ew,ZodUnknown:()=>Bte,ZodVoid:()=>Ote,ZodXID:()=>oG,ZodXor:()=>Mte,_ZodString:()=>Z6,_default:()=>Jte,_function:()=>bLe,any:()=>nLe,array:()=>WO,base64:()=>QUe,base64url:()=>FUe,bigint:()=>ZUe,boolean:()=>Cte,catch:()=>nne,check:()=>vLe,cidrv4:()=>UUe,cidrv6:()=>LUe,clone:()=>$u,codec:()=>yLe,coerce:()=>mne,config:()=>Ai,core:()=>wg,cuid:()=>DUe,cuid2:()=>BUe,custom:()=>RLe,date:()=>oLe,decode:()=>Ate,decodeAsync:()=>gte,describe:()=>xLe,discriminatedUnion:()=>lLe,e164:()=>GUe,email:()=>EUe,emoji:()=>RUe,encode:()=>fte,encodeAsync:()=>mte,endsWith:()=>_R,enum:()=>hG,exactOptional:()=>qte,file:()=>hLe,flattenError:()=>RO,float32:()=>qUe,float64:()=>YUe,formatError:()=>xO,fromJSONSchema:()=>PLe,function:()=>bLe,getErrorMap:()=>cxt,globalRegistry:()=>xs,gt:()=>UA,gte:()=>qu,guid:()=>SUe,hash:()=>VUe,hex:()=>$Ue,hostname:()=>HUe,httpUrl:()=>vUe,includes:()=>gR,instanceof:()=>BLe,int:()=>K6,int32:()=>KUe,int64:()=>WUe,intersection:()=>Ute,invertCodec:()=>TLe,ipv4:()=>MUe,ipv6:()=>PUe,iso:()=>RR,json:()=>OLe,jwt:()=>jUe,keyof:()=>iLe,ksuid:()=>wUe,lazy:()=>cne,length:()=>Py,literal:()=>gLe,locales:()=>PO,looseObject:()=>uLe,looseRecord:()=>pLe,lowercase:()=>AR,lt:()=>PA,lte:()=>Ql,mac:()=>kUe,map:()=>fLe,maxLength:()=>ky,maxSize:()=>AE,meta:()=>DLe,mime:()=>ER,minLength:()=>Og,minSize:()=>LA,multipleOf:()=>fE,nan:()=>SLe,nanoid:()=>xUe,nativeEnum:()=>mLe,negative:()=>M6,never:()=>mG,nonnegative:()=>P6,nonoptional:()=>Xte,nonpositive:()=>k6,normalize:()=>SR,null:()=>xte,nullable:()=>YO,nullish:()=>_Le,number:()=>Ite,object:()=>aLe,optional:()=>qO,overwrite:()=>uf,parse:()=>cte,parseAsync:()=>lte,partialRecord:()=>dLe,pipe:()=>J6,positive:()=>w6,prefault:()=>Wte,preprocess:()=>wLe,prettifyError:()=>hZ,promise:()=>CLe,property:()=>U6,readonly:()=>ane,record:()=>Fte,refine:()=>pne,regex:()=>fR,regexes:()=>Ll,registry:()=>p6,safeDecode:()=>_te,safeDecodeAsync:()=>Ste,safeEncode:()=>hte,safeEncodeAsync:()=>Ete,safeParse:()=>dte,safeParseAsync:()=>pte,set:()=>ALe,setErrorMap:()=>uxt,size:()=>My,slugify:()=>CR,startsWith:()=>hR,strictObject:()=>sLe,string:()=>$O,stringFormat:()=>zUe,stringbool:()=>NLe,success:()=>ELe,superRefine:()=>fne,symbol:()=>eLe,templateLiteral:()=>ILe,toJSONSchema:()=>G6,toLowerCase:()=>TR,toUpperCase:()=>IR,transform:()=>_G,treeifyError:()=>gZ,trim:()=>yR,tuple:()=>Qte,uint32:()=>JUe,uint64:()=>XUe,ulid:()=>NUe,undefined:()=>tLe,union:()=>gG,unknown:()=>Uy,uppercase:()=>mR,url:()=>bUe,util:()=>Pe,uuid:()=>yUe,uuidv4:()=>TUe,uuidv6:()=>IUe,uuidv7:()=>CUe,void:()=>rLe,xid:()=>OUe,xor:()=>cLe});var gne=O(()=>{A();Fl();HO();H6();ute();yte();MLe();Fl();DX();Fl();GO();ULe();OX();jO();jO();LLe();Ai(u6())});var cf=O(()=>{A();gne();gne()});var hne,QLe,_xt,FLe,sRn,_ne=O(()=>{"use strict";A();hne=["free","creator","team"],QLe=typeof process<"u"&&process.env?.NODE_ENV!=="production",_xt={stripe:{plans:[{tier:"free",subjectType:"user",name:"Free",description:"Share any thread from Claude Code, Codex, or Cowork. Share with friends or keep private. Share skills with your team instantly.",price:0,priceId:null,features:[{name:"Share threads from Claude Code, Codex, and Cowork"},{name:"Share with friends or keep private"},{name:"Skills tab \u2014 tool usage across every thread"},{name:"Share skills with your team instantly"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:3}},{tier:"creator",subjectType:"user",name:"Creator",description:"For builders who share a lot. Permanent share links that never expire.",price:29,isFeatured:!0,priceId:QLe?"price_1TP9BSKwvRM43sh64waIrvjj":"price_1TPA2gKwvRM43sh6Kp4ZCpJZ",features:[{name:"Everything in Free"},{name:"Shared threads live forever"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:null}},{tier:"team",subjectType:"organization",name:"Team",description:"GitHub for Prompts. Org-wide thread sharing plus the review surface.",price:19,minSeats:2,priceId:QLe?"price_1TP9MpKwvRM43sh6TBIFxVCd":"price_1TPA3CKwvRM43sh6k0bgPTsQ",features:[{name:"Everything in Creator"},{name:"Workspace-wide thread sharing"},{name:"Minimum 2 seats"},{name:"Review feature (beta)"}],entitlements:{workspaceScope:!0,review:!0,sharedThreadTtlDays:null}}]}},FLe=_xt.stripe.plans,sRn=Object.freeze(Object.fromEntries(FLe.map(e=>[e.tier,e])))});var GLe=O(()=>{"use strict";A();_ne();_ne()});var Ext,uu,Ene,Qy,yG,Sxt,TG,jLe,zLe,Sne,yxt,Txt,Ixt,Cxt,bxt,vxt,Rxt,HLe,IG=O(()=>{"use strict";A();kA();cf();Ext=au(),uu=g.object({message:g.string()}),Ene=g.record(g.string(),g.unknown()),Qy=g.string().regex(/^doc_[0-9A-Za-z]{22}$/),yG=g.string().regex(/^proj_[0-9A-Za-z]{22}$/),Sxt=["active","archived"],TG=g.enum(Sxt),jLe=g.object({id:g.string().min(1),display_name:g.string().min(1)}),zLe=g.object({id:yG,name:g.string().min(1)}),Sne=g.object({id:Qy,title:g.string().min(1),status:TG,author:jLe,project:zLe.nullable(),created_at:g.string().datetime(),updated_at:g.string().datetime(),archived_at:g.string().datetime().nullable()}),yxt=g.object({type:g.literal("list"),list_type:g.literal("doc"),objects:g.array(Sne)}),Txt=g.object({project_id:yG.optional(),status:TG.optional()}),Ixt=g.object({title:g.string().trim().min(1).max(300).optional(),prosemirror_json:Ene.optional(),project_id:yG.nullable().optional()}),Cxt=g.object({id:Qy,created_at:g.string().datetime()}),bxt=g.object({title:g.string().trim().min(1).max(300).optional(),prosemirror_json:Ene.optional(),project_id:yG.nullable().optional(),status:TG.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),vxt=g.object({id:Qy,updated_at:g.string().datetime()}),Rxt=g.object({id:Qy,title:g.string().min(1),prosemirror_json:Ene,status:TG,author:jLe,project:zLe.nullable(),created_at:g.string().datetime(),updated_at:g.string().datetime(),archived_at:g.string().datetime().nullable()}),HLe=Ext.router({listDocs:{method:"GET",path:"/docs",headers:g.object({authorization:g.string().min(1).optional()}),query:Txt,responses:{200:yxt,401:uu,403:uu},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:g.object({authorization:g.string().min(1).optional()}),body:Ixt,responses:{201:Cxt,401:uu,403:uu,404:uu,422:uu},summary:"Create a doc. If project_id is provided, the doc is scoped to that project; otherwise it lives at the workspace level."},getDoc:{method:"GET",path:"/docs/:docId",pathParams:g.object({docId:Qy}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:Rxt,401:uu,403:uu,404:uu},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:g.object({docId:Qy}),headers:g.object({authorization:g.string().min(1).optional()}),body:bxt,responses:{200:vxt,401:uu,403:uu,404:uu,422:uu},summary:"Update a doc. If prosemirror_json changes, the server re-syncs lore.mention_references from mention nodes."},deleteDoc:{method:"DELETE",path:"/docs/:docId",pathParams:g.object({docId:Qy}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{204:g.object({}),401:uu,403:uu,404:uu},summary:"Hard-delete a doc and any mention references it owns"}})});var xxt,Di,yne,FA,Dxt,CG,Tne,$Le,Bxt,Nxt,Oxt,wxt,Mxt,kxt,Pxt,Uxt,Lxt,Qxt,Fxt,Gxt,VLe,Ine=O(()=>{"use strict";A();kA();cf();IG();xxt=au(),Di=g.object({message:g.string()}),yne=g.record(g.string(),g.unknown()),FA=g.string().regex(/^proj_[0-9A-Za-z]{22}$/),Dxt=["active","archived"],CG=g.enum(Dxt),Tne=g.object({id:g.string().min(1),display_name:g.string().min(1)}),$Le=g.object({thread_id:g.string().min(1),title:g.string().min(1),added_at:g.string().datetime(),added_by:Tne}),Bxt=g.object({id:FA,name:g.string().min(1),status:CG,author:Tne,thread_count:g.number().int().nonnegative(),doc_count:g.number().int().nonnegative(),created_at:g.string().datetime(),updated_at:g.string().datetime(),archived_at:g.string().datetime().nullable()}),Nxt=g.object({type:g.literal("list"),list_type:g.literal("project"),objects:g.array(Bxt)}),Oxt=g.object({status:CG.optional()}),wxt=g.object({name:g.string().trim().min(1).max(200),prosemirror_json:yne.optional()}),Mxt=g.object({id:FA,created_at:g.string().datetime()}),kxt=g.object({name:g.string().trim().min(1).max(200).optional(),prosemirror_json:yne.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),Pxt=g.object({id:FA,updated_at:g.string().datetime()}),Uxt=g.object({archived:g.boolean()}),Lxt=g.object({id:FA,status:CG,archived_at:g.string().datetime().nullable()}),Qxt=g.object({id:FA,name:g.string().min(1),prosemirror_json:yne,status:CG,author:Tne,created_at:g.string().datetime(),updated_at:g.string().datetime(),archived_at:g.string().datetime().nullable(),threads:g.array($Le),docs:g.array(Sne)}),Fxt=g.object({thread_id:g.string().min(1).max(64)}),Gxt=$Le,VLe=xxt.router({listProjects:{method:"GET",path:"/projects",headers:g.object({authorization:g.string().min(1).optional()}),query:Oxt,responses:{200:Nxt,401:Di},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:g.object({authorization:g.string().min(1).optional()}),body:wxt,responses:{201:Mxt,401:Di,422:Di},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:g.object({projectId:FA}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:Qxt,401:Di,403:Di,404:Di},summary:"Get a project with its attached threads and child docs. The project description is the canonical mention source for project-scoped @-mentions."},updateProject:{method:"PATCH",path:"/projects/:projectId",pathParams:g.object({projectId:FA}),headers:g.object({authorization:g.string().min(1).optional()}),body:kxt,responses:{200:Pxt,401:Di,403:Di,404:Di,422:Di},summary:"Update a project\u2019s name or rich-text body. Body changes re-sync mention_references for source_kind=project."},archiveProject:{method:"POST",path:"/projects/:projectId/archive",pathParams:g.object({projectId:FA}),headers:g.object({authorization:g.string().min(1).optional()}),body:Uxt,responses:{200:Lxt,401:Di,403:Di,404:Di},summary:"Archive (soft-delete) or unarchive a project"},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:g.object({projectId:FA}),headers:g.object({authorization:g.string().min(1).optional()}),body:Fxt,responses:{201:Gxt,401:Di,403:Di,404:Di,409:Di,422:Di},summary:"Pin an existing visible thread to this project. Idempotent \u2014 re-adding returns the existing membership."},removeProjectThread:{method:"DELETE",path:"/projects/:projectId/threads/:threadId",pathParams:g.object({projectId:FA,threadId:g.string().min(1).max(64)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{204:g.object({}),401:Di,403:Di,404:Di},summary:"Remove a thread membership from a project"}})});var jxt,Gn,Qc,YLe,zxt,bG,vG,Hxt,$xt,Vxt,qLe,qxt,Yxt,KLe,Kxt,Jxt,Zxt,Wxt,Xxt,eDt,tDt,nDt,rDt,oDt,iDt,aDt,sDt,uDt,cDt,lDt,dDt,pDt,fDt,ADt,JLe,Cne=O(()=>{"use strict";A();kA();cf();jxt=au(),Gn=g.object({message:g.string()}),Qc=g.string().regex(/^reg_[0-9A-Za-z]{22}$/),YLe=g.string().min(1).max(64),zxt=["active","quiet","dormant","archived"],bG=g.enum(zxt),vG=g.object({id:g.string().min(1),display_name:g.string().min(1),avatar_url:g.string().nullable().optional()}),Hxt=g.object({id:g.string().min(1),display_name:g.string().min(1),thread_count:g.number().int().positive()}),$xt=["asked","requested","decided","corrected","shared","requirement"],Vxt=g.enum($xt),qLe=g.object({id:g.string().min(1),kind:Vxt,summary:g.string(),thread_id:g.string().min(1),thread_title:g.string(),created_at:g.string().datetime()}),qxt=g.object({decided_14d:g.number().int().nonnegative(),asked_14d:g.number().int().nonnegative()}),Yxt=g.object({id:Qc,name:g.string().min(1),overlap_score:g.number().min(0).max(1)}),KLe=g.object({thread_id:g.string().min(1),title:g.string().min(1),is_primary:g.boolean(),added_at:g.string().datetime(),added_by:vG}),Kxt=g.object({id:Qc,name:g.string().min(1),blurb:g.string().nullable(),status:bG,thread_count:g.number().int().nonnegative(),contributor_count:g.number().int().nonnegative(),comment_count:g.number().int().nonnegative(),contributors_preview:g.array(vG).max(3),top_filepath:g.string().nullable(),last_active_at:g.string().datetime(),created_at:g.string().datetime(),updated_at:g.string().datetime(),archived_at:g.string().datetime().nullable()}),Jxt=g.object({type:g.literal("list"),list_type:g.literal("region"),objects:g.array(Kxt)}),Zxt=g.object({status:bG.optional()}),Wxt=g.object({name:g.string().trim().min(1).max(200),blurb:g.string().trim().max(2e3).optional()}),Xxt=g.object({id:Qc,created_at:g.string().datetime()}),eDt=g.object({name:g.string().trim().min(1).max(200).optional(),blurb:g.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),tDt=g.object({id:Qc,updated_at:g.string().datetime()}),nDt=g.object({archived:g.boolean()}),rDt=g.object({id:Qc,status:bG,archived_at:g.string().datetime().nullable()}),oDt=g.object({id:Qc,name:g.string().min(1),blurb:g.string().nullable(),status:bG,created_by:vG,thread_count:g.number().int().nonnegative(),last_active_at:g.string().datetime(),created_at:g.string().datetime(),updated_at:g.string().datetime(),archived_at:g.string().datetime().nullable(),synthesized_status:g.string().nullable(),synthesized_status_at:g.string().datetime().nullable(),threads:g.array(KLe),contributors:g.array(Hxt),decisions:g.object({decided:g.array(qLe),open:g.array(qLe)}),velocity:qxt,cited_by_active_regions:g.array(Yxt)}),iDt=g.object({id:Qc,synthesized_status:g.string(),synthesized_status_at:g.string().datetime()}),aDt=g.object({regions_created:g.number().int().nonnegative(),llm_dispatched:g.boolean()}),sDt=g.object({promoted_to_active:g.number().int().nonnegative(),demoted_to_quiet:g.number().int().nonnegative(),demoted_to_dormant:g.number().int().nonnegative()}),uDt=g.object({thread_id:g.string().min(1),region_id:Qc,region_name:g.string().min(1),score:g.number().min(0).max(1),signal:g.enum(["file","embedding","combined"])}),cDt=g.object({thread_ids:g.array(g.string().min(1)).min(1).max(50)}),lDt=g.object({type:g.literal("list"),list_type:g.literal("region_suggestion"),objects:g.array(uDt)}),dDt=g.object({thread_id:g.string().min(1),title:g.string(),created_at:g.string().datetime(),author:vG,user_message_count:g.number().int().nonnegative(),comment_count:g.number().int().nonnegative()}),pDt=g.object({type:g.literal("list"),list_type:g.literal("unfiled_thread"),objects:g.array(dDt)}),fDt=g.object({thread_id:YLe}),ADt=KLe,JLe=jxt.router({listRegions:{method:"GET",path:"/regions",headers:g.object({authorization:g.string().min(1).optional()}),query:Zxt,responses:{200:Jxt,401:Gn,403:Gn},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:g.object({authorization:g.string().min(1).optional()}),body:Wxt,responses:{201:Xxt,401:Gn,403:Gn,409:Gn,422:Gn},summary:"Create a new region in the authenticated user\u2019s organization"},getRegion:{method:"GET",path:"/regions/:regionId",pathParams:g.object({regionId:Qc}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:oDt,401:Gn,403:Gn,404:Gn},summary:"Get a region with its attached threads and rolled-up contributors"},updateRegion:{method:"PATCH",path:"/regions/:regionId",pathParams:g.object({regionId:Qc}),headers:g.object({authorization:g.string().min(1).optional()}),body:eDt,responses:{200:tDt,401:Gn,403:Gn,404:Gn,409:Gn,422:Gn},summary:"Rename a region or update its blurb"},archiveRegion:{method:"POST",path:"/regions/:regionId/archive",pathParams:g.object({regionId:Qc}),headers:g.object({authorization:g.string().min(1).optional()}),body:nDt,responses:{200:rDt,401:Gn,403:Gn,404:Gn},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:g.object({regionId:Qc}),headers:g.object({authorization:g.string().min(1).optional()}),body:fDt,responses:{201:ADt,401:Gn,403:Gn,404:Gn,409:Gn,422:Gn},summary:"Attach an existing visible thread to this region. Primary if the thread has no other primary, otherwise secondary (up to 2). Idempotent."},suggestRegionsForThreads:{method:"POST",path:"/regions/suggest-for-threads",headers:g.object({authorization:g.string().min(1).optional()}),body:cDt,responses:{200:lDt,401:Gn,403:Gn,422:Gn},summary:'Batch lookup: for each thread id, return the highest-scoring active region in the viewer\u2019s workspace (or omit when no region clears the threshold). Used by the per-thread inline "Add to <region>" suggestion chip.'},listUnfiledThreads:{method:"GET",path:"/regions/unfiled",headers:g.object({authorization:g.string().min(1).optional()}),query:g.object({days:g.coerce.number().int().positive().max(180).optional()}),responses:{200:pDt,401:Gn,403:Gn},summary:"List threads in the authenticated user\u2019s scope that are not yet attached to any region (default last 30 days)."},transitionRegionLifecycle:{method:"POST",path:"/regions/lifecycle/transition",headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:sDt,401:Gn,403:Gn},summary:"Sweep regions and demote/promote between active/quiet/dormant based on last_active_at. Idempotent \u2014 safe to run on a cron or on-demand."},refreshRegions:{method:"POST",path:"/regions/refresh",headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:aDt,401:Gn,403:Gn},summary:"Run the clustering pipeline against unfiled threads and create regions from the resulting clusters. Deterministic pass is synchronous; LLM pass is dispatched as an async Inngest event and lands more regions ~30s later."},synthesizeRegion:{method:"POST",path:"/regions/:regionId/synthesize",pathParams:g.object({regionId:Qc}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:iDt,401:Gn,403:Gn,404:Gn,409:Gn,503:Gn},summary:"Generate (or refresh) the region\u2019s synthesized status using recent decisions and threads. Persists to regions.synthesized_status."},removeRegionThread:{method:"DELETE",path:"/regions/:regionId/threads/:threadId",pathParams:g.object({regionId:Qc,threadId:YLe}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{204:g.object({}),401:Gn,403:Gn,404:Gn},summary:"Remove a thread membership from a region"}})});var mDt,RG,gDt,xG,hDt,_Dt,EDt,SDt,yDt,TDt,IDt,CDt,ZLe,bne=O(()=>{"use strict";A();kA();cf();mDt=au(),RG=g.object({message:g.string()}),gDt=["thread","plan","doc","user"],xG=g.enum(gDt),hDt=["doc","project"],_Dt=g.enum(hDt),EDt=g.object({kind:xG,id:g.string().min(1),title:g.string().min(1),href:g.string().min(1)}),SDt=g.object({type:g.literal("list"),list_type:g.literal("mention"),objects:g.array(EDt)}),yDt=g.object({q:g.string().trim().min(1).max(50),kinds:g.string().optional().transform(e=>{if(!e)return;let t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);return t.length>0?t:void 0}).pipe(g.array(xG).optional())}),TDt=g.object({source_kind:_Dt,source_id:g.string().min(1),source_title:g.string().min(1),source_href:g.string().min(1),target_kind:xG,target_id:g.string().min(1),created_at:g.string().datetime()}),IDt=g.object({type:g.literal("list"),list_type:g.literal("backlink"),objects:g.array(TDt)}),CDt=g.object({target_kind:xG,target_id:g.string().min(1).max(64)}),ZLe=mDt.router({searchMentions:{method:"GET",path:"/mentions/search",headers:g.object({authorization:g.string().min(1).optional()}),query:yDt,responses:{200:SDt,401:RG,422:RG},summary:"Search threads, plans, files, and users by title/name for @-mention typeahead. Org-scoped, max 10 results across all kinds."},listBacklinks:{method:"GET",path:"/mentions/backlinks",headers:g.object({authorization:g.string().min(1).optional()}),query:CDt,responses:{200:IDt,401:RG,403:RG},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var bDt,vDt,ts,WLe,RDt,xDt,DDt,BDt,XLe,NDt,ODt,eQe,vne=O(()=>{"use strict";A();kA();cf();bDt=au(),vDt=g.object({type:g.literal("list"),list_type:g.literal("thread"),has_more:g.boolean(),objects:g.array(g.unknown())}),ts=g.object({message:g.string()}),WLe=g.object({thread_id:g.string().min(1),is_favorited:g.boolean(),favorited_at:g.string().datetime().nullable()}),RDt=g.object({before:g.string().min(1).max(64).optional()}),xDt=g.object({id:g.string().min(1),display_name:g.string().min(1)}),DDt=g.object({block_id:g.string().min(1),thread_id:g.string().min(1),thread_title:g.string(),thread_visibility:g.enum(["private","workspace","public"]),author:xDt,preview:g.string(),prompted_at:g.string().datetime().nullable(),favorited_at:g.string().datetime()}),BDt=g.object({type:g.literal("list"),list_type:g.literal("favorite_prompt"),has_more:g.boolean(),objects:g.array(DDt)}),XLe=g.object({block_id:g.string().min(1),thread_id:g.string().min(1).nullable(),is_favorited:g.boolean(),favorited_at:g.string().datetime().nullable()}),NDt=g.object({before:g.string().min(1).max(64).optional()}),ODt=g.object({block_ids:g.array(g.string().min(1))}),eQe=bDt.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:g.object({id:g.string().min(1).max(64)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{201:WLe,401:ts,403:ts,404:ts},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:g.object({id:g.string().min(1).max(64)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:WLe,401:ts,403:ts,404:ts},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:g.object({authorization:g.string().min(1).optional()}),query:RDt,responses:{200:vDt,401:ts,403:ts},summary:"List threads the authenticated user has favorited, newest favorited first. Visibility filtering still applies \u2014 a thread the viewer can no longer see (e.g. visibility downgraded) is omitted from the list."},addPromptFavorite:{method:"POST",path:"/thread-blocks/:id/favorite",pathParams:g.object({id:g.string().min(1).max(64)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{201:XLe,401:ts,403:ts,404:ts,409:ts},summary:'Bookmark a single user prompt (a thread_blocks row with type="user") for the authenticated user. Idempotent.'},removePromptFavorite:{method:"DELETE",path:"/thread-blocks/:id/favorite",pathParams:g.object({id:g.string().min(1).max(64)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:XLe,401:ts,404:ts},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:g.object({authorization:g.string().min(1).optional()}),query:NDt,responses:{200:BDt,401:ts},summary:"List the user's favorited prompts, newest first. Prompts whose parent thread the viewer can no longer see (visibility downgraded) are filtered out at read time."},listFavoritedBlockIdsInThread:{method:"GET",path:"/threads/:id/favorited-blocks",pathParams:g.object({id:g.string().min(1).max(64)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:ODt,401:ts,403:ts,404:ts},summary:"Returns the set of thread_block ids the authenticated viewer has favorited within a single thread, used to bootstrap per-prompt star state on the SessionView."}})});var wDt,tQe,MDt,kDt,PDt,UDt,LDt,nQe,Rne=O(()=>{"use strict";A();kA();cf();wDt=au(),tQe=g.object({message:g.string()}),MDt=g.object({id:g.string().min(1),title:g.string(),href:g.string().min(1),author_display_name:g.string().nullable(),author_handle:g.string().nullable()}),kDt=g.object({name:g.string().min(1),usage_count:g.number().int().nonnegative(),href:g.string().min(1)}),PDt=g.object({id:g.string().min(1),display_name:g.string(),handle:g.string().nullable(),avatar_url:g.string().nullable(),href:g.string().min(1)}),UDt=g.object({type:g.literal("global_search"),threads:g.array(MDt),skills:g.array(kDt),people:g.array(PDt)}),LDt=g.object({q:g.string().trim().min(1).max(80)}),nQe=wDt.router({globalSearch:{method:"GET",path:"/search",headers:g.object({authorization:g.string().min(1).optional()}),query:LDt,responses:{200:UDt,401:tQe,422:tQe},summary:"Global navbar search. Threads and people are searched globally (subject to thread visibility); skills are scoped to the viewer workspace. Max 5 results per kind."}})});var QDt,Fy,FDt,GDt,jDt,zDt,rQe,xne=O(()=>{"use strict";A();kA();cf();QDt=au(),Fy=g.object({message:g.string()}),FDt=g.object({id:g.string().min(1),name:g.string().min(1),is_private:g.boolean()}),GDt=g.object({channels:g.array(FDt)}),jDt=g.object({channel_name:g.string().min(1),thread_id:g.string().min(1)}),zDt=g.object({ok:g.literal(!0),channel:g.string(),ts:g.string()}),rQe=QDt.router({listSlackChannels:{method:"GET",path:"/slack/channels",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:GDt,401:Fy,404:Fy,502:Fy},summary:"List Slack channels visible to the bot for the caller's organization."},postToSlack:{method:"POST",path:"/slack/post",headers:g.object({authorization:g.string().min(1).optional()}),body:jDt,responses:{200:zDt,400:Fy,401:Fy,404:Fy,502:Fy},summary:"Post a Lore thread link to a Slack channel. The unfurl handler renders the preview."}})});var XRn,exn,txn,lf,HDt,$Dt,nxn,oQe=O(()=>{"use strict";A();cf();DG();XRn=g.enum(["thread","org","user","public"]),exn=g.discriminatedUnion("kind",[g.object({kind:g.literal("thread"),id:g.string().min(1)}),g.object({kind:g.literal("org"),id:g.string().min(1)}),g.object({kind:g.literal("user"),id:g.string().min(1)}),g.object({kind:g.literal("public"),id:g.string().min(1)})]),txn=g.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","user.followed","user.joined","user.presence"]),lf=g.object({id:g.string().min(1),subjects:g.array(g.string().min(1)).min(1),actor_user_id:g.string().min(1).nullable(),created_at:g.string().datetime()}),HDt=g.object({thread_id:g.string().min(1),title:g.string(),author_id:g.string().min(1),created_at:g.string().datetime()}),$Dt=g.enum(["user","assistant","tool","progress","system"]),nxn=g.discriminatedUnion("type",[lf.extend({type:g.literal("thread.created"),payload:HDt}),lf.extend({type:g.literal("thread.completed"),payload:g.object({thread_id:g.string().min(1),completed_at:g.string().datetime()})}),lf.extend({type:g.literal("thread.block.appended"),payload:g.object({thread_id:g.string().min(1),block_id:g.string().min(1),block_type:$Dt,excerpt:g.string().nullable()})}),lf.extend({type:g.literal("thread.comment.created"),payload:g.object({comment:g.lazy(()=>GA)})}),lf.extend({type:g.literal("thread.comment.updated"),payload:g.object({comment:g.lazy(()=>GA)})}),lf.extend({type:g.literal("thread.comment.deleted"),payload:g.object({thread_id:g.string().min(1),comment_id:g.string().min(1)})}),lf.extend({type:g.literal("thread.vote.cast"),payload:g.object({thread_id:g.string().min(1),vote_count:g.number().int().nonnegative()})}),lf.extend({type:g.literal("thread.vote.cleared"),payload:g.object({thread_id:g.string().min(1),vote_count:g.number().int().nonnegative()})}),lf.extend({type:g.literal("user.followed"),payload:g.object({followee_id:g.string().min(1),followee_handle:g.string().nullable(),followee_display_name:g.string().nullable()})}),lf.extend({type:g.literal("user.joined"),payload:g.object({organization_id:g.string().min(1).nullable(),organization_name:g.string().nullable()})}),lf.extend({type:g.literal("user.presence"),payload:g.object({status:g.literal("online")})})])});var VDt,qDt,mxn,YDt,KDt,gxn,H,JDt,pQe,fQe,AQe,ZDt,WDt,XDt,e1t,t1t,n1t,mQe,r1t,o1t,i1t,a1t,s1t,u1t,c1t,l1t,gQe,d1t,p1t,f1t,A1t,hQe,OG,m1t,g1t,h1t,_1t,E1t,S1t,y1t,T1t,I1t,C1t,b1t,v1t,R1t,x1t,D1t,B1t,Nne,_Qe,N1t,O1t,w1t,M1t,EQe,k1t,P1t,U1t,L1t,Q1t,F1t,df,G1t,j1t,z1t,H1t,$1t,V1t,wG,q1t,SQe,yQe,Y1t,ow,One,iQe,K1t,TQe,aQe,J1t,Z1t,GA,W1t,X1t,eBt,tBt,nBt,rBt,hxn,oBt,iBt,aBt,IQe,wne,CQe,sBt,uBt,cBt,lBt,dBt,pBt,bQe,fBt,ABt,mBt,gBt,hBt,_Bt,Dne,EBt,SBt,yBt,iw,TBt,IBt,CBt,bBt,vBt,RBt,xBt,DBt,BBt,NBt,OBt,wBt,sQe,MBt,kBt,PBt,UBt,LBt,QBt,FBt,GBt,jBt,zBt,HBt,Mne,$Bt,VBt,qBt,YBt,KBt,JBt,ZBt,WBt,XBt,eNt,tNt,nNt,rNt,oNt,vQe,iNt,aNt,sNt,uNt,cNt,RQe,lNt,dNt,pNt,fNt,ANt,mNt,uQe,gNt,hNt,_Nt,ENt,BG,SNt,yNt,TNt,INt,CNt,bNt,vNt,RNt,xNt,DNt,BNt,NNt,ONt,kR,xQe,Bne,wNt,MNt,kNt,PNt,UNt,cQe,NG,LNt,QNt,FNt,GNt,jNt,zNt,HNt,$Nt,VNt,_E,lQe,qNt,YNt,KNt,JNt,ZNt,WNt,XNt,eOt,tOt,nOt,rOt,oOt,iOt,aOt,sOt,uOt,cOt,lOt,dOt,pOt,dQe,fOt,DQe,AOt,mOt,gOt,hOt,_Ot,MG,DG=O(()=>{"use strict";A();kA();cf();GLe();Ine();Cne();IG();bne();vne();Rne();xne();oQe();Ine();Cne();IG();bne();vne();Rne();xne();VDt=au(),qDt=["gmail.com","googlemail.com","hotmail.com","outlook.com","live.com","msn.com","yahoo.com","ymail.com","rocketmail.com","icloud.com","me.com","mac.com","aol.com","proton.me","protonmail.com","pm.me","tutanota.com","tuta.io","fastmail.com","hey.com","mail.com","gmx.com","gmx.net","zoho.com","zohomail.com","hushmail.com","lycos.com","inbox.com","yandex.com","yandex.ru","mail.ru","inbox.ru","bk.ru","list.ru","rambler.ru","qq.com","163.com","126.com","yeah.net","sina.com","naver.com","daum.net","hanmail.net","kakao.com","rediffmail.com","comcast.net","verizon.net","att.net","sbcglobal.net","bellsouth.net","earthlink.net","charter.net","cox.net","roadrunner.com","spectrum.net","btinternet.com","virginmedia.com","sky.com","orange.fr","wanadoo.fr","free.fr","laposte.net","web.de","t-online.de","gmx.de","libero.it","virgilio.it","alice.it","seznam.cz","centrum.cz","wp.pl","interia.pl","o2.pl","onet.pl"],mxn=new Set(qDt),YDt=g.object({id:g.string().uuid(),role:g.enum(["user","assistant"]),content:g.string().min(1),timestamp:g.string().datetime()}),KDt=g.object({id:g.string().uuid(),title:g.string().min(1),author:g.string().min(1),authorAvatar:g.string().min(1).max(4),model:g.string().min(1),turnCount:g.number().int().nonnegative(),createdAt:g.string().datetime(),preview:g.string()}),gxn=KDt.extend({messages:g.array(YDt)}),H=g.object({message:g.string()}),JDt=/^[a-zA-Z0-9_-]{2,32}$/,pQe=g.string().regex(JDt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),fQe=g.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),AQe=g.object({id:g.string(),first_name:g.string().min(1),last_name:g.string().min(1),display_name:g.string().min(1),handle:g.string().nullable(),bio:g.string().max(280).nullable(),avatar_url:g.string().nullable(),banner_url:g.string().nullable(),share_new_threads_to_workspace:g.boolean(),experimental_features_enabled:g.boolean(),onboarded_at:g.string().nullable(),attribution_source:fQe.nullable(),attribution_source_detail:g.string().nullable()}),ZDt=g.object({email:g.string().nullable(),name:g.string().nullable(),handle:g.string().nullable(),created_at:g.string(),onboarded_at:g.string().nullable(),is_admin:g.boolean(),referred_by_user_id:g.string().nullable(),plan_tier:g.enum(["free","creator","team"]),organization_id:g.string().nullable(),signup_source:g.enum(["referral","organic"]),first_upload_at:g.string().nullable(),first_share_at:g.string().nullable(),first_cli_auth_at:g.string().nullable(),first_plugin_activated_at:g.string().nullable(),first_plugin_agent:g.string().nullable()}),WDt=g.object({group_key:g.string().min(1),properties:g.object({name:g.string(),plan_tier:g.enum(["free","creator","team"]),seat_count:g.number().int().nonnegative(),created_at:g.string(),email_domains:g.array(g.string()),default_thread_visibility:g.string(),member_count:g.number().int().nonnegative().nullable()})}),XDt=g.object({authProviderUserId:g.string().min(1).optional(),organizationId:g.string().min(1).optional(),org_name:g.string().min(1).optional(),organizations:g.array(g.object({id:g.string().min(1),name:g.string().min(1)})),emailAddress:g.string().email(),name:g.string().nullable(),user:AQe,is_admin:g.boolean(),is_new_signup:g.boolean(),posthog:g.object({user_properties:ZDt,organization:WDt.nullable()})}),e1t=g.object({workos_client_id:g.string().min(1),workos_api_origin:g.string().url()}),t1t=g.object({share_new_threads_to_workspace:g.boolean().optional(),experimental_features_enabled:g.boolean().optional(),onboarded_at:g.union([g.literal("now"),g.null()]).optional(),attribution_source:fQe.nullable().optional(),attribution_source_detail:g.string().max(280).nullable().optional(),display_name:g.string().min(1).max(120).optional(),handle:pQe.optional(),bio:g.string().max(280).nullable().optional(),avatar_storage_url:g.string().min(1).nullable().optional(),banner_storage_url:g.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),n1t=g.object({id:g.string(),display_name:g.string(),handle:g.string().nullable(),avatar_url:g.string().nullable(),visible_thread_count:g.number().int().nonnegative(),last_active_at:g.string().datetime().nullable(),product_last_seen_at:g.string().datetime().nullable()}),mQe=g.object({id:g.string().min(1),display_name:g.string().min(1),handle:g.string().nullable(),bio:g.string().max(280).nullable(),avatar_url:g.string().nullable(),banner_url:g.string().nullable(),organization_name:g.string().min(1).nullable(),created_at:g.string().min(1),visible_thread_count:g.number().int().nonnegative(),follower_count:g.number().int().nonnegative(),following_count:g.number().int().nonnegative(),published_project_count:g.number().int().nonnegative(),is_following:g.boolean(),is_self:g.boolean()}),r1t=g.object({type:g.literal("list"),list_type:g.literal("organization_member"),objects:g.array(n1t)}),o1t=g.object({email_address:g.string().email()}),i1t=g.object({email_address:g.string().email(),invitation_id:g.string().min(1)}),a1t=g.object({organization_id:g.string().min(1),organization_name:g.string().min(1),domain:g.string().min(1),created:g.boolean()}),s1t=g.object({location:g.string().trim().min(1),contact:g.string().trim().email()}),u1t=g.enum(["target_profile","demo","substrate_waitlist"]),c1t=g.object({type:u1t,email:g.string().trim().email(),name:g.string().trim().optional()}),l1t=g.object({location:g.string().min(1),contact:g.string().email(),created_at:g.string().datetime()}),gQe=g.enum(["general","bug","feature_request","question"]),d1t=g.object({type:gQe,message:g.string().trim().min(1).max(5e3)}),p1t=g.object({id:g.string().min(1),type:gQe,message:g.string().min(1),created_at:g.string().datetime()}),f1t=g.object({path_glob:g.string().min(1),name:g.string().min(1),description:g.string().min(1)}),A1t=g.object({repo_origin_path:g.string().min(1),building_blocks:g.array(f1t)}),hQe=g.string().regex(/^th_[0-9A-Za-z]{22}$/),OG=g.string().regex(/^tb_[0-9A-Za-z]{22}$/),m1t=g.object({id:hQe,author:g.object({id:g.string().min(1),display_name:g.string().min(1)}),title:g.string().min(1),excerpt:g.string(),created_at:g.string().datetime(),repo_origin_path:g.string().min(1),latest_revision_id:OG,revision_count:g.number().int().positive()}),g1t=g.object({id:g.string().min(1),display_name:g.string().min(1)}),h1t=g.object({id:g.string().min(1),author_id:g.string().min(1).nullable(),author:g1t.nullable(),created_at:g.string().datetime(),deleted_at:g.string().datetime().nullable(),content:g.string().min(1)}),_1t=g.object({id:g.string().min(1),thread_block_id:g.string().min(1),created_at:g.string().datetime(),resolved_at:g.string().datetime().nullable(),comments:g.array(h1t)}),E1t=g.object({thread_block_id:OG,from_position:g.number().int().positive(),to_position:g.number().int().positive(),selected_text:g.string().min(1),content:g.string().trim().min(1)}),S1t=g.object({id:g.string().min(1)}),y1t=g.object({content:g.string().trim().min(1)}),T1t=g.object({id:g.string().min(1)}),I1t=g.object({content:g.string().trim().min(1)}),C1t=g.object({id:g.string().min(1)}),b1t=g.object({content:g.string().trim().min(1)}),v1t=g.object({id:g.string().min(1)}),R1t=g.object({resolved:g.boolean()}),x1t=g.object({id:g.string().min(1),resolved_at:g.string().datetime().nullable()}),D1t=g.object({resolved:g.boolean()}),B1t=g.object({id:g.string().min(1),resolved_at:g.string().datetime().nullable()}),Nne=g.record(g.string(),g.unknown()),_Qe=g.object({id:OG,body:g.string().nullable(),created_at:g.string().datetime(),prosemirror_json:Nne.nullable(),comment_threads:g.array(_1t)}),N1t=_Qe.extend({body:g.string(),prosemirror_json:Nne}),O1t=g.object({id:hQe,created_at:g.string().datetime(),repo_origin_path:g.string().min(1),author:g.object({id:g.string().min(1),display_name:g.string().min(1)}),latest_revision_id:OG,revision_count:g.number().int().positive(),revisions:g.array(_Qe)}),w1t=g.object({type:g.literal("list"),list_type:g.literal("plan"),has_more:g.boolean(),objects:g.array(m1t)}),M1t=g.object({before:g.string().min(1).optional(),after:g.string().min(1).optional(),author_id:g.string().min(1).optional(),repo_origin_path:g.string().min(1).optional()}),EQe=g.object({id:g.string().min(1),organization_id:g.string().min(1).nullable(),created_at:g.string().min(1),repo_origin_path:g.string().min(1),path_glob:g.string().min(1),name:g.string().min(1),description:g.string().min(1)}),k1t=g.array(EQe),P1t=g.object({type:g.literal("list"),list_type:g.literal("building_block"),has_more:g.boolean(),objects:g.array(EQe)}),U1t=g.object({repo_origin_path:g.string().min(1),before:g.string().min(1).optional(),after:g.string().min(1).optional()}),L1t=g.enum(["thread","building_block"]),Q1t=g.object({repo_origin_path:g.string().min(1),sources:g.array(L1t).nonempty()}),F1t=g.object({type:g.literal("list"),list_type:g.literal("repository"),has_more:g.boolean(),objects:g.array(Q1t)}),df=g.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),G1t=g.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),j1t=g.object({uploads:g.array(g.string()),outputs:g.array(g.string())}),z1t=g.object({connected:g.boolean(),last_upload_at:g.string().nullable(),harnesses:g.array(df)}),H1t=["transcript","plan"],$1t=g.enum(H1t),V1t=g.object({md5:g.string().min(1),harness:G1t,filename:g.string().min(1).optional(),repo_origin_path:g.string().min(1).optional(),harness_internal_id:g.string().min(1).optional(),file_type:$1t.optional(),artifact_metadata:j1t.optional()}).refine(e=>(e.filename?.trim().length??0)>0||(e.harness_internal_id?.trim().length??0)>0,{path:["harness_internal_id"],message:"filename or harness_internal_id is required"}),wG=g.object({id:g.string().min(1),display_name:g.string().min(1),avatar_url:g.string().nullable()}),q1t=g.object({id:g.string().min(1),display_name:g.string().min(1)}),SQe=g.object({id:g.string().min(1),author_id:g.string().min(1).nullable(),author:q1t.nullable(),created_at:g.string().datetime(),deleted_at:g.string().datetime().nullable(),content:g.string().min(1)}),yQe=g.object({id:g.string().min(1),thread_block_id:g.string().min(1),created_at:g.string().datetime(),resolved_at:g.string().datetime().nullable()}),Y1t=yQe.extend({comments:g.array(SQe)}),ow=g.object({id:g.string().min(1),type:g.string().min(1),index_in_thread:g.number().int().nonnegative(),isCritiqued:g.boolean(),comment_threads:g.array(Y1t).optional()}).passthrough(),One=g.object({type:g.literal("list"),list_type:g.literal("thread_block"),has_more:g.boolean(),objects:g.array(ow)}),iQe=ow.extend({type:g.literal("plan"),prosemirror_json:Nne,thread_file_id:g.string().min(1)}),K1t=g.union([g.literal(-1),g.literal(1)]),TQe=g.union([g.literal(-1),g.literal(0),g.literal(1)]),aQe=g.object({score:g.number().int(),up_count:g.number().int().nonnegative(),down_count:g.number().int().nonnegative(),viewer_vote:TQe}),J1t=g.object({value:K1t}),Z1t=g.object({id:g.string().min(1),display_name:g.string().min(1),avatar_url:g.string().nullable()}),GA=g.object({id:g.string().min(1),thread_id:g.string().min(1),author_id:g.string().min(1).nullable(),author:Z1t.nullable(),parent_comment_id:g.string().min(1).nullable(),content:g.string(),created_at:g.string().datetime(),updated_at:g.string().datetime(),deleted_at:g.string().datetime().nullable()}),W1t=g.object({type:g.literal("list"),list_type:g.literal("thread_comment"),objects:g.array(GA)}),X1t=g.object({content:g.string().trim().min(1).max(4e3),parent_comment_id:g.string().min(1).optional()}),eBt=GA,tBt=g.object({content:g.string().trim().min(1).max(4e3)}),nBt=GA,rBt=GA,hxn=g.discriminatedUnion("kind",[g.object({kind:g.literal("created"),thread_id:g.string().min(1),actor_user_id:g.string().min(1),version:g.number(),comment:GA}),g.object({kind:g.literal("updated"),thread_id:g.string().min(1),actor_user_id:g.string().min(1),version:g.number(),comment:GA}),g.object({kind:g.literal("deleted"),thread_id:g.string().min(1),actor_user_id:g.string().min(1),version:g.number(),comment:GA})]),oBt=g.enum(["pending","generating","ready","failed"]),iBt=g.enum(["pending","generating","ready","failed"]),aBt=g.enum(["pending","placeholder","ai","user"]),IQe=g.enum(["pending","generating","ready","failed"]),wne=g.enum(["pending","generating","ready","failed","disabled"]),CQe=g.enum(["pending","generating","ready","failed"]),sBt=g.object({title:g.string().min(1),body:g.string().min(1),files:g.array(g.string()).optional()}),uBt=g.object({status:wne,url:g.string().nullable(),url_expires_at:g.string().nullable(),generated_at:g.string().nullable(),model:g.string().nullable()}),cBt=g.object({status:CQe,steps:g.array(sBt),generated_at:g.string().nullable()}),lBt=g.object({cover:uBt,how_to:cBt}),dBt=g.object({id:g.string().min(1),title:g.string().min(1),author:g.object({id:g.string().min(1),display_name:g.string(),handle:g.string().nullable(),avatar_url:g.string().nullable()}),cover:g.object({url:g.string(),url_expires_at:g.string()}),started_at:g.string(),cover_generated_at:g.string()}),pBt=g.object({type:g.literal("list"),list_type:g.literal("card_feed_item"),has_more:g.boolean(),objects:g.array(dBt)}),bQe=g.enum(["asked","requested","decided","corrected","shared","requirement"]),fBt=g.object({id:g.string().min(1),kind:bQe,summary:g.string().min(1),block_id:g.string().min(1)}),ABt=g.object({type:g.literal("list"),list_type:g.literal("thread_decision"),status:IQe,generated_at:g.string().nullable(),objects:g.array(fBt)}),mBt=g.object({forker_intent:g.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),gBt=g.object({source_thread_id:g.string().min(1),forker_intent:g.string(),source_distilled:g.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),hBt=g.object({question:g.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),_Bt=g.object({id:g.string().min(1),kind:bQe,summary:g.string().min(1),block_id:g.string().min(1)}),Dne=g.object({thread_id:g.string().min(1),title:g.string().min(1),summary:g.string().nullable(),started_at:g.string().datetime(),score:g.number(),matched_by:g.enum(["summary","decision"]),decisions:g.array(_Bt)}),EBt=g.object({id:g.string().min(1),kind:g.enum(["agent","tool","retrieval","answer","sources"]),title:g.string().min(1),status:g.enum(["completed"]),summary:g.string().min(1),duration_ms:g.number().nonnegative().optional(),metadata:g.object({retrieved_decisions:g.number().int().nonnegative().optional(),returned_sources:g.number().int().nonnegative().optional(),cited_sources:g.number().int().nonnegative().optional(),matched_sources:g.array(Dne).optional(),searched_query:g.string().min(1).optional(),since:g.string().min(1).optional(),until:g.string().min(1).optional(),thread_id:g.string().min(1).optional(),thread_ids:g.array(g.string().min(1)).optional(),question:g.string().min(1).optional()}).optional()}),SBt=g.object({steps:g.array(EBt)}),yBt=g.object({answer:g.string(),sources:g.array(Dne),matched_sources:g.array(Dne).describe("Threads matched by the vector decision search before citation filtering"),searched_query:g.string().describe("String embedded for the vector decision search"),trace:SBt.optional()}),iw=g.object({id:g.string().min(1),thread_file_id:g.string().min(1),organization_id:g.string().min(1).nullable(),deleted_at:g.string().datetime().nullable(),author:wG,repo:g.string().min(1),title:g.string().min(1),started_at:g.string().min(1),blocks:One,user_message_count:g.number().int().nonnegative(),files_touched:g.array(g.string()),skills_invoked:g.array(g.string()),slash_commands_invoked:g.array(g.string()),harness:df,transcript_parsing_state:g.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:g.enum(["private","workspace","public"]),has_plan:g.boolean().optional(),summary:g.string().nullable(),summary_status:oBt,summary_generated_at:g.string().nullable(),title_status:iBt,title_generated_at:g.string().nullable(),title_source:aBt,decisions_status:IQe,decisions_generated_at:g.string().nullable(),score:g.number().int(),up_count:g.number().int().nonnegative(),down_count:g.number().int().nonnegative(),viewer_vote:TQe,comment_count:g.number().int().nonnegative(),is_favorited:g.boolean(),card:lBt}),TBt=g.object({storage_url:g.string().min(1)}),IBt=g.object({storage_url:g.string(),harness:df,thread:iw.nullable()}),CBt=g.object({status:g.literal("complete"),thread_files:g.array(IBt)}),bBt=g.object({id:g.string(),presigned_url:g.string().nullable(),presigned_url_expires_at:g.string().nullable(),storage_url:g.string(),harness:df,expected_md5:g.string(),error:g.string().nullable(),thread:iw.nullable()}),vBt=g.object({id:g.string(),substrate:g.enum(["s3","filesystem"]),status:g.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:g.array(bBt)}),RBt=g.object({query:g.string().min(1).describe("Natural-language description of the block or block range to highlight")}),xBt=g.object({thread_id:g.string(),url:g.string().url(),start_block_id:g.string().nullable(),end_block_id:g.string().nullable(),matched:g.boolean()}),DBt=g.object({}),BBt=g.object({thread_id:g.string().min(1)}),NBt=g.object({visibility:g.enum(["private","workspace","public"]).optional(),title:g.string().trim().min(1).max(200).optional()}).refine(e=>e.visibility!==void 0||e.title!==void 0,{message:"At least one of visibility or title must be provided"}),OBt=g.discriminatedUnion("visibility",[g.object({visibility:g.literal("private")}),g.object({visibility:g.literal("workspace")}),g.object({visibility:g.literal("public"),title:g.string().min(1),author_display_name:g.string().min(1),author_avatar_url:g.string().nullable(),first_user_message:g.string().nullable(),summary:g.string().nullable(),started_at:g.string().min(1),harness:df,cover_url:g.string().nullable()})]),wBt=g.object({id:g.string().min(1),author:wG,repo:g.string().min(1),title:g.string().min(1),started_at:g.string().min(1),blocks:One,user_message_count:g.number().int().nonnegative(),comment_count:g.number().int().nonnegative(),files_touched:g.array(g.string()),skills_invoked:g.array(g.string()),harness:df,visibility:g.enum(["private","workspace","public"]),has_plan:g.boolean().optional(),is_favorited:g.boolean()}),sQe=g.object({type:g.literal("list"),list_type:g.literal("thread"),has_more:g.boolean(),objects:g.array(wBt)}),MBt=g.enum(["recent","popular"]),kBt=g.enum(["everyone","following"]),PBt=iw,UBt=g.object({type:g.literal("list"),list_type:g.literal("discover_thread"),has_more:g.boolean(),objects:g.array(PBt)}),LBt=g.object({before:g.string().min(1).optional(),after:g.string().min(1).optional(),sort:MBt.optional(),scope:kBt.optional(),harness:df.optional(),search:g.string().max(200).optional()}),QBt=g.object({thread_count:g.number().int().nonnegative(),author_count:g.number().int().nonnegative(),organization_count:g.number().int().nonnegative(),harness_breakdown:g.record(g.string(),g.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>df.safeParse(t).success),"Harness breakdown keys must be known harness values")}),FBt=g.object({id:g.string(),status:g.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:g.string(),thread_count:g.number().int().nonnegative()}),GBt=g.object({type:g.literal("list"),list_type:g.literal("upload_session"),objects:g.array(FBt)}),jBt=g.object({before:g.string().min(1).optional(),after:g.string().min(1).optional()}),zBt=g.object({before:g.string().min(1).optional(),after:g.string().min(1).optional(),author_ids:g.string().min(1).optional(),created_at:g.string().min(1).optional(),filepath_prefixes:g.string().min(1).optional()}),HBt=g.object({path:g.string().min(1),start_offset:g.number().int().nonnegative(),end_offset:g.number().int().positive()}),Mne=g.enum(["captured","published"]),$Bt=g.object({id:g.string(),display_name:g.string(),avatar_url:g.string().nullable()}),VBt=g.object({name:g.string(),usage_count:g.number().int().nonnegative(),author_count:g.number().int().nonnegative(),first_used_at:g.string().nullable(),last_used_at:g.string().nullable(),usage_count_last_24h:g.number().int().nonnegative(),usage_count_last_7d:g.number().int().nonnegative(),id:g.string().nullable(),description:g.string().nullable(),source:Mne.nullable(),has_content:g.boolean()}),qBt=g.object({type:g.literal("list"),list_type:g.literal("skill"),objects:g.array(VBt)}),YBt=g.object({id:g.string(),title:g.string(),visibility:g.enum(["private","workspace","public"]),started_at:g.string(),author:wG,skills_invoked:g.array(g.string())}),KBt=g.object({id:g.string().nullable(),name:g.string(),description:g.string().nullable(),body_md:g.string().nullable(),source:Mne.nullable(),latest_version:g.number().int().nonnegative().nullable(),author:$Bt.nullable(),usage_count:g.number().int().nonnegative(),author_count:g.number().int().nonnegative(),first_used_at:g.string().nullable(),last_used_at:g.string().nullable(),threads:g.array(YBt)}),JBt=g.object({description:g.string().nullable().optional(),body_md:g.string().min(1),display_name:g.string().nullable().optional(),published:g.boolean().optional()}),ZBt=g.object({id:g.string(),name:g.string(),latest_version:g.number().int().positive(),source:Mne,content_hash:g.string()}),WBt=g.object({path:g.string().min(1),text:g.string().max(64e3)}),XBt=g.enum(["text_edit","redact","delete_block"]),eNt=g.object({id:g.string(),thread_block_id:g.string(),editor:g.object({id:g.string(),display_name:g.string()}),kind:XBt,path:g.string().nullable(),previous_text:g.string().nullable(),new_text:g.string().nullable(),created_at:g.string()}),tNt=g.object({type:g.literal("list"),list_type:g.literal("thread_block_edit"),objects:g.array(eNt)}),nNt=g.object({organization_count:g.number().int().nonnegative(),user_count:g.number().int().nonnegative(),thread_count:g.number().int().nonnegative(),thread_count_last_24h:g.number().int().nonnegative(),user_count_last_24h:g.number().int().nonnegative()}),rNt=g.object({id:g.string(),name:g.string(),email_domains:g.array(g.string()),member_count:g.number().int().nonnegative(),thread_count:g.number().int().nonnegative(),default_thread_visibility:g.enum(["private","workspace","public"]),created_at:g.string()}),oNt=g.object({type:g.literal("list"),list_type:g.literal("admin_organization"),objects:g.array(rNt)}),vQe=g.object({id:g.string(),name:g.string()}),iNt=g.object({id:g.string(),display_name:g.string(),workos_id:g.string(),thread_count:g.number().int().nonnegative(),onboarded_at:g.string().nullable(),created_at:g.string(),organizations:g.array(vQe)}),aNt=g.object({q:g.string().trim().min(1).max(120).optional()}),sNt=g.object({follower_id:g.string().min(1),followee_id:g.string().min(1)}),uNt=g.object({follower_id:g.string().min(1),followee_id:g.string().min(1),is_following:g.literal(!0)}),cNt=g.object({type:g.literal("list"),list_type:g.literal("admin_user"),objects:g.array(iNt)}),RQe=g.object({id:g.string(),title:g.string(),started_at:g.string(),created_at:g.string(),deleted_at:g.string().nullable(),visibility:g.enum(["private","workspace","public"]),harness:df,harness_internal_id:g.string(),thread_file_id:g.string(),transcript_parsing_state:g.enum(["pending","parsed","too_large_to_parse","failed"]),author:wG,organization:vQe.nullable()}),lNt=g.object({id:g.string(),content_type:g.enum(["transcript","plan"]),harness:df,harness_internal_id:g.string(),expected_md5:g.string(),size_in_bytes:g.number().int().nonnegative().nullable(),created_at:g.string()}),dNt=g.object({thread:RQe,latest_transcript_file:lNt.nullable()}),pNt=g.object({type:g.literal("list"),list_type:g.literal("admin_thread"),has_more:g.boolean(),objects:g.array(RQe)}),fNt=g.object({before:g.string().min(1).optional(),after:g.string().min(1).optional()}),ANt=g.object({thread_id:g.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:g.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:df.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:g.string().min(1).optional().describe("Harness-native session id.")}),mNt=g.object({thread_id:g.string().min(1),thread_file_id:g.string().min(1),event_name:g.literal("lore/thread-files.parse.requested")}),uQe=g.object({token:g.string().min(1),thread_id:g.string().min(1)}),gNt=g.object({visitor:g.string().min(1).max(64).optional()}),hNt=g.object({user_id:g.string(),display_name:g.string(),shares_sent:g.number().int().nonnegative(),unique_viewers:g.number().int().nonnegative(),attributed_signups:g.number().int().nonnegative()}),_Nt=g.object({window_days:g.number().int().positive(),shares_sent:g.number().int().nonnegative(),unique_viewers:g.number().int().nonnegative(),attributed_signups:g.number().int().nonnegative(),active_sharers:g.number().int().nonnegative(),k_factor:g.number().nullable(),shares_sent_sparkline:g.array(g.number().int().nonnegative()),top_sharers:g.array(hNt)}),ENt=g.object({windows:g.array(_Nt)}),BG=g.object({period:g.string(),active:g.number().int().nonnegative()}),SNt=g.object({daily:g.array(BG),weekly:g.array(BG),monthly:g.array(BG),allTime:g.array(BG)}),yNt=g.object({quoted_text:g.string().min(1),comment:g.string().nullable(),type:g.enum(["comment","highlight:trapdoor"])}),TNt=yQe,INt=SQe.extend({comment_thread_id:g.string().min(1)}),CNt=g.object({markdown:g.string().min(1)}),bNt=g.object({storage_url:g.string().min(1),thread_file_id:g.string().min(1),parsed_plan_block:iQe,critiqued_plan_block:iQe,annotations:g.array(yNt),comment_threads:g.array(TNt),comments:g.array(INt)}),vNt=g.object({key:g.string().min(1),label:g.string().min(1),description:g.string().optional(),type:g.enum(["text","textarea","url","email"]),required:g.boolean(),defaultValue:g.string()}),RNt=g.object({id:g.string().min(1),name:g.string().min(1),description:g.string().min(1),deliveryTrigger:g.string().min(1),fields:g.array(vNt),availableFormats:g.array(g.enum(["html","text"]))}),xNt=g.object({templates:g.array(RNt)}),DNt=g.object({values:g.record(g.string(),g.string())}),BNt=g.object({subject:g.string().min(1),html:g.string().optional(),text:g.string().optional()}),NNt=g.object({to:g.string().email().describe("Recipient email address."),values:g.record(g.string(),g.string())}),ONt=g.object({id:g.string().min(1)}),kR=g.enum(hne),xQe=g.object({workspace_scope:g.boolean(),review:g.boolean(),shared_thread_ttl_days:g.number().int().positive().nullable()}),Bne=g.object({subject_type:g.enum(["user","organization"]),subject_id:g.string().min(1),effective_plan:kR,admin_override:kR.nullable(),stripe_subscription_status:g.string().nullable(),cancel_at_period_end:g.boolean(),current_period_end:g.string().nullable(),seat_quantity:g.number().int().positive(),member_count:g.number().int().nonnegative().nullable(),features:xQe}),wNt=g.object({effective_plan:kR,features:xQe,user:Bne,organization:Bne.nullable()}),MNt=g.object({plan:g.enum(["creator","team"]),seat_quantity:g.number().int().positive().optional()}),kNt=g.object({checkout_url:g.string().min(1)}),PNt=g.object({portal_url:g.string().min(1)}),UNt=g.object({seat_quantity:g.number().int().positive()}),cQe=g.object({plan:kR.nullable()}),NG=g.object({subject_type:g.enum(["user","organization"]),subject_id:g.string().min(1),label:g.string().min(1),effective_plan:kR,admin_override:kR.nullable(),stripe_subscription_status:g.string().nullable(),seat_quantity:g.number().int().positive()}),LNt=g.object({users:g.array(NG),organizations:g.array(NG)}),QNt=g.object({id:g.string().min(1),display_name:g.string().min(1),handle:g.string().nullable(),avatar_url:g.string().nullable()}),FNt=g.object({thread_id:g.string().min(1),title:g.string().min(1),author:QNt,last_active_at:g.string().datetime(),last_block_excerpt:g.string().nullable(),last_block_kind:g.string().min(1).nullable(),is_streaming:g.boolean()}),GNt=g.object({type:g.literal("list"),list_type:g.literal("live_thread"),objects:g.array(FNt)}),jNt=g.object({thread_id:g.string().min(1)}),zNt=g.object({thread_id:g.string().min(1),last_seen_at:g.string().datetime(),started_at:g.string().datetime()}),HNt=g.object({user_id:g.string().min(1),organization_id:g.string().min(1).nullable(),last_seen_at:g.string().datetime(),started_at:g.string().datetime()}),$Nt=g.object({follower_id:g.string().min(1),followee_id:g.string().min(1),is_following:g.literal(!0),follower_count:g.number().int().nonnegative()}),VNt=g.object({follower_id:g.string().min(1),followee_id:g.string().min(1),is_following:g.literal(!1),follower_count:g.number().int().nonnegative()}),_E=g.object({id:g.string().min(1),display_name:g.string().min(1),handle:g.string().nullable(),avatar_url:g.string().nullable(),bio:g.string().max(280).nullable(),is_following:g.boolean(),is_self:g.boolean()}),lQe=g.object({type:g.literal("list"),list_type:g.literal("user_follow"),objects:g.array(_E)}),qNt=_E.extend({mutuals:g.array(_E),mutual_count:g.number().int().nonnegative()}),YNt=g.object({type:g.literal("list"),list_type:g.literal("follow_suggestion"),objects:g.array(qNt)}),KNt=_E.extend({referred_at:g.string().min(1)}),JNt=g.object({type:g.literal("list"),list_type:g.literal("referral"),count:g.number().int().nonnegative(),recent:g.array(KNt)}),ZNt=g.object({date:g.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:g.number().int().nonnegative(),total:g.number().int().nonnegative()}),WNt=g.object({inviter:_E,organization_name:g.string().nullable(),referred_count:g.number().int().positive(),latest_referred_at:g.string().min(1)}),XNt=g.object({inviter:_E,referee:_E,attributed_at:g.string().min(1)}),eOt=g.object({total_referred_signups:g.number().int().nonnegative(),active_inviters:g.number().int().nonnegative(),referred_signups_last_30d:g.number().int().nonnegative(),total_signups_last_30d:g.number().int().nonnegative(),daily_counts:g.array(ZNt),top_inviters:g.array(WNt),recent_attributions:g.array(XNt)}),tOt=g.object({source:g.string().min(1),signups:g.number().int().nonnegative()}),nOt=g.object({sources:g.array(tOt),total_with_source:g.number().int().nonnegative(),total_without_source:g.number().int().nonnegative()}),rOt=g.object({date:g.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:g.number().int().nonnegative()}),oOt=g.object({window_start:g.string().datetime(),window_end:g.string().datetime(),total_contributions:g.number().int().nonnegative(),days_active:g.number().int().nonnegative(),daily_average:g.number().nonnegative(),current_streak_days:g.number().int().nonnegative(),days:g.array(rOt)}),iOt=g.object({type:g.literal("thread_created"),occurred_at:g.string().datetime(),id:g.string().min(1),thread:g.object({id:g.string().min(1),title:g.string(),visibility:g.enum(["private","workspace","public"])})}),aOt=g.object({type:g.literal("comment_posted"),occurred_at:g.string().datetime(),id:g.string().min(1),comment_excerpt:g.string(),thread:g.object({id:g.string().min(1),title:g.string(),visibility:g.enum(["private","workspace","public"])})}),sOt=g.object({type:g.literal("project_published"),occurred_at:g.string().datetime(),id:g.string().min(1),project:g.object({id:g.string().min(1),name:g.string().min(1)})}),uOt=g.object({type:g.literal("user_followed"),occurred_at:g.string().datetime(),id:g.string().min(1),followee:_E}),cOt=g.discriminatedUnion("type",[iOt,aOt,sOt,uOt]),lOt=g.object({type:g.literal("list"),list_type:g.literal("user_activity"),objects:g.array(cOt)}),dOt=g.object({id:g.string().min(1),name:g.string().min(1),excerpt:g.string(),published_at:g.string().datetime(),updated_at:g.string().datetime()}),pOt=g.object({type:g.literal("list"),list_type:g.literal("profile_published_project"),objects:g.array(dOt)}),dQe=g.object({id:g.string().min(1),published_at:g.string().datetime().nullable()}),fOt=g.enum(["avatar","banner"]),DQe=g.enum(["image/png","image/jpeg","image/webp","image/gif"]),AOt=g.object({kind:fOt,content_type:DQe,base64_data:g.string().min(1)}),mOt=g.object({substrate:g.enum(["s3","filesystem"]),storage_url:g.string().min(1)}),gOt=g.object({content_type:DQe,base64_data:g.string().min(1)}),hOt=g.object({cover_status:wne,cover_url:g.string().min(1),cover_url_expires_at:g.string().min(1),cover_generated_at:g.string().min(1)}),_Ot=mQe,MG=VDt.router({health:{method:"GET",path:"/health",responses:{200:g.object({status:g.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:g.object({status:g.enum(["ok","degraded"]),environment:g.string(),checks:g.object({database:g.object({ok:g.boolean(),latencyMs:g.number().int().nonnegative().optional(),error:g.string().optional()}),migrations:g.object({ok:g.boolean(),appliedCount:g.number().int().nonnegative(),pendingCount:g.number().int().nonnegative(),latestApplied:g.string().optional(),pending:g.array(g.string())}),storage:g.object({ok:g.boolean(),bucket:g.string().optional(),error:g.string().optional()})})}),503:g.object({status:g.literal("down"),environment:g.string(),error:g.string()})},summary:"Diagnostic health check covering database connectivity, migration drift, and storage reachability. Used by smoke tests and operators; NOT wired into Railway healthcheckPath."},whoAmI:{method:"GET",path:"/whoami",headers:g.object({authorization:g.string().min(1).optional(),"x-lore-referral-token":g.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":g.string().min(1).max(40).optional(),"user-agent":g.string().min(1).max(1024).optional()}),responses:{200:XDt,401:H,500:H,502:H},summary:"Validate a WorkOS Bearer token and return member plus user fields"},getCliAuthConfig:{method:"GET",path:"/cli-auth/config",responses:{200:e1t,503:H},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getCliStatus:{method:"GET",path:"/users/me/cli-status",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:z1t,401:H},summary:"Return whether the viewer has connected the Lore CLI (i.e., uploaded any thread under a non-unspecified harness), plus the latest upload timestamp."},recordHeartbeat:{method:"POST",path:"/heartbeat",headers:g.object({authorization:g.string().min(1).optional()}),body:jNt,responses:{200:zNt,401:H,403:H,404:H,422:H},summary:"Record (or refresh) a presence heartbeat for the authenticated user against one of their own threads. Idempotent; the daemon should call this every ~30s while a session is open."},recordProductPresence:{method:"POST",path:"/users/me/presence",headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:HNt,401:H},summary:"Record (or refresh) an authenticated Lore web-app presence heartbeat for the current user. Browser clients call this while the product is open."},listLiveThreads:{method:"GET",path:"/threads/live",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:GNt,401:H,403:H},summary:"List people with user-block activity in the last 10 minutes. Includes the viewer\u2019s workspace and followed authors, deduped per author, max 10."},listThreads:{method:"GET",path:"/threads",headers:g.object({authorization:g.string().min(1).optional()}),query:zBt,responses:{200:sQe,401:H},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:g.object({authorization:g.string().min(1).optional()}),body:DBt,responses:{201:BBt,401:H},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:iw,404:H},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:sQe,404:H,409:H},summary:"List the top 20 visible threads with the closest summary embedding"},resolveThreadShareHighlight:{method:"POST",path:"/threads/:id/share-highlight",pathParams:g.object({id:g.string().min(1).describe("Thread id to share")}),headers:g.object({authorization:g.string().min(1).optional()}),body:RBt,responses:{200:xBt,401:H,404:H,409:H},summary:"Resolve a natural-language share highlight to a canonical /thread URL with block anchors"},askThreads:{method:"POST",path:"/threads/ask",headers:g.object({authorization:g.string().min(1).optional()}),body:hBt,responses:{200:yBt,401:H},summary:"Answer a question from the top 20 visible decision matches, grouped back into threads"},forkThread:{method:"POST",path:"/threads/:id/fork",pathParams:g.object({id:g.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:g.object({authorization:g.string().min(1).optional()}),body:mBt,responses:{200:gBt,403:H,404:H},summary:"Generate a distilled source handoff for continuing a visible coding-assistant session"},listThreadBlocks:{method:"GET",path:"/threads/:id/blocks",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),query:jBt,responses:{200:One,401:H},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:g.object({threadId:g.string().min(1),blockId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:y1t,responses:{201:T1t,401:H,404:H},summary:"Create a new block-level comment thread on a visible thread block"},createThreadBlockComment:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId/comments",pathParams:g.object({threadId:g.string().min(1),blockId:g.string().min(1),commentThreadId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:b1t,responses:{201:v1t,401:H,404:H,409:H},summary:"Reply to a block-level comment thread on a visible thread block"},updateThreadBlockCommentThread:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId",pathParams:g.object({threadId:g.string().min(1),blockId:g.string().min(1),commentThreadId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:D1t,responses:{200:B1t,401:H,404:H},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:qBt,401:H},summary:"Aggregate skill usage across threads the viewer can see"},getSkillDetail:{method:"GET",path:"/skills/:name",pathParams:g.object({name:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:KBt,401:H,404:H},summary:"Per-skill detail: usage stats + visible threads that invoked it"},getSkillRaw:{method:"GET",path:"/skills/:name/raw",pathParams:g.object({name:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:g.string(),401:H,403:H,404:H},summary:"Raw SKILL.md body for a skill (download / install path)"},publishSkill:{method:"PUT",path:"/skills/:name",pathParams:g.object({name:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:JBt,responses:{200:ZBt,401:H,403:H,422:H},summary:"Publish or capture a skill body for the caller\u2019s workspace"},redactThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/redactions",pathParams:g.object({threadId:g.string().min(1),blockId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:HBt,responses:{200:ow,401:H,403:H,404:H,422:H},summary:"Permanently redact a character range within a text field of a thread block (author only)"},updateThreadBlockText:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/text",pathParams:g.object({threadId:g.string().min(1),blockId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:WBt,responses:{200:ow,401:H,403:H,404:H,422:H},summary:"Replace a single text leaf in a thread block with new content (author only)"},critiqueThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/critique",pathParams:g.object({threadId:g.string().min(1),blockId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:ow,401:H,403:H,404:H,409:H,422:H},summary:"Critique a plan block once and persist its annotations as nested comment threads (author only)"},listThreadBlockEdits:{method:"GET",path:"/threads/:threadId/blocks/:blockId/edits",pathParams:g.object({threadId:g.string().min(1),blockId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:tNt,401:H,404:H},summary:"List edits made to a thread block (visible to anyone who can see the thread)"},listThreadDecisions:{method:"GET",path:"/threads/:id/decisions",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:ABt,401:H,404:H},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:NBt,responses:{200:iw,401:H,403:H,404:H},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{204:g.null(),401:H,403:H,404:H},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:g.object({cover_status:wne,how_to_status:CQe}),401:H,403:H,404:H,429:H.extend({retry_after_seconds:g.number().int().nonnegative()})},summary:"Enqueue cover image + how-to recipe generation for the thread. Author-only. Idempotent \u2014 recently-fired statuses are not double-enqueued. Rate-limited: at most one cover generation per minute per thread (cooldown begins when the previous cover finishes). Used to populate cards on legacy threads (created before Lore Cards) and to retry after a 'failed' status or opt back in from 'disabled'."},uploadThreadCover:{method:"POST",path:"/threads/:id/card/cover/upload",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:gOt,responses:{200:hOt,401:H,403:H,404:H,413:H,422:H},summary:"Upload a custom cover image for a thread. Author or Tanagram admin only. Bytes go to the same storage substrate the AI cover uses (S3 in prod, filesystem in dev), and the threads row is updated atomically with the new cover_storage_url, cover_status='ready', cover_generated_at=now, cover_model='user-uploaded' so subsequent re-rolls / how-to fan-outs treat the upload like any other ready cover."},castThreadVote:{method:"PUT",path:"/threads/:id/vote",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:J1t,responses:{200:aQe,401:H,403:H,404:H,422:H},summary:"Cast or change the caller's up/down vote on a public thread. Idempotent \u2014 re-casting the same value is a no-op."},clearThreadVote:{method:"DELETE",path:"/threads/:id/vote",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:aQe,401:H,404:H},summary:"Clear the caller's vote on a thread. No-op when the caller hasn't voted."},listThreadComments:{method:"GET",path:"/threads/:threadId/comments",pathParams:g.object({threadId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:W1t,403:H,404:H},summary:"List all (live + soft-deleted as tombstones) comments on a public thread, flat with parent_comment_id pointers."},createThreadComment:{method:"POST",path:"/threads/:threadId/comments",pathParams:g.object({threadId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:X1t,responses:{201:eBt,401:H,403:H,404:H,422:H},summary:"Post a top-level or reply comment on a public thread."},updateThreadComment:{method:"PATCH",path:"/threads/:threadId/comments/:commentId",pathParams:g.object({threadId:g.string().min(1),commentId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:tBt,responses:{200:nBt,401:H,403:H,404:H,422:H},summary:"Edit your own thread comment (author only; rejects edits to soft-deleted rows)."},deleteThreadComment:{method:"DELETE",path:"/threads/:threadId/comments/:commentId",pathParams:g.object({threadId:g.string().min(1),commentId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:rBt,401:H,403:H,404:H},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:g.object({id:g.string().min(1)}),responses:{200:OBt,404:H},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:mQe,404:H},summary:"Public profile for a user. Optional auth \u2014 unauthenticated viewers see only public thread metadata; signed-in viewers see counts scoped to the threads they'd normally be able to access."},updateCurrentUser:{method:"PATCH",path:"/users/me",headers:g.object({authorization:g.string().min(1).optional()}),body:t1t,responses:{200:AQe,401:H,409:H,422:H},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:g.object({handle:pQe}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:_Ot,404:H},summary:"Resolve a public profile by handle \u2014 same shape as GET /users/:id but keyed on the user's chosen handle."},listMyReferrals:{method:"GET",path:"/users/me/referrals",headers:g.object({authorization:g.string().min(1)}),responses:{200:JNt,401:H},summary:"Total count plus the most-recent referees the authenticated user has attributed via `/?invited_by=\u2026` invite links. Mirrors the inviter side of users.referred_by_user_id."},listUserActivity:{method:"GET",path:"/users/:id/activity",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),query:g.object({limit:g.coerce.number().int().positive().max(100).optional()}),responses:{200:lOt,404:H},summary:"Reverse-chronological activity feed for a user, scoped to what the viewer can see (same visibility rules as listThreads)."},getUserContributions:{method:"GET",path:"/users/:id/contributions",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:oOt,404:H},summary:"Daily contribution counts for the trailing 365 days \u2014 counts thread blocks the user authored on threads visible to the viewer."},listUserFollowers:{method:"GET",path:"/users/:id/followers",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:lQe,404:H},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:lQe,404:H},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:YNt,404:H},summary:"Mutual-follow suggestions for a viewer: walks the viewer's followees one hop further and ranks candidates by mutual count. Replaces a 1 \u2192 24 client-side fan-out across `/users/:seed/following`."},followUser:{method:"POST",path:"/users/:id/follow",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:$Nt,401:H,404:H,409:H,422:H},summary:"Follow another user. Idempotent \u2014 repeating the call is a no-op."},unfollowUser:{method:"DELETE",path:"/users/:id/follow",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:VNt,401:H,404:H},summary:"Unfollow a user. Idempotent \u2014 repeating the call is a no-op."},listProfilePublishedProjects:{method:"GET",path:"/users/:id/projects",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:pOt,404:H},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:dQe,401:H,403:H,404:H},summary:"Publish a project to the author's public profile. Stamps published_at with `now()`. Author-only."},unpublishProject:{method:"DELETE",path:"/projects/:id/publish",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:dQe,401:H,403:H,404:H},summary:"Remove a project from the author's public profile."},uploadProfileImage:{method:"POST",path:"/users/me/profile-image",headers:g.object({authorization:g.string().min(1).optional()}),body:AOt,responses:{200:mOt,401:H,413:H,422:H},summary:"Upload an avatar or banner image (base64-encoded JSON body). The API streams the bytes to its configured storage substrate using its own credentials and returns the canonical storage URL the client passes to PATCH /users/me."},listOrganizationMembers:{method:"GET",path:"/organization/members",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:r1t,401:H},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:g.object({authorization:g.string().min(1).optional()}),body:o1t,responses:{201:i1t,401:H,403:H,409:H,422:H},summary:"Invite a teammate to the authenticated user\u2019s workspace via WorkOS AuthKit"},ensureWorkOSOrganization:{method:"POST",path:"/organization/workos/ensure",headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:a1t,401:H,422:H,503:H},summary:"Create or reuse a WorkOS organization for the authenticated user\u2019s non-public email domain and add the user as a member."},listRepositories:{method:"GET",path:"/repositories",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:F1t,401:H,403:H},summary:"List repositories known to the authenticated user\u2019s organization across threads and building blocks"},createBuildingBlockSnapshots:{method:"POST",path:"/building_blocks",headers:g.object({authorization:g.string().min(1).optional()}),body:A1t,responses:{201:k1t,401:H,403:H},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:O1t,401:H,403:H,404:H},summary:"Load a thread-backed plan container visible to the authenticated user, including all visible plan revisions in that thread (only the latest revision carries body + prosemirror_json; older revisions are metadata-only and load on demand via getPlanRevision)"},getPlanRevision:{method:"GET",path:"/plans/:id/revisions/:revisionId",pathParams:g.object({id:g.string().min(1),revisionId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:N1t,401:H,403:H,404:H},summary:"Load a single revision body + prosemirror_json + comment threads for a thread-backed plan container. Used to fetch non-latest revisions on demand without paying for every revision when the plan is first opened"},createPlanCommentThread:{method:"POST",path:"/plans/:id/comment-threads",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:E1t,responses:{201:S1t,401:H,403:H,404:H,422:H},summary:"Create a new inline comment thread on a specific revision inside a thread-backed plan container"},createPlanComment:{method:"POST",path:"/plans/:id/comment-threads/:threadId/comments",pathParams:g.object({id:g.string().min(1),threadId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:I1t,responses:{201:C1t,401:H,403:H,404:H,409:H},summary:"Reply to an inline comment thread on a thread-backed plan container"},updatePlanCommentThread:{method:"PATCH",path:"/plans/:id/comment-threads/:threadId",pathParams:g.object({id:g.string().min(1),threadId:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:R1t,responses:{200:x1t,401:H,403:H,404:H},summary:"Resolve or reopen an inline comment thread on a thread-backed plan container"},listPlans:{method:"GET",path:"/plans",headers:g.object({authorization:g.string().min(1).optional()}),query:M1t,responses:{200:w1t,401:H,403:H},summary:"List thread-backed plan containers visible to the authenticated user in their organization, ordered by latest visible revision and optionally filtered by author or repository"},listBuildingBlockSnapshots:{method:"GET",path:"/building_blocks",headers:g.object({authorization:g.string().min(1).optional()}),query:U1t,responses:{200:P1t,401:H,403:H},summary:"List building block snapshots for the authenticated user\u2019s organization and repo origin path"},listUploadSessions:{method:"GET",path:"/upload_sessions",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:GBt,401:H},summary:"List recent upload sessions for the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({thread_files:g.array(V1t).nonempty()}),responses:{201:vBt,400:H,401:H},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({thread_files:g.array(TBt).nonempty()}),responses:{200:CBt,400:H,401:H,404:H,409:H,422:H},summary:"Complete an upload session after files have been uploaded to storage"},adminStats:{method:"GET",path:"/admin/stats",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:nNt,401:H,403:H},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:oNt,401:H,403:H},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:aNt,headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:cNt,401:H,403:H},summary:"List every user with their org memberships and thread count. Tanagram admins only."},adminListThreads:{method:"GET",path:"/admin/threads",headers:g.object({authorization:g.string().min(1).optional()}),query:fNt,responses:{200:pNt,401:H,403:H},summary:"List live threads across every organization. Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:g.object({authorization:g.string().min(1).optional()}),query:ANt,responses:{200:dNt,400:H,401:H,403:H,404:H},summary:"Look up a thread by thread id, thread file id, or harness session id. Tanagram admins only."},adminForceFollow:{method:"POST",path:"/admin/connections/follow",headers:g.object({authorization:g.string().min(1).optional()}),body:sNt,responses:{200:uNt,401:H,403:H,404:H,422:H},summary:"Force follower->followee edge. Admin-only and non-destructive."},adminHardDeleteThread:{method:"DELETE",path:"/admin/threads/:id",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{204:g.null(),401:H,403:H,404:H},summary:"Permanently remove a thread. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:g.object({id:g.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{200:mNt,401:H,403:H,404:H},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:g.object({limit:g.coerce.number().int().min(1).max(48).optional()}),responses:{200:pBt},summary:"Slim feed of public threads with a ready cover image, ordered by cover_generated_at descending. Powers the landing-page UGC card scroll. Returns presigned cover URLs inline so the grid renders without a follow-up round trip per card."},listDiscoverThreads:{method:"GET",path:"/discover/threads",headers:g.object({authorization:g.string().min(1).optional()}),query:LBt,responses:{200:UBt},summary:"Feed of public threads with sort, harness filter, search, and cursor pagination. Auth is optional and populates viewer_vote."},discoverStats:{method:"GET",path:"/discover/stats",responses:{200:QBt},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:s1t,responses:{201:l1t,409:H},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},createRecruitingInterest:{method:"POST",path:"/recruiting_interests",body:c1t,responses:{201:g.object({})},summary:"Record recruiting interest (target profile or demo request) and notify via Slack."},createFeedback:{method:"POST",path:"/feedback",headers:g.object({authorization:g.string().min(1).optional()}),body:d1t,responses:{201:p1t,401:H,422:H,429:H},summary:"Submit in-app feedback. Persists to lore.feedback_entries and best-effort posts to the #lore-feedback Slack channel. Rate-limited to 30 submissions/hour per user."},createShareToken:{method:"POST",path:"/threads/:id/share-token",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({}).optional(),responses:{201:uQe,401:H,403:H,404:H,409:H},summary:"Mint a short share-link token for a public thread. Author only. The token powers `/s/:token` short URLs and enables k-factor attribution."},resolveShareToken:{method:"GET",path:"/referrals/resolve/:token",pathParams:g.object({token:g.string().min(1).max(16)}),headers:g.object({authorization:g.string().min(1).optional()}),query:gNt,responses:{200:uQe,404:H},summary:"Resolve a share-link token to its thread and record the view. Works for signed-out viewers; if a bearer token is present we attribute the view to that Lore user for analytics."},adminGrowth:{method:"GET",path:"/admin/growth",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:ENt,401:H,403:H},summary:"Share-link k-factor, funnel, sparkline, and top sharers by window. Tanagram admins only."},adminActiveUsers:{method:"GET",path:"/admin/active-users",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:SNt,401:H,403:H},summary:"DAU/WAU/MAU/all-time active-user buckets \u2014 union of oauth token issuance and thread-event spine. Tanagram admins only."},adminReferrals:{method:"GET",path:"/admin/referrals",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:eOt,401:H,403:H},summary:"Cross-organization invite-link funnel: lifetime + 30-day counts, 60-day daily timeseries, top inviters, recent attributions. Tanagram admins only."},adminOnboardingSources:{method:"GET",path:"/admin/onboarding/sources",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:nOt,401:H,403:H},summary:"Signed-up persons grouped by PostHog `initial_source` first-touch attribution. Powers bucket 1 of /admin's Onboarding flow tab; sourced via HogQL."},adminRunCritiquePlayground:{method:"POST",path:"/admin/critique-playground/run",headers:g.object({authorization:g.string().min(1).optional()}),body:CNt,responses:{200:bNt,401:H,403:H,409:H},summary:"Admin-only critique playground that saves markdown to a file:// plan artifact and returns parsed + critiqued plan blocks."},adminListEmailTemplates:{method:"GET",path:"/admin/email-templates",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:xNt,401:H,403:H},summary:"List transactional email templates and their editable preview fields. Tanagram admins only."},adminPreviewEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/preview",pathParams:g.object({id:g.string().min(1).describe("Email template id.")}),headers:g.object({authorization:g.string().min(1).optional()}),body:DNt,responses:{200:BNt,400:H,401:H,403:H,404:H},summary:"Render a transactional email template with supplied values. Tanagram admins only."},adminSendEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/send",pathParams:g.object({id:g.string().min(1).describe("Email template id.")}),headers:g.object({authorization:g.string().min(1).optional()}),body:NNt,responses:{200:ONt,400:H,401:H,403:H,404:H,503:H},summary:"Send a transactional email template through Resend. Tanagram admins only."},getBillingState:{method:"GET",path:"/billing/state",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:wNt,401:H},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:g.object({authorization:g.string().min(1).optional()}),body:MNt,responses:{200:kNt,400:H,401:H,403:H,503:H},summary:"Start a Stripe Checkout session for Creator ($29/mo) or Team ($19/seat/mo, min 2)."},createBillingPortal:{method:"POST",path:"/billing/portal",headers:g.object({authorization:g.string().min(1).optional()}),body:g.object({subject_type:g.enum(["user","organization"]).default("user")}).optional(),responses:{200:PNt,401:H,404:H,503:H},summary:"Open the Stripe customer portal so the subject can manage their subscription."},updateTeamSeats:{method:"PATCH",path:"/billing/team-seats",headers:g.object({authorization:g.string().min(1).optional()}),body:UNt,responses:{200:Bne,400:H,401:H,403:H,404:H,503:H},summary:"Adjust the caller-organization's Team seat quantity (admin of that org only)."},adminListBilling:{method:"GET",path:"/admin/billing",headers:g.object({authorization:g.string().min(1).optional()}),responses:{200:LNt,401:H,403:H},summary:"List every user and org with current plan + override for the admin panel."},adminSetUserPlanOverride:{method:"PUT",path:"/admin/billing/users/:id/override",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:cQe,responses:{200:NG,401:H,403:H,404:H},summary:"Admin override for a user's plan tier. Null clears the override."},adminSetOrganizationPlanOverride:{method:"PUT",path:"/admin/billing/organizations/:id/override",pathParams:g.object({id:g.string().min(1)}),headers:g.object({authorization:g.string().min(1).optional()}),body:cQe,responses:{200:NG,401:H,403:H,404:H},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:VLe,regions:JLe,docs:HLe,mentions:ZLe,favorites:eQe,search:nQe,slack:rQe},{pathPrefix:"/api"})});import qd from"node:fs";import EOt from"node:path";function kne(e){return EOt.join(e,"tokens.json")}function SOt(e,t){let n;try{n=JSON.parse(e)}catch(o){throw new Error(`tokens file at ${t} is not valid JSON: ${o.message}`)}let r=kG.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return r.data}function yOt(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function BQe(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function NQe(e){let t=kne(e),n;try{n=qd.readFileSync(t,"utf8")}catch(r){if(BQe(r))return null;throw r}return SOt(n,t)}function Pne(e,t){let n=kne(e);qd.mkdirSync(e,{recursive:!0,mode:448}),qd.chmodSync(e,448);let r=yOt(n),o=JSON.stringify(kG.parse(t)),i;try{i=qd.openSync(r,"w",384),qd.writeSync(i,o),qd.fchmodSync(i,384),qd.fsyncSync(i),qd.closeSync(i),i=void 0,qd.renameSync(r,n)}catch(a){if(i!==void 0)try{qd.closeSync(i)}catch{}try{qd.unlinkSync(r)}catch{}throw a}}function Une(e){try{qd.rmSync(kne(e))}catch(t){if(BQe(t))return;throw t}}var kG,Lne=O(()=>{"use strict";A();cf();kG=g.object({access_token:g.string(),refresh_token:g.string(),expires_at:g.number().int(),scope:g.string().default("")})});import wQe from"node:fs";import Fne from"node:os";import MQe from"node:path";function kQe(e=Fne.homedir()){return MQe.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function Gne(e){let t=e.split(".");if(t.length<2||!t[1])return null;let n;try{n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}catch{return null}if(typeof n!="object"||n===null)return null;let r=n.exp;return typeof r=="number"?r*1e3:null}function Qne(e){let t;try{t=wQe.readFileSync(e,"utf8")}catch(n){if(typeof n=="object"&&n!==null&&"code"in n&&n.code==="ENOENT")return null;throw n}return t.trim()}function TOt(e){let t=Qne(`${e}/token`);if(!t)return null;let n=Qne(`${e}/refresh_token`)??"";return{access_token:t,refresh_token:n,expires_at:Gne(t)??0,scope:""}}function IOt(e){let t=Qne(e);if(t===null||t==="")return null;try{return kG.parse(JSON.parse(t))}catch{return null}}function OQe(e){try{wQe.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function PQe(e,t=Fne.homedir()){return TOt(e)??IOt(kQe(t))}function aw(e,t=Fne.homedir()){for(let n of COt)OQe(MQe.join(e,n));OQe(kQe(t))}var COt,UQe=O(()=>{"use strict";A();Lne();COt=["token","refresh_token"]});var LQe=O(()=>{"use strict";A();Lne();UQe()});import QQe from"node:os";import jA from"node:path";function Bi(){let e=ea()==="dev"?".lore-dev":".lore";return jA.join(QQe.homedir(),e)}function Yd(){return jA.join(Bi(),"log.txt")}function jne(){return jA.join(Bi(),"sync_state.json")}function Mg(){return jA.join(Bi(),"upload_filters.json")}function PR(){return jA.join(Bi(),"upload_dirs.json")}function PG(){return jA.join(Bi(),"status.json")}function Gy(){return jA.join(Bi(),"install_source.json")}function UG(){return jA.join(Bi(),"skill_sync_state.json")}function jy(){return jA.join(Bi(),"bin","lore")}function sw(){let e=ea();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function UR(){return jA.join(QQe.homedir(),"Library","LaunchAgents",`${sw()}.plist`)}var ya=O(()=>{"use strict";A();kl()});import EE from"node:fs";import LG from"node:path";function uw(){let e=Bi(),t;try{t=NQe(e)}catch{t=null}if(t)return t;let n=PQe(e);return n?(Pne(e,n),aw(e),n):null}function zne(){return LG.join(Bi(),"analytics_distinct_id")}function FQe(){let e;try{e=EE.readFileSync(zne(),"utf8")}catch(n){if(n&&typeof n=="object"&&"code"in n&&n.code==="ENOENT")return null;throw n}let t=e.trim();return t.length>0?t:null}function GQe(e){let t=zne();EE.mkdirSync(LG.dirname(t),{recursive:!0,mode:448}),EE.writeFileSync(t,e,{mode:384})}function jQe(){try{EE.rmSync(zne())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function Hne(){return LG.join(Bi(),"analytics_person_properties.json")}function zQe(){let e;try{e=EE.readFileSync(Hne(),"utf8")}catch(t){if(t&&typeof t=="object"&&"code"in t&&t.code==="ENOENT")return null;throw t}try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function HQe(e){let t=Hne();EE.mkdirSync(LG.dirname(t),{recursive:!0,mode:448}),EE.writeFileSync(t,JSON.stringify(e),{mode:384})}function $Qe(){try{EE.rmSync(Hne())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function QG(){let e=uw()?.access_token.trim()??"";return!e||BOt(e,new Date,bOt)?{token:"",source:"none"}:{token:e,source:"file"}}function VQe(){return uw()?.refresh_token.trim()??""}function qQe(){return!!uw()?.access_token}function YQe(e){let t=Bi();Pne(t,e),aw(t)}function LR(e){let t=uw();YQe({access_token:e,refresh_token:t?.refresh_token??"",expires_at:Gne(e)??0,scope:t?.scope??""})}function FG(e){let t=uw();YQe({access_token:t?.access_token??"",refresh_token:e,expires_at:t?.expires_at??0,scope:t?.scope??""})}function KQe(){Une(Bi()),aw(Bi())}function JQe(){Une(Bi()),aw(Bi())}function ROt(e,t){return new URL(t,e).toString()}async function xOt(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function DOt(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Token refresh failed"}async function ZQe({clientId:e,refreshToken:t,workosApiOrigin:n,fetch:r=globalThis.fetch}){let o=await r(ROt(n,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:vOt,refresh_token:t,client_id:e})}),i=await xOt(o);if(!o.ok)throw new Error(DOt(i));return i}function cw(e){let t=e.split(".");if(t.length<2)throw new Error("invalid JWT format");return JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}function BOt(e,t,n=0){let r;try{r=cw(e)}catch{return!1}return typeof r.exp!="number"?!1:t.getTime()+n>=r.exp*1e3}var bOt,vOt,zy=O(()=>{"use strict";A();LQe();ya();bOt=10*1e3;vOt="refresh_token"});import XQe from"node:fs";function NOt(){let e=Bi();WQe!==e&&(XQe.mkdirSync(e,{recursive:!0}),WQe=e)}function OOt(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function wOt(e,t,n){let r=`${new Date().toISOString()} ${e} ${t}`;if(!n)return`${r}
105
105
  `;let o=Object.entries(n).map(([i,a])=>`${i}=${OOt(a)}`).join(" ");return o?`${r} ${o}
106
106
  `:`${r}
107
- `}function $ne(e,t,n){try{let r=wOt(e,t,n);NOt(),XQe.appendFileSync(Yd(),r),ea()==="dev"&&process.stderr.write(r)}catch{}MOt(e,t,n)}function MOt(e,t,n){try{AN[e](t,kOt(n))}catch{}}function kOt(e){if(!e)return;let t={};for(let[n,r]of Object.entries(e))if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){t[n]=r;continue}try{t[n]=JSON.stringify(r)}catch{t[n]=String(r)}}return t}var WQe,_e,jr=O(()=>{"use strict";A();Kv();kl();ya();WQe=null;_e={info(e,t){$ne("info",e,t)},warn(e,t){$ne("warn",e,t)},error(e,t){$ne("error",e,t)}}});import{setTimeout as POt}from"node:timers/promises";async function GG(e,t){let n=t.limit??UOt,r=t.baseMs??e4e,o=t.maxMs??t4e,i=t.sleep??POt,a=t.logEvent??"fetch_retry";for(let c=0;c<=n;c+=1){let d=c===n;try{return await e()}catch(m){if(!t.isRetryableError(m)||d)throw m;_e.warn(a,{attempt:c+1,reason:t.describeRetryReason?.(m)??"retryable_error",...t.logFields})}await i(LOt(c,{baseMs:r,maxMs:o}))}throw new Error("fetchWithRetry: unreachable")}function LOt(e,{baseMs:t=e4e,maxMs:n=t4e}={}){let r=Math.min(t*2**e,n),o=Math.floor(r/2);return o+Math.floor(Math.random()*o)}function jG(e){return e instanceof TypeError?e.message==="fetch failed"||e.message==="terminated":!1}function lw(e){return r4e(e,QOt)}function n4e(e){return r4e(e,FOt)}function r4e(e,t){if(!jG(e))return!1;let n=e.cause;if(!(n instanceof Error))return!1;let r=n.code;return typeof r=="string"&&t.has(r)}function zG(e){if(!jG(e))return"unknown";let t=e.cause;if(!(t instanceof Error))return"unknown";let n=t.code;return typeof n=="string"?`${t.name}:${n}`:t.name}var UOt,e4e,t4e,QOt,FOt,HG=O(()=>{"use strict";A();jr();UOt=5,e4e=1e3,t4e=16e3;QOt=new Set(["UND_ERR_CONNECT_TIMEOUT","ENOTFOUND","EAI_AGAIN","ECONNREFUSED"]),FOt=new Set(["ECONNRESET","ETIMEDOUT"])});function zOt(e){let t=process.env.LORE_TARGET?.trim();return t&&jOt.has(t)?t:e}function QR(e=ea(),t=process.env.LORE_API_ORIGIN){let n=t?.trim();return n?n.replace(/\/$/,""):GOt[zOt(e)]}function i4e(e){let t=bc();if(!t||t.spanContext().traceFlags!==1)return e;let n=__({span:t});return!n["sentry-trace"]&&!n.baggage?e:{...e,...!e["sentry-trace"]&&n["sentry-trace"]?{"sentry-trace":n["sentry-trace"]}:{},...!e.baggage&&n.baggage?{baggage:n.baggage}:{}}}async function HOt(){let e=await fetch(`${QR()}/api/cli-auth/config`,{headers:i4e({})});return e.ok?await e.json():null}async function $Ot(){let e=VQe();if(!e)return"";$G||($G=(async()=>{let t=await HOt();if(!t)return"";let n=await ZQe({clientId:t.workos_client_id,refreshToken:e,workosApiOrigin:t.workos_api_origin});return LR(n.access_token),n.refresh_token&&FG(n.refresh_token),n.access_token})().finally(()=>{$G=void 0}));try{return await $G}catch{return""}}function o4e(e){try{let t=cw(e);typeof t.sub=="string"&&QU({id:t.sub,...typeof t.email=="string"?{email:t.email}:{}})}catch{}}async function hr(){let e=QG().token;if(e)return o4e(e),e;let t=await $Ot();return t&&o4e(t),t}function cn(e={}){let t=e.token;return nZ(MG,{baseUrl:QR(),baseHeaders:{"User-Agent":E2e(),...t?{authorization:`Bearer ${t}`}:{}},api:async n=>{let r=i4e(n.headers);if(t===void 0){let i=await hr();i&&!r.authorization&&(r={...r,authorization:`Bearer ${i}`})}let o=n.method.toUpperCase()==="GET";return GG(()=>tZ({...n,headers:r}),{isRetryableError:o?i=>lw(i)||n4e(i):lw,describeRetryReason:i=>`network:${zG(i)}`,logEvent:"api_request_retry",logFields:{method:n.method,path:n.path}})}})}var GOt,jOt,$G,Jo=O(()=>{"use strict";A();DG();kA();Kv();zy();kl();HG();GOt={dev:"http://localhost:4000","dev-shared":"https://lore-api.dev.tanagram.ai",prod:"https://lore-api.tanagram.ai"},jOt=new Set(["dev","dev-shared","prod"])});function Ni(e){return e instanceof Error?e.message:String(e)}function Yr(e,t){return e!==null&&typeof e=="object"&&"code"in e&&e.code===t}function dw(){throw new dt("")}var dt,FR,_r=O(()=>{"use strict";A();dt=class extends Error{constructor(t){super(t),this.name="CLIError"}},FR=class extends dt{billingUrl;serverMessage;constructor(t){let n=t.serverMessage.trim(),r=n.replace(/\.+$/,""),o=r?`: ${r}`:"";super(`${t.action} blocked by your billing plan${o}. Manage or upgrade your plan: ${t.billingUrl}`),this.name="BillingBlockedError",this.billingUrl=t.billingUrl,this.serverMessage=n}}});function d4e(e){return typeof e!="string"?!1:twt.has(e.trim().toLowerCase())}function cu(e={}){let t=e.stdout??process.stdout,n=e.stdin??process.stdin,r=e.env??process.env;return!((e.rawArgs??process.argv.slice(2)).includes(p4e)||d4e(r.LORE_NO_TUI)||d4e(r.CI)||r.TERM==="dumb"||!t?.isTTY||!n?.isTTY)}function f4e(e){return e.filter(t=>t!==p4e)}var p4e,twt,SE=O(()=>{"use strict";A();p4e="--no-tui",twt=new Set(["1","true","yes","on"])});var C4e=F(_n=>{"use strict";A();var Xne=Symbol.for("react.transitional.element"),nwt=Symbol.for("react.portal"),rwt=Symbol.for("react.fragment"),owt=Symbol.for("react.strict_mode"),iwt=Symbol.for("react.profiler"),awt=Symbol.for("react.consumer"),swt=Symbol.for("react.context"),uwt=Symbol.for("react.forward_ref"),cwt=Symbol.for("react.suspense"),lwt=Symbol.for("react.memo"),_4e=Symbol.for("react.lazy"),dwt=Symbol.for("react.activity"),A4e=Symbol.iterator;function pwt(e){return e===null||typeof e!="object"?null:(e=A4e&&e[A4e]||e["@@iterator"],typeof e=="function"?e:null)}var E4e={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S4e=Object.assign,y4e={};function jR(e,t,n){this.props=e,this.context=t,this.refs=y4e,this.updater=n||E4e}jR.prototype.isReactComponent={};jR.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function T4e(){}T4e.prototype=jR.prototype;function ere(e,t,n){this.props=e,this.context=t,this.refs=y4e,this.updater=n||E4e}var tre=ere.prototype=new T4e;tre.constructor=ere;S4e(tre,jR.prototype);tre.isPureReactComponent=!0;var m4e=Array.isArray;function Wne(){}var So={H:null,A:null,T:null,S:null},I4e=Object.prototype.hasOwnProperty;function nre(e,t,n){var r=n.ref;return{$$typeof:Xne,type:e,key:t,ref:r!==void 0?r:null,props:n}}function fwt(e,t){return nre(e.type,t,e.props)}function rre(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xne}function Awt(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var g4e=/\/+/g;function Zne(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Awt(""+e.key):t.toString(36)}function mwt(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Wne,Wne):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function GR(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Xne:case nwt:a=!0;break;case _4e:return a=e._init,GR(a(e._payload),t,n,r,o)}}if(a)return o=o(e),a=r===""?"."+Zne(e,0):r,m4e(o)?(n="",a!=null&&(n=a.replace(g4e,"$&/")+"/"),GR(o,t,n,"",function(m){return m})):o!=null&&(rre(o)&&(o=fwt(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(g4e,"$&/")+"/")+a)),t.push(o)),1;a=0;var c=r===""?".":r+":";if(m4e(e))for(var d=0;d<e.length;d++)r=e[d],i=c+Zne(r,d),a+=GR(r,t,n,i,o);else if(d=pwt(e),typeof d=="function")for(e=d.call(e),d=0;!(r=e.next()).done;)r=r.value,i=c+Zne(r,d++),a+=GR(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return GR(mwt(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function VG(e,t,n){if(e==null)return e;var r=[],o=0;return GR(e,r,"","",function(i){return t.call(n,i,o++)}),r}function gwt(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var h4e=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},hwt={map:VG,forEach:function(e,t,n){VG(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return VG(e,function(){t++}),t},toArray:function(e){return VG(e,function(t){return t})||[]},only:function(e){if(!rre(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_n.Activity=dwt;_n.Children=hwt;_n.Component=jR;_n.Fragment=rwt;_n.Profiler=iwt;_n.PureComponent=ere;_n.StrictMode=owt;_n.Suspense=cwt;_n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=So;_n.__COMPILER_RUNTIME={__proto__:null,c:function(e){return So.H.useMemoCache(e)}};_n.cache=function(e){return function(){return e.apply(null,arguments)}};_n.cacheSignal=function(){return null};_n.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=S4e({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!I4e.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var a=Array(i),c=0;c<i;c++)a[c]=arguments[c+2];r.children=a}return nre(e.type,o,r)};_n.createContext=function(e){return e={$$typeof:swt,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:awt,_context:e},e};_n.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)I4e.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var c=Array(a),d=0;d<a;d++)c[d]=arguments[d+2];o.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return nre(e,i,o)};_n.createRef=function(){return{current:null}};_n.forwardRef=function(e){return{$$typeof:uwt,render:e}};_n.isValidElement=rre;_n.lazy=function(e){return{$$typeof:_4e,_payload:{_status:-1,_result:e},_init:gwt}};_n.memo=function(e,t){return{$$typeof:lwt,type:e,compare:t===void 0?null:t}};_n.startTransition=function(e){var t=So.T,n={};So.T=n;try{var r=e(),o=So.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Wne,h4e)}catch(i){h4e(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),So.T=t}};_n.unstable_useCacheRefresh=function(){return So.H.useCacheRefresh()};_n.use=function(e){return So.H.use(e)};_n.useActionState=function(e,t,n){return So.H.useActionState(e,t,n)};_n.useCallback=function(e,t){return So.H.useCallback(e,t)};_n.useContext=function(e){return So.H.useContext(e)};_n.useDebugValue=function(){};_n.useDeferredValue=function(e,t){return So.H.useDeferredValue(e,t)};_n.useEffect=function(e,t){return So.H.useEffect(e,t)};_n.useEffectEvent=function(e){return So.H.useEffectEvent(e)};_n.useId=function(){return So.H.useId()};_n.useImperativeHandle=function(e,t,n){return So.H.useImperativeHandle(e,t,n)};_n.useInsertionEffect=function(e,t){return So.H.useInsertionEffect(e,t)};_n.useLayoutEffect=function(e,t){return So.H.useLayoutEffect(e,t)};_n.useMemo=function(e,t){return So.H.useMemo(e,t)};_n.useOptimistic=function(e,t){return So.H.useOptimistic(e,t)};_n.useReducer=function(e,t,n){return So.H.useReducer(e,t,n)};_n.useRef=function(e){return So.H.useRef(e)};_n.useState=function(e){return So.H.useState(e)};_n.useSyncExternalStore=function(e,t,n){return So.H.useSyncExternalStore(e,t,n)};_n.useTransition=function(){return So.H.useTransition()};_n.version="19.2.4"});var b4e=F((ln,qG)=>{"use strict";A();process.env.NODE_ENV!=="production"&&function(){function e(k,ee){Object.defineProperty(r.prototype,k,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",ee[0],ee[1])}})}function t(k){return k===null||typeof k!="object"?null:(k=On&&k[On]||k["@@iterator"],typeof k=="function"?k:null)}function n(k,ee){k=(k=k.constructor)&&(k.displayName||k.name)||"ReactClass";var Ce=k+"."+ee;ct[Ce]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",ee,k),ct[Ce]=!0)}function r(k,ee,Ce){this.props=k,this.context=ee,this.refs=bt,this.updater=Ce||Wt}function o(){}function i(k,ee,Ce){this.props=k,this.context=ee,this.refs=bt,this.updater=Ce||Wt}function a(){}function c(k){return""+k}function d(k){try{c(k);var ee=!1}catch{ee=!0}if(ee){ee=console;var Ce=ee.error,je=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return Ce.call(ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",je),c(k)}}function m(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Wo?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case Yt:return"Fragment";case Te:return"Profiler";case co:return"StrictMode";case Ar:return"Suspense";case xa:return"SuspenseList";case Qt:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case _t:return"Portal";case an:return k.displayName||"Context";case St:return(k._context.displayName||"Context")+".Consumer";case En:var ee=k.render;return k=k.displayName,k||(k=ee.displayName||ee.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case zn:return ee=k.displayName||null,ee!==null?ee:m(k.type)||"Memo";case rr:ee=k._payload,k=k._init;try{return m(k(ee))}catch{}}return null}function h(k){if(k===Yt)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===rr)return"<...>";try{var ee=m(k);return ee?"<"+ee+">":"<...>"}catch{return"<...>"}}function S(){var k=Ct.A;return k===null?null:k.getOwner()}function y(){return Error("react-stack-top-frame")}function C(k){if(Mi.call(k,"key")){var ee=Object.getOwnPropertyDescriptor(k,"key").get;if(ee&&ee.isReactWarning)return!1}return k.key!==void 0}function v(k,ee){function Ce(){To||(To=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ee))}Ce.isReactWarning=!0,Object.defineProperty(k,"key",{get:Ce,configurable:!0})}function x(){var k=m(this.type);return fu[k]||(fu[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function N(k,ee,Ce,je,Je,Ft){var vt=Ce.ref;return k={$$typeof:pt,type:k,key:ee,props:Ce,_owner:je},(vt!==void 0?vt:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:x}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Je}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ft}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function M(k,ee){return ee=N(k.type,ee,k.props,k._owner,k._debugStack,k._debugTask),k._store&&(ee._store.validated=k._store.validated),ee}function Q(k){j(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===rr&&(k._payload.status==="fulfilled"?j(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===pt}function G(k){var ee={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Ce){return ee[Ce]})}function q(k,ee){return typeof k=="object"&&k!==null&&k.key!=null?(d(k.key),G(""+k.key)):ee.toString(36)}function oe(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(a,a):(k.status="pending",k.then(function(ee){k.status==="pending"&&(k.status="fulfilled",k.value=ee)},function(ee){k.status==="pending"&&(k.status="rejected",k.reason=ee)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function ge(k,ee,Ce,je,Je){var Ft=typeof k;(Ft==="undefined"||Ft==="boolean")&&(k=null);var vt=!1;if(k===null)vt=!0;else switch(Ft){case"bigint":case"string":case"number":vt=!0;break;case"object":switch(k.$$typeof){case pt:case _t:vt=!0;break;case rr:return vt=k._init,ge(vt(k._payload),ee,Ce,je,Je)}}if(vt){vt=k,Je=Je(vt);var Pn=je===""?"."+q(vt,0):je;return Jr(Je)?(Ce="",Pn!=null&&(Ce=Pn.replace($l,"$&/")+"/"),ge(Je,ee,Ce,"",function(Xo){return Xo})):Je!=null&&(j(Je)&&(Je.key!=null&&(vt&&vt.key===Je.key||d(Je.key)),Ce=M(Je,Ce+(Je.key==null||vt&&vt.key===Je.key?"":(""+Je.key).replace($l,"$&/")+"/")+Pn),je!==""&&vt!=null&&j(vt)&&vt.key==null&&vt._store&&!vt._store.validated&&(Ce._store.validated=2),Je=Ce),ee.push(Je)),1}if(vt=0,Pn=je===""?".":je+":",Jr(k))for(var sn=0;sn<k.length;sn++)je=k[sn],Ft=Pn+q(je,sn),vt+=ge(je,ee,Ce,Ft,Je);else if(sn=t(k),typeof sn=="function")for(sn===k.entries&&(Au||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Au=!0),k=sn.call(k),sn=0;!(je=k.next()).done;)je=je.value,Ft=Pn+q(je,sn++),vt+=ge(je,ee,Ce,Ft,Je);else if(Ft==="object"){if(typeof k.then=="function")return ge(oe(k),ee,Ce,je,Je);throw ee=String(k),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return vt}function ye(k,ee,Ce){if(k==null)return k;var je=[],Je=0;return ge(k,je,"","",function(Ft){return ee.call(Ce,Ft,Je++)}),je}function be(k){if(k._status===-1){var ee=k._ioInfo;ee!=null&&(ee.start=ee.end=performance.now()),ee=k._result;var Ce=ee();if(Ce.then(function(Je){if(k._status===0||k._status===-1){k._status=1,k._result=Je;var Ft=k._ioInfo;Ft!=null&&(Ft.end=performance.now()),Ce.status===void 0&&(Ce.status="fulfilled",Ce.value=Je)}},function(Je){if(k._status===0||k._status===-1){k._status=2,k._result=Je;var Ft=k._ioInfo;Ft!=null&&(Ft.end=performance.now()),Ce.status===void 0&&(Ce.status="rejected",Ce.reason=Je)}}),ee=k._ioInfo,ee!=null){ee.value=Ce;var je=Ce.displayName;typeof je=="string"&&(ee.name=je)}k._status===-1&&(k._status=0,k._result=Ce)}if(k._status===1)return ee=k._result,ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
107
+ `}function $ne(e,t,n){try{let r=wOt(e,t,n);NOt(),XQe.appendFileSync(Yd(),r),ea()==="dev"&&process.stderr.write(r)}catch{}MOt(e,t,n)}function MOt(e,t,n){try{AN[e](t,kOt(n))}catch{}}function kOt(e){if(!e)return;let t={};for(let[n,r]of Object.entries(e))if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){t[n]=r;continue}try{t[n]=JSON.stringify(r)}catch{t[n]=String(r)}}return t}var WQe,_e,jr=O(()=>{"use strict";A();Kv();kl();ya();WQe=null;_e={info(e,t){$ne("info",e,t)},warn(e,t){$ne("warn",e,t)},error(e,t){$ne("error",e,t)}}});import{setTimeout as POt}from"node:timers/promises";async function GG(e,t){let n=t.limit??UOt,r=t.baseMs??e4e,o=t.maxMs??t4e,i=t.sleep??POt,a=t.logEvent??"fetch_retry";for(let c=0;c<=n;c+=1){let d=c===n;try{return await e()}catch(m){if(!t.isRetryableError(m)||d)throw m;_e.warn(a,{attempt:c+1,reason:t.describeRetryReason?.(m)??"retryable_error",...t.logFields})}await i(LOt(c,{baseMs:r,maxMs:o}))}throw new Error("fetchWithRetry: unreachable")}function LOt(e,{baseMs:t=e4e,maxMs:n=t4e}={}){let r=Math.min(t*2**e,n),o=Math.floor(r/2);return o+Math.floor(Math.random()*o)}function jG(e){return e instanceof TypeError?e.message==="fetch failed"||e.message==="terminated":!1}function lw(e){return r4e(e,QOt)}function n4e(e){return r4e(e,FOt)}function r4e(e,t){if(!jG(e))return!1;let n=e.cause;if(!(n instanceof Error))return!1;let r=n.code;return typeof r=="string"&&t.has(r)}function zG(e){if(!jG(e))return"unknown";let t=e.cause;if(!(t instanceof Error))return"unknown";let n=t.code;return typeof n=="string"?`${t.name}:${n}`:t.name}var UOt,e4e,t4e,QOt,FOt,HG=O(()=>{"use strict";A();jr();UOt=5,e4e=1e3,t4e=16e3;QOt=new Set(["UND_ERR_CONNECT_TIMEOUT","ENOTFOUND","EAI_AGAIN","ECONNREFUSED"]),FOt=new Set(["ECONNRESET","ETIMEDOUT"])});function zOt(e){let t=process.env.LORE_TARGET?.trim();return t&&jOt.has(t)?t:e}function QR(e=ea(),t=process.env.LORE_API_ORIGIN){let n=t?.trim();return n?n.replace(/\/$/,""):GOt[zOt(e)]}function i4e(e){let t=bc();if(!t||t.spanContext().traceFlags!==1)return e;let n=__({span:t,propagateTraceparent:!0});return!n["sentry-trace"]&&!n.baggage&&!n.traceparent?e:{...e,...!e["sentry-trace"]&&n["sentry-trace"]?{"sentry-trace":n["sentry-trace"]}:{},...!e.baggage&&n.baggage?{baggage:n.baggage}:{},...!e.traceparent&&n.traceparent?{traceparent:n.traceparent}:{}}}async function HOt(){let e=await fetch(`${QR()}/api/cli-auth/config`,{headers:i4e({})});return e.ok?await e.json():null}async function $Ot(){let e=VQe();if(!e)return"";$G||($G=(async()=>{let t=await HOt();if(!t)return"";let n=await ZQe({clientId:t.workos_client_id,refreshToken:e,workosApiOrigin:t.workos_api_origin});return LR(n.access_token),n.refresh_token&&FG(n.refresh_token),n.access_token})().finally(()=>{$G=void 0}));try{return await $G}catch{return""}}function o4e(e){try{let t=cw(e);typeof t.sub=="string"&&QU({id:t.sub,...typeof t.email=="string"?{email:t.email}:{}})}catch{}}async function hr(){let e=QG().token;if(e)return o4e(e),e;let t=await $Ot();return t&&o4e(t),t}function cn(e={}){let t=e.token;return nZ(MG,{baseUrl:QR(),baseHeaders:{"User-Agent":E2e(),...t?{authorization:`Bearer ${t}`}:{}},api:async n=>{let r=i4e(n.headers);if(t===void 0){let i=await hr();i&&!r.authorization&&(r={...r,authorization:`Bearer ${i}`})}let o=n.method.toUpperCase()==="GET";return GG(()=>tZ({...n,headers:r}),{isRetryableError:o?i=>lw(i)||n4e(i):lw,describeRetryReason:i=>`network:${zG(i)}`,logEvent:"api_request_retry",logFields:{method:n.method,path:n.path}})}})}var GOt,jOt,$G,Jo=O(()=>{"use strict";A();DG();kA();Kv();zy();kl();HG();GOt={dev:"http://localhost:4000","dev-shared":"https://lore-api.dev.tanagram.ai",prod:"https://lore-api.tanagram.ai"},jOt=new Set(["dev","dev-shared","prod"])});function Ni(e){return e instanceof Error?e.message:String(e)}function Yr(e,t){return e!==null&&typeof e=="object"&&"code"in e&&e.code===t}function dw(){throw new dt("")}var dt,FR,_r=O(()=>{"use strict";A();dt=class extends Error{constructor(t){super(t),this.name="CLIError"}},FR=class extends dt{billingUrl;serverMessage;constructor(t){let n=t.serverMessage.trim(),r=n.replace(/\.+$/,""),o=r?`: ${r}`:"";super(`${t.action} blocked by your billing plan${o}. Manage or upgrade your plan: ${t.billingUrl}`),this.name="BillingBlockedError",this.billingUrl=t.billingUrl,this.serverMessage=n}}});function d4e(e){return typeof e!="string"?!1:twt.has(e.trim().toLowerCase())}function cu(e={}){let t=e.stdout??process.stdout,n=e.stdin??process.stdin,r=e.env??process.env;return!((e.rawArgs??process.argv.slice(2)).includes(p4e)||d4e(r.LORE_NO_TUI)||d4e(r.CI)||r.TERM==="dumb"||!t?.isTTY||!n?.isTTY)}function f4e(e){return e.filter(t=>t!==p4e)}var p4e,twt,SE=O(()=>{"use strict";A();p4e="--no-tui",twt=new Set(["1","true","yes","on"])});var C4e=F(_n=>{"use strict";A();var Xne=Symbol.for("react.transitional.element"),nwt=Symbol.for("react.portal"),rwt=Symbol.for("react.fragment"),owt=Symbol.for("react.strict_mode"),iwt=Symbol.for("react.profiler"),awt=Symbol.for("react.consumer"),swt=Symbol.for("react.context"),uwt=Symbol.for("react.forward_ref"),cwt=Symbol.for("react.suspense"),lwt=Symbol.for("react.memo"),_4e=Symbol.for("react.lazy"),dwt=Symbol.for("react.activity"),A4e=Symbol.iterator;function pwt(e){return e===null||typeof e!="object"?null:(e=A4e&&e[A4e]||e["@@iterator"],typeof e=="function"?e:null)}var E4e={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S4e=Object.assign,y4e={};function jR(e,t,n){this.props=e,this.context=t,this.refs=y4e,this.updater=n||E4e}jR.prototype.isReactComponent={};jR.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function T4e(){}T4e.prototype=jR.prototype;function ere(e,t,n){this.props=e,this.context=t,this.refs=y4e,this.updater=n||E4e}var tre=ere.prototype=new T4e;tre.constructor=ere;S4e(tre,jR.prototype);tre.isPureReactComponent=!0;var m4e=Array.isArray;function Wne(){}var So={H:null,A:null,T:null,S:null},I4e=Object.prototype.hasOwnProperty;function nre(e,t,n){var r=n.ref;return{$$typeof:Xne,type:e,key:t,ref:r!==void 0?r:null,props:n}}function fwt(e,t){return nre(e.type,t,e.props)}function rre(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xne}function Awt(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var g4e=/\/+/g;function Zne(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Awt(""+e.key):t.toString(36)}function mwt(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Wne,Wne):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function GR(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Xne:case nwt:a=!0;break;case _4e:return a=e._init,GR(a(e._payload),t,n,r,o)}}if(a)return o=o(e),a=r===""?"."+Zne(e,0):r,m4e(o)?(n="",a!=null&&(n=a.replace(g4e,"$&/")+"/"),GR(o,t,n,"",function(m){return m})):o!=null&&(rre(o)&&(o=fwt(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(g4e,"$&/")+"/")+a)),t.push(o)),1;a=0;var c=r===""?".":r+":";if(m4e(e))for(var d=0;d<e.length;d++)r=e[d],i=c+Zne(r,d),a+=GR(r,t,n,i,o);else if(d=pwt(e),typeof d=="function")for(e=d.call(e),d=0;!(r=e.next()).done;)r=r.value,i=c+Zne(r,d++),a+=GR(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return GR(mwt(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function VG(e,t,n){if(e==null)return e;var r=[],o=0;return GR(e,r,"","",function(i){return t.call(n,i,o++)}),r}function gwt(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var h4e=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},hwt={map:VG,forEach:function(e,t,n){VG(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return VG(e,function(){t++}),t},toArray:function(e){return VG(e,function(t){return t})||[]},only:function(e){if(!rre(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_n.Activity=dwt;_n.Children=hwt;_n.Component=jR;_n.Fragment=rwt;_n.Profiler=iwt;_n.PureComponent=ere;_n.StrictMode=owt;_n.Suspense=cwt;_n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=So;_n.__COMPILER_RUNTIME={__proto__:null,c:function(e){return So.H.useMemoCache(e)}};_n.cache=function(e){return function(){return e.apply(null,arguments)}};_n.cacheSignal=function(){return null};_n.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=S4e({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!I4e.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var a=Array(i),c=0;c<i;c++)a[c]=arguments[c+2];r.children=a}return nre(e.type,o,r)};_n.createContext=function(e){return e={$$typeof:swt,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:awt,_context:e},e};_n.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)I4e.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var c=Array(a),d=0;d<a;d++)c[d]=arguments[d+2];o.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return nre(e,i,o)};_n.createRef=function(){return{current:null}};_n.forwardRef=function(e){return{$$typeof:uwt,render:e}};_n.isValidElement=rre;_n.lazy=function(e){return{$$typeof:_4e,_payload:{_status:-1,_result:e},_init:gwt}};_n.memo=function(e,t){return{$$typeof:lwt,type:e,compare:t===void 0?null:t}};_n.startTransition=function(e){var t=So.T,n={};So.T=n;try{var r=e(),o=So.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Wne,h4e)}catch(i){h4e(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),So.T=t}};_n.unstable_useCacheRefresh=function(){return So.H.useCacheRefresh()};_n.use=function(e){return So.H.use(e)};_n.useActionState=function(e,t,n){return So.H.useActionState(e,t,n)};_n.useCallback=function(e,t){return So.H.useCallback(e,t)};_n.useContext=function(e){return So.H.useContext(e)};_n.useDebugValue=function(){};_n.useDeferredValue=function(e,t){return So.H.useDeferredValue(e,t)};_n.useEffect=function(e,t){return So.H.useEffect(e,t)};_n.useEffectEvent=function(e){return So.H.useEffectEvent(e)};_n.useId=function(){return So.H.useId()};_n.useImperativeHandle=function(e,t,n){return So.H.useImperativeHandle(e,t,n)};_n.useInsertionEffect=function(e,t){return So.H.useInsertionEffect(e,t)};_n.useLayoutEffect=function(e,t){return So.H.useLayoutEffect(e,t)};_n.useMemo=function(e,t){return So.H.useMemo(e,t)};_n.useOptimistic=function(e,t){return So.H.useOptimistic(e,t)};_n.useReducer=function(e,t,n){return So.H.useReducer(e,t,n)};_n.useRef=function(e){return So.H.useRef(e)};_n.useState=function(e){return So.H.useState(e)};_n.useSyncExternalStore=function(e,t,n){return So.H.useSyncExternalStore(e,t,n)};_n.useTransition=function(){return So.H.useTransition()};_n.version="19.2.4"});var b4e=F((ln,qG)=>{"use strict";A();process.env.NODE_ENV!=="production"&&function(){function e(k,ee){Object.defineProperty(r.prototype,k,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",ee[0],ee[1])}})}function t(k){return k===null||typeof k!="object"?null:(k=On&&k[On]||k["@@iterator"],typeof k=="function"?k:null)}function n(k,ee){k=(k=k.constructor)&&(k.displayName||k.name)||"ReactClass";var Ce=k+"."+ee;ct[Ce]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",ee,k),ct[Ce]=!0)}function r(k,ee,Ce){this.props=k,this.context=ee,this.refs=bt,this.updater=Ce||Wt}function o(){}function i(k,ee,Ce){this.props=k,this.context=ee,this.refs=bt,this.updater=Ce||Wt}function a(){}function c(k){return""+k}function d(k){try{c(k);var ee=!1}catch{ee=!0}if(ee){ee=console;var Ce=ee.error,je=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return Ce.call(ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",je),c(k)}}function m(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Wo?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case Yt:return"Fragment";case Te:return"Profiler";case co:return"StrictMode";case Ar:return"Suspense";case xa:return"SuspenseList";case Qt:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case _t:return"Portal";case an:return k.displayName||"Context";case St:return(k._context.displayName||"Context")+".Consumer";case En:var ee=k.render;return k=k.displayName,k||(k=ee.displayName||ee.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case zn:return ee=k.displayName||null,ee!==null?ee:m(k.type)||"Memo";case rr:ee=k._payload,k=k._init;try{return m(k(ee))}catch{}}return null}function h(k){if(k===Yt)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===rr)return"<...>";try{var ee=m(k);return ee?"<"+ee+">":"<...>"}catch{return"<...>"}}function S(){var k=Ct.A;return k===null?null:k.getOwner()}function y(){return Error("react-stack-top-frame")}function C(k){if(Mi.call(k,"key")){var ee=Object.getOwnPropertyDescriptor(k,"key").get;if(ee&&ee.isReactWarning)return!1}return k.key!==void 0}function v(k,ee){function Ce(){To||(To=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ee))}Ce.isReactWarning=!0,Object.defineProperty(k,"key",{get:Ce,configurable:!0})}function x(){var k=m(this.type);return fu[k]||(fu[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function N(k,ee,Ce,je,Je,Ft){var vt=Ce.ref;return k={$$typeof:pt,type:k,key:ee,props:Ce,_owner:je},(vt!==void 0?vt:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:x}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Je}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ft}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function M(k,ee){return ee=N(k.type,ee,k.props,k._owner,k._debugStack,k._debugTask),k._store&&(ee._store.validated=k._store.validated),ee}function Q(k){j(k)?k._store&&(k._store.validated=1):typeof k=="object"&&k!==null&&k.$$typeof===rr&&(k._payload.status==="fulfilled"?j(k._payload.value)&&k._payload.value._store&&(k._payload.value._store.validated=1):k._store&&(k._store.validated=1))}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===pt}function G(k){var ee={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Ce){return ee[Ce]})}function q(k,ee){return typeof k=="object"&&k!==null&&k.key!=null?(d(k.key),G(""+k.key)):ee.toString(36)}function oe(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(a,a):(k.status="pending",k.then(function(ee){k.status==="pending"&&(k.status="fulfilled",k.value=ee)},function(ee){k.status==="pending"&&(k.status="rejected",k.reason=ee)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function ge(k,ee,Ce,je,Je){var Ft=typeof k;(Ft==="undefined"||Ft==="boolean")&&(k=null);var vt=!1;if(k===null)vt=!0;else switch(Ft){case"bigint":case"string":case"number":vt=!0;break;case"object":switch(k.$$typeof){case pt:case _t:vt=!0;break;case rr:return vt=k._init,ge(vt(k._payload),ee,Ce,je,Je)}}if(vt){vt=k,Je=Je(vt);var Pn=je===""?"."+q(vt,0):je;return Jr(Je)?(Ce="",Pn!=null&&(Ce=Pn.replace($l,"$&/")+"/"),ge(Je,ee,Ce,"",function(Xo){return Xo})):Je!=null&&(j(Je)&&(Je.key!=null&&(vt&&vt.key===Je.key||d(Je.key)),Ce=M(Je,Ce+(Je.key==null||vt&&vt.key===Je.key?"":(""+Je.key).replace($l,"$&/")+"/")+Pn),je!==""&&vt!=null&&j(vt)&&vt.key==null&&vt._store&&!vt._store.validated&&(Ce._store.validated=2),Je=Ce),ee.push(Je)),1}if(vt=0,Pn=je===""?".":je+":",Jr(k))for(var sn=0;sn<k.length;sn++)je=k[sn],Ft=Pn+q(je,sn),vt+=ge(je,ee,Ce,Ft,Je);else if(sn=t(k),typeof sn=="function")for(sn===k.entries&&(Au||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Au=!0),k=sn.call(k),sn=0;!(je=k.next()).done;)je=je.value,Ft=Pn+q(je,sn++),vt+=ge(je,ee,Ce,Ft,Je);else if(Ft==="object"){if(typeof k.then=="function")return ge(oe(k),ee,Ce,je,Je);throw ee=String(k),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return vt}function ye(k,ee,Ce){if(k==null)return k;var je=[],Je=0;return ge(k,je,"","",function(Ft){return ee.call(Ce,Ft,Je++)}),je}function be(k){if(k._status===-1){var ee=k._ioInfo;ee!=null&&(ee.start=ee.end=performance.now()),ee=k._result;var Ce=ee();if(Ce.then(function(Je){if(k._status===0||k._status===-1){k._status=1,k._result=Je;var Ft=k._ioInfo;Ft!=null&&(Ft.end=performance.now()),Ce.status===void 0&&(Ce.status="fulfilled",Ce.value=Je)}},function(Je){if(k._status===0||k._status===-1){k._status=2,k._result=Je;var Ft=k._ioInfo;Ft!=null&&(Ft.end=performance.now()),Ce.status===void 0&&(Ce.status="rejected",Ce.reason=Je)}}),ee=k._ioInfo,ee!=null){ee.value=Ce;var je=Ce.displayName;typeof je=="string"&&(ee.name=je)}k._status===-1&&(k._status=0,k._result=Ce)}if(k._status===1)return ee=k._result,ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
108
108
 
109
109
  Your code should look like:
110
110
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -489,7 +489,7 @@ exec ${Gse(n)} ${Gse(e)} "$@"
489
489
  Authorization expired. Please try again.
490
490
  `);return;case"login_failed":console.log(`
491
491
  Login failed: ${e.message}
492
- `);return}}});var Q$e={};Ga(Q$e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>H5e,getOpenBrowserCommand:()=>Z5e,loginCommand:()=>Vse,openBrowser:()=>J5e,pollForTokens:()=>K5e,requestDeviceAuthorization:()=>Y5e,runLogin:()=>W5e});import{spawn as gGt}from"node:child_process";function H5e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function EGt(e){let n=await cn({token:e}).whoAmI({headers:{}});n.status===200&&(GQe(`lore_${n.body.user.id}`),HQe(H5e(n.body)))}async function $5e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function V5e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function q5e(e,t){return new URL(t,e).toString()}async function Y5e({clientId:e,workosApiOrigin:t}){let n=await fetch(q5e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await $5e(n);if(!n.ok)throw new Error(V5e(r));return r}async function K5e({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(q5e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:_Gt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let m=await $5e(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await z5e(c*1e3);break;case"slow_down":c+=1,await z5e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(V5e(h))}}}async function J5e(e){let{command:t,args:n}=Z5e(process.platform,e);await new Promise((r,o)=>{let i=gGt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function Z5e(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 SGt(e){if(!await hr())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function yGt(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:Yd()})}catch(r){_e.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function TGt(e){if(jG(e))return`Could not reach the Lore API at ${QR()}. 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 W5e({client:e=cn(),enableLaunchAgent:t=bH,openBrowser:n=J5e,platform:r=process.platform,pollForTokens:o=K5e,requestDeviceAuthorization:i=Y5e,setAccessToken:a=LR,setRefreshToken:c=FG,cacheAnalyticsDistinctId:d=EGt,timeoutMs:m=hGt,progress:h=G5e}={}){if(await SGt(e)){h({kind:"already_logged_in"});return}try{let S=await e.getCliAuthConfig();if(S.status!==200)throw new Error("WorkOS CLI Auth is not configured.");let y=await i({clientId:S.body.workos_client_id,workosApiOrigin:S.body.workos_api_origin});h({kind:"device_authorized",userCode:y.user_code,verificationUri:y.verification_uri,verificationUriComplete:y.verification_uri_complete});try{await n(y.verification_uri_complete),h({kind:"browser_opened"})}catch(v){_e.warn("open_browser_failed",{error:v instanceof Error?v.message:String(v)}),h({kind:"browser_open_failed"})}h({kind:"browser_url",url:y.verification_uri_complete}),h({kind:"waiting_for_authorization"});let C=await o({clientId:S.body.workos_client_id,deviceCode:y.device_code,expiresIn:y.expires_in,interval:y.interval,timeoutMs:m,workosApiOrigin:S.body.workos_api_origin});a(C.access_token),C.refresh_token&&c(C.refresh_token),d(C.access_token).catch(v=>{_e.warn("cache_analytics_distinct_id_failed",{error:v instanceof Error?v.message:String(v)})}),h({kind:"logged_in"}),await yGt(t,r,h)}catch(S){S instanceof Error&&S.message==="authorization timed out"?(h({kind:"authorization_timed_out"}),dw()):S instanceof Error&&S.message==="Authorization denied"?(h({kind:"authorization_denied"}),dw()):S instanceof Error&&S.message==="Authorization expired"&&(h({kind:"authorization_expired"}),dw());let y=TGt(S);throw y&&(h({kind:"login_failed",message:y}),dw()),S}}var hGt,_Gt,z5e,Vse,Ese=O(async()=>{"use strict";A();Jo();_r();HG();jr();ya();SE();await gse();await L$e();xM();zy();j5e();hGt=5*60*1e3,_Gt="urn:ietf:params:oauth:grant-type:device_code";z5e=e=>new Promise(t=>setTimeout(t,e));Vse={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,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(cu()&&!e?.progress){await U$e(t),await cH({skipIfAlreadyConfigured:!0});return}await W5e({...t,progress:e?.progress})}}});A();A();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="67deb3c5-4d66-48b1-b6ee-83b27905be63",e._sentryDebugIdIdentifier="sentry-dbid-67deb3c5-4d66-48b1-b6ee-83b27905be63")}catch{}})();A();A();A();function Yce(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 Kce=Yce();Kce.ok||(process.stderr.write(`lore: ${Kce.message}.
492
+ `);return}}});var Q$e={};Ga(Q$e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>H5e,getOpenBrowserCommand:()=>Z5e,loginCommand:()=>Vse,openBrowser:()=>J5e,pollForTokens:()=>K5e,requestDeviceAuthorization:()=>Y5e,runLogin:()=>W5e});import{spawn as gGt}from"node:child_process";function H5e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function EGt(e){let n=await cn({token:e}).whoAmI({headers:{}});n.status===200&&(GQe(`lore_${n.body.user.id}`),HQe(H5e(n.body)))}async function $5e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function V5e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function q5e(e,t){return new URL(t,e).toString()}async function Y5e({clientId:e,workosApiOrigin:t}){let n=await fetch(q5e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await $5e(n);if(!n.ok)throw new Error(V5e(r));return r}async function K5e({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(q5e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:_Gt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let m=await $5e(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await z5e(c*1e3);break;case"slow_down":c+=1,await z5e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(V5e(h))}}}async function J5e(e){let{command:t,args:n}=Z5e(process.platform,e);await new Promise((r,o)=>{let i=gGt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function Z5e(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 SGt(e){if(!await hr())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function yGt(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:Yd()})}catch(r){_e.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function TGt(e){if(jG(e))return`Could not reach the Lore API at ${QR()}. 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 W5e({client:e=cn(),enableLaunchAgent:t=bH,openBrowser:n=J5e,platform:r=process.platform,pollForTokens:o=K5e,requestDeviceAuthorization:i=Y5e,setAccessToken:a=LR,setRefreshToken:c=FG,cacheAnalyticsDistinctId:d=EGt,timeoutMs:m=hGt,progress:h=G5e}={}){if(await SGt(e)){h({kind:"already_logged_in"});return}try{let S=await e.getCliAuthConfig();if(S.status!==200)throw new Error("WorkOS CLI Auth is not configured.");let y=await i({clientId:S.body.workos_client_id,workosApiOrigin:S.body.workos_api_origin});h({kind:"device_authorized",userCode:y.user_code,verificationUri:y.verification_uri,verificationUriComplete:y.verification_uri_complete});try{await n(y.verification_uri_complete),h({kind:"browser_opened"})}catch(v){_e.warn("open_browser_failed",{error:v instanceof Error?v.message:String(v)}),h({kind:"browser_open_failed"})}h({kind:"browser_url",url:y.verification_uri_complete}),h({kind:"waiting_for_authorization"});let C=await o({clientId:S.body.workos_client_id,deviceCode:y.device_code,expiresIn:y.expires_in,interval:y.interval,timeoutMs:m,workosApiOrigin:S.body.workos_api_origin});a(C.access_token),C.refresh_token&&c(C.refresh_token),d(C.access_token).catch(v=>{_e.warn("cache_analytics_distinct_id_failed",{error:v instanceof Error?v.message:String(v)})}),h({kind:"logged_in"}),await yGt(t,r,h)}catch(S){S instanceof Error&&S.message==="authorization timed out"?(h({kind:"authorization_timed_out"}),dw()):S instanceof Error&&S.message==="Authorization denied"?(h({kind:"authorization_denied"}),dw()):S instanceof Error&&S.message==="Authorization expired"&&(h({kind:"authorization_expired"}),dw());let y=TGt(S);throw y&&(h({kind:"login_failed",message:y}),dw()),S}}var hGt,_Gt,z5e,Vse,Ese=O(async()=>{"use strict";A();Jo();_r();HG();jr();ya();SE();await gse();await L$e();xM();zy();j5e();hGt=5*60*1e3,_Gt="urn:ietf:params:oauth:grant-type:device_code";z5e=e=>new Promise(t=>setTimeout(t,e));Vse={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,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(cu()&&!e?.progress){await U$e(t),await cH({skipIfAlreadyConfigured:!0});return}await W5e({...t,progress:e?.progress})}}});A();A();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="88286d76-8e4f-42fb-9b5d-26c7ce1f28af",e._sentryDebugIdIdentifier="sentry-dbid-88286d76-8e4f-42fb-9b5d-26c7ce1f28af")}catch{}})();A();A();A();function Yce(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 Kce=Yce();Kce.ok||(process.stderr.write(`lore: ${Kce.message}.
493
493
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
494
494
  `),process.exit(1));A();Kv();kl();function eCt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var tCt=eCt();GJ({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:ea(),release:zu(),sendDefaultPii:!0,enableLogs:!0,spotlight:tCt,tracesSampleRate:1});LU("service_name","lore-cli");Kv();$J();import{realpathSync as Dzt}from"node:fs";import{fileURLToPath as Bzt,pathToFileURL as yVe}from"node:url";A();A();DG();Jo();_r();jr();A();function pw(e){let t=e;return t._def??t.def??{}}function VOt(e){let t=pw(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Fc(e,t,n){let r=VOt(e);return r===t||r===n}function a4e(e){let t=pw(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function qOt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=pw(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function Vne(e){if(!e||!Fc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=pw(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function s4e(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=pw(t);if(Fc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Fc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Fc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Fc(t,"ZodEffects","effects"))t=i.schema;else if(Fc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function YOt(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=s4e(e),a=!1,c=n;Fc(c,"ZodArray","array")&&(a=!0,c=a4e(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}:Fc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:qOt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Fc(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 qne(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=YOt(i,t);n[o]=a,r[o]={isArray:c,leafKind:KOt(i)}}return{args:n,fields:r}}function Yne(e,t={}){let n=Vne(e);return n?qne(n,t):{args:{},fields:{}}}function KOt(e){let{inner:t}=s4e(e),n=t;return Fc(n,"ZodArray","array")&&(n=a4e(n)??n),Fc(n,"ZodNumber","number")?"number":Fc(n,"ZodBoolean","boolean")?"boolean":Fc(n,"ZodEnum","enum")?"enum":Fc(n,"ZodString","string")?"string":"other"}function JOt(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 ZOt(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 Kne(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 WOt(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 XOt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Jne(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>XOt(n,a))}function ewt(e,t,n){return e.resource==="threads"&&t==="id"?WOt(n):n}function u4e(e){let t=JOt(MG,e.path),n=Vne(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=qne(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=Yne(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Yne(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let d={...i.args,...a.args,...c.args},m=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:m},args:d,async run({args:h,data:S}){_e.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=S;if(!await(y?.getAccessToken??hr)())throw new dt("not logged in \u2014 run 'lore login' first");let v={};for(let ge of r){let ye=h[ge],be=Kne(ye,i.fields[ge])??ye;v[ge]=ewt(e,ge,be)}let x={};for(let[ge,ye]of Object.entries(a.fields)){let be=Kne(h[ge],ye);be!==void 0&&(x[ge]=be)}let N={};for(let[ge,ye]of Object.entries(c.fields)){let be=Kne(h[ge],ye);be!==void 0&&(N[ge]=be)}let M=[...Jne(t.pathParams,v,"path"),...Jne(t.query,x,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Jne(t.body,N,"body")];if(M.length>0)throw new dt(`Invalid request for \`lore ${e.resource} ${e.op}\`:
495
495
  ${M.join(`