@wix/cli 1.1.48 → 1.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/DevCommand-O2LAA4RH.js +4 -0
- package/build/DevCommand-O2LAA4RH.js.map +1 -0
- package/build/{LoginCommand-NLI4JML5.js → LoginCommand-CVWBK5LH.js} +2 -2
- package/build/{LogoutCommand-C57ZNKT5.js → LogoutCommand-DKEBJ6NZ.js} +2 -2
- package/build/{WhoamiCommand-W7GLY3WG.js → WhoamiCommand-G53BCTLV.js} +2 -2
- package/build/check.js +1 -1
- package/build/{chunk-XHLDYCRC.js → chunk-3N2RGPEO.js} +5 -5
- package/build/chunk-3N2RGPEO.js.map +1 -0
- package/build/chunk-CAVNZXU4.js +4 -0
- package/build/chunk-CAVNZXU4.js.map +1 -0
- package/build/chunk-CYL3Y4I7.js +4 -0
- package/build/chunk-CYL3Y4I7.js.map +1 -0
- package/build/chunk-DGA2THYK.js +4 -0
- package/build/chunk-DGA2THYK.js.map +1 -0
- package/build/chunk-DZP4F4PP.js +14 -0
- package/build/chunk-DZP4F4PP.js.map +1 -0
- package/build/{chunk-AQJFGMCV.js → chunk-EWDYGUEU.js} +4 -4
- package/build/{chunk-AQJFGMCV.js.map → chunk-EWDYGUEU.js.map} +1 -1
- package/build/{chunk-GCM6E6UB.js → chunk-EY7RCO4T.js} +4 -4
- package/build/{chunk-BVN6MXUP.js → chunk-F2WOLODY.js} +2 -2
- package/build/chunk-F2WOLODY.js.map +1 -0
- package/build/{chunk-4Y2R5QID.js → chunk-GHYSGKNT.js} +2 -2
- package/build/chunk-GHYSGKNT.js.map +1 -0
- package/build/{chunk-NRX52J22.js → chunk-HWUPEJKT.js} +2 -2
- package/build/chunk-KXTG6FT3.js +6 -0
- package/build/chunk-KXTG6FT3.js.map +1 -0
- package/build/{chunk-XN36DVPR.js → chunk-L2ARP6U6.js} +2 -2
- package/build/chunk-L2ARP6U6.js.map +1 -0
- package/build/{chunk-UDD4OHCT.js → chunk-LWKR3S3U.js} +3 -3
- package/build/{chunk-UDD4OHCT.js.map → chunk-LWKR3S3U.js.map} +1 -1
- package/build/{chunk-HYMGR3RL.js → chunk-MEE2DVIY.js} +2 -2
- package/build/chunk-MEE2DVIY.js.map +1 -0
- package/build/{chunk-X5FGKR74.js → chunk-OLH3K4XG.js} +2 -2
- package/build/{chunk-ZCXNKYD2.js → chunk-QUB5H5DM.js} +2 -2
- package/build/chunk-QUB5H5DM.js.map +1 -0
- package/build/{chunk-PDKZVNCQ.js → chunk-RA7SC7ZN.js} +2 -2
- package/build/chunk-RA7SC7ZN.js.map +1 -0
- package/build/chunk-SPHZH5LL.js +4 -0
- package/build/chunk-SPHZH5LL.js.map +1 -0
- package/build/{chunk-6TDWVLRD.js → chunk-TMNJT4K2.js} +1 -1
- package/build/{chunk-6TDWVLRD.js.map → chunk-TMNJT4K2.js.map} +1 -1
- package/build/{chunk-ZWFH6MKQ.js → chunk-VTKRZTKJ.js} +2 -2
- package/build/chunk-VTKRZTKJ.js.map +1 -0
- package/build/chunk-W3WL2B3H.js +25 -0
- package/build/chunk-W3WL2B3H.js.map +1 -0
- package/build/{chunk-CNRVJIPG.js → chunk-WX3CWNNN.js} +2 -2
- package/build/chunk-XAYMT57N.js +4 -0
- package/build/chunk-XAYMT57N.js.map +1 -0
- package/build/{dev-XOTPKYHR.js → dev-E3IDFQKC.js} +4 -4
- package/build/dev-E3IDFQKC.js.map +1 -0
- package/build/index.js +5 -26
- package/build/index.js.map +1 -1
- package/build/{install-VNEFWOSA.js → install-ZNSNEIWX.js} +2 -2
- package/build/install-ZNSNEIWX.js.map +1 -0
- package/build/{preview-YCUHLGVE.js → preview-Y3WXIDLO.js} +2 -2
- package/build/preview-Y3WXIDLO.js.map +1 -0
- package/build/{publish-XTLLB6KE.js → publish-YPRUNEKX.js} +2 -2
- package/build/publish-YPRUNEKX.js.map +1 -0
- package/build/render-command-5TPOVVOS.js +4 -0
- package/build/render-command-5TPOVVOS.js.map +1 -0
- package/build/{render-command-GMJJM3EK.js → render-command-JJ2AQM7Q.js} +2 -2
- package/build/{run-command-VVLPCPAA.js → run-command-O2IEOEOD.js} +2 -2
- package/build/run-command-O2IEOEOD.js.map +1 -0
- package/build/src-4XIAVX4E.js +4 -0
- package/build/src-4XIAVX4E.js.map +1 -0
- package/build/{src-CZRQVWWJ.js → src-D4HRJKXU.js} +2 -2
- package/build/{src-YMGQ6GZL.js → src-HCEIAPMW.js} +2 -2
- package/build/{src-7ZO4JB2L.js → src-SUE6BJDY.js} +2 -2
- package/build/src-Z7HIP3VD.js +4 -0
- package/build/src-Z7HIP3VD.js.map +1 -0
- package/build/{src-ZUXRDORN.js → src-ZIMNO3M4.js} +2 -2
- package/build/sync-types-CSACSRJ6.js +4 -0
- package/build/{uninstall-7GXNOJQG.js → uninstall-R3ALTRIA.js} +2 -2
- package/build/uninstall-R3ALTRIA.js.map +1 -0
- package/build/{update-notifier-LCY3CRNY.js → update-notifier-S5PQKIDE.js} +2 -2
- package/package.json +4 -2
- package/build/chunk-2NLIPYRH.js +0 -6
- package/build/chunk-2NLIPYRH.js.map +0 -1
- package/build/chunk-4Y2R5QID.js.map +0 -1
- package/build/chunk-BVN6MXUP.js.map +0 -1
- package/build/chunk-FZFQS2M3.js +0 -4
- package/build/chunk-FZFQS2M3.js.map +0 -1
- package/build/chunk-GIQJZQOY.js +0 -4
- package/build/chunk-GIQJZQOY.js.map +0 -1
- package/build/chunk-HYMGR3RL.js.map +0 -1
- package/build/chunk-MZPTRVWN.js +0 -14
- package/build/chunk-MZPTRVWN.js.map +0 -1
- package/build/chunk-PDKZVNCQ.js.map +0 -1
- package/build/chunk-SYHT5LTW.js +0 -4
- package/build/chunk-SYHT5LTW.js.map +0 -1
- package/build/chunk-T7C26E3I.js +0 -4
- package/build/chunk-T7C26E3I.js.map +0 -1
- package/build/chunk-XHLDYCRC.js.map +0 -1
- package/build/chunk-XN36DVPR.js.map +0 -1
- package/build/chunk-ZCXNKYD2.js.map +0 -1
- package/build/chunk-ZWFH6MKQ.js.map +0 -1
- package/build/dev-XOTPKYHR.js.map +0 -1
- package/build/install-VNEFWOSA.js.map +0 -1
- package/build/preview-YCUHLGVE.js.map +0 -1
- package/build/publish-XTLLB6KE.js.map +0 -1
- package/build/run-command-VVLPCPAA.js.map +0 -1
- package/build/sync-types-IDJJDEEN.js +0 -4
- package/build/uninstall-7GXNOJQG.js.map +0 -1
- /package/build/{LoginCommand-NLI4JML5.js.map → LoginCommand-CVWBK5LH.js.map} +0 -0
- /package/build/{LogoutCommand-C57ZNKT5.js.map → LogoutCommand-DKEBJ6NZ.js.map} +0 -0
- /package/build/{WhoamiCommand-W7GLY3WG.js.map → WhoamiCommand-G53BCTLV.js.map} +0 -0
- /package/build/{chunk-GCM6E6UB.js.map → chunk-EY7RCO4T.js.map} +0 -0
- /package/build/{chunk-NRX52J22.js.map → chunk-HWUPEJKT.js.map} +0 -0
- /package/build/{chunk-X5FGKR74.js.map → chunk-OLH3K4XG.js.map} +0 -0
- /package/build/{chunk-CNRVJIPG.js.map → chunk-WX3CWNNN.js.map} +0 -0
- /package/build/{render-command-GMJJM3EK.js.map → render-command-JJ2AQM7Q.js.map} +0 -0
- /package/build/{src-7ZO4JB2L.js.map → src-D4HRJKXU.js.map} +0 -0
- /package/build/{src-CZRQVWWJ.js.map → src-HCEIAPMW.js.map} +0 -0
- /package/build/{src-YMGQ6GZL.js.map → src-SUE6BJDY.js.map} +0 -0
- /package/build/{src-ZUXRDORN.js.map → src-ZIMNO3M4.js.map} +0 -0
- /package/build/{sync-types-IDJJDEEN.js.map → sync-types-CSACSRJ6.js.map} +0 -0
- /package/build/{update-notifier-LCY3CRNY.js.map → update-notifier-S5PQKIDE.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{a as qe,b as Be,c as Pt,e as I,f as Pc,g as Nc,h as Mc,i as Yi,l as Eo,q as Lc,r as wc,s as Fc,t as uu,u as lu,w as ls}from"./chunk-X5FGKR74.js";import{b as fg,c as mg}from"./chunk-CNRVJIPG.js";import{d as Qc}from"./chunk-TVMTOQUC.js";import{a as lt,b as Vc,c as pt,d as dt,e as Kc,f as rr,g as an,h as Mt,i as _e,j as Ao,k as cn,l as ve,m as z,n as F,o as Yc,p as $c,q as Xc,r as Zc,s as zc,t as Jc,u as le,v as ne}from"./chunk-J3IJS26Z.js";import{$ as Hc,$b as iu,Aa as O,Da as es,Ea as or,F as Gc,Fa as un,Ga as we,Ka as se,L as Uc,Na as Ve,Oa as Je,Ta as eu,Tb as ou,Ua as tu,Va as nu,Wb as Oo,Za as Fe,Zb as is,ab as ts,ac as ln,bc as ss,cc as as,da as jc,db as ns,dc as cs,eb as rs,fc as us,ga as tr,gb as ir,ha as Ji,ia as nr,j as Dc,ja as qc,k as kc,ka as Bc,kb as os,ma as Qi,na as Wc,o as zi,p as vo,tb as ru,v as sn,w as G,ya as Nt,yb as xt,za as We}from"./chunk-CJ3JTOGS.js";import{a as su,b as au,c as cu}from"./chunk-NRX52J22.js";import{a as _o,b as To}from"./chunk-CUZEHDNU.js";import{a as go,b as $i,c as Xi,d as xc,e as Zi,g as So,h as yo}from"./chunk-AQJFGMCV.js";import{a as q,b as S,c as g,d as Ki,e as k,f as y,i as c}from"./chunk-UO4ZAUJK.js";function Io(t){return t.setValue(Es,!0)}function Rg(t){return t.deleteValue(Es)}function _n(t){return t.getValue(Es)===!0}var Es,cr=S(()=>{"use strict";c();F();Es=pt("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var gu,Po,gn,No,Eu,Tu,Su,Ts=S(()=>{"use strict";c();gu="=",Po=";",gn=",",No="baggage",Eu=180,Tu=4096,Su=8192});var vs={};Ki(vs,{getKeyPairs:()=>ys,parseKeyPairsIntoRecord:()=>Pg,parsePairKeyValue:()=>Mo,serializeKeyPairs:()=>Ss});function Ss(t){return t.reduce(function(e,n){var r=""+e+(e!==""?gn:"")+n;return r.length>Su?e:r},"")}function ys(t){return t.getAllEntries().map(function(e){var n=Ig(e,2),r=n[0],o=n[1],i=encodeURIComponent(r)+"="+encodeURIComponent(o.value);return o.metadata!==void 0&&(i+=Po+o.metadata.toString()),i})}function Mo(t){var e=t.split(Po);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(gu);if(!(r<=0)){var o=decodeURIComponent(n.substring(0,r).trim()),i=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=Vc(e.join(Po))),{key:o,value:i,metadata:s}}}}}function Pg(t){return typeof t!="string"||t.length===0?{}:t.split(gn).map(function(e){return Mo(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,n){return e[n.key]=n.value,e},{})}var Ig,As=S(()=>{"use strict";c();F();Ts();Ig=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}});var yu,vu=S(()=>{"use strict";c();F();cr();Ts();As();yu=function(){function t(){}return t.prototype.inject=function(e,n,r){var o=cn.getBaggage(e);if(!(!o||_n(e))){var i=ys(o).filter(function(a){return a.length<=Tu}).slice(0,Eu),s=Ss(i);s.length>0&&r.set(n,No,s)}},t.prototype.extract=function(e,n,r){var o=r.get(n,No),i=Array.isArray(o)?o.join(gn):o;if(!i)return e;var s={};if(i.length===0)return e;var a=i.split(gn);return a.forEach(function(u){var l=Mo(u);if(l){var p={value:l.value};l.metadata&&(p.metadata=l.metadata),s[l.key]=p}}),Object.entries(s).length===0?e:cn.setBaggage(e,cn.createBaggage(s))},t.prototype.fields=function(){return[No]},t}()});var Ng,Au=S(()=>{"use strict";c();Ng=function(){function t(e,n){this._monotonicClock=n,this._epochMillis=e.now(),this._performanceMillis=n.now()}return t.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},t}()});function xg(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var o=Ou(Object.entries(t)),i=o.next();!i.done;i=o.next()){var s=Mg(i.value,2),a=s[0],u=s[1];if(!Cu(a)){_e.warn("Invalid attribute key: "+a);continue}if(!bu(u)){_e.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(u)?r[a]=u.slice():r[a]=u}}catch(l){e={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function Cu(t){return typeof t=="string"&&t.length>0}function bu(t){return t==null?!0:Array.isArray(t)?Lg(t):Ru(t)}function Lg(t){var e,n,r;try{for(var o=Ou(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(s!=null){if(!r){if(Ru(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}function Ru(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var Ou,Mg,Iu=S(()=>{"use strict";c();F();Ou=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mg=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}});function Os(){return function(t){_e.error(wg(t))}}function wg(t){return typeof t=="string"?t:JSON.stringify(Fg(t))}function Fg(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var o=n[r];o&&(e[r]=String(o))}}),n=Object.getPrototypeOf(n);return e}var Cs=S(()=>{"use strict";c();F()});function Dg(t){Pu=t}function bs(t){try{Pu(t)}catch{}}var Pu,Rs=S(()=>{"use strict";c();Cs();Pu=Os()});var ur,Is=S(()=>{"use strict";c();(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ur||(ur={}))});function Ug(t){return Gg.indexOf(t)>-1}function jg(t){return Hg.indexOf(t)>-1}function Bg(t){return qg.indexOf(t)>-1}function Wg(t,e,n){if(!(typeof n[t]>"u")){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function Vg(t,e,n,r,o){if(r===void 0&&(r=-1/0),o===void 0&&(o=1/0),typeof n[t]<"u"){var i=Number(n[t]);isNaN(i)||(i<r?e[t]=r:i>o?e[t]=o:e[t]=i)}}function Kg(t,e,n,r){r===void 0&&(r=kg);var o=n[t];typeof o=="string"&&(e[t]=o.split(r).map(function(i){return i.trim()}))}function $g(t,e,n){var r=n[t];if(typeof r=="string"){var o=Yg[r.toUpperCase()];o!=null&&(e[t]=o)}}function Fo(t){var e={};for(var n in wo){var r=n;switch(r){case"OTEL_LOG_LEVEL":$g(r,e,t);break;default:if(Ug(r))Wg(r,e,t);else if(jg(r))Vg(r,e,t);else if(Bg(r))Kg(r,e,t);else{var o=t[r];typeof o<"u"&&o!==null&&(e[r]=String(o))}}}return e}var kg,Gg,Hg,qg,xo,Lo,Nu,Mu,wo,Yg,Ps=S(()=>{"use strict";c();F();Is();kg=",",Gg=["OTEL_SDK_DISABLED"];Hg=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];qg=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];xo=1/0,Lo=128,Nu=128,Mu=128,wo={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:lt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:xo,OTEL_ATTRIBUTE_COUNT_LIMIT:Lo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:xo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Lo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:xo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Lo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Nu,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Mu,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ur.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};Yg={ALL:lt.ALL,VERBOSE:lt.VERBOSE,DEBUG:lt.DEBUG,INFO:lt.INFO,WARN:lt.WARN,ERROR:lt.ERROR,NONE:lt.NONE}});function xu(){var t=Fo(process.env);return Object.assign({},wo,t)}function Lu(){return Fo(process.env)}var wu=S(()=>{"use strict";c();Ps()});var Xg,Fu=S(()=>{"use strict";c();Xg=typeof globalThis=="object"?globalThis:global});function Du(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Ns(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var o=Du(t.charCodeAt(r)),i=Du(t.charCodeAt(r+1));e[n++]=o<<4|i}return e}var Ms=S(()=>{"use strict";c()});function Zg(t){return Buffer.from(Ns(t)).toString("base64")}var ku=S(()=>{"use strict";c();Ms()});function Gu(t){return function(){for(var n=0;n<t/4;n++)Do.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(Do[n]>0);n++)n===t-1&&(Do[t-1]=1);return Do.toString("hex",0,t)}}var zg,Uu,Jg,Do,Hu=S(()=>{"use strict";c();zg=8,Uu=16,Jg=function(){function t(){this.generateTraceId=Gu(Uu),this.generateSpanId=Gu(zg)}return t}(),Do=Buffer.allocUnsafe(Uu)});import{performance as Qg}from"perf_hooks";var lr,ju=S(()=>{"use strict";c();lr=Qg});var xs,Ls=S(()=>{"use strict";c();xs="1.25.1"});var En,eE,qu=S(()=>{"use strict";c();Ls();ne();eE=(En={},En[Xc]="opentelemetry",En[$c]="node",En[Zc]=Jc,En[zc]=xs,En)});function tE(t){t.unref()}var Bu=S(()=>{"use strict";c()});var Wu=S(()=>{"use strict";c();wu();Fu();ku();Hu();ju();qu();Bu()});var ws=S(()=>{"use strict";c();Wu()});function pr(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*rE);return[n,r]}function Fs(){var t=lr.timeOrigin;if(typeof t!="number"){var e=lr;t=e.timing&&e.timing.fetchStart}return t}function Ku(t){var e=pr(Fs()),n=pr(typeof t=="number"?t:lr.now());return Yu(e,n)}function oE(t){if(Ds(t))return t;if(typeof t=="number")return t<Fs()?Ku(t):pr(t);if(t instanceof Date)return pr(t.getTime());throw TypeError("Invalid input type")}function iE(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=ko),[n,r]}function sE(t){var e=Vu,n=""+"0".repeat(e)+t[1]+"Z",r=n.substr(n.length-e-1),o=new Date(t[0]*1e3).toISOString();return o.replace("000Z",r)}function aE(t){return t[0]*ko+t[1]}function cE(t){return t[0]*1e3+t[1]/1e6}function uE(t){return t[0]*1e6+t[1]/1e3}function Ds(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function lE(t){return Ds(t)||typeof t=="number"||t instanceof Date}function Yu(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=ko&&(n[1]-=ko,n[0]+=1),n}var Vu,nE,rE,ko,$u=S(()=>{"use strict";c();ws();Vu=9,nE=6,rE=Math.pow(10,nE),ko=Math.pow(10,Vu)});var Xu=S(()=>{"use strict";c()});var ks,Zu=S(()=>{"use strict";c();(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(ks||(ks={}))});var pE,dE,zu=S(()=>{"use strict";c();F();pE=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dE=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,o){return r.concat(o)},[])))}return t.prototype.inject=function(e,n,r){var o,i;try{for(var s=pE(this._propagators),a=s.next();!a.done;a=s.next()){var u=a.value;try{u.inject(e,n,r)}catch(l){_e.warn("Failed to inject with "+u.constructor.name+". Err: "+l.message)}}}catch(l){o={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}},t.prototype.extract=function(e,n,r){return this._propagators.reduce(function(o,i){try{return i.extract(o,n,r)}catch(s){_e.warn("Failed to inject with "+i.constructor.name+". Err: "+s.message)}return o},e)},t.prototype.fields=function(){return this._fields.slice()},t}()});function Ju(t){return hE.test(t)}function Qu(t){return _E.test(t)&&!gE.test(t)}var Gs,fE,mE,hE,_E,gE,el=S(()=>{"use strict";c();Gs="[_0-9a-z-*/]",fE="[a-z]"+Gs+"{0,255}",mE="[a-z0-9]"+Gs+"{0,240}@[a-z]"+Gs+"{0,13}",hE=new RegExp("^(?:"+fE+"|"+mE+")$"),_E=/^[ -~]{0,255}[!-~]$/,gE=/,|=/});var tl,EE,nl,rl,dr,Us=S(()=>{"use strict";c();el();tl=32,EE=512,nl=",",rl="=",dr=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+rl+e.get(r)),n},[]).join(nl)},t.prototype._parse=function(e){e.length>EE||(this._internalState=e.split(nl).reverse().reduce(function(n,r){var o=r.trim(),i=o.indexOf(rl);if(i!==-1){var s=o.slice(0,i),a=o.slice(i+1,r.length);Ju(s)&&Qu(a)&&n.set(s,a)}return n},new Map),this._internalState.size>tl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,tl))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}()});function ol(t){var e=OE.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Go,Uo,TE,SE,yE,vE,AE,OE,CE,il=S(()=>{"use strict";c();F();cr();Us();Go="traceparent",Uo="tracestate",TE="00",SE="(?!ff)[\\da-f]{2}",yE="(?![0]{32})[\\da-f]{32}",vE="(?![0]{16})[\\da-f]{16}",AE="[\\da-f]{2}",OE=new RegExp("^\\s?("+SE+")-("+yE+")-("+vE+")-("+AE+")(-.*)?\\s?$");CE=function(){function t(){}return t.prototype.inject=function(e,n,r){var o=ve.getSpanContext(e);if(!(!o||_n(e)||!rr(o))){var i=TE+"-"+o.traceId+"-"+o.spanId+"-0"+Number(o.traceFlags||dt.NONE).toString(16);r.set(n,Go,i),o.traceState&&r.set(n,Uo,o.traceState.serialize())}},t.prototype.extract=function(e,n,r){var o=r.get(n,Go);if(!o)return e;var i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return e;var s=ol(i);if(!s)return e;s.isRemote=!0;var a=r.get(n,Uo);if(a){var u=Array.isArray(a)?a.join(","):a;s.traceState=new dr(typeof u=="string"?u:void 0)}return ve.setSpanContext(e,s)},t.prototype.fields=function(){return[Go,Uo]},t}()});var sl=S(()=>{"use strict";c()});function bE(t,e){return t.setValue(js,e)}function RE(t){return t.deleteValue(js)}function IE(t){return t.getValue(js)}var js,Hs,al=S(()=>{"use strict";c();F();js=pt("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(Hs||(Hs={}))});var Ho,qs=S(()=>{"use strict";c();F();Ho=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:an.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var fr,Bs=S(()=>{"use strict";c();F();fr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:an.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var PE,cl=S(()=>{"use strict";c();F();Rs();qs();Bs();PE=function(){function t(e){var n,r,o,i;this._root=e.root,this._root||(bs(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new fr),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new fr,this._remoteParentNotSampled=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Ho,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new fr,this._localParentNotSampled=(i=e.localParentNotSampled)!==null&&i!==void 0?i:new Ho}return t.prototype.shouldSample=function(e,n,r,o,i,s){var a=ve.getSpanContext(e);return!a||!rr(a)?this._root.shouldSample(e,n,r,o,i,s):a.isRemote?a.traceFlags&dt.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,o,i,s):this._remoteParentNotSampled.shouldSample(e,n,r,o,i,s):a.traceFlags&dt.SAMPLED?this._localParentSampled.shouldSample(e,n,r,o,i,s):this._localParentNotSampled.shouldSample(e,n,r,o,i,s)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var NE,ul=S(()=>{"use strict";c();F();NE=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Kc(n)&&this._accumulate(n)<this._upperBound?an.RECORD_AND_SAMPLED:an.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,r=0;r<e.length/8;r++){var o=r*8,i=parseInt(e.slice(o,o+8),16);n=(n^i)>>>0}return n},t}()});function kE(t,e){return function(n){return t(e(n))}}function Ws(t){if(!GE(t)||UE(t)!==ME)return!1;var e=DE(t);if(e===null)return!0;var n=dl.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ll.call(n)===FE}function GE(t){return t!=null&&typeof t=="object"}function UE(t){return t==null?t===void 0?LE:xE:pn&&pn in Object(t)?HE(t):jE(t)}function HE(t){var e=dl.call(t,pn),n=t[pn],r=!1;try{t[pn]=void 0,r=!0}catch{}var o=fl.call(t);return r&&(e?t[pn]=n:delete t[pn]),o}function jE(t){return fl.call(t)}var ME,xE,LE,wE,ll,FE,DE,pl,dl,pn,fl,ml=S(()=>{"use strict";c();ME="[object Object]",xE="[object Null]",LE="[object Undefined]",wE=Function.prototype,ll=wE.toString,FE=ll.call(Object),DE=kE(Object.getPrototypeOf,Object),pl=Object.prototype,dl=pl.hasOwnProperty,pn=Symbol?Symbol.toStringTag:void 0,fl=pl.toString});function BE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=_l(n,t.shift(),0,r);return n}function Vs(t){return qo(t)?t.slice():t}function _l(t,e,n,r){n===void 0&&(n=0);var o;if(!(n>qE)){if(n++,jo(t)||jo(e)||gl(e))o=Vs(e);else if(qo(t)){if(o=t.slice(),qo(e))for(var i=0,s=e.length;i<s;i++)o.push(Vs(e[i]));else if(mr(e))for(var a=Object.keys(e),i=0,s=a.length;i<s;i++){var u=a[i];o[u]=Vs(e[u])}}else if(mr(t))if(mr(e)){if(!WE(t,e))return e;o=Object.assign({},t);for(var a=Object.keys(e),i=0,s=a.length;i<s;i++){var u=a[i],l=e[u];if(jo(l))typeof l>"u"?delete o[u]:o[u]=l;else{var p=o[u],d=l;if(hl(t,u,r)||hl(e,u,r))delete o[u];else{if(mr(p)&&mr(d)){var m=r.get(p)||[],h=r.get(d)||[];m.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(p,m),r.set(d,h)}o[u]=_l(o[u],l,n,r)}}}}else o=e;return o}}function hl(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var s=r[o];if(s.key===e&&s.obj===t)return!0}return!1}function qo(t){return Array.isArray(t)}function gl(t){return typeof t=="function"}function mr(t){return!jo(t)&&!qo(t)&&!gl(t)&&typeof t=="object"}function jo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function WE(t,e){return!(!Ws(t)||!Ws(e))}var qE,El=S(()=>{"use strict";c();ml();qE=20});function KE(t,e){var n,r=new Promise(function(i,s){n=setTimeout(function(){s(new Tl("Operation timed out."))},e)});return Promise.race([t,r]).then(function(o){return clearTimeout(n),o},function(o){throw clearTimeout(n),o})}var VE,Tl,Sl=S(()=>{"use strict";c();VE=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tl=function(t){VE(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error)});function yl(t,e){return typeof e=="string"?t===e:!!t.match(e)}function $E(t,e){var n,r;if(!e)return!1;try{for(var o=YE(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(yl(t,s))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var YE,vl=S(()=>{"use strict";c();YE=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});function XE(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Al=S(()=>{"use strict";c()});var Ol,Cl=S(()=>{"use strict";c();Ol=function(){function t(){var e=this;this._promise=new Promise(function(n,r){e._resolve=n,e._reject=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}()});var ZE,zE,JE,bl=S(()=>{"use strict";c();Cl();ZE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},zE=function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},JE=function(){function t(e,n){this._callback=e,this._that=n,this._isCalled=!1,this._deferred=new Ol}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,zE([this._that],ZE(r),!1))).then(function(i){return n._deferred.resolve(i)},function(i){return n._deferred.reject(i)})}catch(i){this._deferred.reject(i)}}return this._deferred.promise},t}()});function Rl(t,e){return new Promise(function(n){Mt.with(Io(Mt.active()),function(){t.export(e,function(r){n(r)})})})}var Il=S(()=>{"use strict";c();F();cr()});var Ke={};Ki(Ke,{AlwaysOffSampler:()=>Ho,AlwaysOnSampler:()=>fr,AnchoredClock:()=>Ng,BindOnceFuture:()=>JE,CompositePropagator:()=>dE,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>Lo,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>xo,DEFAULT_ENVIRONMENT:()=>wo,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>Nu,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>Mu,ExportResultCode:()=>ks,ParentBasedSampler:()=>PE,RPCType:()=>Hs,RandomIdGenerator:()=>Jg,SDK_INFO:()=>eE,TRACE_PARENT_HEADER:()=>Go,TRACE_STATE_HEADER:()=>Uo,TimeoutError:()=>Tl,TraceIdRatioBasedSampler:()=>NE,TraceState:()=>dr,TracesSamplerValues:()=>ur,VERSION:()=>xs,W3CBaggagePropagator:()=>yu,W3CTraceContextPropagator:()=>CE,_globalThis:()=>Xg,addHrTimes:()=>Yu,baggageUtils:()=>vs,callWithTimeout:()=>KE,deleteRPCMetadata:()=>RE,getEnv:()=>xu,getEnvWithoutDefaults:()=>Lu,getRPCMetadata:()=>IE,getTimeOrigin:()=>Fs,globalErrorHandler:()=>bs,hexToBase64:()=>Zg,hexToBinary:()=>Ns,hrTime:()=>Ku,hrTimeDuration:()=>iE,hrTimeToMicroseconds:()=>uE,hrTimeToMilliseconds:()=>cE,hrTimeToNanoseconds:()=>aE,hrTimeToTimeStamp:()=>sE,internal:()=>QE,isAttributeKey:()=>Cu,isAttributeValue:()=>bu,isTimeInput:()=>lE,isTimeInputHrTime:()=>Ds,isTracingSuppressed:()=>_n,isUrlIgnored:()=>$E,isWrapped:()=>XE,loggingErrorHandler:()=>Os,merge:()=>BE,millisToHrTime:()=>pr,otperformance:()=>lr,parseEnvironment:()=>Fo,parseTraceParent:()=>ol,sanitizeAttributes:()=>xg,setGlobalErrorHandler:()=>Dg,setRPCMetadata:()=>bE,suppressTracing:()=>Io,timeInputToHrTime:()=>oE,unrefTimer:()=>tE,unsuppressTracing:()=>Rg,urlMatches:()=>yl});var QE,De=S(()=>{"use strict";c();vu();Au();Iu();Rs();Cs();$u();Xu();Ms();Zu();As();ws();zu();il();sl();al();qs();Bs();cl();ul();cr();Us();Ps();El();Is();Sl();vl();Al();bl();Ls();Il();QE={_export:Rl}});var Pl=g(hr=>{"use strict";c();Object.defineProperty(hr,"__esModule",{value:!0});hr.AttributeNames=void 0;var eT;(function(t){t.HTTP_ERROR_NAME="http.error_name",t.HTTP_ERROR_MESSAGE="http.error_message",t.HTTP_STATUS_TEXT="http.status_text"})(eT=hr.AttributeNames||(hr.AttributeNames={}))});var Ks=g(P=>{"use strict";c();Object.defineProperty(P,"__esModule",{value:!0});P.headerCapture=P.getIncomingRequestMetricAttributesOnResponse=P.getIncomingRequestAttributesOnResponse=P.getIncomingRequestMetricAttributes=P.getIncomingRequestAttributes=P.getOutgoingRequestMetricAttributesOnResponse=P.getOutgoingRequestAttributesOnResponse=P.setAttributesFromHttpKind=P.getOutgoingRequestMetricAttributes=P.getOutgoingRequestAttributes=P.extractHostnameAndPort=P.isValidOptionsType=P.getRequestInfo=P.isCompressed=P.setResponseContentLengthAttribute=P.setRequestContentLengthAttribute=P.setSpanWithError=P.isIgnored=P.satisfiesPattern=P.parseResponseStatus=P.getAbsoluteUrl=void 0;var _r=(F(),y(z)),C=(ne(),y(le)),Nl=(De(),y(Ke)),Bo=q("url"),Wo=Pl(),tT=(t,e,n="http:")=>{let r=t||{},o=r.protocol||n,i=(r.port||"").toString(),s=r.path||"/",a=r.host||r.hostname||e.host||"localhost";return a.indexOf(":")===-1&&i&&i!=="80"&&i!=="443"&&(a+=`:${i}`),`${o}//${a}${s}`};P.getAbsoluteUrl=tT;var nT=(t,e)=>{let n=t===_r.SpanKind.CLIENT?400:500;return e&&e>=100&&e<n?_r.SpanStatusCode.UNSET:_r.SpanStatusCode.ERROR};P.parseResponseStatus=nT;var rT=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")};P.satisfiesPattern=rT;var oT=(t,e,n)=>{if(!e)return!1;try{for(let r of e)if((0,P.satisfiesPattern)(t,r))return!0}catch(r){n&&n(r)}return!1};P.isIgnored=oT;var iT=(t,e)=>{let n=e.message;t.setAttribute(Wo.AttributeNames.HTTP_ERROR_NAME,e.name),t.setAttribute(Wo.AttributeNames.HTTP_ERROR_MESSAGE,n),t.setStatus({code:_r.SpanStatusCode.ERROR,message:n}),t.recordException(e)};P.setSpanWithError=iT;var sT=(t,e)=>{let n=Ml(t.headers);n!==null&&((0,P.isCompressed)(t.headers)?e[C.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH]=n:e[C.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED]=n)};P.setRequestContentLengthAttribute=sT;var aT=(t,e)=>{let n=Ml(t.headers);n!==null&&((0,P.isCompressed)(t.headers)?e[C.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]=n:e[C.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED]=n)};P.setResponseContentLengthAttribute=aT;function Ml(t){let e=t["content-length"];if(e===void 0)return null;let n=parseInt(e,10);return isNaN(n)?null:n}var cT=t=>{let e=t["content-encoding"];return!!e&&e!=="identity"};P.isCompressed=cT;var uT=(t,e)=>{let n="/",r="",o;if(typeof t=="string")o=Bo.parse(t),n=o.pathname||"/",r=`${o.protocol||"http:"}//${o.host}`,e!==void 0&&Object.assign(o,e);else if(t instanceof Bo.URL)o={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,path:`${t.pathname||""}${t.search||""}`},t.port!==""&&(o.port=Number(t.port)),(t.username||t.password)&&(o.auth=`${t.username}:${t.password}`),n=t.pathname,r=t.origin,e!==void 0&&Object.assign(o,e);else{o=Object.assign({protocol:t.host?"http:":void 0},t),n=t.pathname,!n&&o.path&&(n=Bo.parse(o.path).pathname||"/");let s=o.host||(o.port!=null?`${o.hostname}${o.port}`:o.hostname);r=`${o.protocol||"http:"}//${s}`}let i=o.method?o.method.toUpperCase():"GET";return{origin:r,pathname:n,method:i,optionsParsed:o}};P.getRequestInfo=uT;var lT=t=>{if(!t)return!1;let e=typeof t;return e==="string"||e==="object"&&!Array.isArray(t)};P.isValidOptionsType=lT;var pT=t=>{var e;if(t.hostname&&t.port)return{hostname:t.hostname,port:t.port};let n=((e=t.host)===null||e===void 0?void 0:e.match(/^([^:/ ]+)(:\d{1,5})?/))||null,r=t.hostname||(n===null?"localhost":n[1]),o=t.port;return o||(n&&n[2]?o=n[2].substring(1):o=t.protocol==="https:"?"443":"80"),{hostname:r,port:o}};P.extractHostnameAndPort=pT;var dT=(t,e)=>{var n;let r=e.hostname,o=e.port,i=t.method,s=i?i.toUpperCase():"GET",a=t.headers||{},u=a["user-agent"],l={[C.SEMATTRS_HTTP_URL]:(0,P.getAbsoluteUrl)(t,a,`${e.component}:`),[C.SEMATTRS_HTTP_METHOD]:s,[C.SEMATTRS_HTTP_TARGET]:t.path||"/",[C.SEMATTRS_NET_PEER_NAME]:r,[C.SEMATTRS_HTTP_HOST]:(n=a.host)!==null&&n!==void 0?n:`${r}:${o}`};return u!==void 0&&(l[C.SEMATTRS_HTTP_USER_AGENT]=u),Object.assign(l,e.hookAttributes)};P.getOutgoingRequestAttributes=dT;var fT=t=>{let e={};return e[C.SEMATTRS_HTTP_METHOD]=t[C.SEMATTRS_HTTP_METHOD],e[C.SEMATTRS_NET_PEER_NAME]=t[C.SEMATTRS_NET_PEER_NAME],e};P.getOutgoingRequestMetricAttributes=fT;var mT=(t,e)=>{t&&(e[C.SEMATTRS_HTTP_FLAVOR]=t,t.toUpperCase()!=="QUIC"?e[C.SEMATTRS_NET_TRANSPORT]=C.NETTRANSPORTVALUES_IP_TCP:e[C.SEMATTRS_NET_TRANSPORT]=C.NETTRANSPORTVALUES_IP_UDP)};P.setAttributesFromHttpKind=mT;var hT=t=>{let{statusCode:e,statusMessage:n,httpVersion:r,socket:o}=t,i={};if(o){let{remoteAddress:s,remotePort:a}=o;i[C.SEMATTRS_NET_PEER_IP]=s,i[C.SEMATTRS_NET_PEER_PORT]=a}return(0,P.setResponseContentLengthAttribute)(t,i),e&&(i[C.SEMATTRS_HTTP_STATUS_CODE]=e,i[Wo.AttributeNames.HTTP_STATUS_TEXT]=(n||"").toUpperCase()),(0,P.setAttributesFromHttpKind)(r,i),i};P.getOutgoingRequestAttributesOnResponse=hT;var _T=t=>{let e={};return e[C.SEMATTRS_NET_PEER_PORT]=t[C.SEMATTRS_NET_PEER_PORT],e[C.SEMATTRS_HTTP_STATUS_CODE]=t[C.SEMATTRS_HTTP_STATUS_CODE],e[C.SEMATTRS_HTTP_FLAVOR]=t[C.SEMATTRS_HTTP_FLAVOR],e};P.getOutgoingRequestMetricAttributesOnResponse=_T;var gT=(t,e)=>{let n=t.headers,r=n["user-agent"],o=n["x-forwarded-for"],i=t.method||"GET",s=t.httpVersion,a=t.url?Bo.parse(t.url):null,u=a?.host||n.host,l=a?.hostname||u?.replace(/^(.*)(:[0-9]{1,5})/,"$1")||"localhost",p=e.serverName,d={[C.SEMATTRS_HTTP_URL]:(0,P.getAbsoluteUrl)(a,n,`${e.component}:`),[C.SEMATTRS_HTTP_HOST]:u,[C.SEMATTRS_NET_HOST_NAME]:l,[C.SEMATTRS_HTTP_METHOD]:i,[C.SEMATTRS_HTTP_SCHEME]:e.component};return typeof o=="string"&&(d[C.SEMATTRS_HTTP_CLIENT_IP]=o.split(",")[0]),typeof p=="string"&&(d[C.SEMATTRS_HTTP_SERVER_NAME]=p),a&&(d[C.SEMATTRS_HTTP_TARGET]=a.path||"/"),r!==void 0&&(d[C.SEMATTRS_HTTP_USER_AGENT]=r),(0,P.setRequestContentLengthAttribute)(t,d),(0,P.setAttributesFromHttpKind)(s,d),Object.assign(d,e.hookAttributes)};P.getIncomingRequestAttributes=gT;var ET=t=>{let e={};return e[C.SEMATTRS_HTTP_SCHEME]=t[C.SEMATTRS_HTTP_SCHEME],e[C.SEMATTRS_HTTP_METHOD]=t[C.SEMATTRS_HTTP_METHOD],e[C.SEMATTRS_NET_HOST_NAME]=t[C.SEMATTRS_NET_HOST_NAME],e[C.SEMATTRS_HTTP_FLAVOR]=t[C.SEMATTRS_HTTP_FLAVOR],e};P.getIncomingRequestMetricAttributes=ET;var TT=(t,e)=>{let{socket:n}=t,{statusCode:r,statusMessage:o}=e,i=(0,Nl.getRPCMetadata)(_r.context.active()),s={};if(n){let{localAddress:a,localPort:u,remoteAddress:l,remotePort:p}=n;s[C.SEMATTRS_NET_HOST_IP]=a,s[C.SEMATTRS_NET_HOST_PORT]=u,s[C.SEMATTRS_NET_PEER_IP]=l,s[C.SEMATTRS_NET_PEER_PORT]=p}return s[C.SEMATTRS_HTTP_STATUS_CODE]=r,s[Wo.AttributeNames.HTTP_STATUS_TEXT]=(o||"").toUpperCase(),i?.type===Nl.RPCType.HTTP&&i.route!==void 0&&(s[C.SEMATTRS_HTTP_ROUTE]=i.route),s};P.getIncomingRequestAttributesOnResponse=TT;var ST=t=>{let e={};return e[C.SEMATTRS_HTTP_STATUS_CODE]=t[C.SEMATTRS_HTTP_STATUS_CODE],e[C.SEMATTRS_NET_HOST_PORT]=t[C.SEMATTRS_NET_HOST_PORT],t[C.SEMATTRS_HTTP_ROUTE]!==void 0&&(e[C.SEMATTRS_HTTP_ROUTE]=t[C.SEMATTRS_HTTP_ROUTE]),e};P.getIncomingRequestMetricAttributesOnResponse=ST;function yT(t,e){let n=new Map;for(let r=0,o=e.length;r<o;r++){let i=e[r].toLowerCase();n.set(i,i.replace(/-/g,"_"))}return(r,o)=>{for(let i of n.keys()){let s=o(i);if(s===void 0)continue;let a=n.get(i),u=`http.${t}.header.${a}`;typeof s=="string"?r.setAttribute(u,[s]):Array.isArray(s)?r.setAttribute(u,s):r.setAttribute(u,[s])}}}P.headerCapture=yT});var xl=g(Vo=>{"use strict";c();Object.defineProperty(Vo,"__esModule",{value:!0});Vo.VERSION=void 0;Vo.VERSION="0.52.1"});var Ll=S(()=>{"use strict";c()});var wl=S(()=>{"use strict";c()});var Fl,Dl=S(()=>{"use strict";c();(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(Fl||(Fl={}))});var kl=S(()=>{"use strict";c()});var Gl=S(()=>{"use strict";c()});var Ys,WI,$s=S(()=>{"use strict";c();Ys=function(){function t(){}return t.prototype.emit=function(e){},t}(),WI=new Ys});var vT,Xs,Zs=S(()=>{"use strict";c();$s();vT=function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Ys},t}(),Xs=new vT});var Ul,Hl=S(()=>{"use strict";c();Ul=typeof globalThis=="object"?globalThis:global});var jl=S(()=>{"use strict";c();Hl()});var ql=S(()=>{"use strict";c();jl()});function Bl(t,e,n){return function(r){return r===t?e:n}}var gr,Tn,zs,Wl=S(()=>{"use strict";c();ql();gr=Symbol.for("io.opentelemetry.js.api.logs"),Tn=Ul;zs=1});var Vl,Kl=S(()=>{"use strict";c();Wl();Zs();Vl=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return Tn[gr]?this.getLoggerProvider():(Tn[gr]=Bl(zs,e,Xs),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tn[gr])===null||e===void 0?void 0:e.call(Tn,zs))!==null&&n!==void 0?n:Xs},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Tn[gr]},t}()});var Ko,Js=S(()=>{"use strict";c();Ll();wl();Dl();kl();Gl();$s();Zs();Kl();Ko=Vl.getInstance()});function Yl(t,e,n,r){for(var o=0,i=t.length;o<i;o++){var s=t[o];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function $l(t){t.forEach(function(e){return e.disable()})}var Xl=S(()=>{"use strict";c()});function Yo(t){var e,n,r=t.tracerProvider||ve.getTracerProvider(),o=t.meterProvider||Ao.getMeterProvider(),i=t.loggerProvider||Ko.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return Yl(s,r,o,i),function(){$l(s)}}var Zl=S(()=>{"use strict";c();F();Js();Xl()});var ea=g((IP,Ql)=>{"use strict";c();function Qs(t){return typeof t=="function"}var Ae=console.error.bind(console);function Er(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Tr(t){t&&t.logger&&(Qs(t.logger)?Ae=t.logger:Ae("new logger isn't a function, not replacing"))}function zl(t,e,n){if(!t||!t[e]){Ae("no original function "+e+" to wrap");return}if(!n){Ae("no wrapper function"),Ae(new Error().stack);return}if(!Qs(t[e])||!Qs(n)){Ae("original object and wrapper must be functions");return}var r=t[e],o=n(r,e);return Er(o,"__original",r),Er(o,"__unwrap",function(){t[e]===o&&Er(t,e,r)}),Er(o,"__wrapped",!0),Er(t,e,o),o}function AT(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Ae("must provide one or more modules to patch"),Ae(new Error().stack);return}if(!(e&&Array.isArray(e))){Ae("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(o){zl(r,o,n)})})}function Jl(t,e){if(!t||!t[e]){Ae("no function to unwrap."),Ae(new Error().stack);return}if(!t[e].__unwrap)Ae("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function OT(t,e){if(t)Array.isArray(t)||(t=[t]);else{Ae("must provide one or more modules to patch"),Ae(new Error().stack);return}if(!(e&&Array.isArray(e))){Ae("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){Jl(n,r)})})}Tr.wrap=zl;Tr.massWrap=AT;Tr.unwrap=Jl;Tr.massUnwrap=OT;Ql.exports=Tr});var wt,$o,ep,tp=S(()=>{"use strict";c();F();Js();wt=k(ea()),$o=function(){return $o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},$o.apply(this,arguments)},ep=function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this._wrap=wt.wrap,this._unwrap=wt.unwrap,this._massWrap=wt.massWrap,this._massUnwrap=wt.massUnwrap,this._config=$o({enabled:!0},r),this._diag=_e.createComponentLogger({namespace:e}),this._tracer=ve.getTracer(e,n),this._meter=Ao.getMeter(e,n),this._logger=Ko.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=$o({},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,o){if(e)try{e(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}},t}()});var ta=g((wP,np)=>{"use strict";c();var CT=q("os");np.exports=CT.homedir||function(){var e=process.env.HOME,n=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(n?"/Users/"+n:null):process.platform==="linux"?e||(process.getuid()===0?"/root":n?"/home/"+n:null):e||null}});var na=g((DP,rp)=>{"use strict";c();rp.exports=function(){var t=Error.prepareStackTrace;Error.prepareStackTrace=function(n,r){return r};var e=new Error().stack;return Error.prepareStackTrace=t,e[2].getFileName()}});var op=g((GP,Sr)=>{"use strict";c();var bT=process.platform==="win32",RT=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,ra={};function IT(t){return RT.exec(t).slice(1)}ra.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=IT(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var PT=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,oa={};function NT(t){return PT.exec(t).slice(1)}oa.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=NT(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};bT?Sr.exports=ra.parse:Sr.exports=oa.parse;Sr.exports.posix=oa.parse;Sr.exports.win32=ra.parse});var ia=g((HP,cp)=>{"use strict";c();var ap=q("path"),ip=ap.parse||op(),sp=function(e,n){var r="/";/^([A-Za-z]:)/.test(e)?r="":/^\\\\/.test(e)&&(r="\\\\");for(var o=[e],i=ip(e);i.dir!==o[o.length-1];)o.push(i.dir),i=ip(i.dir);return o.reduce(function(s,a){return s.concat(n.map(function(u){return ap.resolve(r,a,u)}))},[])};cp.exports=function(e,n,r){var o=n&&n.moduleDirectory?[].concat(n.moduleDirectory):["node_modules"];if(n&&typeof n.paths=="function")return n.paths(r,e,function(){return sp(e,o)},n);var i=sp(e,o);return n&&n.paths?i.concat(n.paths):i}});var sa=g((qP,up)=>{"use strict";c();var yr=q("path");up.exports=function(t,e){if(e=e||{},e.forceNodeResolution||!process.versions.pnp)return e;let{findPnpApi:n}=q("module"),r=(l,p)=>{let d=l.match(/^((?:@[^/]+\/)?[^/]+)(\/.*)?/);if(!d)throw new Error(`Assertion failed: Expected the "resolve" package to call the "paths" callback with package names only (got "${l}")`);p.charAt(p.length-1)!=="/"&&(p=yr.join(p,"/"));let m=n(p);if(m===null)return;let h;try{h=m.resolveToUnqualified(`${d[1]}/package.json`,p,{considerBuiltins:!1})}catch{return null}if(h===null)throw new Error(`Assertion failed: The resolution thinks that "${d[1]}" is a Node builtin`);let _=yr.dirname(h),T=typeof d[2]<"u"?yr.join(_,d[2]):_;return{packagePath:_,unqualifiedPath:T}},o=(l,p)=>{for(let d=0;d<p.length;d++){let m=r(l,p[d]);if(m||d===p.length-1)return m}return null},i=Array.isArray(e.paths)?e.paths:[],s=(l,p,d,m)=>{let h=[p].concat(i),_=o(l,h);return _==null?d():[_.unqualifiedPath]},a=(l,p,d,m)=>{let h=[p].concat(i),_=o(l,h);if(_==null)return d().concat(i);let T=yr.dirname(_.packagePath);return l.match(/^@[^/]+\//)&&(T=yr.dirname(T)),[T]},u=!1;return e.__skipPackageIterator||(e.packageIterator=function(l,p,d,m){u=!0;try{return s(l,p,d,m)}finally{u=!1}}),e.paths=function(l,p,d,m){return u?d().concat(i):a(l,p,d,m)},e}});var dp=g((WP,pp)=>{"use strict";c();var MT="Function.prototype.bind called on incompatible ",xT=Object.prototype.toString,LT=Math.max,wT="[object Function]",lp=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},FT=function(e,n){for(var r=[],o=n||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},DT=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};pp.exports=function(e){var n=this;if(typeof n!="function"||xT.apply(n)!==wT)throw new TypeError(MT+n);for(var r=FT(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,lp(r,arguments));return Object(p)===p?p:this}return n.apply(e,lp(r,arguments))},s=LT(0,n.length-r.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(o=Function("binder","return function ("+DT(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o}});var mp=g((KP,fp)=>{"use strict";c();var kT=dp();fp.exports=Function.prototype.bind||kT});var _p=g(($P,hp)=>{"use strict";c();var GT=Function.prototype.call,UT=Object.prototype.hasOwnProperty,HT=mp();hp.exports=HT.call(GT,UT)});var gp=g((ZP,jT)=>{jT.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3","node:test/mock_loader":">= 22.3","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var vr=g((zP,Sp)=>{"use strict";c();var qT=_p();function BT(t,e){for(var n=t.split("."),r=e.split(" "),o=r.length>1?r[0]:"=",i=(r.length>1?r[1]:r[0]).split("."),s=0;s<3;++s){var a=parseInt(n[s]||0,10),u=parseInt(i[s]||0,10);if(a!==u)return o==="<"?a<u:o===">="?a>=u:!1}return o===">="}function Ep(t,e){var n=e.split(/ ?&& ?/);if(n.length===0)return!1;for(var r=0;r<n.length;++r)if(!BT(t,n[r]))return!1;return!0}function WT(t,e){if(typeof e=="boolean")return e;var n=typeof t>"u"?process.versions&&process.versions.node:t;if(typeof n!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var r=0;r<e.length;++r)if(Ep(n,e[r]))return!0;return!1}return Ep(n,e)}var Tp=gp();Sp.exports=function(e,n){return qT(Tp,e)&&WT(n,Tp[e])}});var Ap=g((QP,vp)=>{"use strict";c();var dn=q("fs"),VT=ta(),ae=q("path"),KT=na(),YT=ia(),$T=sa(),XT=vr(),ZT=process.platform!=="win32"&&dn.realpath&&typeof dn.realpath.native=="function"?dn.realpath.native:dn.realpath,yp=VT(),zT=function(){return[ae.join(yp,".node_modules"),ae.join(yp,".node_libraries")]},JT=function(e,n){dn.stat(e,function(r,o){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,o.isFile()||o.isFIFO())})},QT=function(e,n){dn.stat(e,function(r,o){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,o.isDirectory())})},eS=function(e,n){ZT(e,function(r,o){r&&r.code!=="ENOENT"?n(r):n(null,r?e:o)})},Ar=function(e,n,r,o){r&&r.preserveSymlinks===!1?e(n,o):o(null,n)},tS=function(e,n,r){e(n,function(o,i){if(o)r(o);else try{var s=JSON.parse(i);r(null,s)}catch{r(null)}})},nS=function(e,n,r){for(var o=YT(n,r,e),i=0;i<o.length;i++)o[i]=ae.join(o[i],e);return o};vp.exports=function(e,n,r){var o=r,i=n;if(typeof n=="function"&&(o=i,i={}),typeof e!="string"){var s=new TypeError("Path must be a string.");return process.nextTick(function(){o(s)})}i=$T(e,i);var a=i.isFile||JT,u=i.isDirectory||QT,l=i.readFile||dn.readFile,p=i.realpath||eS,d=i.readPackage||tS;if(i.readFile&&i.readPackage){var m=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(m)})}var h=i.packageIterator,_=i.extensions||[".js"],T=i.includeCoreModules!==!1,R=i.basedir||ae.dirname(KT()),M=i.filename||R;i.paths=i.paths||zT();var b=ae.resolve(R);Ar(p,b,i,function(v,D){v?o(v):N(D)});var A;function N(v){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))A=ae.resolve(v,e),(e==="."||e===".."||e.slice(-1)==="/")&&(A+="/"),/\/$/.test(e)&&A===v?B(A,i.package,w):W(A,i.package,w);else{if(T&&XT(e))return o(null,e);he(e,v,function(D,$,U){if(D)o(D);else{if($)return Ar(p,$,i,function(Le,te){Le?o(Le):o(null,te,U)});var Q=new Error("Cannot find module '"+e+"' from '"+M+"'");Q.code="MODULE_NOT_FOUND",o(Q)}})}}function w(v,D,$){v?o(v):D?o(null,D,$):B(A,function(U,Q,Le){if(U)o(U);else if(Q)Ar(p,Q,i,function(ee,be){ee?o(ee):o(null,be,Le)});else{var te=new Error("Cannot find module '"+e+"' from '"+M+"'");te.code="MODULE_NOT_FOUND",o(te)}})}function W(v,D,$){var U=D,Q=$;typeof U=="function"&&(Q=U,U=void 0);var Le=[""].concat(_);te(Le,v,U);function te(ee,be,ct){if(ee.length===0)return Q(null,void 0,ct);var on=be+ee[0],ze=ct;ze?Ee(null,ze):x(ae.dirname(on),Ee);function Ee(It,hn,ut){if(ze=hn,It)return Q(It);if(ut&&ze&&i.pathFilter){var mo=ae.relative(ut,on),ho=mo.slice(0,mo.length-ee[0].length),er=i.pathFilter(ze,be,ho);if(er)return te([""].concat(_.slice()),ae.resolve(ut,er),ze)}a(on,fo)}function fo(It,hn){if(It)return Q(It);if(hn)return Q(null,on,ze);te(ee.slice(1),be,ze)}}}function x(v,D){if(v===""||v==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(v)||/[/\\]node_modules[/\\]*$/.test(v))return D(null);Ar(p,v,i,function($,U){if($)return x(ae.dirname(v),D);var Q=ae.join(U,"package.json");a(Q,function(Le,te){if(!te)return x(ae.dirname(v),D);d(l,Q,function(ee,be){ee&&D(ee);var ct=be;ct&&i.packageFilter&&(ct=i.packageFilter(ct,Q)),D(null,ct,v)})})})}function B(v,D,$){var U=$,Q=D;typeof Q=="function"&&(U=Q,Q=i.package),Ar(p,v,i,function(Le,te){if(Le)return U(Le);var ee=ae.join(te,"package.json");a(ee,function(be,ct){if(be)return U(be);if(!ct)return W(ae.join(v,"index"),Q,U);d(l,ee,function(on,ze){if(on)return U(on);var Ee=ze;if(Ee&&i.packageFilter&&(Ee=i.packageFilter(Ee,ee)),Ee&&Ee.main){if(typeof Ee.main!="string"){var fo=new TypeError("package \u201C"+Ee.name+"\u201D `main` must be a string");return fo.code="INVALID_PACKAGE_MAIN",U(fo)}(Ee.main==="."||Ee.main==="./")&&(Ee.main="index"),W(ae.resolve(v,Ee.main),Ee,function(It,hn,ut){if(It)return U(It);if(hn)return U(null,hn,ut);if(!ut)return W(ae.join(v,"index"),ut,U);var mo=ae.resolve(v,ut.main);B(mo,ut,function(ho,er,Ic){if(ho)return U(ho);if(er)return U(null,er,Ic);W(ae.join(v,"index"),Ic,U)})});return}W(ae.join(v,"/index"),Ee,U)})})})}function j(v,D){if(D.length===0)return v(null,void 0);var $=D[0];u(ae.dirname($),U);function U(te,ee){if(te)return v(te);if(!ee)return j(v,D.slice(1));W($,i.package,Q)}function Q(te,ee,be){if(te)return v(te);if(ee)return v(null,ee,be);B($,i.package,Le)}function Le(te,ee,be){if(te)return v(te);if(ee)return v(null,ee,be);j(v,D.slice(1))}}function he(v,D,$){var U=function(){return nS(v,D,i)};j($,h?h(v,D,U,i):U())}}});var Op=g((tN,rS)=>{rS.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Ip=g((nN,Rp)=>{"use strict";c();var oS=vr(),Cp=Op(),bp={};for(Xo in Cp)Object.prototype.hasOwnProperty.call(Cp,Xo)&&(bp[Xo]=oS(Xo));var Xo;Rp.exports=bp});var Np=g((oN,Pp)=>{"use strict";c();var iS=vr();Pp.exports=function(e){return iS(e)}});var Lp=g((sN,xp)=>{"use strict";c();var sS=vr(),fn=q("fs"),Te=q("path"),aS=ta(),cS=na(),uS=ia(),lS=sa(),pS=process.platform!=="win32"&&fn.realpathSync&&typeof fn.realpathSync.native=="function"?fn.realpathSync.native:fn.realpathSync,Mp=aS(),dS=function(){return[Te.join(Mp,".node_modules"),Te.join(Mp,".node_libraries")]},fS=function(e){try{var n=fn.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&(n.isFile()||n.isFIFO())},mS=function(e){try{var n=fn.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&n.isDirectory()},hS=function(e){try{return pS(e)}catch(n){if(n.code!=="ENOENT")throw n}return e},Or=function(e,n,r){return r&&r.preserveSymlinks===!1?e(n):n},_S=function(e,n){var r=e(n);try{var o=JSON.parse(r);return o}catch{}},gS=function(e,n,r){for(var o=uS(n,r,e),i=0;i<o.length;i++)o[i]=Te.join(o[i],e);return o};xp.exports=function(e,n){if(typeof e!="string")throw new TypeError("Path must be a string.");var r=lS(e,n),o=r.isFile||fS,i=r.readFileSync||fn.readFileSync,s=r.isDirectory||mS,a=r.realpathSync||hS,u=r.readPackageSync||_S;if(r.readFileSync&&r.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var l=r.packageIterator,p=r.extensions||[".js"],d=r.includeCoreModules!==!1,m=r.basedir||Te.dirname(cS()),h=r.filename||m;r.paths=r.paths||dS();var _=Or(a,Te.resolve(m),r);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var T=Te.resolve(_,e);(e==="."||e===".."||e.slice(-1)==="/")&&(T+="/");var R=A(T)||w(T);if(R)return Or(a,R,r)}else{if(d&&sS(e))return e;var M=W(e,_);if(M)return Or(a,M,r)}var b=new Error("Cannot find module '"+e+"' from '"+h+"'");throw b.code="MODULE_NOT_FOUND",b;function A(x){var B=N(Te.dirname(x));if(B&&B.dir&&B.pkg&&r.pathFilter){var j=Te.relative(B.dir,x),he=r.pathFilter(B.pkg,x,j);he&&(x=Te.resolve(B.dir,he))}if(o(x))return x;for(var v=0;v<p.length;v++){var D=x+p[v];if(o(D))return D}}function N(x){if(!(x===""||x==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(x))&&!/[/\\]node_modules[/\\]*$/.test(x)){var B=Te.join(Or(a,x,r),"package.json");if(!o(B))return N(Te.dirname(x));var j=u(i,B);return j&&r.packageFilter&&(j=r.packageFilter(j,x)),{pkg:j,dir:x}}}function w(x){var B=Te.join(Or(a,x,r),"/package.json");if(o(B)){try{var j=u(i,B)}catch{}if(j&&r.packageFilter&&(j=r.packageFilter(j,x)),j&&j.main){if(typeof j.main!="string"){var he=new TypeError("package \u201C"+j.name+"\u201D `main` must be a string");throw he.code="INVALID_PACKAGE_MAIN",he}(j.main==="."||j.main==="./")&&(j.main="index");try{var v=A(Te.resolve(x,j.main));if(v)return v;var D=w(Te.resolve(x,j.main));if(D)return D}catch{}}}return A(Te.join(x,"/index"))}function W(x,B){for(var j=function(){return gS(x,B,r)},he=l?l(x,B,j,r):j(),v=0;v<he.length;v++){var D=he[v];if(s(Te.dirname(D))){var $=A(D);if($)return $;var U=w(D);if(U)return U}}}}});var Fp=g((cN,wp)=>{"use strict";c();var Zo=Ap();Zo.core=Ip();Zo.isCore=Np();Zo.sync=Lp();wp.exports=Zo});var ca=g((lN,Dp)=>{"use strict";c();var aa=q("path");Dp.exports=function(t){var e=t.split(aa.sep),n=e.lastIndexOf("node_modules");if(n!==-1&&e[n+1]){var r=e[n+1][0]==="@",o=r?e[n+1]+"/"+e[n+2]:e[n+1],i=r?3:2;return{name:o,basedir:e.slice(0,n+i).join(aa.sep),path:e.slice(n+i).join(aa.sep)}}}});var kp=g((dN,ES)=>{ES.exports={name:"require-in-the-middle",version:"7.4.0",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/elastic/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/elastic/require-in-the-middle/issues"},homepage:"https://github.com/elastic/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var da=g((fN,pa)=>{"use strict";c();var Sn=q("path"),ft=q("module"),ua=Fp(),oe=fg()("require-in-the-middle"),TS=ca();pa.exports=br;pa.exports.Hook=br;var Cr;if(ft.isBuiltin)Cr=ft.isBuiltin;else{let[t,e]=process.versions.node.split(".").map(Number);t===8&&e<8?Cr=n=>n==="http2"?!0:!!ua.core[n]:Cr=n=>!!ua.core[n]}var SS=/([/\\]index)?(\.js)?$/,la=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,n){if(this._localCache.has(e))return!0;if(n)return!1;{let r=q.cache[e];return!!(r&&this._kRitmExports in r)}}get(e,n){let r=this._localCache.get(e);if(r!==void 0)return r;if(!n){let o=q.cache[e];return o&&o[this._kRitmExports]}}set(e,n,r){r?this._localCache.set(e,n):e in q.cache?q.cache[e][this._kRitmExports]=n:(oe('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,n))}};function br(t,e,n){if(!(this instanceof br))return new br(t,e,n);if(typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),typeof ft._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof ft._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,kp().bugs.url);return}this._cache=new la,this._unhooked=!1,this._origRequire=ft.prototype.require;let r=this,o=new Set,i=e?e.internals===!0:!1,s=Array.isArray(t);oe("registering require hook"),this._require=ft.prototype.require=function(u){return r._unhooked===!0?(oe("ignoring require call - module is soft-unhooked"),r._origRequire.apply(this,arguments)):a.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(u){return r._unhooked===!0?(oe("ignoring process.getBuiltinModule call - module is soft-unhooked"),r._origGetBuiltinModule.apply(this,arguments)):a.call(this,arguments,!0)});function a(u,l){let p=u[0],d=Cr(p),m;if(d){if(m=p,p.startsWith("node:")){let b=p.slice(5);Cr(b)&&(m=b)}}else{if(l)return oe("call to process.getBuiltinModule with unknown built-in id"),r._origGetBuiltinModule.apply(this,u);try{m=ft._resolveFilename(p,this)}catch(b){return oe('Module._resolveFilename("%s") threw %j, calling original Module.require',p,b.message),r._origRequire.apply(this,u)}}let h,_;if(oe("processing %s module require('%s'): %s",d===!0?"core":"non-core",p,m),r._cache.has(m,d)===!0)return oe("returning already patched cached module: %s",m),r._cache.get(m,d);let T=o.has(m);T===!1&&o.add(m);let R=l?r._origGetBuiltinModule.apply(this,u):r._origRequire.apply(this,u);if(T===!0)return oe("module is in the process of being patched already - ignoring: %s",m),R;if(o.delete(m),d===!0){if(s===!0&&t.includes(m)===!1)return oe("ignoring core module not on whitelist: %s",m),R;h=m}else if(s===!0&&t.includes(m)){let b=Sn.parse(m);h=b.name,_=b.dir}else{let b=TS(m);if(b===void 0)return oe("could not parse filename: %s",m),R;h=b.name,_=b.basedir;let A=yS(b);oe("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",h,p,A,_);let N=!1;if(s){if(!p.startsWith(".")&&t.includes(p)&&(h=p,N=!0),!t.includes(h)&&!t.includes(A))return R;t.includes(A)&&A!==h&&(h=A,N=!0)}if(!N){let w;try{w=ua.sync(h,{basedir:_})}catch{return oe("could not resolve module: %s",h),r._cache.set(m,R,d),R}if(w!==m)if(i===!0)h=h+Sn.sep+Sn.relative(_,m),oe("preparing to process require of internal file: %s",h);else return oe("ignoring require of non-main module file: %s",w),r._cache.set(m,R,d),R}}r._cache.set(m,R,d),oe("calling require hook: %s",h);let M=n(R,h,_);return r._cache.set(m,M,d),oe("returning module: %s",h),M}}br.prototype.unhook=function(){this._unhooked=!0,this._require===ft.prototype.require?(ft.prototype.require=this._origRequire,oe("require unhook successful")):oe("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,oe("process.getBuiltinModule unhook successful")):oe("process.getBuiltinModule unhook unsuccessful"))};function yS(t){let e=Sn.sep!=="/"?t.path.split(Sn.sep).join("/"):t.path;return Sn.posix.join(t.name,e).replace(SS,"")}});var Gp,Up,Hp,Rr,jp,qp,Bp=S(()=>{"use strict";c();Gp=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Up=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},Hp=function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},Rr="/",jp=function(){function t(){this.hooks=[],this.children=new Map}return t}(),qp=function(){function t(){this._trie=new jp,this._counter=0}return t.prototype.insert=function(e){var n,r,o=this._trie;try{for(var i=Gp(e.moduleName.split(Rr)),s=i.next();!s.done;s=i.next()){var a=s.value,u=o.children.get(a);u||(u=new jp,o.children.set(a,u)),o=u}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}o.hooks.push({hook:e,insertedId:this._counter++})},t.prototype.search=function(e,n){var r,o,i=n===void 0?{}:n,s=i.maintainInsertionOrder,a=i.fullOnly,u=this._trie,l=[],p=!0;try{for(var d=Gp(e.split(Rr)),m=d.next();!m.done;m=d.next()){var h=m.value,_=u.children.get(h);if(!_){p=!1;break}a||l.push.apply(l,Hp([],Up(_.hooks),!1)),u=_}}catch(T){r={error:T}}finally{try{m&&!m.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return a&&p&&l.push.apply(l,Hp([],Up(u.hooks),!1)),l.length===0?[]:l.length===1?[l[0].hook]:(s&&l.sort(function(T,R){return T.insertedId-R.insertedId}),l.map(function(T){var R=T.hook;return R}))},t}()});import*as fa from"path";function OS(t){return fa.sep!==Rr?t.split(fa.sep).join(Rr):t}var Wp,vS,AS,Vp,Kp=S(()=>{"use strict";c();Wp=k(da());Bp();vS=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},AS=["afterEach","after","beforeEach","before","describe","it"].every(function(t){return typeof global[t]=="function"}),Vp=function(){function t(){this._moduleNameTrie=new qp,this._initialize()}return t.prototype._initialize=function(){var e=this;new Wp.Hook(null,{internals:!0},function(n,r,o){var i,s,a=OS(r),u=e._moduleNameTrie.search(a,{maintainInsertionOrder:!0,fullOnly:o===void 0});try{for(var l=vS(u),p=l.next();!p.done;p=l.next()){var d=p.value.onRequire;n=d(n,r,o)}}catch(m){i={error:m}}finally{try{p&&!p.done&&(s=l.return)&&s.call(l)}finally{if(i)throw i.error}}return n})},t.prototype.register=function(e,n){var r={moduleName:e,onRequire:n};return this._moduleNameTrie.insert(r),r},t.getInstance=function(){var e;return AS?new t:this._instance=(e=this._instance)!==null&&e!==void 0?e:new t},t}()});var Zp=g(Ir=>{"use strict";c();var Yp=[],ma=new WeakMap,$p=new Map,Xp=[],CS={set(t,e,n){return ma.get(t)[e](n)},defineProperty(t,e,n){if(!("value"in n))throw new Error("Getters/setters are not supported for exports property descriptors.");return ma.get(t)[e](n.value)}};function bS(t,e,n,r){$p.set(t,r),ma.set(e,n);let o=new Proxy(e,CS);Yp.forEach(i=>i(t,o)),Xp.push([t,o])}Ir.register=bS;Ir.importHooks=Yp;Ir.specifiers=$p;Ir.toHook=Xp});var nd=g((AN,Nr)=>{"use strict";c();var zp=q("path"),RS=ca(),{fileURLToPath:Jp}=q("url"),{importHooks:ha,specifiers:IS,toHook:PS}=Zp();function ed(t){ha.push(t),PS.forEach(([e,n])=>t(e,n))}function td(t){let e=ha.indexOf(t);e>-1&&ha.splice(e,1)}function Qp(t,e,n,r){let o=t(e,n,r);o&&o!==e&&(e.default=o)}function Pr(t,e,n){if(!(this instanceof Pr))return new Pr(t,e,n);typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null);let r=e?e.internals===!0:!1;this._iitmHook=(o,i)=>{let s=o,a=o.startsWith("node:"),u;if(a)o=o.replace(/^node:/,"");else{if(o.startsWith("file://"))try{o=Jp(o)}catch{}let l=RS(o);l&&(o=l.name,u=l.basedir)}if(t){for(let l of t)if(l===o){if(u){if(r)o=o+zp.sep+zp.relative(u,Jp(s));else if(!u.endsWith(IS.get(s)))continue}Qp(n,i,o,u)}}else Qp(n,i,o,u)},ed(this._iitmHook)}Pr.prototype.unhook=function(){td(this._iitmHook)};Nr.exports=Pr;Nr.exports.Hook=Pr;Nr.exports.addHook=ed;Nr.exports.removeHook=td});function xS(t,e,n){var r,o;try{o=t()}catch(i){r=i}finally{if(e(r,o),r&&!n)throw r;return o}}function LS(t,e,n){return NS(this,void 0,void 0,function(){var r,o,i;return MS(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,t()];case 1:return o=s.sent(),[3,4];case 2:return i=s.sent(),r=i,[3,4];case 3:if(e(r,o),r&&!n)throw r;return[2,o];case 4:return[2]}})})}function _a(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var NS,MS,ga=S(()=>{"use strict";c();NS=function(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(d){s(d)}}function u(p){try{l(r.throw(p))}catch(d){s(d)}}function l(p){p.done?i(p.value):o(p.value).then(a,u)}l((r=r.apply(t,e||[])).next())})},MS=function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(p){return u([l,p])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(p){l=[6,p],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}});import*as yn from"path";import{types as rd}from"util";import{readFileSync as FS}from"fs";function od(t,e,n){return typeof e>"u"?t.includes("*"):t.some(function(r){return(0,id.satisfies)(e,r,{includePrerelease:n})})}var id,xr,sd,ad,wS,Mr,zo,cd=S(()=>{"use strict";c();id=k(Qc()),xr=k(ea());tp();Kp();sd=k(nd());F();ad=k(da());ga();wS=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zo=function(t){wS(e,t);function e(n,r,o){var i=t.call(this,n,r,o)||this;i._hooks=[],i._requireInTheMiddleSingleton=Vp.getInstance(),i._enabled=!1,i._wrap=function(a,u,l){if(_a(a[u])&&i._unwrap(a,u),rd.isProxy(a)){var p=(0,xr.wrap)(Object.assign({},a),u,l);return Object.defineProperty(a,u,{value:p})}else return(0,xr.wrap)(a,u,l)},i._unwrap=function(a,u){return rd.isProxy(a)?Object.defineProperty(a,u,{value:a[u]}):(0,xr.unwrap)(a,u)},i._massWrap=function(a,u,l){if(a)Array.isArray(a)||(a=[a]);else{_e.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){_e.error("must provide one or more functions to wrap on modules");return}a.forEach(function(p){u.forEach(function(d){i._wrap(p,d,l)})})},i._massUnwrap=function(a,u){if(a)Array.isArray(a)||(a=[a]);else{_e.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){_e.error("must provide one or more functions to wrap on modules");return}a.forEach(function(l){u.forEach(function(p){i._unwrap(l,p)})})};var s=i.init();return s&&!Array.isArray(s)&&(s=[s]),i._modules=s||[],i._modules.length===0&&_e.debug("No modules instrumentation has been defined for "+("'"+i.instrumentationName+"@"+i.instrumentationVersion+"'")+", nothing will be patched"),i._config.enabled&&i.enable(),i}return e.prototype._warnOnPreloadedModules=function(){var n=this;this._modules.forEach(function(r){var o=r.name;try{var i=q.resolve(o);q.cache[i]&&n._diag.warn("Module "+o+" has been loaded before "+n.instrumentationName+" so it might not work, please initialize it before requiring "+o)}catch{}})},e.prototype._extractPackageVersion=function(n){try{var r=FS(yn.join(n,"package.json"),{encoding:"utf8"}),o=JSON.parse(r).version;return typeof o=="string"?o:void 0}catch{_e.warn("Failed extracting version",n)}},e.prototype._onRequire=function(n,r,o,i){var s=this,a;if(!i)return typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:n.name}),n.patch(r)):r;var u=this._extractPackageVersion(i);if(n.moduleVersion=u,n.name===o)return od(n.supportedVersions,u,n.includePrerelease)&&typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:n.name,version:n.moduleVersion,baseDir:i}),n.patch(r,n.moduleVersion)):r;var l=(a=n.files)!==null&&a!==void 0?a:[],p=yn.normalize(o),d=l.filter(function(m){return m.name===p}).filter(function(m){return od(m.supportedVersions,u,n.includePrerelease)});return d.reduce(function(m,h){return h.moduleExports=m,s._enabled?(s._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:n.name,version:n.moduleVersion,fileName:h.name,baseDir:i}),h.patch(m,n.moduleVersion)):m},r)},e.prototype.enable=function(){var n,r,o,i,s,a,u=this;if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){try{for(var l=Mr(this._modules),p=l.next();!p.done;p=l.next()){var d=p.value;typeof d.patch=="function"&&d.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:d.name,version:d.moduleVersion}),d.patch(d.moduleExports,d.moduleVersion));try{for(var m=(o=void 0,Mr(d.files)),h=m.next();!h.done;h=m.next()){var _=h.value;_.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:d.name,version:d.moduleVersion,fileName:_.name}),_.patch(_.moduleExports,d.moduleVersion))}}catch(N){o={error:N}}finally{try{h&&!h.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}}catch(N){n={error:N}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return}this._warnOnPreloadedModules();var T=function(N){var w=function(j,he,v){return u._onRequire(N,j,he,v)},W=function(j,he,v){return u._onRequire(N,j,he,v)},x=yn.isAbsolute(N.name)?new ad.Hook([N.name],{internals:!0},W):R._requireInTheMiddleSingleton.register(N.name,W);R._hooks.push(x);var B=new sd.Hook([N.name],{internals:!1},w);R._hooks.push(B)},R=this;try{for(var M=Mr(this._modules),b=M.next();!b.done;b=M.next()){var A=b.value;T(A)}}catch(N){s={error:N}}finally{try{b&&!b.done&&(a=M.return)&&a.call(M)}finally{if(s)throw s.error}}}},e.prototype.disable=function(){var n,r,o,i;if(this._enabled){this._enabled=!1;try{for(var s=Mr(this._modules),a=s.next();!a.done;a=s.next()){var u=a.value;typeof u.unpatch=="function"&&u.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:u.name,version:u.moduleVersion}),u.unpatch(u.moduleExports,u.moduleVersion));try{for(var l=(o=void 0,Mr(u.files)),p=l.next();!p.done;p=l.next()){var d=p.value;d.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:u.name,version:u.moduleVersion,fileName:d.name}),d.unpatch(d.moduleExports,u.moduleVersion))}}catch(m){o={error:m}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}}catch(m){n={error:m}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.isEnabled=function(){return this._enabled},e}(ep)});import{normalize as Jo}from"path";var ud=S(()=>{"use strict";c()});var ld=S(()=>{"use strict";c();cd();ud()});var Ea=S(()=>{"use strict";c();ld()});var pd,dd=S(()=>{"use strict";c();pd=function(){function t(e,n,r,o,i){this.name=e,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}return t}()});var fd,md=S(()=>{"use strict";c();Ea();fd=function(){function t(e,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=Jo(e)}return t}()});var hd=S(()=>{"use strict";c()});var _d=S(()=>{"use strict";c()});var pe={};Ki(pe,{InstrumentationBase:()=>zo,InstrumentationNodeModuleDefinition:()=>pd,InstrumentationNodeModuleFile:()=>fd,isWrapped:()=>_a,registerInstrumentations:()=>Yo,safeExecuteInTheMiddle:()=>xS,safeExecuteInTheMiddleAsync:()=>LS});var ce=S(()=>{"use strict";c();Zl();Ea();dd();md();hd();_d();ga()});var Sd=g(Qo=>{"use strict";c();Object.defineProperty(Qo,"__esModule",{value:!0});Qo.HttpInstrumentation=void 0;var L=(F(),y(z)),vn=(De(),y(Ke)),gd=Qc(),Ed=q("url"),Z=Ks(),DS=xl(),ke=(ce(),y(pe)),Td=(De(),y(Ke)),Ta=q("events"),kS=(ne(),y(le)),Sa=class extends ke.InstrumentationBase{constructor(e={}){super("@opentelemetry/instrumentation-http",DS.VERSION,e),this._spanNotEnded=new WeakSet,this._headerCapture=this._createHeaderCapture()}_updateMetricInstruments(){this._httpServerDurationHistogram=this.meter.createHistogram("http.server.duration",{description:"Measures the duration of inbound HTTP requests.",unit:"ms",valueType:L.ValueType.DOUBLE}),this._httpClientDurationHistogram=this.meter.createHistogram("http.client.duration",{description:"Measures the duration of outbound HTTP requests.",unit:"ms",valueType:L.ValueType.DOUBLE})}setConfig(e={}){super.setConfig(e),this._headerCapture=this._createHeaderCapture()}init(){return[this._getHttpsInstrumentation(),this._getHttpInstrumentation()]}_getHttpInstrumentation(){return new ke.InstrumentationNodeModuleDefinition("http",["*"],e=>(this._wrap(e,"request",this._getPatchOutgoingRequestFunction("http")),this._wrap(e,"get",this._getPatchOutgoingGetFunction(e.request)),this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("http")),e),e=>{e!==void 0&&(this._unwrap(e,"request"),this._unwrap(e,"get"),this._unwrap(e.Server.prototype,"emit"))})}_getHttpsInstrumentation(){return new ke.InstrumentationNodeModuleDefinition("https",["*"],e=>(this._wrap(e,"request",this._getPatchHttpsOutgoingRequestFunction("https")),this._wrap(e,"get",this._getPatchHttpsOutgoingGetFunction(e.request)),this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("https")),e),e=>{e!==void 0&&(this._unwrap(e,"request"),this._unwrap(e,"get"),this._unwrap(e.Server.prototype,"emit"))})}_getPatchIncomingRequestFunction(e){return n=>this._incomingRequestFunction(e,n)}_getPatchOutgoingRequestFunction(e){return n=>this._outgoingRequestFunction(e,n)}_getPatchOutgoingGetFunction(e){return n=>function(o,...i){let s=e(o,...i);return s.end(),s}}_getPatchHttpsOutgoingRequestFunction(e){return n=>{let r=this;return function(i,...s){var a;return e==="https"&&typeof i=="object"&&((a=i?.constructor)===null||a===void 0?void 0:a.name)!=="URL"&&(i=Object.assign({},i),r._setDefaultOptions(i)),r._getPatchOutgoingRequestFunction(e)(n)(i,...s)}}}_setDefaultOptions(e){e.protocol=e.protocol||"https:",e.port=e.port||443}_getPatchHttpsOutgoingGetFunction(e){return n=>{let r=this;return function(i,...s){return r._getPatchOutgoingGetFunction(e)(n)(i,...s)}}}_traceClientRequest(e,n,r,o){this.getConfig().requestHook&&this._callRequestHook(n,e);let i=!1;return e.prependListener("response",s=>{this._diag.debug("outgoingRequest on response()"),e.listenerCount("response")<=1&&s.resume();let a=Z.getOutgoingRequestAttributesOnResponse(s);n.setAttributes(a),o=Object.assign(o,Z.getOutgoingRequestMetricAttributesOnResponse(a)),this.getConfig().responseHook&&this._callResponseHook(n,s),this._headerCapture.client.captureRequestHeaders(n,l=>e.getHeader(l)),this._headerCapture.client.captureResponseHeaders(n,l=>s.headers[l]),L.context.bind(L.context.active(),s);let u=()=>{if(this._diag.debug("outgoingRequest on end()"),i)return;i=!0;let l;s.aborted&&!s.complete?l={code:L.SpanStatusCode.ERROR}:l={code:Z.parseResponseStatus(L.SpanKind.CLIENT,s.statusCode)},n.setStatus(l),this.getConfig().applyCustomAttributesOnSpan&&(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(n,e,s),()=>{},!0),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o)};s.on("end",u),gd.lt(process.version,"16.0.0")&&s.on("close",u),s.on(Ta.errorMonitor,l=>{this._diag.debug("outgoingRequest on error()",l),!i&&(i=!0,Z.setSpanWithError(n,l),n.setStatus({code:L.SpanStatusCode.ERROR,message:l.message}),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))})}),e.on("close",()=>{this._diag.debug("outgoingRequest on request close()"),!(e.aborted||i)&&(i=!0,this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))}),e.on(Ta.errorMonitor,s=>{this._diag.debug("outgoingRequest on request error()",s),!i&&(i=!0,Z.setSpanWithError(n,s),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))}),this._diag.debug("http.ClientRequest return request"),e}_incomingRequestFunction(e,n){let r=this;return function(i,...s){if(i!=="request")return n.apply(this,[i,...s]);let a=s[0],u=s[1],l=a.url&&Ed.parse(a.url).pathname||"/",p=a.method||"GET";if(r._diag.debug(`${e} instrumentation incomingRequest`),Z.isIgnored(l,r.getConfig().ignoreIncomingPaths,A=>r._diag.error("caught ignoreIncomingPaths error: ",A))||(0,ke.safeExecuteInTheMiddle)(()=>{var A,N;return(N=(A=r.getConfig()).ignoreIncomingRequestHook)===null||N===void 0?void 0:N.call(A,a)},A=>{A!=null&&r._diag.error("caught ignoreIncomingRequestHook error: ",A)},!0))return L.context.with((0,vn.suppressTracing)(L.context.active()),()=>(L.context.bind(L.context.active(),a),L.context.bind(L.context.active(),u),n.apply(this,[i,...s])));let d=a.headers,m=Z.getIncomingRequestAttributes(a,{component:e,serverName:r.getConfig().serverName,hookAttributes:r._callStartSpanHook(a,r.getConfig().startIncomingSpanHook)}),h={kind:L.SpanKind.SERVER,attributes:m},_=(0,vn.hrTime)(),T=Z.getIncomingRequestMetricAttributes(m),R=L.propagation.extract(L.ROOT_CONTEXT,d),M=r._startHttpSpan(p,h,R),b={type:Td.RPCType.HTTP,span:M};return L.context.with((0,Td.setRPCMetadata)(L.trace.setSpan(R,M),b),()=>{L.context.bind(L.context.active(),a),L.context.bind(L.context.active(),u),r.getConfig().requestHook&&r._callRequestHook(M,a),r.getConfig().responseHook&&r._callResponseHook(M,u),r._headerCapture.server.captureRequestHeaders(M,N=>a.headers[N]);let A=!1;return u.on("close",()=>{A||r._onServerResponseFinish(a,u,M,T,_)}),u.on(Ta.errorMonitor,N=>{A=!0,r._onServerResponseError(M,T,_,N)}),(0,ke.safeExecuteInTheMiddle)(()=>n.apply(this,[i,...s]),N=>{if(N)throw Z.setSpanWithError(M,N),r._closeHttpSpan(M,L.SpanKind.SERVER,_,T),N})})}}_outgoingRequestFunction(e,n){let r=this;return function(i,...s){if(!Z.isValidOptionsType(i))return n.apply(this,[i,...s]);let a=typeof s[0]=="object"&&(typeof i=="string"||i instanceof Ed.URL)?s.shift():void 0,{origin:u,pathname:l,method:p,optionsParsed:d}=Z.getRequestInfo(i,a);if(e==="http"&&gd.lt(process.version,"9.0.0")&&d.protocol==="https:")return n.apply(this,[d,...s]);if(Z.isIgnored(u+l,r.getConfig().ignoreOutgoingUrls,w=>r._diag.error("caught ignoreOutgoingUrls error: ",w))||(0,ke.safeExecuteInTheMiddle)(()=>{var w,W;return(W=(w=r.getConfig()).ignoreOutgoingRequestHook)===null||W===void 0?void 0:W.call(w,d)},w=>{w!=null&&r._diag.error("caught ignoreOutgoingRequestHook error: ",w)},!0))return n.apply(this,[d,...s]);let{hostname:m,port:h}=Z.extractHostnameAndPort(d),_=Z.getOutgoingRequestAttributes(d,{component:e,port:h,hostname:m,hookAttributes:r._callStartSpanHook(d,r.getConfig().startOutgoingSpanHook)}),T=(0,vn.hrTime)(),R=Z.getOutgoingRequestMetricAttributes(_),M={kind:L.SpanKind.CLIENT,attributes:_},b=r._startHttpSpan(p,M),A=L.context.active(),N=L.trace.setSpan(A,b);return d.headers?d.headers=Object.assign({},d.headers):d.headers={},L.propagation.inject(N,d.headers),L.context.with(N,()=>{let w=s[s.length-1];typeof w=="function"&&(s[s.length-1]=L.context.bind(A,w));let W=(0,ke.safeExecuteInTheMiddle)(()=>n.apply(this,[d,...s]),x=>{if(x)throw Z.setSpanWithError(b,x),r._closeHttpSpan(b,L.SpanKind.CLIENT,T,R),x});return r._diag.debug(`${e} instrumentation outgoingRequest`),L.context.bind(A,W),r._traceClientRequest(W,b,T,R)})}}_onServerResponseFinish(e,n,r,o,i){let s=Z.getIncomingRequestAttributesOnResponse(e,n);o=Object.assign(o,Z.getIncomingRequestMetricAttributesOnResponse(s)),this._headerCapture.server.captureResponseHeaders(r,u=>n.getHeader(u)),r.setAttributes(s).setStatus({code:Z.parseResponseStatus(L.SpanKind.SERVER,n.statusCode)});let a=s[kS.SEMATTRS_HTTP_ROUTE];a&&r.updateName(`${e.method||"GET"} ${a}`),this.getConfig().applyCustomAttributesOnSpan&&(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(r,e,n),()=>{},!0),this._closeHttpSpan(r,L.SpanKind.SERVER,i,o)}_onServerResponseError(e,n,r,o){Z.setSpanWithError(e,o),this._closeHttpSpan(e,L.SpanKind.SERVER,r,n)}_startHttpSpan(e,n,r=L.context.active()){let o=n.kind===L.SpanKind.CLIENT?this.getConfig().requireParentforOutgoingSpans:this.getConfig().requireParentforIncomingSpans,i,s=L.trace.getSpan(r);return o===!0&&s===void 0?i=L.trace.wrapSpanContext(L.INVALID_SPAN_CONTEXT):o===!0&&s?.spanContext().isRemote?i=s:i=this.tracer.startSpan(e,n,r),this._spanNotEnded.add(i),i}_closeHttpSpan(e,n,r,o){if(!this._spanNotEnded.has(e))return;e.end(),this._spanNotEnded.delete(e);let i=(0,vn.hrTimeToMilliseconds)((0,vn.hrTimeDuration)(r,(0,vn.hrTime)()));n===L.SpanKind.SERVER?this._httpServerDurationHistogram.record(i,o):n===L.SpanKind.CLIENT&&this._httpClientDurationHistogram.record(i,o)}_callResponseHook(e,n){(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().responseHook(e,n),()=>{},!0)}_callRequestHook(e,n){(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().requestHook(e,n),()=>{},!0)}_callStartSpanHook(e,n){if(typeof n=="function")return(0,ke.safeExecuteInTheMiddle)(()=>n(e),()=>{},!0)}_createHeaderCapture(){var e,n,r,o,i,s,a,u,l,p,d,m;let h=this.getConfig();return{client:{captureRequestHeaders:Z.headerCapture("request",(r=(n=(e=h.headersToSpanAttributes)===null||e===void 0?void 0:e.client)===null||n===void 0?void 0:n.requestHeaders)!==null&&r!==void 0?r:[]),captureResponseHeaders:Z.headerCapture("response",(s=(i=(o=h.headersToSpanAttributes)===null||o===void 0?void 0:o.client)===null||i===void 0?void 0:i.responseHeaders)!==null&&s!==void 0?s:[])},server:{captureRequestHeaders:Z.headerCapture("request",(l=(u=(a=h.headersToSpanAttributes)===null||a===void 0?void 0:a.server)===null||u===void 0?void 0:u.requestHeaders)!==null&&l!==void 0?l:[]),captureResponseHeaders:Z.headerCapture("response",(m=(d=(p=h.headersToSpanAttributes)===null||p===void 0?void 0:p.server)===null||d===void 0?void 0:d.responseHeaders)!==null&&m!==void 0?m:[])}}}};Qo.HttpInstrumentation=Sa});var vd=g(yd=>{"use strict";c();Object.defineProperty(yd,"__esModule",{value:!0})});var Ad=g(mt=>{"use strict";c();var GS=mt&&mt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ya=mt&&mt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&GS(e,t,n)};Object.defineProperty(mt,"__esModule",{value:!0});ya(Sd(),mt);ya(vd(),mt);ya(Ks(),mt)});var ni=g(Fr=>{"use strict";c();Object.defineProperty(Fr,"__esModule",{value:!0});Fr.ExpressLayerType=void 0;var ov;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(ov=Fr.ExpressLayerType||(Fr.ExpressLayerType={}))});var ri=g(Dr=>{"use strict";c();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AttributeNames=void 0;var iv;(function(t){t.EXPRESS_TYPE="express.type",t.EXPRESS_NAME="express.name"})(iv=Dr.AttributeNames||(Dr.AttributeNames={}))});var Ia=g(On=>{"use strict";c();Object.defineProperty(On,"__esModule",{value:!0});On._LAYERS_STORE_PROPERTY=On.kLayerPatched=void 0;On.kLayerPatched=Symbol("express-layer-patched");On._LAYERS_STORE_PROPERTY="__ot_middlewares"});var af=g(Ge=>{"use strict";c();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.getLayerPath=Ge.asErrorAndMessage=Ge.isLayerIgnored=Ge.getLayerMetadata=Ge.storeLayerPath=void 0;var Pa=ni(),Cn=ri(),Na=Ia(),sv=(t,e)=>{Array.isArray(t[Na._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,Na._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e!==void 0&&t[Na._LAYERS_STORE_PROPERTY].push(e)};Ge.storeLayerPath=sv;var av=(t,e)=>t.name==="router"?{attributes:{[Cn.AttributeNames.EXPRESS_NAME]:e,[Cn.AttributeNames.EXPRESS_TYPE]:Pa.ExpressLayerType.ROUTER},name:`router - ${e}`}:t.name==="bound dispatch"?{attributes:{[Cn.AttributeNames.EXPRESS_NAME]:e??"request handler",[Cn.AttributeNames.EXPRESS_TYPE]:Pa.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e}`:""}`}:{attributes:{[Cn.AttributeNames.EXPRESS_NAME]:t.name,[Cn.AttributeNames.EXPRESS_TYPE]:Pa.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Ge.getLayerMetadata=av;var cv=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")},uv=(t,e,n)=>{var r;if(Array.isArray(n?.ignoreLayersType)&&(!((r=n?.ignoreLayersType)===null||r===void 0)&&r.includes(e)))return!0;if(Array.isArray(n?.ignoreLayers)===!1)return!1;try{for(let o of n.ignoreLayers)if(cv(t,o))return!0}catch{}return!1};Ge.isLayerIgnored=uv;var lv=t=>t instanceof Error?[t,t.message]:[String(t),String(t)];Ge.asErrorAndMessage=lv;var pv=t=>Array.isArray(t[0])?t[0].map(e=>sf(e)||"").join(","):sf(t[0]);Ge.getLayerPath=pv;var sf=t=>{if(typeof t=="string")return t;if(t instanceof RegExp||typeof t=="number")return t.toString()}});var cf=g(bn=>{"use strict";c();Object.defineProperty(bn,"__esModule",{value:!0});bn.PACKAGE_NAME=bn.PACKAGE_VERSION=void 0;bn.PACKAGE_VERSION="0.41.0";bn.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var ff=g(oi=>{"use strict";c();Object.defineProperty(oi,"__esModule",{value:!0});oi.ExpressInstrumentation=void 0;var uf=(De(),y(Ke)),mn=(F(),y(z)),lf=ni(),pf=ri(),Ft=af(),df=cf(),Rn=(ce(),y(pe)),dv=(ne(),y(le)),kr=Ia(),Ma=class extends Rn.InstrumentationBase{constructor(e={}){super(df.PACKAGE_NAME,df.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new Rn.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <5"],e=>{let n=e.Router;return(0,Rn.isWrapped)(n.route)&&this._unwrap(n,"route"),this._wrap(n,"route",this._getRoutePatch()),(0,Rn.isWrapped)(n.use)&&this._unwrap(n,"use"),this._wrap(n,"use",this._getRouterUsePatch()),(0,Rn.isWrapped)(e.application.use)&&this._unwrap(e.application,"use"),this._wrap(e.application,"use",this._getAppUsePatch()),e},e=>{if(e===void 0)return;let n=e.Router;this._unwrap(n,"route"),this._unwrap(n,"use"),this._unwrap(e.application,"use")})]}_getRoutePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return e._applyPatch(s,(0,Ft.getLayerPath)(o)),i}}}_getRouterUsePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return e._applyPatch(s,(0,Ft.getLayerPath)(o)),i}}}_getAppUsePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this._router.stack[this._router.stack.length-1];return e._applyPatch(s,(0,Ft.getLayerPath)(o)),i}}}_applyPatch(e,n){let r=this;e[kr.kLayerPatched]!==!0&&(e[kr.kLayerPatched]=!0,this._wrap(e,"handle",o=>{if(o.length===4)return o;let i=function(s,a){(0,Ft.storeLayerPath)(s,n);let u=s[kr._LAYERS_STORE_PROPERTY].filter(A=>A!=="/"&&A!=="/*").join("").replace(/\/{2,}/g,"/"),l={[dv.SEMATTRS_HTTP_ROUTE]:u.length>0?u:"/"},p=(0,Ft.getLayerMetadata)(e,n),d=p.attributes[pf.AttributeNames.EXPRESS_TYPE],m=(0,uf.getRPCMetadata)(mn.context.active());if(m?.type===uf.RPCType.HTTP&&(m.route=u||"/"),(0,Ft.isLayerIgnored)(p.name,d,r._config))return d===lf.ExpressLayerType.MIDDLEWARE&&s[kr._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(mn.trace.getSpan(mn.context.active())===void 0)return o.apply(this,arguments);let h=r._getSpanName({request:s,layerType:d,route:u},p.name),_=r.tracer.startSpan(h,{attributes:Object.assign(l,p.attributes)});r.getConfig().requestHook&&(0,Rn.safeExecuteInTheMiddle)(()=>r.getConfig().requestHook(_,{request:s,layerType:d,route:u}),A=>{A&&mn.diag.error("express instrumentation: request hook failed",A)},!0);let T=!1;p.attributes[pf.AttributeNames.EXPRESS_TYPE]!==lf.ExpressLayerType.MIDDLEWARE&&(_.end(),T=!0);let R=()=>{T===!1&&(T=!0,_.end())},M=Array.from(arguments),b=M.findIndex(A=>typeof A=="function");b>=0&&(arguments[b]=function(){var A;let N=arguments[0],w=![void 0,null,"route","router"].includes(N);if(!T&&w){let[x,B]=(0,Ft.asErrorAndMessage)(N);_.recordException(x),_.setStatus({code:mn.SpanStatusCode.ERROR,message:B})}return T===!1&&(T=!0,(A=s.res)===null||A===void 0||A.removeListener("finish",R),_.end()),s.route&&w||s[kr._LAYERS_STORE_PROPERTY].pop(),M[b].apply(this,arguments)});try{return o.apply(this,arguments)}catch(A){let[N,w]=(0,Ft.asErrorAndMessage)(A);throw _.recordException(N),_.setStatus({code:mn.SpanStatusCode.ERROR,message:w}),A}finally{T||a.once("finish",R)}};return Object.keys(o).forEach(s=>{Object.defineProperty(i,s,{get(){return o[s]},set(a){o[s]=a}})}),i}))}_getSpanName(e,n){var r;let o=this.getConfig().spanNameHook;if(!(o instanceof Function))return n;try{return(r=o(e,n))!==null&&r!==void 0?r:n}catch(i){return mn.diag.error("express instrumentation: error calling span name rewrite hook",i),n}}};oi.ExpressInstrumentation=Ma});var hf=g(mf=>{"use strict";c();Object.defineProperty(mf,"__esModule",{value:!0})});var _f=g(et=>{"use strict";c();var fv=et&&et.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ii=et&&et.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&fv(e,t,n)};Object.defineProperty(et,"__esModule",{value:!0});ii(ff(),et);ii(ni(),et);ii(ri(),et);ii(hf(),et)});var xa=g($e=>{"use strict";c();Object.defineProperty($e,"__esModule",{value:!0});$e.FastifyNames=$e.FastifyTypes=$e.AttributeNames=void 0;var hv;(function(t){t.FASTIFY_NAME="fastify.name",t.FASTIFY_TYPE="fastify.type",t.HOOK_NAME="hook.name",t.PLUGIN_NAME="plugin.name"})(hv=$e.AttributeNames||($e.AttributeNames={}));var _v;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(_v=$e.FastifyTypes||($e.FastifyTypes={}));var gv;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request handler"})(gv=$e.FastifyNames||($e.FastifyNames={}))});var Of=g(Af=>{"use strict";c();Object.defineProperty(Af,"__esModule",{value:!0})});var La=g(In=>{"use strict";c();Object.defineProperty(In,"__esModule",{value:!0});In.hooksNamesToWrap=In.spanRequestSymbol=void 0;In.spanRequestSymbol=Symbol("opentelemetry.instrumentation.fastify.request_active_span");In.hooksNamesToWrap=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"])});var bf=g(Dt=>{"use strict";c();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.safeExecuteInTheMiddleMaybePromise=Dt.endSpan=Dt.startSpan=void 0;var Ev=(F(),y(z)),si=La();function Tv(t,e,n,r={}){let o=e.startSpan(n,{attributes:r}),i=t[si.spanRequestSymbol]||[];return i.push(o),Object.defineProperty(t,si.spanRequestSymbol,{enumerable:!1,configurable:!0,value:i}),o}Dt.startSpan=Tv;function Sv(t,e){let n=t[si.spanRequestSymbol]||[];n.length&&(n.forEach(r=>{e&&(r.setStatus({code:Ev.SpanStatusCode.ERROR,message:e.message}),r.recordException(e)),r.end()}),delete t[si.spanRequestSymbol])}Dt.endSpan=Sv;function yv(t,e,n){let r,o;try{o=t(),Cf(o)&&o.then(i=>e(void 0,i),i=>e(i))}catch(i){r=i}finally{if(!Cf(o)&&(e(r,o),r&&!n))throw r;return o}}Dt.safeExecuteInTheMiddleMaybePromise=yv;function Cf(t){var e;return typeof t=="object"&&t&&typeof((e=Object.getOwnPropertyDescriptor(t,"then"))===null||e===void 0?void 0:e.value)=="function"||!1}});var Rf=g(Pn=>{"use strict";c();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.PACKAGE_NAME=Pn.PACKAGE_VERSION=void 0;Pn.PACKAGE_VERSION="0.38.0";Pn.PACKAGE_NAME="@opentelemetry/instrumentation-fastify"});var Nf=g(Gt=>{"use strict";c();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.FastifyInstrumentation=Gt.ANONYMOUS_NAME=void 0;var kt=(F(),y(z)),If=(De(),y(Ke)),ai=(ce(),y(pe)),vv=(ne(),y(le)),Av=La(),tt=xa(),Nn=bf(),Pf=Rf();Gt.ANONYMOUS_NAME="anonymous";var wa=class extends ai.InstrumentationBase{constructor(e={}){super(Pf.PACKAGE_NAME,Pf.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new ai.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <5"],e=>this._patchConstructor(e))]}_hookOnRequest(){let e=this;return function(r,o,i){if(!e.isEnabled())return i();e._wrap(o,"send",e._patchSend());let s=r,a=(0,If.getRPCMetadata)(kt.context.active()),u=s.routeOptions?s.routeOptions.url:r.routerPath;u&&a?.type===If.RPCType.HTTP&&(a.route=u),i()}}_wrapHandler(e,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...s){if(!i.isEnabled())return r.apply(this,s);let a=r.name||e||Gt.ANONYMOUS_NAME,u=`${tt.FastifyNames.MIDDLEWARE} - ${a}`,l=s[1],p=(0,Nn.startSpan)(l,i.tracer,u,{[tt.AttributeNames.FASTIFY_TYPE]:tt.FastifyTypes.MIDDLEWARE,[tt.AttributeNames.PLUGIN_NAME]:e,[tt.AttributeNames.HOOK_NAME]:n}),d=o&&s[s.length-1];return d&&(s[s.length-1]=function(...m){(0,Nn.endSpan)(l),d.apply(this,m)}),kt.context.with(kt.trace.setSpan(kt.context.active(),p),()=>(0,Nn.safeExecuteInTheMiddleMaybePromise)(()=>r.apply(this,s),m=>{m instanceof Error&&(p.setStatus({code:kt.SpanStatusCode.ERROR,message:m.message}),p.recordException(m)),o||(0,Nn.endSpan)(l)}))}}_wrapAddHook(){let e=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],s=o[1],a=this.pluginName;if(!Av.hooksNamesToWrap.has(i))return n.apply(this,o);let u=typeof o[o.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,e._wrapHandler(a,i,s,u)])}}}_patchConstructor(e){let n=this;function r(...o){let i=e.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),n._wrap(i,"addHook",n._wrapAddHook()),i}return r.fastify=r,r.default=r,r}_patchSend(){let e=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let s=i[0];return e.isEnabled()?(0,ai.safeExecuteInTheMiddle)(()=>r.apply(this,i),a=>{!a&&s instanceof Error&&(a=s),(0,Nn.endSpan)(this,a)}):r.apply(this,i)}}}_hookPreHandler(){let e=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){var s,a;if(!e.isEnabled())return i();let u=r,l=((s=u.routeOptions)===null||s===void 0?void 0:s.handler)||((a=u.context)===null||a===void 0?void 0:a.handler),p=l?.name.startsWith("bound ")?l.name.substr(6):l?.name,d=`${tt.FastifyNames.REQUEST_HANDLER} - ${p||this.pluginName||Gt.ANONYMOUS_NAME}`,m={[tt.AttributeNames.PLUGIN_NAME]:this.pluginName,[tt.AttributeNames.FASTIFY_TYPE]:tt.FastifyTypes.REQUEST_HANDLER,[vv.SEMATTRS_HTTP_ROUTE]:u.routeOptions?u.routeOptions.url:r.routerPath};p&&(m[tt.AttributeNames.FASTIFY_NAME]=p);let h=(0,Nn.startSpan)(o,e.tracer,d,m);return e.getConfig().requestHook&&(0,ai.safeExecuteInTheMiddle)(()=>e.getConfig().requestHook(h,{request:r}),_=>{_&&e._diag.error("request hook failed",_)},!0),kt.context.with(kt.trace.setSpan(kt.context.active(),h),()=>{i()})}}};Gt.FastifyInstrumentation=wa});var Mf=g(_t=>{"use strict";c();var Ov=_t&&_t.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Fa=_t&&_t.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ov(e,t,n)};Object.defineProperty(_t,"__esModule",{value:!0});Fa(xa(),_t);Fa(Of(),_t);Fa(Nf(),_t)});var Da=g(Xe=>{"use strict";c();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.SpanNames=Xe.TokenKind=Xe.AllowedOperationTypes=void 0;var Rv;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Rv=Xe.AllowedOperationTypes||(Xe.AllowedOperationTypes={}));var Iv;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(Iv=Xe.TokenKind||(Xe.TokenKind={}));var Pv;(function(t){t.EXECUTE="graphql.execute",t.PARSE="graphql.parse",t.RESOLVE="graphql.resolve",t.VALIDATE="graphql.validate",t.SCHEMA_VALIDATE="graphql.validateSchema",t.SCHEMA_PARSE="graphql.parseSchema"})(Pv=Xe.SpanNames||(Xe.SpanNames={}))});var ka=g(Gr=>{"use strict";c();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.AttributeNames=void 0;var Nv;(function(t){t.SOURCE="graphql.source",t.FIELD_NAME="graphql.field.name",t.FIELD_PATH="graphql.field.path",t.FIELD_TYPE="graphql.field.type",t.OPERATION_TYPE="graphql.operation.type",t.OPERATION_NAME="graphql.operation.name",t.VARIABLES="graphql.variables.",t.ERROR_VALIDATION_NAME="graphql.validation.error"})(Nv=Gr.AttributeNames||(Gr.AttributeNames={}))});var ci=g(Mn=>{"use strict";c();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.OTEL_GRAPHQL_DATA_SYMBOL=Mn.OTEL_PATCHED_SYMBOL=void 0;Mn.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");Mn.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var Df=g(ui=>{"use strict";c();Object.defineProperty(ui,"__esModule",{value:!0});ui.OPERATION_NOT_SUPPORTED=void 0;var Fx=ci();ui.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var $f=g(fe=>{"use strict";c();Object.defineProperty(fe,"__esModule",{value:!0});fe.wrapFieldResolver=fe.wrapFields=fe.getSourceFromLocation=fe.getOperation=fe.endSpan=fe.addSpanSource=fe.addInputVariableAttributes=fe.isPromise=void 0;var Ln=(F(),y(z)),Ut=Da(),xn=ka(),gt=ci(),kf=Object.values(Ut.AllowedOperationTypes),Mv=t=>typeof t?.then=="function";fe.isPromise=Mv;var xv=t=>typeof t=="object"&&t!==null;function Ga(t,e,n){Array.isArray(n)?n.forEach((r,o)=>{Ga(t,`${e}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{Ga(t,`${e}.${r}`,o)}):t.setAttribute(`${xn.AttributeNames.VARIABLES}${String(e)}`,n)}function Lv(t,e){Object.entries(e).forEach(([n,r])=>{Ga(t,n,r)})}fe.addInputVariableAttributes=Lv;function jf(t,e,n,r,o){let i=Vf(e,n,r,o);t.setAttribute(xn.AttributeNames.SOURCE,i)}fe.addSpanSource=jf;function wv(t,e,n,r,o){let i=qf(n,o),s=!1;if(!i){s=!0;let a=Bf(n,o);i={parent:a,span:Fv(t,e,n,r,o,a.span),error:null},Gv(n,o,i)}return{spanAdded:s,field:i}}function Fv(t,e,n,r,o,i){var s,a;let u={[xn.AttributeNames.FIELD_NAME]:r.fieldName,[xn.AttributeNames.FIELD_PATH]:o.join("."),[xn.AttributeNames.FIELD_TYPE]:r.returnType.toString()},l=t.startSpan(`${Ut.SpanNames.RESOLVE} ${u[xn.AttributeNames.FIELD_PATH]}`,{attributes:u},i?Ln.trace.setSpan(Ln.context.active(),i):void 0),p=n[gt.OTEL_GRAPHQL_DATA_SYMBOL].source,d=r.fieldNodes.find(m=>m.kind==="Field");return d&&jf(l,p.loc,e().allowValues,(s=d.loc)===null||s===void 0?void 0:s.start,(a=d.loc)===null||a===void 0?void 0:a.end),l}function Dv(t,e){e&&t.recordException(e),t.end()}fe.endSpan=Dv;function kv(t,e){if(!(!t||!Array.isArray(t.definitions)))return e?t.definitions.filter(n=>{var r;return kf.indexOf((r=n)===null||r===void 0?void 0:r.operation)!==-1}).find(n=>{var r,o;return e===((o=(r=n)===null||r===void 0?void 0:r.name)===null||o===void 0?void 0:o.value)}):t.definitions.find(n=>{var r;return kf.indexOf((r=n)===null||r===void 0?void 0:r.operation)!==-1})}fe.getOperation=kv;function Gv(t,e,n){return t[gt.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]=n}function qf(t,e){return t[gt.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]}function Bf(t,e){for(let n=e.length-1;n>0;n--){let r=qf(t,e.slice(0,n));if(r)return r}return{span:t[gt.OTEL_GRAPHQL_DATA_SYMBOL].span}}function Uv(t,e){let n=[],r=e;for(;r;){let o=r.key;t&&typeof o=="number"&&(o="*"),n.push(String(o)),r=r.prev}return n.reverse()}function Hv(t){return Wf(`
|
|
3
|
+
import{b as fg,c as mg}from"./chunk-WX3CWNNN.js";import{a as qe,b as Be,c as Pt,e as I,f as Pc,g as Nc,h as Mc,i as Yi,l as Eo,q as Lc,r as wc,s as Fc,t as uu,u as lu,w as ls}from"./chunk-OLH3K4XG.js";import{d as Qc}from"./chunk-TVMTOQUC.js";import{a as lt,b as Vc,c as pt,d as dt,e as Kc,f as rr,g as an,h as Mt,i as _e,j as Ao,k as cn,l as ve,m as z,n as F,o as Yc,p as $c,q as Xc,r as Zc,s as zc,t as Jc,u as le,v as ne}from"./chunk-J3IJS26Z.js";import{$ as Hc,$b as iu,Aa as O,Da as es,Ea as or,F as Gc,Fa as un,Ga as we,Ka as se,L as Uc,Na as Ve,Oa as Je,Ta as eu,Tb as ou,Ua as tu,Va as nu,Wb as Oo,Za as Fe,Zb as is,ab as ts,ac as ln,bc as ss,cc as as,da as jc,db as ns,dc as cs,eb as rs,fc as us,ga as tr,gb as ir,ha as Ji,ia as nr,j as Dc,ja as qc,k as kc,ka as Bc,kb as os,ma as Qi,na as Wc,o as zi,p as vo,tb as ru,v as sn,w as G,ya as Nt,yb as xt,za as We}from"./chunk-CJ3JTOGS.js";import{a as su,b as au,c as cu}from"./chunk-HWUPEJKT.js";import{a as _o,b as To}from"./chunk-CUZEHDNU.js";import{a as go,b as $i,c as Xi,d as xc,e as Zi,g as So,h as yo}from"./chunk-EWDYGUEU.js";import{a as q,b as S,c as g,d as Ki,e as k,f as y,i as c}from"./chunk-UO4ZAUJK.js";function Io(t){return t.setValue(Es,!0)}function Rg(t){return t.deleteValue(Es)}function _n(t){return t.getValue(Es)===!0}var Es,cr=S(()=>{"use strict";c();F();Es=pt("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var gu,Po,gn,No,Eu,Tu,Su,Ts=S(()=>{"use strict";c();gu="=",Po=";",gn=",",No="baggage",Eu=180,Tu=4096,Su=8192});var vs={};Ki(vs,{getKeyPairs:()=>ys,parseKeyPairsIntoRecord:()=>Pg,parsePairKeyValue:()=>Mo,serializeKeyPairs:()=>Ss});function Ss(t){return t.reduce(function(e,n){var r=""+e+(e!==""?gn:"")+n;return r.length>Su?e:r},"")}function ys(t){return t.getAllEntries().map(function(e){var n=Ig(e,2),r=n[0],o=n[1],i=encodeURIComponent(r)+"="+encodeURIComponent(o.value);return o.metadata!==void 0&&(i+=Po+o.metadata.toString()),i})}function Mo(t){var e=t.split(Po);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(gu);if(!(r<=0)){var o=decodeURIComponent(n.substring(0,r).trim()),i=decodeURIComponent(n.substring(r+1).trim()),s;return e.length>0&&(s=Vc(e.join(Po))),{key:o,value:i,metadata:s}}}}}function Pg(t){return typeof t!="string"||t.length===0?{}:t.split(gn).map(function(e){return Mo(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,n){return e[n.key]=n.value,e},{})}var Ig,As=S(()=>{"use strict";c();F();Ts();Ig=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}});var yu,vu=S(()=>{"use strict";c();F();cr();Ts();As();yu=function(){function t(){}return t.prototype.inject=function(e,n,r){var o=cn.getBaggage(e);if(!(!o||_n(e))){var i=ys(o).filter(function(a){return a.length<=Tu}).slice(0,Eu),s=Ss(i);s.length>0&&r.set(n,No,s)}},t.prototype.extract=function(e,n,r){var o=r.get(n,No),i=Array.isArray(o)?o.join(gn):o;if(!i)return e;var s={};if(i.length===0)return e;var a=i.split(gn);return a.forEach(function(u){var l=Mo(u);if(l){var p={value:l.value};l.metadata&&(p.metadata=l.metadata),s[l.key]=p}}),Object.entries(s).length===0?e:cn.setBaggage(e,cn.createBaggage(s))},t.prototype.fields=function(){return[No]},t}()});var Ng,Au=S(()=>{"use strict";c();Ng=function(){function t(e,n){this._monotonicClock=n,this._epochMillis=e.now(),this._performanceMillis=n.now()}return t.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},t}()});function xg(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var o=Ou(Object.entries(t)),i=o.next();!i.done;i=o.next()){var s=Mg(i.value,2),a=s[0],u=s[1];if(!Cu(a)){_e.warn("Invalid attribute key: "+a);continue}if(!bu(u)){_e.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(u)?r[a]=u.slice():r[a]=u}}catch(l){e={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function Cu(t){return typeof t=="string"&&t.length>0}function bu(t){return t==null?!0:Array.isArray(t)?Lg(t):Ru(t)}function Lg(t){var e,n,r;try{for(var o=Ou(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(s!=null){if(!r){if(Ru(s)){r=typeof s;continue}return!1}if(typeof s!==r)return!1}}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}function Ru(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var Ou,Mg,Iu=S(()=>{"use strict";c();F();Ou=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mg=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}});function Os(){return function(t){_e.error(wg(t))}}function wg(t){return typeof t=="string"?t:JSON.stringify(Fg(t))}function Fg(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var o=n[r];o&&(e[r]=String(o))}}),n=Object.getPrototypeOf(n);return e}var Cs=S(()=>{"use strict";c();F()});function Dg(t){Pu=t}function bs(t){try{Pu(t)}catch{}}var Pu,Rs=S(()=>{"use strict";c();Cs();Pu=Os()});var ur,Is=S(()=>{"use strict";c();(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(ur||(ur={}))});function Ug(t){return Gg.indexOf(t)>-1}function jg(t){return Hg.indexOf(t)>-1}function Bg(t){return qg.indexOf(t)>-1}function Wg(t,e,n){if(!(typeof n[t]>"u")){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function Vg(t,e,n,r,o){if(r===void 0&&(r=-1/0),o===void 0&&(o=1/0),typeof n[t]<"u"){var i=Number(n[t]);isNaN(i)||(i<r?e[t]=r:i>o?e[t]=o:e[t]=i)}}function Kg(t,e,n,r){r===void 0&&(r=kg);var o=n[t];typeof o=="string"&&(e[t]=o.split(r).map(function(i){return i.trim()}))}function $g(t,e,n){var r=n[t];if(typeof r=="string"){var o=Yg[r.toUpperCase()];o!=null&&(e[t]=o)}}function Fo(t){var e={};for(var n in wo){var r=n;switch(r){case"OTEL_LOG_LEVEL":$g(r,e,t);break;default:if(Ug(r))Wg(r,e,t);else if(jg(r))Vg(r,e,t);else if(Bg(r))Kg(r,e,t);else{var o=t[r];typeof o<"u"&&o!==null&&(e[r]=String(o))}}}return e}var kg,Gg,Hg,qg,xo,Lo,Nu,Mu,wo,Yg,Ps=S(()=>{"use strict";c();F();Is();kg=",",Gg=["OTEL_SDK_DISABLED"];Hg=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];qg=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];xo=1/0,Lo=128,Nu=128,Mu=128,wo={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:lt.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:xo,OTEL_ATTRIBUTE_COUNT_LIMIT:Lo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:xo,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Lo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:xo,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Lo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Nu,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Mu,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ur.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};Yg={ALL:lt.ALL,VERBOSE:lt.VERBOSE,DEBUG:lt.DEBUG,INFO:lt.INFO,WARN:lt.WARN,ERROR:lt.ERROR,NONE:lt.NONE}});function xu(){var t=Fo(process.env);return Object.assign({},wo,t)}function Lu(){return Fo(process.env)}var wu=S(()=>{"use strict";c();Ps()});var Xg,Fu=S(()=>{"use strict";c();Xg=typeof globalThis=="object"?globalThis:global});function Du(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Ns(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var o=Du(t.charCodeAt(r)),i=Du(t.charCodeAt(r+1));e[n++]=o<<4|i}return e}var Ms=S(()=>{"use strict";c()});function Zg(t){return Buffer.from(Ns(t)).toString("base64")}var ku=S(()=>{"use strict";c();Ms()});function Gu(t){return function(){for(var n=0;n<t/4;n++)Do.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(Do[n]>0);n++)n===t-1&&(Do[t-1]=1);return Do.toString("hex",0,t)}}var zg,Uu,Jg,Do,Hu=S(()=>{"use strict";c();zg=8,Uu=16,Jg=function(){function t(){this.generateTraceId=Gu(Uu),this.generateSpanId=Gu(zg)}return t}(),Do=Buffer.allocUnsafe(Uu)});import{performance as Qg}from"perf_hooks";var lr,ju=S(()=>{"use strict";c();lr=Qg});var xs,Ls=S(()=>{"use strict";c();xs="1.25.1"});var En,eE,qu=S(()=>{"use strict";c();Ls();ne();eE=(En={},En[Xc]="opentelemetry",En[$c]="node",En[Zc]=Jc,En[zc]=xs,En)});function tE(t){t.unref()}var Bu=S(()=>{"use strict";c()});var Wu=S(()=>{"use strict";c();wu();Fu();ku();Hu();ju();qu();Bu()});var ws=S(()=>{"use strict";c();Wu()});function pr(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*rE);return[n,r]}function Fs(){var t=lr.timeOrigin;if(typeof t!="number"){var e=lr;t=e.timing&&e.timing.fetchStart}return t}function Ku(t){var e=pr(Fs()),n=pr(typeof t=="number"?t:lr.now());return Yu(e,n)}function oE(t){if(Ds(t))return t;if(typeof t=="number")return t<Fs()?Ku(t):pr(t);if(t instanceof Date)return pr(t.getTime());throw TypeError("Invalid input type")}function iE(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=ko),[n,r]}function sE(t){var e=Vu,n=""+"0".repeat(e)+t[1]+"Z",r=n.substr(n.length-e-1),o=new Date(t[0]*1e3).toISOString();return o.replace("000Z",r)}function aE(t){return t[0]*ko+t[1]}function cE(t){return t[0]*1e3+t[1]/1e6}function uE(t){return t[0]*1e6+t[1]/1e3}function Ds(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function lE(t){return Ds(t)||typeof t=="number"||t instanceof Date}function Yu(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=ko&&(n[1]-=ko,n[0]+=1),n}var Vu,nE,rE,ko,$u=S(()=>{"use strict";c();ws();Vu=9,nE=6,rE=Math.pow(10,nE),ko=Math.pow(10,Vu)});var Xu=S(()=>{"use strict";c()});var ks,Zu=S(()=>{"use strict";c();(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(ks||(ks={}))});var pE,dE,zu=S(()=>{"use strict";c();F();pE=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dE=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,o){return r.concat(o)},[])))}return t.prototype.inject=function(e,n,r){var o,i;try{for(var s=pE(this._propagators),a=s.next();!a.done;a=s.next()){var u=a.value;try{u.inject(e,n,r)}catch(l){_e.warn("Failed to inject with "+u.constructor.name+". Err: "+l.message)}}}catch(l){o={error:l}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}},t.prototype.extract=function(e,n,r){return this._propagators.reduce(function(o,i){try{return i.extract(o,n,r)}catch(s){_e.warn("Failed to inject with "+i.constructor.name+". Err: "+s.message)}return o},e)},t.prototype.fields=function(){return this._fields.slice()},t}()});function Ju(t){return hE.test(t)}function Qu(t){return _E.test(t)&&!gE.test(t)}var Gs,fE,mE,hE,_E,gE,el=S(()=>{"use strict";c();Gs="[_0-9a-z-*/]",fE="[a-z]"+Gs+"{0,255}",mE="[a-z0-9]"+Gs+"{0,240}@[a-z]"+Gs+"{0,13}",hE=new RegExp("^(?:"+fE+"|"+mE+")$"),_E=/^[ -~]{0,255}[!-~]$/,gE=/,|=/});var tl,EE,nl,rl,dr,Us=S(()=>{"use strict";c();el();tl=32,EE=512,nl=",",rl="=",dr=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+rl+e.get(r)),n},[]).join(nl)},t.prototype._parse=function(e){e.length>EE||(this._internalState=e.split(nl).reverse().reduce(function(n,r){var o=r.trim(),i=o.indexOf(rl);if(i!==-1){var s=o.slice(0,i),a=o.slice(i+1,r.length);Ju(s)&&Qu(a)&&n.set(s,a)}return n},new Map),this._internalState.size>tl&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,tl))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}()});function ol(t){var e=OE.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Go,Uo,TE,SE,yE,vE,AE,OE,CE,il=S(()=>{"use strict";c();F();cr();Us();Go="traceparent",Uo="tracestate",TE="00",SE="(?!ff)[\\da-f]{2}",yE="(?![0]{32})[\\da-f]{32}",vE="(?![0]{16})[\\da-f]{16}",AE="[\\da-f]{2}",OE=new RegExp("^\\s?("+SE+")-("+yE+")-("+vE+")-("+AE+")(-.*)?\\s?$");CE=function(){function t(){}return t.prototype.inject=function(e,n,r){var o=ve.getSpanContext(e);if(!(!o||_n(e)||!rr(o))){var i=TE+"-"+o.traceId+"-"+o.spanId+"-0"+Number(o.traceFlags||dt.NONE).toString(16);r.set(n,Go,i),o.traceState&&r.set(n,Uo,o.traceState.serialize())}},t.prototype.extract=function(e,n,r){var o=r.get(n,Go);if(!o)return e;var i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return e;var s=ol(i);if(!s)return e;s.isRemote=!0;var a=r.get(n,Uo);if(a){var u=Array.isArray(a)?a.join(","):a;s.traceState=new dr(typeof u=="string"?u:void 0)}return ve.setSpanContext(e,s)},t.prototype.fields=function(){return[Go,Uo]},t}()});var sl=S(()=>{"use strict";c()});function bE(t,e){return t.setValue(js,e)}function RE(t){return t.deleteValue(js)}function IE(t){return t.getValue(js)}var js,Hs,al=S(()=>{"use strict";c();F();js=pt("OpenTelemetry SDK Context Key RPC_METADATA");(function(t){t.HTTP="http"})(Hs||(Hs={}))});var Ho,qs=S(()=>{"use strict";c();F();Ho=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:an.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var fr,Bs=S(()=>{"use strict";c();F();fr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:an.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var PE,cl=S(()=>{"use strict";c();F();Rs();qs();Bs();PE=function(){function t(e){var n,r,o,i;this._root=e.root,this._root||(bs(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new fr),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new fr,this._remoteParentNotSampled=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Ho,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new fr,this._localParentNotSampled=(i=e.localParentNotSampled)!==null&&i!==void 0?i:new Ho}return t.prototype.shouldSample=function(e,n,r,o,i,s){var a=ve.getSpanContext(e);return!a||!rr(a)?this._root.shouldSample(e,n,r,o,i,s):a.isRemote?a.traceFlags&dt.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,o,i,s):this._remoteParentNotSampled.shouldSample(e,n,r,o,i,s):a.traceFlags&dt.SAMPLED?this._localParentSampled.shouldSample(e,n,r,o,i,s):this._localParentNotSampled.shouldSample(e,n,r,o,i,s)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}()});var NE,ul=S(()=>{"use strict";c();F();NE=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Kc(n)&&this._accumulate(n)<this._upperBound?an.RECORD_AND_SAMPLED:an.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,r=0;r<e.length/8;r++){var o=r*8,i=parseInt(e.slice(o,o+8),16);n=(n^i)>>>0}return n},t}()});function kE(t,e){return function(n){return t(e(n))}}function Ws(t){if(!GE(t)||UE(t)!==ME)return!1;var e=DE(t);if(e===null)return!0;var n=dl.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ll.call(n)===FE}function GE(t){return t!=null&&typeof t=="object"}function UE(t){return t==null?t===void 0?LE:xE:pn&&pn in Object(t)?HE(t):jE(t)}function HE(t){var e=dl.call(t,pn),n=t[pn],r=!1;try{t[pn]=void 0,r=!0}catch{}var o=fl.call(t);return r&&(e?t[pn]=n:delete t[pn]),o}function jE(t){return fl.call(t)}var ME,xE,LE,wE,ll,FE,DE,pl,dl,pn,fl,ml=S(()=>{"use strict";c();ME="[object Object]",xE="[object Null]",LE="[object Undefined]",wE=Function.prototype,ll=wE.toString,FE=ll.call(Object),DE=kE(Object.getPrototypeOf,Object),pl=Object.prototype,dl=pl.hasOwnProperty,pn=Symbol?Symbol.toStringTag:void 0,fl=pl.toString});function BE(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=_l(n,t.shift(),0,r);return n}function Vs(t){return qo(t)?t.slice():t}function _l(t,e,n,r){n===void 0&&(n=0);var o;if(!(n>qE)){if(n++,jo(t)||jo(e)||gl(e))o=Vs(e);else if(qo(t)){if(o=t.slice(),qo(e))for(var i=0,s=e.length;i<s;i++)o.push(Vs(e[i]));else if(mr(e))for(var a=Object.keys(e),i=0,s=a.length;i<s;i++){var u=a[i];o[u]=Vs(e[u])}}else if(mr(t))if(mr(e)){if(!WE(t,e))return e;o=Object.assign({},t);for(var a=Object.keys(e),i=0,s=a.length;i<s;i++){var u=a[i],l=e[u];if(jo(l))typeof l>"u"?delete o[u]:o[u]=l;else{var p=o[u],d=l;if(hl(t,u,r)||hl(e,u,r))delete o[u];else{if(mr(p)&&mr(d)){var m=r.get(p)||[],h=r.get(d)||[];m.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(p,m),r.set(d,h)}o[u]=_l(o[u],l,n,r)}}}}else o=e;return o}}function hl(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var s=r[o];if(s.key===e&&s.obj===t)return!0}return!1}function qo(t){return Array.isArray(t)}function gl(t){return typeof t=="function"}function mr(t){return!jo(t)&&!qo(t)&&!gl(t)&&typeof t=="object"}function jo(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function WE(t,e){return!(!Ws(t)||!Ws(e))}var qE,El=S(()=>{"use strict";c();ml();qE=20});function KE(t,e){var n,r=new Promise(function(i,s){n=setTimeout(function(){s(new Tl("Operation timed out."))},e)});return Promise.race([t,r]).then(function(o){return clearTimeout(n),o},function(o){throw clearTimeout(n),o})}var VE,Tl,Sl=S(()=>{"use strict";c();VE=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tl=function(t){VE(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error)});function yl(t,e){return typeof e=="string"?t===e:!!t.match(e)}function $E(t,e){var n,r;if(!e)return!1;try{for(var o=YE(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(yl(t,s))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var YE,vl=S(()=>{"use strict";c();YE=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}});function XE(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Al=S(()=>{"use strict";c()});var Ol,Cl=S(()=>{"use strict";c();Ol=function(){function t(){var e=this;this._promise=new Promise(function(n,r){e._resolve=n,e._reject=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}()});var ZE,zE,JE,bl=S(()=>{"use strict";c();Cl();ZE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},zE=function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},JE=function(){function t(e,n){this._callback=e,this._that=n,this._isCalled=!1,this._deferred=new Ol}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,zE([this._that],ZE(r),!1))).then(function(i){return n._deferred.resolve(i)},function(i){return n._deferred.reject(i)})}catch(i){this._deferred.reject(i)}}return this._deferred.promise},t}()});function Rl(t,e){return new Promise(function(n){Mt.with(Io(Mt.active()),function(){t.export(e,function(r){n(r)})})})}var Il=S(()=>{"use strict";c();F();cr()});var Ke={};Ki(Ke,{AlwaysOffSampler:()=>Ho,AlwaysOnSampler:()=>fr,AnchoredClock:()=>Ng,BindOnceFuture:()=>JE,CompositePropagator:()=>dE,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>Lo,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>xo,DEFAULT_ENVIRONMENT:()=>wo,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>Nu,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>Mu,ExportResultCode:()=>ks,ParentBasedSampler:()=>PE,RPCType:()=>Hs,RandomIdGenerator:()=>Jg,SDK_INFO:()=>eE,TRACE_PARENT_HEADER:()=>Go,TRACE_STATE_HEADER:()=>Uo,TimeoutError:()=>Tl,TraceIdRatioBasedSampler:()=>NE,TraceState:()=>dr,TracesSamplerValues:()=>ur,VERSION:()=>xs,W3CBaggagePropagator:()=>yu,W3CTraceContextPropagator:()=>CE,_globalThis:()=>Xg,addHrTimes:()=>Yu,baggageUtils:()=>vs,callWithTimeout:()=>KE,deleteRPCMetadata:()=>RE,getEnv:()=>xu,getEnvWithoutDefaults:()=>Lu,getRPCMetadata:()=>IE,getTimeOrigin:()=>Fs,globalErrorHandler:()=>bs,hexToBase64:()=>Zg,hexToBinary:()=>Ns,hrTime:()=>Ku,hrTimeDuration:()=>iE,hrTimeToMicroseconds:()=>uE,hrTimeToMilliseconds:()=>cE,hrTimeToNanoseconds:()=>aE,hrTimeToTimeStamp:()=>sE,internal:()=>QE,isAttributeKey:()=>Cu,isAttributeValue:()=>bu,isTimeInput:()=>lE,isTimeInputHrTime:()=>Ds,isTracingSuppressed:()=>_n,isUrlIgnored:()=>$E,isWrapped:()=>XE,loggingErrorHandler:()=>Os,merge:()=>BE,millisToHrTime:()=>pr,otperformance:()=>lr,parseEnvironment:()=>Fo,parseTraceParent:()=>ol,sanitizeAttributes:()=>xg,setGlobalErrorHandler:()=>Dg,setRPCMetadata:()=>bE,suppressTracing:()=>Io,timeInputToHrTime:()=>oE,unrefTimer:()=>tE,unsuppressTracing:()=>Rg,urlMatches:()=>yl});var QE,De=S(()=>{"use strict";c();vu();Au();Iu();Rs();Cs();$u();Xu();Ms();Zu();As();ws();zu();il();sl();al();qs();Bs();cl();ul();cr();Us();Ps();El();Is();Sl();vl();Al();bl();Ls();Il();QE={_export:Rl}});var Pl=g(hr=>{"use strict";c();Object.defineProperty(hr,"__esModule",{value:!0});hr.AttributeNames=void 0;var eT;(function(t){t.HTTP_ERROR_NAME="http.error_name",t.HTTP_ERROR_MESSAGE="http.error_message",t.HTTP_STATUS_TEXT="http.status_text"})(eT=hr.AttributeNames||(hr.AttributeNames={}))});var Ks=g(P=>{"use strict";c();Object.defineProperty(P,"__esModule",{value:!0});P.headerCapture=P.getIncomingRequestMetricAttributesOnResponse=P.getIncomingRequestAttributesOnResponse=P.getIncomingRequestMetricAttributes=P.getIncomingRequestAttributes=P.getOutgoingRequestMetricAttributesOnResponse=P.getOutgoingRequestAttributesOnResponse=P.setAttributesFromHttpKind=P.getOutgoingRequestMetricAttributes=P.getOutgoingRequestAttributes=P.extractHostnameAndPort=P.isValidOptionsType=P.getRequestInfo=P.isCompressed=P.setResponseContentLengthAttribute=P.setRequestContentLengthAttribute=P.setSpanWithError=P.isIgnored=P.satisfiesPattern=P.parseResponseStatus=P.getAbsoluteUrl=void 0;var _r=(F(),y(z)),C=(ne(),y(le)),Nl=(De(),y(Ke)),Bo=q("url"),Wo=Pl(),tT=(t,e,n="http:")=>{let r=t||{},o=r.protocol||n,i=(r.port||"").toString(),s=r.path||"/",a=r.host||r.hostname||e.host||"localhost";return a.indexOf(":")===-1&&i&&i!=="80"&&i!=="443"&&(a+=`:${i}`),`${o}//${a}${s}`};P.getAbsoluteUrl=tT;var nT=(t,e)=>{let n=t===_r.SpanKind.CLIENT?400:500;return e&&e>=100&&e<n?_r.SpanStatusCode.UNSET:_r.SpanStatusCode.ERROR};P.parseResponseStatus=nT;var rT=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")};P.satisfiesPattern=rT;var oT=(t,e,n)=>{if(!e)return!1;try{for(let r of e)if((0,P.satisfiesPattern)(t,r))return!0}catch(r){n&&n(r)}return!1};P.isIgnored=oT;var iT=(t,e)=>{let n=e.message;t.setAttribute(Wo.AttributeNames.HTTP_ERROR_NAME,e.name),t.setAttribute(Wo.AttributeNames.HTTP_ERROR_MESSAGE,n),t.setStatus({code:_r.SpanStatusCode.ERROR,message:n}),t.recordException(e)};P.setSpanWithError=iT;var sT=(t,e)=>{let n=Ml(t.headers);n!==null&&((0,P.isCompressed)(t.headers)?e[C.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH]=n:e[C.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED]=n)};P.setRequestContentLengthAttribute=sT;var aT=(t,e)=>{let n=Ml(t.headers);n!==null&&((0,P.isCompressed)(t.headers)?e[C.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]=n:e[C.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED]=n)};P.setResponseContentLengthAttribute=aT;function Ml(t){let e=t["content-length"];if(e===void 0)return null;let n=parseInt(e,10);return isNaN(n)?null:n}var cT=t=>{let e=t["content-encoding"];return!!e&&e!=="identity"};P.isCompressed=cT;var uT=(t,e)=>{let n="/",r="",o;if(typeof t=="string")o=Bo.parse(t),n=o.pathname||"/",r=`${o.protocol||"http:"}//${o.host}`,e!==void 0&&Object.assign(o,e);else if(t instanceof Bo.URL)o={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,path:`${t.pathname||""}${t.search||""}`},t.port!==""&&(o.port=Number(t.port)),(t.username||t.password)&&(o.auth=`${t.username}:${t.password}`),n=t.pathname,r=t.origin,e!==void 0&&Object.assign(o,e);else{o=Object.assign({protocol:t.host?"http:":void 0},t),n=t.pathname,!n&&o.path&&(n=Bo.parse(o.path).pathname||"/");let s=o.host||(o.port!=null?`${o.hostname}${o.port}`:o.hostname);r=`${o.protocol||"http:"}//${s}`}let i=o.method?o.method.toUpperCase():"GET";return{origin:r,pathname:n,method:i,optionsParsed:o}};P.getRequestInfo=uT;var lT=t=>{if(!t)return!1;let e=typeof t;return e==="string"||e==="object"&&!Array.isArray(t)};P.isValidOptionsType=lT;var pT=t=>{var e;if(t.hostname&&t.port)return{hostname:t.hostname,port:t.port};let n=((e=t.host)===null||e===void 0?void 0:e.match(/^([^:/ ]+)(:\d{1,5})?/))||null,r=t.hostname||(n===null?"localhost":n[1]),o=t.port;return o||(n&&n[2]?o=n[2].substring(1):o=t.protocol==="https:"?"443":"80"),{hostname:r,port:o}};P.extractHostnameAndPort=pT;var dT=(t,e)=>{var n;let r=e.hostname,o=e.port,i=t.method,s=i?i.toUpperCase():"GET",a=t.headers||{},u=a["user-agent"],l={[C.SEMATTRS_HTTP_URL]:(0,P.getAbsoluteUrl)(t,a,`${e.component}:`),[C.SEMATTRS_HTTP_METHOD]:s,[C.SEMATTRS_HTTP_TARGET]:t.path||"/",[C.SEMATTRS_NET_PEER_NAME]:r,[C.SEMATTRS_HTTP_HOST]:(n=a.host)!==null&&n!==void 0?n:`${r}:${o}`};return u!==void 0&&(l[C.SEMATTRS_HTTP_USER_AGENT]=u),Object.assign(l,e.hookAttributes)};P.getOutgoingRequestAttributes=dT;var fT=t=>{let e={};return e[C.SEMATTRS_HTTP_METHOD]=t[C.SEMATTRS_HTTP_METHOD],e[C.SEMATTRS_NET_PEER_NAME]=t[C.SEMATTRS_NET_PEER_NAME],e};P.getOutgoingRequestMetricAttributes=fT;var mT=(t,e)=>{t&&(e[C.SEMATTRS_HTTP_FLAVOR]=t,t.toUpperCase()!=="QUIC"?e[C.SEMATTRS_NET_TRANSPORT]=C.NETTRANSPORTVALUES_IP_TCP:e[C.SEMATTRS_NET_TRANSPORT]=C.NETTRANSPORTVALUES_IP_UDP)};P.setAttributesFromHttpKind=mT;var hT=t=>{let{statusCode:e,statusMessage:n,httpVersion:r,socket:o}=t,i={};if(o){let{remoteAddress:s,remotePort:a}=o;i[C.SEMATTRS_NET_PEER_IP]=s,i[C.SEMATTRS_NET_PEER_PORT]=a}return(0,P.setResponseContentLengthAttribute)(t,i),e&&(i[C.SEMATTRS_HTTP_STATUS_CODE]=e,i[Wo.AttributeNames.HTTP_STATUS_TEXT]=(n||"").toUpperCase()),(0,P.setAttributesFromHttpKind)(r,i),i};P.getOutgoingRequestAttributesOnResponse=hT;var _T=t=>{let e={};return e[C.SEMATTRS_NET_PEER_PORT]=t[C.SEMATTRS_NET_PEER_PORT],e[C.SEMATTRS_HTTP_STATUS_CODE]=t[C.SEMATTRS_HTTP_STATUS_CODE],e[C.SEMATTRS_HTTP_FLAVOR]=t[C.SEMATTRS_HTTP_FLAVOR],e};P.getOutgoingRequestMetricAttributesOnResponse=_T;var gT=(t,e)=>{let n=t.headers,r=n["user-agent"],o=n["x-forwarded-for"],i=t.method||"GET",s=t.httpVersion,a=t.url?Bo.parse(t.url):null,u=a?.host||n.host,l=a?.hostname||u?.replace(/^(.*)(:[0-9]{1,5})/,"$1")||"localhost",p=e.serverName,d={[C.SEMATTRS_HTTP_URL]:(0,P.getAbsoluteUrl)(a,n,`${e.component}:`),[C.SEMATTRS_HTTP_HOST]:u,[C.SEMATTRS_NET_HOST_NAME]:l,[C.SEMATTRS_HTTP_METHOD]:i,[C.SEMATTRS_HTTP_SCHEME]:e.component};return typeof o=="string"&&(d[C.SEMATTRS_HTTP_CLIENT_IP]=o.split(",")[0]),typeof p=="string"&&(d[C.SEMATTRS_HTTP_SERVER_NAME]=p),a&&(d[C.SEMATTRS_HTTP_TARGET]=a.path||"/"),r!==void 0&&(d[C.SEMATTRS_HTTP_USER_AGENT]=r),(0,P.setRequestContentLengthAttribute)(t,d),(0,P.setAttributesFromHttpKind)(s,d),Object.assign(d,e.hookAttributes)};P.getIncomingRequestAttributes=gT;var ET=t=>{let e={};return e[C.SEMATTRS_HTTP_SCHEME]=t[C.SEMATTRS_HTTP_SCHEME],e[C.SEMATTRS_HTTP_METHOD]=t[C.SEMATTRS_HTTP_METHOD],e[C.SEMATTRS_NET_HOST_NAME]=t[C.SEMATTRS_NET_HOST_NAME],e[C.SEMATTRS_HTTP_FLAVOR]=t[C.SEMATTRS_HTTP_FLAVOR],e};P.getIncomingRequestMetricAttributes=ET;var TT=(t,e)=>{let{socket:n}=t,{statusCode:r,statusMessage:o}=e,i=(0,Nl.getRPCMetadata)(_r.context.active()),s={};if(n){let{localAddress:a,localPort:u,remoteAddress:l,remotePort:p}=n;s[C.SEMATTRS_NET_HOST_IP]=a,s[C.SEMATTRS_NET_HOST_PORT]=u,s[C.SEMATTRS_NET_PEER_IP]=l,s[C.SEMATTRS_NET_PEER_PORT]=p}return s[C.SEMATTRS_HTTP_STATUS_CODE]=r,s[Wo.AttributeNames.HTTP_STATUS_TEXT]=(o||"").toUpperCase(),i?.type===Nl.RPCType.HTTP&&i.route!==void 0&&(s[C.SEMATTRS_HTTP_ROUTE]=i.route),s};P.getIncomingRequestAttributesOnResponse=TT;var ST=t=>{let e={};return e[C.SEMATTRS_HTTP_STATUS_CODE]=t[C.SEMATTRS_HTTP_STATUS_CODE],e[C.SEMATTRS_NET_HOST_PORT]=t[C.SEMATTRS_NET_HOST_PORT],t[C.SEMATTRS_HTTP_ROUTE]!==void 0&&(e[C.SEMATTRS_HTTP_ROUTE]=t[C.SEMATTRS_HTTP_ROUTE]),e};P.getIncomingRequestMetricAttributesOnResponse=ST;function yT(t,e){let n=new Map;for(let r=0,o=e.length;r<o;r++){let i=e[r].toLowerCase();n.set(i,i.replace(/-/g,"_"))}return(r,o)=>{for(let i of n.keys()){let s=o(i);if(s===void 0)continue;let a=n.get(i),u=`http.${t}.header.${a}`;typeof s=="string"?r.setAttribute(u,[s]):Array.isArray(s)?r.setAttribute(u,s):r.setAttribute(u,[s])}}}P.headerCapture=yT});var xl=g(Vo=>{"use strict";c();Object.defineProperty(Vo,"__esModule",{value:!0});Vo.VERSION=void 0;Vo.VERSION="0.52.1"});var Ll=S(()=>{"use strict";c()});var wl=S(()=>{"use strict";c()});var Fl,Dl=S(()=>{"use strict";c();(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(Fl||(Fl={}))});var kl=S(()=>{"use strict";c()});var Gl=S(()=>{"use strict";c()});var Ys,WI,$s=S(()=>{"use strict";c();Ys=function(){function t(){}return t.prototype.emit=function(e){},t}(),WI=new Ys});var vT,Xs,Zs=S(()=>{"use strict";c();$s();vT=function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new Ys},t}(),Xs=new vT});var Ul,Hl=S(()=>{"use strict";c();Ul=typeof globalThis=="object"?globalThis:global});var jl=S(()=>{"use strict";c();Hl()});var ql=S(()=>{"use strict";c();jl()});function Bl(t,e,n){return function(r){return r===t?e:n}}var gr,Tn,zs,Wl=S(()=>{"use strict";c();ql();gr=Symbol.for("io.opentelemetry.js.api.logs"),Tn=Ul;zs=1});var Vl,Kl=S(()=>{"use strict";c();Wl();Zs();Vl=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return Tn[gr]?this.getLoggerProvider():(Tn[gr]=Bl(zs,e,Xs),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Tn[gr])===null||e===void 0?void 0:e.call(Tn,zs))!==null&&n!==void 0?n:Xs},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Tn[gr]},t}()});var Ko,Js=S(()=>{"use strict";c();Ll();wl();Dl();kl();Gl();$s();Zs();Kl();Ko=Vl.getInstance()});function Yl(t,e,n,r){for(var o=0,i=t.length;o<i;o++){var s=t[o];e&&s.setTracerProvider(e),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}function $l(t){t.forEach(function(e){return e.disable()})}var Xl=S(()=>{"use strict";c()});function Yo(t){var e,n,r=t.tracerProvider||ve.getTracerProvider(),o=t.meterProvider||Ao.getMeterProvider(),i=t.loggerProvider||Ko.getLoggerProvider(),s=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return Yl(s,r,o,i),function(){$l(s)}}var Zl=S(()=>{"use strict";c();F();Js();Xl()});var ea=g((IP,Ql)=>{"use strict";c();function Qs(t){return typeof t=="function"}var Ae=console.error.bind(console);function Er(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Tr(t){t&&t.logger&&(Qs(t.logger)?Ae=t.logger:Ae("new logger isn't a function, not replacing"))}function zl(t,e,n){if(!t||!t[e]){Ae("no original function "+e+" to wrap");return}if(!n){Ae("no wrapper function"),Ae(new Error().stack);return}if(!Qs(t[e])||!Qs(n)){Ae("original object and wrapper must be functions");return}var r=t[e],o=n(r,e);return Er(o,"__original",r),Er(o,"__unwrap",function(){t[e]===o&&Er(t,e,r)}),Er(o,"__wrapped",!0),Er(t,e,o),o}function AT(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{Ae("must provide one or more modules to patch"),Ae(new Error().stack);return}if(!(e&&Array.isArray(e))){Ae("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(o){zl(r,o,n)})})}function Jl(t,e){if(!t||!t[e]){Ae("no function to unwrap."),Ae(new Error().stack);return}if(!t[e].__unwrap)Ae("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function OT(t,e){if(t)Array.isArray(t)||(t=[t]);else{Ae("must provide one or more modules to patch"),Ae(new Error().stack);return}if(!(e&&Array.isArray(e))){Ae("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){Jl(n,r)})})}Tr.wrap=zl;Tr.massWrap=AT;Tr.unwrap=Jl;Tr.massUnwrap=OT;Ql.exports=Tr});var wt,$o,ep,tp=S(()=>{"use strict";c();F();Js();wt=k(ea()),$o=function(){return $o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},$o.apply(this,arguments)},ep=function(){function t(e,n,r){this.instrumentationName=e,this.instrumentationVersion=n,this._wrap=wt.wrap,this._unwrap=wt.unwrap,this._massWrap=wt.massWrap,this._massUnwrap=wt.massUnwrap,this._config=$o({enabled:!0},r),this._diag=_e.createComponentLogger({namespace:e}),this._tracer=ve.getTracer(e,n),this._meter=Ao.getMeter(e,n),this._logger=Ko.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=$o({},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,o){if(e)try{e(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}},t}()});var ta=g((wP,np)=>{"use strict";c();var CT=q("os");np.exports=CT.homedir||function(){var e=process.env.HOME,n=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(n?"/Users/"+n:null):process.platform==="linux"?e||(process.getuid()===0?"/root":n?"/home/"+n:null):e||null}});var na=g((DP,rp)=>{"use strict";c();rp.exports=function(){var t=Error.prepareStackTrace;Error.prepareStackTrace=function(n,r){return r};var e=new Error().stack;return Error.prepareStackTrace=t,e[2].getFileName()}});var op=g((GP,Sr)=>{"use strict";c();var bT=process.platform==="win32",RT=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,ra={};function IT(t){return RT.exec(t).slice(1)}ra.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=IT(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var PT=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,oa={};function NT(t){return PT.exec(t).slice(1)}oa.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=NT(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};bT?Sr.exports=ra.parse:Sr.exports=oa.parse;Sr.exports.posix=oa.parse;Sr.exports.win32=ra.parse});var ia=g((HP,cp)=>{"use strict";c();var ap=q("path"),ip=ap.parse||op(),sp=function(e,n){var r="/";/^([A-Za-z]:)/.test(e)?r="":/^\\\\/.test(e)&&(r="\\\\");for(var o=[e],i=ip(e);i.dir!==o[o.length-1];)o.push(i.dir),i=ip(i.dir);return o.reduce(function(s,a){return s.concat(n.map(function(u){return ap.resolve(r,a,u)}))},[])};cp.exports=function(e,n,r){var o=n&&n.moduleDirectory?[].concat(n.moduleDirectory):["node_modules"];if(n&&typeof n.paths=="function")return n.paths(r,e,function(){return sp(e,o)},n);var i=sp(e,o);return n&&n.paths?i.concat(n.paths):i}});var sa=g((qP,up)=>{"use strict";c();var yr=q("path");up.exports=function(t,e){if(e=e||{},e.forceNodeResolution||!process.versions.pnp)return e;let{findPnpApi:n}=q("module"),r=(l,p)=>{let d=l.match(/^((?:@[^/]+\/)?[^/]+)(\/.*)?/);if(!d)throw new Error(`Assertion failed: Expected the "resolve" package to call the "paths" callback with package names only (got "${l}")`);p.charAt(p.length-1)!=="/"&&(p=yr.join(p,"/"));let m=n(p);if(m===null)return;let h;try{h=m.resolveToUnqualified(`${d[1]}/package.json`,p,{considerBuiltins:!1})}catch{return null}if(h===null)throw new Error(`Assertion failed: The resolution thinks that "${d[1]}" is a Node builtin`);let _=yr.dirname(h),T=typeof d[2]<"u"?yr.join(_,d[2]):_;return{packagePath:_,unqualifiedPath:T}},o=(l,p)=>{for(let d=0;d<p.length;d++){let m=r(l,p[d]);if(m||d===p.length-1)return m}return null},i=Array.isArray(e.paths)?e.paths:[],s=(l,p,d,m)=>{let h=[p].concat(i),_=o(l,h);return _==null?d():[_.unqualifiedPath]},a=(l,p,d,m)=>{let h=[p].concat(i),_=o(l,h);if(_==null)return d().concat(i);let T=yr.dirname(_.packagePath);return l.match(/^@[^/]+\//)&&(T=yr.dirname(T)),[T]},u=!1;return e.__skipPackageIterator||(e.packageIterator=function(l,p,d,m){u=!0;try{return s(l,p,d,m)}finally{u=!1}}),e.paths=function(l,p,d,m){return u?d().concat(i):a(l,p,d,m)},e}});var dp=g((WP,pp)=>{"use strict";c();var MT="Function.prototype.bind called on incompatible ",xT=Object.prototype.toString,LT=Math.max,wT="[object Function]",lp=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},FT=function(e,n){for(var r=[],o=n||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},DT=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};pp.exports=function(e){var n=this;if(typeof n!="function"||xT.apply(n)!==wT)throw new TypeError(MT+n);for(var r=FT(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,lp(r,arguments));return Object(p)===p?p:this}return n.apply(e,lp(r,arguments))},s=LT(0,n.length-r.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(o=Function("binder","return function ("+DT(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o}});var mp=g((KP,fp)=>{"use strict";c();var kT=dp();fp.exports=Function.prototype.bind||kT});var _p=g(($P,hp)=>{"use strict";c();var GT=Function.prototype.call,UT=Object.prototype.hasOwnProperty,HT=mp();hp.exports=HT.call(GT,UT)});var gp=g((ZP,jT)=>{jT.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3","node:test/mock_loader":">= 22.3","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var vr=g((zP,Sp)=>{"use strict";c();var qT=_p();function BT(t,e){for(var n=t.split("."),r=e.split(" "),o=r.length>1?r[0]:"=",i=(r.length>1?r[1]:r[0]).split("."),s=0;s<3;++s){var a=parseInt(n[s]||0,10),u=parseInt(i[s]||0,10);if(a!==u)return o==="<"?a<u:o===">="?a>=u:!1}return o===">="}function Ep(t,e){var n=e.split(/ ?&& ?/);if(n.length===0)return!1;for(var r=0;r<n.length;++r)if(!BT(t,n[r]))return!1;return!0}function WT(t,e){if(typeof e=="boolean")return e;var n=typeof t>"u"?process.versions&&process.versions.node:t;if(typeof n!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var r=0;r<e.length;++r)if(Ep(n,e[r]))return!0;return!1}return Ep(n,e)}var Tp=gp();Sp.exports=function(e,n){return qT(Tp,e)&&WT(n,Tp[e])}});var Ap=g((QP,vp)=>{"use strict";c();var dn=q("fs"),VT=ta(),ae=q("path"),KT=na(),YT=ia(),$T=sa(),XT=vr(),ZT=process.platform!=="win32"&&dn.realpath&&typeof dn.realpath.native=="function"?dn.realpath.native:dn.realpath,yp=VT(),zT=function(){return[ae.join(yp,".node_modules"),ae.join(yp,".node_libraries")]},JT=function(e,n){dn.stat(e,function(r,o){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,o.isFile()||o.isFIFO())})},QT=function(e,n){dn.stat(e,function(r,o){return r?r.code==="ENOENT"||r.code==="ENOTDIR"?n(null,!1):n(r):n(null,o.isDirectory())})},eS=function(e,n){ZT(e,function(r,o){r&&r.code!=="ENOENT"?n(r):n(null,r?e:o)})},Ar=function(e,n,r,o){r&&r.preserveSymlinks===!1?e(n,o):o(null,n)},tS=function(e,n,r){e(n,function(o,i){if(o)r(o);else try{var s=JSON.parse(i);r(null,s)}catch{r(null)}})},nS=function(e,n,r){for(var o=YT(n,r,e),i=0;i<o.length;i++)o[i]=ae.join(o[i],e);return o};vp.exports=function(e,n,r){var o=r,i=n;if(typeof n=="function"&&(o=i,i={}),typeof e!="string"){var s=new TypeError("Path must be a string.");return process.nextTick(function(){o(s)})}i=$T(e,i);var a=i.isFile||JT,u=i.isDirectory||QT,l=i.readFile||dn.readFile,p=i.realpath||eS,d=i.readPackage||tS;if(i.readFile&&i.readPackage){var m=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(m)})}var h=i.packageIterator,_=i.extensions||[".js"],T=i.includeCoreModules!==!1,R=i.basedir||ae.dirname(KT()),M=i.filename||R;i.paths=i.paths||zT();var b=ae.resolve(R);Ar(p,b,i,function(v,D){v?o(v):N(D)});var A;function N(v){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))A=ae.resolve(v,e),(e==="."||e===".."||e.slice(-1)==="/")&&(A+="/"),/\/$/.test(e)&&A===v?B(A,i.package,w):W(A,i.package,w);else{if(T&&XT(e))return o(null,e);he(e,v,function(D,$,U){if(D)o(D);else{if($)return Ar(p,$,i,function(Le,te){Le?o(Le):o(null,te,U)});var Q=new Error("Cannot find module '"+e+"' from '"+M+"'");Q.code="MODULE_NOT_FOUND",o(Q)}})}}function w(v,D,$){v?o(v):D?o(null,D,$):B(A,function(U,Q,Le){if(U)o(U);else if(Q)Ar(p,Q,i,function(ee,be){ee?o(ee):o(null,be,Le)});else{var te=new Error("Cannot find module '"+e+"' from '"+M+"'");te.code="MODULE_NOT_FOUND",o(te)}})}function W(v,D,$){var U=D,Q=$;typeof U=="function"&&(Q=U,U=void 0);var Le=[""].concat(_);te(Le,v,U);function te(ee,be,ct){if(ee.length===0)return Q(null,void 0,ct);var on=be+ee[0],ze=ct;ze?Ee(null,ze):x(ae.dirname(on),Ee);function Ee(It,hn,ut){if(ze=hn,It)return Q(It);if(ut&&ze&&i.pathFilter){var mo=ae.relative(ut,on),ho=mo.slice(0,mo.length-ee[0].length),er=i.pathFilter(ze,be,ho);if(er)return te([""].concat(_.slice()),ae.resolve(ut,er),ze)}a(on,fo)}function fo(It,hn){if(It)return Q(It);if(hn)return Q(null,on,ze);te(ee.slice(1),be,ze)}}}function x(v,D){if(v===""||v==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(v)||/[/\\]node_modules[/\\]*$/.test(v))return D(null);Ar(p,v,i,function($,U){if($)return x(ae.dirname(v),D);var Q=ae.join(U,"package.json");a(Q,function(Le,te){if(!te)return x(ae.dirname(v),D);d(l,Q,function(ee,be){ee&&D(ee);var ct=be;ct&&i.packageFilter&&(ct=i.packageFilter(ct,Q)),D(null,ct,v)})})})}function B(v,D,$){var U=$,Q=D;typeof Q=="function"&&(U=Q,Q=i.package),Ar(p,v,i,function(Le,te){if(Le)return U(Le);var ee=ae.join(te,"package.json");a(ee,function(be,ct){if(be)return U(be);if(!ct)return W(ae.join(v,"index"),Q,U);d(l,ee,function(on,ze){if(on)return U(on);var Ee=ze;if(Ee&&i.packageFilter&&(Ee=i.packageFilter(Ee,ee)),Ee&&Ee.main){if(typeof Ee.main!="string"){var fo=new TypeError("package \u201C"+Ee.name+"\u201D `main` must be a string");return fo.code="INVALID_PACKAGE_MAIN",U(fo)}(Ee.main==="."||Ee.main==="./")&&(Ee.main="index"),W(ae.resolve(v,Ee.main),Ee,function(It,hn,ut){if(It)return U(It);if(hn)return U(null,hn,ut);if(!ut)return W(ae.join(v,"index"),ut,U);var mo=ae.resolve(v,ut.main);B(mo,ut,function(ho,er,Ic){if(ho)return U(ho);if(er)return U(null,er,Ic);W(ae.join(v,"index"),Ic,U)})});return}W(ae.join(v,"/index"),Ee,U)})})})}function j(v,D){if(D.length===0)return v(null,void 0);var $=D[0];u(ae.dirname($),U);function U(te,ee){if(te)return v(te);if(!ee)return j(v,D.slice(1));W($,i.package,Q)}function Q(te,ee,be){if(te)return v(te);if(ee)return v(null,ee,be);B($,i.package,Le)}function Le(te,ee,be){if(te)return v(te);if(ee)return v(null,ee,be);j(v,D.slice(1))}}function he(v,D,$){var U=function(){return nS(v,D,i)};j($,h?h(v,D,U,i):U())}}});var Op=g((tN,rS)=>{rS.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Ip=g((nN,Rp)=>{"use strict";c();var oS=vr(),Cp=Op(),bp={};for(Xo in Cp)Object.prototype.hasOwnProperty.call(Cp,Xo)&&(bp[Xo]=oS(Xo));var Xo;Rp.exports=bp});var Np=g((oN,Pp)=>{"use strict";c();var iS=vr();Pp.exports=function(e){return iS(e)}});var Lp=g((sN,xp)=>{"use strict";c();var sS=vr(),fn=q("fs"),Te=q("path"),aS=ta(),cS=na(),uS=ia(),lS=sa(),pS=process.platform!=="win32"&&fn.realpathSync&&typeof fn.realpathSync.native=="function"?fn.realpathSync.native:fn.realpathSync,Mp=aS(),dS=function(){return[Te.join(Mp,".node_modules"),Te.join(Mp,".node_libraries")]},fS=function(e){try{var n=fn.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&(n.isFile()||n.isFIFO())},mS=function(e){try{var n=fn.statSync(e,{throwIfNoEntry:!1})}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return!1;throw r}return!!n&&n.isDirectory()},hS=function(e){try{return pS(e)}catch(n){if(n.code!=="ENOENT")throw n}return e},Or=function(e,n,r){return r&&r.preserveSymlinks===!1?e(n):n},_S=function(e,n){var r=e(n);try{var o=JSON.parse(r);return o}catch{}},gS=function(e,n,r){for(var o=uS(n,r,e),i=0;i<o.length;i++)o[i]=Te.join(o[i],e);return o};xp.exports=function(e,n){if(typeof e!="string")throw new TypeError("Path must be a string.");var r=lS(e,n),o=r.isFile||fS,i=r.readFileSync||fn.readFileSync,s=r.isDirectory||mS,a=r.realpathSync||hS,u=r.readPackageSync||_S;if(r.readFileSync&&r.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var l=r.packageIterator,p=r.extensions||[".js"],d=r.includeCoreModules!==!1,m=r.basedir||Te.dirname(cS()),h=r.filename||m;r.paths=r.paths||dS();var _=Or(a,Te.resolve(m),r);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var T=Te.resolve(_,e);(e==="."||e===".."||e.slice(-1)==="/")&&(T+="/");var R=A(T)||w(T);if(R)return Or(a,R,r)}else{if(d&&sS(e))return e;var M=W(e,_);if(M)return Or(a,M,r)}var b=new Error("Cannot find module '"+e+"' from '"+h+"'");throw b.code="MODULE_NOT_FOUND",b;function A(x){var B=N(Te.dirname(x));if(B&&B.dir&&B.pkg&&r.pathFilter){var j=Te.relative(B.dir,x),he=r.pathFilter(B.pkg,x,j);he&&(x=Te.resolve(B.dir,he))}if(o(x))return x;for(var v=0;v<p.length;v++){var D=x+p[v];if(o(D))return D}}function N(x){if(!(x===""||x==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(x))&&!/[/\\]node_modules[/\\]*$/.test(x)){var B=Te.join(Or(a,x,r),"package.json");if(!o(B))return N(Te.dirname(x));var j=u(i,B);return j&&r.packageFilter&&(j=r.packageFilter(j,x)),{pkg:j,dir:x}}}function w(x){var B=Te.join(Or(a,x,r),"/package.json");if(o(B)){try{var j=u(i,B)}catch{}if(j&&r.packageFilter&&(j=r.packageFilter(j,x)),j&&j.main){if(typeof j.main!="string"){var he=new TypeError("package \u201C"+j.name+"\u201D `main` must be a string");throw he.code="INVALID_PACKAGE_MAIN",he}(j.main==="."||j.main==="./")&&(j.main="index");try{var v=A(Te.resolve(x,j.main));if(v)return v;var D=w(Te.resolve(x,j.main));if(D)return D}catch{}}}return A(Te.join(x,"/index"))}function W(x,B){for(var j=function(){return gS(x,B,r)},he=l?l(x,B,j,r):j(),v=0;v<he.length;v++){var D=he[v];if(s(Te.dirname(D))){var $=A(D);if($)return $;var U=w(D);if(U)return U}}}}});var Fp=g((cN,wp)=>{"use strict";c();var Zo=Ap();Zo.core=Ip();Zo.isCore=Np();Zo.sync=Lp();wp.exports=Zo});var ca=g((lN,Dp)=>{"use strict";c();var aa=q("path");Dp.exports=function(t){var e=t.split(aa.sep),n=e.lastIndexOf("node_modules");if(n!==-1&&e[n+1]){var r=e[n+1][0]==="@",o=r?e[n+1]+"/"+e[n+2]:e[n+1],i=r?3:2;return{name:o,basedir:e.slice(0,n+i).join(aa.sep),path:e.slice(n+i).join(aa.sep)}}}});var kp=g((dN,ES)=>{ES.exports={name:"require-in-the-middle",version:"7.4.0",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/elastic/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/elastic/require-in-the-middle/issues"},homepage:"https://github.com/elastic/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var da=g((fN,pa)=>{"use strict";c();var Sn=q("path"),ft=q("module"),ua=Fp(),oe=fg()("require-in-the-middle"),TS=ca();pa.exports=br;pa.exports.Hook=br;var Cr;if(ft.isBuiltin)Cr=ft.isBuiltin;else{let[t,e]=process.versions.node.split(".").map(Number);t===8&&e<8?Cr=n=>n==="http2"?!0:!!ua.core[n]:Cr=n=>!!ua.core[n]}var SS=/([/\\]index)?(\.js)?$/,la=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,n){if(this._localCache.has(e))return!0;if(n)return!1;{let r=q.cache[e];return!!(r&&this._kRitmExports in r)}}get(e,n){let r=this._localCache.get(e);if(r!==void 0)return r;if(!n){let o=q.cache[e];return o&&o[this._kRitmExports]}}set(e,n,r){r?this._localCache.set(e,n):e in q.cache?q.cache[e][this._kRitmExports]=n:(oe('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,n))}};function br(t,e,n){if(!(this instanceof br))return new br(t,e,n);if(typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null),typeof ft._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof ft._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,kp().bugs.url);return}this._cache=new la,this._unhooked=!1,this._origRequire=ft.prototype.require;let r=this,o=new Set,i=e?e.internals===!0:!1,s=Array.isArray(t);oe("registering require hook"),this._require=ft.prototype.require=function(u){return r._unhooked===!0?(oe("ignoring require call - module is soft-unhooked"),r._origRequire.apply(this,arguments)):a.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(u){return r._unhooked===!0?(oe("ignoring process.getBuiltinModule call - module is soft-unhooked"),r._origGetBuiltinModule.apply(this,arguments)):a.call(this,arguments,!0)});function a(u,l){let p=u[0],d=Cr(p),m;if(d){if(m=p,p.startsWith("node:")){let b=p.slice(5);Cr(b)&&(m=b)}}else{if(l)return oe("call to process.getBuiltinModule with unknown built-in id"),r._origGetBuiltinModule.apply(this,u);try{m=ft._resolveFilename(p,this)}catch(b){return oe('Module._resolveFilename("%s") threw %j, calling original Module.require',p,b.message),r._origRequire.apply(this,u)}}let h,_;if(oe("processing %s module require('%s'): %s",d===!0?"core":"non-core",p,m),r._cache.has(m,d)===!0)return oe("returning already patched cached module: %s",m),r._cache.get(m,d);let T=o.has(m);T===!1&&o.add(m);let R=l?r._origGetBuiltinModule.apply(this,u):r._origRequire.apply(this,u);if(T===!0)return oe("module is in the process of being patched already - ignoring: %s",m),R;if(o.delete(m),d===!0){if(s===!0&&t.includes(m)===!1)return oe("ignoring core module not on whitelist: %s",m),R;h=m}else if(s===!0&&t.includes(m)){let b=Sn.parse(m);h=b.name,_=b.dir}else{let b=TS(m);if(b===void 0)return oe("could not parse filename: %s",m),R;h=b.name,_=b.basedir;let A=yS(b);oe("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",h,p,A,_);let N=!1;if(s){if(!p.startsWith(".")&&t.includes(p)&&(h=p,N=!0),!t.includes(h)&&!t.includes(A))return R;t.includes(A)&&A!==h&&(h=A,N=!0)}if(!N){let w;try{w=ua.sync(h,{basedir:_})}catch{return oe("could not resolve module: %s",h),r._cache.set(m,R,d),R}if(w!==m)if(i===!0)h=h+Sn.sep+Sn.relative(_,m),oe("preparing to process require of internal file: %s",h);else return oe("ignoring require of non-main module file: %s",w),r._cache.set(m,R,d),R}}r._cache.set(m,R,d),oe("calling require hook: %s",h);let M=n(R,h,_);return r._cache.set(m,M,d),oe("returning module: %s",h),M}}br.prototype.unhook=function(){this._unhooked=!0,this._require===ft.prototype.require?(ft.prototype.require=this._origRequire,oe("require unhook successful")):oe("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,oe("process.getBuiltinModule unhook successful")):oe("process.getBuiltinModule unhook unsuccessful"))};function yS(t){let e=Sn.sep!=="/"?t.path.split(Sn.sep).join("/"):t.path;return Sn.posix.join(t.name,e).replace(SS,"")}});var Gp,Up,Hp,Rr,jp,qp,Bp=S(()=>{"use strict";c();Gp=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Up=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},Hp=function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))},Rr="/",jp=function(){function t(){this.hooks=[],this.children=new Map}return t}(),qp=function(){function t(){this._trie=new jp,this._counter=0}return t.prototype.insert=function(e){var n,r,o=this._trie;try{for(var i=Gp(e.moduleName.split(Rr)),s=i.next();!s.done;s=i.next()){var a=s.value,u=o.children.get(a);u||(u=new jp,o.children.set(a,u)),o=u}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}o.hooks.push({hook:e,insertedId:this._counter++})},t.prototype.search=function(e,n){var r,o,i=n===void 0?{}:n,s=i.maintainInsertionOrder,a=i.fullOnly,u=this._trie,l=[],p=!0;try{for(var d=Gp(e.split(Rr)),m=d.next();!m.done;m=d.next()){var h=m.value,_=u.children.get(h);if(!_){p=!1;break}a||l.push.apply(l,Hp([],Up(_.hooks),!1)),u=_}}catch(T){r={error:T}}finally{try{m&&!m.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return a&&p&&l.push.apply(l,Hp([],Up(u.hooks),!1)),l.length===0?[]:l.length===1?[l[0].hook]:(s&&l.sort(function(T,R){return T.insertedId-R.insertedId}),l.map(function(T){var R=T.hook;return R}))},t}()});import*as fa from"path";function OS(t){return fa.sep!==Rr?t.split(fa.sep).join(Rr):t}var Wp,vS,AS,Vp,Kp=S(()=>{"use strict";c();Wp=k(da());Bp();vS=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},AS=["afterEach","after","beforeEach","before","describe","it"].every(function(t){return typeof global[t]=="function"}),Vp=function(){function t(){this._moduleNameTrie=new qp,this._initialize()}return t.prototype._initialize=function(){var e=this;new Wp.Hook(null,{internals:!0},function(n,r,o){var i,s,a=OS(r),u=e._moduleNameTrie.search(a,{maintainInsertionOrder:!0,fullOnly:o===void 0});try{for(var l=vS(u),p=l.next();!p.done;p=l.next()){var d=p.value.onRequire;n=d(n,r,o)}}catch(m){i={error:m}}finally{try{p&&!p.done&&(s=l.return)&&s.call(l)}finally{if(i)throw i.error}}return n})},t.prototype.register=function(e,n){var r={moduleName:e,onRequire:n};return this._moduleNameTrie.insert(r),r},t.getInstance=function(){var e;return AS?new t:this._instance=(e=this._instance)!==null&&e!==void 0?e:new t},t}()});var Zp=g(Ir=>{"use strict";c();var Yp=[],ma=new WeakMap,$p=new Map,Xp=[],CS={set(t,e,n){return ma.get(t)[e](n)},defineProperty(t,e,n){if(!("value"in n))throw new Error("Getters/setters are not supported for exports property descriptors.");return ma.get(t)[e](n.value)}};function bS(t,e,n,r){$p.set(t,r),ma.set(e,n);let o=new Proxy(e,CS);Yp.forEach(i=>i(t,o)),Xp.push([t,o])}Ir.register=bS;Ir.importHooks=Yp;Ir.specifiers=$p;Ir.toHook=Xp});var nd=g((AN,Nr)=>{"use strict";c();var zp=q("path"),RS=ca(),{fileURLToPath:Jp}=q("url"),{importHooks:ha,specifiers:IS,toHook:PS}=Zp();function ed(t){ha.push(t),PS.forEach(([e,n])=>t(e,n))}function td(t){let e=ha.indexOf(t);e>-1&&ha.splice(e,1)}function Qp(t,e,n,r){let o=t(e,n,r);o&&o!==e&&(e.default=o)}function Pr(t,e,n){if(!(this instanceof Pr))return new Pr(t,e,n);typeof t=="function"?(n=t,t=null,e=null):typeof e=="function"&&(n=e,e=null);let r=e?e.internals===!0:!1;this._iitmHook=(o,i)=>{let s=o,a=o.startsWith("node:"),u;if(a)o=o.replace(/^node:/,"");else{if(o.startsWith("file://"))try{o=Jp(o)}catch{}let l=RS(o);l&&(o=l.name,u=l.basedir)}if(t){for(let l of t)if(l===o){if(u){if(r)o=o+zp.sep+zp.relative(u,Jp(s));else if(!u.endsWith(IS.get(s)))continue}Qp(n,i,o,u)}}else Qp(n,i,o,u)},ed(this._iitmHook)}Pr.prototype.unhook=function(){td(this._iitmHook)};Nr.exports=Pr;Nr.exports.Hook=Pr;Nr.exports.addHook=ed;Nr.exports.removeHook=td});function xS(t,e,n){var r,o;try{o=t()}catch(i){r=i}finally{if(e(r,o),r&&!n)throw r;return o}}function LS(t,e,n){return NS(this,void 0,void 0,function(){var r,o,i;return MS(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,3,4]),[4,t()];case 1:return o=s.sent(),[3,4];case 2:return i=s.sent(),r=i,[3,4];case 3:if(e(r,o),r&&!n)throw r;return[2,o];case 4:return[2]}})})}function _a(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var NS,MS,ga=S(()=>{"use strict";c();NS=function(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(d){s(d)}}function u(p){try{l(r.throw(p))}catch(d){s(d)}}function l(p){p.done?i(p.value):o(p.value).then(a,u)}l((r=r.apply(t,e||[])).next())})},MS=function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(p){return u([l,p])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(p){l=[6,p],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}});import*as yn from"path";import{types as rd}from"util";import{readFileSync as FS}from"fs";function od(t,e,n){return typeof e>"u"?t.includes("*"):t.some(function(r){return(0,id.satisfies)(e,r,{includePrerelease:n})})}var id,xr,sd,ad,wS,Mr,zo,cd=S(()=>{"use strict";c();id=k(Qc()),xr=k(ea());tp();Kp();sd=k(nd());F();ad=k(da());ga();wS=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zo=function(t){wS(e,t);function e(n,r,o){var i=t.call(this,n,r,o)||this;i._hooks=[],i._requireInTheMiddleSingleton=Vp.getInstance(),i._enabled=!1,i._wrap=function(a,u,l){if(_a(a[u])&&i._unwrap(a,u),rd.isProxy(a)){var p=(0,xr.wrap)(Object.assign({},a),u,l);return Object.defineProperty(a,u,{value:p})}else return(0,xr.wrap)(a,u,l)},i._unwrap=function(a,u){return rd.isProxy(a)?Object.defineProperty(a,u,{value:a[u]}):(0,xr.unwrap)(a,u)},i._massWrap=function(a,u,l){if(a)Array.isArray(a)||(a=[a]);else{_e.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){_e.error("must provide one or more functions to wrap on modules");return}a.forEach(function(p){u.forEach(function(d){i._wrap(p,d,l)})})},i._massUnwrap=function(a,u){if(a)Array.isArray(a)||(a=[a]);else{_e.error("must provide one or more modules to patch");return}if(!(u&&Array.isArray(u))){_e.error("must provide one or more functions to wrap on modules");return}a.forEach(function(l){u.forEach(function(p){i._unwrap(l,p)})})};var s=i.init();return s&&!Array.isArray(s)&&(s=[s]),i._modules=s||[],i._modules.length===0&&_e.debug("No modules instrumentation has been defined for "+("'"+i.instrumentationName+"@"+i.instrumentationVersion+"'")+", nothing will be patched"),i._config.enabled&&i.enable(),i}return e.prototype._warnOnPreloadedModules=function(){var n=this;this._modules.forEach(function(r){var o=r.name;try{var i=q.resolve(o);q.cache[i]&&n._diag.warn("Module "+o+" has been loaded before "+n.instrumentationName+" so it might not work, please initialize it before requiring "+o)}catch{}})},e.prototype._extractPackageVersion=function(n){try{var r=FS(yn.join(n,"package.json"),{encoding:"utf8"}),o=JSON.parse(r).version;return typeof o=="string"?o:void 0}catch{_e.warn("Failed extracting version",n)}},e.prototype._onRequire=function(n,r,o,i){var s=this,a;if(!i)return typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:n.name}),n.patch(r)):r;var u=this._extractPackageVersion(i);if(n.moduleVersion=u,n.name===o)return od(n.supportedVersions,u,n.includePrerelease)&&typeof n.patch=="function"&&(n.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:n.name,version:n.moduleVersion,baseDir:i}),n.patch(r,n.moduleVersion)):r;var l=(a=n.files)!==null&&a!==void 0?a:[],p=yn.normalize(o),d=l.filter(function(m){return m.name===p}).filter(function(m){return od(m.supportedVersions,u,n.includePrerelease)});return d.reduce(function(m,h){return h.moduleExports=m,s._enabled?(s._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:n.name,version:n.moduleVersion,fileName:h.name,baseDir:i}),h.patch(m,n.moduleVersion)):m},r)},e.prototype.enable=function(){var n,r,o,i,s,a,u=this;if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){try{for(var l=Mr(this._modules),p=l.next();!p.done;p=l.next()){var d=p.value;typeof d.patch=="function"&&d.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:d.name,version:d.moduleVersion}),d.patch(d.moduleExports,d.moduleVersion));try{for(var m=(o=void 0,Mr(d.files)),h=m.next();!h.done;h=m.next()){var _=h.value;_.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:d.name,version:d.moduleVersion,fileName:_.name}),_.patch(_.moduleExports,d.moduleVersion))}}catch(N){o={error:N}}finally{try{h&&!h.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}}}catch(N){n={error:N}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return}this._warnOnPreloadedModules();var T=function(N){var w=function(j,he,v){return u._onRequire(N,j,he,v)},W=function(j,he,v){return u._onRequire(N,j,he,v)},x=yn.isAbsolute(N.name)?new ad.Hook([N.name],{internals:!0},W):R._requireInTheMiddleSingleton.register(N.name,W);R._hooks.push(x);var B=new sd.Hook([N.name],{internals:!1},w);R._hooks.push(B)},R=this;try{for(var M=Mr(this._modules),b=M.next();!b.done;b=M.next()){var A=b.value;T(A)}}catch(N){s={error:N}}finally{try{b&&!b.done&&(a=M.return)&&a.call(M)}finally{if(s)throw s.error}}}},e.prototype.disable=function(){var n,r,o,i;if(this._enabled){this._enabled=!1;try{for(var s=Mr(this._modules),a=s.next();!a.done;a=s.next()){var u=a.value;typeof u.unpatch=="function"&&u.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:u.name,version:u.moduleVersion}),u.unpatch(u.moduleExports,u.moduleVersion));try{for(var l=(o=void 0,Mr(u.files)),p=l.next();!p.done;p=l.next()){var d=p.value;d.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:u.name,version:u.moduleVersion,fileName:d.name}),d.unpatch(d.moduleExports,u.moduleVersion))}}catch(m){o={error:m}}finally{try{p&&!p.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}}catch(m){n={error:m}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.isEnabled=function(){return this._enabled},e}(ep)});import{normalize as Jo}from"path";var ud=S(()=>{"use strict";c()});var ld=S(()=>{"use strict";c();cd();ud()});var Ea=S(()=>{"use strict";c();ld()});var pd,dd=S(()=>{"use strict";c();pd=function(){function t(e,n,r,o,i){this.name=e,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}return t}()});var fd,md=S(()=>{"use strict";c();Ea();fd=function(){function t(e,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=Jo(e)}return t}()});var hd=S(()=>{"use strict";c()});var _d=S(()=>{"use strict";c()});var pe={};Ki(pe,{InstrumentationBase:()=>zo,InstrumentationNodeModuleDefinition:()=>pd,InstrumentationNodeModuleFile:()=>fd,isWrapped:()=>_a,registerInstrumentations:()=>Yo,safeExecuteInTheMiddle:()=>xS,safeExecuteInTheMiddleAsync:()=>LS});var ce=S(()=>{"use strict";c();Zl();Ea();dd();md();hd();_d();ga()});var Sd=g(Qo=>{"use strict";c();Object.defineProperty(Qo,"__esModule",{value:!0});Qo.HttpInstrumentation=void 0;var L=(F(),y(z)),vn=(De(),y(Ke)),gd=Qc(),Ed=q("url"),Z=Ks(),DS=xl(),ke=(ce(),y(pe)),Td=(De(),y(Ke)),Ta=q("events"),kS=(ne(),y(le)),Sa=class extends ke.InstrumentationBase{constructor(e={}){super("@opentelemetry/instrumentation-http",DS.VERSION,e),this._spanNotEnded=new WeakSet,this._headerCapture=this._createHeaderCapture()}_updateMetricInstruments(){this._httpServerDurationHistogram=this.meter.createHistogram("http.server.duration",{description:"Measures the duration of inbound HTTP requests.",unit:"ms",valueType:L.ValueType.DOUBLE}),this._httpClientDurationHistogram=this.meter.createHistogram("http.client.duration",{description:"Measures the duration of outbound HTTP requests.",unit:"ms",valueType:L.ValueType.DOUBLE})}setConfig(e={}){super.setConfig(e),this._headerCapture=this._createHeaderCapture()}init(){return[this._getHttpsInstrumentation(),this._getHttpInstrumentation()]}_getHttpInstrumentation(){return new ke.InstrumentationNodeModuleDefinition("http",["*"],e=>(this._wrap(e,"request",this._getPatchOutgoingRequestFunction("http")),this._wrap(e,"get",this._getPatchOutgoingGetFunction(e.request)),this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("http")),e),e=>{e!==void 0&&(this._unwrap(e,"request"),this._unwrap(e,"get"),this._unwrap(e.Server.prototype,"emit"))})}_getHttpsInstrumentation(){return new ke.InstrumentationNodeModuleDefinition("https",["*"],e=>(this._wrap(e,"request",this._getPatchHttpsOutgoingRequestFunction("https")),this._wrap(e,"get",this._getPatchHttpsOutgoingGetFunction(e.request)),this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("https")),e),e=>{e!==void 0&&(this._unwrap(e,"request"),this._unwrap(e,"get"),this._unwrap(e.Server.prototype,"emit"))})}_getPatchIncomingRequestFunction(e){return n=>this._incomingRequestFunction(e,n)}_getPatchOutgoingRequestFunction(e){return n=>this._outgoingRequestFunction(e,n)}_getPatchOutgoingGetFunction(e){return n=>function(o,...i){let s=e(o,...i);return s.end(),s}}_getPatchHttpsOutgoingRequestFunction(e){return n=>{let r=this;return function(i,...s){var a;return e==="https"&&typeof i=="object"&&((a=i?.constructor)===null||a===void 0?void 0:a.name)!=="URL"&&(i=Object.assign({},i),r._setDefaultOptions(i)),r._getPatchOutgoingRequestFunction(e)(n)(i,...s)}}}_setDefaultOptions(e){e.protocol=e.protocol||"https:",e.port=e.port||443}_getPatchHttpsOutgoingGetFunction(e){return n=>{let r=this;return function(i,...s){return r._getPatchOutgoingGetFunction(e)(n)(i,...s)}}}_traceClientRequest(e,n,r,o){this.getConfig().requestHook&&this._callRequestHook(n,e);let i=!1;return e.prependListener("response",s=>{this._diag.debug("outgoingRequest on response()"),e.listenerCount("response")<=1&&s.resume();let a=Z.getOutgoingRequestAttributesOnResponse(s);n.setAttributes(a),o=Object.assign(o,Z.getOutgoingRequestMetricAttributesOnResponse(a)),this.getConfig().responseHook&&this._callResponseHook(n,s),this._headerCapture.client.captureRequestHeaders(n,l=>e.getHeader(l)),this._headerCapture.client.captureResponseHeaders(n,l=>s.headers[l]),L.context.bind(L.context.active(),s);let u=()=>{if(this._diag.debug("outgoingRequest on end()"),i)return;i=!0;let l;s.aborted&&!s.complete?l={code:L.SpanStatusCode.ERROR}:l={code:Z.parseResponseStatus(L.SpanKind.CLIENT,s.statusCode)},n.setStatus(l),this.getConfig().applyCustomAttributesOnSpan&&(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(n,e,s),()=>{},!0),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o)};s.on("end",u),gd.lt(process.version,"16.0.0")&&s.on("close",u),s.on(Ta.errorMonitor,l=>{this._diag.debug("outgoingRequest on error()",l),!i&&(i=!0,Z.setSpanWithError(n,l),n.setStatus({code:L.SpanStatusCode.ERROR,message:l.message}),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))})}),e.on("close",()=>{this._diag.debug("outgoingRequest on request close()"),!(e.aborted||i)&&(i=!0,this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))}),e.on(Ta.errorMonitor,s=>{this._diag.debug("outgoingRequest on request error()",s),!i&&(i=!0,Z.setSpanWithError(n,s),this._closeHttpSpan(n,L.SpanKind.CLIENT,r,o))}),this._diag.debug("http.ClientRequest return request"),e}_incomingRequestFunction(e,n){let r=this;return function(i,...s){if(i!=="request")return n.apply(this,[i,...s]);let a=s[0],u=s[1],l=a.url&&Ed.parse(a.url).pathname||"/",p=a.method||"GET";if(r._diag.debug(`${e} instrumentation incomingRequest`),Z.isIgnored(l,r.getConfig().ignoreIncomingPaths,A=>r._diag.error("caught ignoreIncomingPaths error: ",A))||(0,ke.safeExecuteInTheMiddle)(()=>{var A,N;return(N=(A=r.getConfig()).ignoreIncomingRequestHook)===null||N===void 0?void 0:N.call(A,a)},A=>{A!=null&&r._diag.error("caught ignoreIncomingRequestHook error: ",A)},!0))return L.context.with((0,vn.suppressTracing)(L.context.active()),()=>(L.context.bind(L.context.active(),a),L.context.bind(L.context.active(),u),n.apply(this,[i,...s])));let d=a.headers,m=Z.getIncomingRequestAttributes(a,{component:e,serverName:r.getConfig().serverName,hookAttributes:r._callStartSpanHook(a,r.getConfig().startIncomingSpanHook)}),h={kind:L.SpanKind.SERVER,attributes:m},_=(0,vn.hrTime)(),T=Z.getIncomingRequestMetricAttributes(m),R=L.propagation.extract(L.ROOT_CONTEXT,d),M=r._startHttpSpan(p,h,R),b={type:Td.RPCType.HTTP,span:M};return L.context.with((0,Td.setRPCMetadata)(L.trace.setSpan(R,M),b),()=>{L.context.bind(L.context.active(),a),L.context.bind(L.context.active(),u),r.getConfig().requestHook&&r._callRequestHook(M,a),r.getConfig().responseHook&&r._callResponseHook(M,u),r._headerCapture.server.captureRequestHeaders(M,N=>a.headers[N]);let A=!1;return u.on("close",()=>{A||r._onServerResponseFinish(a,u,M,T,_)}),u.on(Ta.errorMonitor,N=>{A=!0,r._onServerResponseError(M,T,_,N)}),(0,ke.safeExecuteInTheMiddle)(()=>n.apply(this,[i,...s]),N=>{if(N)throw Z.setSpanWithError(M,N),r._closeHttpSpan(M,L.SpanKind.SERVER,_,T),N})})}}_outgoingRequestFunction(e,n){let r=this;return function(i,...s){if(!Z.isValidOptionsType(i))return n.apply(this,[i,...s]);let a=typeof s[0]=="object"&&(typeof i=="string"||i instanceof Ed.URL)?s.shift():void 0,{origin:u,pathname:l,method:p,optionsParsed:d}=Z.getRequestInfo(i,a);if(e==="http"&&gd.lt(process.version,"9.0.0")&&d.protocol==="https:")return n.apply(this,[d,...s]);if(Z.isIgnored(u+l,r.getConfig().ignoreOutgoingUrls,w=>r._diag.error("caught ignoreOutgoingUrls error: ",w))||(0,ke.safeExecuteInTheMiddle)(()=>{var w,W;return(W=(w=r.getConfig()).ignoreOutgoingRequestHook)===null||W===void 0?void 0:W.call(w,d)},w=>{w!=null&&r._diag.error("caught ignoreOutgoingRequestHook error: ",w)},!0))return n.apply(this,[d,...s]);let{hostname:m,port:h}=Z.extractHostnameAndPort(d),_=Z.getOutgoingRequestAttributes(d,{component:e,port:h,hostname:m,hookAttributes:r._callStartSpanHook(d,r.getConfig().startOutgoingSpanHook)}),T=(0,vn.hrTime)(),R=Z.getOutgoingRequestMetricAttributes(_),M={kind:L.SpanKind.CLIENT,attributes:_},b=r._startHttpSpan(p,M),A=L.context.active(),N=L.trace.setSpan(A,b);return d.headers?d.headers=Object.assign({},d.headers):d.headers={},L.propagation.inject(N,d.headers),L.context.with(N,()=>{let w=s[s.length-1];typeof w=="function"&&(s[s.length-1]=L.context.bind(A,w));let W=(0,ke.safeExecuteInTheMiddle)(()=>n.apply(this,[d,...s]),x=>{if(x)throw Z.setSpanWithError(b,x),r._closeHttpSpan(b,L.SpanKind.CLIENT,T,R),x});return r._diag.debug(`${e} instrumentation outgoingRequest`),L.context.bind(A,W),r._traceClientRequest(W,b,T,R)})}}_onServerResponseFinish(e,n,r,o,i){let s=Z.getIncomingRequestAttributesOnResponse(e,n);o=Object.assign(o,Z.getIncomingRequestMetricAttributesOnResponse(s)),this._headerCapture.server.captureResponseHeaders(r,u=>n.getHeader(u)),r.setAttributes(s).setStatus({code:Z.parseResponseStatus(L.SpanKind.SERVER,n.statusCode)});let a=s[kS.SEMATTRS_HTTP_ROUTE];a&&r.updateName(`${e.method||"GET"} ${a}`),this.getConfig().applyCustomAttributesOnSpan&&(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(r,e,n),()=>{},!0),this._closeHttpSpan(r,L.SpanKind.SERVER,i,o)}_onServerResponseError(e,n,r,o){Z.setSpanWithError(e,o),this._closeHttpSpan(e,L.SpanKind.SERVER,r,n)}_startHttpSpan(e,n,r=L.context.active()){let o=n.kind===L.SpanKind.CLIENT?this.getConfig().requireParentforOutgoingSpans:this.getConfig().requireParentforIncomingSpans,i,s=L.trace.getSpan(r);return o===!0&&s===void 0?i=L.trace.wrapSpanContext(L.INVALID_SPAN_CONTEXT):o===!0&&s?.spanContext().isRemote?i=s:i=this.tracer.startSpan(e,n,r),this._spanNotEnded.add(i),i}_closeHttpSpan(e,n,r,o){if(!this._spanNotEnded.has(e))return;e.end(),this._spanNotEnded.delete(e);let i=(0,vn.hrTimeToMilliseconds)((0,vn.hrTimeDuration)(r,(0,vn.hrTime)()));n===L.SpanKind.SERVER?this._httpServerDurationHistogram.record(i,o):n===L.SpanKind.CLIENT&&this._httpClientDurationHistogram.record(i,o)}_callResponseHook(e,n){(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().responseHook(e,n),()=>{},!0)}_callRequestHook(e,n){(0,ke.safeExecuteInTheMiddle)(()=>this.getConfig().requestHook(e,n),()=>{},!0)}_callStartSpanHook(e,n){if(typeof n=="function")return(0,ke.safeExecuteInTheMiddle)(()=>n(e),()=>{},!0)}_createHeaderCapture(){var e,n,r,o,i,s,a,u,l,p,d,m;let h=this.getConfig();return{client:{captureRequestHeaders:Z.headerCapture("request",(r=(n=(e=h.headersToSpanAttributes)===null||e===void 0?void 0:e.client)===null||n===void 0?void 0:n.requestHeaders)!==null&&r!==void 0?r:[]),captureResponseHeaders:Z.headerCapture("response",(s=(i=(o=h.headersToSpanAttributes)===null||o===void 0?void 0:o.client)===null||i===void 0?void 0:i.responseHeaders)!==null&&s!==void 0?s:[])},server:{captureRequestHeaders:Z.headerCapture("request",(l=(u=(a=h.headersToSpanAttributes)===null||a===void 0?void 0:a.server)===null||u===void 0?void 0:u.requestHeaders)!==null&&l!==void 0?l:[]),captureResponseHeaders:Z.headerCapture("response",(m=(d=(p=h.headersToSpanAttributes)===null||p===void 0?void 0:p.server)===null||d===void 0?void 0:d.responseHeaders)!==null&&m!==void 0?m:[])}}}};Qo.HttpInstrumentation=Sa});var vd=g(yd=>{"use strict";c();Object.defineProperty(yd,"__esModule",{value:!0})});var Ad=g(mt=>{"use strict";c();var GS=mt&&mt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ya=mt&&mt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&GS(e,t,n)};Object.defineProperty(mt,"__esModule",{value:!0});ya(Sd(),mt);ya(vd(),mt);ya(Ks(),mt)});var ni=g(Fr=>{"use strict";c();Object.defineProperty(Fr,"__esModule",{value:!0});Fr.ExpressLayerType=void 0;var ov;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(ov=Fr.ExpressLayerType||(Fr.ExpressLayerType={}))});var ri=g(Dr=>{"use strict";c();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AttributeNames=void 0;var iv;(function(t){t.EXPRESS_TYPE="express.type",t.EXPRESS_NAME="express.name"})(iv=Dr.AttributeNames||(Dr.AttributeNames={}))});var Ia=g(On=>{"use strict";c();Object.defineProperty(On,"__esModule",{value:!0});On._LAYERS_STORE_PROPERTY=On.kLayerPatched=void 0;On.kLayerPatched=Symbol("express-layer-patched");On._LAYERS_STORE_PROPERTY="__ot_middlewares"});var af=g(Ge=>{"use strict";c();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.getLayerPath=Ge.asErrorAndMessage=Ge.isLayerIgnored=Ge.getLayerMetadata=Ge.storeLayerPath=void 0;var Pa=ni(),Cn=ri(),Na=Ia(),sv=(t,e)=>{Array.isArray(t[Na._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,Na._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e!==void 0&&t[Na._LAYERS_STORE_PROPERTY].push(e)};Ge.storeLayerPath=sv;var av=(t,e)=>t.name==="router"?{attributes:{[Cn.AttributeNames.EXPRESS_NAME]:e,[Cn.AttributeNames.EXPRESS_TYPE]:Pa.ExpressLayerType.ROUTER},name:`router - ${e}`}:t.name==="bound dispatch"?{attributes:{[Cn.AttributeNames.EXPRESS_NAME]:e??"request handler",[Cn.AttributeNames.EXPRESS_TYPE]:Pa.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e}`:""}`}:{attributes:{[Cn.AttributeNames.EXPRESS_NAME]:t.name,[Cn.AttributeNames.EXPRESS_TYPE]:Pa.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Ge.getLayerMetadata=av;var cv=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")},uv=(t,e,n)=>{var r;if(Array.isArray(n?.ignoreLayersType)&&(!((r=n?.ignoreLayersType)===null||r===void 0)&&r.includes(e)))return!0;if(Array.isArray(n?.ignoreLayers)===!1)return!1;try{for(let o of n.ignoreLayers)if(cv(t,o))return!0}catch{}return!1};Ge.isLayerIgnored=uv;var lv=t=>t instanceof Error?[t,t.message]:[String(t),String(t)];Ge.asErrorAndMessage=lv;var pv=t=>Array.isArray(t[0])?t[0].map(e=>sf(e)||"").join(","):sf(t[0]);Ge.getLayerPath=pv;var sf=t=>{if(typeof t=="string")return t;if(t instanceof RegExp||typeof t=="number")return t.toString()}});var cf=g(bn=>{"use strict";c();Object.defineProperty(bn,"__esModule",{value:!0});bn.PACKAGE_NAME=bn.PACKAGE_VERSION=void 0;bn.PACKAGE_VERSION="0.41.0";bn.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var ff=g(oi=>{"use strict";c();Object.defineProperty(oi,"__esModule",{value:!0});oi.ExpressInstrumentation=void 0;var uf=(De(),y(Ke)),mn=(F(),y(z)),lf=ni(),pf=ri(),Ft=af(),df=cf(),Rn=(ce(),y(pe)),dv=(ne(),y(le)),kr=Ia(),Ma=class extends Rn.InstrumentationBase{constructor(e={}){super(df.PACKAGE_NAME,df.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new Rn.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <5"],e=>{let n=e.Router;return(0,Rn.isWrapped)(n.route)&&this._unwrap(n,"route"),this._wrap(n,"route",this._getRoutePatch()),(0,Rn.isWrapped)(n.use)&&this._unwrap(n,"use"),this._wrap(n,"use",this._getRouterUsePatch()),(0,Rn.isWrapped)(e.application.use)&&this._unwrap(e.application,"use"),this._wrap(e.application,"use",this._getAppUsePatch()),e},e=>{if(e===void 0)return;let n=e.Router;this._unwrap(n,"route"),this._unwrap(n,"use"),this._unwrap(e.application,"use")})]}_getRoutePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return e._applyPatch(s,(0,Ft.getLayerPath)(o)),i}}}_getRouterUsePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return e._applyPatch(s,(0,Ft.getLayerPath)(o)),i}}}_getAppUsePatch(){let e=this;return function(n){return function(...o){let i=n.apply(this,o),s=this._router.stack[this._router.stack.length-1];return e._applyPatch(s,(0,Ft.getLayerPath)(o)),i}}}_applyPatch(e,n){let r=this;e[kr.kLayerPatched]!==!0&&(e[kr.kLayerPatched]=!0,this._wrap(e,"handle",o=>{if(o.length===4)return o;let i=function(s,a){(0,Ft.storeLayerPath)(s,n);let u=s[kr._LAYERS_STORE_PROPERTY].filter(A=>A!=="/"&&A!=="/*").join("").replace(/\/{2,}/g,"/"),l={[dv.SEMATTRS_HTTP_ROUTE]:u.length>0?u:"/"},p=(0,Ft.getLayerMetadata)(e,n),d=p.attributes[pf.AttributeNames.EXPRESS_TYPE],m=(0,uf.getRPCMetadata)(mn.context.active());if(m?.type===uf.RPCType.HTTP&&(m.route=u||"/"),(0,Ft.isLayerIgnored)(p.name,d,r._config))return d===lf.ExpressLayerType.MIDDLEWARE&&s[kr._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(mn.trace.getSpan(mn.context.active())===void 0)return o.apply(this,arguments);let h=r._getSpanName({request:s,layerType:d,route:u},p.name),_=r.tracer.startSpan(h,{attributes:Object.assign(l,p.attributes)});r.getConfig().requestHook&&(0,Rn.safeExecuteInTheMiddle)(()=>r.getConfig().requestHook(_,{request:s,layerType:d,route:u}),A=>{A&&mn.diag.error("express instrumentation: request hook failed",A)},!0);let T=!1;p.attributes[pf.AttributeNames.EXPRESS_TYPE]!==lf.ExpressLayerType.MIDDLEWARE&&(_.end(),T=!0);let R=()=>{T===!1&&(T=!0,_.end())},M=Array.from(arguments),b=M.findIndex(A=>typeof A=="function");b>=0&&(arguments[b]=function(){var A;let N=arguments[0],w=![void 0,null,"route","router"].includes(N);if(!T&&w){let[x,B]=(0,Ft.asErrorAndMessage)(N);_.recordException(x),_.setStatus({code:mn.SpanStatusCode.ERROR,message:B})}return T===!1&&(T=!0,(A=s.res)===null||A===void 0||A.removeListener("finish",R),_.end()),s.route&&w||s[kr._LAYERS_STORE_PROPERTY].pop(),M[b].apply(this,arguments)});try{return o.apply(this,arguments)}catch(A){let[N,w]=(0,Ft.asErrorAndMessage)(A);throw _.recordException(N),_.setStatus({code:mn.SpanStatusCode.ERROR,message:w}),A}finally{T||a.once("finish",R)}};return Object.keys(o).forEach(s=>{Object.defineProperty(i,s,{get(){return o[s]},set(a){o[s]=a}})}),i}))}_getSpanName(e,n){var r;let o=this.getConfig().spanNameHook;if(!(o instanceof Function))return n;try{return(r=o(e,n))!==null&&r!==void 0?r:n}catch(i){return mn.diag.error("express instrumentation: error calling span name rewrite hook",i),n}}};oi.ExpressInstrumentation=Ma});var hf=g(mf=>{"use strict";c();Object.defineProperty(mf,"__esModule",{value:!0})});var _f=g(et=>{"use strict";c();var fv=et&&et.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),ii=et&&et.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&fv(e,t,n)};Object.defineProperty(et,"__esModule",{value:!0});ii(ff(),et);ii(ni(),et);ii(ri(),et);ii(hf(),et)});var xa=g($e=>{"use strict";c();Object.defineProperty($e,"__esModule",{value:!0});$e.FastifyNames=$e.FastifyTypes=$e.AttributeNames=void 0;var hv;(function(t){t.FASTIFY_NAME="fastify.name",t.FASTIFY_TYPE="fastify.type",t.HOOK_NAME="hook.name",t.PLUGIN_NAME="plugin.name"})(hv=$e.AttributeNames||($e.AttributeNames={}));var _v;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(_v=$e.FastifyTypes||($e.FastifyTypes={}));var gv;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request handler"})(gv=$e.FastifyNames||($e.FastifyNames={}))});var Of=g(Af=>{"use strict";c();Object.defineProperty(Af,"__esModule",{value:!0})});var La=g(In=>{"use strict";c();Object.defineProperty(In,"__esModule",{value:!0});In.hooksNamesToWrap=In.spanRequestSymbol=void 0;In.spanRequestSymbol=Symbol("opentelemetry.instrumentation.fastify.request_active_span");In.hooksNamesToWrap=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"])});var bf=g(Dt=>{"use strict";c();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.safeExecuteInTheMiddleMaybePromise=Dt.endSpan=Dt.startSpan=void 0;var Ev=(F(),y(z)),si=La();function Tv(t,e,n,r={}){let o=e.startSpan(n,{attributes:r}),i=t[si.spanRequestSymbol]||[];return i.push(o),Object.defineProperty(t,si.spanRequestSymbol,{enumerable:!1,configurable:!0,value:i}),o}Dt.startSpan=Tv;function Sv(t,e){let n=t[si.spanRequestSymbol]||[];n.length&&(n.forEach(r=>{e&&(r.setStatus({code:Ev.SpanStatusCode.ERROR,message:e.message}),r.recordException(e)),r.end()}),delete t[si.spanRequestSymbol])}Dt.endSpan=Sv;function yv(t,e,n){let r,o;try{o=t(),Cf(o)&&o.then(i=>e(void 0,i),i=>e(i))}catch(i){r=i}finally{if(!Cf(o)&&(e(r,o),r&&!n))throw r;return o}}Dt.safeExecuteInTheMiddleMaybePromise=yv;function Cf(t){var e;return typeof t=="object"&&t&&typeof((e=Object.getOwnPropertyDescriptor(t,"then"))===null||e===void 0?void 0:e.value)=="function"||!1}});var Rf=g(Pn=>{"use strict";c();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.PACKAGE_NAME=Pn.PACKAGE_VERSION=void 0;Pn.PACKAGE_VERSION="0.38.0";Pn.PACKAGE_NAME="@opentelemetry/instrumentation-fastify"});var Nf=g(Gt=>{"use strict";c();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.FastifyInstrumentation=Gt.ANONYMOUS_NAME=void 0;var kt=(F(),y(z)),If=(De(),y(Ke)),ai=(ce(),y(pe)),vv=(ne(),y(le)),Av=La(),tt=xa(),Nn=bf(),Pf=Rf();Gt.ANONYMOUS_NAME="anonymous";var wa=class extends ai.InstrumentationBase{constructor(e={}){super(Pf.PACKAGE_NAME,Pf.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new ai.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <5"],e=>this._patchConstructor(e))]}_hookOnRequest(){let e=this;return function(r,o,i){if(!e.isEnabled())return i();e._wrap(o,"send",e._patchSend());let s=r,a=(0,If.getRPCMetadata)(kt.context.active()),u=s.routeOptions?s.routeOptions.url:r.routerPath;u&&a?.type===If.RPCType.HTTP&&(a.route=u),i()}}_wrapHandler(e,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...s){if(!i.isEnabled())return r.apply(this,s);let a=r.name||e||Gt.ANONYMOUS_NAME,u=`${tt.FastifyNames.MIDDLEWARE} - ${a}`,l=s[1],p=(0,Nn.startSpan)(l,i.tracer,u,{[tt.AttributeNames.FASTIFY_TYPE]:tt.FastifyTypes.MIDDLEWARE,[tt.AttributeNames.PLUGIN_NAME]:e,[tt.AttributeNames.HOOK_NAME]:n}),d=o&&s[s.length-1];return d&&(s[s.length-1]=function(...m){(0,Nn.endSpan)(l),d.apply(this,m)}),kt.context.with(kt.trace.setSpan(kt.context.active(),p),()=>(0,Nn.safeExecuteInTheMiddleMaybePromise)(()=>r.apply(this,s),m=>{m instanceof Error&&(p.setStatus({code:kt.SpanStatusCode.ERROR,message:m.message}),p.recordException(m)),o||(0,Nn.endSpan)(l)}))}}_wrapAddHook(){let e=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],s=o[1],a=this.pluginName;if(!Av.hooksNamesToWrap.has(i))return n.apply(this,o);let u=typeof o[o.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,e._wrapHandler(a,i,s,u)])}}}_patchConstructor(e){let n=this;function r(...o){let i=e.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),n._wrap(i,"addHook",n._wrapAddHook()),i}return r.fastify=r,r.default=r,r}_patchSend(){let e=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let s=i[0];return e.isEnabled()?(0,ai.safeExecuteInTheMiddle)(()=>r.apply(this,i),a=>{!a&&s instanceof Error&&(a=s),(0,Nn.endSpan)(this,a)}):r.apply(this,i)}}}_hookPreHandler(){let e=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){var s,a;if(!e.isEnabled())return i();let u=r,l=((s=u.routeOptions)===null||s===void 0?void 0:s.handler)||((a=u.context)===null||a===void 0?void 0:a.handler),p=l?.name.startsWith("bound ")?l.name.substr(6):l?.name,d=`${tt.FastifyNames.REQUEST_HANDLER} - ${p||this.pluginName||Gt.ANONYMOUS_NAME}`,m={[tt.AttributeNames.PLUGIN_NAME]:this.pluginName,[tt.AttributeNames.FASTIFY_TYPE]:tt.FastifyTypes.REQUEST_HANDLER,[vv.SEMATTRS_HTTP_ROUTE]:u.routeOptions?u.routeOptions.url:r.routerPath};p&&(m[tt.AttributeNames.FASTIFY_NAME]=p);let h=(0,Nn.startSpan)(o,e.tracer,d,m);return e.getConfig().requestHook&&(0,ai.safeExecuteInTheMiddle)(()=>e.getConfig().requestHook(h,{request:r}),_=>{_&&e._diag.error("request hook failed",_)},!0),kt.context.with(kt.trace.setSpan(kt.context.active(),h),()=>{i()})}}};Gt.FastifyInstrumentation=wa});var Mf=g(_t=>{"use strict";c();var Ov=_t&&_t.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Fa=_t&&_t.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ov(e,t,n)};Object.defineProperty(_t,"__esModule",{value:!0});Fa(xa(),_t);Fa(Of(),_t);Fa(Nf(),_t)});var Da=g(Xe=>{"use strict";c();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.SpanNames=Xe.TokenKind=Xe.AllowedOperationTypes=void 0;var Rv;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Rv=Xe.AllowedOperationTypes||(Xe.AllowedOperationTypes={}));var Iv;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(Iv=Xe.TokenKind||(Xe.TokenKind={}));var Pv;(function(t){t.EXECUTE="graphql.execute",t.PARSE="graphql.parse",t.RESOLVE="graphql.resolve",t.VALIDATE="graphql.validate",t.SCHEMA_VALIDATE="graphql.validateSchema",t.SCHEMA_PARSE="graphql.parseSchema"})(Pv=Xe.SpanNames||(Xe.SpanNames={}))});var ka=g(Gr=>{"use strict";c();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.AttributeNames=void 0;var Nv;(function(t){t.SOURCE="graphql.source",t.FIELD_NAME="graphql.field.name",t.FIELD_PATH="graphql.field.path",t.FIELD_TYPE="graphql.field.type",t.OPERATION_TYPE="graphql.operation.type",t.OPERATION_NAME="graphql.operation.name",t.VARIABLES="graphql.variables.",t.ERROR_VALIDATION_NAME="graphql.validation.error"})(Nv=Gr.AttributeNames||(Gr.AttributeNames={}))});var ci=g(Mn=>{"use strict";c();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.OTEL_GRAPHQL_DATA_SYMBOL=Mn.OTEL_PATCHED_SYMBOL=void 0;Mn.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");Mn.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var Df=g(ui=>{"use strict";c();Object.defineProperty(ui,"__esModule",{value:!0});ui.OPERATION_NOT_SUPPORTED=void 0;var Fx=ci();ui.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var $f=g(fe=>{"use strict";c();Object.defineProperty(fe,"__esModule",{value:!0});fe.wrapFieldResolver=fe.wrapFields=fe.getSourceFromLocation=fe.getOperation=fe.endSpan=fe.addSpanSource=fe.addInputVariableAttributes=fe.isPromise=void 0;var Ln=(F(),y(z)),Ut=Da(),xn=ka(),gt=ci(),kf=Object.values(Ut.AllowedOperationTypes),Mv=t=>typeof t?.then=="function";fe.isPromise=Mv;var xv=t=>typeof t=="object"&&t!==null;function Ga(t,e,n){Array.isArray(n)?n.forEach((r,o)=>{Ga(t,`${e}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{Ga(t,`${e}.${r}`,o)}):t.setAttribute(`${xn.AttributeNames.VARIABLES}${String(e)}`,n)}function Lv(t,e){Object.entries(e).forEach(([n,r])=>{Ga(t,n,r)})}fe.addInputVariableAttributes=Lv;function jf(t,e,n,r,o){let i=Vf(e,n,r,o);t.setAttribute(xn.AttributeNames.SOURCE,i)}fe.addSpanSource=jf;function wv(t,e,n,r,o){let i=qf(n,o),s=!1;if(!i){s=!0;let a=Bf(n,o);i={parent:a,span:Fv(t,e,n,r,o,a.span),error:null},Gv(n,o,i)}return{spanAdded:s,field:i}}function Fv(t,e,n,r,o,i){var s,a;let u={[xn.AttributeNames.FIELD_NAME]:r.fieldName,[xn.AttributeNames.FIELD_PATH]:o.join("."),[xn.AttributeNames.FIELD_TYPE]:r.returnType.toString()},l=t.startSpan(`${Ut.SpanNames.RESOLVE} ${u[xn.AttributeNames.FIELD_PATH]}`,{attributes:u},i?Ln.trace.setSpan(Ln.context.active(),i):void 0),p=n[gt.OTEL_GRAPHQL_DATA_SYMBOL].source,d=r.fieldNodes.find(m=>m.kind==="Field");return d&&jf(l,p.loc,e().allowValues,(s=d.loc)===null||s===void 0?void 0:s.start,(a=d.loc)===null||a===void 0?void 0:a.end),l}function Dv(t,e){e&&t.recordException(e),t.end()}fe.endSpan=Dv;function kv(t,e){if(!(!t||!Array.isArray(t.definitions)))return e?t.definitions.filter(n=>{var r;return kf.indexOf((r=n)===null||r===void 0?void 0:r.operation)!==-1}).find(n=>{var r,o;return e===((o=(r=n)===null||r===void 0?void 0:r.name)===null||o===void 0?void 0:o.value)}):t.definitions.find(n=>{var r;return kf.indexOf((r=n)===null||r===void 0?void 0:r.operation)!==-1})}fe.getOperation=kv;function Gv(t,e,n){return t[gt.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]=n}function qf(t,e){return t[gt.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]}function Bf(t,e){for(let n=e.length-1;n>0;n--){let r=qf(t,e.slice(0,n));if(r)return r}return{span:t[gt.OTEL_GRAPHQL_DATA_SYMBOL].span}}function Uv(t,e){let n=[],r=e;for(;r;){let o=r.key;t&&typeof o=="number"&&(o="*"),n.push(String(o)),r=r.prev}return n.reverse()}function Hv(t){return Wf(`
|
|
4
4
|
`,t)}function Gf(t){return Wf(" ",t)}function Wf(t,e){let n="";for(let r=0;r<e;r++)n+=t;return n}var jv=[Ut.TokenKind.FLOAT,Ut.TokenKind.STRING,Ut.TokenKind.INT,Ut.TokenKind.BLOCK_STRING];function Vf(t,e=!1,n,r){var o,i;let s="";if(t?.startToken){let a=typeof n=="number"?n:t.start,u=typeof r=="number"?r:t.end,l=t.startToken.next,p=1;for(;l;){if(l.start<a){l=l.next,p=l?.line;continue}if(l.end>u){l=l.next,p=l?.line;continue}let d=l.value||l.kind,m="";!e&&jv.indexOf(l.kind)>=0&&(d="*"),l.kind===Ut.TokenKind.STRING&&(d=`"${d}"`),l.kind===Ut.TokenKind.EOF&&(d=""),l.line>p?(s+=Hv(l.line-p),p=l.line,m=Gf(l.column-1)):l.line===((o=l.prev)===null||o===void 0?void 0:o.line)&&(m=Gf(l.start-(((i=l.prev)===null||i===void 0?void 0:i.end)||0))),s+=m+d,l&&(l=l.next)}}return s}fe.getSourceFromLocation=Vf;function Kf(t,e,n){if(!t||typeof t.getFields!="function"||t[gt.OTEL_PATCHED_SYMBOL])return;let r=t.getFields();t[gt.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=Yf(e,n,i.resolve)),i.type)){let s=i.type;for(;s.ofType;)s=s.ofType;Kf(s,e,n)}})}fe.wrapFields=Kf;var Uf=(t,e,n)=>{n&&(t.recordException(e),t.setStatus({code:Ln.SpanStatusCode.ERROR,message:e.message}),t.end())},Hf=(t,e)=>{e&&t.end()};function Yf(t,e,n,r=!1){if(o[gt.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,a,u){if(!n)return;let l=e();if(l.ignoreTrivialResolveSpans&&r&&(xv(i)||typeof i=="function")&&typeof i[u.fieldName]!="function")return n.call(this,i,s,a,u);if(!a[gt.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,a,u);let p=Uv(l.mergeItems,u&&u.path),d=p.filter(_=>typeof _=="string").length,m,h=!1;if(l.depth>=0&&l.depth<d)m=Bf(a,p);else{let _=wv(t,e,a,u,p);m=_.field,h=_.spanAdded}return Ln.context.with(Ln.trace.setSpan(Ln.context.active(),m.span),()=>{try{let _=n.call(this,i,s,a,u);return(0,fe.isPromise)(_)?_.then(T=>(Hf(m.span,h),T),T=>{throw Uf(m.span,T,h),T}):(Hf(m.span,h),_)}catch(_){throw Uf(m.span,_,h),_}})}return o[gt.OTEL_PATCHED_SYMBOL]=!0,o}fe.wrapFieldResolver=Yf});var Xf=g(wn=>{"use strict";c();Object.defineProperty(wn,"__esModule",{value:!0});wn.PACKAGE_NAME=wn.PACKAGE_VERSION=void 0;wn.PACKAGE_VERSION="0.42.0";wn.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var Jf=g(di=>{"use strict";c();Object.defineProperty(di,"__esModule",{value:!0});di.GraphQLInstrumentation=void 0;var Et=(F(),y(z)),Ue=(ce(),y(pe)),Ur=Da(),li=ka(),Ua=ci(),qv=Df(),ye=$f(),Zf=Xf(),zf={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},pi=[">=14.0.0 <17"],Ha=class extends Ue.InstrumentationBase{constructor(e={}){super(Zf.PACKAGE_NAME,Zf.PACKAGE_VERSION,Object.assign({},zf,e))}_getConfig(){return this._config}setConfig(e={}){this._config=Object.assign({},zf,e)}init(){let e=new Ue.InstrumentationNodeModuleDefinition("graphql",pi);return e.files.push(this._addPatchingExecute()),e.files.push(this._addPatchingParser()),e.files.push(this._addPatchingValidate()),e}_addPatchingExecute(){return new Ue.InstrumentationNodeModuleFile("graphql/execution/execute.js",pi,e=>((0,Ue.isWrapped)(e.execute)&&this._unwrap(e,"execute"),this._wrap(e,"execute",this._patchExecute(e.defaultFieldResolver)),e),e=>{e&&this._unwrap(e,"execute")})}_addPatchingParser(){return new Ue.InstrumentationNodeModuleFile("graphql/language/parser.js",pi,e=>((0,Ue.isWrapped)(e.parse)&&this._unwrap(e,"parse"),this._wrap(e,"parse",this._patchParse()),e),e=>{e&&this._unwrap(e,"parse")})}_addPatchingValidate(){return new Ue.InstrumentationNodeModuleFile("graphql/validation/validate.js",pi,e=>((0,Ue.isWrapped)(e.validate)&&this._unwrap(e,"validate"),this._wrap(e,"validate",this._patchValidate()),e),e=>{e&&this._unwrap(e,"validate")})}_patchExecute(e){let n=this;return function(o){return function(){let s;if(arguments.length>=2){let l=arguments;s=n._wrapExecuteArgs(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],e)}else{let l=arguments[0];s=n._wrapExecuteArgs(l.schema,l.document,l.rootValue,l.contextValue,l.variableValues,l.operationName,l.fieldResolver,l.typeResolver,e)}let a=(0,ye.getOperation)(s.document,s.operationName),u=n._createExecuteSpan(a,s);return s.contextValue[Ua.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[Ua.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:u,fields:{}},Et.context.with(Et.trace.setSpan(Et.context.active(),u),()=>(0,Ue.safeExecuteInTheMiddle)(()=>o.apply(this,[s]),(l,p)=>{n._handleExecutionResult(u,l,p)}))}}}_handleExecutionResult(e,n,r){let o=this._getConfig();if(r===void 0||n){(0,ye.endSpan)(e,n);return}if((0,ye.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,ye.endSpan)(e);return}this._executeResponseHook(e,i)},i=>{(0,ye.endSpan)(e,i)});else{if(typeof o.responseHook!="function"){(0,ye.endSpan)(e);return}this._executeResponseHook(e,r)}}_executeResponseHook(e,n){let r=this._getConfig();(0,Ue.safeExecuteInTheMiddle)(()=>{r.responseHook(e,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,ye.endSpan)(e,void 0)},!0)}_patchParse(){let e=this;return function(r){return function(i,s){return e._parse(this,r,i,s)}}}_patchValidate(){let e=this;return function(r){return function(i,s,a,u,l){return e._validate(this,r,i,s,a,l,u)}}}_parse(e,n,r,o){let i=this._getConfig(),s=this.tracer.startSpan(Ur.SpanNames.PARSE);return Et.context.with(Et.trace.setSpan(Et.context.active(),s),()=>(0,Ue.safeExecuteInTheMiddle)(()=>n.call(e,r,o),(a,u)=>{u&&((0,ye.getOperation)(u)?u.loc&&(0,ye.addSpanSource)(s,u.loc,i.allowValues):s.updateName(Ur.SpanNames.SCHEMA_PARSE)),(0,ye.endSpan)(s,a)}))}_validate(e,n,r,o,i,s,a){let u=this.tracer.startSpan(Ur.SpanNames.VALIDATE,{});return Et.context.with(Et.trace.setSpan(Et.context.active(),u),()=>(0,Ue.safeExecuteInTheMiddle)(()=>n.call(e,r,o,i,a,s),(l,p)=>{o.loc||u.updateName(Ur.SpanNames.SCHEMA_VALIDATE),p&&p.length&&u.recordException({name:li.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(p)}),(0,ye.endSpan)(u,l)}))}_createExecuteSpan(e,n){var r;let o=this._getConfig(),i=this.tracer.startSpan(Ur.SpanNames.EXECUTE,{});if(e){let{operation:s,name:a}=e;i.setAttribute(li.AttributeNames.OPERATION_TYPE,s);let u=a?.value;u?(i.setAttribute(li.AttributeNames.OPERATION_NAME,u),i.updateName(`${s} ${u}`)):i.updateName(s)}else{let s=" ";n.operationName&&(s=` "${n.operationName}" `),s=qv.OPERATION_NOT_SUPPORTED.replace("$operationName$",s),i.setAttribute(li.AttributeNames.OPERATION_NAME,s)}return!((r=n.document)===null||r===void 0)&&r.loc&&(0,ye.addSpanSource)(i,n.document.loc,o.allowValues),n.variableValues&&o.allowValues&&(0,ye.addInputVariableAttributes)(i,n.variableValues),i}_wrapExecuteArgs(e,n,r,o,i,s,a,u,l){if(o||(o={}),o[Ua.OTEL_GRAPHQL_DATA_SYMBOL]||this._getConfig().ignoreResolveSpans)return{schema:e,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:a,typeResolver:u};let p=a==null,d=a??l;return a=(0,ye.wrapFieldResolver)(this.tracer,this._getConfig.bind(this),d,p),e&&((0,ye.wrapFields)(e.getQueryType(),this.tracer,this._getConfig.bind(this)),(0,ye.wrapFields)(e.getMutationType(),this.tracer,this._getConfig.bind(this))),{schema:e,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:a,typeResolver:u}}};di.GraphQLInstrumentation=Ha});var em=g(Qf=>{"use strict";c();Object.defineProperty(Qf,"__esModule",{value:!0})});var nm=g(Ht=>{"use strict";c();var Bv=Ht&&Ht.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),tm=Ht&&Ht.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Bv(e,t,n)};Object.defineProperty(Ht,"__esModule",{value:!0});tm(Jf(),Ht);tm(em(),Ht)});var am=g(Hr=>{"use strict";c();Object.defineProperty(Hr,"__esModule",{value:!0});Hr.MongodbCommandType=void 0;var Vv;(function(t){t.CREATE_INDEXES="createIndexes",t.FIND_AND_MODIFY="findAndModify",t.IS_MASTER="isMaster",t.COUNT="count",t.AGGREGATE="aggregate",t.UNKNOWN="unknown"})(Vv=Hr.MongodbCommandType||(Hr.MongodbCommandType={}))});var cm=g(Fn=>{"use strict";c();Object.defineProperty(Fn,"__esModule",{value:!0});Fn.PACKAGE_NAME=Fn.PACKAGE_VERSION=void 0;Fn.PACKAGE_VERSION="0.46.0";Fn.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var lm=g(fi=>{"use strict";c();Object.defineProperty(fi,"__esModule",{value:!0});fi.MongoDBInstrumentation=void 0;var J=(F(),y(z)),X=(ce(),y(pe)),Tt=(ne(),y(le)),jt=am(),um=cm(),ja=class t extends X.InstrumentationBase{constructor(e={}){super(um.PACKAGE_NAME,um.PACKAGE_VERSION,e)}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter("db.client.connections.usage",{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}init(){let{v3PatchConnection:e,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:s,v4UnpatchConnection:a}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:u,v4UnpatchConnectionPool:l}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:p,v4UnpatchSessions:d}=this._getV4SessionsPatches();return[new X.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new X.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],e,n)]),new X.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <7"],void 0,void 0,[new X.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,a),new X.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <7"],s,a),new X.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],u,l),new X.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <7"],r,o),new X.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <7"],p,d)])]}_getV3ConnectionPatches(){return{v3PatchConnection:e=>((0,X.isWrapped)(e.insert)&&this._unwrap(e,"insert"),this._wrap(e,"insert",this._getV3PatchOperation("insert")),(0,X.isWrapped)(e.remove)&&this._unwrap(e,"remove"),this._wrap(e,"remove",this._getV3PatchOperation("remove")),(0,X.isWrapped)(e.update)&&this._unwrap(e,"update"),this._wrap(e,"update",this._getV3PatchOperation("update")),(0,X.isWrapped)(e.command)&&this._unwrap(e,"command"),this._wrap(e,"command",this._getV3PatchCommand()),(0,X.isWrapped)(e.query)&&this._unwrap(e,"query"),this._wrap(e,"query",this._getV3PatchFind()),(0,X.isWrapped)(e.getMore)&&this._unwrap(e,"getMore"),this._wrap(e,"getMore",this._getV3PatchCursor()),e),v3UnpatchConnection:e=>{e!==void 0&&(this._unwrap(e,"insert"),this._unwrap(e,"remove"),this._unwrap(e,"update"),this._unwrap(e,"command"),this._unwrap(e,"query"),this._unwrap(e,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:e=>((0,X.isWrapped)(e.acquire)&&this._unwrap(e,"acquire"),this._wrap(e.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,X.isWrapped)(e.release)&&this._unwrap(e,"release"),this._wrap(e.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),e),v4UnpatchSessions:e=>{e!==void 0&&((0,X.isWrapped)(e.acquire)&&this._unwrap(e,"acquire"),(0,X.isWrapped)(e.release)&&this._unwrap(e,"release"))}}}_getV4AcquireCommand(){let e=this;return n=>function(){let o=this.sessions.length,i=n.call(this),s=this.sessions.length;return o===s?e._connectionsUsage.add(1,{state:"used","pool.name":e._poolName}):o-1===s&&(e._connectionsUsage.add(-1,{state:"idle","pool.name":e._poolName}),e._connectionsUsage.add(1,{state:"used","pool.name":e._poolName})),i}}_getV4ReleaseCommand(){let e=this;return n=>function(o){let i=n.call(this,o);return e._connectionsUsage.add(-1,{state:"used","pool.name":e._poolName}),e._connectionsUsage.add(1,{state:"idle","pool.name":e._poolName}),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:e=>{let n=e.ConnectionPool.prototype;return(0,X.isWrapped)(n.checkOut)&&this._unwrap(n,"checkOut"),this._wrap(n,"checkOut",this._getV4ConnectionPoolCheckOut()),e},v4UnpatchConnectionPool:e=>{e!==void 0&&this._unwrap(e.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:e=>((0,X.isWrapped)(e.connect)&&this._unwrap(e,"connect"),this._wrap(e,"connect",this._getV4ConnectCommand()),e),v4UnpatchConnect:e=>{e!==void 0&&this._unwrap(e,"connect")}}}_getV4ConnectionPoolCheckOut(){return e=>function(r){let o=J.context.bind(J.context.active(),r);return e.call(this,o)}}_getV4ConnectCommand(){let e=this;return n=>function(o,i){if(n.length===1){let a=n.call(this,o);return a&&typeof a.then=="function"&&a.then(()=>e.setPoolName(o),()=>{}),a}let s=function(a,u){if(a||!u){i(a,u);return}e.setPoolName(o),i(a,u)};return n.call(this,o,s)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:e=>((0,X.isWrapped)(e.Connection.prototype.command)&&this._unwrap(e.Connection.prototype,"command"),this._wrap(e.Connection.prototype,"command",this._getV4PatchCommandCallback()),e),v4PatchConnectionPromise:e=>((0,X.isWrapped)(e.Connection.prototype.command)&&this._unwrap(e.Connection.prototype,"command"),this._wrap(e.Connection.prototype,"command",this._getV4PatchCommandPromise()),e),v4UnpatchConnection:e=>{e!==void 0&&this._unwrap(e.Connection.prototype,"command")}}}_getV3PatchOperation(e){let n=this;return r=>function(i,s,a,u,l){let p=J.trace.getSpan(J.context.active()),d=typeof u=="function"?u:l;if(!p||typeof d!="function"||typeof a!="object")return typeof u=="function"?r.call(this,i,s,a,u):r.call(this,i,s,a,u,l);let m=n.tracer.startSpan(`mongodb.${e}`,{kind:J.SpanKind.CLIENT});n._populateV3Attributes(m,s,i,a[0],e);let h=n._patchEnd(m,d);return typeof u=="function"?r.call(this,i,s,a,h):r.call(this,i,s,a,u,h)}}_getV3PatchCommand(){let e=this;return n=>function(o,i,s,a,u){let l=J.trace.getSpan(J.context.active()),p=typeof a=="function"?a:u;if(!l||typeof p!="function"||typeof s!="object")return typeof a=="function"?n.call(this,o,i,s,a):n.call(this,o,i,s,a,u);let d=t._getCommandType(s),m=d===jt.MongodbCommandType.UNKNOWN?"command":d,h=e.tracer.startSpan(`mongodb.${m}`,{kind:J.SpanKind.CLIENT}),_=d===jt.MongodbCommandType.UNKNOWN?void 0:d;e._populateV3Attributes(h,i,o,s,_);let T=e._patchEnd(h,p);return typeof a=="function"?n.call(this,o,i,s,T):n.call(this,o,i,s,a,T)}}_getV4PatchCommandCallback(){let e=this;return n=>function(o,i,s,a){let u=J.trace.getSpan(J.context.active()),l=a,p=Object.keys(i)[0];if(typeof l!="function"||typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,s,a);let d;u&&(d=e.tracer.startSpan(`mongodb.${p}`,{kind:J.SpanKind.CLIENT}),e._populateV4Attributes(d,this,o,i,p));let m=e._patchEnd(d,l,this.id,p);return n.call(this,o,i,s,m)}}_getV4PatchCommandPromise(){let e=this;return n=>function(...o){let[i,s]=o,a=J.trace.getSpan(J.context.active()),u=Object.keys(s)[0],l=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,o);let p;a&&(p=e.tracer.startSpan(`mongodb.${u}`,{kind:J.SpanKind.CLIENT}),e._populateV4Attributes(p,this,i,s,u));let d=e._patchEnd(p,l,this.id,u),m=n.apply(this,o);return m.then(h=>d(null,h),h=>d(h)),m}}_getV3PatchFind(){let e=this;return n=>function(o,i,s,a,u,l){let p=J.trace.getSpan(J.context.active()),d=typeof u=="function"?u:l;if(!p||typeof d!="function"||typeof s!="object")return typeof u=="function"?n.call(this,o,i,s,a,u):n.call(this,o,i,s,a,u,l);let m=e.tracer.startSpan("mongodb.find",{kind:J.SpanKind.CLIENT});e._populateV3Attributes(m,i,o,s,"find");let h=e._patchEnd(m,d);return typeof u=="function"?n.call(this,o,i,s,a,h):n.call(this,o,i,s,a,u,h)}}_getV3PatchCursor(){let e=this;return n=>function(o,i,s,a,u,l){let p=J.trace.getSpan(J.context.active()),d=typeof u=="function"?u:l;if(!p||typeof d!="function")return typeof u=="function"?n.call(this,o,i,s,a,u):n.call(this,o,i,s,a,u,l);let m=e.tracer.startSpan("mongodb.getMore",{kind:J.SpanKind.CLIENT});e._populateV3Attributes(m,i,o,s.cmd,"getMore");let h=e._patchEnd(m,d);return typeof u=="function"?n.call(this,o,i,s,a,h):n.call(this,o,i,s,a,u,h)}}static _getCommandType(e){return e.createIndexes!==void 0?jt.MongodbCommandType.CREATE_INDEXES:e.findandmodify!==void 0?jt.MongodbCommandType.FIND_AND_MODIFY:e.ismaster!==void 0?jt.MongodbCommandType.IS_MASTER:e.count!==void 0?jt.MongodbCommandType.COUNT:e.aggregate!==void 0?jt.MongodbCommandType.AGGREGATE:jt.MongodbCommandType.UNKNOWN}_populateV4Attributes(e,n,r,o,i){let s,a;if(n){let l=typeof n.address=="string"?n.address.split(":"):"";l.length===2&&(s=l[0],a=l[1])}let u;o?.documents&&o.documents[0]?u=o.documents[0]:o?.cursors?u=o.cursors:u=o,this._addAllSpanAttributes(e,r.db,r.collection,s,a,u,i)}_populateV3Attributes(e,n,r,o,i){var s,a,u,l,p,d,m,h;let _,T;if(r&&r.s&&(_=(a=(s=r.s.options)===null||s===void 0?void 0:s.host)!==null&&a!==void 0?a:r.s.host,T=(p=(l=(u=r.s.options)===null||u===void 0?void 0:u.port)!==null&&l!==void 0?l:r.s.port)===null||p===void 0?void 0:p.toString(),_==null||T==null)){let A=(d=r.description)===null||d===void 0?void 0:d.address;if(A){let N=A.split(":");_=N[0],T=N[1]}}let[R,M]=n.toString().split("."),b=(h=(m=o?.query)!==null&&m!==void 0?m:o?.q)!==null&&h!==void 0?h:o;this._addAllSpanAttributes(e,R,M,_,T,b,i)}_addAllSpanAttributes(e,n,r,o,i,s,a){if(e.setAttributes({[Tt.SEMATTRS_DB_SYSTEM]:Tt.DBSYSTEMVALUES_MONGODB,[Tt.SEMATTRS_DB_NAME]:n,[Tt.SEMATTRS_DB_MONGODB_COLLECTION]:r,[Tt.SEMATTRS_DB_OPERATION]:a,[Tt.SEMATTRS_DB_CONNECTION_STRING]:`mongodb://${o}:${i}/${n}`}),o&&i){e.setAttribute(Tt.SEMATTRS_NET_PEER_NAME,o);let l=parseInt(i,10);isNaN(l)||e.setAttribute(Tt.SEMATTRS_NET_PEER_PORT,l)}if(!s)return;let u=typeof this._config.dbStatementSerializer=="function"?this._config.dbStatementSerializer:this._defaultDbStatementSerializer.bind(this);(0,X.safeExecuteInTheMiddle)(()=>{let l=u(s);e.setAttribute(Tt.SEMATTRS_DB_STATEMENT,l)},l=>{l&&this._diag.error("Error running dbStatementSerializer hook",l)},!0)}_defaultDbStatementSerializer(e){var n;let o=!!(!((n=this._config)===null||n===void 0)&&n.enhancedDatabaseReporting)?e:this._scrubStatement(e);return JSON.stringify(o)}_scrubStatement(e){return Array.isArray(e)?e.map(n=>this._scrubStatement(n)):typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).map(([n,r])=>[n,this._scrubStatement(r)])):"?"}_handleExecutionResult(e,n){let r=this.getConfig();typeof r.responseHook=="function"&&(0,X.safeExecuteInTheMiddle)(()=>{r.responseHook(e,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(e,n,r,o){let i=J.context.active(),s=this;return function(...u){let l=u[0];if(e){if(l instanceof Error)e?.setStatus({code:J.SpanStatusCode.ERROR,message:l.message});else{let p=u[1];s._handleExecutionResult(e,p)}e.end()}return J.context.with(i,()=>(o==="endSessions"&&s._connectionsUsage.add(-1,{state:"idle","pool.name":s._poolName}),n.apply(this,u)))}}setPoolName(e){var n,r;let o=(n=e.hostAddress)===null||n===void 0?void 0:n.host,i=(r=e.hostAddress)===null||r===void 0?void 0:r.port,s=e.dbName,a=`mongodb://${o}:${i}/${s}`;this._poolName=a}};fi.MongoDBInstrumentation=ja});var pm=g(jr=>{"use strict";c();Object.defineProperty(jr,"__esModule",{value:!0});jr.MongodbCommandType=void 0;var Kv;(function(t){t.CREATE_INDEXES="createIndexes",t.FIND_AND_MODIFY="findAndModify",t.IS_MASTER="isMaster",t.COUNT="count",t.UNKNOWN="unknown"})(Kv=jr.MongodbCommandType||(jr.MongodbCommandType={}))});var fm=g(qt=>{"use strict";c();var Yv=qt&&qt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),dm=qt&&qt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Yv(e,t,n)};Object.defineProperty(qt,"__esModule",{value:!0});dm(lm(),qt);dm(pm(),qt)});var Sm=g(Bt=>{"use strict";c();Object.defineProperty(Bt,"__esModule",{value:!0});Bt.handleCallbackResponse=Bt.handlePromiseResponse=Bt.getAttributesFromCollection=void 0;var Em=(F(),y(z)),Xv=(ce(),y(pe)),qr=(ne(),y(le));function Zv(t){return{[qr.SEMATTRS_DB_MONGODB_COLLECTION]:t.name,[qr.SEMATTRS_DB_NAME]:t.conn.name,[qr.SEMATTRS_DB_USER]:t.conn.user,[qr.SEMATTRS_NET_PEER_NAME]:t.conn.host,[qr.SEMATTRS_NET_PEER_PORT]:t.conn.port}}Bt.getAttributesFromCollection=Zv;function Tm(t,e={}){t.recordException(e),t.setStatus({code:Em.SpanStatusCode.ERROR,message:`${e.message} ${e.code?`
|
|
5
5
|
Mongoose Error Code: ${e.code}`:""}`})}function qa(t,e,n,r=void 0){n&&(0,Xv.safeExecuteInTheMiddle)(()=>n(t,{moduleVersion:r,response:e}),o=>{o&&Em.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function zv(t,e,n,r=void 0){return t instanceof Promise?t.then(o=>(qa(e,o,n,r),o)).catch(o=>{throw Tm(e,o),o}).finally(()=>e.end()):(qa(e,t,n,r),e.end(),t)}Bt.handlePromiseResponse=zv;function Jv(t,e,n,r,o,i,s=void 0){let a=0;return o.length===2&&(a=1),o[a]=(u,l)=>(u?Tm(r,u):qa(r,l,i,s),r.end(),t(u,l)),e.apply(n,o)}Bt.handleCallbackResponse=Jv});var ym=g(Dn=>{"use strict";c();Object.defineProperty(Dn,"__esModule",{value:!0});Dn.PACKAGE_NAME=Dn.PACKAGE_VERSION=void 0;Dn.PACKAGE_VERSION="0.40.0";Dn.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var Cm=g(nt=>{"use strict";c();Object.defineProperty(nt,"__esModule",{value:!0});nt.MongooseInstrumentation=nt._STORED_PARENT_SPAN=void 0;var Oe=(F(),y(z)),Qv=(De(),y(Ke)),Ba=Sm(),vm=(ce(),y(pe)),Am=ym(),Br=(ne(),y(le)),Om=["remove","deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","count","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace","findOneAndRemove"];nt._STORED_PARENT_SPAN=Symbol("stored-parent-span");var Wa=class extends vm.InstrumentationBase{constructor(e={}){super(Am.PACKAGE_NAME,Am.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}init(){return new vm.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <7"],this.patch.bind(this),this.unpatch.bind(this))}patch(e,n){return this._wrap(e.Model.prototype,"save",this.patchOnModelMethods("save",n)),e.Model.prototype.$save=e.Model.prototype.save,this._wrap(e.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),this._wrap(e.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(e.Aggregate.prototype,"exec",this.patchAggregateExec(n)),Om.forEach(r=>{this._wrap(e.Query.prototype,r,this.patchAndCaptureSpanContext(r))}),this._wrap(e.Model,"aggregate",this.patchModelAggregate()),e}unpatch(e){this._unwrap(e.Model.prototype,"save"),e.Model.prototype.$save=e.Model.prototype.save,this._unwrap(e.Model.prototype,"remove"),this._unwrap(e.Query.prototype,"exec"),this._unwrap(e.Aggregate.prototype,"exec"),Om.forEach(n=>{this._unwrap(e.Query.prototype,n)}),this._unwrap(e.Model,"aggregate")}patchAggregateExec(e){let n=this;return r=>function(i){var s;if(n._config.requireParentSpan&&Oe.trace.getSpan(Oe.context.active())===void 0)return r.apply(this,arguments);let a=this[nt._STORED_PARENT_SPAN],u={};n._config.dbStatementSerializer&&(u[Br.SEMATTRS_DB_STATEMENT]=n._config.dbStatementSerializer("aggregate",{options:this.options,aggregatePipeline:this._pipeline}));let l=n._startSpan(this._model.collection,(s=this._model)===null||s===void 0?void 0:s.modelName,"aggregate",u,a);return n._handleResponse(l,r,this,arguments,i,e)}}patchQueryExec(e){let n=this;return r=>function(i){if(n._config.requireParentSpan&&Oe.trace.getSpan(Oe.context.active())===void 0)return r.apply(this,arguments);let s=this[nt._STORED_PARENT_SPAN],a={};n._config.dbStatementSerializer&&(a[Br.SEMATTRS_DB_STATEMENT]=n._config.dbStatementSerializer(this.op,{condition:this._conditions,updates:this._update,options:this.options,fields:this._fields}));let u=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,a,s);return n._handleResponse(u,r,this,arguments,i,e)}}patchOnModelMethods(e,n){let r=this;return o=>function(s,a){if(r._config.requireParentSpan&&Oe.trace.getSpan(Oe.context.active())===void 0)return o.apply(this,arguments);let u={document:this};s&&!(s instanceof Function)&&(u.options=s);let l={};r._config.dbStatementSerializer&&(l[Br.SEMATTRS_DB_STATEMENT]=r._config.dbStatementSerializer(e,u));let p=r._startSpan(this.constructor.collection,this.constructor.modelName,e,l);return s instanceof Function&&(a=s,s=void 0),r._handleResponse(p,o,this,arguments,a,n)}}patchModelAggregate(){let e=this;return n=>function(){let o=Oe.trace.getSpan(Oe.context.active()),i=e._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[nt._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(e){let n=this;return r=>function(){return this[nt._STORED_PARENT_SPAN]=Oe.trace.getSpan(Oe.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(e,n,r,o,i){return this.tracer.startSpan(`mongoose.${n}.${r}`,{kind:Oe.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},o),(0,Ba.getAttributesFromCollection)(e)),{[Br.SEMATTRS_DB_OPERATION]:r,[Br.SEMATTRS_DB_SYSTEM]:"mongoose"})},i?Oe.trace.setSpan(Oe.context.active(),i):void 0)}_handleResponse(e,n,r,o,i,s=void 0){let a=this;if(i instanceof Function)return a._callOriginalFunction(()=>(0,Ba.handleCallbackResponse)(i,n,r,e,o,a._config.responseHook,s));{let u=a._callOriginalFunction(()=>n.apply(r,o));return(0,Ba.handlePromiseResponse)(u,e,a._config.responseHook,s)}}_callOriginalFunction(e){var n;return!((n=this._config)===null||n===void 0)&&n.suppressInternalInstrumentation?Oe.context.with((0,Qv.suppressTracing)(Oe.context.active()),e):e()}};nt.MongooseInstrumentation=Wa});var Rm=g(bm=>{"use strict";c();Object.defineProperty(bm,"__esModule",{value:!0})});var Pm=g(Wt=>{"use strict";c();var eA=Wt&&Wt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),Im=Wt&&Wt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&eA(e,t,n)};Object.defineProperty(Wt,"__esModule",{value:!0});Im(Cm(),Wt);Im(Rm(),Wt)});var wm=g(Wr=>{"use strict";c();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.AttributeNames=void 0;var nA;(function(t){t.MYSQL_VALUES="db.mysql.values"})(nA=Wr.AttributeNames||(Wr.AttributeNames={}))});var Dm=g(Ie=>{"use strict";c();Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getPoolName=Ie.arrayStringifyHelper=Ie.getSpanName=Ie.getDbValues=Ie.getDbStatement=Ie.getConnectionAttributes=void 0;var St=(ne(),y(le));function rA(t){let{host:e,port:n,database:r,user:o}=oA(t),i=parseInt(n,10);return isNaN(i)?{[St.SEMATTRS_NET_PEER_NAME]:e,[St.SEMATTRS_DB_CONNECTION_STRING]:Fm(e,n,r),[St.SEMATTRS_DB_NAME]:r,[St.SEMATTRS_DB_USER]:o}:{[St.SEMATTRS_NET_PEER_NAME]:e,[St.SEMATTRS_NET_PEER_PORT]:i,[St.SEMATTRS_DB_CONNECTION_STRING]:Fm(e,n,r),[St.SEMATTRS_DB_NAME]:r,[St.SEMATTRS_DB_USER]:o}}Ie.getConnectionAttributes=rA;function oA(t){let{host:e,port:n,database:r,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:n,database:r,user:o}}function Fm(t,e,n){let r=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(r+=`:${e}`),typeof n=="string"&&(r+=`/${n}`),r}function iA(t){return typeof t=="string"?t:t.sql}Ie.getDbStatement=iA;function sA(t,e){return Va(typeof t=="string"?e:e||t.values)}Ie.getDbValues=sA;function aA(t){return typeof t=="object"?t.sql:t.split(" ")[0]}Ie.getSpanName=aA;function Va(t){return t?`[${t.toString()}]`:""}Ie.arrayStringifyHelper=Va;function cA(t){let e=t.config.connectionConfig,n="";return n+=e.host?`host: '${e.host}', `:"",n+=e.port?`port: ${e.port}, `:"",n+=e.database?`database: '${e.database}', `:"",n+=e.user?`user: '${e.user}'`:"",e.user||(n=n.substring(0,n.length-2)),n.trim()}Ie.getPoolName=cA});var km=g(kn=>{"use strict";c();Object.defineProperty(kn,"__esModule",{value:!0});kn.PACKAGE_NAME=kn.PACKAGE_VERSION=void 0;kn.PACKAGE_VERSION="0.40.0";kn.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var Um=g(hi=>{"use strict";c();Object.defineProperty(hi,"__esModule",{value:!0});hi.MySQLInstrumentation=void 0;var Pe=(F(),y(z)),Gn=(ce(),y(pe)),Ka=(ne(),y(le)),uA=wm(),Un=Dm(),Gm=km(),mi=class t extends Gn.InstrumentationBase{constructor(e={}){super(Gm.PACKAGE_NAME,Gm.PACKAGE_VERSION,e),this._setMetricInstruments()}setMeterProvider(e){super.setMeterProvider(e),this._setMetricInstruments()}_setMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter("db.client.connections.usage",{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}init(){return[new Gn.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],e=>((0,Gn.isWrapped)(e.createConnection)&&this._unwrap(e,"createConnection"),this._wrap(e,"createConnection",this._patchCreateConnection()),(0,Gn.isWrapped)(e.createPool)&&this._unwrap(e,"createPool"),this._wrap(e,"createPool",this._patchCreatePool()),(0,Gn.isWrapped)(e.createPoolCluster)&&this._unwrap(e,"createPoolCluster"),this._wrap(e,"createPoolCluster",this._patchCreatePoolCluster()),e),e=>{e!==void 0&&(this._unwrap(e,"createConnection"),this._unwrap(e,"createPool"),this._unwrap(e,"createPoolCluster"))})]}_patchCreateConnection(){return e=>{let n=this;return function(o){let i=e(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return e=>{let n=this;return function(o){let i=e(...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,n,""),i}}}_patchPoolEnd(e){return n=>{let r=this;return function(i){let s=e._allConnections.length,a=e._freeConnections.length,u=s-a,l=(0,Un.getPoolName)(e);r._connectionsUsage.add(-u,{state:"used",name:l}),r._connectionsUsage.add(-a,{state:"idle",name:l}),n.apply(e,arguments)}}}_patchCreatePoolCluster(){return e=>{let n=this;return function(o){let i=e(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(e){return n=>{let r=this;return function(i,s){if(!r._enabled)return r._unwrap(e,"add"),n.apply(e,arguments);n.apply(e,arguments);let a=e._nodes;if(a){let u=typeof i=="object"?"CLUSTER::"+e._lastId:String(i),l=a[u].pool;r._setPoolcallbacks(l,r,i)}}}}_patchGetConnection(e){return n=>{let r=this;return function(i,s,a){if(!r._enabled)return r._unwrap(e,"getConnection"),n.apply(e,arguments);if(arguments.length===1&&typeof i=="function"){let u=r._getConnectionCallbackPatchFn(i);return n.call(e,u)}if(arguments.length===2&&typeof s=="function"){let u=r._getConnectionCallbackPatchFn(s);return n.call(e,i,u)}if(arguments.length===3&&typeof a=="function"){let u=r._getConnectionCallbackPatchFn(a);return n.call(e,i,s,u)}return n.apply(e,arguments)}}}_getConnectionCallbackPatchFn(e){let n=this,r=Pe.context.active();return function(o,i){i&&((0,Gn.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof e=="function"&&Pe.context.with(r,e,this,o,i)}}_patchQuery(e){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(e,"query"),n.apply(e,arguments);let a=r.tracer.startSpan((0,Un.getSpanName)(o),{kind:Pe.SpanKind.CLIENT,attributes:Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,Un.getConnectionAttributes)(e.config))});if(a.setAttribute(Ka.SEMATTRS_DB_STATEMENT,(0,Un.getDbStatement)(o)),r.getConfig().enhancedDatabaseReporting){let d;Array.isArray(i)?d=i:arguments[2]&&(d=[i]),a.setAttribute(uA.AttributeNames.MYSQL_VALUES,(0,Un.getDbValues)(o,d))}let l=Array.from(arguments).findIndex(d=>typeof d=="function"),p=Pe.context.active();if(l===-1){let d=Pe.context.with(Pe.trace.setSpan(Pe.context.active(),a),()=>n.apply(e,arguments));return Pe.context.bind(p,d),d.on("error",m=>a.setStatus({code:Pe.SpanStatusCode.ERROR,message:m.message})).on("end",()=>{a.end()})}else return r._wrap(arguments,l,r._patchCallbackQuery(a,p)),Pe.context.with(Pe.trace.setSpan(Pe.context.active(),a),()=>n.apply(e,arguments))}}}_patchCallbackQuery(e,n){return r=>function(o,i,s){return o&&e.setStatus({code:Pe.SpanStatusCode.ERROR,message:o.message}),e.end(),Pe.context.with(n,()=>r(...arguments))}}_setPoolcallbacks(e,n,r){let o=r||(0,Un.getPoolName)(e);e.on("connection",i=>{n._connectionsUsage.add(1,{state:"idle",name:o})}),e.on("acquire",i=>{n._connectionsUsage.add(-1,{state:"idle",name:o}),n._connectionsUsage.add(1,{state:"used",name:o})}),e.on("release",i=>{n._connectionsUsage.add(-1,{state:"used",name:o}),n._connectionsUsage.add(1,{state:"idle",name:o})})}};hi.MySQLInstrumentation=mi;mi.COMMON_ATTRIBUTES={[Ka.SEMATTRS_DB_SYSTEM]:Ka.DBSYSTEMVALUES_MYSQL}});var jm=g(Hm=>{"use strict";c();Object.defineProperty(Hm,"__esModule",{value:!0})});var Bm=g(Vt=>{"use strict";c();var lA=Vt&&Vt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),qm=Vt&&Vt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&lA(e,t,n)};Object.defineProperty(Vt,"__esModule",{value:!0});qm(Um(),Vt);qm(jm(),Vt)});var $a=g(_i=>{"use strict";c();Object.defineProperty(_i,"__esModule",{value:!0});_i.addSqlCommenterComment=void 0;var Ya=(F(),y(z)),dA=(De(),y(Ke));function fA(t){let e=t.indexOf("--");if(e>=0)return!0;if(t.indexOf("/*")<0)return!1;let r=t.indexOf("*/");return e<r}function mA(t){return encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}function hA(t,e){if(typeof e!="string"||e.length===0||fA(e))return e;let n=new dA.W3CTraceContextPropagator,r={};n.inject(Ya.trace.setSpan(Ya.ROOT_CONTEXT,t),r,Ya.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return e;let i=o.map(s=>{let a=mA(r[s]);return`${s}='${a}'`}).join(",");return`${e} /*${i}*/`}_i.addSqlCommenterComment=hA});var Xm=g(rt=>{"use strict";c();Object.defineProperty(rt,"__esModule",{value:!0});rt.once=rt.getSpanName=rt.getDbStatement=rt.getConnectionAttributes=void 0;var yt=(ne(),y(le));function _A(t){let{host:e,port:n,database:r,user:o}=gA(t),i=parseInt(n,10);return isNaN(i)?{[yt.SEMATTRS_NET_PEER_NAME]:e,[yt.SEMATTRS_DB_CONNECTION_STRING]:$m(e,n,r),[yt.SEMATTRS_DB_NAME]:r,[yt.SEMATTRS_DB_USER]:o}:{[yt.SEMATTRS_NET_PEER_NAME]:e,[yt.SEMATTRS_NET_PEER_PORT]:i,[yt.SEMATTRS_DB_CONNECTION_STRING]:$m(e,n,r),[yt.SEMATTRS_DB_NAME]:r,[yt.SEMATTRS_DB_USER]:o}}rt.getConnectionAttributes=_A;function gA(t){let{host:e,port:n,database:r,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:n,database:r,user:o}}function $m(t,e,n){let r=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(r+=`:${e}`),typeof n=="string"&&(r+=`/${n}`),r}function EA(t,e,n){return typeof t=="string"?n?e(t,n):t:n||t.values?e(t.sql,n||t.values):t.sql}rt.getDbStatement=EA;function TA(t){var e;let n=typeof t=="object"?t.sql:t;return(e=n?.split(" "))===null||e===void 0?void 0:e[0]}rt.getSpanName=TA;var SA=t=>{let e=!1;return(...n)=>{if(!e)return e=!0,t(...n)}};rt.once=SA});var Zm=g(Hn=>{"use strict";c();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.PACKAGE_NAME=Hn.PACKAGE_VERSION=void 0;Hn.PACKAGE_VERSION="0.40.0";Hn.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var eh=g(Ti=>{"use strict";c();Object.defineProperty(Ti,"__esModule",{value:!0});Ti.MySQL2Instrumentation=void 0;var zm=(F(),y(z)),Vr=(ce(),y(pe)),Xa=(ne(),y(le)),Jm=$a(),gi=Xm(),Qm=Zm(),Ei=class t extends Vr.InstrumentationBase{constructor(e={}){super(Qm.PACKAGE_NAME,Qm.PACKAGE_VERSION,e)}init(){return[new Vr.InstrumentationNodeModuleDefinition("mysql2",[">=1.4.2 <4"],e=>{let n=e.Connection.prototype;return(0,Vr.isWrapped)(n.query)&&this._unwrap(n,"query"),this._wrap(n,"query",this._patchQuery(e.format,!1)),(0,Vr.isWrapped)(n.execute)&&this._unwrap(n,"execute"),this._wrap(n,"execute",this._patchQuery(e.format,!0)),e},e=>{if(e===void 0)return;let n=e.Connection.prototype;this._unwrap(n,"query"),this._unwrap(n,"execute")})]}_patchQuery(e,n){return r=>{let o=this;return function(i,s,a){let u=o._config,l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let p=o.tracer.startSpan((0,gi.getSpanName)(i),{kind:zm.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,gi.getConnectionAttributes)(this.config)),{[Xa.SEMATTRS_DB_STATEMENT]:(0,gi.getDbStatement)(i,e,l)})});!n&&u.addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,Jm.addSqlCommenterComment)(p,i):Object.assign(i,{sql:(0,Jm.addSqlCommenterComment)(p,i.sql)}));let d=(0,gi.once)((m,h)=>{m?p.setStatus({code:zm.SpanStatusCode.ERROR,message:m.message}):typeof u.responseHook=="function"&&(0,Vr.safeExecuteInTheMiddle)(()=>{u.responseHook(p,{queryResults:h})},_=>{_&&o._diag.warn("Failed executing responseHook",_)},!0),p.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(d));let m=r.apply(this,arguments);return m.once("error",h=>{d(h)}).once("result",h=>{d(void 0,h)}),m}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(d)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(d)),r.apply(this,arguments)}}}_patchCallbackQuery(e){return n=>function(r,o,i){return e(r,o),n(...arguments)}}};Ti.MySQL2Instrumentation=Ei;Ei.COMMON_ATTRIBUTES={[Xa.SEMATTRS_DB_SYSTEM]:Xa.DBSYSTEMVALUES_MYSQL}});var nh=g(th=>{"use strict";c();Object.defineProperty(th,"__esModule",{value:!0})});var oh=g(Kt=>{"use strict";c();var yA=Kt&&Kt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),rh=Kt&&Kt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&yA(e,t,n)};Object.defineProperty(Kt,"__esModule",{value:!0});rh(eh(),Kt);rh(nh(),Kt)});var uh=g(Si=>{"use strict";c();Object.defineProperty(Si,"__esModule",{value:!0});Si.endSpan=void 0;var AA=(F(),y(z)),OA=(t,e)=>{e&&(t.recordException(e),t.setStatus({code:AA.SpanStatusCode.ERROR,message:e.message})),t.end()};Si.endSpan=OA});var Za=g(yi=>{"use strict";c();Object.defineProperty(yi,"__esModule",{value:!0});yi.defaultDbStatementSerializer=void 0;var CA=[{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}],bA=(t,e)=>{var n,r;if(Array.isArray(e)&&e.length){let o=(r=(n=CA.find(({regex:s})=>s.test(t)))===null||n===void 0?void 0:n.args)!==null&&r!==void 0?r:0,i=o>=0?e.slice(0,o):e;return e.length>i.length&&i.push(`[${e.length-o} other arguments]`),`${t} ${i.join(" ")}`}return t};yi.defaultDbStatementSerializer=bA});var lh=g(jn=>{"use strict";c();Object.defineProperty(jn,"__esModule",{value:!0});jn.PACKAGE_NAME=jn.PACKAGE_VERSION=void 0;jn.PACKAGE_VERSION="0.42.0";jn.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var fh=g(Ai=>{"use strict";c();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.IORedisInstrumentation=void 0;var Yt=(F(),y(z)),vi=(ce(),y(pe)),He=(ne(),y(le)),ph=(ce(),y(pe)),Kr=uh(),RA=Za(),dh=lh(),IA={requireParentSpan:!0},za=class extends vi.InstrumentationBase{constructor(e={}){super(dh.PACKAGE_NAME,dh.PACKAGE_VERSION,Object.assign({},IA,e))}init(){return[new vi.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(e,n)=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,vi.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,vi.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),e},e=>{if(e===void 0)return;let n=e[Symbol.toStringTag]==="Module"?e.default:e;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(e){return n=>this._traceSendCommand(n,e)}_patchConnection(){return e=>this._traceConnection(e)}_traceSendCommand(e,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return e.apply(this,arguments);let i=r.getConfig(),s=i?.dbStatementSerializer||RA.defaultDbStatementSerializer,a=Yt.trace.getSpan(Yt.context.active())===void 0;if(i?.requireParentSpan===!0&&a)return e.apply(this,arguments);let u=r.tracer.startSpan(o.name,{kind:Yt.SpanKind.CLIENT,attributes:{[He.SEMATTRS_DB_SYSTEM]:He.DBSYSTEMVALUES_REDIS,[He.SEMATTRS_DB_STATEMENT]:s(o.name,o.args)}});i?.requestHook&&(0,ph.safeExecuteInTheMiddle)(()=>i?.requestHook(u,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),d=>{d&&Yt.diag.error("ioredis instrumentation: request hook failed",d)},!0);let{host:l,port:p}=this.options;u.setAttributes({[He.SEMATTRS_NET_PEER_NAME]:l,[He.SEMATTRS_NET_PEER_PORT]:p,[He.SEMATTRS_DB_CONNECTION_STRING]:`redis://${l}:${p}`});try{let d=e.apply(this,arguments),m=o.resolve;o.resolve=function(_){(0,ph.safeExecuteInTheMiddle)(()=>{var T;return(T=i?.responseHook)===null||T===void 0?void 0:T.call(i,u,o.name,o.args,_)},T=>{T&&Yt.diag.error("ioredis instrumentation: response hook failed",T)},!0),(0,Kr.endSpan)(u,null),m(_)};let h=o.reject;return o.reject=function(_){(0,Kr.endSpan)(u,_),h(_)},d}catch(d){throw(0,Kr.endSpan)(u,d),d}}}_traceConnection(e){let n=this;return function(){let r=n.getConfig(),o=Yt.trace.getSpan(Yt.context.active())===void 0;if(r?.requireParentSpan===!0&&o)return e.apply(this,arguments);let i=n.tracer.startSpan("connect",{kind:Yt.SpanKind.CLIENT,attributes:{[He.SEMATTRS_DB_SYSTEM]:He.DBSYSTEMVALUES_REDIS,[He.SEMATTRS_DB_STATEMENT]:"connect"}}),{host:s,port:a}=this.options;i.setAttributes({[He.SEMATTRS_NET_PEER_NAME]:s,[He.SEMATTRS_NET_PEER_PORT]:a,[He.SEMATTRS_DB_CONNECTION_STRING]:`redis://${s}:${a}`});try{let u=e.apply(this,arguments);return(0,Kr.endSpan)(i,null),u}catch(u){throw(0,Kr.endSpan)(i,u),u}}}};Ai.IORedisInstrumentation=za});var hh=g(mh=>{"use strict";c();Object.defineProperty(mh,"__esModule",{value:!0})});var gh=g($t=>{"use strict";c();var PA=$t&&$t.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),_h=$t&&$t.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&PA(e,t,n)};Object.defineProperty($t,"__esModule",{value:!0});_h(fh(),$t);_h(hh(),$t)});var Eh=g(Oi=>{"use strict";c();Object.defineProperty(Oi,"__esModule",{value:!0});Oi.getClientAttributes=void 0;var Yr=(ne(),y(le));function NA(t,e){var n,r;return{[Yr.SEMATTRS_DB_SYSTEM]:Yr.DBSYSTEMVALUES_REDIS,[Yr.SEMATTRS_NET_PEER_NAME]:(n=e?.socket)===null||n===void 0?void 0:n.host,[Yr.SEMATTRS_NET_PEER_PORT]:(r=e?.socket)===null||r===void 0?void 0:r.port,[Yr.SEMATTRS_DB_CONNECTION_STRING]:MA(t,e?.url)}}Oi.getClientAttributes=NA;function MA(t,e){if(typeof e=="string")try{let n=new URL(e);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){t.error("failed to sanitize redis connection url",n)}}});var Th=g(qn=>{"use strict";c();Object.defineProperty(qn,"__esModule",{value:!0});qn.PACKAGE_NAME=qn.PACKAGE_VERSION=void 0;qn.PACKAGE_VERSION="0.41.0";qn.PACKAGE_NAME="@opentelemetry/instrumentation-redis-4"});var Ah=g(bi=>{"use strict";c();Object.defineProperty(bi,"__esModule",{value:!0});bi.RedisInstrumentation=void 0;var je=(F(),y(z)),me=(ce(),y(pe)),Sh=Eh(),xA=Za(),yh=Th(),LA=(ne(),y(le)),$r=Symbol("opentelemetry.instrumentation.redis.open_spans"),vh=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),wA={requireParentSpan:!1},Ci=class t extends me.InstrumentationBase{constructor(e={}){super(yh.PACKAGE_NAME,yh.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},wA,e)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(e){let n=new me.InstrumentationNodeModuleFile(`${e}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let a=i.transformCommandArguments;if(!a)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let u=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,me.isWrapped)(i?.[u])&&this._unwrap(i,u),this._wrap(i,u,this._getPatchExtendWithCommands(a)),i},i=>{(0,me.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,me.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new me.InstrumentationNodeModuleFile(`${e}/dist/lib/client/multi-command.js`,["^1.0.0"],i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;return(0,me.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec()),(0,me.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;(0,me.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,me.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new me.InstrumentationNodeModuleFile(`${e}/dist/lib/client/index.js`,["^1.0.0"],i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;return a?.multi&&((0,me.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,me.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,me.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{var s;let a=(s=i?.default)===null||s===void 0?void 0:s.prototype;(0,me.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,me.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,me.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new me.InstrumentationNodeModuleDefinition(e,["^1.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(e){let n=this;return function(o){return function(s){var a;if(((a=s?.BaseClass)===null||a===void 0?void 0:a.name)!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,p){let d=e(l,p).args;return n._traceClientCommand(u,this,arguments,d)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(){let e=this;return function(r){return function(){let i=r.apply(this,arguments);return typeof i?.then!="function"?(e._diag.error("got non promise result when patching RedisClientMultiCommand.exec"),i):i.then(s=>{let a=this[$r];return e._endSpansWithRedisReplies(a,s),s}).catch(s=>{let a=this[$r];if(!a)e._diag.error("cannot find open spans to end for redis multi command");else{let u=s.constructor.name==="MultiErrorReply"?s.replies:new Array(a.length).fill(s);e._endSpansWithRedisReplies(a,u)}return Promise.reject(s)})}}}_getPatchMultiCommandsAddCommand(){let e=this;return function(r){return function(i){return e._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[vh]=this.options,o}}}_getPatchRedisClientSendCommand(){let e=this;return function(r){return function(i){return e._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let e=this;return function(r){return function(){let i=this.options,s=(0,Sh.getClientAttributes)(this._diag,i),a=e.tracer.startSpan(`${t.COMPONENT}-connect`,{kind:je.SpanKind.CLIENT,attributes:s});return je.context.with(je.trace.setSpan(je.context.active(),a),()=>r.apply(this)).then(l=>(a.end(),l)).catch(l=>(a.recordException(l),a.setStatus({code:je.SpanStatusCode.ERROR,message:l.message}),a.end(),Promise.reject(l)))}}}_traceClientCommand(e,n,r,o){var i,s;if(je.trace.getSpan(je.context.active())===void 0&&(!((i=this._config)===null||i===void 0)&&i.requireParentSpan))return e.apply(n,r);let u=n.options||n[vh],l=o[0],p=o.slice(1),d=((s=this._config)===null||s===void 0?void 0:s.dbStatementSerializer)||xA.defaultDbStatementSerializer,m=(0,Sh.getClientAttributes)(this._diag,u);try{let T=d(l,p);T!=null&&(m[LA.SEMATTRS_DB_STATEMENT]=T)}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:l})}let h=this.tracer.startSpan(`${t.COMPONENT}-${l}`,{kind:je.SpanKind.CLIENT,attributes:m}),_=je.context.with(je.trace.setSpan(je.context.active(),h),()=>e.apply(n,r));if(typeof _?.then=="function")_.then(T=>{this._endSpanWithResponse(h,l,p,T,void 0)},T=>{this._endSpanWithResponse(h,l,p,null,T)});else{let T=_;T[$r]=T[$r]||[],T[$r].push({span:h,commandName:l,commandArgs:p})}return _}_endSpansWithRedisReplies(e,n){if(!e)return this._diag.error("cannot find open spans to end for redis multi command");if(n.length!==e.length)return this._diag.error("number of multi command spans does not match response from redis");for(let r=0;r<e.length;r++){let{span:o,commandName:i,commandArgs:s}=e[r],a=n[r],[u,l]=a instanceof Error?[null,a]:[a,void 0];this._endSpanWithResponse(o,i,s,u,l)}}_endSpanWithResponse(e,n,r,o,i){if(!i&&this._config.responseHook)try{this._config.responseHook(e,n,r,o)}catch(s){this._diag.error("responseHook throw an exception",s)}i&&(e.recordException(i),e.setStatus({code:je.SpanStatusCode.ERROR,message:i?.message})),e.end()}};bi.RedisInstrumentation=Ci;Ci.COMPONENT="redis"});var Ch=g(Oh=>{"use strict";c();Object.defineProperty(Oh,"__esModule",{value:!0})});var Rh=g(Xt=>{"use strict";c();var FA=Xt&&Xt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),bh=Xt&&Xt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&FA(e,t,n)};Object.defineProperty(Xt,"__esModule",{value:!0});bh(Ah(),Xt);bh(Ch(),Xt)});var kh=g(Bn=>{"use strict";c();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.PACKAGE_NAME=Bn.PACKAGE_VERSION=void 0;Bn.PACKAGE_VERSION="0.39.0";Bn.PACKAGE_NAME="@opentelemetry/instrumentation-nestjs-core"});var tc=g(Zr=>{"use strict";c();Object.defineProperty(Zr,"__esModule",{value:!0});Zr.AttributeNames=void 0;var qA;(function(t){t.VERSION="nestjs.version",t.TYPE="nestjs.type",t.MODULE="nestjs.module",t.CONTROLLER="nestjs.controller",t.CALLBACK="nestjs.callback",t.PIPES="nestjs.pipes",t.INTERCEPTORS="nestjs.interceptors",t.GUARDS="nestjs.guards"})(qA=Zr.AttributeNames||(Zr.AttributeNames={}))});var Gh=g(zr=>{"use strict";c();Object.defineProperty(zr,"__esModule",{value:!0});zr.NestType=void 0;var BA;(function(t){t.APP_CREATION="app_creation",t.REQUEST_CONTEXT="request_context",t.REQUEST_HANDLER="handler"})(BA=zr.NestType||(zr.NestType={}))});var Uh=g(Wn=>{"use strict";c();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.NestType=Wn.AttributeNames=void 0;var WA=tc();Object.defineProperty(Wn,"AttributeNames",{enumerable:!0,get:function(){return WA.AttributeNames}});var VA=Gh();Object.defineProperty(Wn,"NestType",{enumerable:!0,get:function(){return VA.NestType}})});var jh=g(Ri=>{"use strict";c();Object.defineProperty(Ri,"__esModule",{value:!0});Ri.NestInstrumentation=void 0;var ot=(F(),y(z)),Jr=(ce(),y(pe)),Hh=kh(),nc=(ne(),y(le)),Me=Uh(),rc=[">=4.0.0 <11"],vt=class t extends Jr.InstrumentationBase{constructor(e={}){super(Hh.PACKAGE_NAME,Hh.PACKAGE_VERSION,e)}init(){let e=new Jr.InstrumentationNodeModuleDefinition(t.COMPONENT,rc);return e.files.push(this.getNestFactoryFileInstrumentation(rc),this.getRouterExecutionContextFileInstrumentation(rc)),e}getNestFactoryFileInstrumentation(e){return new Jr.InstrumentationNodeModuleFile("@nestjs/core/nest-factory.js",e,(n,r)=>(this.ensureWrapped(n.NestFactoryStatic.prototype,"create",KA(this.tracer,r)),n),n=>{this._unwrap(n.NestFactoryStatic.prototype,"create")})}getRouterExecutionContextFileInstrumentation(e){return new Jr.InstrumentationNodeModuleFile("@nestjs/core/router/router-execution-context.js",e,(n,r)=>(this.ensureWrapped(n.RouterExecutionContext.prototype,"create",YA(this.tracer,r)),n),n=>{this._unwrap(n.RouterExecutionContext.prototype,"create")})}ensureWrapped(e,n,r){(0,Jr.isWrapped)(e[n])&&this._unwrap(e,n),this._wrap(e,n,r)}};Ri.NestInstrumentation=vt;vt.COMPONENT="@nestjs/core";vt.COMMON_ATTRIBUTES={component:vt.COMPONENT};function KA(t,e){return function(r){return function(i){let s=t.startSpan("Create Nest App",{attributes:Object.assign(Object.assign({},vt.COMMON_ATTRIBUTES),{[Me.AttributeNames.TYPE]:Me.NestType.APP_CREATION,[Me.AttributeNames.VERSION]:e,[Me.AttributeNames.MODULE]:i.name})}),a=ot.trace.setSpan(ot.context.active(),s);return ot.context.with(a,async()=>{try{return await r.apply(this,arguments)}catch(u){throw oc(s,u)}finally{s.end()}})}}}function YA(t,e){return function(r){return function(i,s){arguments[1]=$A(t,e,s);let a=r.apply(this,arguments),u=s.name,l=i.constructor&&i.constructor.name?i.constructor.name:"UnnamedInstance",p=u?`${l}.${u}`:l;return function(d,m,h){var _,T;let R=t.startSpan(p,{attributes:Object.assign(Object.assign({},vt.COMMON_ATTRIBUTES),{[Me.AttributeNames.VERSION]:e,[Me.AttributeNames.TYPE]:Me.NestType.REQUEST_CONTEXT,[nc.SEMATTRS_HTTP_METHOD]:d.method,[nc.SEMATTRS_HTTP_URL]:d.originalUrl||d.url,[nc.SEMATTRS_HTTP_ROUTE]:((_=d.route)===null||_===void 0?void 0:_.path)||((T=d.routeOptions)===null||T===void 0?void 0:T.url)||d.routerPath,[Me.AttributeNames.CONTROLLER]:l,[Me.AttributeNames.CALLBACK]:u})}),M=ot.trace.setSpan(ot.context.active(),R);return ot.context.with(M,async()=>{try{return await a.apply(this,arguments)}catch(b){throw oc(R,b)}finally{R.end()}})}}}}function $A(t,e,n){let r=n.name||"anonymous nest handler",o={attributes:Object.assign(Object.assign({},vt.COMMON_ATTRIBUTES),{[Me.AttributeNames.VERSION]:e,[Me.AttributeNames.TYPE]:Me.NestType.REQUEST_HANDLER,[Me.AttributeNames.CALLBACK]:n.name})},i=function(){let s=t.startSpan(r,o),a=ot.trace.setSpan(ot.context.active(),s);return ot.context.with(a,async()=>{try{return await n.apply(this,arguments)}catch(u){throw oc(s,u)}finally{s.end()}})};return n.name&&Object.defineProperty(i,"name",{value:n.name}),Reflect.getMetadataKeys(n).forEach(s=>{Reflect.defineMetadata(s,Reflect.getMetadata(s,n),i)}),i}var oc=(t,e)=>(t.recordException(e),t.setStatus({code:ot.SpanStatusCode.ERROR,message:e.message}),e)});var Bh=g(Zt=>{"use strict";c();var XA=Zt&&Zt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),qh=Zt&&Zt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&XA(e,t,n)};Object.defineProperty(Zt,"__esModule",{value:!0});qh(jh(),Zt);qh(tc(),Zt)});var ic=g(Qr=>{"use strict";c();Object.defineProperty(Qr,"__esModule",{value:!0});Qr.AttributeNames=void 0;var zA;(function(t){t.PG_VALUES="db.postgresql.values",t.PG_PLAN="db.postgresql.plan",t.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",t.MAX_CLIENT="db.postgresql.max.client"})(zA=Qr.AttributeNames||(Qr.AttributeNames={}))});var sc=g(eo=>{"use strict";c();Object.defineProperty(eo,"__esModule",{value:!0});eo.SpanNames=void 0;var JA;(function(t){t.QUERY_PREFIX="pg.query",t.CONNECT="pg.connect",t.POOL_CONNECT="pg-pool.connect"})(JA=eo.SpanNames||(eo.SpanNames={}))});var Qh=g(Y=>{"use strict";c();Object.defineProperty(Y,"__esModule",{value:!0});Y.isObjectWithTextString=Y.getErrorMessage=Y.patchClientConnectCallback=Y.patchCallbackPGPool=Y.patchCallback=Y.handleExecutionResult=Y.handleConfigQuery=Y.shouldSkipInstrumentation=Y.getSemanticAttributesFromPool=Y.getSemanticAttributesFromConnection=Y.getConnectionString=Y.getQuerySpanName=void 0;var zt=(F(),y(z)),Ii=ic(),Ce=(ne(),y(le)),QA=(ce(),y(pe)),$h=sc();function Xh(t,e){if(!e)return $h.SpanNames.QUERY_PREFIX;let n=typeof e.name=="string"&&e.name?e.name:eO(e.text);return`${$h.SpanNames.QUERY_PREFIX}:${n}${t?` ${t}`:""}`}Y.getQuerySpanName=Xh;function eO(t){let e=t.indexOf(" "),n=e===-1?t:t.slice(0,e);return n=n.toUpperCase(),n.endsWith(";")?n.slice(0,-1):n}function ac(t){let e=t.host||"localhost",n=t.port||5432,r=t.database||"";return`postgresql://${e}:${n}/${r}`}Y.getConnectionString=ac;function Zh(t){if(Number.isInteger(t))return t}function zh(t){return{[Ce.SEMATTRS_DB_SYSTEM]:Ce.DBSYSTEMVALUES_POSTGRESQL,[Ce.SEMATTRS_DB_NAME]:t.database,[Ce.SEMATTRS_DB_CONNECTION_STRING]:ac(t),[Ce.SEMATTRS_NET_PEER_NAME]:t.host,[Ce.SEMATTRS_NET_PEER_PORT]:Zh(t.port),[Ce.SEMATTRS_DB_USER]:t.user}}Y.getSemanticAttributesFromConnection=zh;function tO(t){return{[Ce.SEMATTRS_DB_SYSTEM]:Ce.DBSYSTEMVALUES_POSTGRESQL,[Ce.SEMATTRS_DB_NAME]:t.database,[Ce.SEMATTRS_DB_CONNECTION_STRING]:ac(t),[Ce.SEMATTRS_NET_PEER_NAME]:t.host,[Ce.SEMATTRS_NET_PEER_PORT]:Zh(t.port),[Ce.SEMATTRS_DB_USER]:t.user,[Ii.AttributeNames.IDLE_TIMEOUT_MILLIS]:t.idleTimeoutMillis,[Ii.AttributeNames.MAX_CLIENT]:t.maxClient}}Y.getSemanticAttributesFromPool=tO;function nO(t){return t.requireParentSpan===!0&&zt.trace.getSpan(zt.context.active())===void 0}Y.shouldSkipInstrumentation=nO;function rO(t,e,n){let{connectionParameters:r}=this,o=r.database,i=Xh(o,n),s=t.startSpan(i,{kind:zt.SpanKind.CLIENT,attributes:zh(r)});if(!n)return s;if(n.text&&s.setAttribute(Ce.SEMATTRS_DB_STATEMENT,n.text),e.enhancedDatabaseReporting&&Array.isArray(n.values))try{let a=n.values.map(u=>u==null?"null":u instanceof Buffer?u.toString():typeof u=="object"?typeof u.toPostgres=="function"?u.toPostgres():JSON.stringify(u):u.toString());s.setAttribute(Ii.AttributeNames.PG_VALUES,a)}catch(a){zt.diag.error("failed to stringify ",n.values,a)}return typeof n.name=="string"&&s.setAttribute(Ii.AttributeNames.PG_PLAN,n.name),s}Y.handleConfigQuery=rO;function Jh(t,e,n){typeof t.responseHook=="function"&&(0,QA.safeExecuteInTheMiddle)(()=>{t.responseHook(e,{data:n})},r=>{r&&zt.diag.error("Error running response hook",r)},!0)}Y.handleExecutionResult=Jh;function oO(t,e,n){return function(o,i){o?e.setStatus({code:zt.SpanStatusCode.ERROR,message:o.message}):Jh(t,e,i),e.end(),n.call(this,o,i)}}Y.patchCallback=oO;function iO(t,e){return function(r,o,i){r&&t.setStatus({code:zt.SpanStatusCode.ERROR,message:r.message}),t.end(),e.call(this,r,o,i)}}Y.patchCallbackPGPool=iO;function sO(t,e){return function(r){r&&t.setStatus({code:zt.SpanStatusCode.ERROR,message:r.message}),t.end(),e.apply(this,arguments)}}Y.patchClientConnectCallback=sO;function aO(t){return typeof t=="object"&&t!==null&&"message"in t?String(t.message):void 0}Y.getErrorMessage=aO;function cO(t){var e;return typeof t=="object"&&typeof((e=t)===null||e===void 0?void 0:e.text)=="string"}Y.isObjectWithTextString=cO});var e_=g(Vn=>{"use strict";c();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.PACKAGE_NAME=Vn.PACKAGE_VERSION=void 0;Vn.PACKAGE_VERSION="0.43.0";Vn.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var i_=g(Pi=>{"use strict";c();Object.defineProperty(Pi,"__esModule",{value:!0});Pi.PgInstrumentation=void 0;var At=(ce(),y(pe)),K=(F(),y(z)),Ne=Qh(),t_=$a(),n_=e_(),r_=sc(),cc=class extends At.InstrumentationBase{constructor(e={}){super(n_.PACKAGE_NAME,n_.PACKAGE_VERSION,e)}init(){let e=new At.InstrumentationNodeModuleDefinition("pg",[">=8.0.0 <9"],r=>{let o=r[Symbol.toStringTag]==="Module"?r.default:r;return(0,At.isWrapped)(o.Client.prototype.query)&&this._unwrap(o.Client.prototype,"query"),(0,At.isWrapped)(o.Client.prototype.connect)&&this._unwrap(o.Client.prototype,"connect"),this._wrap(o.Client.prototype,"query",this._getClientQueryPatch()),this._wrap(o.Client.prototype,"connect",this._getClientConnectPatch()),r},r=>{let o=r[Symbol.toStringTag]==="Module"?r.default:r;(0,At.isWrapped)(o.Client.prototype.query)&&this._unwrap(o.Client.prototype,"query")}),n=new At.InstrumentationNodeModuleDefinition("pg-pool",[">=2.0.0 <4"],r=>((0,At.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._getPoolConnectPatch()),r),r=>{(0,At.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect")});return[e,n]}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}_getClientConnectPatch(){let e=this;return n=>function(o){if(Ne.shouldSkipInstrumentation(e.getConfig()))return n.call(this,o);let i=e.tracer.startSpan(r_.SpanNames.CONNECT,{kind:K.SpanKind.CLIENT,attributes:Ne.getSemanticAttributesFromConnection(this)});if(o){let a=K.trace.getSpan(K.context.active());o=Ne.patchClientConnectCallback(i,o),a&&(o=K.context.bind(K.context.active(),o))}let s=K.context.with(K.trace.setSpan(K.context.active(),i),()=>n.call(this,o));return o_(i,s)}}_getClientQueryPatch(){let e=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Ne.shouldSkipInstrumentation(e.getConfig()))return n.apply(this,o);let i=o[0],s=typeof i=="string",a=Ne.isObjectWithTextString(i),u=s?{text:i,values:Array.isArray(o[1])?o[1]:void 0}:a?i:void 0,l=e.getConfig(),p=Ne.handleConfigQuery.call(this,e.tracer,l,u);if(l.addSqlCommenterCommentToQueries&&(o[0]=s?(0,t_.addSqlCommenterComment)(p,i):a?Object.assign(Object.assign({},i),{text:(0,t_.addSqlCommenterComment)(p,i.text)}):o[0]),o.length>0){let m=K.trace.getSpan(K.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Ne.patchCallback(l,p,o[o.length-1]),m&&(o[o.length-1]=K.context.bind(K.context.active(),o[o.length-1]));else if(typeof u?.callback=="function"){let h=Ne.patchCallback(e.getConfig(),p,u.callback);m&&(h=K.context.bind(K.context.active(),h)),o[0].callback=h}}typeof l.requestHook=="function"&&u&&(0,At.safeExecuteInTheMiddle)(()=>{let{database:m,host:h,port:_,user:T}=this.connectionParameters,R={database:m,host:h,port:_,user:T};l.requestHook(p,{connection:R,query:{text:u.text,values:u.values,name:u.name}})},m=>{m&&e._diag.error("Error running query hook",m)},!0);let d;try{d=n.apply(this,o)}catch(m){throw p.setStatus({code:K.SpanStatusCode.ERROR,message:Ne.getErrorMessage(m)}),p.end(),m}return d instanceof Promise?d.then(m=>new Promise(h=>{Ne.handleExecutionResult(e.getConfig(),p,m),p.end(),h(m)})).catch(m=>new Promise((h,_)=>{p.setStatus({code:K.SpanStatusCode.ERROR,message:m.message}),p.end(),_(m)})):d})}_getPoolConnectPatch(){let e=this;return n=>function(o){if(Ne.shouldSkipInstrumentation(e.getConfig()))return n.call(this,o);let i=e.tracer.startSpan(r_.SpanNames.POOL_CONNECT,{kind:K.SpanKind.CLIENT,attributes:Ne.getSemanticAttributesFromPool(this.options)});if(o){let a=K.trace.getSpan(K.context.active());o=Ne.patchCallbackPGPool(i,o),a&&(o=K.context.bind(K.context.active(),o))}let s=K.context.with(K.trace.setSpan(K.context.active(),i),()=>n.call(this,o));return o_(i,s)}}};Pi.PgInstrumentation=cc;function o_(t,e){if(!(e instanceof Promise))return e;let n=e;return K.context.bind(K.context.active(),n.then(r=>(t.end(),r)).catch(r=>(t.setStatus({code:K.SpanStatusCode.ERROR,message:Ne.getErrorMessage(r)}),t.end(),Promise.reject(r))))}});var a_=g(s_=>{"use strict";c();Object.defineProperty(s_,"__esModule",{value:!0})});var c_=g(Ot=>{"use strict";c();var uO=Ot&&Ot.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),uc=Ot&&Ot.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&uO(e,t,n)};Object.defineProperty(Ot,"__esModule",{value:!0});uc(i_(),Ot);uc(a_(),Ot);uc(ic(),Ot)});var f_=g(Kn=>{"use strict";c();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.PACKAGE_NAME=Kn.PACKAGE_VERSION=void 0;Kn.PACKAGE_VERSION="0.40.0";Kn.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var lc=g(it=>{"use strict";c();Object.defineProperty(it,"__esModule",{value:!0});it.HapiLifecycleMethodNames=it.HapiLayerType=it.handlerPatched=it.HapiComponentName=void 0;it.HapiComponentName="@hapi/hapi";it.handlerPatched=Symbol("hapi-handler-patched");it.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};it.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var pc=g(to=>{"use strict";c();Object.defineProperty(to,"__esModule",{value:!0});to.AttributeNames=void 0;var pO;(function(t){t.HAPI_TYPE="hapi.type",t.PLUGIN_NAME="hapi.plugin.name",t.EXT_TYPE="server.ext.type"})(pO=to.AttributeNames||(to.AttributeNames={}))});var m_=g(ue=>{"use strict";c();Object.defineProperty(ue,"__esModule",{value:!0});ue.getPluginFromInput=ue.getExtMetadata=ue.getRouteMetadata=ue.isPatchableExtMethod=ue.isDirectExtInput=ue.isLifecycleExtEventObj=ue.isLifecycleExtType=ue.getPluginName=void 0;var Ni=(ne(),y(le)),no=lc(),Jt=pc();function dO(t){return t.name?t.name:t.pkg.name}ue.getPluginName=dO;var fO=t=>typeof t=="string"&&no.HapiLifecycleMethodNames.has(t);ue.isLifecycleExtType=fO;var mO=t=>{var e;let n=(e=t)===null||e===void 0?void 0:e.type;return n!==void 0&&(0,ue.isLifecycleExtType)(n)};ue.isLifecycleExtEventObj=mO;var hO=t=>Array.isArray(t)&&t.length<=3&&(0,ue.isLifecycleExtType)(t[0])&&typeof t[1]=="function";ue.isDirectExtInput=hO;var _O=t=>!Array.isArray(t);ue.isPatchableExtMethod=_O;var gO=(t,e)=>e?{attributes:{[Ni.SEMATTRS_HTTP_ROUTE]:t.path,[Ni.SEMATTRS_HTTP_METHOD]:t.method,[Jt.AttributeNames.HAPI_TYPE]:no.HapiLayerType.PLUGIN,[Jt.AttributeNames.PLUGIN_NAME]:e},name:`${e}: route - ${t.path}`}:{attributes:{[Ni.SEMATTRS_HTTP_ROUTE]:t.path,[Ni.SEMATTRS_HTTP_METHOD]:t.method,[Jt.AttributeNames.HAPI_TYPE]:no.HapiLayerType.ROUTER},name:`route - ${t.path}`};ue.getRouteMetadata=gO;var EO=(t,e)=>e?{attributes:{[Jt.AttributeNames.EXT_TYPE]:t,[Jt.AttributeNames.HAPI_TYPE]:no.HapiLayerType.EXT,[Jt.AttributeNames.PLUGIN_NAME]:e},name:`${e}: ext - ${t}`}:{attributes:{[Jt.AttributeNames.EXT_TYPE]:t,[Jt.AttributeNames.HAPI_TYPE]:no.HapiLayerType.EXT},name:`ext - ${t}`};ue.getExtMetadata=EO;var TO=t=>"plugin"in t?"plugin"in t.plugin?t.plugin.plugin:t.plugin:t;ue.getPluginFromInput=TO});var g_=g(xi=>{"use strict";c();Object.defineProperty(xi,"__esModule",{value:!0});xi.HapiInstrumentation=void 0;var xe=(F(),y(z)),h_=(De(),y(Ke)),Mi=(ce(),y(pe)),__=f_(),ro=lc(),Ct=m_(),dc=class extends Mi.InstrumentationBase{constructor(e={}){super(__.PACKAGE_NAME,__.PACKAGE_VERSION,e)}init(){return new Mi.InstrumentationNodeModuleDefinition(ro.HapiComponentName,[">=17.0.0 <22"],e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,Mi.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,Mi.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;this._massUnwrap([n],["server","Server"])})}_getServerPatch(e){let n=this,r=this;return function(i){let s=e.apply(this,[i]);return r._wrap(s,"route",a=>n._getServerRoutePatch.bind(n)(a)),r._wrap(s,"ext",a=>n._getServerExtPatch.bind(n)(a)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(e){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let a=(0,Ct.getPluginFromInput)(s);n._wrapRegisterHandler(a)}else{let s=(0,Ct.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return e.apply(this,[o,i])}}_getServerExtPatch(e,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let a=0;a<s.length;a++){let u=s[a];if((0,Ct.isLifecycleExtType)(u.type)){let l=u,p=r._wrapExtMethods(l.method,u.type,n);l.method=p,s[a]=l}}return e.apply(this,i)}else if((0,Ct.isDirectExtInput)(i)){let s=i,a=s[1],u=r._wrapExtMethods(a,s[0],n);return e.apply(this,[s[0],u,s[2]])}else if((0,Ct.isLifecycleExtEventObj)(i[0])){let s=i[0],a=r._wrapExtMethods(s.method,s.type,n);return s.method=a,e.call(this,s)}return e.apply(this,i)}}_getServerRoutePatch(e,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return e.apply(this,[o])}}_wrapRegisterHandler(e){let n=this,r=(0,Ct.getPluginName)(e),o=e.register,i=this,s=function(a,u){return i._wrap(a,"route",l=>n._getServerRoutePatch.bind(n)(l,r)),i._wrap(a,"ext",l=>n._getServerExtPatch.bind(n)(l,r)),o(a,u)};e.register=s}_wrapExtMethods(e,n,r){let o=this;if(e instanceof Array){for(let i=0;i<e.length;i++)e[i]=o._wrapExtMethods(e[i],n);return e}else if((0,Ct.isPatchableExtMethod)(e))return e[ro.handlerPatched]===!0?e:(e[ro.handlerPatched]=!0,async function(...s){if(xe.trace.getSpan(xe.context.active())===void 0)return await e.apply(this,s);let a=(0,Ct.getExtMetadata)(n,r),u=o.tracer.startSpan(a.name,{attributes:a.attributes});try{return await xe.context.with(xe.trace.setSpan(xe.context.active(),u),e,void 0,...s)}catch(l){throw u.recordException(l),u.setStatus({code:xe.SpanStatusCode.ERROR,message:l.message}),l}finally{u.end()}});return e}_wrapRouteHandler(e,n){var r;let o=this;if(e[ro.handlerPatched]===!0)return e;e[ro.handlerPatched]=!0;let i=s=>async function(...a){if(xe.trace.getSpan(xe.context.active())===void 0)return await s.call(this,...a);let u=(0,h_.getRPCMetadata)(xe.context.active());u?.type===h_.RPCType.HTTP&&(u.route=e.path);let l=(0,Ct.getRouteMetadata)(e,n),p=o.tracer.startSpan(l.name,{attributes:l.attributes});try{return await xe.context.with(xe.trace.setSpan(xe.context.active(),p),()=>s.call(this,...a))}catch(d){throw p.recordException(d),p.setStatus({code:xe.SpanStatusCode.ERROR,message:d.message}),d}finally{p.end()}};if(typeof e.handler=="function")e.handler=i(e.handler);else if(typeof e.options=="function"){let s=e.options;e.options=function(a){let u=s(a);return typeof u.handler=="function"&&(u.handler=i(u.handler)),u}}else typeof((r=e.options)===null||r===void 0?void 0:r.handler)=="function"&&(e.options.handler=i(e.options.handler));return e}};xi.HapiInstrumentation=dc});var T_=g(Qt=>{"use strict";c();var SO=Qt&&Qt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),E_=Qt&&Qt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&SO(e,t,n)};Object.defineProperty(Qt,"__esModule",{value:!0});E_(g_(),Qt);E_(pc(),Qt)});var Li=g(oo=>{"use strict";c();Object.defineProperty(oo,"__esModule",{value:!0});oo.KoaLayerType=void 0;var vO;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware"})(vO=oo.KoaLayerType||(oo.KoaLayerType={}))});var O_=g(Yn=>{"use strict";c();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.PACKAGE_NAME=Yn.PACKAGE_VERSION=void 0;Yn.PACKAGE_VERSION="0.42.0";Yn.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var fc=g(io=>{"use strict";c();Object.defineProperty(io,"__esModule",{value:!0});io.AttributeNames=void 0;var AO;(function(t){t.KOA_TYPE="koa.type",t.KOA_NAME="koa.name"})(AO=io.AttributeNames||(io.AttributeNames={}))});var b_=g($n=>{"use strict";c();Object.defineProperty($n,"__esModule",{value:!0});$n.isLayerIgnored=$n.getMiddlewareMetadata=void 0;var C_=Li(),wi=fc(),OO=(ne(),y(le)),CO=(t,e,n,r)=>{var o;return n?{attributes:{[wi.AttributeNames.KOA_NAME]:r?.toString(),[wi.AttributeNames.KOA_TYPE]:C_.KoaLayerType.ROUTER,[OO.SEMATTRS_HTTP_ROUTE]:r?.toString()},name:t._matchedRouteName||`router - ${r}`}:{attributes:{[wi.AttributeNames.KOA_NAME]:(o=e.name)!==null&&o!==void 0?o:"middleware",[wi.AttributeNames.KOA_TYPE]:C_.KoaLayerType.MIDDLEWARE},name:`middleware - ${e.name}`}};$n.getMiddlewareMetadata=CO;var bO=(t,e)=>{var n;return!!(Array.isArray(e?.ignoreLayersType)&&(!((n=e?.ignoreLayersType)===null||n===void 0)&&n.includes(t)))};$n.isLayerIgnored=bO});var R_=g(Fi=>{"use strict";c();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.kLayerPatched=void 0;Fi.kLayerPatched=Symbol("koa-layer-patched")});var L_=g(Di=>{"use strict";c();Object.defineProperty(Di,"__esModule",{value:!0});Di.KoaInstrumentation=void 0;var st=(F(),y(z)),so=(ce(),y(pe)),I_=Li(),P_=O_(),N_=b_(),M_=(De(),y(Ke)),x_=R_(),mc=class extends so.InstrumentationBase{constructor(e={}){super(P_.PACKAGE_NAME,P_.PACKAGE_VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return new so.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <3"],e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;return n==null?n:((0,so.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),e)},e=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;(0,so.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(e){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),e.apply(this,[i])}}_patchRouterDispatch(e){var n;st.diag.debug("Patching @koa/router dispatch");let r=e.router,o=(n=r?.stack)!==null&&n!==void 0?n:[];for(let i of o){let s=i.path,a=i.stack;for(let u=0;u<a.length;u++){let l=a[u];a[u]=this._patchLayer(l,!0,s)}}return e}_patchLayer(e,n,r){let o=n?I_.KoaLayerType.ROUTER:I_.KoaLayerType.MIDDLEWARE;return e[x_.kLayerPatched]===!0||(0,N_.isLayerIgnored)(o,this.getConfig())?e:e.constructor.name==="GeneratorFunction"||e.constructor.name==="AsyncGeneratorFunction"?(st.diag.debug("ignoring generator-based Koa middleware layer"),e):(e[x_.kLayerPatched]=!0,st.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(st.trace.getSpan(st.context.active())===void 0)return e(i,s);let u=(0,N_.getMiddlewareMetadata)(i,e,n,r),l=this.tracer.startSpan(u.name,{attributes:u.attributes}),p=(0,M_.getRPCMetadata)(st.context.active());p?.type===M_.RPCType.HTTP&&i._matchedRoute&&(p.route=i._matchedRoute.toString()),this.getConfig().requestHook&&(0,so.safeExecuteInTheMiddle)(()=>this.getConfig().requestHook(l,{context:i,middlewareLayer:e,layerType:o}),m=>{m&&st.diag.error("koa instrumentation: request hook failed",m)},!0);let d=st.trace.setSpan(st.context.active(),l);return st.context.with(d,async()=>{try{return await e(i,s)}catch(m){throw l.recordException(m),m}finally{l.end()}})})}};Di.KoaInstrumentation=mc});var w_=g(bt=>{"use strict";c();var RO=bt&&bt.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),hc=bt&&bt.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&RO(e,t,n)};Object.defineProperty(bt,"__esModule",{value:!0});hc(L_(),bt);hc(Li(),bt);hc(fc(),bt)});var _c=g(Ze=>{"use strict";c();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.ConnectNames=Ze.ConnectTypes=Ze.AttributeNames=void 0;var NO;(function(t){t.CONNECT_TYPE="connect.type",t.CONNECT_NAME="connect.name"})(NO=Ze.AttributeNames||(Ze.AttributeNames={}));var MO;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(MO=Ze.ConnectTypes||(Ze.ConnectTypes={}));var xO;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request handler"})(xO=Ze.ConnectNames||(Ze.ConnectNames={}))});var U_=g(Xn=>{"use strict";c();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.PACKAGE_NAME=Xn.PACKAGE_VERSION=void 0;Xn.PACKAGE_VERSION="0.38.0";Xn.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var H_=g(ki=>{"use strict";c();Object.defineProperty(ki,"__esModule",{value:!0});ki._LAYERS_STORE_PROPERTY=void 0;ki._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var j_=g(tn=>{"use strict";c();Object.defineProperty(tn,"__esModule",{value:!0});tn.generateRoute=tn.replaceCurrentStackRoute=tn.addNewStackLayer=void 0;var LO=(F(),y(z)),en=H_(),wO=t=>{Array.isArray(t[en._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,en._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t[en._LAYERS_STORE_PROPERTY].push("/");let e=t[en._LAYERS_STORE_PROPERTY].length;return()=>{e===t[en._LAYERS_STORE_PROPERTY].length?t[en._LAYERS_STORE_PROPERTY].pop():LO.diag.warn("Connect: Trying to pop the stack multiple time")}};tn.addNewStackLayer=wO;var FO=(t,e)=>{e&&t[en._LAYERS_STORE_PROPERTY].splice(-1,1,e)};tn.replaceCurrentStackRoute=FO;var DO=t=>t[en._LAYERS_STORE_PROPERTY].reduce((e,n)=>e.replace(/\/+$/,"")+n);tn.generateRoute=DO});var W_=g(nn=>{"use strict";c();Object.defineProperty(nn,"__esModule",{value:!0});nn.ConnectInstrumentation=nn.ANONYMOUS_NAME=void 0;var kO=(F(),y(z)),q_=(De(),y(Ke)),Zn=_c(),B_=U_(),Gi=(ce(),y(pe)),GO=(ne(),y(le)),gc=j_();nn.ANONYMOUS_NAME="anonymous";var Ec=class extends Gi.InstrumentationBase{constructor(e={}){super(B_.PACKAGE_NAME,B_.PACKAGE_VERSION,e)}init(){return[new Gi.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],e=>this._patchConstructor(e))]}_patchApp(e){(0,Gi.isWrapped)(e.use)||this._wrap(e,"use",this._patchUse.bind(this)),(0,Gi.isWrapped)(e.handle)||this._wrap(e,"handle",this._patchHandle.bind(this))}_patchConstructor(e){let n=this;return function(...r){let o=e.apply(this,r);return n._patchApp(o),o}}_patchNext(e,n){return function(o){let i=e.apply(this,[o]);return n(),i}}_startSpan(e,n){let r,o,i;e?(r=Zn.ConnectTypes.REQUEST_HANDLER,i=Zn.ConnectNames.REQUEST_HANDLER,o=e):(r=Zn.ConnectTypes.MIDDLEWARE,i=Zn.ConnectNames.MIDDLEWARE,o=n.name||nn.ANONYMOUS_NAME);let s=`${i} - ${o}`,a={attributes:{[GO.SEMATTRS_HTTP_ROUTE]:e.length>0?e:"/",[Zn.AttributeNames.CONNECT_TYPE]:r,[Zn.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,a)}_patchMiddleware(e,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,a,u]=o?[1,2,3]:[0,1,2],l=arguments[s],p=arguments[a],d=arguments[u];(0,gc.replaceCurrentStackRoute)(l,e);let m=(0,q_.getRPCMetadata)(kO.context.active());e&&m?.type===q_.RPCType.HTTP&&(m.route=(0,gc.generateRoute)(l));let h="";e?h=`request handler - ${e}`:h=`middleware - ${n.name||nn.ANONYMOUS_NAME}`;let _=r._startSpan(e,n);r._diag.debug("start span",h);let T=!1;function R(){T?r._diag.debug(`span ${_.name} - already finished`):(T=!0,r._diag.debug(`finishing span ${_.name}`),_.end()),p.removeListener("close",R)}return p.addListener("close",R),arguments[u]=r._patchNext(d,R),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(e){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),e.apply(this,r)}}_patchHandle(e){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],a=(0,gc.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,a)),e.apply(this,arguments)}}_patchOut(e,n){return function(...o){return n(),Reflect.apply(e,this,o)}}};nn.ConnectInstrumentation=Ec});var K_=g(rn=>{"use strict";c();var UO=rn&&rn.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),V_=rn&&rn.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&UO(e,t,n)};Object.defineProperty(rn,"__esModule",{value:!0});V_(_c(),rn);V_(W_(),rn)});c();var lg=k(qe(),1);import Rc from"node:process";c();var ar=k(qe(),1),ps=k($i(),1);import{dirname as hg}from"node:path";import{appendFileSync as _g,mkdirSync as gg}from"node:fs";c();var pu=k(mg(),1),du=k($i(),1);function sr(t){if(pu.HttpClient.isHttpError(t))return t;let e=t instanceof Error?du.default.cause(t):null;return e?sr(e):null}c();function Co(t){return{request:{baseURL:t.config.baseURL,url:t.config.url,method:t.config.method,headers:t.config.headers,data:t.config.data},response:{code:t.code,message:t.message,status:t.response?.status,headers:t.response?.headers,data:t.response?.data}}}function ds(t,e){try{let n=`----- CLI crash report at ${new Date().toISOString()}
|
|
6
6
|
`;if(e instanceof Error){n+=`Error Trace
|
|
@@ -25,7 +25,7 @@ Mongoose Error Code: ${e.code}`:""}`})}function qa(t,e,n,r=void 0){n&&(0,Xv.safe
|
|
|
25
25
|
Failed to update files.
|
|
26
26
|
Failed to sync changes from local files to the Dev Editor
|
|
27
27
|
Still watching local files and will continue to sync changes...
|
|
28
|
-
`}),FailedToWatchFiles:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to watch files. Cause: ${n}`})},FailedToCreateGridApp:({error:e})=>()=>f.default.createElement(E,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>f.default.createElement(E,{message:"The device code has not been approved in the time allocated, please start the login process again."}),DuplicateComponentIdsError:({issues:e})=>{let n=({issue:o})=>{let i=s=>(0,_s.match)(s,{page:()=>"page",plugin:()=>"plugin","menu-plugin":()=>"menu plugin","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element",modal:()=>"modal",topology:()=>"topology","site-plugin":()=>"site plugin"});return f.default.createElement(Be,{flexDirection:"column"},f.default.createElement(I,null,f.default.createElement(I,{bold:!0},"Duplicate ID: "),o.id),f.default.createElement(I,{bold:!0},"Extensions:"),o.components.map(({name:s,path:a,type:u})=>f.default.createElement(I,{key:a},"[",i(u),"] ",s," (",a,")")),f.default.createElement(I,null,f.default.createElement(I,{bold:!0},"Possible GUID: "),o.suggestedId))},r=f.default.createElement(Be,{flexDirection:"column",rowGap:1},f.default.createElement(I,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),e.map(o=>f.default.createElement(n,{issue:o,key:o.id})));return()=>f.default.createElement(E,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:r})},InvalidResponseData:()=>()=>f.default.createElement(H,{message:"Got unexpected response from server."}),InvalidCreateAppResponse:()=>()=>f.default.createElement(E,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>f.default.createElement(E,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),InvalidGetDeploymentResponse:()=>()=>f.default.createElement(E,{message:"Got unexpected response from server. Please try again later.."}),FailedToGetPagesDiff:()=>()=>f.default.createElement(E,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>f.default.createElement(E,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>f.default.createElement(E,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>f.default.createElement(E,{message:`Could not find ${e} in vite build output`}),FailedToCreateBackendDeployment:()=>()=>f.default.createElement(E,{message:"Failed to create backend deployment"}),FailedToUpdateBackendDeployment:()=>()=>f.default.createElement(E,{message:"Failed to update backend deployment"}),InvalidDeploymentUrl:({deploymentUrl:e})=>()=>f.default.createElement(E,{message:`Invalid deployment URL: \`${e}\``}),FailedToGetBackendDeployment:()=>()=>f.default.createElement(E,{message:"Failed to get backend deployment"}),FailedToDeployBackend:()=>()=>f.default.createElement(E,{message:"Failed to deploy backend"}),FailedToMarkDeploymentAsPermanent:()=>()=>f.default.createElement(E,{message:"Failed to make backend deployment permanent"}),FailedToGetUserInfo:()=>()=>f.default.createElement(E,{message:"Failed to get user information."}),FailedToGetMyAccount:()=>()=>f.default.createElement(H,{message:"Failed to get account information."}),FailedToCreateDevelopmentSite:()=>()=>f.default.createElement(E,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>f.default.createElement(E,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>f.default.createElement(E,{message:"Failed to request development sites limit."}),FailedToGetRequiredApps:()=>()=>f.default.createElement(H,{message:"Failed to get app requirement info."}),FailedToGetMarketListing:()=>()=>f.default.createElement(E,{message:"Failed to get market listing."}),FailedToAddRequiredApp:()=>()=>f.default.createElement(E,{message:"Failed to add required app."}),FailedToQuerySites:()=>()=>f.default.createElement(E,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>f.default.createElement(E,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>f.default.createElement(E,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>f.default.createElement(H,{message:"Failed to publish site."}),FailedToSaveDevelopmentSite:({path:e})=>()=>f.default.createElement(E,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:f.default.createElement(f.default.Fragment,null,"Failed to build the application.",f.default.createElement(Pt,null),n),hint:"Please check the build output for more information"})},FailedToCheckIfAppInstalled:()=>()=>f.default.createElement(E,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to initialize git repo. Cause: ${n}`})},FailedToInstallDependencies:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to install dependencies. Cause: ${n}`})},FailedToCommitChanges:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to commit changes. Cause: ${n}`})},FailedToDeleteAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to delete auth data: ${n}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to delete legacy auth data: ${n}`})},FailedToSaveAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to save auth data: ${n}`})},FailedToSaveApiKeyAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to save api key auth data: ${n}`})},FailedToWriteJson:({filePath:e,cause:n})=>{let r=re(n);return()=>f.default.createElement(E,{message:`Failed to write JSON at path: ${e}. Cause: ${r}`})},TemplatePathNotFound:({templatePath:e})=>()=>f.default.createElement(H,{message:`Template path not found: ${e}`}),FailedToCloneRepo:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to clone repo: ${n}`,hint:"Make sure the Git URL is correct and that your local Git is configured properly to access the remote repository"})},InvalidGitUrl:({url:e})=>()=>f.default.createElement(H,{message:`Invalid Git URL: ${e}`}),AuthenticationRequired:()=>()=>f.default.createElement(E,{message:"You have to already be logged in to run this command."}),SiteConfiguredRequired:()=>()=>f.default.createElement(E,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>f.default.createElement(E,{message:"Could not add package to the workspaces configuration. Please add it as instructed by your package manager.",hint:f.default.createElement(I,null,"Full error can be found in ",f.default.createElement(I,{bold:!0},"wix-error.log"))}),FailedToGenerateSelfsignedCertificate:()=>()=>f.default.createElement(E,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>f.default.createElement(E,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>f.default.createElement(E,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>f.default.createElement(H,{message:"Failed to create an app configuration."}),FailedToUpdateAppRelease:()=>()=>f.default.createElement(H,{message:"Failed to update an app configuration."}),FailedToCreateComponents:()=>()=>f.default.createElement(H,{message:"Failed to create components."}),FailedToCheckDeprecatedStatus:()=>()=>f.default.createElement(H,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>f.default.createElement(H,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:e,cliAppVersion:n})=>()=>f.default.createElement(E,{message:f.default.createElement(I,null,"The versions of ",f.default.createElement(I,{bold:!0},"@wix/cli")," (",e,") and"," ",f.default.createElement(I,{bold:!0},"@wix/cli-app")," (",n,") dependencies do not match"),hint:f.default.createElement(I,null,"Align their versions in your ",f.default.createElement(I,{bold:!0},"package.json")," and re-install dependencies")}),FailedToGetAppValidity:()=>()=>f.default.createElement(H,{message:"Failed to get validation status for app version"}),InvalidDashboardPageRoute:({route:e,errorMessage:n})=>()=>f.default.createElement(E,{message:`Invalid dashboard page route: ${e}`,hint:n}),InvalidEmbeddedScriptFolder:({path:e,errorMessage:n})=>()=>f.default.createElement(E,{message:`Invalid embedded script folder: ${e}`,hint:n}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:n})=>()=>f.default.createElement(E,{message:`Invalid embedded script template in ${e}`,hint:n}),InvalidCustomElementTagName:({tagName:e,errorMessage:n})=>()=>f.default.createElement(E,{message:f.default.createElement(I,null,"We use name of folder as tagName for your custom element. Unfortunately, ",f.default.createElement(I,{bold:!0},e)," is invalid tagName. Reason: ",n),hint:f.default.createElement(I,null,"You can find rules for tagName here:"," ",f.default.createElement(I,{bold:!0},"https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names"))}),InvalidSiteFrontendPackageVersion:({packageName:e,versionRange:n})=>()=>f.default.createElement(E,{message:f.default.createElement(I,null,"Package ",f.default.createElement(I,{bold:!0},e)," has an invalid version range ",f.default.createElement(I,{bold:!0},n)," in your"," ",f.default.createElement(I,{bold:!0},"package.json")," file."),hint:f.default.createElement(I,null,"The version range must follow"," ",f.default.createElement(I,{bold:!0},"semantic versioning")," rules, and it must contain a major version.",f.default.createElement(Pt,null),"Read more about it here:"," ",f.default.createElement(Eo,{url:"https://docs.npmjs.com/about-semantic-versioning"}))}),FailedToCreateSiteOverride:()=>()=>f.default.createElement(H,{message:"Failed to create site override configuration"}),FailedToGetPipelineErrorInfo:()=>()=>f.default.createElement(H,{message:"Failed to get error details"}),FailedToGetDeploymentStatus:()=>()=>f.default.createElement(H,{message:"Failed to get deployment status"}),NetworkError:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Network error occurred. Cause: ${n}`,hint:"Make sure you have an active internet connection and try again shortly."})},FailedToGenerateAppMarketQueryParam:()=>()=>f.default.createElement(H,{message:"Failed to get generate appMarket query parameter"}),FailedToParseLog:()=>()=>f.default.createElement(H,{message:"Failed to parse log from the server"}),AppForVersionNotFound:({version:e})=>()=>f.default.createElement(E,{message:`Could not find app configuration for the provided version: "${e}"`,hint:"Make sure that there is an app for this version."}),FailedToFetchAppForVersion:()=>()=>f.default.createElement(H,{message:"Failed to fetch app configuration"}),FailedToGetAppSecret:()=>()=>f.default.createElement(H,{message:"Failed to fetch app keys and configuration"}),FailedToConnectToLogsService:()=>()=>f.default.createElement(E,{message:"Failed to connect to logs service."}),FailedToGetLogsTopology:()=>()=>f.default.createElement(E,{message:"Failed to fetch logs configuration for the given version.",hint:"Try to use a different version."}),FailedInstallCloudflareNoAccess:({path:e})=>()=>f.default.createElement(E,{message:`Failed to install required binary in "${e}"`,hint:"Check that you have required permissions."}),LogsConnectionTimeout:()=>()=>f.default.createElement(E,{message:"Log session has been closed due to timeout."}),InvalidServicePluginImplementation:()=>()=>f.default.createElement(E,{message:"Your service plugin implementation is incorrect."}),UnknownServicePlugin:({name:e})=>()=>f.default.createElement(E,{message:`Unknown service plugin with the name of \`${e}\``}),InvalidServicePluginFolder:({relativePath:e})=>()=>f.default.createElement(E,{message:`Invalid folder for service plugin in \`${e}\``}),InvalidSiteOverrideID:()=>()=>f.default.createElement(E,{message:"Failed to read devSiteOverrideId from local app configurations.",hint:"Restart the dev environment and make sure that the .wix/app.config.json file exists."}),FailedToFindEsbuildOutputFile:()=>()=>f.default.createElement(E,{message:"Failed to find file in ESBuild output",hint:"Restart the dev environment and try again."}),FailedOptimizingWithEsbuild:({cause:e})=>()=>f.default.createElement(E,{message:"Failed to optimize dependency with ESBuild",explanation:"Restart the dev environment and try again.",hint:`See the original error: ${re(e)}`}),FailedReadingEsbuildOutputFile:()=>()=>f.default.createElement(E,{message:"Failed to read ESBuild's output file",hint:"Restart the dev environment and try again."}),CliAppTemplateNotFound:({id:e})=>()=>f.default.createElement(E,{message:f.default.createElement(f.default.Fragment,null,"Template with ID ",f.default.createElement(I,{bold:!0},e)," not found."),hint:"Make sure you are using the correct template ID"}),FailedToQueryCliAppTemplates:()=>()=>f.default.createElement(H,{message:"Failed to fetch available app templates"}),FailedToCreateDevCenterAppFromTemplate:()=>()=>f.default.createElement(H,{message:"Failed to register your application in Wix"}),FailedToQueryApps:()=>()=>f.default.createElement(H,{message:"Failed to query apps"}),FailedToGetSiteInstalledApps:()=>()=>f.default.createElement(H,{message:"Failed to get site installed apps"}),FailedToGetClientSpecMap:()=>()=>f.default.createElement(H,{message:"Failed to get site client spec map"})})}function re(t){return t instanceof Error?t.message:JSON.stringify(t)}function hs(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var gs=({error:t,systemErrorOverride:e})=>(0,Ro.useMemo)(()=>{let n=yo(t);return So(n)&&e?e:(0,Ro.createElement)(_u(n.cliCode))},[t,e]);c();var zn=k(go(),1);c();c();var xd=k(Ad(),1);c();F();De();ce();var va="sentry.dsc",Cd="sentry.parent_span_id",bd="sentry.sampled_not_recording";var BS=pt("sentry_scopes"),KM=pt("sentry_fork_isolation_scope"),YM=pt("sentry_fork_set_scope"),$M=pt("sentry_fork_set_isolation_scope");function Rd(t){return t.getValue(BS)}function WS({parentSpanId:t,dsc:e,sampled:n}){let r=e?Wc(e):void 0,o=new dr().set(Cd,t||""),i=r?o.set(va,r):o;return n===!1?i.set(bd,"1"):i}function Id(t){let e=WS({parentSpanId:t.parentSpanId,dsc:t.dsc,sampled:t.sampled});return{traceId:t.traceId,spanId:t.parentSpanId||"",isRemote:!0,traceFlags:t.sampled?dt.SAMPLED:dt.NONE,traceState:e}}function Od(t){let e,n=t[0],r=1;for(;r<t.length;){let o=t[r],i=t[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(e=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(e,...s)),e=void 0)}return n}function VS(t){let{traceFlags:e,traceState:n}=t,r=n?n.get(bd)==="1":!1;if(e===dt.SAMPLED)return!0;if(r)return!1;let o=n?n.get(va):void 0,i=o?Qi(o):void 0;if(Od([i,"optionalAccess",s=>s.sampled])==="true")return!0;if(Od([i,"optionalAccess",s=>s.sampled])==="false")return!1}function Pd(t){let e=t.spanContext(),{traceId:n,spanId:r,traceState:o}=e,i=o?o.get(va):void 0,s=i?Qi(i):void 0,a=o&&o.get(Cd)||void 0,u=VS(e),l=s||os(ts(t));return{traceId:n,spanId:r,sampled:u,parentSpanId:a,dsc:l}}function An(...t){Yo({instrumentations:t})}c();F();function Nd(t){let e=Rd(Mt.active());e&&(e.isolationScope=t)}c();function Se(t,e){t.setAttribute(Je,e)}c();function Md(t){let e=t.protocol||"",n=t.hostname||t.host||"",r=!t.port||t.port===80||t.port===443||/^(.*):(\d+)$/.test(n)?"":`:${t.port}`,o=t.path?t.path:"/";return`${e}//${n}${r}${o}`}var Ld="Http",Ye={},Aa,KS=Object.assign(function(){if(Aa)return;let t=Ye._instrumentation||xd.HttpInstrumentation;Aa=new t({...O([Ye,"access",e=>e.instrumentation,"optionalAccess",e=>e._experimentalConfig]),ignoreOutgoingRequestHook:e=>{let n=Md(e);if(!n)return!1;if(is(n,se()))return!0;let r=Ye.ignoreOutgoingRequests;return!!(r&&r(n,e))},ignoreIncomingRequestHook:e=>{let n=e.url,r=O([e,"access",i=>i.method,"optionalAccess",i=>i.toUpperCase,"call",i=>i()]);if(r==="OPTIONS"||r==="HEAD")return!0;let o=Ye.ignoreIncomingRequests;return!!(n&&o&&o(n,e))},requireParentforOutgoingSpans:!1,requireParentforIncomingSpans:!1,requestHook:(e,n)=>{if(Se(e,"auto.http.otel.http"),Fd(n)){O([Ye,"access",p=>p.instrumentation,"optionalAccess",p=>p.requestHook,"optionalCall",p=>p(e,n)]);return}let r=rs(e),o=(r.isolationScope||we()).clone(),i=r.scope||un();o.setSDKProcessingMetadata({request:n});let s=se();s&&s.getOptions().autoSessionTracking&&o.setRequestSession({status:"ok"}),Nd(o),ns(e,i,o);let a=(n.method||"GET").toUpperCase(),u=Ji(n.url||"/"),l=`${a} ${u}`;o.setTransactionName(l),O([Ye,"access",p=>p.instrumentation,"optionalAccess",p=>p.requestHook,"optionalCall",p=>p(e,n)])},responseHook:(e,n)=>{let r=se();r&&r.getOptions().autoSessionTracking&&setImmediate(()=>{r._captureRequestSession()}),O([Ye,"access",o=>o.instrumentation,"optionalAccess",o=>o.responseHook,"optionalCall",o=>o(e,n)])},applyCustomAttributesOnSpan:(e,n,r)=>{(typeof Ye.breadcrumbs>"u"?!0:Ye.breadcrumbs)&&$S(n,r),O([Ye,"access",i=>i.instrumentation,"optionalAccess",i=>i.applyCustomAttributesOnSpan,"optionalCall",i=>i(e,n,r)])}}),An(Aa)},{id:Ld}),YS=(t={})=>({name:Ld,setupOnce(){Ye=t,KS()}}),wd=YS;function $S(t,e){if(!Fd(t))return;let n=XS(t);ln({category:"http",data:{status_code:e.statusCode,...n},type:"http"},{event:"response",request:t,response:e})}function XS(t){try{let e=t.getHeader("host")||t.host,n=new URL(t.path,`${t.protocol}//${e}`),r=tr(n.toString()),o={url:nr(r),"http.method":t.method||"GET"};return r.search&&(o["http.query"]=r.search),r.hash&&(o["http.fragment"]=r.hash),o}catch{return{}}}function Fd(t){return"outputData"in t&&"outputSize"in t&&!("client"in t)&&!("statusCode"in t)}c();F();c();var ie=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;c();var Oa=Hc(process.versions.node),ei=Oa.major;var ZS=(t={})=>{let e=typeof t.breadcrumbs>"u"?!0:t.breadcrumbs,n=t.ignoreOutgoingRequests;async function r(){if(ei<18){ie&&G.log("NodeFetch is not supported on Node < 18, skipping instrumentation...");return}try{let o=await import("./build-JJQXAOLF.js"),{FetchInstrumentation:i}=o;class s extends i{onHeaders({request:u,response:l}){return e&&JS(u,l),super.onHeaders({request:u,response:l})}}return new s({ignoreRequestHook:a=>{let u=ey(a.origin,a.path),l=!ir();if(n&&u&&n(u))return!0;if(l){let d=Mt.active(),m={},h=ve.getSpan(d),_=h?Pd(h):un().getPropagationContext(),T=Id(_);T.traceState=O([T,"access",b=>b.traceState,"optionalAccess",b=>b.set,"call",b=>b("sentry.url",u)]);let R=ve.setSpanContext(d,T);cn.inject(R,m);let M=a.headers;return Array.isArray(M)?Object.entries(m).forEach(b=>M.push(...b)):a.headers+=Object.entries(m).map(([b,A])=>`${b}: ${A}\r
|
|
28
|
+
`}),FailedToWatchFiles:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to watch files. Cause: ${n}`})},FailedToCreateGridApp:({error:e})=>()=>f.default.createElement(E,{message:"Failed to create an isolated environment.",explanation:e}),DeviceCodeTimedOut:()=>()=>f.default.createElement(E,{message:"The device code has not been approved in the time allocated, please start the login process again."}),DuplicateComponentIdsError:({issues:e})=>{let n=({issue:o})=>{let i=s=>(0,_s.match)(s,{page:()=>"page",plugin:()=>"plugin","menu-plugin":()=>"menu plugin","sidebar-category":()=>"sidebar category","embedded-script":()=>"embedded script","custom-element":()=>"custom element",modal:()=>"modal",topology:()=>"topology","site-plugin":()=>"site plugin"});return f.default.createElement(Be,{flexDirection:"column"},f.default.createElement(I,null,f.default.createElement(I,{bold:!0},"Duplicate ID: "),o.id),f.default.createElement(I,{bold:!0},"Extensions:"),o.components.map(({name:s,path:a,type:u})=>f.default.createElement(I,{key:a},"[",i(u),"] ",s," (",a,")")),f.default.createElement(I,null,f.default.createElement(I,{bold:!0},"Possible GUID: "),o.suggestedId))},r=f.default.createElement(Be,{flexDirection:"column",rowGap:1},f.default.createElement(I,null,"You can use the provided suggested GUIDs as the ID of the newly created extension."),e.map(o=>f.default.createElement(n,{issue:o,key:o.id})));return()=>f.default.createElement(E,{message:"Found multiple extensions with the same id, this might happen if you copy paste folders.",hint:r})},InvalidResponseData:()=>()=>f.default.createElement(H,{message:"Got unexpected response from server."}),InvalidCreateAppResponse:()=>()=>f.default.createElement(E,{message:"`createApp` returned an invalid response."}),InvalidDeployAppResponse:()=>()=>f.default.createElement(E,{message:"Got unexpected response from server. Make sure you are running a supported version of the Velo CLI."}),InvalidGetDeploymentResponse:()=>()=>f.default.createElement(E,{message:"Got unexpected response from server. Please try again later.."}),FailedToGetPagesDiff:()=>()=>f.default.createElement(E,{message:"Failed to request pages diff."}),InvalidViteBuildOutput:()=>()=>f.default.createElement(E,{message:"Invalid vite build output"}),ViteModuleBundleNotFound:()=>()=>f.default.createElement(E,{message:"Could not find module bundle in vite build output"}),ViteFileNotFoundInOutput:({fileName:e})=>()=>f.default.createElement(E,{message:`Could not find ${e} in vite build output`}),FailedToCreateBackendDeployment:()=>()=>f.default.createElement(E,{message:"Failed to create backend deployment"}),FailedToUpdateBackendDeployment:()=>()=>f.default.createElement(E,{message:"Failed to update backend deployment"}),InvalidDeploymentUrl:({deploymentUrl:e})=>()=>f.default.createElement(E,{message:`Invalid deployment URL: \`${e}\``}),FailedToGetBackendDeployment:()=>()=>f.default.createElement(E,{message:"Failed to get backend deployment"}),FailedToDeployBackend:()=>()=>f.default.createElement(E,{message:"Failed to deploy backend"}),FailedToMarkDeploymentAsPermanent:()=>()=>f.default.createElement(E,{message:"Failed to make backend deployment permanent"}),FailedToGetUserInfo:()=>()=>f.default.createElement(E,{message:"Failed to get user information."}),FailedToGetMyAccount:()=>()=>f.default.createElement(H,{message:"Failed to get account information."}),FailedToCreateDevelopmentSite:()=>()=>f.default.createElement(E,{message:"Failed to create a Development Site"}),FailedToGetDevelopmentSites:()=>()=>f.default.createElement(E,{message:"Failed to request development sites."}),FailedToGetDevelopmentSitesLimit:()=>()=>f.default.createElement(E,{message:"Failed to request development sites limit."}),FailedToGetRequiredApps:()=>()=>f.default.createElement(H,{message:"Failed to get app requirement info."}),FailedToGetMarketListing:()=>()=>f.default.createElement(E,{message:"Failed to get market listing."}),FailedToAddRequiredApp:()=>()=>f.default.createElement(E,{message:"Failed to add required app."}),FailedToQuerySites:()=>()=>f.default.createElement(E,{message:"Failed to request sites list."}),FailedToGetSite:()=>()=>f.default.createElement(E,{message:"Failed to get information about your configured Development Site"}),FailedToDeploySite:()=>()=>f.default.createElement(E,{message:"Failed to deploy site."}),FailedToPublishDeployment:()=>()=>f.default.createElement(H,{message:"Failed to publish site."}),FailedToSaveDevelopmentSite:({path:e})=>()=>f.default.createElement(E,{message:"Failed to save the current development site.",hint:`Make sure the \`${e}\` file has proper permissions and is accessible`}),FailedToBuildApp:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:f.default.createElement(f.default.Fragment,null,"Failed to build the application.",f.default.createElement(Pt,null),n),hint:"Please check the build output for more information"})},FailedToCheckIfAppInstalled:()=>()=>f.default.createElement(E,{message:"Failed to fetch site installation details"}),FailedToInitializeGitRepo:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to initialize git repo. Cause: ${n}`})},FailedToInstallDependencies:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to install dependencies. Cause: ${n}`})},FailedToCommitChanges:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to commit changes. Cause: ${n}`})},FailedToDeleteAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to delete auth data: ${n}`})},FailedToDeleteLegacyAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to delete legacy auth data: ${n}`})},FailedToSaveAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to save auth data: ${n}`})},FailedToSaveApiKeyAuthData:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to save api key auth data: ${n}`})},FailedToWriteJson:({filePath:e,cause:n})=>{let r=re(n);return()=>f.default.createElement(E,{message:`Failed to write JSON at path: ${e}. Cause: ${r}`})},TemplatePathNotFound:({templatePath:e})=>()=>f.default.createElement(H,{message:`Template path not found: ${e}`}),LocalTemplatePathNotFound:({path:e})=>()=>f.default.createElement(E,{message:`Local template path not found: ${e}`}),FailedToCloneRepo:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Failed to clone repo: ${n}`,hint:"Make sure the Git URL is correct and that your local Git is configured properly to access the remote repository"})},InvalidGitUrl:({url:e})=>()=>f.default.createElement(H,{message:`Invalid Git URL: ${e}`}),AuthenticationRequired:()=>()=>f.default.createElement(E,{message:"You have to already be logged in to run this command."}),InvalidApiKey:()=>()=>f.default.createElement(E,{message:"You used invalid API key to log in."}),SiteConfiguredRequired:()=>()=>f.default.createElement(E,{message:"You must configure the development site before running this command, or provide a site-id in the command options."}),FailedAddingPackageToWorkspace:()=>()=>f.default.createElement(E,{message:"Could not add package to the workspaces configuration. Please add it as instructed by your package manager.",hint:f.default.createElement(I,null,"Full error can be found in ",f.default.createElement(I,{bold:!0},"wix-error.log"))}),FailedToGenerateSelfsignedCertificate:()=>()=>f.default.createElement(E,{message:"Failed to generate a Selfsigned certificate for development."}),NonInteractiveTerminal:()=>()=>f.default.createElement(E,{message:"This command is not supported in non-interactive terminals. Please run the command in an interactive terminal (TTY)."}),FailedToResolveViteOrigin:()=>()=>f.default.createElement(E,{message:"Failed to resolve the base url for CSS asset urls"}),FailedToCreateAppRelease:()=>()=>f.default.createElement(H,{message:"Failed to create an app configuration."}),FailedToUpdateAppRelease:()=>()=>f.default.createElement(H,{message:"Failed to update an app configuration."}),FailedToCreateComponents:()=>()=>f.default.createElement(H,{message:"Failed to create components."}),FailedToCheckDeprecatedStatus:()=>()=>f.default.createElement(H,{message:"Failed to check cli version deprecated status."}),FailedToGetResolveNpmDependenciesResult:()=>()=>f.default.createElement(H,{message:"Failed to resolve Wix's lockfile."}),CliAppVersionMismatch:({cliVersion:e,cliAppVersion:n})=>()=>f.default.createElement(E,{message:f.default.createElement(I,null,"The versions of ",f.default.createElement(I,{bold:!0},"@wix/cli")," (",e,") and"," ",f.default.createElement(I,{bold:!0},"@wix/cli-app")," (",n,") dependencies do not match"),hint:f.default.createElement(I,null,"Align their versions in your ",f.default.createElement(I,{bold:!0},"package.json")," and re-install dependencies")}),FailedToGetAppValidity:()=>()=>f.default.createElement(H,{message:"Failed to get validation status for app version"}),InvalidDashboardPageRoute:({route:e,errorMessage:n})=>()=>f.default.createElement(E,{message:`Invalid dashboard page route: ${e}`,hint:n}),InvalidEmbeddedScriptFolder:({path:e,errorMessage:n})=>()=>f.default.createElement(E,{message:`Invalid embedded script folder: ${e}`,hint:n}),InvalidEmbeddedScriptTemplate:({templateFilename:e,errorMessage:n})=>()=>f.default.createElement(E,{message:`Invalid embedded script template in ${e}`,hint:n}),InvalidCustomElementTagName:({tagName:e,errorMessage:n})=>()=>f.default.createElement(E,{message:f.default.createElement(I,null,"We use name of folder as tagName for your custom element. Unfortunately, ",f.default.createElement(I,{bold:!0},e)," is invalid tagName. Reason: ",n),hint:f.default.createElement(I,null,"You can find rules for tagName here:"," ",f.default.createElement(I,{bold:!0},"https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define#valid_custom_element_names"))}),InvalidSiteFrontendPackageVersion:({packageName:e,versionRange:n})=>()=>f.default.createElement(E,{message:f.default.createElement(I,null,"Package ",f.default.createElement(I,{bold:!0},e)," has an invalid version range ",f.default.createElement(I,{bold:!0},n)," in your"," ",f.default.createElement(I,{bold:!0},"package.json")," file."),hint:f.default.createElement(I,null,"The version range must follow"," ",f.default.createElement(I,{bold:!0},"semantic versioning")," rules, and it must contain a major version.",f.default.createElement(Pt,null),"Read more about it here:"," ",f.default.createElement(Eo,{url:"https://docs.npmjs.com/about-semantic-versioning"}))}),FailedToCreateSiteOverride:()=>()=>f.default.createElement(H,{message:"Failed to create site override configuration"}),FailedToGetPipelineErrorInfo:()=>()=>f.default.createElement(H,{message:"Failed to get error details"}),FailedToGetDeploymentStatus:()=>()=>f.default.createElement(H,{message:"Failed to get deployment status"}),NetworkError:({cause:e})=>{let n=re(e);return()=>f.default.createElement(E,{message:`Network error occurred. Cause: ${n}`,hint:"Make sure you have an active internet connection and try again shortly."})},FailedToGenerateAppMarketQueryParam:()=>()=>f.default.createElement(H,{message:"Failed to get generate appMarket query parameter"}),FailedToParseLog:()=>()=>f.default.createElement(H,{message:"Failed to parse log from the server"}),AppForVersionNotFound:({version:e})=>()=>f.default.createElement(E,{message:`Could not find app configuration for the provided version: "${e}"`,hint:"Make sure that there is an app for this version."}),FailedToFetchAppForVersion:()=>()=>f.default.createElement(H,{message:"Failed to fetch app configuration"}),FailedToGetAppSecret:()=>()=>f.default.createElement(H,{message:"Failed to fetch app keys and configuration"}),FailedToConnectToLogsService:()=>()=>f.default.createElement(E,{message:"Failed to connect to logs service."}),FailedToGetLogsTopology:()=>()=>f.default.createElement(E,{message:"Failed to fetch logs configuration for the given version.",hint:"Try to use a different version."}),FailedInstallCloudflareNoAccess:({path:e})=>()=>f.default.createElement(E,{message:`Failed to install required binary in "${e}"`,hint:"Check that you have required permissions."}),LogsConnectionTimeout:()=>()=>f.default.createElement(E,{message:"Log session has been closed due to timeout."}),InvalidServicePluginImplementation:()=>()=>f.default.createElement(E,{message:"Your service plugin implementation is incorrect."}),UnknownServicePlugin:({name:e})=>()=>f.default.createElement(E,{message:`Unknown service plugin with the name of \`${e}\``}),InvalidServicePluginFolder:({relativePath:e})=>()=>f.default.createElement(E,{message:`Invalid folder for service plugin in \`${e}\``}),InvalidSiteOverrideID:()=>()=>f.default.createElement(E,{message:"Failed to read devSiteOverrideId from local app configurations.",hint:"Restart the dev environment and make sure that the .wix/app.config.json file exists."}),FailedToFindEsbuildOutputFile:()=>()=>f.default.createElement(E,{message:"Failed to find file in ESBuild output",hint:"Restart the dev environment and try again."}),FailedOptimizingWithEsbuild:({cause:e})=>()=>f.default.createElement(E,{message:"Failed to optimize dependency with ESBuild",explanation:"Restart the dev environment and try again.",hint:`See the original error: ${re(e)}`}),FailedReadingEsbuildOutputFile:()=>()=>f.default.createElement(E,{message:"Failed to read ESBuild's output file",hint:"Restart the dev environment and try again."}),CliAppTemplateNotFound:({id:e})=>()=>f.default.createElement(E,{message:f.default.createElement(f.default.Fragment,null,"Template with ID ",f.default.createElement(I,{bold:!0},e)," not found."),hint:"Make sure you are using the correct template ID"}),FailedToQueryCliAppTemplates:()=>()=>f.default.createElement(H,{message:"Failed to fetch available app templates"}),FailedToCreateDevCenterAppFromTemplate:()=>()=>f.default.createElement(H,{message:"Failed to register your application in Wix"}),FailedToQueryApps:()=>()=>f.default.createElement(H,{message:"Failed to query apps"}),FailedToGetSiteInstalledApps:()=>()=>f.default.createElement(H,{message:"Failed to get site installed apps"}),FailedToGetClientSpecMap:()=>()=>f.default.createElement(H,{message:"Failed to get site client spec map"})})}function re(t){return t instanceof Error?t.message:JSON.stringify(t)}function hs(t){let e=t.path.join(".");return e?`- \`${e}\`: ${t.message}`:`- ${t.message}`}var gs=({error:t,systemErrorOverride:e})=>(0,Ro.useMemo)(()=>{let n=yo(t);return So(n)&&e?e:(0,Ro.createElement)(_u(n.cliCode))},[t,e]);c();var zn=k(go(),1);c();c();var xd=k(Ad(),1);c();F();De();ce();var va="sentry.dsc",Cd="sentry.parent_span_id",bd="sentry.sampled_not_recording";var BS=pt("sentry_scopes"),KM=pt("sentry_fork_isolation_scope"),YM=pt("sentry_fork_set_scope"),$M=pt("sentry_fork_set_isolation_scope");function Rd(t){return t.getValue(BS)}function WS({parentSpanId:t,dsc:e,sampled:n}){let r=e?Wc(e):void 0,o=new dr().set(Cd,t||""),i=r?o.set(va,r):o;return n===!1?i.set(bd,"1"):i}function Id(t){let e=WS({parentSpanId:t.parentSpanId,dsc:t.dsc,sampled:t.sampled});return{traceId:t.traceId,spanId:t.parentSpanId||"",isRemote:!0,traceFlags:t.sampled?dt.SAMPLED:dt.NONE,traceState:e}}function Od(t){let e,n=t[0],r=1;for(;r<t.length;){let o=t[r],i=t[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(e=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(e,...s)),e=void 0)}return n}function VS(t){let{traceFlags:e,traceState:n}=t,r=n?n.get(bd)==="1":!1;if(e===dt.SAMPLED)return!0;if(r)return!1;let o=n?n.get(va):void 0,i=o?Qi(o):void 0;if(Od([i,"optionalAccess",s=>s.sampled])==="true")return!0;if(Od([i,"optionalAccess",s=>s.sampled])==="false")return!1}function Pd(t){let e=t.spanContext(),{traceId:n,spanId:r,traceState:o}=e,i=o?o.get(va):void 0,s=i?Qi(i):void 0,a=o&&o.get(Cd)||void 0,u=VS(e),l=s||os(ts(t));return{traceId:n,spanId:r,sampled:u,parentSpanId:a,dsc:l}}function An(...t){Yo({instrumentations:t})}c();F();function Nd(t){let e=Rd(Mt.active());e&&(e.isolationScope=t)}c();function Se(t,e){t.setAttribute(Je,e)}c();function Md(t){let e=t.protocol||"",n=t.hostname||t.host||"",r=!t.port||t.port===80||t.port===443||/^(.*):(\d+)$/.test(n)?"":`:${t.port}`,o=t.path?t.path:"/";return`${e}//${n}${r}${o}`}var Ld="Http",Ye={},Aa,KS=Object.assign(function(){if(Aa)return;let t=Ye._instrumentation||xd.HttpInstrumentation;Aa=new t({...O([Ye,"access",e=>e.instrumentation,"optionalAccess",e=>e._experimentalConfig]),ignoreOutgoingRequestHook:e=>{let n=Md(e);if(!n)return!1;if(is(n,se()))return!0;let r=Ye.ignoreOutgoingRequests;return!!(r&&r(n,e))},ignoreIncomingRequestHook:e=>{let n=e.url,r=O([e,"access",i=>i.method,"optionalAccess",i=>i.toUpperCase,"call",i=>i()]);if(r==="OPTIONS"||r==="HEAD")return!0;let o=Ye.ignoreIncomingRequests;return!!(n&&o&&o(n,e))},requireParentforOutgoingSpans:!1,requireParentforIncomingSpans:!1,requestHook:(e,n)=>{if(Se(e,"auto.http.otel.http"),Fd(n)){O([Ye,"access",p=>p.instrumentation,"optionalAccess",p=>p.requestHook,"optionalCall",p=>p(e,n)]);return}let r=rs(e),o=(r.isolationScope||we()).clone(),i=r.scope||un();o.setSDKProcessingMetadata({request:n});let s=se();s&&s.getOptions().autoSessionTracking&&o.setRequestSession({status:"ok"}),Nd(o),ns(e,i,o);let a=(n.method||"GET").toUpperCase(),u=Ji(n.url||"/"),l=`${a} ${u}`;o.setTransactionName(l),O([Ye,"access",p=>p.instrumentation,"optionalAccess",p=>p.requestHook,"optionalCall",p=>p(e,n)])},responseHook:(e,n)=>{let r=se();r&&r.getOptions().autoSessionTracking&&setImmediate(()=>{r._captureRequestSession()}),O([Ye,"access",o=>o.instrumentation,"optionalAccess",o=>o.responseHook,"optionalCall",o=>o(e,n)])},applyCustomAttributesOnSpan:(e,n,r)=>{(typeof Ye.breadcrumbs>"u"?!0:Ye.breadcrumbs)&&$S(n,r),O([Ye,"access",i=>i.instrumentation,"optionalAccess",i=>i.applyCustomAttributesOnSpan,"optionalCall",i=>i(e,n,r)])}}),An(Aa)},{id:Ld}),YS=(t={})=>({name:Ld,setupOnce(){Ye=t,KS()}}),wd=YS;function $S(t,e){if(!Fd(t))return;let n=XS(t);ln({category:"http",data:{status_code:e.statusCode,...n},type:"http"},{event:"response",request:t,response:e})}function XS(t){try{let e=t.getHeader("host")||t.host,n=new URL(t.path,`${t.protocol}//${e}`),r=tr(n.toString()),o={url:nr(r),"http.method":t.method||"GET"};return r.search&&(o["http.query"]=r.search),r.hash&&(o["http.fragment"]=r.hash),o}catch{return{}}}function Fd(t){return"outputData"in t&&"outputSize"in t&&!("client"in t)&&!("statusCode"in t)}c();F();c();var ie=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;c();var Oa=Hc(process.versions.node),ei=Oa.major;var ZS=(t={})=>{let e=typeof t.breadcrumbs>"u"?!0:t.breadcrumbs,n=t.ignoreOutgoingRequests;async function r(){if(ei<18){ie&&G.log("NodeFetch is not supported on Node < 18, skipping instrumentation...");return}try{let o=await import("./build-JJQXAOLF.js"),{FetchInstrumentation:i}=o;class s extends i{onHeaders({request:u,response:l}){return e&&JS(u,l),super.onHeaders({request:u,response:l})}}return new s({ignoreRequestHook:a=>{let u=ey(a.origin,a.path),l=!ir();if(n&&u&&n(u))return!0;if(l){let d=Mt.active(),m={},h=ve.getSpan(d),_=h?Pd(h):un().getPropagationContext(),T=Id(_);T.traceState=O([T,"access",b=>b.traceState,"optionalAccess",b=>b.set,"call",b=>b("sentry.url",u)]);let R=ve.setSpanContext(d,T);cn.inject(R,m);let M=a.headers;return Array.isArray(M)?Object.entries(m).forEach(b=>M.push(...b)):a.headers+=Object.entries(m).map(([b,A])=>`${b}: ${A}\r
|
|
29
29
|
`).join(""),!0}return!1},onRequest:({span:a})=>{zS(a)}})}catch(o){ie&&G.log(`Error while loading NodeFetch instrumentation:
|
|
30
30
|
`,o)}}return{name:"NodeFetch",setupOnce(){r().then(o=>{o&&An(o)})}}},Dd=ZS;function zS(t){Se(t,"auto.http.otel.node_fetch")}function JS(t,e){let n=QS(t);ln({category:"http",data:{status_code:e.statusCode,...n},type:"http"},{event:"response",request:t,response:e})}function QS(t){try{let e=new URL(t.path,t.origin),n=tr(e.toString()),r={url:nr(n),"http.method":t.method||"GET"};return n.search&&(r["http.query"]=n.search),n.hash&&(r["http.fragment"]=n.hash),r}catch{return{}}}function ey(t,e="/"){let n=`${t}`;return t.endsWith("/")&&e.startsWith("/")?`${n}${e.slice(1)}`:!t.endsWith("/")&&!e.startsWith("/")?`${n}/${e.slice(1)}`:`${n}${e}`}c();import*as kd from"node:util";var ty="Console",ny=()=>({name:ty,setup(t){Uc(({args:e,level:n})=>{se()===t&&ln({category:"console",level:qc(n),message:kd.format.apply(void 0,e)},{input:[...e],level:n})})}}),Gd=ny;c();import{execFile as ry}from"node:child_process";import{readFile as oy,readdir as iy}from"node:fs";import*as de from"node:os";import{join as sy}from"node:path";import{promisify as Hd}from"node:util";var ay=Hd(oy),cy=Hd(iy),uy="Context",ly=(t={})=>{let e,n={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...t};async function r(i){e===void 0&&(e=o());let s=py(await e);return i.contexts={...i.contexts,app:{...s.app,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.app])},os:{...s.os,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.os])},device:{...s.device,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.device])},culture:{...s.culture,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.culture])},cloud_resource:{...s.cloud_resource,...O([i,"access",a=>a.contexts,"optionalAccess",a=>a.cloud_resource])}},i}async function o(){let i={};if(n.os&&(i.os=await dy()),n.app&&(i.app=my()),n.device&&(i.device=hy(n.device)),n.culture){let s=fy();s&&(i.culture=s)}return n.cloudResource&&(i.cloud_resource=yy()),i}return{name:uy,processEvent(i){return r(i)}}},jd=ly;function py(t){if(O([t,"optionalAccess",e=>e.app,"optionalAccess",e=>e.app_memory])&&(t.app.app_memory=process.memoryUsage().rss),O([t,"optionalAccess",e=>e.app,"optionalAccess",e=>e.free_memory])&&typeof process.availableMemory=="function"){let e=O([process,"access",n=>n.availableMemory,"optionalCall",n=>n()]);e!=null&&(t.app.free_memory=e)}return O([t,"optionalAccess",e=>e.device,"optionalAccess",e=>e.free_memory])&&(t.device.free_memory=de.freemem()),t}async function dy(){let t=de.platform();switch(t){case"darwin":return Ty();case"linux":return Sy();default:return{name:_y[t]||t,version:de.release()}}}function fy(){try{if(typeof process.versions.icu!="string")return;let t=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(t)==="enero"){let n=Intl.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone}}}catch{}}function my(){let t=process.memoryUsage().rss,n={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:t};if(typeof process.availableMemory=="function"){let r=O([process,"access",o=>o.availableMemory,"optionalCall",o=>o()]);r!=null&&(n.free_memory=r)}return n}function hy(t){let e={},n;try{n=de.uptime&&de.uptime()}catch{}if(typeof n=="number"&&(e.boot_time=new Date(Date.now()-n*1e3).toISOString()),e.arch=de.arch(),(t===!0||t.memory)&&(e.memory_size=de.totalmem(),e.free_memory=de.freemem()),t===!0||t.cpu){let r=de.cpus(),o=r&&r[0];o&&(e.processor_count=r.length,e.cpu_description=o.model,e.processor_frequency=o.speed)}return e}var _y={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},gy=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],Ey={alpine:t=>t,arch:t=>Qe(/distrib_release=(.*)/,t),centos:t=>Qe(/release ([^ ]+)/,t),debian:t=>t,fedora:t=>Qe(/release (..)/,t),mint:t=>Qe(/distrib_release=(.*)/,t),red:t=>Qe(/release ([^ ]+)/,t),suse:t=>Qe(/VERSION = (.*)\n/,t),ubuntu:t=>Qe(/distrib_release=(.*)/,t)};function Qe(t,e){let n=t.exec(e);return n?n[1]:void 0}async function Ty(){let t={kernel_version:de.release(),name:"Mac OS X",version:`10.${Number(de.release().split(".")[0])-4}`};try{let e=await new Promise((n,r)=>{ry("/usr/bin/sw_vers",(o,i)=>{if(o){r(o);return}n(i)})});t.name=Qe(/^ProductName:\s+(.*)$/m,e),t.version=Qe(/^ProductVersion:\s+(.*)$/m,e),t.build=Qe(/^BuildVersion:\s+(.*)$/m,e)}catch{}return t}function Ud(t){return t.split(" ")[0].toLowerCase()}async function Sy(){let t={kernel_version:de.release(),name:"Linux"};try{let e=await cy("/etc"),n=gy.find(a=>e.includes(a.name));if(!n)return t;let r=sy("/etc",n.name),o=(await ay(r,{encoding:"utf-8"})).toLowerCase(),{distros:i}=n;t.name=i.find(a=>o.indexOf(Ud(a))>=0)||i[0];let s=Ud(t.name);t.version=O([Ey,"access",a=>a[s],"optionalCall",a=>a(o)])}catch{}return t}function yy(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}c();import{createReadStream as vy}from"node:fs";import{createInterface as Ay}from"node:readline";var Ca=new Nt(10),Wd=new Nt(20),Oy=7,Cy="ContextLines",by=1e3,Ry=1e4;function Iy(t,e,n){let r=t.get(e);return r===void 0?(t.set(e,n),n):r}function Py(t){return!!(t.startsWith("node:")||t.endsWith(".min.js")||t.endsWith(".min.cjs")||t.endsWith(".min.mjs")||t.startsWith("data:"))}function Ny(t){return t.lineno!==void 0&&t.lineno>Ry||t.colno!==void 0&&t.colno>by}function My(t,e){let n=Ca.get(t);if(n===void 0)return!1;for(let r=e[0];r<=e[1];r++)if(n[r]===void 0)return!1;return!0}function xy(t,e){if(!t.length)return[];let n=0,r=t[0];if(typeof r!="number")return[];let o=Bd(r,e),i=[];for(;;){if(n===t.length-1){i.push(o);break}let s=t[n+1];if(typeof s!="number")break;s<=o[1]?o[1]=s+e:(i.push(o),o=Bd(s,e)),n++}return i}function Ly(t,e,n){return new Promise((r,o)=>{let i=vy(t),s=Ay({input:i}),a=0,u=0,l=e[u];if(l===void 0){r();return}let p=l[0],d=l[1];function m(h){Wd.set(t,1),ie&&G.error(`Failed to read file: ${t}. Error: ${h}`),s.close(),s.removeAllListeners(),r()}i.on("error",m),s.on("error",m),s.on("close",r),s.on("line",h=>{if(a++,!(a<p)&&(n[a]=kc(h,0),a>=d)){if(u===e.length-1){s.close(),s.removeAllListeners();return}u++;let _=e[u];if(_===void 0){s.close(),s.removeAllListeners();return}p=_[0],d=_[1]}})})}async function wy(t,e){let n={};if(e>0&&O([t,"access",i=>i.exception,"optionalAccess",i=>i.values])){for(let i of t.exception.values)if(O([i,"access",s=>s.stacktrace,"optionalAccess",s=>s.frames,"optionalAccess",s=>s.length]))for(let s=i.stacktrace.frames.length-1;s>=0;s--){let a=i.stacktrace.frames[s],u=O([a,"optionalAccess",p=>p.filename]);if(!a||typeof u!="string"||typeof a.lineno!="number"||Py(u)||Ny(a))continue;n[u]||(n[u]=[]),n[u].push(a.lineno)}}let r=Object.keys(n);if(r.length==0)return t;let o=[];for(let i of r){if(Wd.get(i))continue;let s=n[i];if(!s)continue;s.sort((l,p)=>l-p);let a=xy(s,e);if(a.every(l=>My(i,l)))continue;let u=Iy(Ca,i,{});o.push(Ly(i,a,u))}if(await Promise.all(o).catch(()=>{ie&&G.log("Failed to read one or more source files and resolve context lines")}),e>0&&O([t,"access",i=>i.exception,"optionalAccess",i=>i.values]))for(let i of t.exception.values)i.stacktrace&&i.stacktrace.frames&&i.stacktrace.frames.length>0&&Fy(i.stacktrace.frames,e,Ca);return t}function Fy(t,e,n){for(let r of t)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let o=n.get(r.filename);if(o===void 0)continue;Dy(r.lineno,r,e,o)}}function qd(t){delete t.pre_context,delete t.context_line,delete t.post_context}function Dy(t,e,n,r){if(e.lineno===void 0||r===void 0){ie&&G.error("Cannot resolve context for frame with no lineno or file contents");return}e.pre_context=[];for(let i=Vd(t,n);i<t;i++){let s=r[i];if(s===void 0){qd(e),ie&&G.error(`Could not find line ${i} in file ${e.filename}`);return}e.pre_context.push(s)}if(r[t]===void 0){qd(e),ie&&G.error(`Could not find line ${t} in file ${e.filename}`);return}e.context_line=r[t];let o=Kd(t,n);e.post_context=[];for(let i=t+1;i<=o;i++){let s=r[i];if(s===void 0)break;e.post_context.push(s)}}function Vd(t,e){return Math.max(1,t-e)}function Kd(t,e){return t+e}function Bd(t,e){return[Vd(t,e),Kd(t,e)]}var ky=(t={})=>{let e=t.frameContextLines!==void 0?t.frameContextLines:Oy;return{name:Cy,processEvent(n){return wy(n,e)}}},Yd=ky;c();c();import{Worker as Gy}from"node:worker_threads";c();function Xd(t,e,n){let r=0,o=5,i=0;return setInterval(()=>{i===0?r>t&&(o*=2,n(o),o>86400&&(o=86400),i=o):(i-=1,i===0&&e()),r=0},1e3).unref(),()=>{r+=1}}function $d(t){return t!==void 0&&(t.length===0||t==="?"||t==="<anonymous>")}function ti(t,e){return t===e||$d(t)&&$d(e)}function Lr(t){if(t!==void 0)return t.slice(-10).reduce((e,n)=>`${e},${n.function},${n.lineno},${n.colno}`,"")}function Zd(t,e){if(e!==void 0)return Lr(t(e,1))}var Uy="LyohIEBzZW50cnkvbm9kZSA4LjIwLjAgKGNkZDBhOTIpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIG4scGFyZW50UG9ydCBhcyB0fWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7aW1wb3J0e3Bvc2l4IGFzIG8sc2VwIGFzIHJ9ZnJvbSJub2RlOnBhdGgiO2NvbnN0IGk9NTAscz0iPyIsYz0vXChlcnJvcjogKC4qKVwpLyxhPS9jYXB0dXJlTWVzc2FnZXxjYXB0dXJlRXhjZXB0aW9uLztmdW5jdGlvbiB1KGUpe3JldHVybiBlW2UubGVuZ3RoLTFdfHx7fX1jb25zdCBmPS9eKFxTKzpcXHxcLz8pKFtcc1xTXSo/KSgoPzpcLnsxLDJ9fFteL1xcXSs/fCkoXC5bXi4vXFxdKnwpKSg/OlsvXFxdKikkLztmdW5jdGlvbiBsKGUpe2NvbnN0IG49ZnVuY3Rpb24oZSl7Y29uc3Qgbj1lLmxlbmd0aD4xMDI0P2A8dHJ1bmNhdGVkPiR7ZS5zbGljZSgtMTAyNCl9YDplLHQ9Zi5leGVjKG4pO3JldHVybiB0P3Quc2xpY2UoMSk6W119KGUpLHQ9blswXXx8IiI7bGV0IG89blsxXTtyZXR1cm4gdHx8bz8obyYmKG89by5zbGljZSgwLG8ubGVuZ3RoLTEpKSx0K28pOiIuIn1mdW5jdGlvbiBkKGUsbj0hMSl7cmV0dXJuIShufHxlJiYhZS5zdGFydHNXaXRoKCIvIikmJiFlLm1hdGNoKC9eW0EtWl06LykmJiFlLnN0YXJ0c1dpdGgoIi4iKSYmIWUubWF0Y2goL15bYS16QS1aXShbYS16QS1aMC05LlwtK10pKjpcL1wvLykpJiZ2b2lkIDAhPT1lJiYhZS5pbmNsdWRlcygibm9kZV9tb2R1bGVzLyIpfWZ1bmN0aW9uIHAoZSl7Y29uc3Qgbj0vXlxzKlstXXs0LH0kLyx0PS9hdCAoPzphc3luYyApPyg/OiguKz8pXHMrXCgpPyg/OiguKyk6KFxkKyk6KFxkKyk/fChbXildKykpXCk/LztyZXR1cm4gbz0+e2NvbnN0IHI9by5tYXRjaCh0KTtpZihyKXtsZXQgbix0LG8saSxjO2lmKHJbMV0pe289clsxXTtsZXQgZT1vLmxhc3RJbmRleE9mKCIuIik7aWYoIi4iPT09b1tlLTFdJiZlLS0sZT4wKXtuPW8uc2xpY2UoMCxlKSx0PW8uc2xpY2UoZSsxKTtjb25zdCByPW4uaW5kZXhPZigiLk1vZHVsZSIpO3I+MCYmKG89by5zbGljZShyKzEpLG49bi5zbGljZSgwLHIpKX1pPXZvaWQgMH10JiYoaT1uLGM9dCksIjxhbm9ueW1vdXM+Ij09PXQmJihjPXZvaWQgMCxvPXZvaWQgMCksdm9pZCAwPT09byYmKGM9Y3x8cyxvPWk/YCR7aX0uJHtjfWA6Yyk7bGV0IGE9clsyXSYmclsyXS5zdGFydHNXaXRoKCJmaWxlOi8vIik/clsyXS5zbGljZSg3KTpyWzJdO2NvbnN0IHU9Im5hdGl2ZSI9PT1yWzVdO3JldHVybiBhJiZhLm1hdGNoKC9cL1tBLVpdOi8pJiYoYT1hLnNsaWNlKDEpKSxhfHwhcls1XXx8dXx8KGE9cls1XSkse2ZpbGVuYW1lOmEsbW9kdWxlOmU/ZShhKTp2b2lkIDAsZnVuY3Rpb246byxsaW5lbm86ZyhyWzNdKSxjb2xubzpnKHJbNF0pLGluX2FwcDpkKGF8fCIiLHUpfX1pZihvLm1hdGNoKG4pKXJldHVybntmaWxlbmFtZTpvfX19ZnVuY3Rpb24gZyhlKXtyZXR1cm4gcGFyc2VJbnQoZXx8IiIsMTApfHx2b2lkIDB9ZnVuY3Rpb24gbShlKXtyZXR1cm4gZS5yZXBsYWNlKC9eW0EtWl06LywiIikucmVwbGFjZSgvXFwvZywiLyIpfWNvbnN0IGI9biwkPWZ1bmN0aW9uKC4uLmUpe2NvbnN0IG49ZS5zb3J0KCgoZSxuKT0+ZVswXS1uWzBdKSkubWFwKChlPT5lWzFdKSk7cmV0dXJuKGUsdD0wLG89MCk9Pntjb25zdCByPVtdLGY9ZS5zcGxpdCgiXG4iKTtmb3IobGV0IGU9dDtlPGYubGVuZ3RoO2UrKyl7Y29uc3QgdD1mW2VdO2lmKHQubGVuZ3RoPjEwMjQpY29udGludWU7Y29uc3Qgcz1jLnRlc3QodCk/dC5yZXBsYWNlKGMsIiQxIik6dDtpZighcy5tYXRjaCgvXFMqRXJyb3I6IC8pKXtmb3IoY29uc3QgZSBvZiBuKXtjb25zdCBuPWUocyk7aWYobil7ci5wdXNoKG4pO2JyZWFrfX1pZihyLmxlbmd0aD49aStvKWJyZWFrfX1yZXR1cm4gZnVuY3Rpb24oZSl7aWYoIWUubGVuZ3RoKXJldHVybltdO2NvbnN0IG49QXJyYXkuZnJvbShlKTsvc2VudHJ5V3JhcHBlZC8udGVzdCh1KG4pLmZ1bmN0aW9ufHwiIikmJm4ucG9wKCk7bi5yZXZlcnNlKCksYS50ZXN0KHUobikuZnVuY3Rpb258fCIiKSYmKG4ucG9wKCksYS50ZXN0KHUobikuZnVuY3Rpb258fCIiKSYmbi5wb3AoKSk7cmV0dXJuIG4uc2xpY2UoMCxpKS5tYXAoKGU9Pih7Li4uZSxmaWxlbmFtZTplLmZpbGVuYW1lfHx1KG4pLmZpbGVuYW1lLGZ1bmN0aW9uOmUuZnVuY3Rpb258fHN9KSkpfShyLnNsaWNlKG8pKX19KFs5MCxwKGZ1bmN0aW9uKGU9KHByb2Nlc3MuYXJndlsxXT9sKHByb2Nlc3MuYXJndlsxXSk6cHJvY2Vzcy5jd2QoKSksbj0iXFwiPT09cil7Y29uc3QgdD1uP20oZSk6ZTtyZXR1cm4gZT0+e2lmKCFlKXJldHVybjtjb25zdCByPW4/bShlKTplO2xldHtkaXI6aSxiYXNlOnMsZXh0OmN9PW8ucGFyc2Uocik7Ii5qcyIhPT1jJiYiLm1qcyIhPT1jJiYiLmNqcyIhPT1jfHwocz1zLnNsaWNlKDAsLTEqYy5sZW5ndGgpKSxpfHwoaT0iLiIpO2NvbnN0IGE9aS5sYXN0SW5kZXhPZigiL25vZGVfbW9kdWxlcyIpO2lmKGE+LTEpcmV0dXJuYCR7aS5zbGljZShhKzE0KS5yZXBsYWNlKC9cLy9nLCIuIil9OiR7c31gO2lmKGkuc3RhcnRzV2l0aCh0KSl7bGV0IGU9aS5zbGljZSh0Lmxlbmd0aCsxKS5yZXBsYWNlKC9cLy9nLCIuIik7cmV0dXJuIGUmJihlKz0iOiIpLGUrPXMsZX1yZXR1cm4gc319KGIuYmFzZVBhdGgpKV0pO2Z1bmN0aW9uIHYoLi4uZSl7Yi5kZWJ1ZyYmY29uc29sZS5sb2coIltMb2NhbFZhcmlhYmxlcyBXb3JrZXJdIiwuLi5lKX1hc3luYyBmdW5jdGlvbiB3KGUsbix0LG8pe2NvbnN0IHI9YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDpuLG93blByb3BlcnRpZXM6ITB9KTtvW3RdPXIucmVzdWx0LmZpbHRlcigoZT0+Imxlbmd0aCIhPT1lLm5hbWUmJiFpc05hTihwYXJzZUludChlLm5hbWUsMTApKSkpLnNvcnQoKChlLG4pPT5wYXJzZUludChlLm5hbWUsMTApLXBhcnNlSW50KG4ubmFtZSwxMCkpKS5tYXAoKGU9PmUudmFsdWU/LnZhbHVlKSl9YXN5bmMgZnVuY3Rpb24geShlLG4sdCxvKXtjb25zdCByPWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6bixvd25Qcm9wZXJ0aWVzOiEwfSk7b1t0XT1yLnJlc3VsdC5tYXAoKGU9PltlLm5hbWUsZS52YWx1ZT8udmFsdWVdKSkucmVkdWNlKCgoZSxbbix0XSk9PihlW25dPXQsZSkpLHt9KX1mdW5jdGlvbiBoKGUsbil7ZS52YWx1ZSYmKCJ2YWx1ZSJpbiBlLnZhbHVlP3ZvaWQgMD09PWUudmFsdWUudmFsdWV8fG51bGw9PT1lLnZhbHVlLnZhbHVlP25bZS5uYW1lXT1gPCR7ZS52YWx1ZS52YWx1ZX0+YDpuW2UubmFtZV09ZS52YWx1ZS52YWx1ZToiZGVzY3JpcHRpb24iaW4gZS52YWx1ZSYmImZ1bmN0aW9uIiE9PWUudmFsdWUudHlwZT9uW2UubmFtZV09YDwke2UudmFsdWUuZGVzY3JpcHRpb259PmA6InVuZGVmaW5lZCI9PT1lLnZhbHVlLnR5cGUmJihuW2UubmFtZV09Ijx1bmRlZmluZWQ+IikpfWFzeW5jIGZ1bmN0aW9uIFAoZSxuKXtjb25zdCB0PWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6bixvd25Qcm9wZXJ0aWVzOiEwfSksbz17fTtmb3IoY29uc3QgbiBvZiB0LnJlc3VsdClpZihuPy52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT1uPy52YWx1ZS5jbGFzc05hbWUpe2NvbnN0IHQ9bi52YWx1ZS5vYmplY3RJZDthd2FpdCB3KGUsdCxuLm5hbWUsbyl9ZWxzZSBpZihuPy52YWx1ZT8ub2JqZWN0SWQmJiJPYmplY3QiPT09bj8udmFsdWU/LmNsYXNzTmFtZSl7Y29uc3QgdD1uLnZhbHVlLm9iamVjdElkO2F3YWl0IHkoZSx0LG4ubmFtZSxvKX1lbHNlIG4/LnZhbHVlJiZoKG4sbyk7cmV0dXJuIG99bGV0IHg7KGFzeW5jIGZ1bmN0aW9uKCl7Y29uc3Qgbj1uZXcgZTtuLmNvbm5lY3RUb01haW5UaHJlYWQoKSx2KCJDb25uZWN0ZWQgdG8gbWFpbiB0aHJlYWQiKTtsZXQgbz0hMTtuLm9uKCJEZWJ1Z2dlci5yZXN1bWVkIiwoKCk9PntvPSExfSkpLG4ub24oIkRlYnVnZ2VyLnBhdXNlZCIsKGU9PntvPSEwLGFzeW5jIGZ1bmN0aW9uKGUsbix7cmVhc29uOm8sZGF0YTpyLGNhbGxGcmFtZXM6aX0pe2lmKCJleGNlcHRpb24iIT09byYmInByb21pc2VSZWplY3Rpb24iIT09bylyZXR1cm47eD8uKCk7Y29uc3Qgcz1mdW5jdGlvbihlLG4pe2lmKHZvaWQgMCE9PW4pcmV0dXJuIGZ1bmN0aW9uKGUpe2lmKHZvaWQgMCE9PWUpcmV0dXJuIGUuc2xpY2UoLTEwKS5yZWR1Y2UoKChlLG4pPT5gJHtlfSwke24uZnVuY3Rpb259LCR7bi5saW5lbm99LCR7bi5jb2xub31gKSwiIil9KGUobiwxKSl9KG4scj8uZGVzY3JpcHRpb24pO2lmKG51bGw9PXMpcmV0dXJuO2NvbnN0IGM9W107Zm9yKGxldCBuPTA7bjxpLmxlbmd0aDtuKyspe2NvbnN0e3Njb3BlQ2hhaW46dCxmdW5jdGlvbk5hbWU6byx0aGlzOnJ9PWlbbl0scz10LmZpbmQoKGU9PiJsb2NhbCI9PT1lLnR5cGUpKSxhPSJnbG9iYWwiIT09ci5jbGFzc05hbWUmJnIuY2xhc3NOYW1lP2Ake3IuY2xhc3NOYW1lfS4ke299YDpvO2lmKHZvaWQgMD09PXM/Lm9iamVjdC5vYmplY3RJZCljW25dPXtmdW5jdGlvbjphfTtlbHNle2NvbnN0IHQ9YXdhaXQgUChlLHMub2JqZWN0Lm9iamVjdElkKTtjW25dPXtmdW5jdGlvbjphLHZhcnM6dH19fXQ/LnBvc3RNZXNzYWdlKHtleGNlcHRpb25IYXNoOnMsZnJhbWVzOmN9KX0obiwkLGUucGFyYW1zKS50aGVuKCgoKT0+bz9uLnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpOlByb21pc2UucmVzb2x2ZSgpKSwoZT0+e30pKX0pKSxhd2FpdCBuLnBvc3QoIkRlYnVnZ2VyLmVuYWJsZSIpO2NvbnN0IHI9ITEhPT1iLmNhcHR1cmVBbGxFeGNlcHRpb25zO2lmKGF3YWl0IG4ucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZTpyPyJhbGwiOiJ1bmNhdWdodCJ9KSxyKXtjb25zdCBlPWIubWF4RXhjZXB0aW9uc1BlclNlY29uZHx8NTA7eD1mdW5jdGlvbihlLG4sdCl7bGV0IG89MCxyPTUsaT0wO3JldHVybiBzZXRJbnRlcnZhbCgoKCk9PnswPT09aT9vPmUmJihyKj0yLHQocikscj44NjQwMCYmKHI9ODY0MDApLGk9cik6KGktPTEsMD09PWkmJm4oKSksbz0wfSksMWUzKS51bnJlZigpLCgpPT57bys9MX19KGUsKGFzeW5jKCk9Pnt2KCJSYXRlLWxpbWl0IGxpZnRlZC4iKSxhd2FpdCBuLnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6ImFsbCJ9KX0pLChhc3luYyBlPT57dihgUmF0ZS1saW1pdCBleGNlZWRlZC4gRGlzYWJsaW5nIGNhcHR1cmluZyBvZiBjYXVnaHQgZXhjZXB0aW9ucyBmb3IgJHtlfSBzZWNvbmRzLmApLGF3YWl0IG4ucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZToidW5jYXVnaHQifSl9KSl9fSkoKS5jYXRjaCgoZT0+e3YoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSksc2V0SW50ZXJ2YWwoKCgpPT57fSksMWU0KTs=";function zd(...t){G.log("[LocalVariables]",...t)}var Jd=(t={})=>{let e=new Nt(20);function n(s){let a=Lr(O([s,"optionalAccess",p=>p.stacktrace,"optionalAccess",p=>p.frames]));if(a===void 0)return;let u=e.remove(a);if(u===void 0)return;let l=(O([s,"access",p=>p.stacktrace,"optionalAccess",p=>p.frames])||[]).filter(p=>p.function!=="new Promise");for(let p=0;p<l.length;p++){let d=l.length-p-1,m=u[p],h=l[d];if(!h||!m)break;m.vars===void 0||h.in_app===!1||!ti(h.function,m.function)||(h.vars=m.vars)}}function r(s){for(let a of O([s,"access",u=>u.exception,"optionalAccess",u=>u.values])||[])n(a);return s}async function o(){let s=await import("node:inspector");s.url()||s.open(0)}function i(s){let a=new Gy(new URL(`data:application/javascript;base64,${Uy}`),{workerData:s,execArgv:[]});process.on("exit",()=>{a.terminate()}),a.on("message",({exceptionHash:u,frames:l})=>{e.set(u,l)}),a.once("error",u=>{zd("Worker error",u)}),a.once("exit",u=>{zd("Worker exit",u)}),a.unref()}return{name:"LocalVariablesAsync",setup(s){if(!s.getOptions().includeLocalVariables)return;let u={...t,debug:G.isEnabled()};o().then(()=>{try{i(u)}catch(l){G.error("Failed to start worker",l)}},l=>{G.error("Failed to start inspector",l)})},processEvent(s){return r(s)}}};c();function Qd(t){let e=[],n=!1;function r(s){e=[],!n&&(n=!0,t(s))}e.push(r);function o(s){e.push(s)}function i(s){let a=e.pop()||r;try{a(s)}catch{r(s)}}return{add:o,next:i}}var ba=class t{constructor(e){this._session=e}static async create(e){if(e)return e;let n=await import("node:inspector");return new t(new n.Session)}configureAndConnect(e,n){this._session.connect(),this._session.on("Debugger.paused",r=>{e(r,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:n?"all":"uncaught"})}setPauseOnExceptions(e){this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(e,n){this._getProperties(e,r=>{let{add:o,next:i}=Qd(n);for(let s of r)if(O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&O([s,"optionalAccess",a=>a.value,"access",a=>a.className])==="Array"){let a=s.value.objectId;o(u=>this._unrollArray(a,s.name,u,i))}else if(O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.objectId])&&O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.className])==="Object"){let a=s.value.objectId;o(u=>this._unrollObject(a,s.name,u,i))}else O([s,"optionalAccess",a=>a.value])&&o(a=>this._unrollOther(s,a,i));i({})})}_getProperties(e,n){this._session.post("Runtime.getProperties",{objectId:e,ownProperties:!0},(r,o)=>{n(r?[]:o.result)})}_unrollArray(e,n,r,o){this._getProperties(e,i=>{r[n]=i.filter(s=>s.name!=="length"&&!isNaN(parseInt(s.name,10))).sort((s,a)=>parseInt(s.name,10)-parseInt(a.name,10)).map(s=>O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])),o(r)})}_unrollObject(e,n,r,o){this._getProperties(e,i=>{r[n]=i.map(s=>[s.name,O([s,"optionalAccess",a=>a.value,"optionalAccess",a=>a.value])]).reduce((s,[a,u])=>(s[a]=u,s),{}),o(r)})}_unrollOther(e,n,r){e.value&&("value"in e.value?e.value.value===void 0||e.value.value===null?n[e.name]=`<${e.value.value}>`:n[e.name]=e.value.value:"description"in e.value&&e.value.type!=="function"?n[e.name]=`<${e.value.description}>`:e.value.type==="undefined"&&(n[e.name]="<undefined>")),r(n)}},Hy="LocalVariables",jy=(t={},e)=>{let n=new Nt(20),r,o=!1;function i(a){let u=Lr(O([a,"optionalAccess",d=>d.stacktrace,"optionalAccess",d=>d.frames]));if(u===void 0)return;let l=n.remove(u);if(l===void 0)return;let p=(O([a,"access",d=>d.stacktrace,"optionalAccess",d=>d.frames])||[]).filter(d=>d.function!=="new Promise");for(let d=0;d<p.length;d++){let m=p.length-d-1,h=l[d],_=p[m];if(!_||!h)break;h.vars===void 0||_.in_app===!1||!ti(_.function,h.function)||(_.vars=h.vars)}}function s(a){for(let u of O([a,"optionalAccess",l=>l.exception,"optionalAccess",l=>l.values])||[])i(u);return a}return{name:Hy,setupOnce(){let a=se(),u=O([a,"optionalAccess",p=>p.getOptions,"call",p=>p()]);if(!O([u,"optionalAccess",p=>p.includeLocalVariables]))return;if(ei<18){G.log("The `LocalVariables` integration is only supported on Node >= v18.");return}ba.create(e).then(p=>{function d(h,{params:{reason:_,data:T,callFrames:R}},M){if(_!=="exception"&&_!=="promiseRejection"){M();return}O([r,"optionalCall",w=>w()]);let b=Zd(h,O([T,"optionalAccess",w=>w.description]));if(b==null){M();return}let{add:A,next:N}=Qd(w=>{n.set(b,w),M()});for(let w=0;w<Math.min(R.length,5);w++){let{scopeChain:W,functionName:x,this:B}=R[w],j=W.find(v=>v.type==="local"),he=B.className==="global"||!B.className?x:`${B.className}.${x}`;if(O([j,"optionalAccess",v=>v.object,"access",v=>v.objectId])===void 0)A(v=>{v[w]={function:he},N(v)});else{let v=j.object.objectId;A(D=>O([p,"optionalAccess",$=>$.getLocalVariables,"call",$=>$(v,U=>{D[w]={function:he,vars:U},N(D)})]))}}N([])}let m=t.captureAllExceptions!==!1;if(p.configureAndConnect((h,_)=>d(u.stackParser,h,_),m),m){let h=t.maxExceptionsPerSecond||50;r=Xd(h,()=>{G.log("Local variables rate-limit lifted."),O([p,"optionalAccess",_=>_.setPauseOnExceptions,"call",_=>_(!0)])},_=>{G.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${_} seconds.`),O([p,"optionalAccess",T=>T.setPauseOnExceptions,"call",T=>T(!1)])})}o=!0},p=>{G.log("The `LocalVariables` integration failed to start.",p)})},processEvent(a){return o?s(a):a},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}},ef=jy;var tf=(t={})=>Oa.major<19?ef(t):Jd(t);c();import{existsSync as qy,readFileSync as By}from"node:fs";import{dirname as Wy,join as Vy}from"node:path";var Ra,Ky="Modules",Yy=()=>({name:Ky,processEvent(t){return t.modules={...t.modules,...Zy()},t}}),nf=Yy;function $y(){try{return q.cache?Object.keys(q.cache):[]}catch{return[]}}function Xy(){let t=q.main&&q.main.paths||[],e=$y(),n={},r={};return e.forEach(o=>{let i=o,s=()=>{let a=i;if(i=Wy(a),!i||a===i||r[a])return;if(t.indexOf(i)<0)return s();let u=Vy(a,"package.json");if(r[a]=!0,!qy(u))return s();try{let l=JSON.parse(By(u,"utf8"));n[l.name]=l.version}catch{}};s()}),n}function Zy(){return Ra||(Ra=Xy()),Ra}c();c();var zy=2e3;function wr(t){sn(()=>{console.error(t)});let e=se();if(e===void 0){ie&&G.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let n=e.getOptions(),r=n&&n.shutdownTimeout&&n.shutdownTimeout>0&&n.shutdownTimeout||zy;e.close(r).then(o=>{o||ie&&G.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{ie&&G.error(o)})}var Jy="OnUncaughtException",rf=(t={})=>{let e={exitEvenIfOtherHandlersAreRegistered:!1,...t};return{name:Jy,setup(n){global.process.on("uncaughtException",Qy(n,e))}}};function Qy(t,e){let r=!1,o=!1,i=!1,s,a=t.getOptions();return Object.assign(u=>{let l=wr;e.onFatalError?l=e.onFatalError:a.onFatalError&&(l=a.onFatalError);let d=global.process.listeners("uncaughtException").filter(h=>h.name!=="domainUncaughtExceptionClear"&&h.tag!=="sentry_tracingErrorCallback"&&h._errorHandler!==!0).length===0,m=e.exitEvenIfOtherHandlersAreRegistered||d;r?m&&(i?(ie&&G.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),wr(u)):o||(o=!0,setTimeout(()=>{i||(i=!0,l(s,u))},2e3))):(s=u,r=!0,se()===t&&xt(u,{originalException:u,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"onuncaughtexception"}}),!i&&m&&(i=!0,l(u)))},{_errorHandler:!0})}c();var ev="OnUnhandledRejection",tv=(t={})=>{let e=t.mode||"warn";return{name:ev,setup(n){global.process.on("unhandledRejection",nv(n,{mode:e}))}}},of=tv;function nv(t,e){return function(r,o){se()===t&&(xt(r,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0}},mechanism:{handled:!1,type:"onunhandledrejection"}}),rv(r,e))}}function rv(t,e){let n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";e.mode==="warn"?sn(()=>{console.warn(n),console.error(t&&t.stack?t.stack:t)}):e.mode==="strict"&&(sn(()=>{console.warn(n)}),wr(t))}c();var Tf=k(_f(),1);c();var gf={};function V(t,e){return Object.assign(n=>{let r=gf[t];if(r){n&&r.setConfig(n);return}let o=e(n);gf[t]=o,An(o)},{id:t})}c();function Ef(){return typeof q<"u"}var Sf="Express",yf=V(Sf,()=>new Tf.ExpressInstrumentation({requestHook(t){Se(t,"auto.http.otel.express");let e=Fe(t).data||{},n=e["express.type"];n&&t.setAttribute(Ve,`${n}.express`);let r=e["express.name"];typeof r=="string"&&t.updateName(r)},spanNameHook(t,e){if(we()===or())return ie&&G.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),e;if(t.layerType==="request_handler"){let n=t.request,r=n.method?n.method.toUpperCase():"GET";we().setTransactionName(`${r} ${t.route}`)}return e}})),mv=()=>({name:Sf,setupOnce(){yf()}}),vf=mv;c();var xf=k(Mf(),1);var Lf="Fastify",wf=V(Lf,()=>new xf.FastifyInstrumentation({requestHook(t){bv(t)}})),Cv=()=>({name:Lf,setupOnce(){wf()}}),Ff=Cv;function bv(t){let e=Fe(t).data||{},n=e["fastify.type"];if(e[Ve]||!n)return;t.setAttributes({[Je]:"auto.http.otel.fastify",[Ve]:`${n}.fastify`});let r=e["fastify.name"]||e["plugin.name"]||e["hook.name"];typeof r=="string"&&t.updateName(r.replace(/^fastify -> /,""))}c();var rm=k(nm(),1);var om="Graphql",im=V(om,(t={})=>{let e={ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,...t};return new rm.GraphQLInstrumentation({...e,responseHook(n){Se(n,"auto.graphql.otel.graphql")}})}),Wv=(t={})=>({name:om,setupOnce(){im(t)}}),sm=Wv;c();var mm=k(fm(),1);var hm="Mongo",_m=V(hm,()=>new mm.MongoDBInstrumentation({responseHook(t){Se(t,"auto.db.otel.mongo")}})),$v=()=>({name:hm,setupOnce(){_m()}}),gm=$v;c();var Nm=k(Pm(),1);var Mm="Mongoose",xm=V(Mm,()=>new Nm.MongooseInstrumentation({responseHook(t){Se(t,"auto.db.otel.mongoose")}})),tA=()=>({name:Mm,setupOnce(){xm()}}),Lm=tA;c();var Wm=k(Bm(),1);var Vm="Mysql",Km=V(Vm,()=>new Wm.MySQLInstrumentation({})),pA=()=>({name:Vm,setupOnce(){Km()}}),Ym=pA;c();var ih=k(oh(),1);var sh="Mysql2",ah=V(sh,()=>new ih.MySQL2Instrumentation({responseHook(t){Se(t,"auto.db.otel.mysql2")}})),vA=()=>({name:sh,setupOnce(){ah()}}),ch=vA;c();var Mh=k(gh(),1),xh=k(Rh(),1);c();var DA=["get","set","setex"],Ja=["get","mget"],kA=["set","setex"];function Xr(t,e){return t.includes(e.toLowerCase())}function Qa(t){return Xr(Ja,t)?"cache.get":Xr(kA,t)?"cache.put":void 0}function GA(t,e){return e.some(n=>t.startsWith(n))}function Ih(t,e){try{if(e.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?zi(o.map(i=>n(i))):["<unknown>"],r=e[0];return Xr(DA,t)&&r!=null?n(r):zi(e.map(o=>n(o)))}catch{return}}function Ph(t,e,n){if(!Qa(t))return!1;for(let r of e)if(GA(r,n))return!0;return!1}function Nh(t){let e=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(t)?t.reduce((n,r)=>{let o=e(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):e(t)}var Lh="Redis",ec={},wh=(t,e,n,r)=>{t.setAttribute(Je,"auto.db.otel.redis");let o=Ih(e,n),i=Qa(e);if(!o||!i||!O([ec,"optionalAccess",p=>p.cachePrefixes])||!Ph(e,o,ec.cachePrefixes))return;let s=O([Fe,"call",p=>p(t),"access",p=>p.data,"optionalAccess",p=>p["net.peer.name"]]),a=O([Fe,"call",p=>p(t),"access",p=>p.data,"optionalAccess",p=>p["net.peer.port"]]);a&&s&&t.setAttributes({"network.peer.address":s,"network.peer.port":a});let u=Nh(r);u&&t.setAttribute(nu,u),Xr(Ja,e)&&u!==void 0&&t.setAttribute(eu,u>0),t.setAttributes({[Ve]:i,[tu]:o});let l=o.join(", ");t.updateName(Dc(l,1024))},UA=V("IORedis",()=>new Mh.IORedisInstrumentation({responseHook:wh})),HA=V("Redis-4",()=>new xh.RedisInstrumentation({responseHook:wh})),Fh=Object.assign(()=>{UA(),HA()},{id:Lh}),jA=(t={})=>({name:Lh,setupOnce(){ec=t,Fh()}}),Dh=jA;c();var Wh=k(Bh(),1);var Vh="Nest",Kh=V(Vh,()=>new Wh.NestInstrumentation),ZA=()=>({name:Vh,setupOnce(){Kh()}}),Yh=ZA;c();var u_=k(c_(),1);var l_="Postgres",p_=V(l_,()=>new u_.PgInstrumentation({requireParentSpan:!0,requestHook(t){Se(t,"auto.db.otel.postgres")}})),lO=()=>({name:l_,setupOnce(){p_()}}),d_=lO;c();var S_=k(T_(),1);var y_="Hapi",v_=V(y_,()=>new S_.HapiInstrumentation),yO=()=>({name:y_,setupOnce(){v_()}}),A_=yO;c();var F_=k(w_(),1);ne();var D_="Koa",k_=V(D_,()=>new F_.KoaInstrumentation({requestHook(t,e){if(PO(t),we()===or()){ie&&G.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let n=Fe(t).data,r=n&&n[Yc],o=O([e,"optionalAccess",i=>i.context,"optionalAccess",i=>i.request,"optionalAccess",i=>i.method,"optionalAccess",i=>i.toUpperCase,"call",i=>i()])||"GET";r&&we().setTransactionName(`${o} ${r}`)}})),IO=()=>({name:D_,setupOnce(){k_()}}),G_=IO;function PO(t){t.setAttribute(Je,"auto.http.otel.koa");let e=Fe(t).data||{},n=e["koa.type"];n&&t.setAttribute(Ve,`${n}.koa`);let r=e["koa.name"];typeof r=="string"&&t.updateName(r||"< unknown >")}c();var Y_=k(K_(),1);var $_="Connect",X_=V($_,()=>new Y_.ConnectInstrumentation),HO=()=>({name:$_,setupOnce(){X_()}}),Z_=HO;c();c();function z_(){return[vf(),Ff(),sm(),gm(),Lm(),Ym(),ch(),Dh(),d_(),Yh(),A_(),G_(),Z_()]}c();import*as qO from"node:http";import*as BO from"node:https";import{Readable as WO}from"node:stream";import{createGzip as VO}from"node:zlib";c();import*as Rt from"node:net";import*as Sc from"node:tls";c();import*as Tc from"node:http";var at=Symbol("AgentBaseInternalState"),Ui=class extends Tc.Agent{constructor(e){super(e),this[at]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
|
|
31
31
|
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}createSocket(e,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then(()=>this.connect(e,o)).then(i=>{if(i instanceof Tc.Agent)return i.addRequest(e,o);this[at].currentSocket=i,super.createSocket(e,n,r)},r)}createConnection(){let e=this[at].currentSocket;if(this[at].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return We(this[at].defaultPort,()=>this.protocol==="https:"?443:80)}set defaultPort(e){this[at]&&(this[at].defaultPort=e)}get protocol(){return We(this[at].protocol,()=>this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[at]&&(this[at].protocol=e)}};c();function Hi(...t){G.log("[https-proxy-agent:parse-proxy-response]",...t)}function J_(t){return new Promise((e,n)=>{let r=0,o=[];function i(){let p=t.read();p?l(p):t.once("readable",i)}function s(){t.removeListener("end",a),t.removeListener("error",u),t.removeListener("readable",i)}function a(){s(),Hi("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function u(p){s(),Hi("onerror %o",p),n(p)}function l(p){o.push(p),r+=p.length;let d=Buffer.concat(o,r),m=d.indexOf(`\r
|
|
@@ -40,4 +40,4 @@ Mongoose Error Code: ${e.code}`:""}`})}function qa(t,e,n,r=void 0){n&&(0,Xv.safe
|
|
|
40
40
|
---
|
|
41
41
|
${u}
|
|
42
42
|
`})},setContext:(s,a)=>o.setContext(s,a),setUser:s=>o.setUser(s),getUser:()=>{let s=o.getUser();if(typeof s?.id=="string")return{id:s.id}}}}c();var po=k(qe(),1),bc=k(go(),1);import{stdin as lC}from"node:process";c();var Wi=k(go(),1);import{join as ig}from"node:path";var lo=(0,Wi.variant)({Exists:(0,Wi.fields)(),NotExists:{}}),aC=_o.object({data:_o.unknown(),createdAt:_o.number()}),cC=(t,e)=>Date.now()-t.valueOf()>e*60*60*1e3;function GG(t,e){let n=To();return n.fsCacheDir?ig(n.fsCacheDir,e):ig(t,e)}function sg({filePath:t,ttlInHours:e=24*7}){return{get:async()=>{try{if(await cu(t)){let i=aC.parse(await au(t));if(!cC(i.createdAt,e))return lo.Exists({data:i.data})}return lo.NotExists()}catch(o){throw new Xi({code:Zi.FailedToReadCache({path:t}),cause:o})}},set:async o=>{try{return await su(t,{data:o,createdAt:Date.now()}),lo.Exists({data:o})}catch(i){throw new Xi({code:Zi.FailedToWriteCache({path:t}),cause:i})}}}}c();var ge=k(qe(),1);c();var Ac=k(qe(),1);var Vi=()=>Ac.default.createElement(uu,{i18nKey:"user_feedback.contact_us",components:[Ac.default.createElement(Eo,{url:"https://discord.gg/devs-on-wix"})]});var ag=({onSubmit:t})=>{let{t:e}=lu(),[n,r]=(0,ge.useState)(!1),[o,i]=(0,ge.useState)(),s=(0,ge.useCallback)(u=>{i(u),u||r(!0)},[]),a=(0,ge.useCallback)(u=>{r(!0),t({feedback:u})},[t]);return ge.default.createElement(ge.default.Fragment,null,ge.default.createElement(Be,{flexDirection:"column",marginTop:1,marginBottom:1},ge.default.createElement(I,null,e("user_feedback.title")),ge.default.createElement(I,{skin:"secondary"},e("user_feedback.subtitle"))),ge.default.createElement(Nc,{label:e("user_feedback.consent.label"),onSubmit:s}),o===!0&&ge.default.createElement(Mc,{label:e("user_feedback.comments.label"),onSubmit:a}),n&&ge.default.createElement(Be,{flexDirection:"column",marginTop:1},ge.default.createElement(I,null,e(o?"user_feedback.submitted":"user_feedback.declined")),ge.default.createElement(Vi,null)))};c();var Oc=k(qe(),1);var cg=()=>Oc.default.createElement(Be,{flexDirection:"column",marginTop:1},Oc.default.createElement(Vi,null));var Cc={"user_feedback.title":"Your experience matters to us. Would you like to submit feedback regarding this incident?","user_feedback.subtitle":"We may contact you by email in case we need more details.","user_feedback.consent.label":"Submit feedback?","user_feedback.comments.label":"Feedback (optional)","user_feedback.submitted":"Thank you for your cooperation in helping us resolve this issue promptly.","user_feedback.declined":"Thank you for your feedback.","user_feedback.contact_us":"Reach us in Discord in case you have more questions: <0 />"};async function ug({cachePath:t,reportResult:e,errorReporter:n}){if(!lC.isTTY||!t||!(0,bc.isType)(e,Bi.Reported))return;let r=sg({filePath:t,ttlInHours:1}),o=await r.get();if((0,bc.isType)(o,lo.Exists))return;let i=n.getUser();i?await Lc(po.default.createElement(ls,{messages:Cc},po.default.createElement(ag,{onSubmit:({feedback:s})=>{n.reportUserFeedback({userId:i.id,eventId:e.eventId,feedback:s})}}))):wc(po.default.createElement(ls,{messages:Cc},po.default.createElement(cg,null))),await r.set({reported:!0})}function pC({debugOutputPath:t,userFeedbackCachePath:e,...n}){let r=og(n),o=function({error:s,data:a}){let u=r.reportError(s,{data:a});Fc(lg.default.createElement(gs,{error:s})),ds(t,s),Rc.exitCode=1,ug({reportResult:u,errorReporter:r,cachePath:e}).catch(l=>{ds(t,l)})};return{handler:o,errorReporter:r,registerToProcessErrors:function(){Rc.on("uncaughtException",s=>{o({error:s,data:{mechanism:{handled:!1,type:"uncaughtException"}}})}),Rc.on("unhandledRejection",s=>{s instanceof Error&&s.message.startsWith("Build failed with")&&s.stack?.includes("esbuild")||o({error:s,data:{mechanism:{handled:!1,type:"unhandledRejection"}}})})}}}c();var Jn=k(qe(),1),pg=(0,Jn.createContext)(null),dC=t=>Jn.default.createElement(pg.Provider,{...t}),fC=()=>{let t=(0,Jn.useContext)(pg);if(t===null)throw new Error("useErrorReporter() cannot be used without an <ErrorReporterProvider>");return t};c();c();var Qn=k(qe(),1),dg=(0,Qn.createContext)(null),mC=function({children:t,value:e}){return Qn.default.createElement(dg.Provider,{value:e},t)},hC=()=>{let t=(0,Qn.useContext)(dg);if(t===null)throw new Error("useBiLogger() cannot be used without an <BiProvider>");return t};c();export{sr as a,ds as b,gs as c,vr as d,GG as e,sg as f,pC as g,dC as h,fC as i,mC as j,hC as k};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-LWKR3S3U.js.map
|